GNU bug report logs -
#63951
[PATCH 0/2] gnu: ruby-atoulme-saikuro: Fix tests.
Previous Next
Reported by: gemmaro <gemmaro.dev <at> gmail.com>
Date: Wed, 7 Jun 2023 23:52:02 UTC
Severity: normal
Tags: patch
Done: Christopher Baines <mail <at> cbaines.net>
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 63951 in the body.
You can then email your comments to 63951 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
mail <at> cbaines.net, guix-patches <at> gnu.org
:
bug#63951
; Package
guix-patches
.
(Wed, 07 Jun 2023 23:52: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
mail <at> cbaines.net, guix-patches <at> gnu.org
.
(Wed, 07 Jun 2023 23:52:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
gemmaro (2):
gnu: Add ruby-irb <at> 1.1.1.
gnu: ruby-atoulme-saikuro: Fix tests.
gnu/packages/ruby.scm | 35 ++++++++++++++++++++++++++++++++---
1 file changed, 32 insertions(+), 3 deletions(-)
base-commit: e8f9fb3e03ea8fee0e13f13706a6b16414f74a7b
--
2.40.1
Information forwarded
to
mail <at> cbaines.net, guix-patches <at> gnu.org
:
bug#63951
; Package
guix-patches
.
(Wed, 07 Jun 2023 23:56:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 63951 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/ruby.scm (ruby-irb-1.1.1): New variable.
---
gnu/packages/ruby.scm | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index eb84367d151..c5b94ffd15d 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -561,6 +561,17 @@ (define-public ruby-irb
(home-page "https://github.com/ruby/irb")
(license license:bsd-2)))
+(define-public ruby-irb-1.1.1
+ (package
+ (inherit ruby-irb)
+ (version "1.1.1")
+ (source (origin
+ (method url-fetch)
+ (uri (rubygems-uri "irb" version))
+ (sha256
+ (base32
+ "0h605w798s2bg9wg681ynvvzgdz1yy69gh387bl0khw9ll7wkn8v"))))))
+
(define-public ruby-iruby
(package
(name "ruby-iruby")
--
2.40.1
Information forwarded
to
mail <at> cbaines.net, guix-patches <at> gnu.org
:
bug#63951
; Package
guix-patches
.
(Wed, 07 Jun 2023 23:56:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 63951 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/ruby.scm (ruby-atoulme-saikuro)
[propagated-inputs]: Add ruby-irb-1.1.1 and ruby-e2mmap.
[arguments]: Enable tests.
---
gnu/packages/ruby.scm | 24 +++++++++++++++++++++---
1 file changed, 21 insertions(+), 3 deletions(-)
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index c5b94ffd15d..37b16ae2fdc 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -1305,9 +1305,27 @@ (define-public ruby-atoulme-saikuro
(base32
"0kvd2nsxffbza61d3q4j94wrbnbv50r1zy3a7q26f6k706fw1f19"))))
(build-system ruby-build-system)
- ;; FIXME: There are no unit tests. The tests are demonstrations of the
- ;; "saikuro" tool.
- (arguments `(#:tests? #f))
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'fix-module-resolution
+ (lambda _
+ (substitute* "lib/saikuro.rb"
+ ;; irb 1.2.0 or later doesn't have RubyToken
+ (("require 'irb/ruby-lex'")
+ "require 'rubygems'\ngem 'irb', '=1.1.1'\nrequire 'irb/ruby-lex'"))))
+ (delete 'check)
+ (add-after 'install 'check
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (saikuro (string-append out "/bin/saikuro")))
+ (setenv "GEM_PATH" (string-append
+ (getenv "GEM_PATH") ":"
+ #$output "/lib/ruby/vendor_ruby"))
+ (invoke saikuro "--cyclo" "--token" "--input_directory" "tests")))))))
+ (propagated-inputs (list ruby-irb-1.1.1
+ ruby-e2mmap)) ;required by rubygems
(synopsis "Cyclomatic complexity analyzer")
(description "Saikuro is a Ruby cyclomatic complexity analyzer. When
given Ruby source code Saikuro will generate a report listing the cyclomatic
--
2.40.1
Reply sent
to
Christopher Baines <mail <at> cbaines.net>
:
You have taken responsibility.
(Mon, 26 Jun 2023 09:22:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
gemmaro <gemmaro.dev <at> gmail.com>
:
bug acknowledged by developer.
(Mon, 26 Jun 2023 09:22:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 63951-done <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
gemmaro <gemmaro.dev <at> gmail.com> writes:
> gemmaro (2):
> gnu: Add ruby-irb <at> 1.1.1.
> gnu: ruby-atoulme-saikuro: Fix tests.
>
> gnu/packages/ruby.scm | 35 ++++++++++++++++++++++++++++++++---
> 1 file changed, 32 insertions(+), 3 deletions(-)
Thanks for the patches, I've tweaked the second commit message to say
enable rather than fix for the tests, and pushed to master as
93a5378b00ce1f97b0968f9be3899475d9f3ddca.
Chris
[signature.asc (application/pgp-signature, inline)]
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 24 Jul 2023 11:24:10 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 291 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.