diff mbox series

[bug#65131,01/32] gnu: Add ruby-excon.

Message ID 1a164f28a7bb085ca362c245f644c30085644125.1691432343.git.h.goebel@crazy-compilers.com
State New
Headers show
Series Add vagrant, some vagrant plugins and required ruby modules | expand

Commit Message

Hartmut Goebel Aug. 7, 2023, 6:26 p.m. UTC
* gnu/packages/ruby.scm (ruby-excon): New variable.
---
 gnu/packages/ruby.scm | 48 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 48 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index e0dca646ac..e3bb5bf5ed 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -34,6 +34,7 @@ 
 ;;; Copyright © 2023 Yovan Naumovski <yovan@gorski.stream>
 ;;; Copyright © 2023 gemmaro <gemmaro.dev@gmail.com>
 ;;; Copyright © 2023 Janneke Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2023 Hartmut Goebel <h.goebel@crazy-compilers.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -13774,6 +13775,53 @@  GFM dialect to HTML.")
 parser for writing http servers, clients and proxies.")
     (license license:expat)))
 
+(define-public ruby-excon
+  (package
+    (name "ruby-excon")
+    (version "0.100.0")
+    (source (origin
+              (method git-fetch)        ;for tests
+              (uri (git-reference
+                    (url "https://github.com/excon/excon")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "158p9z0jk6042ambqdc68qh5n5j58c2w19hc32aa1d045l45pagh"))))
+    (build-system ruby-build-system)
+    (arguments
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (replace 'replace-git-ls-files
+            (lambda _
+              (substitute* "excon.gemspec"
+                (("`git ls-files -- data/. lib/.`")
+                 "`find data lib -type f`"))))
+          (add-before 'check 'disable-server-spec-checks
+            (lambda _ ;; TODO: Remove this if ruby-unicorn is available.
+              ;; Some of the tests in this file require ruby-unicorn, which is
+              ;; not yet packaged for guix and would pull in a lot of other
+              ;; dependencies.
+              (delete-file "spec/excon/test/server_spec.rb"))))))
+    (native-inputs
+     (list
+      ruby-activesupport
+      ruby-eventmachine
+      ruby-json
+      ruby-open4
+      ruby-puma
+      ruby-rspec
+      ruby-shindo
+      ruby-sinatra
+      ruby-webrick))
+    (synopsis "Usable, fast, simple Ruby HTTP 1.1")
+    (description "Excon was designed to be simple, fast and performant.  It
+works great as a general HTTP(s) client and is particularly well suited to
+usage in API clients.")
+    (home-page "https://github.com/excon/excon")
+    (license license:expat)))
+
 (define-public ruby-em-websocket
   (package
     (name "ruby-em-websocket")