aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Reiter2016-10-14 20:33:16 +0200
committerMarkus Reiter2016-10-23 14:32:04 +0200
commitad8ae33c1f2bf09cf70944aba0708000adce93e1 (patch)
tree855ff4c86c4d08af0bb6b40d5d3d055f5e7ae993
parent2b7e6c1dcb2e1aa8416b9b26d1a3d77b68f65013 (diff)
downloadbrew-ad8ae33c1f2bf09cf70944aba0708000adce93e1.tar.bz2
Fix spacing and indentation.
-rw-r--r--Library/Homebrew/cask/lib/hbc/artifact/moved.rb4
-rw-r--r--Library/Homebrew/cask/lib/hbc/artifact/pkg.rb6
-rw-r--r--Library/Homebrew/cask/lib/hbc/artifact/uninstall_base.rb24
-rw-r--r--Library/Homebrew/cask/lib/hbc/auditor.rb2
-rw-r--r--Library/Homebrew/cask/lib/hbc/cli.rb72
-rw-r--r--Library/Homebrew/cask/lib/hbc/cli/doctor.rb8
-rw-r--r--Library/Homebrew/cask/lib/hbc/cli/internal_stanza.rb50
-rw-r--r--Library/Homebrew/cask/lib/hbc/container/dmg.rb26
-rw-r--r--Library/Homebrew/cask/lib/hbc/dsl.rb106
-rw-r--r--Library/Homebrew/cask/lib/hbc/dsl/conflicts_with.rb14
-rw-r--r--Library/Homebrew/cask/lib/hbc/dsl/container.rb6
-rw-r--r--Library/Homebrew/cask/lib/hbc/dsl/depends_on.rb58
-rw-r--r--Library/Homebrew/cask/lib/hbc/dsl/gpg.rb6
-rw-r--r--Library/Homebrew/cask/lib/hbc/dsl/installer.rb6
-rw-r--r--Library/Homebrew/cask/lib/hbc/dsl/version.rb10
-rw-r--r--Library/Homebrew/cask/lib/hbc/installer.rb18
-rw-r--r--Library/Homebrew/cask/lib/hbc/macos.rb700
-rw-r--r--Library/Homebrew/cask/lib/hbc/url_checker.rb16
-rw-r--r--Library/Homebrew/cask/spec/cask/cli/cleanup_spec.rb6
-rw-r--r--Library/Homebrew/cask/spec/cask/download_strategy_spec.rb78
-rw-r--r--Library/Homebrew/cask/spec/cask/system_command_spec.rb12
-rw-r--r--Library/Homebrew/cask/spec/locale_spec.rb2
-rw-r--r--Library/Homebrew/cask/test/cask/cli/create_test.rb16
-rw-r--r--Library/Homebrew/cask/test/cask/cli/edit_test.rb8
-rw-r--r--Library/Homebrew/cask/test/cask/cli/home_test.rb14
-rw-r--r--Library/Homebrew/cask/test/cask/dsl_test.rb16
-rw-r--r--Library/Homebrew/cask/test/plist/parser_test.rb8
27 files changed, 646 insertions, 646 deletions
diff --git a/Library/Homebrew/cask/lib/hbc/artifact/moved.rb b/Library/Homebrew/cask/lib/hbc/artifact/moved.rb
index 22124005c..f1e542e7a 100644
--- a/Library/Homebrew/cask/lib/hbc/artifact/moved.rb
+++ b/Library/Homebrew/cask/lib/hbc/artifact/moved.rb
@@ -58,8 +58,8 @@ module Hbc
def warning_target_exists
message_parts = [
- "It seems there is already #{self.class.artifact_english_article} #{self.class.artifact_english_name} at '#{target}'",
- ]
+ "It seems there is already #{self.class.artifact_english_article} #{self.class.artifact_english_name} at '#{target}'",
+ ]
yield(message_parts) if block_given?
message_parts.join("; ")
end
diff --git a/Library/Homebrew/cask/lib/hbc/artifact/pkg.rb b/Library/Homebrew/cask/lib/hbc/artifact/pkg.rb
index 372740631..d5e63d8ef 100644
--- a/Library/Homebrew/cask/lib/hbc/artifact/pkg.rb
+++ b/Library/Homebrew/cask/lib/hbc/artifact/pkg.rb
@@ -47,9 +47,9 @@ module Hbc
raise CaskError, "pkg source file not found: '#{source}'"
end
args = [
- "-pkg", source,
- "-target", "/"
- ]
+ "-pkg", source,
+ "-target", "/"
+ ]
args << "-verboseR" if Hbc.verbose
args << "-allowUntrusted" if pkg_install_opts :allow_untrusted
@command.run!("/usr/sbin/installer", sudo: true, args: args, print_stdout: true)
diff --git a/Library/Homebrew/cask/lib/hbc/artifact/uninstall_base.rb b/Library/Homebrew/cask/lib/hbc/artifact/uninstall_base.rb
index 68eb7b93c..b780d4662 100644
--- a/Library/Homebrew/cask/lib/hbc/artifact/uninstall_base.rb
+++ b/Library/Homebrew/cask/lib/hbc/artifact/uninstall_base.rb
@@ -11,18 +11,18 @@ module Hbc
PATH_ARG_SLICE_SIZE = 500
ORDERED_DIRECTIVES = [
- :early_script,
- :launchctl,
- :quit,
- :signal,
- :login_item,
- :kext,
- :script,
- :pkgutil,
- :delete,
- :trash,
- :rmdir,
- ].freeze
+ :early_script,
+ :launchctl,
+ :quit,
+ :signal,
+ :login_item,
+ :kext,
+ :script,
+ :pkgutil,
+ :delete,
+ :trash,
+ :rmdir,
+ ].freeze
# TODO: these methods were consolidated here from separate
# sources and should be refactored for consistency
diff --git a/Library/Homebrew/cask/lib/hbc/auditor.rb b/Library/Homebrew/cask/lib/hbc/auditor.rb
index b112fd0ed..a02476ccb 100644
--- a/Library/Homebrew/cask/lib/hbc/auditor.rb
+++ b/Library/Homebrew/cask/lib/hbc/auditor.rb
@@ -2,7 +2,7 @@ module Hbc
class Auditor
def self.audit(cask, audit_download: false, check_token_conflicts: false)
if !ARGV.value("language") &&
- languages_blocks = cask.instance_variable_get(:@dsl).instance_variable_get(:@language_blocks)
+ languages_blocks = cask.instance_variable_get(:@dsl).instance_variable_get(:@language_blocks)
begin
saved_languages = MacOS.instance_variable_get(:@languages)
diff --git a/Library/Homebrew/cask/lib/hbc/cli.rb b/Library/Homebrew/cask/lib/hbc/cli.rb
index b3b799d49..e216c7072 100644
--- a/Library/Homebrew/cask/lib/hbc/cli.rb
+++ b/Library/Homebrew/cask/lib/hbc/cli.rb
@@ -31,46 +31,46 @@ require "hbc/cli/internal_stanza"
module Hbc
class CLI
ALIASES = {
- "ls" => "list",
- "homepage" => "home",
- "-S" => "search", # verb starting with "-" is questionable
- "up" => "update",
- "instal" => "install", # gem does the same
- "rm" => "uninstall",
- "remove" => "uninstall",
- "abv" => "info",
- "dr" => "doctor",
- # aliases from Homebrew that we don't (yet) support
- # 'ln' => 'link',
- # 'configure' => 'diy',
- # '--repo' => '--repository',
- # 'environment' => '--env',
- # '-c1' => '--config',
- }.freeze
+ "ls" => "list",
+ "homepage" => "home",
+ "-S" => "search", # verb starting with "-" is questionable
+ "up" => "update",
+ "instal" => "install", # gem does the same
+ "rm" => "uninstall",
+ "remove" => "uninstall",
+ "abv" => "info",
+ "dr" => "doctor",
+ # aliases from Homebrew that we don't (yet) support
+ # 'ln' => 'link',
+ # 'configure' => 'diy',
+ # '--repo' => '--repository',
+ # 'environment' => '--env',
+ # '-c1' => '--config',
+ }.freeze
OPTIONS = {
- "--caskroom=" => :caskroom=,
- "--appdir=" => :appdir=,
- "--colorpickerdir=" => :colorpickerdir=,
- "--prefpanedir=" => :prefpanedir=,
- "--qlplugindir=" => :qlplugindir=,
- "--fontdir=" => :fontdir=,
- "--servicedir=" => :servicedir=,
- "--input_methoddir=" => :input_methoddir=,
- "--internet_plugindir=" => :internet_plugindir=,
- "--audio_unit_plugindir=" => :audio_unit_plugindir=,
- "--vst_plugindir=" => :vst_plugindir=,
- "--vst3_plugindir=" => :vst3_plugindir=,
- "--screen_saverdir=" => :screen_saverdir=,
- }.freeze
+ "--caskroom=" => :caskroom=,
+ "--appdir=" => :appdir=,
+ "--colorpickerdir=" => :colorpickerdir=,
+ "--prefpanedir=" => :prefpanedir=,
+ "--qlplugindir=" => :qlplugindir=,
+ "--fontdir=" => :fontdir=,
+ "--servicedir=" => :servicedir=,
+ "--input_methoddir=" => :input_methoddir=,
+ "--internet_plugindir=" => :internet_plugindir=,
+ "--audio_unit_plugindir=" => :audio_unit_plugindir=,
+ "--vst_plugindir=" => :vst_plugindir=,
+ "--vst3_plugindir=" => :vst3_plugindir=,
+ "--screen_saverdir=" => :screen_saverdir=,
+ }.freeze
FLAGS = {
- "--no-binaries" => :no_binaries=,
- "--debug" => :debug=,
- "--verbose" => :verbose=,
- "--outdated" => :cleanup_outdated=,
- "--help" => :help=,
- }.freeze
+ "--no-binaries" => :no_binaries=,
+ "--debug" => :debug=,
+ "--verbose" => :verbose=,
+ "--outdated" => :cleanup_outdated=,
+ "--help" => :help=,
+ }.freeze
def self.command_classes
@command_classes ||= self.constants
diff --git a/Library/Homebrew/cask/lib/hbc/cli/doctor.rb b/Library/Homebrew/cask/lib/hbc/cli/doctor.rb
index f4262a62c..dcccde13f 100644
--- a/Library/Homebrew/cask/lib/hbc/cli/doctor.rb
+++ b/Library/Homebrew/cask/lib/hbc/cli/doctor.rb
@@ -88,10 +88,10 @@ module Hbc
@homebrew_constants[name] = notfound_string
begin
@homebrew_constants[name] = SystemCommand.run!(Hbc.homebrew_executable,
- args: ["--#{name}"],
- print_stderr: false)
- .stdout
- .strip
+ args: ["--#{name}"],
+ print_stderr: false)
+ .stdout
+ .strip
if @homebrew_constants[name] !~ /\S/
@homebrew_constants[name] = "#{none_string} #{error_string}"
end
diff --git a/Library/Homebrew/cask/lib/hbc/cli/internal_stanza.rb b/Library/Homebrew/cask/lib/hbc/cli/internal_stanza.rb
index 0265e34b7..dd802bc94 100644
--- a/Library/Homebrew/cask/lib/hbc/cli/internal_stanza.rb
+++ b/Library/Homebrew/cask/lib/hbc/cli/internal_stanza.rb
@@ -23,31 +23,31 @@ module Hbc
# TODO: this should be retrievable from Hbc::DSL
ARTIFACTS = Set.new [
- :app,
- :suite,
- :artifact,
- :prefpane,
- :qlplugin,
- :font,
- :service,
- :colorpicker,
- :binary,
- :input_method,
- :internet_plugin,
- :audio_unit_plugin,
- :vst_plugin,
- :vst3_plugin,
- :screen_saver,
- :pkg,
- :installer,
- :stage_only,
- :nested_container,
- :uninstall,
- :postflight,
- :uninstall_postflight,
- :preflight,
- :uninstall_postflight,
- ]
+ :app,
+ :suite,
+ :artifact,
+ :prefpane,
+ :qlplugin,
+ :font,
+ :service,
+ :colorpicker,
+ :binary,
+ :input_method,
+ :internet_plugin,
+ :audio_unit_plugin,
+ :vst_plugin,
+ :vst3_plugin,
+ :screen_saver,
+ :pkg,
+ :installer,
+ :stage_only,
+ :nested_container,
+ :uninstall,
+ :postflight,
+ :uninstall_postflight,
+ :preflight,
+ :uninstall_postflight,
+ ]
def self.run(*arguments)
table = arguments.include? "--table"
diff --git a/Library/Homebrew/cask/lib/hbc/container/dmg.rb b/Library/Homebrew/cask/lib/hbc/container/dmg.rb
index 492a9d632..4e2c4e1e3 100644
--- a/Library/Homebrew/cask/lib/hbc/container/dmg.rb
+++ b/Library/Homebrew/cask/lib/hbc/container/dmg.rb
@@ -91,19 +91,19 @@ module Hbc
end
# unnecessary DMG metadata
- DMG_METADATA_FILES = %w[
- .background
- .com.apple.timemachine.donotpresent
- .com.apple.timemachine.supported
- .DocumentRevisions-V100
- .DS_Store
- .fseventsd
- .MobileBackups
- .Spotlight-V100
- .TemporaryItems
- .Trashes
- .VolumeIcon.icns
- ].to_set.freeze
+ DMG_METADATA_FILES = Set.new %w[
+ .background
+ .com.apple.timemachine.donotpresent
+ .com.apple.timemachine.supported
+ .DocumentRevisions-V100
+ .DS_Store
+ .fseventsd
+ .MobileBackups
+ .Spotlight-V100
+ .TemporaryItems
+ .Trashes
+ .VolumeIcon.icns
+ ].freeze
def dmg_metadata?(path)
relative_root = path.sub(%r{/.*}, "")
diff --git a/Library/Homebrew/cask/lib/hbc/dsl.rb b/Library/Homebrew/cask/lib/hbc/dsl.rb
index 1ae9a0c4d..a955da216 100644
--- a/Library/Homebrew/cask/lib/hbc/dsl.rb
+++ b/Library/Homebrew/cask/lib/hbc/dsl.rb
@@ -19,63 +19,63 @@ require "hbc/dsl/version"
module Hbc
class DSL
ORDINARY_ARTIFACT_TYPES = [
- :app,
- :artifact,
- :audio_unit_plugin,
- :binary,
- :colorpicker,
- :font,
- :input_method,
- :internet_plugin,
- :pkg,
- :prefpane,
- :qlplugin,
- :screen_saver,
- :service,
- :stage_only,
- :suite,
- :vst_plugin,
- :vst3_plugin,
- ].freeze
+ :app,
+ :artifact,
+ :audio_unit_plugin,
+ :binary,
+ :colorpicker,
+ :font,
+ :input_method,
+ :internet_plugin,
+ :pkg,
+ :prefpane,
+ :qlplugin,
+ :screen_saver,
+ :service,
+ :stage_only,
+ :suite,
+ :vst_plugin,
+ :vst3_plugin,
+ ].freeze
ACTIVATABLE_ARTIFACT_TYPES = ([:installer, *ORDINARY_ARTIFACT_TYPES] - [:stage_only]).freeze
SPECIAL_ARTIFACT_TYPES = [
- :uninstall,
- :zap,
- ].freeze
+ :uninstall,
+ :zap,
+ ].freeze
ARTIFACT_BLOCK_TYPES = [
- :preflight,
- :postflight,
- :uninstall_preflight,
- :uninstall_postflight,
- ].freeze
+ :preflight,
+ :postflight,
+ :uninstall_preflight,
+ :uninstall_postflight,
+ ].freeze
DSL_METHODS = Set.new [
- :accessibility_access,
- :appcast,
- :artifacts,
- :auto_updates,
- :caskroom_path,
- :caveats,
- :conflicts_with,
- :container,
- :depends_on,
- :gpg,
- :homepage,
- :language,
- :name,
- :sha256,
- :staged_path,
- :url,
- :version,
- :appdir,
- *ORDINARY_ARTIFACT_TYPES,
- *ACTIVATABLE_ARTIFACT_TYPES,
- *SPECIAL_ARTIFACT_TYPES,
- *ARTIFACT_BLOCK_TYPES,
- ].freeze
+ :accessibility_access,
+ :appcast,
+ :artifacts,
+ :auto_updates,
+ :caskroom_path,
+ :caveats,
+ :conflicts_with,
+ :container,
+ :depends_on,
+ :gpg,
+ :homepage,
+ :language,
+ :name,
+ :sha256,
+ :staged_path,
+ :url,
+ :version,
+ :appdir,
+ *ORDINARY_ARTIFACT_TYPES,
+ *ACTIVATABLE_ARTIFACT_TYPES,
+ *SPECIAL_ARTIFACT_TYPES,
+ *ARTIFACT_BLOCK_TYPES,
+ ].freeze
attr_reader :token
def initialize(token)
@@ -183,8 +183,8 @@ module Hbc
end
SYMBOLIC_VERSIONS = Set.new [
- :latest,
- ]
+ :latest,
+ ]
def version(arg = nil)
return @version if arg.nil?
@@ -194,8 +194,8 @@ module Hbc
end
SYMBOLIC_SHA256S = Set.new [
- :no_check,
- ]
+ :no_check,
+ ]
def sha256(arg = nil)
return @sha256 if arg.nil?
diff --git a/Library/Homebrew/cask/lib/hbc/dsl/conflicts_with.rb b/Library/Homebrew/cask/lib/hbc/dsl/conflicts_with.rb
index e121e5373..948348239 100644
--- a/Library/Homebrew/cask/lib/hbc/dsl/conflicts_with.rb
+++ b/Library/Homebrew/cask/lib/hbc/dsl/conflicts_with.rb
@@ -2,13 +2,13 @@ module Hbc
class DSL
class ConflictsWith
VALID_KEYS = Set.new [
- :formula,
- :cask,
- :macos,
- :arch,
- :x11,
- :java,
- ]
+ :formula,
+ :cask,
+ :macos,
+ :arch,
+ :x11,
+ :java,
+ ]
attr_accessor(*VALID_KEYS)
attr_accessor :pairs
diff --git a/Library/Homebrew/cask/lib/hbc/dsl/container.rb b/Library/Homebrew/cask/lib/hbc/dsl/container.rb
index 56db31d97..ab260c98c 100644
--- a/Library/Homebrew/cask/lib/hbc/dsl/container.rb
+++ b/Library/Homebrew/cask/lib/hbc/dsl/container.rb
@@ -2,9 +2,9 @@ module Hbc
class DSL
class Container
VALID_KEYS = Set.new [
- :type,
- :nested,
- ]
+ :type,
+ :nested,
+ ]
attr_accessor(*VALID_KEYS)
attr_accessor :pairs
diff --git a/Library/Homebrew/cask/lib/hbc/dsl/depends_on.rb b/Library/Homebrew/cask/lib/hbc/dsl/depends_on.rb
index 6bd6445ff..5a17c09f2 100644
--- a/Library/Homebrew/cask/lib/hbc/dsl/depends_on.rb
+++ b/Library/Homebrew/cask/lib/hbc/dsl/depends_on.rb
@@ -4,40 +4,40 @@ module Hbc
class DSL
class DependsOn
VALID_KEYS = Set.new [
- :formula,
- :cask,
- :macos,
- :arch,
- :x11,
- :java,
- ].freeze
+ :formula,
+ :cask,
+ :macos,
+ :arch,
+ :x11,
+ :java,
+ ].freeze
VALID_ARCHES = {
- intel: { type: :intel, bits: [32, 64] },
- ppc: { type: :ppc, bits: [32, 64] },
- # specific
- i386: { type: :intel, bits: 32 },
- x86_64: { type: :intel, bits: 64 },
- ppc_7400: { type: :ppc, bits: 32 },
- ppc_64: { type: :ppc, bits: 64 },
- }.freeze
+ intel: { type: :intel, bits: [32, 64] },
+ ppc: { type: :ppc, bits: [32, 64] },
+ # specific
+ i386: { type: :intel, bits: 32 },
+ x86_64: { type: :intel, bits: 64 },
+ ppc_7400: { type: :ppc, bits: 32 },
+ ppc_64: { type: :ppc, bits: 64 },
+ }.freeze
# Intentionally undocumented: catch variant spellings.
ARCH_SYNONYMS = {
- x86_32: :i386,
- x8632: :i386,
- x8664: :x86_64,
- intel_32: :i386,
- intel32: :i386,
- intel_64: :x86_64,
- intel64: :x86_64,
- amd_64: :x86_64,
- amd64: :x86_64,
- ppc7400: :ppc_7400,
- ppc_32: :ppc_7400,
- ppc32: :ppc_7400,
- ppc64: :ppc_64,
- }.freeze
+ x86_32: :i386,
+ x8632: :i386,
+ x8664: :x86_64,
+ intel_32: :i386,
+ intel32: :i386,
+ intel_64: :x86_64,
+ intel64: :x86_64,
+ amd_64: :x86_64,
+ amd64: :x86_64,
+ ppc7400: :ppc_7400,
+ ppc_32: :ppc_7400,
+ ppc32: :ppc_7400,
+ ppc64: :ppc_64,
+ }.freeze
attr_accessor :java
attr_accessor :pairs
diff --git a/Library/Homebrew/cask/lib/hbc/dsl/gpg.rb b/Library/Homebrew/cask/lib/hbc/dsl/gpg.rb
index c54db4524..b49ebb97c 100644
--- a/Library/Homebrew/cask/lib/hbc/dsl/gpg.rb
+++ b/Library/Homebrew/cask/lib/hbc/dsl/gpg.rb
@@ -2,9 +2,9 @@ module Hbc
class DSL
class Gpg
KEY_PARAMETERS = Set.new [
- :key_id,
- :key_url,
- ]
+ :key_id,
+ :key_url,
+ ]
VALID_PARAMETERS = Set.new []
VALID_PARAMETERS.merge KEY_PARAMETERS
diff --git a/Library/Homebrew/cask/lib/hbc/dsl/installer.rb b/Library/Homebrew/cask/lib/hbc/dsl/installer.rb
index 92561c703..b01b28d76 100644
--- a/Library/Homebrew/cask/lib/hbc/dsl/installer.rb
+++ b/Library/Homebrew/cask/lib/hbc/dsl/installer.rb
@@ -2,9 +2,9 @@ module Hbc
class DSL
class Installer
VALID_KEYS = Set.new [
- :manual,
- :script,
- ]
+ :manual,
+ :script,
+ ]
attr_accessor(*VALID_KEYS)
diff --git a/Library/Homebrew/cask/lib/hbc/dsl/version.rb b/Library/Homebrew/cask/lib/hbc/dsl/version.rb
index 63c15a02d..d73205f52 100644
--- a/Library/Homebrew/cask/lib/hbc/dsl/version.rb
+++ b/Library/Homebrew/cask/lib/hbc/dsl/version.rb
@@ -2,11 +2,11 @@ module Hbc
class DSL
class Version < ::String
DIVIDERS = {
- "." => :dots,
- "-" => :hyphens,
- "_" => :underscores,
- "/" => :slashes,
- }.freeze
+ "." => :dots,
+ "-" => :hyphens,
+ "_" => :underscores,
+ "/" => :slashes,
+ }.freeze
DIVIDER_REGEX = /(#{DIVIDERS.keys.map { |v| Regexp.quote(v) }.join('|')})/
diff --git a/Library/Homebrew/cask/lib/hbc/installer.rb b/Library/Homebrew/cask/lib/hbc/installer.rb
index 5a26c0791..171405fa1 100644
--- a/Library/Homebrew/cask/lib/hbc/installer.rb
+++ b/Library/Homebrew/cask/lib/hbc/installer.rb
@@ -232,16 +232,16 @@ module Hbc
elsif MacOS.version <= :yosemite
@command.run!("/usr/bin/sqlite3",
args: [
- Hbc.tcc_db,
- "INSERT OR REPLACE INTO access VALUES('kTCCServiceAccessibility','#{bundle_identifier}',0,1,1,NULL);",
- ],
+ Hbc.tcc_db,
+ "INSERT OR REPLACE INTO access VALUES('kTCCServiceAccessibility','#{bundle_identifier}',0,1,1,NULL);",
+ ],
sudo: true)
elsif MacOS.version <= :el_capitan
@command.run!("/usr/bin/sqlite3",
args: [
- Hbc.tcc_db,
- "INSERT OR REPLACE INTO access VALUES('kTCCServiceAccessibility','#{bundle_identifier}',0,1,1,NULL,NULL);",
- ],
+ Hbc.tcc_db,
+ "INSERT OR REPLACE INTO access VALUES('kTCCServiceAccessibility','#{bundle_identifier}',0,1,1,NULL,NULL);",
+ ],
sudo: true)
else
opoo <<-EOS.undent
@@ -257,9 +257,9 @@ module Hbc
ohai "Disabling accessibility access"
@command.run!("/usr/bin/sqlite3",
args: [
- Hbc.tcc_db,
- "DELETE FROM access WHERE client='#{bundle_identifier}';",
- ],
+ Hbc.tcc_db,
+ "DELETE FROM access WHERE client='#{bundle_identifier}';",
+ ],
sudo: true)
else
opoo <<-EOS.undent
diff --git a/Library/Homebrew/cask/lib/hbc/macos.rb b/Library/Homebrew/cask/lib/hbc/macos.rb
index e7de82d6a..5c1515d0c 100644
--- a/Library/Homebrew/cask/lib/hbc/macos.rb
+++ b/Library/Homebrew/cask/lib/hbc/macos.rb
@@ -7,231 +7,231 @@ module OS
module_function
SYSTEM_DIRS = [
- "/",
- "/Applications",
- "/Applications/Utilities",
- "/Incompatible Software",
- "/Library",
- "/Library/Application Support",
- "/Library/Audio",
- "/Library/Caches",
- "/Library/ColorPickers",
- "/Library/ColorSync",
- "/Library/Components",
- "/Library/Compositions",
- "/Library/Contextual Menu Items",
- "/Library/CoreMediaIO",
- "/Library/Desktop Pictures",
- "/Library/Developer",
- "/Library/Dictionaries",
- "/Library/DirectoryServices",
- "/Library/Documentation",
- "/Library/Extensions",
- "/Library/Filesystems",
- "/Library/Fonts",
- "/Library/Frameworks",
- "/Library/Graphics",
- "/Library/Image Capture",
- "/Library/Input Methods",
- "/Library/Internet Plug-Ins",
- "/Library/Java",
- "/Library/Keyboard Layouts",
- "/Library/Keychains",
- "/Library/LaunchAgents",
- "/Library/LaunchDaemons",
- "/Library/Logs",
- "/Library/Messages",
- "/Library/Modem Scripts",
- "/Library/OpenDirectory",
- "/Library/PDF Services",
- "/Library/Perl",
- "/Library/PreferencePanes",
- "/Library/Preferences",
- "/Library/Printers",
- "/Library/PrivilegedHelperTools",
- "/Library/Python",
- "/Library/QuickLook",
- "/Library/QuickTime",
- "/Library/Receipts",
- "/Library/Ruby",
- "/Library/Sandbox",
- "/Library/Screen Savers",
- "/Library/ScriptingAdditions",
- "/Library/Scripts",
- "/Library/Security",
- "/Library/Speech",
- "/Library/Spelling",
- "/Library/Spotlight",
- "/Library/StartupItems",
- "/Library/SystemProfiler",
- "/Library/Updates",
- "/Library/User Pictures",
- "/Library/Video",
- "/Library/WebServer",
- "/Library/Widgets",
- "/Library/iTunes",
- "/Network",
- "/System",
- "/System/Library",
- "/System/Library/Accessibility",
- "/System/Library/Accounts",
- "/System/Library/Address Book Plug-Ins",
- "/System/Library/Assistant",
- "/System/Library/Automator",
- "/System/Library/BridgeSupport",
- "/System/Library/Caches",
- "/System/Library/ColorPickers",
- "/System/Library/ColorSync",
- "/System/Library/Colors",
- "/System/Library/Components",
- "/System/Library/Compositions",
- "/System/Library/CoreServices",
- "/System/Library/DTDs",
- "/System/Library/DirectoryServices",
- "/System/Library/Displays",
- "/System/Library/Extensions",
- "/System/Library/Filesystems",
- "/System/Library/Filters",
- "/System/Library/Fonts",
- "/System/Library/Frameworks",
- "/System/Library/Graphics",
- "/System/Library/IdentityServices",
- "/System/Library/Image Capture",
- "/System/Library/Input Methods",
- "/System/Library/InternetAccounts",
- "/System/Library/Java",
- "/System/Library/KerberosPlugins",
- "/System/Library/Keyboard Layouts",
- "/System/Library/Keychains",
- "/System/Library/LaunchAgents",
- "/System/Library/LaunchDaemons",
- "/System/Library/LinguisticData",
- "/System/Library/LocationBundles",
- "/System/Library/LoginPlugins",
- "/System/Library/Messages",
- "/System/Library/Metadata",
- "/System/Library/MonitorPanels",
- "/System/Library/OpenDirectory",
- "/System/Library/OpenSSL",
- "/System/Library/Password Server Filters",
- "/System/Library/PerformanceMetrics",
- "/System/Library/Perl",
- "/System/Library/PreferencePanes",
- "/System/Library/Printers",
- "/System/Library/PrivateFrameworks",
- "/System/Library/QuickLook",
- "/System/Library/QuickTime",
- "/System/Library/QuickTimeJava",
- "/System/Library/Recents",
- "/System/Library/SDKSettingsPlist",
- "/System/Library/Sandbox",
- "/System/Library/Screen Savers",
- "/System/Library/ScreenReader",
- "/System/Library/ScriptingAdditions",
- "/System/Library/ScriptingDefinitions",
- "/System/Library/Security",
- "/System/Library/Services",
- "/System/Library/Sounds",
- "/System/Library/Speech",
- "/System/Library/Spelling",
- "/System/Library/Spotlight",
- "/System/Library/StartupItems",
- "/System/Library/SyncServices",
- "/System/Library/SystemConfiguration",
- "/System/Library/SystemProfiler",
- "/System/Library/Tcl",
- "/System/Library/TextEncodings",
- "/System/Library/User Template",
- "/System/Library/UserEventPlugins",
- "/System/Library/Video",
- "/System/Library/WidgetResources",
- "/User Information",
- "/Users",
- "/Volumes",
- "/bin",
- "/boot",
- "/cores",
- "/dev",
- "/etc",
- "/etc/X11",
- "/etc/opt",
- "/etc/sgml",
- "/etc/xml",
- "/home",
- "/libexec",
- "/lost+found",
- "/media",
- "/mnt",
- "/net",
- "/opt",
- "/private",
- "/private/etc",
- "/private/tftpboot",
- "/private/tmp",
- "/private/var",
- "/proc",
- "/root",
- "/sbin",
- "/srv",
- "/tmp",
- "/usr",
- "/usr/X11R6",
- "/usr/bin",
- "/usr/etc",
- "/usr/include",
- "/usr/lib",
- "/usr/libexec",
- "/usr/local",
- "/usr/local/Cellar",
- "/usr/local/Frameworks",
- "/usr/local/Library",
- "/usr/local/bin",
- "/usr/local/etc",
- "/usr/local/include",
- "/usr/local/lib",
- "/usr/local/libexec",
- "/usr/local/opt",
- "/usr/local/share",
- "/usr/local/share/man",
- "/usr/local/share/man/man1",
- "/usr/local/share/man/man2",
- "/usr/local/share/man/man3",
- "/usr/local/share/man/man4",
- "/usr/local/share/man/man5",
- "/usr/local/share/man/man6",
- "/usr/local/share/man/man7",
- "/usr/local/share/man/man8",
- "/usr/local/share/man/man9",
- "/usr/local/share/man/mann",
- "/usr/local/var",
- "/usr/local/var/lib",
- "/usr/local/var/lock",
- "/usr/local/var/run",
- "/usr/sbin",
- "/usr/share",
- "/usr/share/man",
- "/usr/share/man/man1",
- "/usr/share/man/man2",
- "/usr/share/man/man3",
- "/usr/share/man/man4",
- "/usr/share/man/man5",
- "/usr/share/man/man6",
- "/usr/share/man/man7",
- "/usr/share/man/man8",
- "/usr/share/man/man9",
- "/usr/share/man/mann",
- "/usr/src",
- "/var",
- "/var/cache",
- "/var/lib",
- "/var/lock",
- "/var/log",
- "/var/mail",
- "/var/run",
- "/var/spool",
- "/var/spool/mail",
- "/var/tmp",
- ]
+ "/",
+ "/Applications",
+ "/Applications/Utilities",
+ "/Incompatible Software",
+ "/Library",
+ "/Library/Application Support",
+ "/Library/Audio",
+ "/Library/Caches",
+ "/Library/ColorPickers",
+ "/Library/ColorSync",
+ "/Library/Components",
+ "/Library/Compositions",
+ "/Library/Contextual Menu Items",
+ "/Library/CoreMediaIO",
+ "/Library/Desktop Pictures",
+ "/Library/Developer",
+ "/Library/Dictionaries",
+ "/Library/DirectoryServices",
+ "/Library/Documentation",
+ "/Library/Extensions",
+ "/Library/Filesystems",
+ "/Library/Fonts",
+ "/Library/Frameworks",
+ "/Library/Graphics",
+ "/Library/Image Capture",
+ "/Library/Input Methods",
+ "/Library/Internet Plug-Ins",
+ "/Library/Java",
+ "/Library/Keyboard Layouts",
+ "/Library/Keychains",
+ "/Library/LaunchAgents",
+ "/Library/LaunchDaemons",
+ "/Library/Logs",
+ "/Library/Messages",
+ "/Library/Modem Scripts",
+ "/Library/OpenDirectory",
+ "/Library/PDF Services",
+ "/Library/Perl",
+ "/Library/PreferencePanes",
+ "/Library/Preferences",
+ "/Library/Printers",
+ "/Library/PrivilegedHelperTools",
+ "/Library/Python",
+ "/Library/QuickLook",
+ "/Library/QuickTime",
+ "/Library/Receipts",
+ "/Library/Ruby",
+ "/Library/Sandbox",
+ "/Library/Screen Savers",
+ "/Library/ScriptingAdditions",
+ "/Library/Scripts",
+ "/Library/Security",
+ "/Library/Speech",
+ "/Library/Spelling",
+ "/Library/Spotlight",
+ "/Library/StartupItems",
+ "/Library/SystemProfiler",
+ "/Library/Updates",
+ "/Library/User Pictures",
+ "/Library/Video",
+ "/Library/WebServer",
+ "/Library/Widgets",
+ "/Library/iTunes",
+ "/Network",
+ "/System",
+ "/System/Library",
+ "/System/Library/Accessibility",
+ "/System/Library/Accounts",
+ "/System/Library/Address Book Plug-Ins",
+ "/System/Library/Assistant",
+ "/System/Library/Automator",
+ "/System/Library/BridgeSupport",
+ "/System/Library/Caches",
+ "/System/Library/ColorPickers",
+ "/System/Library/ColorSync",
+ "/System/Library/Colors",
+ "/System/Library/Components",
+ "/System/Library/Compositions",
+ "/System/Library/CoreServices",
+ "/System/Library/DTDs",
+ "/System/Library/DirectoryServices",
+ "/System/Library/Displays",
+ "/System/Library/Extensions",
+ "/System/Library/Filesystems",
+ "/System/Library/Filters",
+ "/System/Library/Fonts",
+ "/System/Library/Frameworks",
+ "/System/Library/Graphics",
+ "/System/Library/IdentityServices",
+ "/System/Library/Image Capture",
+ "/System/Library/Input Methods",
+ "/System/Library/InternetAccounts",
+ "/System/Library/Java",
+ "/System/Library/KerberosPlugins",
+ "/System/Library/Keyboard Layouts",
+ "/System/Library/Keychains",
+ "/System/Library/LaunchAgents",
+ "/System/Library/LaunchDaemons",
+ "/System/Library/LinguisticData",
+ "/System/Library/LocationBundles",
+ "/System/Library/LoginPlugins",
+ "/System/Library/Messages",
+ "/System/Library/Metadata",
+ "/System/Library/MonitorPanels",
+ "/System/Library/OpenDirectory",
+ "/System/Library/OpenSSL",
+ "/System/Library/Password Server Filters",
+ "/System/Library/PerformanceMetrics",
+ "/System/Library/Perl",
+ "/System/Library/PreferencePanes",
+ "/System/Library/Printers",
+ "/System/Library/PrivateFrameworks",
+ "/System/Library/QuickLook",
+ "/System/Library/QuickTime",
+ "/System/Library/QuickTimeJava",
+ "/System/Library/Recents",
+ "/System/Library/SDKSettingsPlist",
+ "/System/Library/Sandbox",
+ "/System/Library/Screen Savers",
+ "/System/Library/ScreenReader",
+ "/System/Library/ScriptingAdditions",
+ "/System/Library/ScriptingDefinitions",
+ "/System/Library/Security",
+ "/System/Library/Services",
+ "/System/Library/Sounds",
+ "/System/Library/Speech",
+ "/System/Library/Spelling",
+ "/System/Library/Spotlight",
+ "/System/Library/StartupItems",
+ "/System/Library/SyncServices",
+ "/System/Library/SystemConfiguration",
+ "/System/Library/SystemProfiler",
+ "/System/Library/Tcl",
+ "/System/Library/TextEncodings",
+ "/System/Library/User Template",
+ "/System/Library/UserEventPlugins",
+ "/System/Library/Video",
+ "/System/Library/WidgetResources",
+ "/User Information",
+ "/Users",
+ "/Volumes",
+ "/bin",
+ "/boot",
+ "/cores",
+ "/dev",
+ "/etc",
+ "/etc/X11",
+ "/etc/opt",
+ "/etc/sgml",
+ "/etc/xml",
+ "/home",
+ "/libexec",
+ "/lost+found",
+ "/media",
+ "/mnt",
+ "/net",
+ "/opt",
+ "/private",
+ "/private/etc",
+ "/private/tftpboot",
+ "/private/tmp",
+ "/private/var",
+ "/proc",
+ "/root",
+ "/sbin",
+ "/srv",
+ "/tmp",
+ "/usr",
+ "/usr/X11R6",
+ "/usr/bin",
+ "/usr/etc",
+ "/usr/include",
+ "/usr/lib",
+ "/usr/libexec",
+ "/usr/local",
+ "/usr/local/Cellar",
+ "/usr/local/Frameworks",
+ "/usr/local/Library",
+ "/usr/local/bin",
+ "/usr/local/etc",
+ "/usr/local/include",
+ "/usr/local/lib",
+ "/usr/local/libexec",
+ "/usr/local/opt",
+ "/usr/local/share",
+ "/usr/local/share/man",
+ "/usr/local/share/man/man1",
+ "/usr/local/share/man/man2",
+ "/usr/local/share/man/man3",
+ "/usr/local/share/man/man4",
+ "/usr/local/share/man/man5",
+ "/usr/local/share/man/man6",
+ "/usr/local/share/man/man7",
+ "/usr/local/share/man/man8",
+ "/usr/local/share/man/man9",
+ "/usr/local/share/man/mann",
+ "/usr/local/var",
+ "/usr/local/var/lib",
+ "/usr/local/var/lock",
+ "/usr/local/var/run",
+ "/usr/sbin",
+ "/usr/share",
+ "/usr/share/man",
+ "/usr/share/man/man1",
+ "/usr/share/man/man2",
+ "/usr/share/man/man3",
+ "/usr/share/man/man4",
+ "/usr/share/man/man5",
+ "/usr/share/man/man6",
+ "/usr/share/man/man7",
+ "/usr/share/man/man8",
+ "/usr/share/man/man9",
+ "/usr/share/man/mann",
+ "/usr/src",
+ "/var",
+ "/var/cache",
+ "/var/lib",
+ "/var/lock",
+ "/var/log",
+ "/var/mail",
+ "/var/run",
+ "/var/spool",
+ "/var/spool/mail",
+ "/var/tmp",
+ ]
.map(&method(:Pathname))
.to_set
.freeze
@@ -239,131 +239,131 @@ module OS
# TODO: There should be a way to specify a containing
# directory under which nothing can be deleted.
UNDELETABLE_DIRS = [
- "~/",
- "~/Applications",
- "~/Desktop",
- "~/Documents",
- "~/Downloads",
- "~/Mail",
- "~/Movies",
- "~/Music",
- "~/Music/iTunes",
- "~/Music/iTunes/iTunes Music",
- "~/Music/iTunes/Album Artwork",
- "~/News",
- "~/Pictures",
- "~/Pictures/Desktops",
- "~/Pictures/Photo Booth",
- "~/Pictures/iChat Icons",
- "~/Pictures/iPhoto Library",
- "~/Public",
- "~/Sites",
- "~/Library",
- "~/Library/.localized",
- "~/Library/Accessibility",
- "~/Library/Accounts",
- "~/Library/Address Book Plug-Ins",
- "~/Library/Application Scripts",
- "~/Library/Application Support",
- "~/Library/Application Support/Apple",
- "~/Library/Application Support/com.apple.AssistiveControl",
- "~/Library/Application Support/com.apple.QuickLook",
- "~/Library/Application Support/com.apple.TCC",
- "~/Library/Assistants",
- "~/Library/Audio",
- "~/Library/Automator",
- "~/Library/Autosave Information",
- "~/Library/Caches",
- "~/Library/Calendars",
- "~/Library/ColorPickers",
- "~/Library/ColorSync",
- "~/Library/Colors",
- "~/Library/Components",
- "~/Library/Compositions",
- "~/Library/Containers",
- "~/Library/Contextual Menu Items",
- "~/Library/Cookies",
- "~/Library/DTDs",
- "~/Library/Desktop Pictures",
- "~/Library/Developer",
- "~/Library/Dictionaries",
- "~/Library/DirectoryServices",
- "~/Library/Displays",
- "~/Library/Documentation",
- "~/Library/Extensions",
- "~/Library/Favorites",
- "~/Library/FileSync",
- "~/Library/Filesystems",
- "~/Library/Filters",
- "~/Library/FontCollections",
- "~/Library/Fonts",
- "~/Library/Frameworks",
- "~/Library/GameKit",
- "~/Library/Graphics",
- "~/Library/Group Containers",
- "~/Library/Icons",
- "~/Library/IdentityServices",
- "~/Library/Image Capture",
- "~/Library/Images",
- "~/Library/Input Methods",
- "~/Library/Internet Plug-Ins",
- "~/Library/InternetAccounts",
- "~/Library/iTunes",
- "~/Library/KeyBindings",
- "~/Library/Keyboard Layouts",
- "~/Library/Keychains",
- "~/Library/LaunchAgents",
- "~/Library/LaunchDaemons",
- "~/Library/LocationBundles",
- "~/Library/LoginPlugins",
- "~/Library/Logs",
- "~/Library/Mail",
- "~/Library/Mail Downloads",
- "~/Library/Messages",
- "~/Library/Metadata",
- "~/Library/Mobile Documents",
- "~/Library/MonitorPanels",
- "~/Library/OpenDirectory",
- "~/Library/PDF Services",
- "~/Library/PhonePlugins",
- "~/Library/Phones",
- "~/Library/PreferencePanes",
- "~/Library/Preferences",
- "~/Library/Printers",
- "~/Library/PrivateFrameworks",
- "~/Library/PubSub",
- "~/Library/QuickLook",
- "~/Library/QuickTime",
- "~/Library/Receipts",
- "~/Library/Recent Servers",
- "~/Library/Recents",
- "~/Library/Safari",
- "~/Library/Saved Application State",
- "~/Library/Screen Savers",
- "~/Library/ScreenReader",
- "~/Library/ScriptingAdditions",
- "~/Library/ScriptingDefinitions",
- "~/Library/Scripts",
- "~/Library/Security",
- "~/Library/Services",
- "~/Library/Sounds",
- "~/Library/Speech",
- "~/Library/Spelling",
- "~/Library/Spotlight",
- "~/Library/StartupItems",
- "~/Library/StickiesDatabase",
- "~/Library/Sync Services",
- "~/Library/SyncServices",
- "~/Library/SyncedPreferences",
- "~/Library/TextEncodings",
- "~/Library/User Pictures",
- "~/Library/Video",
- "~/Library/Voices",
- "~/Library/WebKit",
- "~/Library/WidgetResources",
- "~/Library/Widgets",
- "~/Library/Workflows",
- ]
+ "~/",
+ "~/Applications",
+ "~/Desktop",
+ "~/Documents",
+ "~/Downloads",
+ "~/Mail",
+ "~/Movies",
+ "~/Music",
+ "~/Music/iTunes",
+ "~/Music/iTunes/iTunes Music",
+ "~/Music/iTunes/Album Artwork",
+ "~/News",
+ "~/Pictures",
+ "~/Pictures/Desktops",
+ "~/Pictures/Photo Booth",
+ "~/Pictures/iChat Icons",
+ "~/Pictures/iPhoto Library",
+ "~/Public",
+ "~/Sites",
+ "~/Library",
+ "~/Library/.localized",
+ "~/Library/Accessibility",
+ "~/Library/Accounts",
+ "~/Library/Address Book Plug-Ins",
+ "~/Library/Application Scripts",
+ "~/Library/Application Support",
+ "~/Library/Application Support/Apple",
+ "~/Library/Application Support/com.apple.AssistiveControl",
+ "~/Library/Application Support/com.apple.QuickLook",
+ "~/Library/Application Support/com.apple.TCC",
+ "~/Library/Assistants",
+ "~/Library/Audio",
+ "~/Library/Automator",
+ "~/Library/Autosave Information",
+ "~/Library/Caches",
+ "~/Library/Calendars",
+ "~/Library/ColorPickers",
+ "~/Library/ColorSync",
+ "~/Library/Colors",
+ "~/Library/Components",
+ "~/Library/Compositions",
+ "~/Library/Containers",
+ "~/Library/Contextual Menu Items",
+ "~/Library/Cookies",
+ "~/Library/DTDs",
+ "~/Library/Desktop Pictures",
+ "~/Library/Developer",
+ "~/Library/Dictionaries",
+ "~/Library/DirectoryServices",
+ "~/Library/Displays",
+ "~/Library/Documentation",
+ "~/Library/Extensions",
+ "~/Library/Favorites",
+ "~/Library/FileSync",
+ "~/Library/Filesystems",
+ "~/Library/Filters",
+ "~/Library/FontCollections",
+ "~/Library/Fonts",
+ "~/Library/Frameworks",
+ "~/Library/GameKit",
+ "~/Library/Graphics",
+ "~/Library/Group Containers",
+ "~/Library/Icons",
+ "~/Library/IdentityServices",
+ "~/Library/Image Capture",
+ "~/Library/Images",
+ "~/Library/Input Methods",
+ "~/Library/Internet Plug-Ins",
+ "~/Library/InternetAccounts",
+ "~/Library/iTunes",
+ "~/Library/KeyBindings",
+ "~/Library/Keyboard Layouts",
+ "~/Library/Keychains",
+ "~/Library/LaunchAgents",
+ "~/Library/LaunchDaemons",
+ "~/Library/LocationBundles",
+ "~/Library/LoginPlugins",
+ "~/Library/Logs",
+ "~/Library/Mail",
+ "~/Library/Mail Downloads",
+ "~/Library/Messages",
+ "~/Library/Metadata",
+ "~/Library/Mobile Documents",
+ "~/Library/MonitorPanels",
+ "~/Library/OpenDirectory",
+ "~/Library/PDF Services",
+ "~/Library/PhonePlugins",
+ "~/Library/Phones",
+ "~/Library/PreferencePanes",
+ "~/Library/Preferences",
+ "~/Library/Printers",
+ "~/Library/PrivateFrameworks",
+ "~/Library/PubSub",
+ "~/Library/QuickLook",
+ "~/Library/QuickTime",
+ "~/Library/Receipts",
+ "~/Library/Recent Servers",
+ "~/Library/Recents",
+ "~/Library/Safari",
+ "~/Library/Saved Application State",
+ "~/Library/Screen Savers",
+ "~/Library/ScreenReader",
+ "~/Library/ScriptingAdditions",
+ "~/Library/ScriptingDefinitions",
+ "~/Library/Scripts",
+ "~/Library/Security",
+ "~/Library/Services",
+ "~/Library/Sounds",
+ "~/Library/Speech",
+ "~/Library/Spelling",
+ "~/Library/Spotlight",
+ "~/Library/StartupItems",
+ "~/Library/StickiesDatabase",
+ "~/Library/Sync Services",
+ "~/Library/SyncServices",
+ "~/Library/SyncedPreferences",
+ "~/Library/TextEncodings",
+ "~/Library/User Pictures",
+ "~/Library/Video",
+ "~/Library/Voices",
+ "~/Library/WebKit",
+ "~/Library/WidgetResources",
+ "~/Library/Widgets",
+ "~/Library/Workflows",
+ ]
.map { |x| Pathname(x.sub(%r{^~(?=(/|$))}, Dir.home)).expand_path }
.to_set
.union(SYSTEM_DIRS)
diff --git a/Library/Homebrew/cask/lib/hbc/url_checker.rb b/Library/Homebrew/cask/lib/hbc/url_checker.rb
index 6dfe0bebe..299684b13 100644
--- a/Library/Homebrew/cask/lib/hbc/url_checker.rb
+++ b/Library/Homebrew/cask/lib/hbc/url_checker.rb
@@ -23,16 +23,16 @@ module Hbc
end
HTTP_RESPONSES = [
- "HTTP/1.0 200 OK",
- "HTTP/1.1 200 OK",
- "HTTP/1.1 302 Found",
- ].freeze
+ "HTTP/1.0 200 OK",
+ "HTTP/1.1 200 OK",
+ "HTTP/1.1 302 Found",
+ ].freeze
OK_RESPONSES = {
- "http" => HTTP_RESPONSES,
- "https" => HTTP_RESPONSES,
- "ftp" => ["OK"],
- }.freeze
+ "http" => HTTP_RESPONSES,
+ "https" => HTTP_RESPONSES,
+ "ftp" => ["OK"],
+ }.freeze
def _check_response_status
ok = OK_RESPONSES[cask.url.scheme]
diff --git a/Library/Homebrew/cask/spec/cask/cli/cleanup_spec.rb b/Library/Homebrew/cask/spec/cask/cli/cleanup_spec.rb
index 58ce5b7a3..2f4028e2a 100644
--- a/Library/Homebrew/cask/spec/cask/cli/cleanup_spec.rb
+++ b/Library/Homebrew/cask/spec/cask/cli/cleanup_spec.rb
@@ -13,9 +13,9 @@ describe Hbc::CLI::Cleanup do
cleaned_up_cached_download = "caffeine"
cached_downloads = [
- cache_location.join("#{cleaned_up_cached_download}--latest.zip"),
- cache_location.join("transmission--2.61.dmg"),
- ]
+ cache_location.join("#{cleaned_up_cached_download}--latest.zip"),
+ cache_location.join("transmission--2.61.dmg"),
+ ]
cached_downloads.each(&FileUtils.method(:touch))
diff --git a/Library/Homebrew/cask/spec/cask/download_strategy_spec.rb b/Library/Homebrew/cask/spec/cask/download_strategy_spec.rb
index f867dc19f..d6c28bbd1 100644
--- a/Library/Homebrew/cask/spec/cask/download_strategy_spec.rb
+++ b/Library/Homebrew/cask/spec/cask/download_strategy_spec.rb
@@ -68,9 +68,9 @@ describe "download strategies" do
let(:url_options) {
{
cookies: {
- coo: "kie",
- mon: "ster",
- },
+ coo: "kie",
+ mon: "ster",
+ },
}
}
@@ -114,9 +114,9 @@ describe "download strategies" do
{
using: :post,
data: {
- form: "data",
- is: "good",
- },
+ form: "data",
+ is: "good",
+ },
}
}
@@ -190,13 +190,13 @@ describe "download strategies" do
expect(fake_system_command).to have_received(:run!).with(
"/usr/bin/svn",
hash_including(args: [
- "checkout",
- "--force",
- "--config-option",
- "config:miscellany:use-commit-times=yes",
- cask.url.to_s,
- downloader.cached_location,
- ])
+ "checkout",
+ "--force",
+ "--config-option",
+ "config:miscellany:use-commit-times=yes",
+ cask.url.to_s,
+ downloader.cached_location,
+ ])
)
end
@@ -218,15 +218,15 @@ describe "download strategies" do
expect(fake_system_command).to have_received(:run!).with(
"/usr/bin/svn",
hash_including(args: [
- "checkout",
- "--force",
- "--config-option",
- "config:miscellany:use-commit-times=yes",
- "--trust-server-cert",
- "--non-interactive",
- cask.url.to_s,
- downloader.cached_location,
- ])
+ "checkout",
+ "--force",
+ "--config-option",
+ "config:miscellany:use-commit-times=yes",
+ "--trust-server-cert",
+ "--non-interactive",
+ cask.url.to_s,
+ downloader.cached_location,
+ ])
)
end
end
@@ -249,15 +249,15 @@ describe "download strategies" do
expect(fake_system_command).to have_received(:run!).with(
"/usr/bin/svn",
hash_including(args: [
- "checkout",
- "--force",
- "--config-option",
- "config:miscellany:use-commit-times=yes",
- cask.url.to_s,
- downloader.cached_location,
- "-r",
- "10",
- ])
+ "checkout",
+ "--force",
+ "--config-option",
+ "config:miscellany:use-commit-times=yes",
+ cask.url.to_s,
+ downloader.cached_location,
+ "-r",
+ "10",
+ ])
)
end
end
@@ -276,14 +276,14 @@ describe "download strategies" do
expect(fake_system_command).to have_received(:run!).with(
"/usr/bin/tar",
hash_including(args: [
- '-s/^\\.//',
- "--exclude",
- ".svn",
- "-cf",
- downloader.tarball_path,
- "--",
- ".",
- ])
+ '-s/^\\.//',
+ "--exclude",
+ ".svn",
+ "-cf",
+ downloader.tarball_path,
+ "--",
+ ".",
+ ])
)
end
end
diff --git a/Library/Homebrew/cask/spec/cask/system_command_spec.rb b/Library/Homebrew/cask/spec/cask/system_command_spec.rb
index be70cb5e7..3f9f8ac2b 100644
--- a/Library/Homebrew/cask/spec/cask/system_command_spec.rb
+++ b/Library/Homebrew/cask/spec/cask/system_command_spec.rb
@@ -49,9 +49,9 @@ describe Hbc::SystemCommand do
let(:command) { "/bin/bash" }
let(:options) {
{ args: [
- "-c",
- "for i in $(seq 1 2 5); do echo $i; echo $(($i + 1)) >&2; done",
- ] }
+ "-c",
+ "for i in $(seq 1 2 5); do echo $i; echo $(($i + 1)) >&2; done",
+ ] }
}
shared_examples "it returns '1 2 3 4 5 6'" do
@@ -125,9 +125,9 @@ describe Hbc::SystemCommand do
let(:command) { "/bin/bash" }
let(:options) {
{ args: [
- "-c",
- "for i in $(seq 1 2 100000); do echo $i; echo $(($i + 1)) >&2; done",
- ] }
+ "-c",
+ "for i in $(seq 1 2 100000); do echo $i; echo $(($i + 1)) >&2; done",
+ ] }
}
it "returns without deadlocking" do
diff --git a/Library/Homebrew/cask/spec/locale_spec.rb b/Library/Homebrew/cask/spec/locale_spec.rb
index 69914e23c..41ca87ede 100644
--- a/Library/Homebrew/cask/spec/locale_spec.rb
+++ b/Library/Homebrew/cask/spec/locale_spec.rb
@@ -11,7 +11,7 @@ describe Locale do
context "raises a ParserError when given" do
it "an empty string" do
- expect{ described_class.parse("") }.to raise_error(Locale::ParserError)
+ expect { described_class.parse("") }.to raise_error(Locale::ParserError)
end
it "a string in a wrong format" do
diff --git a/Library/Homebrew/cask/test/cask/cli/create_test.rb b/Library/Homebrew/cask/test/cask/cli/create_test.rb
index 06c2d203c..c4e175915 100644
--- a/Library/Homebrew/cask/test/cask/cli/create_test.rb
+++ b/Library/Homebrew/cask/test/cask/cli/create_test.rb
@@ -34,8 +34,8 @@ describe Hbc::CLI::Create do
it "opens the editor for the specified Cask" do
Hbc::CLI::Create.run("new-cask")
Hbc::CLI::Create.editor_commands.must_equal [
- [Hbc.path("new-cask")],
- ]
+ [Hbc.path("new-cask")],
+ ]
end
it "drops a template down for the specified Cask" do
@@ -58,15 +58,15 @@ describe Hbc::CLI::Create do
it "throws away additional Cask arguments and uses the first" do
Hbc::CLI::Create.run("additional-cask", "another-cask")
Hbc::CLI::Create.editor_commands.must_equal [
- [Hbc.path("additional-cask")],
- ]
+ [Hbc.path("additional-cask")],
+ ]
end
it "throws away stray options" do
Hbc::CLI::Create.run("--notavalidoption", "yet-another-cask")
Hbc::CLI::Create.editor_commands.must_equal [
- [Hbc.path("yet-another-cask")],
- ]
+ [Hbc.path("yet-another-cask")],
+ ]
end
it "raises an exception when the Cask already exists" do
@@ -78,8 +78,8 @@ describe Hbc::CLI::Create do
it "allows creating Casks that are substrings of existing Casks" do
Hbc::CLI::Create.run("feine")
Hbc::CLI::Create.editor_commands.must_equal [
- [Hbc.path("feine")],
- ]
+ [Hbc.path("feine")],
+ ]
end
describe "when no Cask is specified" do
diff --git a/Library/Homebrew/cask/test/cask/cli/edit_test.rb b/Library/Homebrew/cask/test/cask/cli/edit_test.rb
index 3f385eb33..6eb2289c0 100644
--- a/Library/Homebrew/cask/test/cask/cli/edit_test.rb
+++ b/Library/Homebrew/cask/test/cask/cli/edit_test.rb
@@ -27,15 +27,15 @@ describe Hbc::CLI::Edit do
it "opens the editor for the specified Cask" do
Hbc::CLI::Edit.run("alfred")
Hbc::CLI::Edit.editor_commands.must_equal [
- [Hbc.path("alfred")],
- ]
+ [Hbc.path("alfred")],
+ ]
end
it "throws away additional arguments and uses the first" do
Hbc::CLI::Edit.run("adium", "alfred")
Hbc::CLI::Edit.editor_commands.must_equal [
- [Hbc.path("adium")],
- ]
+ [Hbc.path("adium")],
+ ]
end
it "raises an exception when the Cask doesnt exist" do
diff --git a/Library/Homebrew/cask/test/cask/cli/home_test.rb b/Library/Homebrew/cask/test/cask/cli/home_test.rb
index 78302abd1..67bcb024a 100644
--- a/Library/Homebrew/cask/test/cask/cli/home_test.rb
+++ b/Library/Homebrew/cask/test/cask/cli/home_test.rb
@@ -27,22 +27,22 @@ describe Hbc::CLI::Home do
it "opens the homepage for the specified Cask" do
Hbc::CLI::Home.run("alfred")
Hbc::CLI::Home.system_commands.must_equal [
- ["/usr/bin/open", "--", "https://www.alfredapp.com/"],
- ]
+ ["/usr/bin/open", "--", "https://www.alfredapp.com/"],
+ ]
end
it "works for multiple Casks" do
Hbc::CLI::Home.run("alfred", "adium")
Hbc::CLI::Home.system_commands.must_equal [
- ["/usr/bin/open", "--", "https://www.alfredapp.com/"],
- ["/usr/bin/open", "--", "https://www.adium.im/"],
- ]
+ ["/usr/bin/open", "--", "https://www.alfredapp.com/"],
+ ["/usr/bin/open", "--", "https://www.adium.im/"],
+ ]
end
it "opens the project page when no Cask is specified" do
Hbc::CLI::Home.run
Hbc::CLI::Home.system_commands.must_equal [
- ["/usr/bin/open", "--", "http://caskroom.io/"],
- ]
+ ["/usr/bin/open", "--", "http://caskroom.io/"],
+ ]
end
end
diff --git a/Library/Homebrew/cask/test/cask/dsl_test.rb b/Library/Homebrew/cask/test/cask/dsl_test.rb
index d062875fa..adcdc4665 100644
--- a/Library/Homebrew/cask/test/cask/dsl_test.rb
+++ b/Library/Homebrew/cask/test/cask/dsl_test.rb
@@ -88,8 +88,8 @@ describe Hbc::DSL do
end
cask.name.must_equal [
- "Proper Name",
- ]
+ "Proper Name",
+ ]
end
it "Accepts an array value to the name stanza" do
@@ -98,9 +98,9 @@ describe Hbc::DSL do
end
cask.name.must_equal [
- "Proper Name",
- "Alternate Name",
- ]
+ "Proper Name",
+ "Alternate Name",
+ ]
end
it "Accepts multiple name stanzas" do
@@ -110,9 +110,9 @@ describe Hbc::DSL do
end
cask.name.must_equal [
- "Proper Name",
- "Alternate Name",
- ]
+ "Proper Name",
+ "Alternate Name",
+ ]
end
end
diff --git a/Library/Homebrew/cask/test/plist/parser_test.rb b/Library/Homebrew/cask/test/plist/parser_test.rb
index 173541a72..7f844e377 100644
--- a/Library/Homebrew/cask/test/plist/parser_test.rb
+++ b/Library/Homebrew/cask/test/plist/parser_test.rb
@@ -53,10 +53,10 @@ describe Plist do
parsed.keys.must_equal ["system-entities"]
parsed["system-entities"].length.must_equal 3
parsed["system-entities"].map { |e| e["dev-entry"] }.must_equal %w[
- /dev/disk3s1
- /dev/disk3
- /dev/disk3s2
- ]
+ /dev/disk3s1
+ /dev/disk3
+ /dev/disk3s2
+ ]
end
it "does not choke on empty input" do