GNU bug report logs - #62196
[PATCH 000/182] Add FPM, update Rails and other Ruby additions/updates

Previous Next

Package: guix-patches;

Reported by: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Date: Wed, 15 Mar 2023 03:01:02 UTC

Severity: normal

Tags: patch

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: 62196 <at> debbugs.gnu.org
Cc: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
Subject: [bug#62196] [PATCH 171/223] gnu: Add ruby-dotenv-rails.
Date: Mon, 20 Mar 2023 13:22:57 -0400
* gnu/packages/ruby.scm (ruby-dotenv-rails): New variable.
---

 gnu/packages/ruby.scm | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 4bc2439192..6772068489 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -10460,6 +10460,42 @@ (define-public ruby-dotenv
     (home-page "https://github.com/bkeepers/dotenv")
     (license license:expat)))
 
+(define-public ruby-dotenv-rails
+  (package
+    (inherit ruby-dotenv)
+    (name "ruby-dotenv-rails")
+    (arguments
+     (substitute-keyword-arguments (package-arguments ruby-dotenv)
+       ((#:phases phases '%standard-phases)
+        #~(modify-phases #$phases
+            (delete 'do-not-build-dotenv-rails)
+            (add-after 'unpack 'delete-Gemfile
+              (lambda _
+                ;; It defines extraneous dependencies; remove it.
+                (delete-file "Gemfile")))
+            (add-after 'unpack 'remove-extraneous-gemspec
+              (lambda _
+                (delete-file "dotenv.gemspec")
+                (substitute* "Gemfile"
+                  ((".*\"dotenv\".*") ""))
+                (substitute* "Rakefile"
+                  ;; Remove the dotenv-related Rake tasks.
+                  (("Bundler::GemHelper.install_tasks name: \"dotenv\"")
+                   "")
+                  (("\"dotenv:[^\"]*\", ")
+                   ""))))
+            (replace 'replace-git-ls-files
+              (lambda _
+                (substitute* "dotenv-rails.gemspec"
+                  (("`git ls-files lib \\| grep rails`")
+                   "`find lib -type f | sort | grep rails`"))))))))
+    (native-inputs (list ruby-rspec ruby-spring ruby-standard))
+    (propagated-inputs (list ruby-dotenv ruby-railties))
+    (synopsis "Ruby library for setting environment variables in Rails project")
+    (description "Dotenv is a Ruby library for setting environment variables
+defined in a @file{.env} file.  This is the Rails variant, adapted for use
+with Ruby on Rails projects.")))
+
 (define-public ruby-http-cookie
   (package
     (name "ruby-http-cookie")
-- 
2.39.1





This bug report was last modified 2 years and 57 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.