diff --git a/CHANGELOG.md b/CHANGELOG.md index 5238b7f..a73baeb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/capybara.yml b/capybara.yml new file mode 100644 index 0000000..388ad08 --- /dev/null +++ b/capybara.yml @@ -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 diff --git a/gc_ruboconfig.gemspec b/gc_ruboconfig.gemspec index f2f0ca3..f51f49d 100644 --- a/gc_ruboconfig.gemspec +++ b/gc_ruboconfig.gemspec @@ -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[developers@gocardless.com] 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 diff --git a/rails.yml b/rails.yml index d6d4f5d..4d75e69 100644 --- a/rails.yml +++ b/rails.yml @@ -1,5 +1,6 @@ require: - rubocop-rails + - rubocop-rspec_rails Rails/AddColumnIndex: Enabled: false diff --git a/rubocop.yml b/rubocop.yml index 80f0780..537fd5e 100644 --- a/rubocop.yml +++ b/rubocop.yml @@ -1,6 +1,7 @@ require: - rubocop-rspec - rubocop-performance + - rubocop-factory_bot AllCops: DisplayCopNames: true @@ -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 @@ -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