taxamatch_rb 0.9.0 → 0.9.2

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG ADDED
@@ -0,0 +1,4 @@
1
+ 0.9.2 - Taxamatch::Normalizer.normalize always returns only ASCII
2
+ characters, all utf-8 characters unknown to normalizer are becoming '?'
3
+
4
+ 0.9.1 - updated gems
data/Gemfile CHANGED
@@ -2,7 +2,7 @@ source "http://rubygems.org"
2
2
  require 'yaml'
3
3
  # YAML::ENGINE.yamler= 'syck'
4
4
 
5
- gem "biodiversity19",">= 1.0.10"
5
+ gem "biodiversity19",">= 1.0.14"
6
6
  gem "damerau-levenshtein", ">= 0.5.4"
7
7
 
8
8
 
@@ -10,9 +10,8 @@ group :development do
10
10
  gem "rake-compiler"
11
11
  gem "rspec", "~> 2.3.0"
12
12
  gem "cucumber", ">= 0"
13
- gem "bundler", "~> 1.0.0"
13
+ gem "bundler", "~> 1.1.3"
14
14
  gem "jeweler", "~> 1.6.0"
15
- gem "rcov", ">= 0"
16
15
  gem "ruby-debug19"
17
16
  gem "ruby-prof"
18
17
  gem "shoulda"
data/Gemfile.lock CHANGED
@@ -1,39 +1,44 @@
1
1
  GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
+ activesupport (3.2.6)
5
+ i18n (~> 0.6)
6
+ multi_json (~> 1.0)
4
7
  archive-tar-minitar (0.5.2)
5
- biodiversity19 (1.0.10)
8
+ biodiversity19 (1.0.14)
6
9
  parallel
7
10
  parallel
8
11
  treetop
9
12
  treetop
10
13
  builder (3.0.0)
11
- columnize (0.3.3)
12
- cucumber (1.0.0)
14
+ columnize (0.3.6)
15
+ cucumber (1.2.1)
13
16
  builder (>= 2.1.2)
14
- diff-lcs (>= 1.1.2)
15
- gherkin (~> 2.4.1)
17
+ diff-lcs (>= 1.1.3)
18
+ gherkin (~> 2.11.0)
16
19
  json (>= 1.4.6)
17
- term-ansicolor (>= 1.0.5)
18
20
  damerau-levenshtein (0.5.4)
19
- diff-lcs (1.1.2)
20
- gherkin (2.4.1)
21
+ diff-lcs (1.1.3)
22
+ gherkin (2.11.1)
21
23
  json (>= 1.4.6)
22
24
  git (1.2.5)
23
- jeweler (1.6.2)
25
+ i18n (0.6.0)
26
+ jeweler (1.6.4)
24
27
  bundler (~> 1.0)
25
28
  git (>= 1.2.5)
26
29
  rake
27
- json (1.5.3)
30
+ json (1.7.3)
28
31
  linecache19 (0.5.12)
29
32
  ruby_core_source (>= 0.1.4)
30
- mocha (0.9.12)
31
- parallel (0.5.12)
33
+ metaclass (0.0.1)
34
+ mocha (0.12.0)
35
+ metaclass (~> 0.0.1)
36
+ multi_json (1.3.6)
37
+ parallel (0.5.17)
32
38
  polyglot (0.3.3)
33
- rake (0.9.2)
34
- rake-compiler (0.7.9)
39
+ rake (0.9.2.2)
40
+ rake-compiler (0.8.1)
35
41
  rake
36
- rcov (0.9.9)
37
42
  rspec (2.3.0)
38
43
  rspec-core (~> 2.3.0)
39
44
  rspec-expectations (~> 2.3.0)
@@ -50,11 +55,15 @@ GEM
50
55
  columnize (>= 0.3.1)
51
56
  linecache19 (>= 0.5.11)
52
57
  ruby-debug-base19 (>= 0.11.19)
53
- ruby-prof (0.10.7)
58
+ ruby-prof (0.11.2)
54
59
  ruby_core_source (0.1.5)
55
60
  archive-tar-minitar (>= 0.5.2)
