Merge pull request #4807 from MikeMcQuaid/cask-move

cask: consistency and cleanliness renames.
This commit is contained in:
Mike McQuaid 2018-09-04 10:25:29 +01:00 committed by GitHub
commit 817b72d5ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
145 changed files with 305 additions and 310 deletions

View File

@ -0,0 +1,21 @@
require "hardware"
require "cask/artifact"
require "cask/audit"
require "cask/auditor"
require "cask/cache"
require "cask/cask"
require "cask/cask_loader"
require "cask/caskroom"
require "cask/checkable"
require "cask/cmd"
require "cask/cask_dependencies"
require "cask/exceptions"
require "cask/installer"
require "cask/macos"
require "cask/pkg"
require "cask/staged"
require "cask/topological_hash"
require "cask/utils"
require "cask/verify"
require "cask/version"

View File

@ -0,0 +1,28 @@
require "cask/artifact/app"
require "cask/artifact/artifact" # generic 'artifact' stanza
require "cask/artifact/binary"
require "cask/artifact/colorpicker"
require "cask/artifact/dictionary"
require "cask/artifact/font"
require "cask/artifact/input_method"
require "cask/artifact/installer"
require "cask/artifact/internet_plugin"
require "cask/artifact/audio_unit_plugin"
require "cask/artifact/vst_plugin"
require "cask/artifact/vst3_plugin"
require "cask/artifact/pkg"
require "cask/artifact/postflight_block"
require "cask/artifact/preflight_block"
require "cask/artifact/prefpane"
require "cask/artifact/qlplugin"
require "cask/artifact/screen_saver"
require "cask/artifact/service"
require "cask/artifact/stage_only"
require "cask/artifact/suite"
require "cask/artifact/uninstall"
require "cask/artifact/zap"
module Hbc
module Artifact
end
end

View File

@ -1,4 +1,4 @@
require "hbc/artifact/abstract_artifact"
require "cask/artifact/abstract_artifact"
module Hbc
module Artifact

View File

@ -1,6 +1,6 @@
require "timeout"
require "hbc/artifact/abstract_artifact"
require "cask/artifact/abstract_artifact"
module Hbc
module Artifact

View File

@ -1,4 +1,4 @@
require "hbc/artifact/moved"
require "cask/artifact/moved"
module Hbc
module Artifact

View File

@ -1,4 +1,4 @@
require "hbc/artifact/moved"
require "cask/artifact/moved"
require "extend/hash_validator"
using HashValidator

View File

@ -1,4 +1,4 @@
require "hbc/artifact/moved"
require "cask/artifact/moved"
module Hbc
module Artifact

View File

@ -1,4 +1,4 @@
require "hbc/artifact/symlinked"
require "cask/artifact/symlinked"
module Hbc
module Artifact

View File

@ -1,4 +1,4 @@
require "hbc/artifact/moved"
require "cask/artifact/moved"
module Hbc
module Artifact

View File

@ -1,4 +1,4 @@
require "hbc/artifact/moved"
require "cask/artifact/moved"
module Hbc
module Artifact

View File

@ -1,4 +1,4 @@
require "hbc/artifact/moved"
require "cask/artifact/moved"
module Hbc
module Artifact

View File

@ -1,4 +1,4 @@
require "hbc/artifact/moved"
require "cask/artifact/moved"
module Hbc
module Artifact

View File

@ -1,4 +1,4 @@
require "hbc/artifact/abstract_artifact"
require "cask/artifact/abstract_artifact"
require "extend/hash_validator"
using HashValidator

View File

@ -1,4 +1,4 @@
require "hbc/artifact/moved"
require "cask/artifact/moved"
module Hbc
module Artifact

View File

@ -1,4 +1,4 @@
require "hbc/artifact/relocated"
require "cask/artifact/relocated"
module Hbc
module Artifact

View File

@ -1,6 +1,6 @@
require "vendor/plist/plist"
require "hbc/artifact/abstract_artifact"
require "cask/artifact/abstract_artifact"
require "extend/hash_validator"
using HashValidator

View File

@ -1,4 +1,4 @@
require "hbc/artifact/abstract_flight_block"
require "cask/artifact/abstract_flight_block"
module Hbc
module Artifact

