aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Homebrew/cmd')
-rw-r--r--Library/Homebrew/cmd/deps.rb10
-rw-r--r--Library/Homebrew/cmd/fetch.rb2
-rw-r--r--Library/Homebrew/cmd/gist-logs.rb12
-rw-r--r--Library/Homebrew/cmd/linkapps.rb2
-rw-r--r--Library/Homebrew/cmd/outdated.rb14
-rw-r--r--Library/Homebrew/cmd/prune.rb2
-rw-r--r--Library/Homebrew/cmd/readall.rb2
-rw-r--r--Library/Homebrew/cmd/style.rb2
-rw-r--r--Library/Homebrew/cmd/tap.rb8
-rw-r--r--Library/Homebrew/cmd/unlinkapps.rb10
-rw-r--r--Library/Homebrew/cmd/unpack.rb2
-rw-r--r--Library/Homebrew/cmd/update-report.rb4
-rw-r--r--Library/Homebrew/cmd/upgrade.rb4
13 files changed, 37 insertions, 37 deletions
diff --git a/Library/Homebrew/cmd/deps.rb b/Library/Homebrew/cmd/deps.rb
index 8db70461e..acaf922d7 100644
--- a/Library/Homebrew/cmd/deps.rb
+++ b/Library/Homebrew/cmd/deps.rb
@@ -44,11 +44,11 @@ require "ostruct"
module Homebrew
def deps
mode = OpenStruct.new(
- :installed? => ARGV.include?("--installed"),
- :tree? => ARGV.include?("--tree"),
- :all? => ARGV.include?("--all"),
- :topo_order? => ARGV.include?("-n"),
- :union? => ARGV.include?("--union")
+ installed?: ARGV.include?("--installed"),
+ tree?: ARGV.include?("--tree"),
+ all?: ARGV.include?("--all"),
+ topo_order?: ARGV.include?("-n"),
+ union?: ARGV.include?("--union")
)
if mode.installed? && mode.tree?
diff --git a/Library/Homebrew/cmd/fetch.rb b/Library/Homebrew/cmd/fetch.rb
index fd8b0780c..93141ca5b 100644
--- a/Library/Homebrew/cmd/fetch.rb
+++ b/Library/Homebrew/cmd/fetch.rb
@@ -40,7 +40,7 @@ module Homebrew
puts "Fetching: #{bucket * ", "}" if bucket.size > 1
bucket.each do |f|
- f.print_tap_action :verb => "Fetching"
+ f.print_tap_action verb: "Fetching"
fetched_bottle = false
if fetch_bottle?(f)
diff --git a/Library/Homebrew/cmd/gist-logs.rb b/Library/Homebrew/cmd/gist-logs.rb
index 2c60129d1..200ad9fb5 100644
--- a/Library/Homebrew/cmd/gist-logs.rb
+++ b/Library/Homebrew/cmd/gist-logs.rb
@@ -23,16 +23,16 @@ module Homebrew
s = StringIO.new
SystemConfig.dump_verbose_config s
# Dummy summary file, asciibetically first, to control display title of gist
- files["# #{f.name} - #{timestamp}.txt"] = { :content => brief_build_info(f) }
- files["00.config.out"] = { :content => s.string }
- files["00.doctor.out"] = { :content => `brew doctor 2>&1` }
+ files["# #{f.name} - #{timestamp}.txt"] = { content: brief_build_info(f) }
+ files["00.config.out"] = { content: s.string }
+ files["00.doctor.out"] = { content: `brew doctor 2>&1` }
unless f.core_formula?
tap = <<-EOS.undent
Formula: #{f.name}
Tap: #{f.tap}
Path: #{f.path}
EOS
- files["00.tap.out"] = { :content => tap }
+ files["00.tap.out"] = { content: tap }
end
# Description formatted to work well as page title when viewing gist
@@ -93,8 +93,8 @@ module Homebrew
contents = file.size? ? file.read : "empty log"
# small enough to avoid GitHub "unicorn" page-load-timeout errors
max_file_size = 1_000_000
- contents = truncate_text_to_approximate_size(contents, max_file_size, :front_weight => 0.2)
- logs[file.basename.to_s] = { :content => contents }
+ contents = truncate_text_to_approximate_size(contents, max_file_size, front_weight: 0.2)
+ logs[file.basename.to_s] = { content: contents }
end if dir.exist?
raise "No logs." if logs.empty?
logs
diff --git a/Library/Homebrew/cmd/linkapps.rb b/Library/Homebrew/cmd/linkapps.rb
index 6659ce256..a4e4326f2 100644
--- a/Library/Homebrew/cmd/linkapps.rb
+++ b/Library/Homebrew/cmd/linkapps.rb
@@ -12,7 +12,7 @@ require "formula"
module Homebrew
def linkapps
- target_dir = linkapps_target(:local => ARGV.include?("--local"))
+ target_dir = linkapps_target(local: ARGV.include?("--local"))
unless target_dir.directory?
opoo "#{target_dir} does not exist, stopping."
diff --git a/Library/Homebrew/cmd/outdated.rb b/Library/Homebrew/cmd/outdated.rb
index e421b2481..7afa41df4 100644
--- a/Library/Homebrew/cmd/outdated.rb
+++ b/Library/Homebrew/cmd/outdated.rb
@@ -39,11 +39,11 @@ module Homebrew
verbose = ($stdout.tty? || ARGV.verbose?) && !ARGV.flag?("--quiet")
fetch_head = ARGV.fetch_head?
- outdated_formulae = formulae.select { |f| f.outdated?(:fetch_head => fetch_head) }
+ outdated_formulae = formulae.select { |f| f.outdated?(fetch_head: fetch_head) }
outdated_formulae.each do |f|
if verbose
- outdated_versions = f.outdated_versions(:fetch_head => fetch_head)
+ outdated_versions = f.outdated_versions(fetch_head: fetch_head)
current_version = if f.head? && outdated_versions.any? { |v| v.to_s == f.pkg_version.to_s }
"latest HEAD"
else
@@ -59,19 +59,19 @@ module Homebrew
def print_outdated_json(formulae)
json = []
fetch_head = ARGV.fetch_head?
- outdated_formulae = formulae.select { |f| f.outdated?(:fetch_head => fetch_head) }
+ outdated_formulae = formulae.select { |f| f.outdated?(fetch_head: fetch_head) }
outdated = outdated_formulae.each do |f|
- outdated_versions = f.outdated_versions(:fetch_head => fetch_head)
+ outdated_versions = f.outdated_versions(fetch_head: fetch_head)
current_version = if f.head? && outdated_versions.any? { |v| v.to_s == f.pkg_version.to_s }
"HEAD"
else
f.pkg_version.to_s
end
- json << { :name => f.full_name,
- :installed_versions => outdated_versions.collect(&:to_s),
- :current_version => current_version }
+ json << { name: f.full_name,
+ installed_versions: outdated_versions.collect(&:to_s),
+ current_version: current_version }
end
puts Utils::JSON.dump(json)
diff --git a/Library/Homebrew/cmd/prune.rb b/Library/Homebrew/cmd/prune.rb
index 20c2a3454..83979064a 100644
--- a/Library/Homebrew/cmd/prune.rb
+++ b/Library/Homebrew/cmd/prune.rb
@@ -58,6 +58,6 @@ module Homebrew
end
end
- unlinkapps_prune(:dry_run => ARGV.dry_run?, :quiet => true)
+ unlinkapps_prune(dry_run: ARGV.dry_run?, quiet: true)
end
end
diff --git a/Library/Homebrew/cmd/readall.rb b/Library/Homebrew/cmd/readall.rb
index 132472b70..e77e68865 100644
--- a/Library/Homebrew/cmd/readall.rb
+++ b/Library/Homebrew/cmd/readall.rb
@@ -25,7 +25,7 @@ module Homebrew
Homebrew.failed = true unless Readall.valid_ruby_syntax?(ruby_files)
end
- options = { :aliases => ARGV.include?("--aliases") }
+ options = { aliases: ARGV.include?("--aliases") }
taps = if ARGV.named.empty?
Tap
else
diff --git a/Library/Homebrew/cmd/style.rb b/Library/Homebrew/cmd/style.rb
index 61e2b7908..9540e853d 100644
--- a/Library/Homebrew/cmd/style.rb
+++ b/Library/Homebrew/cmd/style.rb
@@ -30,7 +30,7 @@ module Homebrew
ARGV.formulae.map(&:path)
end
- Homebrew.failed = check_style_and_print(target, :fix => ARGV.flag?("--fix"))
+ Homebrew.failed = check_style_and_print(target, fix: ARGV.flag?("--fix"))
end
# Checks style for a list of files, printing simple RuboCop output.
diff --git a/Library/Homebrew/cmd/tap.rb b/Library/Homebrew/cmd/tap.rb
index 49d278b7a..8ad63e4ba 100644
--- a/Library/Homebrew/cmd/tap.rb
+++ b/Library/Homebrew/cmd/tap.rb
@@ -47,9 +47,9 @@ module Homebrew
else
tap = Tap.fetch(ARGV.named[0])
begin
- tap.install :clone_target => ARGV.named[1],
- :full_clone => full_clone?,
- :quiet => ARGV.quieter?
+ tap.install clone_target: ARGV.named[1],
+ full_clone: full_clone?,
+ quiet: ARGV.quieter?
rescue TapRemoteMismatchError => e
odie e
rescue TapAlreadyTappedError, TapAlreadyUnshallowError
@@ -67,7 +67,7 @@ module Homebrew
opoo "Homebrew.install_tap is deprecated, use Tap#install."
tap = Tap.fetch(user, repo)
begin
- tap.install(:clone_target => clone_target, :full_clone => full_clone?)
+ tap.install(clone_target: clone_target, full_clone: full_clone?)
rescue TapAlreadyTappedError
false
else
diff --git a/Library/Homebrew/cmd/unlinkapps.rb b/Library/Homebrew/cmd/unlinkapps.rb
index 44b8aa06c..fc53470ec 100644
--- a/Library/Homebrew/cmd/unlinkapps.rb
+++ b/Library/Homebrew/cmd/unlinkapps.rb
@@ -13,17 +13,17 @@ require "cmd/linkapps"
module Homebrew
def unlinkapps
- target_dir = linkapps_target(:local => ARGV.include?("--local"))
+ target_dir = linkapps_target(local: ARGV.include?("--local"))
- unlinkapps_from_dir(target_dir, :dry_run => ARGV.dry_run?)
+ unlinkapps_from_dir(target_dir, dry_run: ARGV.dry_run?)
end
private
def unlinkapps_prune(opts = {})
- opts = opts.merge(:prune => true)
- unlinkapps_from_dir(linkapps_target(:local => false), opts)
- unlinkapps_from_dir(linkapps_target(:local => true), opts)
+ opts = opts.merge(prune: true)
+ unlinkapps_from_dir(linkapps_target(local: false), opts)
+ unlinkapps_from_dir(linkapps_target(local: true), opts)
end
def unlinkapps_from_dir(target_dir, opts = {})
diff --git a/Library/Homebrew/cmd/unpack.rb b/Library/Homebrew/cmd/unpack.rb
index a8c7c36a6..1a3044c2e 100644
--- a/Library/Homebrew/cmd/unpack.rb
+++ b/Library/Homebrew/cmd/unpack.rb
@@ -39,7 +39,7 @@ module Homebrew
ENV["VERBOSE"] = "1" # show messages about tar
f.brew do
f.patch if ARGV.flag?("--patch")
- cp_r getwd, stage_dir, :preserve => true
+ cp_r getwd, stage_dir, preserve: true
end
ENV["VERBOSE"] = nil
diff --git a/Library/Homebrew/cmd/update-report.rb b/Library/Homebrew/cmd/update-report.rb
index d97a0275e..ddbb9bd90 100644
--- a/Library/Homebrew/cmd/update-report.rb
+++ b/Library/Homebrew/cmd/update-report.rb
@@ -109,7 +109,7 @@ module Homebrew
def install_core_tap_if_necessary
core_tap = CoreTap.instance
return if core_tap.installed?
- CoreTap.ensure_installed! :quiet => false
+ CoreTap.ensure_installed! quiet: false
revision = core_tap.git_head
ENV["HOMEBREW_UPDATE_BEFORE_HOMEBREW_HOMEBREW_CORE"] = revision
ENV["HOMEBREW_UPDATE_AFTER_HOMEBREW_HOMEBREW_CORE"] = revision
@@ -175,7 +175,7 @@ module Homebrew
link_src_dst_dirs(HOMEBREW_REPOSITORY/"etc/bash_completion.d",
HOMEBREW_PREFIX/"etc/bash_completion.d", command)
link_src_dst_dirs(HOMEBREW_REPOSITORY/"share/doc/homebrew",
- HOMEBREW_PREFIX/"share/doc/homebrew", command, :link_dir => true)
+ HOMEBREW_PREFIX/"share/doc/homebrew", command, link_dir: true)
link_src_dst_dirs(HOMEBREW_REPOSITORY/"share/zsh/site-functions",
HOMEBREW_PREFIX/"share/zsh/site-functions", command)
link_path_manpages(HOMEBREW_REPOSITORY/"share", command)
diff --git a/Library/Homebrew/cmd/upgrade.rb b/Library/Homebrew/cmd/upgrade.rb
index 1053319bf..6968fbda8 100644
--- a/Library/Homebrew/cmd/upgrade.rb
+++ b/Library/Homebrew/cmd/upgrade.rb
@@ -25,13 +25,13 @@ module Homebrew
if ARGV.named.empty?
outdated = Formula.installed.select do |f|
- f.outdated?(:fetch_head => ARGV.fetch_head?)
+ f.outdated?(fetch_head: ARGV.fetch_head?)
end
exit 0 if outdated.empty?
else
outdated = ARGV.resolved_formulae.select do |f|
- f.outdated?(:fetch_head => ARGV.fetch_head?)
+ f.outdated?(fetch_head: ARGV.fetch_head?)
end
(ARGV.resolved_formulae - outdated).each do |f|