aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2017-09-22 20:14:22 +0100
committerChristopher Baines <mail@cbaines.net>2017-09-30 11:46:06 +0100
commit1c8e6fd30f31c61ba74344921e4d95d4867f25b5 (patch)
tree7e867dc2fed692a97fa3af59fbd724acbf2e210f /gnu/packages
parent6e79949f46caf8a4e289163bca839ed9127953b5 (diff)
downloadguix-1c8e6fd30f31c61ba74344921e4d95d4867f25b5.tar
guix-1c8e6fd30f31c61ba74344921e4d95d4867f25b5.tar.gz
gnu: Add ruby-httpclient.
* gnu/packages/ruby.scm (ruby-httpclient): New variable.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/ruby.scm51
1 files changed, 51 insertions, 0 deletions
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 80d3bffd84..ff6be875fb 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")