[PATCH 0/5] gnu: ruby-terraform: Update to 1.7.0.

  • Done
  • quality assurance status badge
Details
2 participants
  • Christopher Baines
  • Yovan Naumovski
Owner
unassigned
Submitted by
Yovan Naumovski
Severity
normal
Y
Y
Yovan Naumovski wrote on 11 May 2023 22:14
(address . guix-patches@gnu.org)(name . Yovan Naumovski)(address . yovan@gorski.stream)
20230511201429.8353-1-yovan@gorski.stream
Hi,

Here's a patch series that updates ruby-terraform to 1.7.0 and enables
tests for the package. To enable the tests some gem dependencies need
to be packaged and updated.

Yovan Naumovski (5):
gnu: ruby-i18n: Update to 1.13.0.
gnu: ruby-lino: Update to 3.1.0.
gnu: Add ruby-immutable-struct.
gnu: Add ruby-faker.
gnu: ruby-terraform: Update to 1.7.0.

gnu/packages/ruby.scm | 97 ++++++++++++++++++++++++++++++++++++++-----
1 file changed, 87 insertions(+), 10 deletions(-)

--
2.39.2
Y
Y
Yovan Naumovski wrote on 11 May 2023 22:15
[PATCH 1/5] gnu: ruby-i18n: Update to 1.13.0.
(address . 63452@debbugs.gnu.org)(name . Yovan Naumovski)(address . yovan@gorski.stream)
20230511201537.8469-1-yovan@gorski.stream
* gnu/packages/ruby.scm (ruby-i18n): Update to 1.13.0.
---
gnu/packages/ruby.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (22 lines)
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 1dcd5f76a5..833756704c 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -491,13 +491,13 @@ (define-public ruby-rsync
(define-public ruby-i18n
(package
(name "ruby-i18n")
- (version "1.7.0")
+ (version "1.13.0")
(source (origin
(method url-fetch)
(uri (rubygems-uri "i18n" version))
(sha256
(base32
- "0hmypvx9iyc0b4hski7aic2xzm09cg1c7q1qlpnk3k8s5acxzyhl"))))
+ "1yk33slipi3i1kydzrrchbi7cgisaxym6pgwlzx7ir8vjk6wl90x"))))
(build-system ruby-build-system)
(arguments
'(#:tests? #f)) ; no tests
--
2.39.2
Y
Y
Yovan Naumovski wrote on 11 May 2023 22:16
[PATCH 2/5] gnu: ruby-lino: Update to 3.1.0.
(address . 63452@debbugs.gnu.org)(name . Yovan Naumovski)(address . yovan@gorski.stream)
20230511201611.8517-1-yovan@gorski.stream
* gnu/packages/ruby.scm (ruby-lino): Update to 3.1.0.
---
gnu/packages/ruby.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (23 lines)
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 833756704c..9eb3970a44 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -2997,14 +2997,14 @@ (define-public ruby-libxml
(define-public ruby-lino
(package
(name "ruby-lino")
- (version "1.1.0")
+ (version "3.1.0")
(source
(origin
(method url-fetch)
(uri (rubygems-uri "lino" version))
(sha256
(base32
- "11d29g0fk372b9fcpyr0k6hxm2b4j4igpysmi542hgbbgqgp9cd3"))))
+ "1zq9dza040fgjvr9imh7z2lgxrcyc5ac100rqimsnsf9bpfz3fsm"))))
(build-system ruby-build-system)
(arguments
'(#:tests? #f)) ; No included tests
--
2.39.2
Y
Y
Yovan Naumovski wrote on 11 May 2023 22:17
[PATCH 4/5] gnu: Add ruby-faker.
(address . 63452@debbugs.gnu.org)(name . Yovan Naumovski)(address . yovan@gorski.stream)
20230511201731.8600-1-yovan@gorski.stream
* gnu/packages/ruby.scm (ruby-faker): New variable.
---
gnu/packages/ruby.scm | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)

