summary refs log tree commit diff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2019-01-27 16:41:38 +0000
committerChristopher Baines <mail@cbaines.net>2019-02-14 21:37:56 +0000
commit6f8bf0ebe3043dc604403ade71ad30a59efbdfc6 (patch)
treee0a7a9d6301c74704b22e1b71cc8f31689109214
parent21781436515d1b0241d9c85017dd83634b0c8070 (diff)
downloadguix-6f8bf0ebe3043dc604403ade71ad30a59efbdfc6.tar.gz
gnu: Add ruby-crack.
Required for ruby-webmock.

* gnu/packages/ruby.scm (ruby-crack): New variable.
-rw-r--r--gnu/packages/ruby.scm32
1 files changed, 32 insertions, 0 deletions
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 4b20ead9b4..a0c0706f0c 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -811,6 +811,38 @@ value is found.")
     (home-page "https://github.com/egonSchiele/contracts.ruby")
     (license license:bsd-2)))
 
+(define-public ruby-crack
+  (package
+    (name "ruby-crack")
+    (version "0.4.3")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (rubygems-uri "crack" version))
+       (sha256
+        (base32
+         "0abb0fvgw00akyik1zxnq7yv391va148151qxdghnzngv66bl62k"))))
+    (build-system ruby-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests?
+               (for-each (lambda (file)
+                           (display file)(display "\n")
+                           (invoke "ruby" "-Ilib" "-Itest" "-rrubygems" file))
+                         (find-files "test" ".*rb$")))
+             #t)))))
+    (propagated-inputs
+     `(("ruby-safe-yaml" ,ruby-safe-yaml)))
+    (synopsis "Simple JSON and XML parsing for Ruby")
+    (description
+     "@code{crack} provides really simple JSON and XML parsing, extracted from
+code in Merb and Rails.")
+    (home-page "https://github.com/jnunemaker/crack")
+    (license license:expat)))
+
 (define-public ruby-czmq-ffi-gen
   (package
     (name "ruby-czmq-ffi-gen")