From 47d0b4bdd76945cd2ec9bb45b98c014c6a33a360 Mon Sep 17 00:00:00 2001 From: Ben Langfeld Date: Wed, 8 Feb 2023 15:07:37 -0300 Subject: [PATCH] Restrict Rubocop version upgrades (#96) * Restrict Rubocop version upgrades There's a bug causing the following failure with rubocop 1.45.x: ``` NoMethodError: private method `begin_investigation' called for # ``` See: * https://github.com/powerhome/example-rails-app/pull/138 * https://github.com/powerhome/power-tools/actions/runs/4125800521/jobs/7126844324 * rubocop-powerhome also affected * Pin rubocop-powerhome to local version This allows us to do integration tests between these packages. * Update lockfile --- packages/audit_tracker/Gemfile | 2 +- packages/consent/Gemfile | 2 ++ packages/cygnet/Gemfile | 2 ++ packages/cygnet/Gemfile.lock | 18 +++++++++++------- packages/edgestitch/Gemfile | 2 ++ packages/lumberaxe/Gemfile | 2 ++ packages/nitro_config/Gemfile | 2 +- packages/rabbet/Gemfile | 2 ++ packages/rabbet/Gemfile.lock | 18 +++++++++++------- packages/rubocop-cobra/Gemfile.lock | 4 ++-- packages/rubocop-cobra/rubocop-cobra.gemspec | 2 +- .../rubocop-powerhome.gemspec | 2 +- renovate.json | 5 ++++- 13 files changed, 42 insertions(+), 21 deletions(-) diff --git a/packages/audit_tracker/Gemfile b/packages/audit_tracker/Gemfile index 8d86c1f8..8c5eb71a 100644 --- a/packages/audit_tracker/Gemfile +++ b/packages/audit_tracker/Gemfile @@ -13,4 +13,4 @@ gem "license_finder", ">= 7.0" gem "rake", ">= 13.0" gem "rspec", ">= 3.0" gem "rubocop", ">= 1.32" -gem "rubocop-powerhome", ">= 0.5.0" +gem "rubocop-powerhome", path: "../rubocop-powerhome" diff --git a/packages/consent/Gemfile b/packages/consent/Gemfile index 1c59a627..261062fd 100644 --- a/packages/consent/Gemfile +++ b/packages/consent/Gemfile @@ -8,3 +8,5 @@ gemspec rails_version = ENV.fetch("RAILS_VERSION", ">= 5") gem "rails", rails_version + +gem "rubocop-powerhome", path: "../rubocop-powerhome" diff --git a/packages/cygnet/Gemfile b/packages/cygnet/Gemfile index be173b20..b24b97bb 100644 --- a/packages/cygnet/Gemfile +++ b/packages/cygnet/Gemfile @@ -3,3 +3,5 @@ source "https://rubygems.org" gemspec + +gem "rubocop-powerhome", path: "../rubocop-powerhome" diff --git a/packages/cygnet/Gemfile.lock b/packages/cygnet/Gemfile.lock index c379bbb2..bf4e370d 100644 --- a/packages/cygnet/Gemfile.lock +++ b/packages/cygnet/Gemfile.lock @@ -1,3 +1,13 @@ +PATH + remote: ../rubocop-powerhome + specs: + rubocop-powerhome (0.5.0) + rubocop (< 1.45.0) + rubocop-performance + rubocop-rails + rubocop-rake + rubocop-rspec + PATH remote: . specs: @@ -75,12 +85,6 @@ GEM rubocop-performance (1.16.0) rubocop (>= 1.7.0, < 2.0) rubocop-ast (>= 0.4.0) - rubocop-powerhome (0.5.0) - rubocop - rubocop-performance - rubocop-rails - rubocop-rake - rubocop-rspec rubocop-rails (2.17.4) activesupport (>= 4.2.0) rack (>= 1.1) @@ -129,7 +133,7 @@ DEPENDENCIES rainbow (= 2.2.2) rake (~> 13.0) rspec (~> 3.0) - rubocop-powerhome (= 0.5.0) + rubocop-powerhome! simplecov (= 0.15.1) test-unit (= 3.1.5) yard (= 0.9.21) diff --git a/packages/edgestitch/Gemfile b/packages/edgestitch/Gemfile index 41d746ad..3726f8e7 100644 --- a/packages/edgestitch/Gemfile +++ b/packages/edgestitch/Gemfile @@ -7,3 +7,5 @@ gemspec rails_version = ENV.fetch("RAILS_VERSION", ">= 6.0.6") gem "rails", rails_version + +gem "rubocop-powerhome", path: "../rubocop-powerhome" diff --git a/packages/lumberaxe/Gemfile b/packages/lumberaxe/Gemfile index 972f6bc5..c7cfb82c 100644 --- a/packages/lumberaxe/Gemfile +++ b/packages/lumberaxe/Gemfile @@ -11,3 +11,5 @@ gemspec rails_version = ENV.fetch("RAILS_VERSION", ">= 5.2.8.1") gem "rails", rails_version + +gem "rubocop-powerhome", path: "../rubocop-powerhome" diff --git a/packages/nitro_config/Gemfile b/packages/nitro_config/Gemfile index 8d86c1f8..8c5eb71a 100644 --- a/packages/nitro_config/Gemfile +++ b/packages/nitro_config/Gemfile @@ -13,4 +13,4 @@ gem "license_finder", ">= 7.0" gem "rake", ">= 13.0" gem "rspec", ">= 3.0" gem "rubocop", ">= 1.32" -gem "rubocop-powerhome", ">= 0.5.0" +gem "rubocop-powerhome", path: "../rubocop-powerhome" diff --git a/packages/rabbet/Gemfile b/packages/rabbet/Gemfile index be173b20..b24b97bb 100644 --- a/packages/rabbet/Gemfile +++ b/packages/rabbet/Gemfile @@ -3,3 +3,5 @@ source "https://rubygems.org" gemspec + +gem "rubocop-powerhome", path: "../rubocop-powerhome" diff --git a/packages/rabbet/Gemfile.lock b/packages/rabbet/Gemfile.lock index 686a6cdf..736da60b 100644 --- a/packages/rabbet/Gemfile.lock +++ b/packages/rabbet/Gemfile.lock @@ -1,3 +1,13 @@ +PATH + remote: ../rubocop-powerhome + specs: + rubocop-powerhome (0.5.0) + rubocop (< 1.45.0) + rubocop-performance + rubocop-rails + rubocop-rake + rubocop-rspec + PATH remote: . specs: @@ -205,12 +215,6 @@ GEM rubocop-performance (1.16.0) rubocop (>= 1.7.0, < 2.0) rubocop-ast (>= 0.4.0) - rubocop-powerhome (0.5.0) - rubocop - rubocop-performance - rubocop-rails - rubocop-rake - rubocop-rspec rubocop-rails (2.17.4) activesupport (>= 4.2.0) rack (>= 1.1) @@ -280,7 +284,7 @@ DEPENDENCIES rainbow (= 2.2.2) rake (~> 13.0) rspec (~> 3.0) - rubocop-powerhome (= 0.5.0) + rubocop-powerhome! simplecov (= 0.15.1) test-unit (= 3.1.5) yard (= 0.9.21) diff --git a/packages/rubocop-cobra/Gemfile.lock b/packages/rubocop-cobra/Gemfile.lock index f4a5f954..3dbe5a7a 100644 --- a/packages/rubocop-cobra/Gemfile.lock +++ b/packages/rubocop-cobra/Gemfile.lock @@ -2,7 +2,7 @@ PATH remote: ../rubocop-powerhome specs: rubocop-powerhome (0.5.0) - rubocop + rubocop (< 1.45.0) rubocop-performance rubocop-rails rubocop-rake @@ -12,7 +12,7 @@ PATH remote: . specs: rubocop-cobra (0.4.0) - rubocop + rubocop (< 1.45.0) rubocop-powerhome GEM diff --git a/packages/rubocop-cobra/rubocop-cobra.gemspec b/packages/rubocop-cobra/rubocop-cobra.gemspec index 84667195..be3b4a6a 100644 --- a/packages/rubocop-cobra/rubocop-cobra.gemspec +++ b/packages/rubocop-cobra/rubocop-cobra.gemspec @@ -35,7 +35,7 @@ Gem::Specification.new do |spec| # For more information and examples about making a new gem, check out our # guide at: https://bundler.io/guides/creating_gem.html - spec.add_runtime_dependency "rubocop" + spec.add_runtime_dependency "rubocop", "< 1.45.0" spec.add_runtime_dependency "rubocop-powerhome" spec.metadata["rubygems_mfa_required"] = "true" diff --git a/packages/rubocop-powerhome/rubocop-powerhome.gemspec b/packages/rubocop-powerhome/rubocop-powerhome.gemspec index a3a82e12..48a994d4 100644 --- a/packages/rubocop-powerhome/rubocop-powerhome.gemspec +++ b/packages/rubocop-powerhome/rubocop-powerhome.gemspec @@ -35,7 +35,7 @@ Gem::Specification.new do |spec| # For more information and examples about making a new gem, check out our # guide at: https://bundler.io/guides/creating_gem.html - spec.add_runtime_dependency "rubocop" + spec.add_runtime_dependency "rubocop", "< 1.45.0" spec.add_runtime_dependency "rubocop-performance" spec.add_runtime_dependency "rubocop-rails" spec.add_runtime_dependency "rubocop-rake" diff --git a/renovate.json b/renovate.json index 413e18ef..62392e3d 100644 --- a/renovate.json +++ b/renovate.json @@ -14,7 +14,10 @@ { "matchDepTypes": ["devDependencies"], "automerge": true + }, + { + "matchPackageNames": ["rubocop"], + "allowedVersions": "< 1.45.0" } ] } -