From b1d0c61feacb894f0235c2e2fed1370771f426bc Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Thu, 3 Oct 2019 08:50:45 +0200 Subject: [PATCH] Update Gems. --- Library/.rubocop_shared.yml | 5 +- Library/Homebrew/Gemfile | 3 +- Library/Homebrew/Gemfile.lock | 13 ++---- Library/Homebrew/cmd/info.rb | 2 +- Library/Homebrew/debrew.rb | 2 +- Library/Homebrew/dev-cmd/audit.rb | 2 +- Library/Homebrew/dev-cmd/bottle.rb | 11 ++--- Library/Homebrew/formula.rb | 2 +- Library/Homebrew/messages.rb | 2 +- .../rubocops/cask/homepage_matches_url.rb | 8 ++-- .../cask/homepage_url_trailing_slash.rb | 2 +- .../Homebrew/rubocops/cask/no_dsl_version.rb | 2 +- .../Homebrew/rubocops/cask/stanza_order.rb | 2 +- .../test/cask/artifact/alt_target_spec.rb | 15 +++--- .../cask/artifact/two_apps_correct_spec.rb | 16 +++---- Library/Homebrew/test/cask/depends_on_spec.rb | 46 +++++++++++++------ Library/Homebrew/test/cask/dsl_spec.rb | 10 ++-- .../Homebrew/test/diagnostic_checks_spec.rb | 5 +- .../rubocops/cask/stanza_grouping_spec.rb | 4 +- .../test/rubocops/cask/stanza_order_spec.rb | 4 +- Library/Homebrew/utils.rb | 4 +- Library/Homebrew/utils/curl.rb | 2 +- Library/Homebrew/utils/github.rb | 2 +- .../Homebrew/vendor/bundle/bundler/setup.rb | 15 +++--- .../config/default.yml | 9 ++-- .../lib/rubocop-performance.rb | 0 .../lib/rubocop/cop/performance/caller.rb | 0 .../cop/performance/case_when_splat.rb | 0 .../lib/rubocop/cop/performance/casecmp.rb | 0 .../cop/performance/chain_array_allocation.rb | 0 .../cop/performance/compare_with_block.rb | 0 .../lib/rubocop/cop/performance/count.rb | 3 -- .../lib/rubocop/cop/performance/detect.rb | 4 -- .../cop/performance/double_start_end_with.rb | 0 .../lib/rubocop/cop/performance/end_with.rb | 0 .../lib/rubocop/cop/performance/fixed_size.rb | 0 .../lib/rubocop/cop/performance/flat_map.rb | 9 +++- .../performance/inefficient_hash_search.rb | 0 .../rubocop/cop/performance/open_struct.rb | 0 .../rubocop/cop/performance/range_include.rb | 0 .../cop/performance/redundant_block_call.rb | 0 .../cop/performance/redundant_match.rb | 0 .../cop/performance/redundant_merge.rb | 2 +- .../rubocop/cop/performance/regexp_match.rb | 0 .../rubocop/cop/performance/reverse_each.rb | 0 .../lib/rubocop/cop/performance/size.rb | 0 .../lib/rubocop/cop/performance/start_with.rb | 0 .../cop/performance/string_replacement.rb | 0 .../lib/rubocop/cop/performance/times_map.rb | 0 .../cop/performance/unfreeze_string.rb | 0 .../cop/performance/uri_default_parser.rb | 0 .../lib/rubocop/cop/performance_cops.rb | 0 .../lib/rubocop/performance.rb | 0 .../lib/rubocop/performance/inject.rb | 0 .../lib/rubocop/performance/version.rb | 2 +- 55 files changed, 106 insertions(+), 102 deletions(-) rename Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/{rubocop-performance-1.4.1 => rubocop-performance-1.5.0}/config/default.yml (98%) rename Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/{rubocop-performance-1.4.1 => rubocop-performance-1.5.0}/lib/rubocop-performance.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/{rubocop-performance-1.4.1 => rubocop-performance-1.5.0}/lib/rubocop/cop/performance/caller.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/{rubocop-performance-1.4.1 => rubocop-performance-1.5.0}/lib/rubocop/cop/performance/case_when_splat.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/{rubocop-performance-1.4.1 => rubocop-performance-1.5.0}/lib/rubocop/cop/performance/casecmp.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/{rubocop-performance-1.4.1 => rubocop-performance-1.5.0}/lib/rubocop/cop/performance/chain_array_allocation.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/{rubocop-performance-1.4.1 => rubocop-performance-1.5.0}/lib/rubocop/cop/performance/compare_with_block.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/{rubocop-performance-1.4.1 => rubocop-performance-1.5.0}/lib/rubocop/cop/performance/count.rb (98%) rename Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/{rubocop-performance-1.4.1 => rubocop-performance-1.5.0}/lib/rubocop/cop/performance/detect.rb (98%) rename Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/{rubocop-performance-1.4.1 => rubocop-performance-1.5.0}/lib/rubocop/cop/performance/double_start_end_with.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/{rubocop-performance-1.4.1 => rubocop-performance-1.5.0}/lib/rubocop/cop/performance/end_with.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/{rubocop-performance-1.4.1 => rubocop-performance-1.5.0}/lib/rubocop/cop/performance/fixed_size.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/{rubocop-performance-1.4.1 => rubocop-performance-1.5.0}/lib/rubocop/cop/performance/flat_map.rb (92%) rename Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/{rubocop-performance-1.4.1 => rubocop-performance-1.5.0}/lib/rubocop/cop/performance/inefficient_hash_search.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/{rubocop-performance-1.4.1 => rubocop-performance-1.5.0}/lib/rubocop/cop/performance/open_struct.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/{rubocop-performance-1.4.1 => rubocop-performance-1.5.0}/lib/rubocop/cop/performance/range_include.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/{rubocop-performance-1.4.1 => rubocop-performance-1.5.0}/lib/rubocop/cop/performance/redundant_block_call.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/{rubocop-performance-1.4.1 => rubocop-performance-1.5.0}/lib/rubocop/cop/performance/redundant_match.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/{rubocop-performance-1.4.1 => rubocop-performance-1.5.0}/lib/rubocop/cop/performance/redundant_merge.rb (99%) rename Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/{rubocop-performance-1.4.1 => rubocop-performance-1.5.0}/lib/rubocop/cop/performance/regexp_match.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/{rubocop-performance-1.4.1 => rubocop-performance-1.5.0}/lib/rubocop/cop/performance/reverse_each.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/{rubocop-performance-1.4.1 => rubocop-performance-1.5.0}/lib/rubocop/cop/performance/size.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/{rubocop-performance-1.4.1 => rubocop-performance-1.5.0}/lib/rubocop/cop/performance/start_with.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/{rubocop-performance-1.4.1 => rubocop-performance-1.5.0}/lib/rubocop/cop/performance/string_replacement.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/{rubocop-performance-1.4.1 => rubocop-performance-1.5.0}/lib/rubocop/cop/performance/times_map.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/{rubocop-performance-1.4.1 => rubocop-performance-1.5.0}/lib/rubocop/cop/performance/unfreeze_string.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/{rubocop-performance-1.4.1 => rubocop-performance-1.5.0}/lib/rubocop/cop/performance/uri_default_parser.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/{rubocop-performance-1.4.1 => rubocop-performance-1.5.0}/lib/rubocop/cop/performance_cops.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/{rubocop-performance-1.4.1 => rubocop-performance-1.5.0}/lib/rubocop/performance.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/{rubocop-performance-1.4.1 => rubocop-performance-1.5.0}/lib/rubocop/performance/inject.rb (100%) rename Library/Homebrew/vendor/bundle/ruby/2.3.0/gems/{rubocop-performance-1.4.1 => rubocop-performance-1.5.0}/lib/rubocop/performance/version.rb (81%) diff --git a/Library/.rubocop_shared.yml b/Library/.rubocop_shared.yml index 32d122760..96f158902 100644 --- a/Library/.rubocop_shared.yml +++ b/Library/.rubocop_shared.yml @@ -45,9 +45,10 @@ Style/BarePercentLiterals: Style/CollectionMethods: Enabled: true -# Prefer simple tokens without type annotations. +# Prefer tokens with type annotations for consistency +# between formatting numbers and strings. Style/FormatStringToken: - EnforcedStyle: template + EnforcedStyle: annotated # This shouldn't be enabled until LineLength is lower. Style/IfUnlessModifier: diff --git a/Library/Homebrew/Gemfile b/Library/Homebrew/Gemfile index bf6f42025..0bf2f0da3 100644 --- a/Library/Homebrew/Gemfile +++ b/Library/Homebrew/Gemfile @@ -3,7 +3,7 @@ source "https://rubygems.org" # installed gems -gem "coveralls", require: false +gem "coveralls", "~> 0.8", require: false gem "parallel_tests" gem "ronn", require: false gem "rspec" @@ -12,7 +12,6 @@ gem "rspec-retry", require: false gem "rspec-wait", require: false gem "rubocop" gem "simplecov", require: false -gem "simplecov-cobertura", require: false # vendored gems gem "activesupport" diff --git a/Library/Homebrew/Gemfile.lock b/Library/Homebrew/Gemfile.lock index 2c28b60ee..508329274 100644 --- a/Library/Homebrew/Gemfile.lock +++ b/Library/Homebrew/Gemfile.lock @@ -66,7 +66,7 @@ GEM rspec-mocks (~> 3.8.0) rspec-core (3.8.2) rspec-support (~> 3.8.0) - rspec-expectations (3.8.4) + rspec-expectations (3.8.5) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.8.0) rspec-its (1.3.0) @@ -80,14 +80,14 @@ GEM rspec-support (3.8.3) rspec-wait (0.0.9) rspec (>= 3, < 4) - rubocop (0.74.0) + rubocop (0.75.0) jaro_winkler (~> 1.5.1) parallel (~> 1.10) parser (>= 2.6) rainbow (>= 2.2.2, < 4.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 1.7) - rubocop-performance (1.4.1) + rubocop-performance (1.5.0) rubocop (>= 0.71.0) rubocop-rspec (1.36.0) rubocop (>= 0.68.1) @@ -97,8 +97,6 @@ GEM docile (~> 1.1) json (>= 1.8, < 3) simplecov-html (~> 0.10.0) - simplecov-cobertura (1.3.1) - simplecov (~> 0.8) simplecov-html (0.10.2) term-ansicolor (1.7.1) tins (~> 1.0) @@ -120,7 +118,7 @@ DEPENDENCIES activesupport backports concurrent-ruby - coveralls + coveralls (~> 0.8) mechanize parallel_tests plist @@ -134,7 +132,6 @@ DEPENDENCIES rubocop-rspec ruby-macho simplecov - simplecov-cobertura BUNDLED WITH - 2.0.1 + 2.0.2 diff --git a/Library/Homebrew/cmd/info.rb b/Library/Homebrew/cmd/info.rb index 01e3ca541..a17980a22 100644 --- a/Library/Homebrew/cmd/info.rb +++ b/Library/Homebrew/cmd/info.rb @@ -410,6 +410,6 @@ module Homebrew end def format_percent(percent) - format "%.2f", percent + format("%.2f", percent: percent) end end diff --git a/Library/Homebrew/debrew.rb b/Library/Homebrew/debrew.rb index f3827b964..33209cffe 100644 --- a/Library/Homebrew/debrew.rb +++ b/Library/Homebrew/debrew.rb @@ -88,7 +88,7 @@ module Debrew def self.debrew @active = true - Object.send(:include, Raise) + Object.include Raise begin yield diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb index 896cd2a4a..9af74e538 100644 --- a/Library/Homebrew/dev-cmd/audit.rb +++ b/Library/Homebrew/dev-cmd/audit.rb @@ -254,7 +254,7 @@ module Homebrew wanted_mode = 0100644 & ~File.umask actual_mode = formula.path.stat.mode unless actual_mode == wanted_mode - problem format("Incorrect file permissions (%03o): chmod %03o %{path}", + problem format("Incorrect file permissions (%03o): chmod %03o %s", actual: actual_mode & 0777, wanted: wanted_mode & 0777, path: formula.path) diff --git a/Library/Homebrew/dev-cmd/bottle.rb b/Library/Homebrew/dev-cmd/bottle.rb index 534d66721..51b597ce7 100644 --- a/Library/Homebrew/dev-cmd/bottle.rb +++ b/Library/Homebrew/dev-cmd/bottle.rb @@ -530,14 +530,13 @@ module Homebrew unless args.no_commit? if ENV["HOMEBREW_GIT_NAME"] - ENV["GIT_AUTHOR_NAME"] = - ENV["GIT_COMMITTER_NAME"] = - ENV["HOMEBREW_GIT_NAME"] + ENV["GIT_AUTHOR_NAME"] = ENV["GIT_COMMITTER_NAME"] = + ENV["HOMEBREW_GIT_NAME"] end + if ENV["HOMEBREW_GIT_EMAIL"] - ENV["GIT_AUTHOR_EMAIL"] = - ENV["GIT_COMMITTER_EMAIL"] = - ENV["HOMEBREW_GIT_EMAIL"] + ENV["GIT_AUTHOR_EMAIL"] = ENV["GIT_COMMITTER_EMAIL"] = + ENV["HOMEBREW_GIT_EMAIL"] end short_name = formula_name.split("/", -1).last diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb index 3e22bd8d1..a59171592 100644 --- a/Library/Homebrew/formula.rb +++ b/Library/Homebrew/formula.rb @@ -1843,7 +1843,7 @@ class Formula @exec_count ||= 0 @exec_count += 1 - logfn = format("#{logs}/#{active_log_prefix}%02d.%{cmd_base}", + logfn = format("#{logs}/#{active_log_prefix}%02d.%s", exec_count: @exec_count, cmd_base: File.basename(cmd).split(" ").first) logs.mkpath diff --git a/Library/Homebrew/messages.rb b/Library/Homebrew/messages.rb index 664fd50d3..d0b371a2e 100644 --- a/Library/Homebrew/messages.rb +++ b/Library/Homebrew/messages.rb @@ -40,7 +40,7 @@ class Messages oh1 "Installation times" install_times.each do |t| - puts format("%-20s %10.3f s", t[:formula], t[:time]) + puts format("%-20s %