From a494338afe35bc3f891a8abda30900c6842c09b4 Mon Sep 17 00:00:00 2001 From: Roland Schwarzer Date: Wed, 6 May 2026 14:23:24 +0200 Subject: [PATCH 1/2] Update rubocop-capybara dependency to >= 2.23 add new cops: * Capybara/RSpec/CurrentPathExpectation * Capybara/RSpec/HaveContent * Capybara/RSpec/VisibilityMatcher migrate cops: * Capybara/NegationMatcher to Capybara/RSpec/NegationMatcher * Capybara/NegationMatcherAfterVisit to Capybara/RSpec/NegationMatcherAfterVisit * Capybara/SpecificMatcher to Capybara/RSpec/SpecificMatcher * Capybara/MatchStyle to Capybara/AssertStyle and Capybara/RSpec/MatchStyle --- Gemfile.lock | 6 +++--- config.yml | 1 + cops/capybara.yml | 21 +++------------------ cops/capybara/rspec.yml | 26 ++++++++++++++++++++++++++ webit-ruby-rubocop.gemspec | 2 +- 5 files changed, 34 insertions(+), 22 deletions(-) create mode 100644 cops/capybara/rspec.yml diff --git a/Gemfile.lock b/Gemfile.lock index 61befa4..8fbab3b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -3,7 +3,7 @@ PATH specs: webit-ruby-rubocop (3.1.16) rubocop (>= 1.84.0) - rubocop-capybara (>= 2.22.0) + rubocop-capybara (>= 2.23.0) rubocop-minitest (>= 0.35.0) rubocop-rake (>= 0.5.1) @@ -38,9 +38,9 @@ GEM rubocop-ast (1.49.0) parser (>= 3.3.7.2) prism (~> 1.7) - rubocop-capybara (2.22.1) + rubocop-capybara (2.23.0) lint_roller (~> 1.1) - rubocop (~> 1.72, >= 1.72.1) + rubocop (~> 1.81) rubocop-minitest (0.38.2) lint_roller (~> 1.1) rubocop (>= 1.75.0, < 2.0) diff --git a/config.yml b/config.yml index a7cd28e..81daf40 100644 --- a/config.yml +++ b/config.yml @@ -1,5 +1,6 @@ inherit_from: - ./cops/capybara.yml + - ./cops/capybara/rspec.yml - ./cops/gemspec.yml - ./cops/layout.yml - ./cops/lint.yml diff --git a/cops/capybara.yml b/cops/capybara.yml index a6f8a38..0a40a9d 100644 --- a/cops/capybara.yml +++ b/cops/capybara.yml @@ -1,32 +1,17 @@ -Capybara/ClickLinkOrButtonStyle: - Enabled: true - -Capybara/FindAllFirst: +Capybara/AssertStyle: Enabled: true -Capybara/MatchStyle: - Enabled: true - -Capybara/NegationMatcher: +Capybara/ClickLinkOrButtonStyle: Enabled: true -Capybara/NegationMatcherAfterVisit: +Capybara/FindAllFirst: Enabled: true Capybara/RedundantWithinFind: Enabled: true -Capybara/RSpec/HaveSelector: - Enabled: true - -Capybara/RSpec/PredicateMatcher: - Enabled: true - Capybara/SpecificActions: Enabled: true Capybara/SpecificFinders: Enabled: true - -Capybara/SpecificMatcher: - Enabled: true diff --git a/cops/capybara/rspec.yml b/cops/capybara/rspec.yml new file mode 100644 index 0000000..d8d157f --- /dev/null +++ b/cops/capybara/rspec.yml @@ -0,0 +1,26 @@ +Capybara/RSpec/CurrentPathExpectation: + Enabled: true + +Capybara/RSpec/HaveContent: + Enabled: true + +Capybara/RSpec/HaveSelector: + Enabled: true + +Capybara/RSpec/MatchStyle: + Enabled: true + +Capybara/RSpec/NegationMatcher: + Enabled: true + +Capybara/RSpec/NegationMatcherAfterVisit: + Enabled: true + +Capybara/RSpec/PredicateMatcher: + Enabled: true + +Capybara/RSpec/SpecificMatcher: + Enabled: true + +Capybara/RSpec/VisibilityMatcher: + Enabled: true diff --git a/webit-ruby-rubocop.gemspec b/webit-ruby-rubocop.gemspec index d05c3ad..a04e025 100644 --- a/webit-ruby-rubocop.gemspec +++ b/webit-ruby-rubocop.gemspec @@ -16,7 +16,7 @@ Gem::Specification.new do |spec| spec.required_ruby_version = Gem::Requirement.new(">= 2.6.0") spec.add_dependency "rubocop", ">= 1.84.0" - spec.add_dependency "rubocop-capybara", ">= 2.22.0" + spec.add_dependency "rubocop-capybara", ">= 2.23.0" spec.add_dependency "rubocop-minitest", ">= 0.35.0" spec.add_dependency "rubocop-rake", ">= 0.5.1" end From 8106dc73e27ff098e5b0272ec2aec0c941a3d8df Mon Sep 17 00:00:00 2001 From: Roland Schwarzer Date: Wed, 6 May 2026 14:30:26 +0200 Subject: [PATCH 2/2] release 3.1.17 --- Gemfile.lock | 2 +- webit-ruby-rubocop.gemspec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 8fbab3b..04cbc0f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - webit-ruby-rubocop (3.1.16) + webit-ruby-rubocop (3.1.17) rubocop (>= 1.84.0) rubocop-capybara (>= 2.23.0) rubocop-minitest (>= 0.35.0) diff --git a/webit-ruby-rubocop.gemspec b/webit-ruby-rubocop.gemspec index a04e025..8cd3de2 100644 --- a/webit-ruby-rubocop.gemspec +++ b/webit-ruby-rubocop.gemspec @@ -2,7 +2,7 @@ Gem::Specification.new do |spec| spec.name = "webit-ruby-rubocop" - spec.version = "3.1.16" + spec.version = "3.1.17" spec.authors = ["Roland Schwarzer", "Martin Schrader"] spec.email = ["schwarzer@webit.de"]