Subject: [bug#62196] [PATCH 024/223] gnu: Add ruby-rubocop-capybara.

From: Maxim Cournoyer <[email-masked]>
Date: Mon, 20 Mar 2023 13:13:16 -0400

* gnu/packages/ruby.scm (ruby-rubocop-capybara): New variable.
---
 gnu/packages/ruby.scm | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index e7cb2900a1..44ac7fb538 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -1557,6 +1557,31 @@ (define ruby-rubocop-capybara-minimal
     (home-page "https://github.com/rubocop/rubocop-capybara")
     (license license:expat)))
 
+(define-public ruby-rubocop-capybara
+  (package
+    (inherit ruby-rubocop-capybara-minimal)
+    (arguments
+     (list #:tests? #t
+           #:test-target "spec"
+           #:phases #~(modify-phases %standard-phases
+                        (add-after 'unpack 'relax-requirements
+                          (lambda _
+                            (substitute* "Gemfile"
+                              (("gem 'rubocop-rspec', '~> 2.16.0'")
+                               "gem 'rubocop-rspec', '>= 2.16.0'")))))))
+    (native-inputs
+     (list ruby-bump
+           ruby-rack
+           ruby-rake
+           ruby-rspec
+           ruby-rubocop
+           ruby-rubocop-performance-minimal
+           ruby-rubocop-rake-minimal
+           ruby-rubocop-rspec-minimal
+           ruby-simplecov
+           ruby-yard))))
+
+;;; A minimal variant used to build ruby-rubocop itself.
 (define ruby-rubocop-rake-minimal
   (package
     (name "ruby-rubocop-rake")
-- 
2.39.1