levenshtein-ffi 1.0.3 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/.rspec +1 -0
- data/.travis.yml +12 -0
- data/CHANGELOG.markdown +9 -0
- data/Gemfile +2 -7
- data/README.markdown +5 -4
- data/Rakefile +3 -3
- data/VERSION +1 -1
- data/levenshtein-ffi.gemspec +20 -20
- metadata +30 -34
- data/Gemfile.lock +0 -27
- data/README.markdown.html +0 -70
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
MzBjMWJhNDY3OTQzMTVjNWEzYmMzZDM2N2Q2YjFhOWY5NDhhYjM4MQ==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
NDY2NjcwZjE2ZTc1ZmFiNmZiZGQ2NGFmNWJiZjQ0MjVkOTUxMzAxMg==
|
7
|
+
SHA512:
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
NjZmNzhkMzg2N2M1NDI3YjlhMWNlYWI4NDhjMGUwOGM2MGFmZDMzN2QwMWQx
|
10
|
+
Njk1MzRjMDYyNjczMTBmMWRiNjc1NWM3ZWZmZWQ4MmNhMDU0M2E4M2Q3NmQy
|
11
|
+
NzJhODQxOGE4NDQwYTU0MmQ3OWNmYjk3ODI3YmY5YTYxYjQwNzc=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
NDZhNTU5Zjg1ZGJhMjgzZjRjNDk3MDdjYTkzMmY1ZWJlYjhlMjZhNjAyYTM1
|
14
|
+
NGE4MzlhMTQwMjA5MTc1YzhiNDRiOGZjNmM3YTg1MGI4NDZkYWRjMmVkYjNk
|
15
|
+
YjcxZDJhNGFmODAwYzVkMmEzMTg4MThjYjI5ZDRmYjg4MWFhZWE=
|
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--color --profile
|
data/.travis.yml
ADDED
data/CHANGELOG.markdown
CHANGED
data/Gemfile
CHANGED
data/README.markdown
CHANGED
@@ -1,17 +1,18 @@
|
|
1
1
|
levenshtein-ffi
|
2
2
|
===============
|
3
3
|
|
4
|
+
[![Build Status](https://travis-ci.org/dbalatero/levenshtein-ffi.svg?branch=master)](https://travis-ci.org/dbalatero/levenshtein-ffi)
|
5
|
+
|
4
6
|
Converted to FFI by David Balatero for Ruby portability.
|
5
7
|
|
6
8
|
This gem originally based on levenshtein.
|
7
9
|
|
8
10
|
Tested on:
|
9
11
|
|
10
|
-
* MRI 1.8.6
|
11
|
-
* MRI 1.8.7
|
12
|
-
* MRI 1.9.1
|
13
12
|
* MRI 1.9.2
|
14
|
-
*
|
13
|
+
* MRI 1.9.3
|
14
|
+
* MRI 2.0.0
|
15
|
+
* Rubinius (1.9 mode)
|
15
16
|
|
16
17
|
Known Issues
|
17
18
|
============
|
data/Rakefile
CHANGED
@@ -7,9 +7,9 @@ begin
|
|
7
7
|
gemspec.email = "dbalatero@gmail.com"
|
8
8
|
gemspec.homepage = "http://github.com/dbalatero/levenshtein-ffi"
|
9
9
|
gemspec.authors = ["David Balatero"]
|
10
|
-
gemspec.add_dependency "ffi"
|
11
|
-
gemspec.add_development_dependency "rspec"
|
12
|
-
gemspec.add_development_dependency "jeweler"
|
10
|
+
gemspec.add_dependency "ffi", '~> 1.9'
|
11
|
+
gemspec.add_development_dependency "rspec", '~> 2.99'
|
12
|
+
gemspec.add_development_dependency "jeweler", '~> 2.0'
|
13
13
|
end
|
14
14
|
|
15
15
|
Jeweler::GemcutterTasks.new
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0
|
1
|
+
1.1.0
|
data/levenshtein-ffi.gemspec
CHANGED
@@ -2,25 +2,28 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
+
# stub: levenshtein-ffi 1.1.0 ruby lib
|
6
|
+
# stub: ext/levenshtein/extconf.rb
|
5
7
|
|
6
8
|
Gem::Specification.new do |s|
|
7
9
|
s.name = "levenshtein-ffi"
|
8
|
-
s.version = "1.0
|
10
|
+
s.version = "1.1.0"
|
9
11
|
|
10
12
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
13
|
+
s.require_paths = ["lib"]
|
11
14
|
s.authors = ["David Balatero"]
|
12
|
-
s.date = "
|
15
|
+
s.date = "2014-08-11"
|
13
16
|
s.description = "Provides a fast, cross-Ruby implementation of the levenshtein distance algorithm."
|
14
17
|
s.email = "dbalatero@gmail.com"
|
15
18
|
s.extensions = ["ext/levenshtein/extconf.rb"]
|
16
19
|
s.extra_rdoc_files = [
|
17
|
-
"README.markdown"
|
18
|
-
"README.markdown.html"
|
20
|
+
"README.markdown"
|
19
21
|
]
|
20
22
|
s.files = [
|
23
|
+
".rspec",
|
24
|
+
".travis.yml",
|
21
25
|
"CHANGELOG.markdown",
|
22
26
|
"Gemfile",
|
23
|
-
"Gemfile.lock",
|
24
27
|
"README.markdown",
|
25
28
|
"Rakefile",
|
26
29
|
"VERSION",
|
@@ -35,29 +38,26 @@ Gem::Specification.new do |s|
|
|
35
38
|
"spec/spec_helper.rb"
|
36
39
|
]
|
37
40
|
s.homepage = "http://github.com/dbalatero/levenshtein-ffi"
|
38
|
-
s.
|
39
|
-
s.rubygems_version = "
|
41
|
+
s.license = "BSD 2-Clause"
|
42
|
+
s.rubygems_version = "2.2.2"
|
40
43
|
s.summary = "An FFI version of the levenshtein gem."
|
41
44
|
|
42
45
|
if s.respond_to? :specification_version then
|
43
|
-
s.specification_version =
|
46
|
+
s.specification_version = 4
|
44
47
|
|
45
48
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
46
|
-
s.add_runtime_dependency(%q<ffi>, ["~> 1.
|
47
|
-
s.
|
48
|
-
s.add_development_dependency(%q<
|
49
|
-
s.add_development_dependency(%q<jeweler>, [">= 0"])
|
49
|
+
s.add_runtime_dependency(%q<ffi>, ["~> 1.9"])
|
50
|
+
s.add_development_dependency(%q<rspec>, ["~> 2.99"])
|
51
|
+
s.add_development_dependency(%q<jeweler>, ["~> 2.0"])
|
50
52
|
else
|
51
|
-
s.add_dependency(%q<ffi>, ["~> 1.
|
52
|
-
s.add_dependency(%q<
|
53
|
-
s.add_dependency(%q<
|
54
|
-
s.add_dependency(%q<jeweler>, [">= 0"])
|
53
|
+
s.add_dependency(%q<ffi>, ["~> 1.9"])
|
54
|
+
s.add_dependency(%q<rspec>, ["~> 2.99"])
|
55
|
+
s.add_dependency(%q<jeweler>, ["~> 2.0"])
|
55
56
|
end
|
56
57
|
else
|
57
|
-
s.add_dependency(%q<ffi>, ["~> 1.
|
58
|
-
s.add_dependency(%q<
|
59
|
-
s.add_dependency(%q<
|
60
|
-
s.add_dependency(%q<jeweler>, [">= 0"])
|
58
|
+
s.add_dependency(%q<ffi>, ["~> 1.9"])
|
59
|
+
s.add_dependency(%q<rspec>, ["~> 2.99"])
|
60
|
+
s.add_dependency(%q<jeweler>, ["~> 2.0"])
|
61
61
|
end
|
62
62
|
end
|
63
63
|
|
metadata
CHANGED
@@ -1,60 +1,57 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: levenshtein-ffi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
5
|
-
prerelease:
|
4
|
+
version: 1.1.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- David Balatero
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2014-08-11 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: ffi
|
16
|
-
requirement:
|
17
|
-
none: false
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
18
16
|
requirements:
|
19
17
|
- - ~>
|
20
18
|
- !ruby/object:Gem::Version
|
21
|
-
version: 1.
|
19
|
+
version: '1.9'
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
|
-
version_requirements:
|
25
|
-
- !ruby/object:Gem::Dependency
|
26
|
-
name: ffi
|
27
|
-
requirement: &70329943056940 !ruby/object:Gem::Requirement
|
28
|
-
none: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
29
23
|
requirements:
|
30
|
-
- -
|
24
|
+
- - ~>
|
31
25
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
33
|
-
type: :runtime
|
34
|
-
prerelease: false
|
35
|
-
version_requirements: *70329943056940
|
26
|
+
version: '1.9'
|
36
27
|
- !ruby/object:Gem::Dependency
|
37
28
|
name: rspec
|
38
|
-
requirement:
|
39
|
-
none: false
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
40
30
|
requirements:
|
41
|
-
- -
|
31
|
+
- - ~>
|
42
32
|
- !ruby/object:Gem::Version
|
43
|
-
version: '
|
33
|
+
version: '2.99'
|
44
34
|
type: :development
|
45
35
|
prerelease: false
|
46
|
-
version_requirements:
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ~>
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '2.99'
|
47
41
|
- !ruby/object:Gem::Dependency
|
48
42
|
name: jeweler
|
49
|
-
requirement:
|
50
|
-
none: false
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
51
44
|
requirements:
|
52
|
-
- -
|
45
|
+
- - ~>
|
53
46
|
- !ruby/object:Gem::Version
|
54
|
-
version: '0'
|
47
|
+
version: '2.0'
|
55
48
|
type: :development
|
56
49
|
prerelease: false
|
57
|
-
version_requirements:
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ~>
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '2.0'
|
58
55
|
description: Provides a fast, cross-Ruby implementation of the levenshtein distance
|
59
56
|
algorithm.
|
60
57
|
email: dbalatero@gmail.com
|
@@ -63,11 +60,11 @@ extensions:
|
|
63
60
|
- ext/levenshtein/extconf.rb
|
64
61
|
extra_rdoc_files:
|
65
62
|
- README.markdown
|
66
|
-
- README.markdown.html
|
67
63
|
files:
|
64
|
+
- .rspec
|
65
|
+
- .travis.yml
|
68
66
|
- CHANGELOG.markdown
|
69
67
|
- Gemfile
|
70
|
-
- Gemfile.lock
|
71
68
|
- README.markdown
|
72
69
|
- Rakefile
|
73
70
|
- VERSION
|
@@ -80,29 +77,28 @@ files:
|
|
80
77
|
- lib/levenshtein.rb
|
81
78
|
- spec/levenshtein_spec.rb
|
82
79
|
- spec/spec_helper.rb
|
83
|
-
- README.markdown.html
|
84
80
|
homepage: http://github.com/dbalatero/levenshtein-ffi
|
85
|
-
licenses:
|
81
|
+
licenses:
|
82
|
+
- BSD 2-Clause
|
83
|
+
metadata: {}
|
86
84
|
post_install_message:
|
87
85
|
rdoc_options: []
|
88
86
|
require_paths:
|
89
87
|
- lib
|
90
88
|
required_ruby_version: !ruby/object:Gem::Requirement
|
91
|
-
none: false
|
92
89
|
requirements:
|
93
90
|
- - ! '>='
|
94
91
|
- !ruby/object:Gem::Version
|
95
92
|
version: '0'
|
96
93
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
97
|
-
none: false
|
98
94
|
requirements:
|
99
95
|
- - ! '>='
|
100
96
|
- !ruby/object:Gem::Version
|
101
97
|
version: '0'
|
102
98
|
requirements: []
|
103
99
|
rubyforge_project:
|
104
|
-
rubygems_version:
|
100
|
+
rubygems_version: 2.2.2
|
105
101
|
signing_key:
|
106
|
-
specification_version:
|
102
|
+
specification_version: 4
|
107
103
|
summary: An FFI version of the levenshtein gem.
|
108
104
|
test_files: []
|
data/Gemfile.lock
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
GEM
|
2
|
-
remote: http://rubygems.org/
|
3
|
-
specs:
|
4
|
-
diff-lcs (1.1.3)
|
5
|
-
ffi (1.1.5)
|
6
|
-
git (1.2.5)
|
7
|
-
jeweler (1.6.4)
|
8
|
-
bundler (~> 1.0)
|
9
|
-
git (>= 1.2.5)
|
10
|
-
rake
|
11
|
-
rake (0.9.2)
|
12
|
-
rspec (2.7.0)
|
13
|
-
rspec-core (~> 2.7.0)
|
14
|
-
rspec-expectations (~> 2.7.0)
|
15
|
-
rspec-mocks (~> 2.7.0)
|
16
|
-
rspec-core (2.7.1)
|
17
|
-
rspec-expectations (2.7.0)
|
18
|
-
diff-lcs (~> 1.1.2)
|
19
|
-
rspec-mocks (2.7.0)
|
20
|
-
|
21
|
-
PLATFORMS
|
22
|
-
ruby
|
23
|
-
|
24
|
-
DEPENDENCIES
|
25
|
-
ffi (~> 1.1.5)
|
26
|
-
jeweler
|
27
|
-
rspec (= 2.7.0)
|
data/README.markdown.html
DELETED
@@ -1,70 +0,0 @@
|
|
1
|
-
<h1>levenshtein-ffi</h1>
|
2
|
-
|
3
|
-
<p>Converted to FFI by David Balatero for Ruby portability.</p>
|
4
|
-
|
5
|
-
<p>This gem originally based on levenshtein.</p>
|
6
|
-
|
7
|
-
<p>Tested on:</p>
|
8
|
-
|
9
|
-
<ul>
|
10
|
-
<li>MRI 1.8.6</li>
|
11
|
-
<li>MRI 1.8.7</li>
|
12
|
-
<li>MRI 1.9.1</li>
|
13
|
-
<li>MRI 1.9.2</li>
|
14
|
-
<li>Rubinius 1.1.0</li>
|
15
|
-
</ul>
|
16
|
-
|
17
|
-
<h1>Known Issues</h1>
|
18
|
-
|
19
|
-
<ul>
|
20
|
-
<li>The C extension uses <code>char*</code> strings, and so Unicode characters will give incorrect values.</li>
|
21
|
-
</ul>
|
22
|
-
|
23
|
-
<h1>Including in Gemfile</h1>
|
24
|
-
|
25
|
-
<pre><code>gem 'levenshtein-ffi', :require => 'levenshtein'
|
26
|
-
</code></pre>
|
27
|
-
|
28
|
-
<h1>Original README</h1>
|
29
|
-
|
30
|
-
<p>The levenshtein module implements fast Damerau-Levenshtein edit distance
|
31
|
-
computation in O(n) memory and O(n^2) time, using a C wrapper. The module has a
|
32
|
-
single function:</p>
|
33
|
-
|
34
|
-
<pre><code>require 'levenshtein'
|
35
|
-
Levenshtein.distance("string1", "string2") == 1 # returns true
|
36
|
-
</code></pre>
|
37
|
-
|
38
|
-
<p>This function can be used as a drop-in replacement for
|
39
|
-
Text::Levenshtein.levenshtein, which is pure Ruby and rather slow. That’s it!</p>
|
40
|
-
|
41
|
-
<p>The code is made available under the following BSD license:</p>
|
42
|
-
|
43
|
-
<p>Copyright (c) 2009, Schuyler Erle.
|
44
|
-
All rights reserved.</p>
|
45
|
-
|
46
|
-
<p>Redistribution and use in source and binary forms, with or without
|
47
|
-
modification, are permitted provided that the following conditions are met:</p>
|
48
|
-
|
49
|
-
<pre><code>* Redistributions of source code must retain the above copyright notice,
|
50
|
-
this list of conditions and the following disclaimer.
|
51
|
-
|
52
|
-
* Redistributions in binary form must reproduce the above copyright notice,
|
53
|
-
this list of conditions and the following disclaimer in the documentation
|
54
|
-
and/or other materials provided with the distribution.
|
55
|
-
</code></pre>
|
56
|
-
|
57
|
-
<p>THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND
|
58
|
-
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
59
|
-
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
60
|
-
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
61
|
-
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
62
|
-
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
63
|
-
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
64
|
-
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
65
|
-
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
66
|
-
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</p>
|
67
|
-
|
68
|
-
<ul>
|
69
|
-
<li>end -</li>
|
70
|
-
</ul>
|