summary refs log tree commit diff
path: root/gnu/packages/rails.scm
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2023-03-07 23:42:13 -0500
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2023-03-28 22:22:17 -0400
commit7c461b2ee9ddecf53944de6623fb1458b08e1c7f (patch)
treeac85c40c2fea29bd32cfeabbe11ea2270d222f97 /gnu/packages/rails.scm
parent10411b3549ba530a165ebffff4053f64824f4b5d (diff)
downloadguix-7c461b2ee9ddecf53944de6623fb1458b08e1c7f.tar.gz
gnu: ruby-activemodel: Update to 7.0.4.3 and enable tests.
* gnu/packages/rails.scm (ruby-activemodel): Update to 7.0.4.3.  Fix
indentation.
[source]: Use ruby-rails-monorepo.
[arguments]: Remove #:tests? argument.  Add #:phases argument.
[native-inputs]: New field.
Diffstat (limited to 'gnu/packages/rails.scm')
-rw-r--r--gnu/packages/rails.scm42
1 files changed, 22 insertions, 20 deletions
diff --git a/gnu/packages/rails.scm b/gnu/packages/rails.scm
index 9fa0f23ad8..329bacdaef 100644
--- a/gnu/packages/rails.scm
+++ b/gnu/packages/rails.scm
@@ -260,28 +260,30 @@ Can I Use website.")
 
 (define-public ruby-activemodel
   (package
-   (name "ruby-activemodel")
-   (version "6.1.3")
-   (source
-    (origin
-     (method url-fetch)
-     (uri (rubygems-uri "activemodel" version))
-     (sha256
-      (base32
-       "07m85r00cd1dzxg65zr9wjrdqppw51b5ka9c5mrz92vnw18kfb70"))))
-   (build-system ruby-build-system)
-   (arguments
-    '(;; No included tests
-      #:tests? #f))
-   (propagated-inputs
-    (list ruby-activesupport))
-   (synopsis "Toolkit for building modeling frameworks like Active Record")
-   (description
-    "This package provides a toolkit for building modeling frameworks like
+    (name "ruby-activemodel")
+    (version %ruby-rails-version)
+    (source ruby-rails-monorepo)
+    (build-system ruby-build-system)
+    (arguments
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'extract-gemspec 'chdir
+            (lambda _
+              (chdir "activemodel")))
+          (add-after 'chdir 'delete-problematic-tests
+            (lambda _
+              ;; We do not want to depend on ruby-railties at this stage.
+              (delete-file "test/cases/railtie_test.rb"))))))
+    (native-inputs (list ruby-bcrypt))
+    (propagated-inputs (list ruby-activesupport))
+    (synopsis "Toolkit for building modeling frameworks like Active Record")
+    (description
+     "This package provides a toolkit for building modeling frameworks like
 Active Record.  ActiveSupport handles attributes, callbacks, validations,
 serialization, internationalization, and testing.")
-   (home-page "https://rubyonrails.org/")
-   (license license:expat)))
+    (home-page "https://rubyonrails.org/")
+    (license license:expat)))
 
 (define-public ruby-activerecord
   (package