Subject: [PATCH v2 18/27] gnu: Add ruby-money-open-exchange-rates.

From: Stephen Paul Weber <[email-masked]>
Date: Wed, 27 Apr 2022 13:46:24 -0500

* gnu/packages/ruby.scm (ruby-money-open-exchange-rates): New variable.
---
 gnu/packages/ruby.scm | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 0d9214bae1..100f9fd1ad 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -12697,3 +12697,38 @@ Money objects.")
     (home-page
       "https://github.com/RubyMoney/monetize")
     (license license:expat)))
+
+(define-public ruby-money-open-exchange-rates
+  (package
+    (name "ruby-money-open-exchange-rates")
+    (version "1.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/spk/money-open-exchange-rates")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "11xwqli8snr19k48yh8h77sal5vxd4snzq9gxg08v61f0574m3gw"))))
+    (build-system ruby-build-system)
+    (propagated-inputs `(("ruby-money" ,ruby-money)))
+    (native-inputs
+     `(("ruby-minitest" ,ruby-minitest)
+       ("ruby-mocha" ,ruby-mocha)
+       ("ruby-timecop" ,ruby-timecop)
+       ("ruby-webmock" ,ruby-webmock)
+       ("ruby-monetize" ,ruby-monetize)
+       ("ruby-rake" ,ruby-rake)
+       ("ruby-rubocop" ,ruby-rubocop)))
+    (synopsis
+      "Calculates the exchange rate using published rates from open-exchange-rates")
+    (description
+      "This package provides a gem that calculates the exchange rate using
+published rates from open-exchange-rates.  Compatible with the money gem.")
+    (home-page
+      "https://github.com/spk/money-open-exchange-rates")
+    (license license:expat)))
-- 
2.30.2