biodiversity 3.1.10 → 3.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rspec +3 -0
- data/.ruby-version +1 -1
- data/CHANGELOG +5 -0
- data/README.md +95 -71
- data/biodiversity.gemspec +1 -0
- data/lib/biodiversity/parser.rb +33 -30
- data/lib/biodiversity/parser/scientific_name_clean.rb +45 -36
- data/lib/biodiversity/parser/scientific_name_clean.treetop +1 -1
- data/lib/biodiversity/version.rb +1 -1
- data/spec/biodiversity_spec.rb +0 -2
- data/spec/files/t.rb +15 -0
- data/spec/files/test_data.txt +345 -335
- data/spec/files/test_data.txt.new +463 -0
- data/spec/guid/lsid.spec.rb +0 -2
- data/spec/parser/scientific_name_canonical_spec.rb +0 -1
- data/spec/parser/scientific_name_clean_spec.rb +0 -2
- data/spec/parser/scientific_name_dirty_spec.rb +0 -1
- data/spec/parser/scientific_name_spec.rb +5 -4
- metadata +20 -3
data/spec/guid/lsid.spec.rb
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
3
|
#NOTE: this spec needs compiled treetop files.
|
4
|
-
require_relative '../spec_helper'
|
5
4
|
|
6
5
|
describe ScientificNameParser do
|
7
6
|
before(:all) do
|
@@ -48,8 +47,10 @@ describe ScientificNameParser do
|
|
48
47
|
|
49
48
|
it 'generates reasonable output if parser failed' do
|
50
49
|
sn = 'ddd sljlkj 3223452432'
|
51
|
-
expect(json(sn)).to eq
|
52
|
-
|
50
|
+
expect(json(sn)).to eq "{\"scientificName\":" \
|
51
|
+
"{\"id\":\"3ebf93d9-b62a-5198-8715-4c8302f0a5d7\",\"parsed\":false," \
|
52
|
+
"\"parser_version\":\"test_version\"," \
|
53
|
+
"\"verbatim\":\"ddd sljlkj 3223452432\"}}"
|
53
54
|
end
|
54
55
|
|
55
56
|
it 'shows version when the flag :show_version set to true' do
|
@@ -138,7 +139,7 @@ describe ParallelParser do
|
|
138
139
|
res = pparser.parse(names)
|
139
140
|
names.each_with_index do |name, i|
|
140
141
|
expect(res[name].is_a?(Hash)).to be true
|
141
|
-
expect(res[name][:scientificName][:verbatim]).to eq name
|
142
|
+
expect(res[name][:scientificName][:verbatim]).to eq name
|
142
143
|
end
|
143
144
|
end
|
144
145
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: biodiversity
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dmitry Mozzherin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-06-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: treetop
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '1.4'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: gn_uuid
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0.5'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0.5'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: bundler
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -146,6 +160,7 @@ extra_rdoc_files: []
|
|
146
160
|
files:
|
147
161
|
- ".document"
|
148
162
|
- ".gitignore"
|
163
|
+
- ".rspec"
|
149
164
|
- ".rubocop.yml"
|
150
165
|
- ".ruby-version"
|
151
166
|
- ".travis.yml"
|
@@ -172,7 +187,9 @@ files:
|
|
172
187
|
- pkg/.gitkeep
|
173
188
|
- spec/biodiversity_spec.rb
|
174
189
|
- spec/files/lsid.xml
|
190
|
+
- spec/files/t.rb
|
175
191
|
- spec/files/test_data.txt
|
192
|
+
- spec/files/test_data.txt.new
|
176
193
|
- spec/files/todo.txt
|
177
194
|
- spec/guid/lsid.spec.rb
|
178
195
|
- spec/parser/scientific_name_canonical_spec.rb
|
@@ -200,7 +217,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
200
217
|
version: '0'
|
201
218
|
requirements: []
|
202
219
|
rubyforge_project:
|
203
|
-
rubygems_version: 2.2.
|
220
|
+
rubygems_version: 2.2.3
|
204
221
|
signing_key:
|
205
222
|
specification_version: 4
|
206
223
|
summary: Parser of scientific names
|