[bug#34514,13/34] gnu: Add ruby-omniauth-oauth2.

Message ID 20190217192314.5666-13-mail@cbaines.net
State Accepted
Commit d6084cdb12f85b4e6bf3db8485a44cc9514cfab5
Headers show
Series Add more Ruby gems, some Rails related | expand

Checks

Context Check Description
cbaines/applying patch fail Apply failed
cbaines/applying patch fail Apply failed
cbaines/applying patch fail Apply failed
cbaines/applying patch fail Apply failed
cbaines/applying patch fail Apply failed
cbaines/applying patch fail Apply failed
cbaines/applying patch fail Apply failed
cbaines/applying patch fail Apply failed
cbaines/applying patch fail Apply failed
cbaines/applying patch fail Apply failed
cbaines/applying patch fail Apply failed
cbaines/applying patch fail Apply failed
cbaines/applying patch fail Apply failed

Commit Message

Christopher Baines Feb. 17, 2019, 7:22 p.m. UTC
* gnu/packages/ruby.scm (ruby-omniauth-oauth2): New variable.
---
 gnu/packages/ruby.scm | 42 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

Patch

diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 7a883c2366..f203b1f4f2 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -1150,6 +1150,48 @@  authentication.")
     (home-page "https://github.com/omniauth/omniauth")
     (license license:expat)))
 
+(define-public ruby-omniauth-oauth2
+  (package
+    (name "ruby-omniauth-oauth2")
+    (version "1.6.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (rubygems-uri "omniauth-oauth2" version))
+       (sha256
+        (base32
+         "11mi36l9d97r77q99jnafdc1yaa0a9wahhpp7dj7ank8q52g7g79"))))
+    (build-system ruby-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'remove-unnecessary-dependencies
+           (lambda _
+             ;; The coveralls gem submits coverage information to an online
+             ;; service, and is unnecessary when running the tests
+             (substitute* "Gemfile"
+               ((".*coveralls\"") ""))
+             (substitute* "spec/helper.rb"
+               (("require \"coveralls\"") "")
+               (("Coveralls::SimpleCov::Formatter") ""))
+             #t)))))
+    (propagated-inputs
+     `(("ruby-oauth2" ,ruby-oauth2)
+       ("ruby-omniauth" ,ruby-omniauth)))
+    (native-inputs
+     `(("bundler" ,bundler)
+       ("ruby-rspec" ,ruby-rspec)
+       ("ruby-simplecov" ,ruby-simplecov)
+       ("ruby-rack-test" ,ruby-rack-test)
+       ("ruby-webmock" ,ruby-webmock-2)))
+    (synopsis "Abstract OAuth2 strategy for OmniAuth")
+    (description
+     "This library provides a generic OAuth2 strategy for OmniAuth.  It
+doesn't provide a way to gather user information, so should be used as a
+building block for authentication strategies.")
+    (home-page "https://github.com/omniauth/omniauth-oauth2")
+    (license license:expat)))
+
 (define-public ruby-open4
   (package
   (name "ruby-open4")