diff options
author | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2023-03-09 15:22:13 -0500 |
---|---|---|
committer | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2023-03-28 22:22:35 -0400 |
commit | bb3bbb727294715b0b7c0d21b1c8e63e6d98329a (patch) | |
tree | 642ae2106c6440247dca31b6d30c5492757f4cfe /gnu/packages/rails.scm | |
parent | e7747e79c69e7c2b2e2ff9b3279b3d594c5deb68 (diff) | |
download | guix-bb3bbb727294715b0b7c0d21b1c8e63e6d98329a.tar.gz |
gnu: ruby-marcel: Enable tests.
* gnu/packages/rails.scm (ruby-marcel) [source]: Fetch from git. [arguments]: Drop #:tests?. Add #:phases. [native-inputs]: New field.
Diffstat (limited to 'gnu/packages/rails.scm')
-rw-r--r-- | gnu/packages/rails.scm | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/gnu/packages/rails.scm b/gnu/packages/rails.scm index 9638aee3ae..540c69ec2f 100644 --- a/gnu/packages/rails.scm +++ b/gnu/packages/rails.scm @@ -730,19 +730,30 @@ pattern. Including support for multipart email and attachments.") (package (name "ruby-marcel") (version "1.0.2") - (source - (origin - (method url-fetch) - (uri (rubygems-uri "marcel" version)) - (sha256 - (base32 - "0kky3yiwagsk8gfbzn3mvl2fxlh3b39v6nawzm4wpjs6xxvvc4x0")))) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/rails/marcel") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1i1x24afmn09n48fj4yz2pdm6vlfnq14gism0cgxsyqmlrvsxajn")))) (build-system ruby-build-system) (arguments - '(;; No included tests - #:tests? #f)) - (propagated-inputs - (list ruby-mimemagic)) + (list #:test-target "default" + #:phases #~(modify-phases %standard-phases + (add-before 'check 'disable-problematic-tests + (lambda _ + (substitute* "test/mime_type_test.rb" + ;; One test fails because of the newer rack + ;; version used (see: + ;; https://github.com/rails/marcel/issues/91). + (("test \"gets content type.*" all) + (string-append + all " skip('fails on guix')\n")))))))) + (native-inputs (list ruby-byebug ruby-nokogiri ruby-rack)) + (propagated-inputs (list ruby-mimemagic)) (synopsis "MIME type detection using magic numbers, filenames and extensions") (description "@code{marcel} provides @acronym{MIME, Multipurpose Internet Mail |