56
- shoulda (2.11.3)
57
- term-ansicolor (1.0.5)
61
+ shoulda (3.1.1)
62
+ shoulda-context (~> 1.0)
63
+ shoulda-matchers (~> 1.2)
64
+ shoulda-context (1.0.0)
65
+ shoulda-matchers (1.2.0)
66
+ activesupport (>= 3.0.0)
58
67
  treetop (1.4.10)
59
68
  polyglot
60
69
  polyglot (>= 0.3.1)
@@ -63,14 +72,13 @@ PLATFORMS
63
72
  ruby
64
73
 
65
74
  DEPENDENCIES
66
- biodiversity19 (>= 1.0.10)
67
- bundler (~> 1.0.0)
75
+ biodiversity19 (>= 1.0.14)
76
+ bundler (~> 1.1.3)
68
77
  cucumber
69
78
  damerau-levenshtein (>= 0.5.4)
70
79
  jeweler (~> 1.6.0)
71
80
  mocha
72
81
  rake-compiler
73
- rcov
74
82
  rspec (~> 2.3.0)
75
83
  ruby-debug19
76
84
  ruby-prof
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.9.0
1
+ 0.9.2
@@ -4,7 +4,7 @@ module Taxamatch
4
4
 
5
5
  module Normalizer
6
6
  def self.normalize(string)
7
- utf8_to_ascii(string.strip).upcase
7
+ utf8_to_ascii(string.strip).upcase.gsub(/[^\x00-\x7F]/,'?')
8
8
  end
9
9
 
10
10
  def self.normalize_word(word)
@@ -25,7 +25,7 @@ module Taxamatch
25
25
  private
26
26
  def self.utf8_to_ascii(string)
27
27
  string = string.gsub(/\s{2,}/, ' ')
28
- string = string.gsub(/[ÀÂÅÃÄÁẤẠ]/, "A")
28
+ string = string.gsub(/[ÀÂÅÃÄÁẤẠÁ]/, "A")
29
29
  string = string.gsub(/[ÉÈÊË]/, "E")
30
30
  string = string.gsub(/[ÍÌÎÏ]/, "I")
31
31
  string = string.gsub(/[ÓÒÔØÕÖỚỔ]/, "O")
@@ -40,11 +40,11 @@ module Taxamatch
40
40
  string = string.gsub(/Œ/, "OE")
41
41
  string = string.gsub(/ß/, "B")
42
42
  string = string.gsub(/Ķ/, "K")
43
- string = string.gsub(/[áàâåãäăãắảạậầằ]/, "a")
43
+ string = string.gsub(/[áàâåãäăãắảạậầằá]/, "a")
44
44
  string = string.gsub(/[éèêëĕěếệểễềẻ]/, "e")
45
45
  string = string.gsub(/[íìîïǐĭīĩỉï]/, "i")
46
- string = string.gsub(/[óòôøõöŏỏỗộơọỡốơồờớổ]/, "o")
47
- string = string.gsub(/[úùûüůưừựủứụ]/, "u")
46
+ string = string.gsub(/[óòôøõöŏỏỗộơọỡốơồờớổő]/, "o")
47
+ string = string.gsub(/[úùûüůưừựủứụű]/, "u")
48
48
  string = string.gsub(/[žź]/, "z")
49
49
  string = string.gsub(/[ýÿỹ]/, "y")
50
50
  string = string.gsub(/[đð]/, "d")
@@ -32,6 +32,8 @@ describe 'Taxamatch::Normalizer' do
32
32
  Taxamatch::Normalizer.normalize('Leœptura').should == 'LEOEPTURA'
33
33
  Taxamatch::Normalizer.normalize('Ærenea').should == 'AERENEA'
34
34
  Taxamatch::Normalizer.normalize('Fallén').should == 'FALLEN'
35
+ Taxamatch::Normalizer.normalize('Fallé€n').should == 'FALLE?N'
36
+ Taxamatch::Normalizer.normalize('Fallén привет').should == 'FALLEN ??????'
35
37
  Taxamatch::Normalizer.normalize('Choriozopella trägårdhi').should == 'CHORIOZOPELLA TRAGARDHI'
36
38
  end
37
39
 
