GNU bug report logs - #28583
[PATCH] Add es-dump-restore and dependencies

Previous Next

Package: guix-patches;

Reported by: Christopher Baines <mail <at> cbaines.net>

Date: Sun, 24 Sep 2017 17:12: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 28583 in the body.
You can then email your comments to 28583 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#28583; Package guix-patches. (Sun, 24 Sep 2017 17:12:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Christopher Baines <mail <at> cbaines.net>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sun, 24 Sep 2017 17:12:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: guix-patches <at> gnu.org
Subject: [PATCH] Add es-dump-restore and dependencies
Date: Sun, 24 Sep 2017 18:10:52 +0100
[Message part 1 (text/plain, inline)]
Add a useful utility for working with ElasticSearch indices.

Christopher Baines (7):
  gnu: Add ruby-httpclient.
  gnu: Add ruby-multi-json.
  gnu: Add ruby-options.
  gnu: Add ruby-highline.
  gnu: Add ruby-progress_bar.
  gnu: Add ruby-rubyzip.
  gnu: Add es-dump-restore.

 gnu/packages/databases.scm |  43 ++++++++++
 gnu/packages/ruby.scm      | 195 +++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 238 insertions(+)
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#28583; Package guix-patches. (Sun, 24 Sep 2017 17:18:01 GMT) Full text and rfc822 format available.

Message #8 received at 28583 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: 28583 <at> debbugs.gnu.org
Subject: [PATCH 2/7] gnu: Add ruby-multi-json.
Date: Sun, 24 Sep 2017 18:17:12 +0100
* gnu/packages/ruby.scm (ruby-multi-json): New variable.
---
 gnu/packages/ruby.scm | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index ff6be875f..116db8c62 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -1865,6 +1865,30 @@ net/http library.")
     (home-page "https://github.com/nicksieger/multipart-post")
     (license license:expat)))
 