Toggle diff (45 lines)
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 7b16d632ad..26a4fea0d7 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -7342,6 +7342,38 @@ (define-public ruby-immutable-struct
(home-page "https://stitchfix.github.io/immutable-struct/")
(license license:expat)))
+(define-public ruby-faker
+ (package
+ (name "ruby-faker")
+ (version "3.2.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/faker-ruby/faker")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1wwdwh5qwaxnd9dl6732mj6b953l5r32r4936pj5680963iagq59"))))
+ (build-system ruby-build-system)
+ (arguments
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'remove-rubocop-from-rakefile
+ (lambda _
+ (substitute* "Rakefile"
+ (("require 'rubocop/rake_task'") "")
+ (("RuboCop::RakeTask\\.new") "")))))))
+ (native-inputs (list ruby-yard ruby-simplecov ruby-timecop))
+ (propagated-inputs (list ruby-i18n))
+ (synopsis "Library for generating fake data")
+ (description "Faker is a port of Data::Faker from Perl. It is used to
+easily generate fake data: names, addresses, phone numbers, etc.")
+ (home-page "https://github.com/faker-ruby/faker")
+ (license license:expat)))
+
(define-public ruby-terraform
(package
(name "ruby-terraform")
--
2.39.2
Y
Y
Yovan Naumovski wrote on 11 May 2023 22:17
[PATCH 5/5] gnu: ruby-terraform: Update to 1.7.0.
(address . 63452@debbugs.gnu.org)(name . Yovan Naumovski)(address . yovan@gorski.stream)
20230511201749.8687-1-yovan@gorski.stream
* gnu/packages/ruby.scm (ruby-terraform): Update to 1.7.0.
[source]: Use git-fetch.
[arguments]: Enable tests.
[native-inputs]: Add ruby-rspec, ruby-faker, ruby-simplecov.
[propagated-inputs]: Add ruby-immutable-struct.
---
gnu/packages/ruby.scm | 37 +++++++++++++++++++++++++++++++------
1 file changed, 31 insertions(+), 6 deletions(-)

Toggle diff (57 lines)
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 26a4fea0d7..e0bc6e874b 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -7377,19 +7377,44 @@ (define-public ruby-faker
(define-public ruby-terraform
(package
(name "ruby-terraform")
- (version "0.22.0")
+ (version "1.7.0")
(source
(origin
- (method url-fetch)
- (uri (rubygems-uri "ruby-terraform" version))
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/infrablocks/ruby_terraform")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
(sha256
(base32
- "13zjkp71cd19j2ds2h9rqwcfr1zdg5nsh63p89l6qcsc9z39z324"))))
+ "18d1qkf2rbbvc2f0dxni85i2l2g8zn5kzh0v8zr1b86r1wjy6rvd"))))
(build-system ruby-build-system)
(arguments
- '(#:tests? #f)) ; No included tests
+ (list
+ #:test-target "spec"
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'disable-bundler
+ (lambda _
+ (substitute* "spec/spec_helper.rb"
+ (("require 'bundler/setup'") ""))))
+ (add-before 'check 'disable-falinig-tests
+ (lambda _
+ (substitute* "spec/ruby_terraform/commands/plan_spec.rb"
+ (("it 'logs an error raised when running the command'")
+ "xit 'logs an error raised when running the command'")
+ (("it 'raises execution error when an error occurs running the command'")
+ "xit 'raises execution error when an error occurs running the command'"))))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "rspec")))))))
+ (native-inputs
+ (list ruby-rspec
+ ruby-faker
+ ruby-simplecov))
(propagated-inputs
- (list ruby-lino))
+ (list ruby-lino ruby-immutable-struct))
(synopsis "Ruby wrapper around the Terraform command line interface")
(description
"This package provides a Ruby wrapper around the Terraform command line
--
2.39.2
Y
Y
Yovan Naumovski wrote on 11 May 2023 22:29
[PATCH 3/5] gnu: Add ruby-immutable-struct.
(address . 63452@debbugs.gnu.org)
e53e3517-3389-7462-2820-dc59dadd7b9a@gorski.stream
* gnu/packages/ruby.scm (ruby-immutable-struct): New variable.
---
gnu/packages/ruby.scm | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)

