Skip to content

Commit 8e41360

Browse files
authored
Merge pull request #37 from altmetric/update-2025
Upgrade to RuboCop RSpec 3.x and latest dependencies
2 parents fd14ef9 + 0944c70 commit 8e41360

7 files changed

Lines changed: 38 additions & 11 deletions

File tree

CHANGELOG.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11
# CHANGELOG
22

3+
## CURRENT
4+
5+
## 4.0.0
6+
7+
### Changes
8+
9+
- Rename deprecated `Naming/PredicateName` cop to `Naming/PredicatePrefix`
10+
- Upgrade to rubocop-rspec 3.x which extracts FactoryBot and Capybara cops to separate gems
11+
- Update minimum dependency versions to latest stable releases:
12+
- rubocop >= 1.81 (was >= 1.31)
13+
- rubocop-performance ~> 1.26 (was ~> 1.11)
14+
- rubocop-rails ~> 2.33 (was ~> 2.12)
15+
- rubocop-rspec ~> 3.7 (was ~> 2.5)
16+
- rubocop-capybara ~> 2.22 (new explicit dependency for rubocop-rspec v3)
17+
- rubocop-factory_bot ~> 2.27 (new explicit dependency for rubocop-rspec v3)
18+
- Update to use new `plugins:` syntax for all RuboCop extensions.
19+
320
## 3.2.2
421

522
### Changes
@@ -9,7 +26,7 @@
926
## 3.2.1
1027

1128
### Changes
12-
- Remove the `RSpec/` prefix from the Capybara and FactoryBot configurations. These namespaces changes should be hidden until `rubocop-rspec` v3.0 according to https://github.com/rubocop/rubocop-rspec/blob/master/CHANGELOG.md but we are seeing warnings now so we are moving the new namespaces immediately.
29+
- Remove the `RSpec/` prefix from the Capybara and FactoryBot configurations. These namespaces changes should be hidden until `rubocop-rspec` v3.0 according to https://github.com/rubocop/rubocop-rspec/blob/master/CHANGELOG.md but we are seeing warnings now so we are moving the new namespaces immediately.
1330

1431
## 3.2.0
1532
### Changes

house_style.gemspec

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
33

44
Gem::Specification.new do |spec|
55
spec.name = 'house_style'
6-
spec.version = '3.2.2'
6+
spec.version = '4.0.0'
77
spec.authors = ['Altmetric', 'Scott Matthewman']
88
spec.email = ['engineering@altmetric.com', 'scott.matthewman@gmail.com']
99

@@ -15,10 +15,12 @@ Gem::Specification.new do |spec|
1515
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(bin|.gitignore|)/}) }
1616
spec.require_paths = ['lib']
1717

18-
spec.add_dependency 'rubocop', '>= 1.31', '< 2.0'
19-
spec.add_dependency 'rubocop-performance', '~> 1.11'
20-
spec.add_dependency 'rubocop-rails', '~> 2.12'
21-
spec.add_dependency 'rubocop-rspec', '~> 2.5'
18+
spec.add_dependency 'rubocop', '>= 1.81', '< 2.0'
19+
spec.add_dependency 'rubocop-performance', '~> 1.26'
20+
spec.add_dependency 'rubocop-rails', '~> 2.32'
21+
spec.add_dependency 'rubocop-rspec', '~> 3.7'
22+
spec.add_dependency 'rubocop-capybara', '~> 2.22'
23+
spec.add_dependency 'rubocop-factory_bot', '~> 2.27'
2224

2325
spec.add_development_dependency 'bundler', '~> 2.0'
2426
spec.add_development_dependency 'rake', '~> 13.0'
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
inherit_gem:
22
house_style: rails/rubocop.yml
33

4-
require: rubocop-rspec
4+
plugins:
5+
- rubocop-rspec
6+
- rubocop-capybara
7+
- rubocop-factory_bot

performance/rubocop.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
require: rubocop-performance
1+
plugins:
2+
- rubocop-performance
23

34
Performance:
45
Exclude:

rails/rubocop.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
require: rubocop-rails
1+
plugins:
2+
- rubocop-rails
23

34
inherit_from:
45
- ../ruby/rubocop.yml

rspec/rubocop.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
inherit_from: ../ruby/rubocop.yml
22

3-
require: rubocop-rspec
3+
plugins:
4+
- rubocop-rspec
5+
- rubocop-capybara
6+
- rubocop-factory_bot
47

58
Layout/LineLength:
69
Enabled: false

ruby/rubocop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ Naming/MethodName:
416416
Enabled: true
417417
Naming/MethodParameterName:
418418
Enabled: true
419-
Naming/PredicateName:
419+
Naming/PredicatePrefix:
420420
Enabled: true
421421
Naming/VariableName:
422422
Enabled: true

0 commit comments

Comments
 (0)