Skip to content

Commit

Permalink
Restrict Rubocop version upgrades (#96)
Browse files Browse the repository at this point in the history
* Restrict Rubocop version upgrades

There's a bug causing the following failure with rubocop 1.45.x:

```
      NoMethodError:
        private method `begin_investigation' called for #<RuboCop::Cop::Cobra::ControllerFilePlacement:0x000055c55d2f9360>
```

See:

* powerhome/example-rails-app#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
  • Loading branch information
benlangfeld authored Feb 8, 2023
1 parent 4b96914 commit 47d0b4b
Show file tree
Hide file tree
Showing 13 changed files with 42 additions and 21 deletions.
2 changes: 1 addition & 1 deletion packages/audit_tracker/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 2 additions & 0 deletions packages/consent/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ gemspec
rails_version = ENV.fetch("RAILS_VERSION", ">= 5")

gem "rails", rails_version

gem "rubocop-powerhome", path: "../rubocop-powerhome"
2 changes: 2 additions & 0 deletions packages/cygnet/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
source "https://rubygems.org"

gemspec

gem "rubocop-powerhome", path: "../rubocop-powerhome"
18 changes: 11 additions & 7 deletions packages/cygnet/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions packages/edgestitch/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ gemspec
rails_version = ENV.fetch("RAILS_VERSION", ">= 6.0.6")

gem "rails", rails_version

gem "rubocop-powerhome", path: "../rubocop-powerhome"
2 changes: 2 additions & 0 deletions packages/lumberaxe/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 1 addition & 1 deletion packages/nitro_config/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 2 additions & 0 deletions packages/rabbet/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
source "https://rubygems.org"

gemspec

gem "rubocop-powerhome", path: "../rubocop-powerhome"
18 changes: 11 additions & 7 deletions packages/rabbet/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions packages/rubocop-cobra/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -12,7 +12,7 @@ PATH
remote: .
specs:
rubocop-cobra (0.4.0)
rubocop
rubocop (< 1.45.0)
rubocop-powerhome

GEM
Expand Down
2 changes: 1 addition & 1 deletion packages/rubocop-cobra/rubocop-cobra.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion packages/rubocop-powerhome/rubocop-powerhome.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
5 changes: 4 additions & 1 deletion renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@
{
"matchDepTypes": ["devDependencies"],
"automerge": true
},
{
"matchPackageNames": ["rubocop"],
"allowedVersions": "< 1.45.0"
}
]
}

0 comments on commit 47d0b4b

Please sign in to comment.