Toggle diff (33 lines)
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 9eb3970a44..7b16d632ad 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -7322,6 +7322,26 @@ (define-public ruby-term-ansicolor
;; There is no mention of the "or later" clause.
(license license:gpl2)))
+(define-public ruby-immutable-struct
+ (package
+ (name "ruby-immutable-struct")
+ (version "2.4.1")
+ (source (origin
+ (method url-fetch)
+ (uri (rubygems-uri "immutable-struct" version))
+ (sha256
+ (base32
+ "1fsx4s9yaga0p4q7arcirhc5vrifh619k6gzr6z8a0xd935zprsi"))))
+ (build-system ruby-build-system)
+ (arguments
+ (list
+ #:tests? #f))
+ (synopsis "Ruby library for creating immutable struct classes")
+ (description
+ "Easily create value objects without the pain of Ruby's Struct (or its setters)")
+ (home-page "https://stitchfix.github.io/immutable-struct/")
+ (license license:expat)))
+
(define-public ruby-terraform
(package
(name "ruby-terraform")
--
2.39.2
C
C
Christopher Baines wrote on 10 Jul 2023 15:02
Re: [bug#63452] [PATCH 0/5] gnu: ruby-terraform: Update to 1.7.0.
(name . Yovan Naumovski)(address . yovan@gorski.stream)(address . 63452-done@debbugs.gnu.org)
871qhf6hr6.fsf@cbaines.net
Yovan Naumovski via Guix-patches via <guix-patches@gnu.org> writes:

Toggle quote (16 lines)
> Hi,
>
> Here's a patch series that updates ruby-terraform to 1.7.0 and enables
> tests for the package. To enable the tests some gem dependencies need
> to be packaged and updated.
>
> Yovan Naumovski (5):
> gnu: ruby-i18n: Update to 1.13.0.
> gnu: ruby-lino: Update to 3.1.0.
> gnu: Add ruby-immutable-struct.
> gnu: Add ruby-faker.
> gnu: ruby-terraform: Update to 1.7.0.
>
> gnu/packages/ruby.scm | 97 ++++++++++++++++++++++++++++++++++++++-----
> 1 file changed, 87 insertions(+), 10 deletions(-)

Hi Yovan,

Thanks for the patches. I've tweaked ruby-immutable-struct to run the
tests, and pushed these to master as
fd2a01d564ee2909f88aeaad6341eadfa1a75964.

Chris
-----BEGIN PGP SIGNATURE-----

iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmSsAZ1fFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh
aW5lcy5uZXQACgkQXiijOwuE9XefAg/+Mw2vfFoLToRqFJLv8EPJjFYY7Q0uow5I
tIf3doLyLYKWwnC0RBQRh21Nqxc/wPLlRz8r2ckr2Ar/2ou4ZO1MGqfXGA7adJ1n
aj4tCnJmYU3v11VqC3uco5o4P3GulIkacEFx6mR6AVSCwvIojx+kfm5JDuOW0fWf
8ccmJEKpUIWKAIe6G+5sU/6hTbgo0Nw/1Z+YYakAYEk1OgMaURaPvv8fjBMd/f7i
WqyfKMACXOYaQbmVDFwCsQrAoGRwS8ZtpxJjngaf08B5/gA3hDaqopuOKH+TI6jz
AOg8d94plBTKerKOwDllYfeLPxrLXBUHXixf2RR2HhulzYZZHOUcDRV+gn0yzoHL
puEnZrrLeLRYNhxVyNEWJJjXByEkkc2OLs7pTkbLAxsgSe1RJ5ym0B+uHvVxlr3b
f7cL/5u1baq4lARGvQKrrWnF5jOUbiDTI5EB851BE/pY0QgTO7zyVK5K7HvqNl9s
erqYjpIqqPSaXkjLIartXtjyEmbHroU6rTdPSgAxZqZRQpcibKG4EQZBXPngNb/O
C+WnA736C6bGqLQvEzNDyELQElhD9hZZHjOnO/KsRQkSJSn0N6J5mTxT0PKcI4Z+
mOsv65fDTU3j0mHcucK9mke4VwTALAGwkDDY9VNbkixyDhEejTGM+qNN+yHkheXn
wsyw6/WQnaQ=
=CYFK
-----END PGP SIGNATURE-----

Closed
?