* [bug#63951] [PATCH 0/2] gnu: ruby-atoulme-saikuro: Fix tests.
@ 2023-06-07 23:50 gemmaro
2023-06-07 23:54 ` [bug#63951] [PATCH 1/2] gnu: Add ruby-irb@1.1.1 gemmaro
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: gemmaro @ 2023-06-07 23:50 UTC (permalink / raw)
To: 63951; +Cc: gemmaro, Christopher Baines
gemmaro (2):
gnu: Add ruby-irb@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
^ permalink raw reply [flat|nested] 4+ messages in thread
* [bug#63951] [PATCH 1/2] gnu: Add ruby-irb@1.1.1.
2023-06-07 23:50 [bug#63951] [PATCH 0/2] gnu: ruby-atoulme-saikuro: Fix tests gemmaro
@ 2023-06-07 23:54 ` gemmaro
2023-06-07 23:54 ` [bug#63951] [PATCH 2/2] gnu: ruby-atoulme-saikuro: Fix tests gemmaro
2023-06-26 9:20 ` bug#63951: [PATCH 0/2] " Christopher Baines
2 siblings, 0 replies; 4+ messages in thread
From: gemmaro @ 2023-06-07 23:54 UTC (permalink / raw)
To: 63951; +Cc: gemmaro, Christopher Baines
* 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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [bug#63951] [PATCH 2/2] gnu: ruby-atoulme-saikuro: Fix tests.
2023-06-07 23:50 [bug#63951] [PATCH 0/2] gnu: ruby-atoulme-saikuro: Fix tests gemmaro
2023-06-07 23:54 ` [bug#63951] [PATCH 1/2] gnu: Add ruby-irb@1.1.1 gemmaro
@ 2023-06-07 23:54 ` gemmaro
2023-06-26 9:20 ` bug#63951: [PATCH 0/2] " Christopher Baines
2 siblings, 0 replies; 4+ messages in thread
From: gemmaro @ 2023-06-07 23:54 UTC (permalink / raw)
To: 63951; +Cc: gemmaro, Christopher Baines
* 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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* bug#63951: [PATCH 0/2] gnu: ruby-atoulme-saikuro: Fix tests.
2023-06-07 23:50 [bug#63951] [PATCH 0/2] gnu: ruby-atoulme-saikuro: Fix tests gemmaro
2023-06-07 23:54 ` [bug#63951] [PATCH 1/2] gnu: Add ruby-irb@1.1.1 gemmaro
2023-06-07 23:54 ` [bug#63951] [PATCH 2/2] gnu: ruby-atoulme-saikuro: Fix tests gemmaro
@ 2023-06-26 9:20 ` Christopher Baines
2 siblings, 0 replies; 4+ messages in thread
From: Christopher Baines @ 2023-06-26 9:20 UTC (permalink / raw)
To: gemmaro; +Cc: 63951-done
[-- Attachment #1: Type: text/plain, Size: 430 bytes --]
gemmaro <gemmaro.dev@gmail.com> writes:
> gemmaro (2):
> gnu: Add ruby-irb@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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 987 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-06-26 9:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-07 23:50 [bug#63951] [PATCH 0/2] gnu: ruby-atoulme-saikuro: Fix tests gemmaro
2023-06-07 23:54 ` [bug#63951] [PATCH 1/2] gnu: Add ruby-irb@1.1.1 gemmaro
2023-06-07 23:54 ` [bug#63951] [PATCH 2/2] gnu: ruby-atoulme-saikuro: Fix tests gemmaro
2023-06-26 9:20 ` bug#63951: [PATCH 0/2] " Christopher Baines
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).