Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update for rubocop-rspec 3.0.0 >= #123

Merged
merged 4 commits into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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