View File

@ -1,4 +1,4 @@
require "hbc/artifact/abstract_flight_block"
require "cask/artifact/abstract_flight_block"
module Hbc
module Artifact

View File

@ -1,4 +1,4 @@
require "hbc/artifact/moved"
require "cask/artifact/moved"
module Hbc
module Artifact

View File

@ -1,4 +1,4 @@
require "hbc/artifact/moved"
require "cask/artifact/moved"
module Hbc
module Artifact

View File

@ -1,4 +1,4 @@
require "hbc/artifact/abstract_artifact"
require "cask/artifact/abstract_artifact"
require "extend/hash_validator"
using HashValidator

View File

@ -1,4 +1,4 @@
require "hbc/artifact/moved"
require "cask/artifact/moved"
module Hbc
module Artifact

View File

@ -1,4 +1,4 @@
require "hbc/artifact/moved"
require "cask/artifact/moved"
module Hbc
module Artifact

View File

@ -1,4 +1,4 @@
require "hbc/artifact/abstract_artifact"
require "cask/artifact/abstract_artifact"
module Hbc
module Artifact

View File

@ -1,4 +1,4 @@
require "hbc/artifact/moved"
require "cask/artifact/moved"
module Hbc
module Artifact

View File

@ -1,4 +1,4 @@
require "hbc/artifact/relocated"
require "cask/artifact/relocated"
module Hbc
module Artifact

View File

@ -1,4 +1,4 @@
require "hbc/artifact/abstract_uninstall"
require "cask/artifact/abstract_uninstall"
module Hbc
module Artifact

View File

@ -1,4 +1,4 @@
require "hbc/artifact/moved"
require "cask/artifact/moved"
module Hbc
module Artifact

View File

@ -1,4 +1,4 @@
require "hbc/artifact/moved"
require "cask/artifact/moved"
module Hbc
module Artifact

View File

@ -1,4 +1,4 @@
require "hbc/artifact/abstract_uninstall"
require "cask/artifact/abstract_uninstall"
module Hbc
module Artifact

View File

@ -1,5 +1,5 @@
require "hbc/checkable"
require "hbc/download"
require "cask/checkable"
require "cask/download"
require "digest"
require "utils/git"
@ -65,7 +65,7 @@ module Hbc
return if tap.user != "Homebrew"
return unless cask.artifacts.any? { |k| k.is_a?(Hbc::Artifact::Pkg) && k.stanza_options.key?(:allow_untrusted) }
add_warning "allow_untrusted is not permitted in official Homebrew-Cask taps"
add_warning "allow_untrusted is not permitted in official Homebrew Cask taps"
end
def check_stanza_requires_uninstall
@ -204,7 +204,7 @@ module Hbc
return unless cask.appcast
return unless cask.appcast.checkpoint
add_error "Appcast checkpoints have been removed from Homebrew-Cask"
add_error "Appcast checkpoints have been removed from Homebrew Cask"
end
def check_latest_with_appcast

View File

@ -1,4 +1,4 @@
require "hbc/download"
require "cask/download"
module Hbc
class Auditor

View File

@ -1,7 +1,7 @@
require "hbc/cask_loader"
require "hbc/config"
require "hbc/dsl"
require "hbc/metadata"
require "cask/cask_loader"
require "cask/config"
require "cask/dsl"
require "cask/metadata"
require "searchable"
module Hbc

View File

@ -1,6 +1,6 @@
require "delegate"
require "hbc/topological_hash"
require "cask/topological_hash"
module Hbc
class CaskDependencies < DelegateClass(Array)

View File

@ -1,4 +1,4 @@
require "hbc/cask"
require "cask/cask"
require "uri"
module Hbc

View File

