taxamatch_rb 0.9.7 → 0.9.8

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,5 @@
1
+ 0.9.8 - fixed a parsing problem with species nodes without name
2
+
1
3
  0.9.4 - updated parser (to 1.0.16), updated code to ruby 1.9.3
2
4
 
3
5
  0.9.3 - Taxamatch::Normalizer substitutes multiplication sign to 'x'
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.9.7
1
+ 0.9.8
@@ -37,7 +37,7 @@ module Taxamatch
37
37
  private
38
38
 
39
39
  def process_node(name, node, is_species = false)
40
- return unless node
40
+ return unless node && node[:string]
41
41
  @res[name] = {}
42
42
  @res[name][:string] = node[:string]
43
43
  @res[name][:normalized] = Taxamatch::Normalizer.normalize(node[:string])
@@ -23,6 +23,10 @@ describe 'Atomizer' do
23
23
  future_year = Time.now.year + 10
24
24
  @parser.parse("Hydnellum scrobiculatum Kern #{future_year} zonatum (Banker) D. Hall et D.E. Stuntz 1972?").should == {:all_authors=>["KERN", "BANKER", "D HALL", "D E STUNTZ"], :all_years=>[1972], :canonical_form=>"Hydnellum scrobiculatum zonatum", :genus=>{:string=>"Hydnellum", :normalized=>"HYDNELLUM", :phonetized=>"HIDNILIM", :authors=>[], :years=>[], :normalized_authors=>[]}, :species=>{:string=>"scrobiculatum", :normalized=>"SCROBICULATUM", :phonetized=>"SCRABICILATA", :authors=>["Kern"], :years=>[], :normalized_authors=>["KERN"]}, :infraspecies=>[{:string=>"zonatum", :normalized=>"ZONATUM", :phonetized=>"ZANATA", :authors=>["Banker", "D. Hall", "D.E. Stuntz"], :years=>[1972], :normalized_authors=>["BANKER", "D HALL", "D E STUNTZ"]}]}
25
25
  end
26
+
27
+ it 'should normalize names with abbreviated genus after cf.' do
28
+ @parser.parse('Unio cf. U. alba').should == {:all_authors=>[], :all_years=>[], :canonical_form=>"Unio", :genus=>{:string=>"Unio", :normalized=>"UNIO", :phonetized=>"UNIA", :authors=>[], :years=>[], :normalized_authors=>[]}}
29
+ end
26
30
  end
27
31
 
28
32
 
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.7"
8
+ s.version = "0.9.8"
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-11-07"
12
+ s.date = "2012-11-29"
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 = [
@@ -33,7 +33,8 @@ Gem::Specification.new do |s|
33
33
  "spec/spec.opts",
34
34
  "spec/spec_helper.rb",
35
35
  "spec/taxamatch_rb_spec.rb",
36
- "spec/taxamatch_test.txt"
36
+ "spec/taxamatch_test.txt",
37
+ "taxamatch_rb.gemspec"
37
38
  ]
38
39
  s.homepage = "http://github.com/GlobalNamesArchitecture/taxamatch_rb"
39
40
  s.require_paths = ["lib"]
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.7
4
+ version: 0.9.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-07 00:00:00.000000000 Z
12
+ date: 2012-11-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: biodiversity19
@@ -244,7 +244,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
244
244
  version: '0'
245
245
  segments:
246
246
  - 0
247
- hash: -2639715347929223584
247
+ hash: 959693978105853185
248
248
  required_rubygems_version: !ruby/object:Gem::Requirement
249
249
  none: false
250
250
  requirements: