Patchwork gnu: ruby-net-http-digest-auth: Add new package

login
register
mail settings
Submitter Frederick Muriithi
Date Nov. 16, 2016, 3:57 p.m.
Message ID <CALjrZwZu-jyQf6h+Sbf9jyPzY04YZ7N=qid2xAZVPfah2dPDrQ@mail.gmail.com>
Download mbox | patch
Permalink /patch/17515/
State New
Headers show

Comments

Frederick Muriithi - Nov. 16, 2016, 3:57 p.m.
I have created a new package definition for ruby-net-http-digest-auth
with some updates to the synopsis and description, as was requested.

Please find the patch attached.
Ben Woodcroft - Nov. 17, 2016, 10:56 a.m.
Hi Frederick, thanks for the updated patch.

I didn't see any functional issues with this patch, but I had some 
trouble testing this out - can I ask how to test it? My problem was 
simply that I didn't know of a http-only server with this authentication 
method. I ask because the last commit to the development repository was 
in 2013.

Below is some minor points about the patch. If you are happy with them 
and we are confident in the testing then I'll push with these changes. 
Do not worry about sending an updated patch.

On 17/11/16 01:57, Frederick Muriithi wrote:
> gnu: ruby-net-http-digest-auth: Add new package
>
> * gnu/packages/ruby.scm (ruby-net-http-digest-auth): Added a new
>   package definition

I changed the commit message to the following as conventional:

gnu: Add ruby-net-http-digest-auth.

* gnu/packages/ruby.scm (ruby-net-http-digest-auth): New variable.

> ---
>  gnu/packages/ruby.scm | 24 ++++++++++++++++++++++++
>  1 file changed, 24 insertions(+)
>
> diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
> index 42beda3..ab10664 100644
> --- a/gnu/packages/ruby.scm
> +++ b/gnu/packages/ruby.scm
> @@ -4179,3 +4179,27 @@ patterns.")
>  libraries for compiling Ruby native extensions.")
>      (home-page "https://github.com/ruby-gnome2/pkg-config")
>      (license license:lgpl2.0+)))
> +
> +(define-public ruby-net-http-digest-auth
> +  (package
> +    (name "ruby-net-http-digest-auth")
> +    (version "1.4")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (rubygems-uri "net-http-digest_auth" version))
> +       (sha256
> +        (base32
> + "14801gr34g0rmqz9pv4rkfa3crfdbyfk6r48vpg5a5407v0sixqi"))))
> +    (build-system ruby-build-system)
> +    (inputs
> +     `(("ruby-hoe" ,ruby-hoe)))
This should be a native-input.

> +    (synopsis
> +     "Library for HTTP Digest Authentication based on RFC 2617")
In general we make a habit of keeping this all on one line. How about this?

     (synopsis "RFC 2617 HTTP digest authentication library")

> +    (description
> +     "This library implements HTTP's Digest Authentication scheme in 
> ruby.
> +This enables you to use the Digest Authentication scheme,
> +over the more insecure Basic Authentication scheme")
My science-based bias against personal pronouns perhaps, how does this 
sound?

     (description
      "This library implements HTTP's digest authentication scheme based on
RFC 2617.  This enables the use of the digest authentication scheme instead
of the more insecure basic authentication scheme.")

> +    (home-page
> +     "http://github.com/drbrain/net-http-digest_auth")
Best to keep that on one line.

> +    (license license:expat)))

Thanks.
ben
Frederick Muriithi - Nov. 17, 2016, 11:47 a.m.
On 17 Nov 2016 1:56 p.m., "Ben Woodcroft" <b.woodcroft@uq.edu.au> wrote:
>
> Hi Frederick, thanks for the updated patch.
>
> I didn't see any functional issues with this patch, but I had some trouble testing this out - can I ask how to test it? My problem was simply that I didn't know of a http-only server with this authentication method. I ask because the last commit to the development repository was in 2013.

Well, I added the package since it is a dependency of the ruby gem
mechanize, which is what I really wanted to add.

Mechanize is used to simplify interaction with websites, and thus,
might encounter sites that require Digest Authentication, even if they
are not necessarily public facing

>
> Below is some minor points about the patch. If you are happy with them and we are confident in the testing then I'll push with these changes. Do not worry about sending an updated patch.

The points are okay with me. I'm new to the packaging world, so I'm
still learning. Thanks for the pointers

>> + "14801gr34g0rmqz9pv4rkfa3crfdbyfk6r48vpg5a5407v0sixqi"))))
>> +    (build-system ruby-build-system)
>> +    (inputs
>> +     `(("ruby-hoe" ,ruby-hoe)))
>
> This should be a native-input.
>

