GNU bug report logs -
#74201
[PATCH] gnu: ruby-ethon: Enable tests.
Previous Next
Reported by: gemmaro <gemmaro.dev <at> gmail.com>
Date: Mon, 4 Nov 2024 07:16:02 UTC
Severity: normal
Tags: patch
Done: gemmaro <gemmaro.dev <at> gmail.com>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 74201 in the body.
You can then email your comments to 74201 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix <at> cbaines.net, guix-patches <at> gnu.org:
bug#74201; Package
guix-patches.
(Mon, 04 Nov 2024 07:16:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
gemmaro <gemmaro.dev <at> gmail.com>:
New bug report received and forwarded. Copy sent to
guix <at> cbaines.net, guix-patches <at> gnu.org.
(Mon, 04 Nov 2024 07:16:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/ruby.scm (ruby-ethon): Enable tests.
[source]: Switch to use the Git repository, which includes test files.
[arguments]<#:tests?>: Remove it to enable tests by default.
<#:phases>: Add a phase to relax the mime-types gem version constraint.
Add a phase to remove Bundler setup, and replace the check phase to directly
run RSpec, in order to avoid perf dependencies.
Because of this, #:test-target is not needed to be "spec".
[native-inputs]: Add test dependencies.
Change-Id: Ie46d682ccb5e9b5048a109cd8587e2178c34f8ec
---
gnu/packages/ruby.scm | 32 +++++++++++++++++++++++++++-----
1 file changed, 27 insertions(+), 5 deletions(-)
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 12c439b3a9..3f0d32e8b5 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -3082,22 +3082,44 @@ (define-public ruby-ethon
(version "0.12.0")
(source
(origin
- (method url-fetch)
- (uri (rubygems-uri "ethon" version))
+ (method git-fetch) ;for tests
+ (uri (git-reference
+ (url "https://github.com/typhoeus/ethon")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
(sha256
(base32
- "0gggrgkcq839mamx7a8jbnp2h7x2ykfn34ixwskwb0lzx2ak17g9"))))
+ "0f29h4slja66kkc675rk4nnsxzhlgb143whx4ffx250w36ih0aq3"))))
(build-system ruby-build-system)
(arguments
(list
- #:tests? #f ; no included tests
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'libcurl-use-absolute-reference
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "lib/ethon/curls/settings.rb"
(("libcurl', 'libcurl\\.so\\.4")
- (search-input-file inputs "/lib/libcurl.so"))))))))
+ (search-input-file inputs "/lib/libcurl.so")))))
+ (add-after 'extract-gemspec 'remove-MIME-types-version-constraint
+ (lambda _
+ (substitute* "Gemfile"
+ (("(gem \"mime-types\").*" _ gem)
+ gem))))
+
+ ;; Tell Bundler not to request perf dependencies
+ (add-after 'extract-gemspec 'remove-Bundler-setup
+ (lambda _
+ (substitute* "spec/spec_helper.rb"
+ (("Bundler.setup")
+ ""))))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (for-each (lambda (file)
+ (invoke "ruby" "-Ispec" file))
+ (find-files "spec" "_spec\\.rb$"))))))))
+ (native-inputs (list ruby-rspec ruby-sinatra ruby-mustermann
+ ruby-mime-types ruby-webrick))
(inputs
(list curl))
(propagated-inputs
base-commit: 547d97180471e90e404a948015f65431961aa273
--
2.46.0
Reply sent
to
gemmaro <gemmaro.dev <at> gmail.com>:
You have taken responsibility.
(Mon, 22 Sep 2025 23:03:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
gemmaro <gemmaro.dev <at> gmail.com>:
bug acknowledged by developer.
(Mon, 22 Sep 2025 23:03:01 GMT)
Full text and
rfc822 format available.
Message #10 received at 74201-done <at> debbugs.gnu.org (full text, mbox):
I'm closing this with https://codeberg.org/guix/guix/pulls/2900.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org.
(Tue, 21 Oct 2025 11:24:09 GMT)
Full text and
rfc822 format available.
This bug report was last modified 29 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.