Subject: [bug#76314] [PATCH ruby-team 66/71] gnu: ruby-dotenv: Update to 3.1.7.

From: Nicolas Graves <[email-masked]>
Date: Sun, 16 Feb 2025 01:34:34 +0100

* gnu/packages/ruby.scm (ruby-dotenv): Update to 3.1.7.
[arguments]<#:phases>: Update phases 'do-not-build-dotenv-rails and
'replace-git-ls-files.
---
 gnu/packages/ruby.scm | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index dfe5693800..966802dacb 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -11891,7 +11891,7 @@ Suffix List.")
 (define-public ruby-dotenv
   (package
     (name "ruby-dotenv")
-    (version "2.8.1")
+    (version "3.1.7")
     (source (origin
               (method git-fetch)        ;for the tests
               (uri (git-reference
@@ -11900,7 +11900,7 @@ Suffix List.")
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "0s1a71jxppa20fsm2rd1vym099ib48m039rmhggmz99hc3z1fvvr"))))
+                "19j0acy12si537hwi4q54q8n5ycmlvfd2ik5y6r7jir6ww06l8yx"))))
     (build-system ruby-build-system)
     (arguments
      (list
@@ -11915,6 +11915,10 @@ Suffix List.")
               ;; tasks.
               (delete-file "dotenv-rails.gemspec")
               (delete-file "spec/dotenv/rails_spec.rb")
+              (delete-file "spec/dotenv/log_subscriber_spec.rb")
+              (substitute* "spec/spec_helper.rb"
+                (("require \"dotenv\"" all)
+                 (string-append "require \"pathname\"\n" all)))
               (substitute* "Rakefile"
                 (("DotenvRailsGemHelper.install_tasks name: \"dotenv-rails\"")
                  "")
@@ -11923,9 +11927,10 @@ Suffix List.")
           (replace 'replace-git-ls-files
             (lambda _
               (substitute* "dotenv.gemspec"
-                (("`git ls-files README.md LICENSE lib bin \\| grep -v rails`")
-                 "`find README.md LICENSE lib bin -type f | sort | \
-grep -v rails`")))))))
+                (("`git ls-files (README.md LICENSE lib bin) \\| ([^`]*`)"
+                  all files command)
+                 (string-append
+                  "`find " files " -type f | sort | " command))))))))
     (native-inputs (list ruby-standard ruby-rspec))
     (synopsis "Ruby library for setting environment variables")
     (description "Dotenv is a Ruby library for setting environment variables
-- 
2.48.1