Okay. Thanks.


>> +    (synopsis
>> +     "Library for HTTP Digest Authentication based on RFC 2617")
>
> In general we make a habit of keeping this all on one line. How about this?
>
>     (synopsis "RFC 2617 HTTP digest authentication library")
>

That is better than what I had.


>> +    (description
>> +     "This library implements HTTP's Digest Authentication scheme in ruby.
>> +This enables you to use the Digest Authentication scheme,
>> +over the more insecure Basic Authentication scheme")
>
> My science-based bias against personal pronouns perhaps, how does this sound?
>
>     (description
>      "This library implements HTTP's digest authentication scheme based on
> RFC 2617.  This enables the use of the digest authentication scheme instead
> of the more insecure basic authentication scheme.")
>

Also okay.
Ben Woodcroft - Nov. 19, 2016, 5:20 a.m.
Hi Frederick,


On 17/11/16 21:47, Frederick Muriithi wrote:
> On 17 Nov 2016 1:56 p.m., "Ben Woodcroft" <b.woodcroft@uq.edu.au> wrote:
>> Hi Frederick, thanks for the updated patch.
>>
>> I didn't see any functional issues with this patch, but I had some trouble testing this out - can I ask how to test it? My problem was simply that I didn't know of a http-only server with this authentication method. I ask because the last commit to the development repository was in 2013.
> Well, I added the package since it is a dependency of the ruby gem
> mechanize, which is what I really wanted to add.
OK, I made a WEBrick-based server to test, and all seemed fine. Pushed 
as '6689c636d039ce5bf160c1858b99f4329427fd15'.

Thanks for the patch,
ben

Patch

From 2c2917bd1fc1ec71f72db84ae48c5342b7455239 Mon Sep 17 00:00:00 2001
From: Muriithi Frederick Muriuki <fredmanglis@gmail.com>
Date: Wed, 16 Nov 2016 18:19:58 +0300
Subject: [PATCH] gnu: ruby-net-http-digest-auth: Add new package

* gnu/packages/ruby.scm (ruby-net-http-digest-auth): Added a new
  package definition
---
 gnu/packages/ruby.scm | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 42beda3..ab10664 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -4179,3 +4179,27 @@  patterns.")
 libraries for compiling Ruby native extensions.")
     (home-page "https://github.com/ruby-gnome2/pkg-config")
     (license license:lgpl2.0+)))
+
+(define-public ruby-net-http-digest-auth
+  (package
+    (name "ruby-net-http-digest-auth")
+    (version "1.4")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (rubygems-uri "net-http-digest_auth" version))
+       (sha256
+        (base32
+         "14801gr34g0rmqz9pv4rkfa3crfdbyfk6r48vpg5a5407v0sixqi"))))
+    (build-system ruby-build-system)
+    (inputs
+     `(("ruby-hoe" ,ruby-hoe)))
+    (synopsis
+     "Library for HTTP Digest Authentication based on RFC 2617")
+    (description
+     "This library implements HTTP's Digest Authentication scheme in ruby.
+This enables you to use the Digest Authentication scheme,
+over the more insecure Basic Authentication scheme")
+    (home-page
+     "http://github.com/drbrain/net-http-digest_auth")
+    (license license:expat)))
-- 
2.1.4