[bug#34222,14/15] gnu: Add ruby-jaro-winkler.

Message ID 20190127170820.28937-14-mail@cbaines.net
State Accepted
Headers show
Series Add ruby-rubocop and dependencies. | 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 Jan. 27, 2019, 5:08 p.m. UTC
Required for ruby-rubocop.

* gnu/packages/ruby.scm (ruby-jaro-winkler): New variable.
---
 gnu/packages/ruby.scm | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

Comments

Ricardo Wurmus Jan. 27, 2019, 5:40 p.m. UTC | #1
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”?
Christopher Baines Jan. 27, 2019, 6:45 p.m. UTC | #2
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".

Patch

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")