@ -3,35 +3,35 @@ require "shellwords"
require "extend/optparse"
require "hbc/config"
require "cask/config"
require "hbc/cli/options"
require "cask/cmd/options"
require "hbc/cli/abstract_command"
require "hbc/cli/audit"
require "hbc/cli/cat"
require "hbc/cli/create"
require "hbc/cli/doctor"
require "hbc/cli/edit"
require "hbc/cli/fetch"
require "hbc/cli/home"
require "hbc/cli/info"
require "hbc/cli/install"
require "hbc/cli/list"
require "hbc/cli/outdated"
require "hbc/cli/reinstall"
require "hbc/cli/style"
require "hbc/cli/uninstall"
require "hbc/cli/upgrade"
require "hbc/cli/--version"
require "hbc/cli/zap"
require "cask/cmd/abstract_command"
require "cask/cmd/audit"
require "cask/cmd/cat"
require "cask/cmd/create"
require "cask/cmd/doctor"
require "cask/cmd/edit"
require "cask/cmd/fetch"
require "cask/cmd/home"
require "cask/cmd/info"
require "cask/cmd/install"
require "cask/cmd/list"
require "cask/cmd/outdated"
require "cask/cmd/reinstall"
require "cask/cmd/style"
require "cask/cmd/uninstall"
require "cask/cmd/upgrade"
require "cask/cmd/--version"
require "cask/cmd/zap"
require "hbc/cli/abstract_internal_command"
require "hbc/cli/internal_help"
require "hbc/cli/internal_stanza"
require "cask/cmd/abstract_internal_command"
require "cask/cmd/internal_help"
require "cask/cmd/internal_stanza"
module Hbc
class CLI
class Cmd
ALIASES = {
"ls" => "list",
"homepage" => "home",
@ -225,17 +225,17 @@ module Hbc
def purpose
puts <<~EOS
brew-cask provides a friendly homebrew-style CLI workflow for the
administration of macOS applications distributed as binaries.
Homebrew Cask provides a friendly CLI workflow for the administration
of macOS applications distributed as binaries.
EOS
end
def usage
max_command_len = CLI.commands.map(&:length).max
max_command_len = Cmd.commands.map(&:length).max
puts "Commands:\n\n"
CLI.command_classes.each do |klass|
Cmd.command_classes.each do |klass|
next unless klass.visible
puts " #{klass.command_name.ljust(max_command_len)} #{_help_for(klass)}"
end

View File

@ -1,5 +1,5 @@
module Hbc
class CLI
class Cmd
class Version < AbstractCommand
def self.command_name
"--#{super}"
@ -16,7 +16,7 @@ module Hbc
end
def self.help
"displays the Homebrew-Cask version"
"displays the Homebrew Cask version"
end
end
end

View File

@ -2,7 +2,7 @@ require_relative "options"
require "search"
module Hbc
class CLI
class Cmd
class AbstractCommand
include Options
include Homebrew::Search

View File

@ -1,5 +1,5 @@
module Hbc
class CLI
class Cmd
class AbstractInternalCommand < AbstractCommand
def self.command_name
super.sub(/^internal_/i, "_")

View File

@ -1,5 +1,5 @@
module Hbc
class CLI
class Cmd
class Audit < AbstractCommand
option "--download", :download, false
option "--token-conflicts", :token_conflicts, false

View File

@ -1,5 +1,5 @@
module Hbc
class CLI
class Cmd
class Cat < AbstractCommand
def initialize(*)
super

View File

@ -1,5 +1,5 @@
module Hbc
class CLI
class Cmd
class Create < AbstractCommand
def initialize(*)
super

View File

@ -1,8 +1,8 @@
require "system_config"
require "hbc/checkable"
require "cask/checkable"
module Hbc
class CLI
class Cmd
class Doctor < AbstractCommand
include Checkable
@ -33,7 +33,7 @@ module Hbc
end
def check_software_versions
ohai "Homebrew-Cask Version", Hbc.full_version
ohai "Homebrew Cask Version", Hbc.full_version
ohai "macOS", MacOS.full_version
ohai "SIP", self.class.check_sip
ohai "Java", SystemConfig.describe_java
@ -43,7 +43,7 @@ module Hbc
# where "doctor" is needed is precisely the situation where such
# things are less dependable.
def check_install_location
ohai "Homebrew-Cask Install Location"
ohai "Homebrew Cask Install Location"
locations = Dir.glob(HOMEBREW_CELLAR.join("brew-cask", "*")).reverse
if locations.empty?
@ -57,7 +57,7 @@ module Hbc
end
def check_staging_location
ohai "Homebrew-Cask Staging Location"
ohai "Homebrew Cask Staging Location"
path = Caskroom.path
@ -72,7 +72,7 @@ module Hbc
default_tap = Tap.default_cask_tap
alt_taps = Tap.select { |t| t.cask_dir.exist? && t != default_tap }
ohai "Homebrew-Cask Taps:"
ohai "Homebrew Cask Taps:"
[default_tap, *alt_taps].each do |tap|
if tap.path.nil? || tap.path.to_s.empty?
puts none_string

View File

@ -1,5 +1,5 @@
module Hbc
class CLI
class Cmd
class Edit < AbstractCommand
def initialize(*)
super

View File

@ -1,7 +1,7 @@
require "hbc/download"
require "cask/download"
module Hbc
class CLI
class Cmd
class Fetch < AbstractCommand
option "--force", :force, false

View File

@ -1,5 +1,5 @@
module Hbc
class CLI
class Cmd
class Home < AbstractCommand
def run
if casks.none?

View File

@ -1,7 +1,7 @@
require "json"
module Hbc
class CLI
class Cmd
class Info < AbstractCommand
option "--json=VERSION", :json

View File

@ -1,5 +1,5 @@
module Hbc
class CLI
class Cmd
class Install < AbstractCommand
option "--force", :force, false
option "--skip-cask-deps", :skip_cask_deps, false

View File

@ -1,5 +1,5 @@
module Hbc
class CLI
class Cmd
class InternalHelp < AbstractInternalCommand
def initialize(*)
super
@ -8,9 +8,9 @@ module Hbc
end
def run
max_command_len = CLI.commands.map(&:length).max
max_command_len = Cmd.commands.map(&:length).max
puts "Unstable Internal-use Commands:\n\n"
CLI.command_classes.each do |klass|
Cmd.command_classes.each do |klass|
next if klass.visible
puts " #{klass.command_name.ljust(max_command_len)} #{self.class.help_for(klass)}"
end

View File

@ -1,5 +1,5 @@
module Hbc
class CLI
class Cmd
class InternalStanza < AbstractInternalCommand
# Syntax
#

View File

@ -1,5 +1,5 @@
module Hbc
class CLI
class Cmd
class List < AbstractCommand
option "-1", :one, false
option "--versions", :versions, false

View File

@ -1,5 +1,5 @@
module Hbc
class CLI
class Cmd
module Options
def self.included(klass)
klass.extend(ClassMethods)

View File

@ -1,5 +1,5 @@
module Hbc
class CLI
class Cmd
class Outdated < AbstractCommand
option "--greedy", :greedy, false
option "--quiet", :quiet, false

View File

@ -1,5 +1,5 @@
module Hbc
class CLI
class Cmd
class Reinstall < Install
def run
casks.each do |cask|

View File

@ -1,5 +1,5 @@
module Hbc
class CLI
class Cmd
class Style < AbstractCommand
def self.help
"checks Cask style using RuboCop"

View File

@ -1,5 +1,5 @@
module Hbc
class CLI
class Cmd
class Uninstall < AbstractCommand
option "--force", :force, false

View File

@ -1,5 +1,5 @@
module Hbc
class CLI
class Cmd
class Upgrade < AbstractCommand
option "--greedy", :greedy, false
option "--quiet", :quiet, false

View File

@ -1,5 +1,5 @@
module Hbc
class CLI
class Cmd
class Zap < AbstractCommand
option "--force", :force, false

View File

@ -1,7 +1,7 @@
require "fileutils"
require "hbc/cache"
require "hbc/quarantine"
require "hbc/verify"
require "cask/cache"
require "cask/quarantine"
require "cask/verify"
module Hbc
class Download

View File

@ -1,24 +1,24 @@
require "locale"
require "lazy_object"
require "hbc/artifact"
require "cask/artifact"
require "hbc/caskroom"
require "hbc/exceptions"
require "cask/caskroom"
require "cask/exceptions"
require "hbc/dsl/appcast"
require "hbc/dsl/base"
require "hbc/dsl/caveats"
require "hbc/dsl/conflicts_with"
require "hbc/dsl/container"
require "hbc/dsl/depends_on"
require "hbc/dsl/postflight"
require "hbc/dsl/preflight"
require "hbc/dsl/uninstall_postflight"
require "hbc/dsl/uninstall_preflight"
require "hbc/dsl/version"
require "cask/dsl/appcast"
require "cask/dsl/base"
require "cask/dsl/caveats"
require "cask/dsl/conflicts_with"
require "cask/dsl/container"
require "cask/dsl/depends_on"
require "cask/dsl/postflight"
require "cask/dsl/preflight"
require "cask/dsl/uninstall_postflight"
require "cask/dsl/uninstall_preflight"
require "cask/dsl/version"
require "hbc/url"
require "cask/url"
module Hbc
class DSL

View File

@ -79,7 +79,7 @@ module Hbc
<<~EOS
Cask #{@cask} installs files under /usr/local. The presence of such
files can cause warnings when running "brew doctor", which is considered
to be a bug in Homebrew-Cask.
to be a bug in Homebrew Cask.
EOS
end

View File

@ -1,4 +1,4 @@
require "hbc/staged"
require "cask/staged"
module Hbc
class DSL

View File

@ -1,4 +1,4 @@
require "hbc/staged"
require "cask/staged"
module Hbc
class DSL

View File

@ -62,7 +62,7 @@ module Hbc
class CaskX11DependencyError < AbstractCaskErrorWithToken
def to_s
<<~EOS
Cask '#{token}' requires XQuartz/X11, which can be installed using Homebrew-Cask by running
Cask '#{token}' requires XQuartz/X11, which can be installed using Homebrew Cask by running
#{Formatter.identifier("brew cask install xquartz")}
or manually, by downloading the package from

View File

@ -3,11 +3,11 @@ require "rubygems"
require "formula_installer"
require "unpack_strategy"
require "hbc/cask_dependencies"
require "hbc/download"
require "hbc/staged"
require "hbc/verify"
require "hbc/quarantine"
require "cask/cask_dependencies"
require "cask/download"
require "cask/staged"
require "cask/verify"
require "cask/quarantine"
require "cgi"
@ -520,7 +520,7 @@ module Hbc
# versioned staged distribution
gain_permissions_remove(backup_path) if backup_path&.exist?
# Homebrew-Cask metadata
# Homebrew Cask metadata
return unless backup_metadata_path.directory?
backup_metadata_path.children.each do |subdir|
@ -535,7 +535,7 @@ module Hbc
# versioned staged distribution
gain_permissions_remove(@cask.staged_path) if @cask.staged_path&.exist?
# Homebrew-Cask metadata
# Homebrew Cask metadata
if @cask.metadata_versioned_path.directory?
@cask.metadata_versioned_path.children.each do |subdir|
gain_permissions_remove(subdir)

View File

@ -1,21 +0,0 @@
require "hardware"
require "hbc/artifact"
require "hbc/audit"
require "hbc/auditor"
require "hbc/cache"
require "hbc/cask"
require "hbc/cask_loader"
require "hbc/caskroom"
require "hbc/checkable"
require "hbc/cli"
require "hbc/cask_dependencies"
require "hbc/exceptions"
require "hbc/installer"
require "hbc/macos"
require "hbc/pkg"
require "hbc/staged"
require "hbc/topological_hash"
require "hbc/utils"
require "hbc/verify"
require "hbc/version"

View File

@ -1,28 +0,0 @@
require "hbc/artifact/app"
require "hbc/artifact/artifact" # generic 'artifact' stanza
require "hbc/artifact/binary"
require "hbc/artifact/colorpicker"
require "hbc/artifact/dictionary"
require "hbc/artifact/font"
require "hbc/artifact/input_method"
require "hbc/artifact/installer"
require "hbc/artifact/internet_plugin"
require "hbc/artifact/audio_unit_plugin"
require "hbc/artifact/vst_plugin"
require "hbc/artifact/vst3_plugin"
require "hbc/artifact/pkg"
require "hbc/artifact/postflight_block"
require "hbc/artifact/preflight_block"
require "hbc/artifact/prefpane"
require "hbc/artifact/qlplugin"
require "hbc/artifact/screen_saver"
require "hbc/artifact/service"
require "hbc/artifact/stage_only"
require "hbc/artifact/suite"
require "hbc/artifact/uninstall"
require "hbc/artifact/zap"
module Hbc
module Artifact
end
end

View File

@ -5,7 +5,7 @@ module Hbc
QUARANTINE_ATTRIBUTE = "com.apple.quarantine".freeze
QUARANTINE_SCRIPT = (HOMEBREW_LIBRARY_PATH/"cask/lib/hbc/utils/quarantine.swift").freeze
QUARANTINE_SCRIPT = (HOMEBREW_LIBRARY_PATH/"cask/utils/quarantine.swift").freeze
# @private
def swift

View File

@ -16,7 +16,7 @@ let dataLocationUrl: NSURL = NSURL.init(fileURLWithPath: CommandLine.arguments[1
var errorBag: NSError?
let quarantineProperties: [String: Any] = [
kLSQuarantineAgentNameKey as String: "Homebrew-Cask",
kLSQuarantineAgentNameKey as String: "Homebrew Cask",
kLSQuarantineTypeKey as String: kLSQuarantineTypeWebDownload,
kLSQuarantineDataURLKey as String: CommandLine.arguments[2],
kLSQuarantineOriginURLKey as String: CommandLine.arguments[3]

View File

@ -1,4 +1,4 @@
require "hbc/verify/checksum"
require "cask/verify/checksum"
module Hbc
module Verify

View File

@ -2,7 +2,7 @@ module Hbc
def self.full_version
@full_version ||= begin
<<~EOS
Homebrew-Cask #{HOMEBREW_VERSION}
Homebrew Cask #{HOMEBREW_VERSION}
#{Tap.default_cask_tap.full_name} #{Tap.default_cask_tap.version_string}
EOS
end

View File

@ -1,6 +1,6 @@
require "utils/bottles"
require "formula"
require "hbc/cask_loader"
require "cask/cask_loader"
require "set"
module CleanupRefinement

View File

@ -1,9 +1,9 @@
require "hbc"
require "cask/all"
module Homebrew
module_function
def cask
Hbc::CLI.run(*ARGV)
Hbc::Cmd.run(*ARGV)
end
end

View File

@ -328,7 +328,7 @@ class Reporter
# For formulae migrated to cask: Auto-install cask or provide install instructions.
if new_tap_name.start_with?("homebrew/cask")
if new_tap.installed? && (HOMEBREW_PREFIX/"Caskroom").directory?
ohai "#{name} has been moved to Homebrew-Cask."
ohai "#{name} has been moved to Homebrew Cask."
ohai "brew unlink #{name}"
system HOMEBREW_BREW_FILE, "unlink", name
ohai "brew prune"
@ -336,13 +336,13 @@ class Reporter
ohai "brew cask install #{new_name}"
system HOMEBREW_BREW_FILE, "cask", "install", new_name
ohai <<~EOS
#{name} has been moved to Homebrew-Cask.
#{name} has been moved to Homebrew Cask.
The existing keg has been unlinked.
Please uninstall the formula when convenient by running:
brew uninstall --force #{name}
EOS
else
ohai "#{name} has been moved to Homebrew-Cask.", <<~EOS
ohai "#{name} has been moved to Homebrew Cask.", <<~EOS
To uninstall the formula and install the cask run:
brew uninstall --force #{name}
brew tap #{new_tap_name}

View File

@ -3,5 +3,5 @@ require "compat/dependable"
require "compat/dependency_collector"
require "compat/fileutils"
require "compat/formula_support"
require "compat/hbc"
require "compat/cask"
require "compat/tap"

View File

@ -1,9 +1,9 @@
require "compat/hbc/cask_loader"
require "compat/hbc/cli/cleanup"
require "compat/hbc/cli/search"
require "compat/hbc/cache"
require "compat/hbc/caskroom"
require "compat/hbc/dsl"
require "compat/cask/cask_loader"
require "compat/cask/cmd/cleanup"
require "compat/cask/cmd/search"
require "compat/cask/cache"
require "compat/cask/caskroom"
require "compat/cask/dsl"
module Hbc
class << self

Some files were not shown because too many files have changed in this diff Show More