data/taxamatch_rb.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "taxamatch_rb"
8
- s.version = "0.9.0"
8
+ s.version = "0.9.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Dmitry Mozzherin"]
12
- s.date = "2012-03-08"
12
+ s.date = "2012-07-18"
13
13
  s.description = "This gem implements algorithm for fuzzy matching scientific names developed by Tony Rees"
14
14
  s.email = "dmozzherin@eol.org"
15
15
  s.extra_rdoc_files = [
@@ -17,6 +17,7 @@ Gem::Specification.new do |s|
17
17
  "README.rdoc"
18
18
  ]
19
19
  s.files = [
20
+ "CHANGELOG",
20
21
  "Gemfile",
21
22
  "Gemfile.lock",
22
23
  "LICENSE",
@@ -37,48 +38,45 @@ Gem::Specification.new do |s|
37
38
  ]
38
39
  s.homepage = "http://github.com/GlobalNamesArchitecture/taxamatch_rb"
39
40
  s.require_paths = ["lib"]
40
- s.rubygems_version = "1.8.10"
41
+ s.rubygems_version = "1.8.24"
41
42
  s.summary = "Implementation of Tony Rees Taxamatch algorithms"
42
43
 
43
44
  if s.respond_to? :specification_version then
44
45
  s.specification_version = 3
45
46
 
46
47
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
47
- s.add_runtime_dependency(%q<biodiversity19>, [">= 1.0.10"])
48
+ s.add_runtime_dependency(%q<biodiversity19>, [">= 1.0.14"])
48
49
  s.add_runtime_dependency(%q<damerau-levenshtein>, [">= 0.5.4"])
49
50
  s.add_development_dependency(%q<rake-compiler>, [">= 0"])
50
51
  s.add_development_dependency(%q<rspec>, ["~> 2.3.0"])
51
52
  s.add_development_dependency(%q<cucumber>, [">= 0"])
52
- s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
53
+ s.add_development_dependency(%q<bundler>, ["~> 1.1.3"])
53
54
  s.add_development_dependency(%q<jeweler>, ["~> 1.6.0"])
54
- s.add_development_dependency(%q<rcov>, [">= 0"])
55
55
  s.add_development_dependency(%q<ruby-debug19>, [">= 0"])
56
56
  s.add_development_dependency(%q<ruby-prof>, [">= 0"])
57
57
  s.add_development_dependency(%q<shoulda>, [">= 0"])
58
58
  s.add_development_dependency(%q<mocha>, [">= 0"])
59
59
  else
60
- s.add_dependency(%q<biodiversity19>, [">= 1.0.10"])
60
+ s.add_dependency(%q<biodiversity19>, [">= 1.0.14"])
61
61
  s.add_dependency(%q<damerau-levenshtein>, [">= 0.5.4"])
62
62
  s.add_dependency(%q<rake-compiler>, [">= 0"])
63
63
  s.add_dependency(%q<rspec>, ["~> 2.3.0"])
64
64
  s.add_dependency(%q<cucumber>, [">= 0"])
65
- s.add_dependency(%q<bundler>, ["~> 1.0.0"])
65
+ s.add_dependency(%q<bundler>, ["~> 1.1.3"])
66
66
  s.add_dependency(%q<jeweler>, ["~> 1.6.0"])
67
- s.add_dependency(%q<rcov>, [">= 0"])
68
67
  s.add_dependency(%q<ruby-debug19>, [">= 0"])
69
68
  s.add_dependency(%q<ruby-prof>, [">= 0"])
70
69
  s.add_dependency(%q<shoulda>, [">= 0"])
71
70
  s.add_dependency(%q<mocha>, [">= 0"])
72
71
  end
73
72
  else
74
- s.add_dependency(%q<biodiversity19>, [">= 1.0.10"])
73
+ s.add_dependency(%q<biodiversity19>, [">= 1.0.14"])
75
74
  s.add_dependency(%q<damerau-levenshtein>, [">= 0.5.4"])
76
75
  s.add_dependency(%q<rake-compiler>, [">= 0"])
77
76
  s.add_dependency(%q<rspec>, ["~> 2.3.0"])
78
77
  s.add_dependency(%q<cucumber>, [">= 0"])
