diff options
| author | Mike McQuaid | 2016-09-18 13:28:15 +0100 |
|---|---|---|
| committer | GitHub | 2016-09-18 13:28:15 +0100 |
| commit | 59b7f16bfd9c1968aae0a2f1cd9a43d3d160d99f (patch) | |
| tree | 17d2adec882cdeef36a8fd40d891fe7fe4021572 /Library/Homebrew/dev-cmd | |
| parent | 56541001a45ea58c54096bc42584c17d72b1415a (diff) | |
| parent | 1bdbb0f462e4c3557bbcba0b203696bdcf025bb4 (diff) | |
| download | brew-59b7f16bfd9c1968aae0a2f1cd9a43d3d160d99f.tar.bz2 | |
Merge pull request #989 from MikeMcQuaid/rubocop-final
Rubocop: apply auto-corrections and don't use hash-rockets
Diffstat (limited to 'Library/Homebrew/dev-cmd')
| -rw-r--r-- | Library/Homebrew/dev-cmd/audit.rb | 8 | ||||
| -rw-r--r-- | Library/Homebrew/dev-cmd/pull.rb | 4 | ||||
| -rw-r--r-- | Library/Homebrew/dev-cmd/test-bot.rb | 12 |
3 files changed, 12 insertions, 12 deletions
diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb index 511610a9a..20e9a8aff 100644 --- a/Library/Homebrew/dev-cmd/audit.rb +++ b/Library/Homebrew/dev-cmd/audit.rb @@ -62,11 +62,11 @@ module Homebrew if strict # Check style in a single batch run up front for performance - style_results = check_style_json(files, :realpath => true) + style_results = check_style_json(files, realpath: true) end ff.each do |f| - options = { :new_formula => new_formula, :strict => strict, :online => online } + options = { new_formula: new_formula, strict: strict, online: online } options[:style_offenses] = style_results.file_offenses(f.path) if strict fa = FormulaAuditor.new(f, options) fa.audit @@ -172,7 +172,7 @@ class FormulaAuditor return unless @style_offenses display_cop_names = ARGV.include?("--display-cop-names") @style_offenses.each do |offense| - problem offense.to_s(:display_cop_name => display_cop_names) + problem offense.to_s(display_cop_name: display_cop_names) end end @@ -655,7 +655,7 @@ class FormulaAuditor return unless formula.tap # skip formula not from core or any taps return unless formula.tap.git? # git log is required - fv = FormulaVersions.new(formula, :max_depth => 10) + fv = FormulaVersions.new(formula, max_depth: 10) attributes = [:revision, :version_scheme] attributes_map = fv.version_attributes_map(attributes, "origin/master") diff --git a/Library/Homebrew/dev-cmd/pull.rb b/Library/Homebrew/dev-cmd/pull.rb index a59792281..7f027e159 100644 --- a/Library/Homebrew/dev-cmd/pull.rb +++ b/Library/Homebrew/dev-cmd/pull.rb @@ -243,7 +243,7 @@ module Homebrew end published = [] - bintray_creds = { :user => ENV["BINTRAY_USER"], :key => ENV["BINTRAY_KEY"] } + bintray_creds = { user: ENV["BINTRAY_USER"], key: ENV["BINTRAY_KEY"] } if bintray_creds[:user] && bintray_creds[:key] changed_formulae_names.each do |name| f = Formula[name] @@ -338,7 +338,7 @@ module Homebrew others << file end end - { :files => files, :formulae => formulae, :others => others } + { files: files, formulae: formulae, others: others } end # Get current formula versions without loading formula definition in this process diff --git a/Library/Homebrew/dev-cmd/test-bot.rb b/Library/Homebrew/dev-cmd/test-bot.rb index c8f34c24f..43feb318c 100644 --- a/Library/Homebrew/dev-cmd/test-bot.rb +++ b/Library/Homebrew/dev-cmd/test-bot.rb @@ -102,7 +102,7 @@ module Homebrew # Assume we are starting from a "mostly" UTF-8 string str.force_encoding(Encoding::UTF_8) return str if str.valid_encoding? - str.encode!(Encoding::UTF_16, :invalid => :replace) + str.encode!(Encoding::UTF_16, invalid: :replace) str.encode!(Encoding::UTF_8) end @@ -652,7 +652,7 @@ module Homebrew bottle_merge_args << "--keep-old" if ARGV.include? "--keep-old" test "brew", "bottle", *bottle_merge_args test "brew", "uninstall", "--force", formula_name - FileUtils.ln bottle_filename, HOMEBREW_CACHE/bottle_filename, :force => true + FileUtils.ln bottle_filename, HOMEBREW_CACHE/bottle_filename, force: true @formulae.delete(formula_name) unless unchanged_build_dependencies.empty? test "brew", "uninstall", "--force", *unchanged_build_dependencies @@ -908,7 +908,7 @@ module Homebrew bottles = Dir["#{jenkins}/jobs/#{job}/configurations/axis-version/*/builds/#{id}/archive/*.bottle*.*"] return if bottles.empty? - FileUtils.cp bottles, Dir.pwd, :verbose => true + FileUtils.cp bottles, Dir.pwd, verbose: true end json_files = Dir.glob("*.bottle.json") @@ -1077,14 +1077,14 @@ module Homebrew skip_homebrew = ARGV.include?("--skip-homebrew") if ARGV.named.empty? # With no arguments just build the most recent commit. - current_test = Test.new("HEAD", :tap => tap, :skip_homebrew => skip_homebrew) + current_test = Test.new("HEAD", tap: tap, skip_homebrew: skip_homebrew) any_errors = !current_test.run tests << current_test else ARGV.named.each do |argument| test_error = false begin - current_test = Test.new(argument, :tap => tap, :skip_homebrew => skip_homebrew) + current_test = Test.new(argument, tap: tap, skip_homebrew: skip_homebrew) skip_homebrew = true rescue ArgumentError => e test_error = true @@ -1153,7 +1153,7 @@ module Homebrew # Truncate to 1MB to avoid hitting CI limits if output.bytesize > MAX_STEP_OUTPUT_SIZE - output = truncate_text_to_approximate_size(output, MAX_STEP_OUTPUT_SIZE, :front_weight => 0.0) + output = truncate_text_to_approximate_size(output, MAX_STEP_OUTPUT_SIZE, front_weight: 0.0) output = "truncated output to 1MB:\n" + output end end |
