me
/
guix
Archived
1
0
Fork 0

gnu: ruby-activerecord: Update to 7.0.4.3 and enable tests.

* gnu/packages/rails.scm (ruby-activerecord): Update to 7.0.4.3.
[source]: Use ruby-rails-monorepo.
[arguments]: Remove #:tests? argument.  Add #:phases argument.
[native-inputs]: New field.
[propagated-inputs]: Remove ruby-arel.  Add ruby-sqlite3.
master
Maxim Cournoyer 2023-03-08 00:09:21 -05:00
parent 7c461b2ee9
commit 39f41cf93a
No known key found for this signature in database
GPG Key ID: 1260E46482E63562
1 changed files with 35 additions and 20 deletions

View File

@ -288,20 +288,35 @@ serialization, internationalization, and testing.")
(define-public ruby-activerecord (define-public ruby-activerecord
(package (package
(name "ruby-activerecord") (name "ruby-activerecord")
(version "6.1.3") (version %ruby-rails-version)
(source (source ruby-rails-monorepo)
(origin
(method url-fetch)
(uri (rubygems-uri "activerecord" version))
(sha256
(base32
"03kr6vslwd9iw89jidjpjlp7prr2rf7kpsfa4fz03g9by0kliivs"))))
(build-system ruby-build-system) (build-system ruby-build-system)
(arguments (arguments
'(;; No included tests (list
#:tests? #f)) #:phases
(propagated-inputs #~(modify-phases %standard-phases
(list ruby-activemodel ruby-activesupport ruby-arel)) (add-after 'extract-gemspec 'chdir
(lambda _
(chdir "activerecord")))
(delete 'check)
(add-after 'install 'check
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
;; Avoid running the database tests, which require railties
;; and/or database servers.
(invoke "ruby" "-Itest" "test/cases/base_test.rb"))))
(add-before 'check 'set-GEM_PATH
(lambda _
(setenv "GEM_PATH" (string-append
(getenv "GEM_PATH") ":"
#$output "/lib/ruby/vendor_ruby"))))
(add-before 'check 'check-setup
(lambda* (#:key native-inputs inputs #:allow-other-keys)
;; A few tests require to set the timezone.
(setenv "TZDIR" (search-input-directory (or native-inputs inputs)
"share/zoneinfo")))))))
(native-inputs (list tzdata-for-tests))
(propagated-inputs (list ruby-activemodel ruby-activesupport ruby-sqlite3))
(synopsis "Ruby library to connect to relational databases") (synopsis "Ruby library to connect to relational databases")
(description (description
"Active Record connects classes to relational database table to establish "Active Record connects classes to relational database table to establish