Skip to content

Commit

Permalink
Merge pull request #123 from gocardless/rspec-rubocop-3.0-update-changes
Browse files Browse the repository at this point in the history
Update for rubocop-rspec 3.0.0 >=
  • Loading branch information
melksnitis authored Jun 13, 2024
2 parents 0f25b67 + 2474ac0 commit e312ff7
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 17 deletions.
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
Changelog
=========

5.0.0
-----
* Adjustment for supporting rubocop-rspec 3.0.0 >=
* Bringing out out capybara cop in its own file.
* This require 'rubocop-capybara' gem to be added to support the cop rules.

Example:
```yaml
inherit_gem:
gc_ruboconfig:
- rubocop.yml
- rails.yml
- capybara.yml
```
4.5.0
-----
* Drop support for Ruby 2.7
Expand Down
16 changes: 16 additions & 0 deletions capybara.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
require:
- rubocop-capybara

# new in 2.13
Capybara/SpecificFinders:
Enabled: true

# new in 2.12
Capybara/SpecificMatcher:
Enabled: true

Capybara/NegationMatcher: # new in 2.14
Enabled: true

Capybara/SpecificActions: # new in 2.14
Enabled: false
8 changes: 5 additions & 3 deletions gc_ruboconfig.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,18 @@

Gem::Specification.new do |spec|
spec.name = 'gc_ruboconfig'
spec.version = '4.5.0'
spec.version = '5.0.0'
spec.summary = "GoCardless's shared Rubocop configuration, conforming to our house style"
spec.authors = %w[GoCardless]
spec.homepage = 'https://github.com/gocardless/ruboconfig'
spec.email = %w[[email protected]]
spec.license = 'MIT'

spec.files = ['rubocop.yml', 'rails.yml']
spec.files = ['rubocop.yml', 'rails.yml', 'capybara.yml']
spec.add_dependency 'rubocop', '>= 1.63'
spec.add_dependency 'rubocop-factory_bot', '>= 2.26.1'
spec.add_dependency 'rubocop-performance', '>= 1.21'
spec.add_dependency 'rubocop-rails', '>= 2.25.0'
spec.add_dependency 'rubocop-rspec', '>= 2.29.2'
spec.add_dependency 'rubocop-rspec', '>= 3.0.1'
spec.add_dependency 'rubocop-rspec_rails', '>= 2.30.0'
end
1 change: 1 addition & 0 deletions rails.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
require:
- rubocop-rails
- rubocop-rspec_rails

Rails/AddColumnIndex:
Enabled: false
Expand Down
15 changes: 1 addition & 14 deletions rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
require:
- rubocop-rspec
- rubocop-performance
- rubocop-factory_bot

AllCops:
DisplayCopNames: true
Expand Down Expand Up @@ -642,14 +643,6 @@ RSpec/ClassCheck:
RSpec/NoExpectationExample:
Enabled: false

# new in 2.13
Capybara/SpecificFinders:
Enabled: true

# new in 2.12
Capybara/SpecificMatcher:
Enabled: true

Lint/DuplicateMagicComment: # new in 1.37
Enabled: true

Expand All @@ -662,12 +655,6 @@ Style/RedundantStringEscape: # new in 1.37
RSpec/SortMetadata: # new in 2.14
Enabled: true

Capybara/NegationMatcher: # new in 2.14
Enabled: true

Capybara/SpecificActions: # new in 2.14
Enabled: false

# Seems to be buggy, causes an infinite loop for `subjects` named `create`
FactoryBot/ConsistentParenthesesStyle: # new in 2.14
Enabled: false
Expand Down

0 comments on commit e312ff7

Please sign in to comment.