[bug#34514,06/34] gnu: Add ruby-jwt.

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

Checks

Context Check Description
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied
cbaines/applying patch success Successfully applied

Commit Message

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

Comments

Ricardo Wurmus Feb. 20, 2019, 11:54 a.m. UTC | #1
Christopher Baines <mail@cbaines.net> writes:

> * gnu/packages/ruby.scm (ruby-jwt): New variable.
> ---
>  gnu/packages/ruby.scm | 37 +++++++++++++++++++++++++++++++++++++
>  1 file changed, 37 insertions(+)
>
> diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
> index b17a03e7cc..5b4d52ac4a 100644
> --- a/gnu/packages/ruby.scm
> +++ b/gnu/packages/ruby.scm
> @@ -3952,6 +3952,43 @@ a native C extension.")
>      (home-page "https://flori.github.com/json")
>      (license license:ruby)))
>
> +(define-public ruby-jwt
> +  (package
> +    (name "ruby-jwt")
> +    (version "2.1.0")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (rubygems-uri "jwt" version))
> +       (sha256
> +        (base32
> +         "1w0kaqrbl71cq9sbnixc20x5lqah3hs2i93xmhlfdg2y3by7yzky"))))
> +    (build-system ruby-build-system)
> +    (arguments
> +     '(#:test-target "test"
> +       #:phases
> +       (modify-phases %standard-phases
> +         (add-after 'unpack 'remove-unnecessary-dependencies
> +           (lambda _
> +             (substitute* "spec/spec_helper.rb"
> +               (("require 'simplecov.*") "\n")
> +               ;; Use [].each to disable running the SimpleCov configuration
> +               ;; block
> +               (("SimpleCov\\.configure") "[].each")
> +               (("require 'codeclimate-test-reporter'") "")
> +               (("require 'codacy-coverage'") "")
> +               (("Codacy::Reporter\\.start") "")))))))

Please end this lambda with #T.

> +     "This package provides a pure Ruby implementation of the RFC 7519 OAuth
> +@acronym{JWT, JSON Web Token} standard.")

If ’guix lint’ doesn’t complain about the use of @acronym (I’ve never
used it in a description) it’s all good.


--
Ricardo
Christopher Baines March 2, 2019, 12:34 p.m. UTC | #2
Ricardo Wurmus <rekado@elephly.net> writes:

> Christopher Baines <mail@cbaines.net> writes:
>
>> * gnu/packages/ruby.scm (ruby-jwt): New variable.
>> ---
>>  gnu/packages/ruby.scm | 37 +++++++++++++++++++++++++++++++++++++
>>  1 file changed, 37 insertions(+)
>>
>> diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
>> index b17a03e7cc..5b4d52ac4a 100644
>> --- a/gnu/packages/ruby.scm
>> +++ b/gnu/packages/ruby.scm
>> @@ -3952,6 +3952,43 @@ a native C extension.")
>>      (home-page "https://flori.github.com/json")
>>      (license license:ruby)))
>>
>> +(define-public ruby-jwt
>> +  (package
>> +    (name "ruby-jwt")
>> +    (version "2.1.0")
>> +    (source
>> +     (origin
>> +       (method url-fetch)
>> +       (uri (rubygems-uri "jwt" version))
>> +       (sha256
>> +        (base32
>> +         "1w0kaqrbl71cq9sbnixc20x5lqah3hs2i93xmhlfdg2y3by7yzky"))))
>> +    (build-system ruby-build-system)
>> +    (arguments
>> +     '(#:test-target "test"
>> +       #:phases
>> +       (modify-phases %standard-phases
>> +         (add-after 'unpack 'remove-unnecessary-dependencies
>> +           (lambda _
>> +             (substitute* "spec/spec_helper.rb"
>> +               (("require 'simplecov.*") "\n")
>> +               ;; Use [].each to disable running the SimpleCov configuration
>> +               ;; block
>> +               (("SimpleCov\\.configure") "[].each")
>> +               (("require 'codeclimate-test-reporter'") "")
>> +               (("require 'codacy-coverage'") "")
>> +               (("Codacy::Reporter\\.start") "")))))))
>
> Please end this lambda with #T.

Good spot, I'll add #t.

>> +     "This package provides a pure Ruby implementation of the RFC 7519 OAuth
>> +@acronym{JWT, JSON Web Token} standard.")
>
> If ’guix lint’ doesn’t complain about the use of @acronym (I’ve never
> used it in a description) it’s all good.

Yep, it seems to be fine with it :)

Patch

diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index b17a03e7cc..5b4d52ac4a 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -3952,6 +3952,43 @@  a native C extension.")
     (home-page "https://flori.github.com/json")
     (license license:ruby)))
 
+(define-public ruby-jwt
+  (package
+    (name "ruby-jwt")
+    (version "2.1.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (rubygems-uri "jwt" version))
+       (sha256
+        (base32
+         "1w0kaqrbl71cq9sbnixc20x5lqah3hs2i93xmhlfdg2y3by7yzky"))))
+    (build-system ruby-build-system)
+    (arguments
+     '(#:test-target "test"
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'remove-unnecessary-dependencies
+           (lambda _
+             (substitute* "spec/spec_helper.rb"
+               (("require 'simplecov.*") "\n")
+               ;; Use [].each to disable running the SimpleCov configuration
+               ;; block
+               (("SimpleCov\\.configure") "[].each")
+               (("require 'codeclimate-test-reporter'") "")
+               (("require 'codacy-coverage'") "")
+               (("Codacy::Reporter\\.start") "")))))))
+    (native-inputs
+     `(("bundler" ,bundler)
+       ("ruby-rspec" ,ruby-rspec)
+       ("ruby-rbnacl" ,ruby-rbnacl)))
+    (synopsis "Ruby implementation of the JSON Web Token standard")
+    (description
+     "This package provides a pure Ruby implementation of the RFC 7519 OAuth
+@acronym{JWT, JSON Web Token} standard.")
+    (home-page "https://github.com/jwt/ruby-jwt")
+    (license license:expat)))
+
 ;; Even though this package only provides bindings for a Mac OSX API it is
 ;; required by "ruby-listen" at runtime.
 (define-public ruby-rb-fsevent