summary refs log tree commit diff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2019-02-17 17:13:34 +0000
committerChristopher Baines <mail@cbaines.net>2019-03-04 20:33:20 +0000
commite42eecdb78130d9910d5569d8f7d220ad45f1bb8 (patch)
tree16a664edf0d52d287ac14ce3ab8c08ed843a050b
parente32c99d23ea2927bf9ce2a974f6e5b27f2d28f35 (diff)
downloadguix-e42eecdb78130d9910d5569d8f7d220ad45f1bb8.tar.gz
gnu: Add ruby-warden-oauth2.
* gnu/packages/ruby.scm (ruby-warden-oauth2): New variable.
-rw-r--r--gnu/packages/ruby.scm48
1 files changed, 48 insertions, 0 deletions
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 06ec2e7129..a98b531837 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -5838,6 +5838,54 @@ authentication in Ruby web applications.")
     (home-page "https://github.com/wardencommunity/warden")
     (license license:expat)))
 
+(define-public ruby-warden-oauth2
+  (package
+    (name "ruby-warden-oauth2")
+    (version "0.0.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (rubygems-uri "warden-oauth2" version))
+       (sha256
+        (base32
+         "1z9154lvzrnnfjbjkmirh4n811nygp6pm2fa6ikr7y1ysa4zv3cz"))))
+    (build-system ruby-build-system)
+    (arguments
+     '(#:test-target "spec"
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'remove-unnecessary-dependencies
+           (lambda _
+             (substitute* "Gemfile"
+               ;; All of these gems relate to development, and are unnecessary
+               ;; when running the tests
+               (("gem 'guard-bundler'") "")
+               (("gem 'guard'") "")
+               (("gem 'guard-rspec'") "")
+               (("gem 'rb-fsevent'") "")
+               (("gem 'pry'") "")
+               (("gem 'growl'") ""))
+             #t))
+         ;; The test suite doesn't work with rspec@2, and this is incompatible
+         ;; with the current version of Rake, so invoke Rspec directly
+         (replace 'check
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests?
+               (invoke "bundle" "exec" "rspec"))
+             #t)))))
+    (propagated-inputs
+     `(("ruby-warden" ,ruby-warden)))
+    (native-inputs
+     `(("bundler" ,bundler)
+       ("ruby-rspec" ,ruby-rspec-2)
+       ("ruby-rack-test" ,ruby-rack-test)))
+    (synopsis "OAuth 2.0 strategies for Warden")
+    (description
+     "This library extends Warden to support OAuth 2.0 authorized API
+requests.")
+    (home-page "https://github.com/opperator/warden-oauth2")
+    (license license:expat)))
+
 (define-public ruby-webmock-2
   (package
     (name "ruby-webmock")