+(define-public ruby-multi-json
+  (package
+    (name "ruby-multi-json")
+    (version "1.12.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (rubygems-uri "multi_json" version))
+       (sha256
+        (base32
+         "1raim9ddjh672m32psaa9niw67ywzjbxbdb8iijx3wv9k5b0pk2x"))))
+    (build-system ruby-build-system)
+    (arguments
+     '(#:tests? #f)) ;; No testsuite.
+    (synopsis
+     "Common interface to multiple JSON libraries for Ruby")
+    (description
+     "This package provides a common interface to multiple JSON libraries,
+including Oj, Yajl, the JSON gem (with C-extensions), the pure-Ruby JSON gem,
+NSJSONSerialization, gson.rb, JrJackson, and OkJson.")
+    (home-page
+     "http://github.com/intridea/multi_json")
+    (license license:expat)))
+
 (define-public ruby-arel
   (package
     (name "ruby-arel")
-- 
2.14.1





Information forwarded to guix-patches <at> gnu.org:
bug#28583; Package guix-patches. (Sun, 24 Sep 2017 17:18:02 GMT) Full text and rfc822 format available.

Message #11 received at 28583 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: 28583 <at> debbugs.gnu.org
Subject: [PATCH 6/7] gnu: Add ruby-rubyzip.
Date: Sun, 24 Sep 2017 18:17:16 +0100
* gnu/packages/ruby.scm (ruby-rubyzip): New variable.
---
 gnu/packages/ruby.scm | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 5dde022c6..6f9589489 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -1002,6 +1002,40 @@ Ruby Gems.")
     (home-page "https://github.com/postmodern/rubygems-tasks")
     (license license:expat)))
 
+(define-public ruby-rubyzip
+  (package
+  (name "ruby-rubyzip")
+  (version "1.2.1")
+  (source
+    (origin
+      (method url-fetch)
+      (uri (rubygems-uri "rubyzip" version))
+      (sha256
+        (base32
+          "06js4gznzgh8ac2ldvmjcmg9v1vg9llm357yckkpylaj6z456zqz"))))
+  (build-system ruby-build-system)
+  (arguments
+   '(#:tests? #f ;; TODO: 265 runs, 2636 assertions, 5 failures, 0 errors, 0
+                 ;; skips
+     #:phases
+     (modify-phases %standard-phases
+       (add-before 'check 'patch-test/gentestfiles.rb
+         (lambda* (#:key inputs #:allow-other-keys)
+           (substitute* "test/gentestfiles.rb"
+             (("/usr/bin/zip")
+              (string-append
+               (assoc-ref inputs "zip") "/bin/zip"))))))))
+  (native-inputs
+   `(("bundler" ,bundler)
+     ("ruby-simplecov" ,ruby-simplecov)
+     ("zip" ,zip)))
+  (synopsis
+    "The rubyzip module is for reading and writing zip files")
+  (description
+    "The rubyzip module provides ways to read from and create zip files.")
+  (home-page "http://github.com/rubyzip/rubyzip")
+  (license license:bsd-2)))
+
 (define-public ruby-ffi
   (package
     (name "ruby-ffi")
-- 
2.14.1





Information forwarded to guix-patches <at> gnu.org:
bug#28583; Package guix-patches. (Sun, 24 Sep 2017 17:18:03 GMT) Full text and rfc822 format available.

Message #14 received at 28583 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: 28583 <at> debbugs.gnu.org
Subject: [PATCH 7/7] gnu: Add es-dump-restore.
Date: Sun, 24 Sep 2017 18:17:17 +0100
* gnu/packages/databases.scm (es-dump-restore): New variable.
---
 gnu/packages/databases.scm | 43 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)

diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index 6ce58985e..2f64e61ab 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -68,6 +68,7 @@
   #:use-module (gnu packages python)
   #:use-module (gnu packages rdf)
   #:use-module (gnu packages readline)
+  #:use-module (gnu packages ruby)
   #:use-module (gnu packages tcl)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages xml)
@@ -77,6 +78,7 @@
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system perl)
   #:use-module (guix build-system python)
+  #:use-module (guix build-system ruby)
   #:use-module (guix build-system cmake)
   #:use-module (guix utils)
   #:use-module (srfi srfi-26)
@@ -256,6 +258,47 @@ SQL, Key/Value, XML/XQuery or Java Object storage for their data model.")
                       "--enable-cxx"))))
                  %standard-phases)))))
 
+(define-public es-dump-restore
+  (package
+    (name "es-dump-restore")
+    (version "2.1.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (rubygems-uri "es_dump_restore" version))
+       (sha256
+        (base32
+         "020yk7f1hw48clmf5501z3xv9shsdchyymcv0y2cci2c1xvr1mim"))))
+    (build-system ruby-build-system)
+    (arguments
+     '(#:tests? #f
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'wrap-bin-es_dump_restore
+           (lambda* (#:key outputs #:allow-other-keys)
+             (wrap-program (string-append (assoc-ref outputs "out")
+                                          "/bin/es_dump_restore")
+               `("GEM_PATH" ":" prefix (,(string-append
+                                          (getenv "GEM_PATH")
+                                          ":"
+                                          (getenv "GEM_HOME")))))
+             #t)))))
+    (propagated-inputs
+     `(("ruby-httpclient" ,ruby-httpclient)
+       ("ruby-multi-json" ,ruby-multi-json)
+       ("ruby-progress_bar" ,ruby-progress_bar)
+       ("ruby-rubyzip" ,ruby-rubyzip)
+       ("ruby-thor" ,ruby-thor)))
+    (synopsis
+     "Utility for dumping and restoring ElasticSearch indexes")
+    (description
+     "This package provides a utility for dumping the contents of an
+ElasticSearch index to a compressed file and restoring the dumpfile back to an
+ElasticSearch server")
+    (home-page
+     "https://github.com/patientslikeme/es_dump_restore")
+    (license license:expat)))
+
 (define-public leveldb
   (package
     (name "leveldb")
-- 
2.14.1





Information forwarded to guix-patches <at> gnu.org:
bug#28583; Package guix-patches. (Sun, 24 Sep 2017 17:18:03 GMT) Full text and rfc822 format available.

Message #17 received at 28583 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: 28583 <at> debbugs.gnu.org
Subject: [PATCH 3/7] gnu: Add ruby-options.
Date: Sun, 24 Sep 2017 18:17:13 +0100
* gnu/packages/ruby.scm (ruby-options): New variable.
---
 gnu/packages/ruby.scm | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 116db8c62..1ee03e066 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -660,6 +660,34 @@ complexity.")
     (home-page "https://github.com/ThoughtWorksStudios/saikuro_treemap")
     (license license:expat)))
 
+(define-public ruby-options
+  (package
+    (name "ruby-options")
+    (version "2.3.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (rubygems-uri "options" version))
+       (sha256
+        (base32
+         "1s650nwnabx66w584m1cyw82icyym6hv5kzfsbp38cinkr5klh9j"))))
+    (build-system ruby-build-system)
+    (arguments
+     '(#:tests? #f ;; TODO: NameError: uninitialized constant Config
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'set-LIB
+           (lambda _
+             ;; This is used in the Rakefile, and setting it avoids an issue
+             ;; with running the tests.
+             (setenv "LIB" "options"))))))
+    (synopsis "Ruby library to parse options from *args cleanly")
+    (description
+     "The @code{options} library helps with parsing keyword options in Ruby
+functions.")
+    (home-page "https://github.com/ahoward/options")
+    (license license:ruby)))
+
 (define-public ruby-orderedhash
   (package
     (name "ruby-orderedhash")
-- 
2.14.1





Information forwarded to guix-patches <at> gnu.org:
bug#28583; Package guix-patches. (Sun, 24 Sep 2017 17:18:04 GMT) Full text and rfc822 format available.

Message #20 received at 28583 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: 28583 <at> debbugs.gnu.org
Subject: [PATCH 4/7] gnu: Add ruby-highline.
Date: Sun, 24 Sep 2017 18:17:14 +0100
* gnu/packages/ruby.scm (ruby-highline): New variable.
---
 gnu/packages/ruby.scm | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 1ee03e066..9863d4b37 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -216,6 +216,33 @@ a focus on simplicity and productivity.")
              (("/bin/sh") (which "sh"))))
          %standard-phases)))))
 
+(define-public ruby-highline
+  (package
+    (name "ruby-highline")
+    (version "1.7.8")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (rubygems-uri "highline" version))
+       (sha256
+        (base32
+         "1nf5lgdn6ni2lpfdn4gk3gi47fmnca2bdirabbjbz1fk9w4p8lkr"))))
+    (build-system ruby-build-system)
+    (arguments
+     `(#:tests? #f)) ;; TODO: Requires code_statistics
+    (native-inputs
+     `(("bundler" ,bundler)))
+    (synopsis
+     "HighLine helps you build command-line interfaces")
+    (description
+     "HighLine provides a high-level IO library that provides validation,
+type conversion, and more for command-line interfaces.
+
+HighLine also includes a menu system for providing multiple options to the
+user.")
+    (home-page "https://github.com/JEG2/highline")
+    (license (list license:gpl2 license:ruby))))
+
 (define-public ruby-hoe
   (package
     (name "ruby-hoe")
-- 
2.14.1





Information forwarded to guix-patches <at> gnu.org:
bug#28583; Package guix-patches. (Sun, 24 Sep 2017 17:18:04 GMT) Full text and rfc822 format available.

Message #23 received at 28583 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: 28583 <at> debbugs.gnu.org
Subject: [PATCH 1/7] gnu: Add ruby-httpclient.
Date: Sun, 24 Sep 2017 18:17:11 +0100
* gnu/packages/ruby.scm (ruby-httpclient): New variable.
---
 gnu/packages/ruby.scm | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)

diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 80d3bffd8..ff6be875f 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -3579,6 +3579,57 @@ It has built-in support for the legacy @code{cookies.txt} and
     (home-page "https://github.com/sparklemotion/http-cookie")
     (license license:expat)))
 
+(define-public ruby-httpclient
+  (package
+    (name "ruby-httpclient")
+    (version "2.8.3")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (rubygems-uri "httpclient" version))
+       (sha256
+        (base32
+         "19mxmvghp7ki3klsxwrlwr431li7hm1lczhhj8z4qihl2acy8l99"))))
+    (build-system ruby-build-system)
+    (arguments
+     '(;; TODO: Some tests currently fail
+       ;; ------
+       ;; 211 tests, 729 assertions, 13 failures, 4 errors, 0 pendings,
+       ;; 2 omissions, 0 notifications
+       ;; 91.866% passed
+       ;; ------
+       ;; 6.49 tests/s, 22.41 assertions/s
+       #:tests? #f
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda* (#:key tests? #:allow-other-keys)
+             (if tests?
+                 (zero?
+                  (system* "ruby"
+                           "-Ilib"
+                           "test/runner.rb"))
+                 #t)))
+         (add-after 'install 'wrap-bin-httpclient
+           (lambda* (#:key outputs #:allow-other-keys)
+             (wrap-program (string-append (assoc-ref outputs "out")
+                                          "/bin/httpclient")
+               `("GEM_HOME" ":" prefix (,(getenv "GEM_HOME"))))
+             #t)))))
+    (native-inputs
+     `(("ruby-rack" ,ruby-rack)))
+    (synopsis
+     "Make HTTP requests with support for HTTPS, Cookies, authentication and more")
+    (description
+     "The @code{httpclient} ruby library provides functionality related to
+HTTP.  Compared to the @code{net/http} library, @{httpclient} also provides
+Cookie, multithreading and authentication (digest, NTLM) support.
+
+Also provided is a @command{httpclient} command, which can perform HTTP
+requests either using arguments or with an interactive prompt.")
+    (home-page "https://github.com/nahi/httpclient")
+    (license license:ruby)))
+
 (define-public ruby-ansi
   (package
     (name "ruby-ansi")
-- 
2.14.1





Information forwarded to guix-patches <at> gnu.org:
bug#28583; Package guix-patches. (Sun, 24 Sep 2017 17:18:05 GMT) Full text and rfc822 format available.

Message #26 received at 28583 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: 28583 <at> debbugs.gnu.org
Subject: [PATCH 5/7] gnu: Add ruby-progress_bar.
Date: Sun, 24 Sep 2017 18:17:15 +0100
* gnu/packages/ruby.scm (ruby-progress_bar): New variable.
---
 gnu/packages/ruby.scm | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 9863d4b37..5dde022c6 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -2114,6 +2114,37 @@ for select languages.")
     (home-page "http://coderay.rubychan.de")
     (license license:expat)))
 
+(define-public ruby-progress_bar
+  (package
+    (name "ruby-progress_bar")
+    (version "1.1.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (rubygems-uri "progress_bar" version))
+       (sha256
+        (base32
+         "1qc40mr6p1z9a3vlpnsg1zfgk1qswviql2a31y63wpv3vr6b5f48"))))
+    (build-system ruby-build-system)
+    (arguments
+     '(#:test-target "spec"))
+    (propagated-inputs
+     `(("ruby-highline" ,ruby-highline)
+       ("ruby-options" ,ruby-options)))
+    (native-inputs
+     `(("bundler" ,bundler)
+       ("ruby-rspec" ,ruby-rspec)
+       ("ruby-timecop" ,ruby-timecop)))
+    (synopsis
+     "Ruby library for displaying progress bars")
+    (description
+     "ProgressBar is a simple library for displaying progress bars.  The
+maximum value is configurable, and additional information can be displayed
+like the percentage completion, estimated time remaining, elapsed time and
+rate.")
+    (home-page "https://github.com/paul/progress_bar")
+    (license license:wtfpl2)))
+
 (define-public ruby-pry
   (package
     (name "ruby-pry")
-- 
2.14.1





Information forwarded to guix-patches <at> gnu.org:
bug#28583; Package guix-patches. (Wed, 27 Sep 2017 11:57:01 GMT) Full text and rfc822 format available.

Message #29 received at 28583 <at> debbugs.gnu.org (full text, mbox):

From: Ben Woodcroft <b.woodcroft <at> uq.edu.au>
To: Christopher Baines <mail <at> cbaines.net>, 28583 <at> debbugs.gnu.org
Subject: Re: [bug#28583] [PATCH 1/7] gnu: Add ruby-httpclient.
Date: Wed, 27 Sep 2017 21:56:04 +1000
Hi,

Thanks for the patches.


On 25/09/17 03:17, Christopher Baines wrote:
> * gnu/packages/ruby.scm (ruby-httpclient): New variable.
> ---
>   gnu/packages/ruby.scm | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
>   1 file changed, 51 insertions(+)
>
> diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
> index 80d3bffd8..ff6be875f 100644
> --- a/gnu/packages/ruby.scm
> +++ b/gnu/packages/ruby.scm
> @@ -3579,6 +3579,57 @@ It has built-in support for the legacy @code{cookies.txt} and
>       (home-page "https://github.com/sparklemotion/http-cookie")
>       (license license:expat)))
>   
> +(define-public ruby-httpclient
> +  (package
> +    (name "ruby-httpclient")
> +    (version "2.8.3")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (rubygems-uri "httpclient" version))
> +       (sha256
> +        (base32
> +         "19mxmvghp7ki3klsxwrlwr431li7hm1lczhhj8z4qihl2acy8l99"))))
> +    (build-system ruby-build-system)
> +    (arguments
> +     '(;; TODO: Some tests currently fail
> +       ;; ------
> +       ;; 211 tests, 729 assertions, 13 failures, 4 errors, 0 pendings,
> +       ;; 2 omissions, 0 notifications
> +       ;; 91.866% passed
> +       ;; ------
> +       ;; 6.49 tests/s, 22.41 assertions/s
> +       #:tests? #f
> +       #:phases
> +       (modify-phases %standard-phases
> +         (replace 'check
> +           (lambda* (#:key tests? #:allow-other-keys)
> +             (if tests?
> +                 (zero?
> +                  (system* "ruby"
> +                           "-Ilib"
> +                           "test/runner.rb"))
> +                 #t)))
Since tests? is #f, this is effectively dead code. But it could be 
useful to someone continuing the tests, I'm not fussed.
> +         (add-after 'install 'wrap-bin-httpclient
> +           (lambda* (#:key outputs #:allow-other-keys)
> +             (wrap-program (string-append (assoc-ref outputs "out")
> +                                          "/bin/httpclient")
> +               `("GEM_HOME" ":" prefix (,(getenv "GEM_HOME"))))
> +             #t)))))
It would be preferable to move this to be part of the ruby-build-system 
as is done in e.g. python-build-system, but OK.

Otherwise LGTM.
ben




Information forwarded to guix-patches <at> gnu.org:
bug#28583; Package guix-patches. (Wed, 27 Sep 2017 12:04:02 GMT) Full text and rfc822 format available.

Message #32 received at 28583 <at> debbugs.gnu.org (full text, mbox):

From: Ben Woodcroft <b.woodcroft <at> uq.edu.au>
To: Christopher Baines <mail <at> cbaines.net>, 28583 <at> debbugs.gnu.org
Subject: Re: [bug#28583] [PATCH 2/7] gnu: Add ruby-multi-json.
Date: Wed, 27 Sep 2017 22:03:32 +1000

On 25/09/17 03:17, Christopher Baines wrote:
> * gnu/packages/ruby.scm (ruby-multi-json): New variable.
[..]
> +    (arguments
> +     '(#:tests? #f)) ;; No testsuite.
No testsuite included in distributed gem, rather.
> +    (synopsis
> +     "Common interface to multiple JSON libraries for Ruby")
> +    (description
> +     "This package provides a common interface to multiple JSON libraries,
> +including Oj, Yajl, the JSON gem (with C-extensions), the pure-Ruby JSON gem,
> +NSJSONSerialization, gson.rb, JrJackson, and OkJson.")
> +    (home-page
> +     "http://github.com/intridea/multi_json")
Both home-page and synopsis could be moved to the line before.

Otherwise LGTM.
ben




Information forwarded to guix-patches <at> gnu.org:
bug#28583; Package guix-patches. (Wed, 27 Sep 2017 12:11:01 GMT) Full text and rfc822 format available.

Message #35 received at 28583 <at> debbugs.gnu.org (full text, mbox):

From: Ben Woodcroft <b.woodcroft <at> uq.edu.au>
To: Christopher Baines <mail <at> cbaines.net>, 28583 <at> debbugs.gnu.org
Subject: Re: [bug#28583] [PATCH 3/7] gnu: Add ruby-options.
Date: Wed, 27 Sep 2017 22:10:10 +1000

On 25/09/17 03:17, Christopher Baines wrote:
> * gnu/packages/ruby.scm (ruby-options): New variable.
LGTM.





Information forwarded to guix-patches <at> gnu.org:
bug#28583; Package guix-patches. (Wed, 27 Sep 2017 12:38:01 GMT) Full text and rfc822 format available.

Message #38 received at 28583 <at> debbugs.gnu.org (full text, mbox):

From: Ben Woodcroft <b.woodcroft <at> uq.edu.au>
To: Christopher Baines <mail <at> cbaines.net>, 28583 <at> debbugs.gnu.org
Subject: Re: [bug#28583] [PATCH 4/7] gnu: Add ruby-highline.
Date: Wed, 27 Sep 2017 22:37:39 +1000
[Message part 1 (text/plain, inline)]

On 25/09/17 03:17, Christopher Baines wrote:
> * gnu/packages/ruby.scm (ruby-highline): New variable.
> ---
>   gnu/packages/ruby.scm | 27 +++++++++++++++++++++++++++
>   1 file changed, 27 insertions(+)
>
> diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
> index 1ee03e066..9863d4b37 100644
> --- a/gnu/packages/ruby.scm
> +++ b/gnu/packages/ruby.scm
> @@ -216,6 +216,33 @@ a focus on simplicity and productivity.")
>                (("/bin/sh") (which "sh"))))
>            %standard-phases)))))
>   
> +(define-public ruby-highline
> +  (package
> +    (name "ruby-highline")
> +    (version "1.7.8")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (rubygems-uri "highline" version))
> +       (sha256
> +        (base32
> +         "1nf5lgdn6ni2lpfdn4gk3gi47fmnca2bdirabbjbz1fk9w4p8lkr"))))
> +    (build-system ruby-build-system)
> +    (arguments
> +     `(#:tests? #f)) ;; TODO: Requires code_statistics
I've attached a package for code_statistics, but adding it does not help 
because there appears to be something amiss in the Rakefile. This has 
been fixed in the not quite released 2.0.0 version, so the patch may be 
useful in future.

> +    (native-inputs
> +     `(("bundler" ,bundler)))
> +    (synopsis
> +     "HighLine helps you build command-line interfaces")
> +    (description
> +     "HighLine provides a high-level IO library that provides validation,
> +type conversion, and more for command-line interfaces.
> +
> +HighLine also includes a menu system for providing multiple options to the
> +user.")
I would combine the two sentences into one paragraph.

Otherwise LGTM.

[0001-gnu-Add-ruby-code-statistics.patch (text/x-patch, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#28583; Package guix-patches. (Wed, 27 Sep 2017 12:44:02 GMT) Full text and rfc822 format available.

Message #41 received at 28583 <at> debbugs.gnu.org (full text, mbox):

From: Ben Woodcroft <b.woodcroft <at> uq.edu.au>
To: Christopher Baines <mail <at> cbaines.net>, 28583 <at> debbugs.gnu.org
Subject: Re: [bug#28583] [PATCH 5/7] gnu: Add ruby-progress_bar.
Date: Wed, 27 Sep 2017 22:43:31 +1000

On 25/09/17 03:17, Christopher Baines wrote:
> * gnu/packages/ruby.scm (ruby-progress_bar): New variable.
> ---
>   gnu/packages/ruby.scm | 31 +++++++++++++++++++++++++++++++
>   1 file changed, 31 insertions(+)
>
> diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
> index 9863d4b37..5dde022c6 100644
> --- a/gnu/packages/ruby.scm
> +++ b/gnu/packages/ruby.scm
> @@ -2114,6 +2114,37 @@ for select languages.")
>       (home-page "http://coderay.rubychan.de")
>       (license license:expat)))
>   
> +(define-public ruby-progress_bar
> +  (package
> +    (name "ruby-progress_bar")
OK. Unfortunate that there is also a progress-bar gem.
LGTM.




Information forwarded to guix-patches <at> gnu.org:
bug#28583; Package guix-patches. (Thu, 28 Sep 2017 08:35:01 GMT) Full text and rfc822 format available.

Message #44 received at 28583 <at> debbugs.gnu.org (full text, mbox):

From: Ben Woodcroft <b.woodcroft <at> uq.edu.au>
To: Christopher Baines <mail <at> cbaines.net>, 28583 <at> debbugs.gnu.org
Subject: Re: [bug#28583] [PATCH 6/7] gnu: Add ruby-rubyzip.
Date: Thu, 28 Sep 2017 18:34:30 +1000
[Message part 1 (text/plain, inline)]
Hi,


On 25/09/17 03:17, Christopher Baines wrote:
> * gnu/packages/ruby.scm (ruby-rubyzip): New variable.
I made a few changes, and got the tests to pass - patch attached. WDYT?
ben
[0001-gnu-Add-ruby-rubyzip.patch (text/x-patch, attachment)]

Information forwarded to guix-patches <at> gnu.org:
bug#28583; Package guix-patches. (Thu, 28 Sep 2017 08:39:02 GMT) Full text and rfc822 format available.

Message #47 received at 28583 <at> debbugs.gnu.org (full text, mbox):

From: Ben Woodcroft <b.woodcroft <at> uq.edu.au>
To: Christopher Baines <mail <at> cbaines.net>, 28583 <at> debbugs.gnu.org
Subject: Re: [bug#28583] [PATCH 7/7] gnu: Add es-dump-restore.
Date: Thu, 28 Sep 2017 18:38:19 +1000

On 25/09/17 03:17, Christopher Baines wrote:
> * gnu/packages/databases.scm (es-dump-restore): New variable.
[..]
> +    (arguments
> +     '(#:tests? #f
Including a reason here would be good.

> +       #:phases
> +       (modify-phases %standard-phases
> +         (add-after 'install 'wrap-bin-es_dump_restore
> +           (lambda* (#:key outputs #:allow-other-keys)
> +             (wrap-program (string-append (assoc-ref outputs "out")
> +                                          "/bin/es_dump_restore")
> +               `("GEM_PATH" ":" prefix (,(string-append
> +                                          (getenv "GEM_PATH")
> +                                          ":"
> +                                          (getenv "GEM_HOME")))))
> +             #t)))))
Again, it would be preferable to have this done as part of the build 
system, but OK.

> +    (propagated-inputs
> +     `(("ruby-httpclient" ,ruby-httpclient)
> +       ("ruby-multi-json" ,ruby-multi-json)
> +       ("ruby-progress_bar" ,ruby-progress_bar)
> +       ("ruby-rubyzip" ,ruby-rubyzip)
> +       ("ruby-thor" ,ruby-thor)))
> +    (synopsis
> +     "Utility for dumping and restoring ElasticSearch indexes")
This can be moved onto the previous line.

> +    (description
> +     "This package provides a utility for dumping the contents of an
> +ElasticSearch index to a compressed file and restoring the dumpfile back to an
> +ElasticSearch server")
> +    (home-page
> +     "https://github.com/patientslikeme/es_dump_restore")
As can this. Otherwise LGTM - thanks for this series.
ben




Information forwarded to guix-patches <at> gnu.org:
bug#28583; Package guix-patches. (Sat, 30 Sep 2017 08:20:02 GMT) Full text and rfc822 format available.

Message #50 received at 28583 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: 28583 <at> debbugs.gnu.org
Subject: [PATCH 2/8] gnu: Add ruby-multi-json.
Date: Sat, 30 Sep 2017 09:19:29 +0100
* gnu/packages/ruby.scm (ruby-multi-json): New variable.
---
 gnu/packages/ruby.scm | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index ff6be875f..504eb60a9 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -1865,6 +1865,28 @@ net/http library.")
     (home-page "https://github.com/nicksieger/multipart-post")
     (license license:expat)))
 
+(define-public ruby-multi-json
+  (package
+    (name "ruby-multi-json")
+    (version "1.12.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (rubygems-uri "multi_json" version))
+       (sha256
+        (base32
+         "1raim9ddjh672m32psaa9niw67ywzjbxbdb8iijx3wv9k5b0pk2x"))))
+    (build-system ruby-build-system)
+    (arguments
+     '(#:tests? #f)) ;; No testsuite included in the gem.
+    (synopsis "Common interface to multiple JSON libraries for Ruby")
+    (description
+     "This package provides a common interface to multiple JSON libraries,
+including Oj, Yajl, the JSON gem (with C-extensions), the pure-Ruby JSON gem,
+NSJSONSerialization, gson.rb, JrJackson, and OkJson.")
+    (home-page "http://github.com/intridea/multi_json")
+    (license license:expat)))
+
 (define-public ruby-arel
   (package
     (name "ruby-arel")
-- 
2.14.1





Information forwarded to guix-patches <at> gnu.org:
bug#28583; Package guix-patches. (Sat, 30 Sep 2017 08:20:03 GMT) Full text and rfc822 format available.

Message #53 received at 28583 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: 28583 <at> debbugs.gnu.org
Subject: [PATCH 1/8] gnu: Add ruby-httpclient.
Date: Sat, 30 Sep 2017 09:19:28 +0100
* gnu/packages/ruby.scm (ruby-httpclient): New variable.
---
 gnu/packages/ruby.scm | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)

diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 80d3bffd8..ff6be875f 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -3579,6 +3579,57 @@ It has built-in support for the legacy @code{cookies.txt} and
     (home-page "https://github.com/sparklemotion/http-cookie")
     (license license:expat)))
 
+(define-public ruby-httpclient
+  (package
+    (name "ruby-httpclient")
+    (version "2.8.3")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (rubygems-uri "httpclient" version))
+       (sha256
+        (base32
+         "19mxmvghp7ki3klsxwrlwr431li7hm1lczhhj8z4qihl2acy8l99"))))
+    (build-system ruby-build-system)
+    (arguments
+     '(;; TODO: Some tests currently fail
+       ;; ------
+       ;; 211 tests, 729 assertions, 13 failures, 4 errors, 0 pendings,
+       ;; 2 omissions, 0 notifications
+       ;; 91.866% passed
+       ;; ------
+       ;; 6.49 tests/s, 22.41 assertions/s
+       #:tests? #f
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda* (#:key tests? #:allow-other-keys)
+             (if tests?
+                 (zero?
+                  (system* "ruby"
+                           "-Ilib"
+                           "test/runner.rb"))
+                 #t)))
+         (add-after 'install 'wrap-bin-httpclient
+           (lambda* (#:key outputs #:allow-other-keys)
+             (wrap-program (string-append (assoc-ref outputs "out")
+                                          "/bin/httpclient")
+               `("GEM_HOME" ":" prefix (,(getenv "GEM_HOME"))))
+             #t)))))
+    (native-inputs
+     `(("ruby-rack" ,ruby-rack)))
+    (synopsis
+     "Make HTTP requests with support for HTTPS, Cookies, authentication and more")
+    (description
+     "The @code{httpclient} ruby library provides functionality related to
+HTTP.  Compared to the @code{net/http} library, @{httpclient} also provides
+Cookie, multithreading and authentication (digest, NTLM) support.
+
+Also provided is a @command{httpclient} command, which can perform HTTP
+requests either using arguments or with an interactive prompt.")
+    (home-page "https://github.com/nahi/httpclient")
+    (license license:ruby)))
+
 (define-public ruby-ansi
   (package
     (name "ruby-ansi")
-- 
2.14.1





Information forwarded to guix-patches <at> gnu.org:
bug#28583; Package guix-patches. (Sat, 30 Sep 2017 08:20:03 GMT) Full text and rfc822 format available.

Message #56 received at 28583 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: 28583 <at> debbugs.gnu.org
Subject: [PATCH 3/8] gnu: Add ruby-options.
Date: Sat, 30 Sep 2017 09:19:30 +0100
* gnu/packages/ruby.scm (ruby-options): New variable.
---
 gnu/packages/ruby.scm | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 504eb60a9..ec4d33f40 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -660,6 +660,34 @@ complexity.")
     (home-page "https://github.com/ThoughtWorksStudios/saikuro_treemap")
     (license license:expat)))
 
+(define-public ruby-options
+  (package
+    (name "ruby-options")
+    (version "2.3.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (rubygems-uri "options" version))
+       (sha256
+        (base32
+         "1s650nwnabx66w584m1cyw82icyym6hv5kzfsbp38cinkr5klh9j"))))
+    (build-system ruby-build-system)
+    (arguments
+     '(#:tests? #f ;; TODO: NameError: uninitialized constant Config
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'set-LIB
+           (lambda _
+             ;; This is used in the Rakefile, and setting it avoids an issue
+             ;; with running the tests.
+             (setenv "LIB" "options"))))))
+    (synopsis "Ruby library to parse options from *args cleanly")
+    (description
+     "The @code{options} library helps with parsing keyword options in Ruby
+functions.")
+    (home-page "https://github.com/ahoward/options")
+    (license license:ruby)))
+
 (define-public ruby-orderedhash
   (package
     (name "ruby-orderedhash")
-- 
2.14.1





Information forwarded to guix-patches <at> gnu.org:
bug#28583; Package guix-patches. (Sat, 30 Sep 2017 08:20:04 GMT) Full text and rfc822 format available.

Message #59 received at 28583 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: 28583 <at> debbugs.gnu.org
Subject: [PATCH 5/8] gnu: Add ruby-highline.
Date: Sat, 30 Sep 2017 09:19:32 +0100
* gnu/packages/ruby.scm (ruby-highline): New variable.
---
 gnu/packages/ruby.scm | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 283f393b8..d6aa59099 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -216,6 +216,32 @@ a focus on simplicity and productivity.")
              (("/bin/sh") (which "sh"))))
          %standard-phases)))))
 
+(define-public ruby-highline
+  (package
+    (name "ruby-highline")
+    (version "1.7.8")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (rubygems-uri "highline" version))
+       (sha256
+        (base32
+         "1nf5lgdn6ni2lpfdn4gk3gi47fmnca2bdirabbjbz1fk9w4p8lkr"))))
+    (build-system ruby-build-system)
+    (arguments
+     `(#:tests? #f)) ;; TODO: NameError: uninitialized constant SPEC
+    (native-inputs
+     `(("bundler" ,bundler)
+       ("ruby-code-statistics" ,ruby-code-statistics)))
+    (synopsis
+     "HighLine helps you build command-line interfaces")
+    (description
+     "HighLine provides a high-level IO library that provides validation,
+type conversion, and more for command-line interfaces.  HighLine also includes
+a menu system for providing multiple options to the user.")
+    (home-page "https://github.com/JEG2/highline")
+    (license (list license:gpl2 license:ruby))))
+
 (define-public ruby-hoe
   (package
     (name "ruby-hoe")
-- 
2.14.1





Information forwarded to guix-patches <at> gnu.org:
bug#28583; Package guix-patches. (Sat, 30 Sep 2017 08:20:04 GMT) Full text and rfc822 format available.

Message #62 received at 28583 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: 28583 <at> debbugs.gnu.org
Subject: [PATCH 6/8] gnu: Add ruby-progress_bar.
Date: Sat, 30 Sep 2017 09:19:33 +0100
* gnu/packages/ruby.scm (ruby-progress_bar): New variable.
---
 gnu/packages/ruby.scm | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index d6aa59099..3b0a67b9d 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -2111,6 +2111,37 @@ for select languages.")
     (home-page "http://coderay.rubychan.de")
     (license license:expat)))
 
+(define-public ruby-progress_bar
+  (package
+    (name "ruby-progress_bar")
+    (version "1.1.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (rubygems-uri "progress_bar" version))
+       (sha256
+        (base32
+         "1qc40mr6p1z9a3vlpnsg1zfgk1qswviql2a31y63wpv3vr6b5f48"))))
+    (build-system ruby-build-system)
+    (arguments
+     '(#:test-target "spec"))
+    (propagated-inputs
+     `(("ruby-highline" ,ruby-highline)
+       ("ruby-options" ,ruby-options)))
+    (native-inputs
+     `(("bundler" ,bundler)
+       ("ruby-rspec" ,ruby-rspec)
+       ("ruby-timecop" ,ruby-timecop)))
+    (synopsis
+     "Ruby library for displaying progress bars")
+    (description
+     "ProgressBar is a simple library for displaying progress bars.  The
+maximum value is configurable, and additional information can be displayed
+like the percentage completion, estimated time remaining, elapsed time and
+rate.")
+    (home-page "https://github.com/paul/progress_bar")
+    (license license:wtfpl2)))
+
 (define-public ruby-pry
   (package
     (name "ruby-pry")
-- 
2.14.1





Information forwarded to guix-patches <at> gnu.org:
bug#28583; Package guix-patches. (Sat, 30 Sep 2017 08:20:05 GMT) Full text and rfc822 format available.

Message #65 received at 28583 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: 28583 <at> debbugs.gnu.org
Subject: [PATCH 8/8] gnu: Add ruby-es-dump-restore.
Date: Sat, 30 Sep 2017 09:19:35 +0100
* gnu/packages/databases.scm (es-dump-restore): New variable.
---
 gnu/packages/databases.scm | 41 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index 6ce58985e..bd1c9e55e 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -68,6 +68,7 @@
   #:use-module (gnu packages python)
   #:use-module (gnu packages rdf)
   #:use-module (gnu packages readline)
+  #:use-module (gnu packages ruby)
   #:use-module (gnu packages tcl)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages xml)
@@ -77,6 +78,7 @@
   #:use-module (guix build-system gnu)
   #:use-module (guix build-system perl)
   #:use-module (guix build-system python)
+  #:use-module (guix build-system ruby)
   #:use-module (guix build-system cmake)
   #:use-module (guix utils)
   #:use-module (srfi srfi-26)
@@ -256,6 +258,45 @@ SQL, Key/Value, XML/XQuery or Java Object storage for their data model.")
                       "--enable-cxx"))))
                  %standard-phases)))))
 
