Report forwarded
to guix-patches@gnu.org: bug#34222; Package guix-patches.
(Sun, 27 Jan 2019 17:03:02 GMT) (full text, mbox, link).
Acknowledgement sent
to Christopher Baines <mail@cbaines.net>:
New bug report received and forwarded. Copy sent to guix-patches@gnu.org.
(Sun, 27 Jan 2019 17:03:02 GMT) (full text, mbox, link).
Required for ruby-rubocop.
* gnu/packages/ruby.scm (ruby-jaro-winkler): New variable.
---
gnu/packages/ruby.scm | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index c455bd5f7b..9026251626 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -3327,6 +3327,29 @@ when working with Ruby code.")
;; There is no mention of the "or later" clause.
(license license:gpl2)))
+(define-public ruby-jaro-winkler
+ (package
+ (name "ruby-jaro-winkler")
+ (version "1.5.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (rubygems-uri "jaro_winkler" version))
+ (sha256
+ (base32
+ "1zz27z88qznix4r65gd9h56gl177snlfpgv10b0s69vi8qpl909l"))))
+ (build-system ruby-build-system)
+ (arguments
+ '(;; No included tests
+ #:tests? #f))
+ (synopsis "Ruby implementation of Jaro-Winkler distance algorithm")
+ (description
+ "@code{jaro_winkler} is an implementation of Jaro-Winkler distance
+algorithm. It is written in C extension and will fallback to a pure Ruby
+implementation on platforms where this is unsupported.")
+ (home-page "https://github.com/tonytonyjan/jaro_winkler")
+ (license license:expat)))
+
(define-public ruby-json
(package
(name "ruby-json")
--
2.20.1
Information forwarded
to guix-patches@gnu.org: bug#34222; Package guix-patches.
(Sun, 27 Jan 2019 17:09:08 GMT) (full text, mbox, link).
Added indication that bug 34222 blocks30689
Request was from Christopher Baines <mail@cbaines.net>
to control@debbugs.gnu.org.
(Sun, 27 Jan 2019 17:10:02 GMT) (full text, mbox, link).
Information forwarded
to guix-patches@gnu.org: bug#34222; Package guix-patches.
(Sun, 27 Jan 2019 17:27:01 GMT) (full text, mbox, link).
Christopher Baines <mail@cbaines.net> writes:
> Required for ruby-ast and ruby-parser.
>
> * gnu/packages/ruby.scm (ruby-racc): New variable.
[…]
> + (license license:expat)))
On the website it says that the license is “LGPL” (no version is
provided). Could you please confirm the license?
--
Ricardo
Information forwarded
to guix-patches@gnu.org: bug#34222; Package guix-patches.
(Sun, 27 Jan 2019 17:30:02 GMT) (full text, mbox, link).
Christopher Baines <mail@cbaines.net> writes:
> Required by ruby-rest-client. Also at version ~> 2, so don't package 3 just
> yet.
>
> * gnu/packages/ruby.scm (ruby-webmock): New variable.
[…]
When version 3 is already available, I’d prefer to explicitly name this
“ruby-webmock-2”, so that other people know it is on purpose.
> + (propagated-inputs
> + `(("bundler" ,bundler)
Does “bundler” really need to be propagated?
--
Ricardo
Information forwarded
to guix-patches@gnu.org: bug#34222; Package guix-patches.
(Sun, 27 Jan 2019 17:35:02 GMT) (full text, mbox, link).
Christopher Baines <mail@cbaines.net> writes:
> This is a requirement of ruby-ast.
>
> * gnu/packages/ruby.scm (ruby-bacon-colored-output): New variable.
LGTM!
--
Ricardo
Information forwarded
to guix-patches@gnu.org: bug#34222; Package guix-patches.
(Sun, 27 Jan 2019 17:37:02 GMT) (full text, mbox, link).
Christopher Baines <mail@cbaines.net> writes:
> Enable the tests, and also tweak the synopsis and description to hopefully be
> more descriptive.
>
> * gnu/packages/ruby.scm (ruby-rspec-its)[source]: Change to GitHub, and add
> patch.
> [arguments]: Enabled tests, set the #:test-target to "spec", and add the
> phases to tweak the Gemfile and rspec-its.gemspec.
> [native-inputs]: Add bundler, ruby-cucumber and ruby-aruba.
> [synopsis,description]: Make more explicit and descriptive.
Looks good to me.
--
Ricardo
Information forwarded
to guix-patches@gnu.org: bug#34222; Package guix-patches.
(Sun, 27 Jan 2019 17:38:01 GMT) (full text, mbox, link).
Christopher Baines <mail@cbaines.net> writes:
> Required for ruby-rubocop.
>
> * gnu/packages/ruby.scm (ruby-jaro-winkler): New variable.
[…]
> + (description
> + "@code{jaro_winkler} is an implementation of Jaro-Winkler distance
> +algorithm. It is written in C extension and will fallback to a pure Ruby
> +implementation on platforms where this is unsupported.")
“written in C” or “written as a C extension”?
--
Ricardo
Information forwarded
to guix-patches@gnu.org: bug#34222; Package guix-patches.
(Sun, 27 Jan 2019 17:42:02 GMT) (full text, mbox, link).
Ricardo Wurmus <rekado@elephly.net> writes:
> Christopher Baines <mail@cbaines.net> writes:
>
>> Required for ruby-rubocop.
>>
>> * gnu/packages/ruby.scm (ruby-jaro-winkler): New variable.
> […]
>> + (description
>> + "@code{jaro_winkler} is an implementation of Jaro-Winkler distance
>> +algorithm. It is written in C extension and will fallback to a pure Ruby
>> +implementation on platforms where this is unsupported.")
>
> “written in C” or “written as a C extension”?
The latter. I've updated the patch to say "written as a C extension".
Ricardo Wurmus <rekado@elephly.net> writes:
> Christopher Baines <mail@cbaines.net> writes:
>
>> Requirement of ruby-parser.
>>
>> * gnu/packages/ruby.scm (ruby-cliver): New variable.
> […]
>
>> + (arguments
>> + '(#:phases
>> + (modify-phases %standard-phases
>> + ;; Avoid this issue with rspec@2
>> + ;; NoMethodError: undefined method `last_comment'
>> + (replace 'check
>> + (lambda* (#:key tests? #:allow-other-keys)
>> + (when tests?
>> + (invoke "rspec"))
>> + #t)))))
>> + (native-inputs
>> + `(("bundler" ,bundler)
>> + ("ruby-rspec" ,ruby-rspec-2)))
>
> Is this a problem that would disappear when using a later version of
> Rspec?
I don't think so, I get a different exception which looks to me like an
incompatibility between the tests and rspec@3 in Guix. This
`last_comment' related error is a issue between Rspec 2 and more recent
versions of Rake, and I've updated the comment as below to try and
explain this.
+ (Build-system ruby-build-system)
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ ;; Avoid a incompatibility between rspec@2 and rake. Using rspec@3
+ ;; would be nice, but the tests look to be incompatible:
+ ;;
+ ;; NoMethodError: undefined method `last_comment'
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "rspec"))
+ #t)))))
Ricardo Wurmus <rekado@elephly.net> writes:
> Christopher Baines <mail@cbaines.net> writes:
>
>> Required for ruby-parser.
>>
>> * gnu/packages/ruby.scm (ruby-ast): New variable.
> […]
>> + (native-inputs
>> + `(("bundler" ,bundler)
>> + ("ruby-simplecov" ,ruby-simplecov)
>> + ("ruby-json-pure" ,ruby-json-pure)
>> + ("ruby-mime-times" ,ruby-mime-types)
>> + ("ruby-yard" ,ruby-yard)
>> + ("ruby-kramdown" ,ruby-kramdown)
>> + ("ruby-rest-client" ,ruby-rest-client)
>> + ("ruby-bacon" ,ruby-bacon)
>> + ("ruby-bacon-colored-output" ,ruby-bacon-colored-output)
>> + ("ruby-racc" ,ruby-racc)))
>
> Are really none of these required at run time?
According to the gemspec at least [1].
1: https://github.com/whitequark/ast/blob/master/ast.gemspec#L14-L26
I don't know the library at all, but it seems like a AST data structure,
so I think it's possible that it's very dependency light.
Ricardo Wurmus <rekado@elephly.net> writes:
> Christopher Baines <mail@cbaines.net> writes:
>
>> Required for ruby-ast.
>>
>> * gnu/packages/ruby.scm (ruby-rest-client): New variable.
>
> […]
>
>> + (modify-phases %standard-phases
>> + (add-before 'check 'fix-dependencies
>> + (lambda _
>> + (substitute* "rest-client.gemspec"
>> + ((".*rubocop.*") "\n")
>> + ((".*pry.*") "\n"))
>> + #t))
>
> Could you please add a comment here why this is necessary?
I've updated the patch to say:
+ (add-before 'check 'remove-unnecessary-development-dependencies
+ (lambda _
+ (substitute* "rest-client.gemspec"
+ ;; Remove rubocop as it's unused. Rubocop also indirectly
+ ;; depends on this package through ruby-parser and ruby-ast so
+ ;; this avoids a dependency loop.
+ ((".*rubocop.*") "\n")
+ ;; Remove pry as it's unused, it's a debugging tool
+ ((".*pry.*") "\n"))
Hopefully that is a bit clearer.
>> + (description
>> + "@code{rest-client} provides a simple HTTP and REST client for Ruby,
>> +inspired by the Sinatra microframework style of specifying actions: get, put,
>> +post, delete.")
>
> I would wrap “get”, “put”, “post”, and “delete” in @code{…}.
Ok, I've updated the patch to do this now.
Ricardo Wurmus <rekado@elephly.net> writes:
> Christopher Baines <mail@cbaines.net> writes:
>
>> Required by ruby-rest-client. Also at version ~> 2, so don't package 3 just
>> yet.
>>
>> * gnu/packages/ruby.scm (ruby-webmock): New variable.
>
> […]
>
> When version 3 is already available, I’d prefer to explicitly name this
> “ruby-webmock-2”, so that other people know it is on purpose.
Sure, I've updated the patch and the other dependant patches.
>> + (propagated-inputs
>> + `(("bundler" ,bundler)
>
> Does “bundler” really need to be propagated?
Good spot. Indeed bundler doesn't need to be propagated, and this wasn't
the only issue with the inputs. They now are as follows:
+ (native-inputs
+ `(("bundler" ,bundler)
+ ("ruby-rspec" ,ruby-rspec)))
+ (propagated-inputs
+ `(("ruby-addressable" ,ruby-addressable)
+ ("ruby-crack" ,ruby-crack)
+ ("ruby-hashdiff" ,ruby-hashdiff)))
Ricardo Wurmus <rekado@elephly.net> writes:
> Christopher Baines <mail@cbaines.net> writes:
>
>> Required for ruby-ast and ruby-parser.
>>
>> * gnu/packages/ruby.scm (ruby-racc): New variable.
> […]
>> + (license license:expat)))
>
> On the website it says that the license is “LGPL” (no version is
> provided). Could you please confirm the license?
Indeed, the metadata in the gem is wrong. The information on the license
is a bit sparse. LGPL 2.1 is included in the sources, and there is one
file which references this in the header.
The published gem doesn't come from the original author, so I'm guessing
the default in the gemspec simply wasn't changed.
Christopher Baines <mail@cbaines.net> writes:
> Ricardo Wurmus <rekado@elephly.net> writes:
>
>> Christopher Baines <mail@cbaines.net> writes:
>>
>>> Required for ruby-ast and ruby-parser.
>>>
>>> * gnu/packages/ruby.scm (ruby-racc): New variable.
>> […]
>>> + (license license:expat)))
>>
>> On the website it says that the license is “LGPL” (no version is
>> provided). Could you please confirm the license?
>
> Indeed, the metadata in the gem is wrong. The information on the license
> is a bit sparse. LGPL 2.1 is included in the sources, and there is one
> file which references this in the header.
Actually, there is a lot more, I forgot to pass "-r" to
licensecheck. There's also 3 files where it says:
You can distribute/modify this program under the same terms of ruby.
So I might put this instead. What do you think?
+ (license (list license:lgpl2.1
+ license:ruby))))
Christopher Baines <mail@cbaines.net> writes:
> Christopher Baines <mail@cbaines.net> writes:
>
>> Ricardo Wurmus <rekado@elephly.net> writes:
>>
>>> Christopher Baines <mail@cbaines.net> writes:
>>>
>>>> Required for ruby-ast and ruby-parser.
>>>>
>>>> * gnu/packages/ruby.scm (ruby-racc): New variable.
>>> […]
>>>> + (license license:expat)))
>>>
>>> On the website it says that the license is “LGPL” (no version is
>>> provided). Could you please confirm the license?
>>
>> Indeed, the metadata in the gem is wrong. The information on the license
>> is a bit sparse. LGPL 2.1 is included in the sources, and there is one
>> file which references this in the header.
>
> Actually, there is a lot more, I forgot to pass "-r" to
> licensecheck. There's also 3 files where it says:
>
> You can distribute/modify this program under the same terms of ruby.
>
> So I might put this instead. What do you think?
>
> + (license (list license:lgpl2.1
> + license:ruby))))
This would be fine with a comment.
Thanks!
--
Ricardo
Information forwarded
to guix-patches@gnu.org: bug#34222; Package guix-patches.
(Tue, 29 Jan 2019 01:33:02 GMT) (full text, mbox, link).
So, I've merged 66 patches now which were tracked across these 3 bugs so
the master branch now contains the ruby-rails gem!
I think I've even done this without breaking anything, I believe all the
packages I added or changed build, and all of there dependencies as
reported by guix lint build too.
If anyone still has any comments on the patches, I'd still love to hear
them.
Thanks for everyone who's reviewed these patches so far, and thanks to
Ben for kicking this work off many months ago.
Chris
Debbugs is free software and licensed under the terms of the
GNU Public License version 2. The current version can be
obtained from https://bugs.debian.org/debbugs-source/.