diff mbox series

[bug#50537,v2,05/27] gnu: Add ruby-braintree.

Message ID 20220427184633.94169-5-singpolyma@singpolyma.net
State Accepted
Headers show
Series [bug#50537,v2,01/27] gnu: Add ruby-sucker-punch | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Stephen Paul Weber April 27, 2022, 6:46 p.m. UTC
* gnu/pacakges/ruby.scm (ruby-braintree): New variable.
---
 gnu/packages/ruby.scm | 46 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 34d5a22908..f9edb4ac3f 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -12345,3 +12345,49 @@  completes")
       "XMPP DSL for Ruby written on top of EventMachine and Nokogiri")
     (home-page "https://github.com/adhearsion/blather")
     (license license:expat)))
+
+(define-public ruby-braintree
+  (package
+    (name "ruby-braintree")
+    (version "4.4.0")
+    (source
+     (origin
+       (method git-fetch)
+       ;; Download from GitHub because the rubygems version does not contain
+       ;; Rakefile.
+       (uri (git-reference
+             (url "https://github.com/braintree/braintree_ruby")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "0dzf26yhmlf65464nranvqg5rzhrc8gfaqbg3p4ld3abz8ccnw08"))))
+    (build-system ruby-build-system)
+    (arguments
+     `(#:test-target "test:unit"
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'less-strict-dependencies
+           (lambda _
+             (substitute* "Gemfile"
+               (("gem \"libxml-ruby\", \"3.2.0\"") "gem \"libxml-ruby\", \"~> 3.0.0\"")
+               (("gem \"rspec\", \"3.9.0\"") "gem \"rspec\", \"~> 3.8.0\"")
+               (("gem \"rubocop\", \"~>1.12.0\"") "gem \"rubocop\", \"~> 1.10.0\""))
+             #t)))))
+    (propagated-inputs
+      `(("ruby-builder" ,ruby-builder)
+        ("ruby-rexml" ,ruby-rexml)))
+    (native-inputs
+     `(("ruby-rspec" ,ruby-rspec)
+       ("ruby-libxml" ,ruby-libxml)
+       ("ruby-pry" ,ruby-pry)
+       ("ruby-rake" ,ruby-rake)
+       ("ruby-webrick" ,ruby-webrick)
+       ("ruby-rubocop" ,ruby-rubocop)))
+    (synopsis
+      "Resources and tools integrating Braintree's global payments platform")
+    (description
+      "Resources and tools for developers to integrate Braintree's global
+payments platform.")
+    (home-page "https://www.braintreepayments.com/")
+    (license license:expat)))