aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cask/lib/hbc.rb2
-rw-r--r--Library/Homebrew/cask/lib/hbc/cache.rb21
-rw-r--r--Library/Homebrew/cask/lib/hbc/cli/internal_dump.rb2
-rw-r--r--Library/Homebrew/cask/lib/hbc/cli/internal_help.rb2
-rw-r--r--Library/Homebrew/cask/lib/hbc/cli/internal_stanza.rb14
-rw-r--r--Library/Homebrew/official_taps.rb1
6 files changed, 12 insertions, 30 deletions
diff --git a/Library/Homebrew/cask/lib/hbc.rb b/Library/Homebrew/cask/lib/hbc.rb
index 69b6e8f21..775b9229f 100644
--- a/Library/Homebrew/cask/lib/hbc.rb
+++ b/Library/Homebrew/cask/lib/hbc.rb
@@ -46,7 +46,7 @@ module Hbc
def self.init
Cache.ensure_cache_exists
- Cache.migrate_legacy_cache
+ Cache.delete_legacy_cache
Caskroom.migrate_caskroom_from_repo_to_prefix
Caskroom.ensure_caskroom_exists
diff --git a/Library/Homebrew/cask/lib/hbc/cache.rb b/Library/Homebrew/cask/lib/hbc/cache.rb
index e343da3fa..7b586528e 100644
--- a/Library/Homebrew/cask/lib/hbc/cache.rb
+++ b/Library/Homebrew/cask/lib/hbc/cache.rb
@@ -9,27 +9,10 @@ module Hbc
Hbc.cache.mkpath
end
- def migrate_legacy_cache
+ def delete_legacy_cache
return unless Hbc.legacy_cache.exist?
- ohai "Migrating cached files to #{Hbc.cache}..."
- Hbc.legacy_cache.children.select(&:symlink?).each do |symlink|
- file = symlink.readlink
-
- new_name = file.basename
- .sub(/\-((?:(\d|#{DSL::Version::DIVIDER_REGEX})*\-\2*)*[^\-]+)$/x,
- '--\1')
-
- renamed_file = Hbc.cache.join(new_name)
-
- if file.exist?
- puts "#{file} -> #{renamed_file}"
- FileUtils.mv(file, renamed_file)
- end
-
- FileUtils.rm(symlink)
- end
-
+ ohai "Deleting legacy cache at #{Hbc.legacy_cache}..."
FileUtils.remove_entry_secure(Hbc.legacy_cache)
end
end
diff --git a/Library/Homebrew/cask/lib/hbc/cli/internal_dump.rb b/Library/Homebrew/cask/lib/hbc/cli/internal_dump.rb
index af1494e5f..ac1b20493 100644
--- a/Library/Homebrew/cask/lib/hbc/cli/internal_dump.rb
+++ b/Library/Homebrew/cask/lib/hbc/cli/internal_dump.rb
@@ -27,7 +27,7 @@ module Hbc
end
def self.help
- "Dump the given Cask in YAML format"
+ "dump the given Cask in YAML format"
end
end
end
diff --git a/Library/Homebrew/cask/lib/hbc/cli/internal_help.rb b/Library/Homebrew/cask/lib/hbc/cli/internal_help.rb
index 6c646cfd7..0908ee05e 100644
--- a/Library/Homebrew/cask/lib/hbc/cli/internal_help.rb
+++ b/Library/Homebrew/cask/lib/hbc/cli/internal_help.rb
@@ -16,7 +16,7 @@ module Hbc
end
def self.help
- "Print help strings for unstable internal-use commands"
+ "print help strings for unstable internal-use commands"
end
end
end
diff --git a/Library/Homebrew/cask/lib/hbc/cli/internal_stanza.rb b/Library/Homebrew/cask/lib/hbc/cli/internal_stanza.rb
index e5c04ee51..105e946d7 100644
--- a/Library/Homebrew/cask/lib/hbc/cli/internal_stanza.rb
+++ b/Library/Homebrew/cask/lib/hbc/cli/internal_stanza.rb
@@ -50,12 +50,12 @@ module Hbc
:uninstall_postflight,
]
- def self.run(*arguments)
- table = arguments.include? "--table"
- quiet = arguments.include? "--quiet"
- format = :to_yaml if arguments.include? "--yaml"
- format = :inspect if arguments.include? "--inspect"
- cask_tokens = arguments.reject { |arg| arg.chars.first == "-" }
+ def self.run(*args)
+ table = args.include? "--table"
+ quiet = args.include? "--quiet"
+ format = :to_yaml if args.include? "--yaml"
+ format = :inspect if args.include? "--inspect"
+ cask_tokens = cask_tokens_from(args)
stanza = cask_tokens.shift.to_sym
cask_tokens = Hbc.all_tokens if cask_tokens.empty?
@@ -125,7 +125,7 @@ module Hbc
end
def self.help
- "Extract and render a specific stanza for the given Casks"
+ "extract and render a specific stanza for the given Casks"
end
end
end
diff --git a/Library/Homebrew/official_taps.rb b/Library/Homebrew/official_taps.rb
index c1ef431b6..f2afea614 100644
--- a/Library/Homebrew/official_taps.rb
+++ b/Library/Homebrew/official_taps.rb
@@ -5,7 +5,6 @@ OFFICIAL_TAPS = %w[
emacs
fuse
games
- gui
nginx
php
python