+(define-public es-dump-restore
+  (package
+    (name "es-dump-restore")
+    (version "2.1.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (rubygems-uri "es_dump_restore" version))
+       (sha256
+        (base32
+         "020yk7f1hw48clmf5501z3xv9shsdchyymcv0y2cci2c1xvr1mim"))))
+    (build-system ruby-build-system)
+    (arguments
+     '(#:tests? #f ;; No testsuite.
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'wrap-bin-es_dump_restore
+           (lambda* (#:key outputs #:allow-other-keys)
+             (wrap-program (string-append (assoc-ref outputs "out")
+                                          "/bin/es_dump_restore")
+               `("GEM_PATH" ":" prefix (,(string-append
+                                          (getenv "GEM_PATH")
+                                          ":"
+                                          (getenv "GEM_HOME")))))
+             #t)))))
+    (propagated-inputs
+     `(("ruby-httpclient" ,ruby-httpclient)
+       ("ruby-multi-json" ,ruby-multi-json)
+       ("ruby-progress_bar" ,ruby-progress_bar)
+       ("ruby-rubyzip" ,ruby-rubyzip)
+       ("ruby-thor" ,ruby-thor)))
+    (synopsis "Utility for dumping and restoring ElasticSearch indexes")
+    (description
+     "This package provides a utility for dumping the contents of an
+ElasticSearch index to a compressed file and restoring the dumpfile back to an
+ElasticSearch server")
+    (home-page "https://github.com/patientslikeme/es_dump_restore")
+    (license license:expat)))
+
 (define-public leveldb
   (package
     (name "leveldb")
-- 
2.14.1





Information forwarded to guix-patches <at> gnu.org:
bug#28583; Package guix-patches. (Sat, 30 Sep 2017 08:20:05 GMT) Full text and rfc822 format available.

Message #68 received at 28583 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: 28583 <at> debbugs.gnu.org
Subject: [PATCH 4/8] gnu: Add ruby-code-statistics.
Date: Sat, 30 Sep 2017 09:19:31 +0100
From: Ben Woodcroft <donttrustben <at> gmail.com>

* gnu/packages/ruby.scm (ruby-code-statistics): New variable.
---
 gnu/packages/ruby.scm | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index ec4d33f40..283f393b8 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -4376,3 +4376,24 @@ really opens up the email messages you are parsing, if you know what you
 are doing, you can fiddle with every last bit of your email directly.")
     (home-page "https://github.com/mikel/mail")
     (license license:expat)))
+
+(define-public ruby-code-statistics
+  (package
+    (name "ruby-code-statistics")
+    (version "0.2.13")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (rubygems-uri "code_statistics" version))
+       (sha256
+        (base32
+         "07rdpsbwbmh4vp8nxyh308cj7am2pbrfhv9v5xr2d5gq8hnnsm93"))))
+    (build-system ruby-build-system)
+    (arguments
+     `(#:tests? #f)) ; Not all test code is included in gem.
+    (synopsis "Port of the rails 'rake stats' method")
+    (description
+     "This gem is a port of the rails 'rake stats' method so it can be made
+more robust and work for non rails projects.")
+    (home-page "http://github.com/danmayer/code_statistics")
+    (license license:expat)))
-- 
2.14.1





Information forwarded to guix-patches <at> gnu.org:
bug#28583; Package guix-patches. (Sat, 30 Sep 2017 08:20:06 GMT) Full text and rfc822 format available.

Message #71 received at 28583 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: 28583 <at> debbugs.gnu.org
Subject: [PATCH 7/8] gnu: Add ruby-rubyzip.
Date: Sat, 30 Sep 2017 09:19:34 +0100
* gnu/packages/ruby.scm (ruby-rubyzip): New variable.

Co-authored by Ben Woodcroft <donttrustben <at> gmail.com>.
---
 gnu/packages/ruby.scm | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 3b0a67b9d..019307629 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -1001,6 +1001,41 @@ Ruby Gems.")
     (home-page "https://github.com/postmodern/rubygems-tasks")
     (license license:expat)))
 
+(define-public ruby-rubyzip
+  (package
+  (name "ruby-rubyzip")
+  (version "1.2.1")
+  (source
+    (origin
+      (method url-fetch)
+      (uri (rubygems-uri "rubyzip" version))
+      (sha256
+        (base32
+          "06js4gznzgh8ac2ldvmjcmg9v1vg9llm357yckkpylaj6z456zqz"))))
+  (build-system ruby-build-system)
+  (arguments
+   '(#:phases
+     (modify-phases %standard-phases
+       (add-before 'check 'patch-tests
+         (lambda* (#:key inputs #:allow-other-keys)
+           (substitute* "test/gentestfiles.rb"
+             (("/usr/bin/zip")
+              (string-append
+               (assoc-ref inputs "zip") "/bin/zip")))
+           (substitute* "test/input_stream_test.rb"
+             (("/usr/bin/env ruby") (which "ruby")))
+           #t)))))
+  (native-inputs
+   `(("bundler" ,bundler)
+     ("ruby-simplecov" ,ruby-simplecov)
+     ("zip" ,zip)
+     ("unzip" ,unzip)))
+  (synopsis "Ruby module is for reading and writing zip files")
+  (description
+    "The rubyzip module provides ways to read from and create zip files.")
+  (home-page "http://github.com/rubyzip/rubyzip")
+  (license license:bsd-2)))
+
 (define-public ruby-ffi
   (package
     (name "ruby-ffi")
-- 
2.14.1





Information forwarded to guix-patches <at> gnu.org:
bug#28583; Package guix-patches. (Sat, 30 Sep 2017 08:22:02 GMT) Full text and rfc822 format available.

Message #74 received at 28583 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: Ben Woodcroft <b.woodcroft <at> uq.edu.au>
Cc: 28583 <at> debbugs.gnu.org
Subject: Re: [bug#28583] [PATCH 1/7] gnu: Add ruby-httpclient.
Date: Sat, 30 Sep 2017 09:21:10 +0100
[Message part 1 (text/plain, inline)]
On Wed, 27 Sep 2017 21:56:04 +1000
Ben Woodcroft <b.woodcroft <at> uq.edu.au> wrote:

> Hi,
> 
> Thanks for the patches.
> 
> 
> On 25/09/17 03:17, Christopher Baines wrote:
> > * gnu/packages/ruby.scm (ruby-httpclient): New variable.
> > ---
> >   gnu/packages/ruby.scm | 51
> > +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed,
> > 51 insertions(+)
> >
> > diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
> > index 80d3bffd8..ff6be875f 100644
> > --- a/gnu/packages/ruby.scm
> > +++ b/gnu/packages/ruby.scm
> > @@ -3579,6 +3579,57 @@ It has built-in support for the legacy
> > @code{cookies.txt} and (home-page
> > "https://github.com/sparklemotion/http-cookie") (license
> > license:expat))) 
> > +(define-public ruby-httpclient
> > +  (package
> > +    (name "ruby-httpclient")
> > +    (version "2.8.3")
> > +    (source
> > +     (origin
> > +       (method url-fetch)
> > +       (uri (rubygems-uri "httpclient" version))
> > +       (sha256
> > +        (base32
> > +         "19mxmvghp7ki3klsxwrlwr431li7hm1lczhhj8z4qihl2acy8l99"))))
> > +    (build-system ruby-build-system)
> > +    (arguments
> > +     '(;; TODO: Some tests currently fail
> > +       ;; ------
> > +       ;; 211 tests, 729 assertions, 13 failures, 4 errors, 0
> > pendings,
> > +       ;; 2 omissions, 0 notifications
> > +       ;; 91.866% passed
> > +       ;; ------
> > +       ;; 6.49 tests/s, 22.41 assertions/s
> > +       #:tests? #f
> > +       #:phases
> > +       (modify-phases %standard-phases
> > +         (replace 'check
> > +           (lambda* (#:key tests? #:allow-other-keys)
> > +             (if tests?
> > +                 (zero?
> > +                  (system* "ruby"
> > +                           "-Ilib"
> > +                           "test/runner.rb"))
> > +                 #t)))  
> Since tests? is #f, this is effectively dead code. But it could be 
> useful to someone continuing the tests, I'm not fussed.

I'm keen to keep it, as the #:tests? #f has a TODO comment, maybe the
tests can be made to pass in the future.

> > +         (add-after 'install 'wrap-bin-httpclient
> > +           (lambda* (#:key outputs #:allow-other-keys)
> > +             (wrap-program (string-append (assoc-ref outputs "out")
> > +                                          "/bin/httpclient")
> > +               `("GEM_HOME" ":" prefix (,(getenv "GEM_HOME"))))
> > +             #t)))))  
> It would be preferable to move this to be part of the
> ruby-build-system as is done in e.g. python-build-system, but OK.

Agreed, I'll try and make some time to look at this.
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#28583; Package guix-patches. (Sat, 30 Sep 2017 08:22:02 GMT) Full text and rfc822 format available.

Message #77 received at 28583 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: Ben Woodcroft <b.woodcroft <at> uq.edu.au>
Cc: 28583 <at> debbugs.gnu.org
Subject: Re: [bug#28583] [PATCH 2/7] gnu: Add ruby-multi-json.
Date: Sat, 30 Sep 2017 09:21:44 +0100
[Message part 1 (text/plain, inline)]
On Wed, 27 Sep 2017 22:03:32 +1000
Ben Woodcroft <b.woodcroft <at> uq.edu.au> wrote:

> On 25/09/17 03:17, Christopher Baines wrote:
> > * gnu/packages/ruby.scm (ruby-multi-json): New variable.  
> [..]
> > +    (arguments
> > +     '(#:tests? #f)) ;; No testsuite.  
> No testsuite included in distributed gem, rather.

I've updated the comment.

> > +    (synopsis
> > +     "Common interface to multiple JSON libraries for Ruby")
> > +    (description
> > +     "This package provides a common interface to multiple JSON
> > libraries, +including Oj, Yajl, the JSON gem (with C-extensions),
> > the pure-Ruby JSON gem, +NSJSONSerialization, gson.rb, JrJackson,
> > and OkJson.")
> > +    (home-page
> > +     "http://github.com/intridea/multi_json")  
> Both home-page and synopsis could be moved to the line before.

And also updated the formatting.

> Otherwise LGTM.
> ben

[Message part 2 (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#28583; Package guix-patches. (Sat, 30 Sep 2017 08:24:02 GMT) Full text and rfc822 format available.

Message #80 received at 28583 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: Ben Woodcroft <b.woodcroft <at> uq.edu.au>
Cc: 28583 <at> debbugs.gnu.org
Subject: Re: [bug#28583] [PATCH 4/7] gnu: Add ruby-highline.
Date: Sat, 30 Sep 2017 09:23:07 +0100
[Message part 1 (text/plain, inline)]
On Wed, 27 Sep 2017 22:37:39 +1000
Ben Woodcroft <b.woodcroft <at> uq.edu.au> wrote:

> On 25/09/17 03:17, Christopher Baines wrote:
> > * gnu/packages/ruby.scm (ruby-highline): New variable.
> > ---
> >   gnu/packages/ruby.scm | 27 +++++++++++++++++++++++++++
> >   1 file changed, 27 insertions(+)
> >
> > diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
> > index 1ee03e066..9863d4b37 100644
> > --- a/gnu/packages/ruby.scm
> > +++ b/gnu/packages/ruby.scm
> > @@ -216,6 +216,33 @@ a focus on simplicity and productivity.")
> >                (("/bin/sh") (which "sh"))))
> >            %standard-phases)))))
> >   
> > +(define-public ruby-highline
> > +  (package
> > +    (name "ruby-highline")
> > +    (version "1.7.8")
> > +    (source
> > +     (origin
> > +       (method url-fetch)
> > +       (uri (rubygems-uri "highline" version))
> > +       (sha256
> > +        (base32
> > +         "1nf5lgdn6ni2lpfdn4gk3gi47fmnca2bdirabbjbz1fk9w4p8lkr"))))
> > +    (build-system ruby-build-system)
> > +    (arguments
> > +     `(#:tests? #f)) ;; TODO: Requires code_statistics  
> I've attached a package for code_statistics, but adding it does not
> help because there appears to be something amiss in the Rakefile.
> This has been fixed in the not quite released 2.0.0 version, so the
> patch may be useful in future.

Awesome, thanks Ben. I've send an updated set of patches, including this
one now. It looks good to me.

> > +    (native-inputs
> > +     `(("bundler" ,bundler)))
> > +    (synopsis
> > +     "HighLine helps you build command-line interfaces")
> > +    (description
> > +     "HighLine provides a high-level IO library that provides
> > validation, +type conversion, and more for command-line interfaces.
> > +
> > +HighLine also includes a menu system for providing multiple
> > options to the +user.")  
> I would combine the two sentences into one paragraph.

I've made this change in the updated patches.

> Otherwise LGTM.
> 

[Message part 2 (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#28583; Package guix-patches. (Sat, 30 Sep 2017 08:24:02 GMT) Full text and rfc822 format available.

Message #83 received at 28583 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: Ben Woodcroft <b.woodcroft <at> uq.edu.au>
Cc: 28583 <at> debbugs.gnu.org
Subject: Re: [bug#28583] [PATCH 5/7] gnu: Add ruby-progress_bar.
Date: Sat, 30 Sep 2017 09:23:37 +0100
[Message part 1 (text/plain, inline)]
On Wed, 27 Sep 2017 22:43:31 +1000
Ben Woodcroft <b.woodcroft <at> uq.edu.au> wrote:

> On 25/09/17 03:17, Christopher Baines wrote:
> > * gnu/packages/ruby.scm (ruby-progress_bar): New variable.
> > ---
> >   gnu/packages/ruby.scm | 31 +++++++++++++++++++++++++++++++
> >   1 file changed, 31 insertions(+)
> >
> > diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
> > index 9863d4b37..5dde022c6 100644
> > --- a/gnu/packages/ruby.scm
> > +++ b/gnu/packages/ruby.scm
> > @@ -2114,6 +2114,37 @@ for select languages.")
> >       (home-page "http://coderay.rubychan.de")
> >       (license license:expat)))
> >   
> > +(define-public ruby-progress_bar
> > +  (package
> > +    (name "ruby-progress_bar")  
> OK. Unfortunate that there is also a progress-bar gem.

Indeed, I packaged the wrong one at first, and was wondering why things
were not working...

> LGTM.

[Message part 2 (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#28583; Package guix-patches. (Sat, 30 Sep 2017 08:25:02 GMT) Full text and rfc822 format available.

Message #86 received at 28583 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: Ben Woodcroft <b.woodcroft <at> uq.edu.au>
Cc: 28583 <at> debbugs.gnu.org
Subject: Re: [bug#28583] [PATCH 6/7] gnu: Add ruby-rubyzip.
Date: Sat, 30 Sep 2017 09:24:01 +0100
[Message part 1 (text/plain, inline)]
On Thu, 28 Sep 2017 18:34:30 +1000
Ben Woodcroft <b.woodcroft <at> uq.edu.au> wrote:

> Hi,
> 
> 
> On 25/09/17 03:17, Christopher Baines wrote:
> > * gnu/packages/ruby.scm (ruby-rubyzip): New variable.  
> I made a few changes, and got the tests to pass - patch attached.
> WDYT? ben

Awesome, I've replaced the previous patch with the one you provided.

[Message part 2 (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#28583; Package guix-patches. (Sat, 30 Sep 2017 08:26:01 GMT) Full text and rfc822 format available.

Message #89 received at 28583 <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: Ben Woodcroft <b.woodcroft <at> uq.edu.au>
Cc: 28583 <at> debbugs.gnu.org
Subject: Re: [bug#28583] [PATCH 7/7] gnu: Add es-dump-restore.
Date: Sat, 30 Sep 2017 09:25:23 +0100
[Message part 1 (text/plain, inline)]
On Thu, 28 Sep 2017 18:38:19 +1000
Ben Woodcroft <b.woodcroft <at> uq.edu.au> wrote:

> On 25/09/17 03:17, Christopher Baines wrote:
> > * gnu/packages/databases.scm (es-dump-restore): New variable.  
> [..]
> > +    (arguments
> > +     '(#:tests? #f  
> Including a reason here would be good.

Done, turns out the reason is that there is no testsuite.

> > +       #:phases
> > +       (modify-phases %standard-phases
> > +         (add-after 'install 'wrap-bin-es_dump_restore
> > +           (lambda* (#:key outputs #:allow-other-keys)
> > +             (wrap-program (string-append (assoc-ref outputs "out")
> > +                                          "/bin/es_dump_restore")
> > +               `("GEM_PATH" ":" prefix (,(string-append
> > +                                          (getenv "GEM_PATH")
> > +                                          ":"
> > +                                          (getenv "GEM_HOME")))))
> > +             #t)))))  
> Again, it would be preferable to have this done as part of the build 
> system, but OK.
> 
> > +    (propagated-inputs
> > +     `(("ruby-httpclient" ,ruby-httpclient)
> > +       ("ruby-multi-json" ,ruby-multi-json)
> > +       ("ruby-progress_bar" ,ruby-progress_bar)
> > +       ("ruby-rubyzip" ,ruby-rubyzip)
> > +       ("ruby-thor" ,ruby-thor)))
> > +    (synopsis
> > +     "Utility for dumping and restoring ElasticSearch indexes")  
> This can be moved onto the previous line.
> 
> > +    (description
> > +     "This package provides a utility for dumping the contents of
> > an +ElasticSearch index to a compressed file and restoring the
> > dumpfile back to an +ElasticSearch server")
> > +    (home-page
> > +     "https://github.com/patientslikeme/es_dump_restore")  
> As can this. Otherwise LGTM - thanks for this series.

These two formatting issues should be fixed now. Thanks for the review
and patches Ben. I've sent an updated set of patches.

[Message part 2 (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#28583; Package guix-patches. (Sat, 30 Sep 2017 10:34:01 GMT) Full text and rfc822 format available.

Message #92 received at 28583 <at> debbugs.gnu.org (full text, mbox):

From: Ben Woodcroft <b.woodcroft <at> uq.edu.au>
To: Christopher Baines <mail <at> cbaines.net>
Cc: 28583 <at> debbugs.gnu.org
Subject: Re: [bug#28583] [PATCH 7/7] gnu: Add es-dump-restore.
Date: Sat, 30 Sep 2017 20:32:54 +1000
Hi Chris,


On 30/09/17 18:25, Christopher Baines wrote:
>
> These two formatting issues should be fixed now. Thanks for the review
> and patches Ben. I've sent an updated set of patches.
>
Thanks. Feel free to push them - I am happy if you are.
ben




Reply sent to Christopher Baines <mail <at> cbaines.net>:
You have taken responsibility. (Sat, 30 Sep 2017 10:53:01 GMT) Full text and rfc822 format available.

Notification sent to Christopher Baines <mail <at> cbaines.net>:
bug acknowledged by developer. (Sat, 30 Sep 2017 10:53:01 GMT) Full text and rfc822 format available.

Message #97 received at 28583-done <at> debbugs.gnu.org (full text, mbox):

From: Christopher Baines <mail <at> cbaines.net>
To: Ben Woodcroft <b.woodcroft <at> uq.edu.au>
Cc: 28583-done <at> debbugs.gnu.org
Subject: Re: [bug#28583] [PATCH 7/7] gnu: Add es-dump-restore.
Date: Sat, 30 Sep 2017 11:52:04 +0100
[Message part 1 (text/plain, inline)]
On Sat, 30 Sep 2017 20:32:54 +1000
Ben Woodcroft <b.woodcroft <at> uq.edu.au> wrote:

> Hi Chris,
> 
> 
> On 30/09/17 18:25, Christopher Baines wrote:
> >
> > These two formatting issues should be fixed now. Thanks for the
> > review and patches Ben. I've sent an updated set of patches.
> >  
> Thanks. Feel free to push them - I am happy if you are.

Awesome. I've now pushed these patches. Thanks for your review.
[Message part 2 (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 28 Oct 2017 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 175 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.