79
- s.add_dependency(%q<bundler>, ["~> 1.0.0"])
78
+ s.add_dependency(%q<bundler>, ["~> 1.1.3"])
80
79
  s.add_dependency(%q<jeweler>, ["~> 1.6.0"])
81
- s.add_dependency(%q<rcov>, [">= 0"])
82
80
  s.add_dependency(%q<ruby-debug19>, [">= 0"])
83
81
  s.add_dependency(%q<ruby-prof>, [">= 0"])
84
82
  s.add_dependency(%q<shoulda>, [">= 0"])
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: taxamatch_rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,22 +9,27 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-03-08 00:00:00.000000000Z
12
+ date: 2012-07-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: biodiversity19
16
- requirement: &70230050526820 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
20
20
  - !ruby/object:Gem::Version
21
- version: 1.0.10
21
+ version: 1.0.14
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70230050526820
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: 1.0.14
25
30
  - !ruby/object:Gem::Dependency
26
31
  name: damerau-levenshtein
27
- requirement: &70230050526220 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
28
33
  none: false
29
34
  requirements:
30
35
  - - ! '>='
@@ -32,10 +37,15 @@ dependencies:
32
37
  version: 0.5.4
33
38
  type: :runtime
34
39
  prerelease: false
35
- version_requirements: *70230050526220
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: 0.5.4
36
46
  - !ruby/object:Gem::Dependency
37
47
  name: rake-compiler
38
- requirement: &70230050513120 !ruby/object:Gem::Requirement
48
+ requirement: !ruby/object:Gem::Requirement
39
49
  none: false
40
50
  requirements:
41
51
  - - ! '>='
@@ -43,10 +53,15 @@ dependencies:
43
53
  version: '0'
44
54
  type: :development
45
55
  prerelease: false
46
- version_requirements: *70230050513120
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
47
62
  - !ruby/object:Gem::Dependency
48
63
  name: rspec
49
- requirement: &70230050512520 !ruby/object:Gem::Requirement
64
+ requirement: !ruby/object:Gem::Requirement
50
65
  none: false
51
66
  requirements:
52
67
  - - ~>
@@ -54,10 +69,15 @@ dependencies:
54
69
  version: 2.3.0
55
70
  type: :development
56
71
  prerelease: false
57
- version_requirements: *70230050512520
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ~>
76
+ - !ruby/object:Gem::Version
77
+ version: 2.3.0
58
78
  - !ruby/object:Gem::Dependency
59
79
  name: cucumber
60
- requirement: &70230050511860 !ruby/object:Gem::Requirement
80
+ requirement: !ruby/object:Gem::Requirement
61
81
  none: false
62
82
  requirements:
63
83
  - - ! '>='
@@ -65,21 +85,31 @@ dependencies:
65
85
  version: '0'
66
86
  type: :development
67
87
  prerelease: false
68
- version_requirements: *70230050511860
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ! '>='
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
69
94
  - !ruby/object:Gem::Dependency
70
95
  name: bundler
71
- requirement: &70230050511260 !ruby/object:Gem::Requirement
96
+ requirement: !ruby/object:Gem::Requirement
72
97
  none: false
73
98
  requirements:
74
99
  - - ~>
75
100
  - !ruby/object:Gem::Version
76
- version: 1.0.0
101
+ version: 1.1.3
77
102
  type: :development
78
103
  prerelease: false
79
- version_requirements: *70230050511260
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ~>
108
+ - !ruby/object:Gem::Version
109
+ version: 1.1.3
80
110
  - !ruby/object:Gem::Dependency
81
111
  name: jeweler
82
- requirement: &70230050510740 !ruby/object:Gem::Requirement
112
+ requirement: !ruby/object:Gem::Requirement
83
113
  none: false
84
114
  requirements:
85
115
  - - ~>
@@ -87,10 +117,15 @@ dependencies:
87
117
  version: 1.6.0
88
118
  type: :development
89
119
  prerelease: false
90
- version_requirements: *70230050510740
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
122
+ requirements:
123
+ - - ~>
124
+ - !ruby/object:Gem::Version
125
+ version: 1.6.0
91
126
  - !ruby/object:Gem::Dependency
