summary refs log tree commit diff
path: root/gnu/packages/ruby.scm
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2023-03-15 13:13:17 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2023-03-28 22:22:42 -0400
commit513718fbd2128c2d1a63fb1d28a011598c64b740 (patch)
treee7721750f9d1e7cc58ebd0018403e2a9476e499f /gnu/packages/ruby.scm
parent9b0c794d2cd2969a0949fde6cc1011c44d54a79f (diff)
downloadguix-513718fbd2128c2d1a63fb1d28a011598c64b740.tar.gz
gnu: ruby-temple: Update to 0.10.0.
* gnu/packages/ruby.scm (ruby-temple): Update to 0.10.0.
[source]: Fetch via git.
[arguments]: New field.
[native-inputs]: Replace ruby-erubis with ruby-erubi. Add ruby-rspec.
Diffstat (limited to 'gnu/packages/ruby.scm')
-rw-r--r--gnu/packages/ruby.scm43
1 files changed, 30 insertions, 13 deletions
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index d3c9ab9c7e..510df2a4c5 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -4233,21 +4233,38 @@ localization.")
 (define-public ruby-temple
   (package
     (name "ruby-temple")
-    (version "0.8.2")
-    (source
-     (origin
-       (method url-fetch)
-       (uri (rubygems-uri "temple" version))
-       (sha256
-        (base32
-         "060zzj7c2kicdfk6cpnn40n9yjnhfrr13d0rsbdhdij68chp2861"))))
+    (version "0.10.0")
+    (source (origin
+              (method git-fetch)        ;for tests
+              (uri (git-reference
+                    (url "https://github.com/judofyr/temple")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0rr9fnlcgj9nm3b6hzzjsvcw8x3y7z48j7slk7xxff2mh8s7y3y0"))))
     (build-system ruby-build-system)
-    (native-inputs
-     (list ruby-tilt ruby-bacon ruby-erubis))
+    (arguments
+     (list #:phases
+           #~(modify-phases %standard-phases
+               (add-after 'replace-git-ls-files 'replace-more-git-ls-files
+                 (lambda _
+                   (substitute* "temple.gemspec"
+                     ;; There no longer are test, spec or features
+                     ;; directories.
+                     ((".*`git ls-files -- \\{test,spec,features}/\\*`.*")
+                      "")
+                     ;; There isn't any bin directory either.
+                     ((".*`git ls-files -- bin/\\*`.*")
+                      ""))))
+               (replace 'check
+                 (lambda* (#:key tests? #:allow-other-keys)
+                   (when tests?
+                     (invoke "rspec")))))))
+    (native-inputs (list ruby-bacon ruby-erubi ruby-rspec ruby-tilt))
     (synopsis "Template compilation framework in Ruby")
-    (description
-     "Temple is an abstraction and framework for compiling templates to pure
-Ruby.")
+    (description "Temple is an abstraction and framework for compiling
+templates to pure Ruby.")
     (home-page "https://github.com/judofyr/temple")
     (license license:expat)))