92
- name: rcov
93
- requirement: &70230050510140 !ruby/object:Gem::Requirement
127
+ name: ruby-debug19
128
+ requirement: !ruby/object:Gem::Requirement
94
129
  none: false
95
130
  requirements:
96
131
  - - ! '>='
@@ -98,21 +133,15 @@ dependencies:
98
133
  version: '0'
99
134
  type: :development
100
135
  prerelease: false
101
- version_requirements: *70230050510140
102
- - !ruby/object:Gem::Dependency
103
- name: ruby-debug19
104
- requirement: &70230050509540 !ruby/object:Gem::Requirement
136
+ version_requirements: !ruby/object:Gem::Requirement
105
137
  none: false
106
138
  requirements:
107
139
  - - ! '>='
108
140
  - !ruby/object:Gem::Version
109
141
  version: '0'
110
- type: :development
111
- prerelease: false
112
- version_requirements: *70230050509540
113
142
  - !ruby/object:Gem::Dependency
114
143
  name: ruby-prof
115
- requirement: &70230050508960 !ruby/object:Gem::Requirement
144
+ requirement: !ruby/object:Gem::Requirement
116
145
  none: false
117
146
  requirements:
118
147
  - - ! '>='
@@ -120,10 +149,15 @@ dependencies:
120
149
  version: '0'
121
150
  type: :development
122
151
  prerelease: false
123
- version_requirements: *70230050508960
152
+ version_requirements: !ruby/object:Gem::Requirement
153
+ none: false
154
+ requirements:
155
+ - - ! '>='
156
+ - !ruby/object:Gem::Version
157
+ version: '0'
124
158
  - !ruby/object:Gem::Dependency
125
159
  name: shoulda
126
- requirement: &70230050508360 !ruby/object:Gem::Requirement
160
+ requirement: !ruby/object:Gem::Requirement
127
161
  none: false
128
162
  requirements:
129
163
  - - ! '>='
@@ -131,10 +165,15 @@ dependencies:
131
165
  version: '0'
132
166
  type: :development
133
167
  prerelease: false
134
- version_requirements: *70230050508360
168
+ version_requirements: !ruby/object:Gem::Requirement
169
+ none: false
170
+ requirements:
171
+ - - ! '>='
172
+ - !ruby/object:Gem::Version
173
+ version: '0'
135
174
  - !ruby/object:Gem::Dependency
136
175
  name: mocha
137
- requirement: &70230050507760 !ruby/object:Gem::Requirement
176
+ requirement: !ruby/object:Gem::Requirement
138
177
  none: false
139
178
  requirements:
140
179
  - - ! '>='
@@ -142,7 +181,12 @@ dependencies:
142
181
  version: '0'
143
182
  type: :development
144
183
  prerelease: false
145
- version_requirements: *70230050507760
184
+ version_requirements: !ruby/object:Gem::Requirement
185
+ none: false
186
+ requirements:
187
+ - - ! '>='
188
+ - !ruby/object:Gem::Version
189
+ version: '0'
146
190
  description: This gem implements algorithm for fuzzy matching scientific names developed
147
191
  by Tony Rees
148
192
  email: dmozzherin@eol.org
@@ -152,6 +196,7 @@ extra_rdoc_files:
152
196
  - LICENSE
153
197
  - README.rdoc
154
198
  files:
199
+ - CHANGELOG
155
200
  - Gemfile
156
201
  - Gemfile.lock
157
202
  - LICENSE
@@ -183,7 +228,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
183
228
  version: '0'
184
229
  segments:
185
230
  - 0
186
- hash: 1938855165172895621
231
+ hash: 649911613402645259
187
232
  required_rubygems_version: !ruby/object:Gem::Requirement
188
233
  none: false
189
234
  requirements:
@@ -192,7 +237,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
192
237
  version: '0'
193
238
  requirements: []
194
239
  rubyforge_project:
195
- rubygems_version: 1.8.10
240
+ rubygems_version: 1.8.24
196
241
  signing_key:
197
242
  specification_version: 3
198
243
  summary: Implementation of Tony Rees Taxamatch algorithms