biodiversity19 1.0.15 → 1.0.16

Sign up to get free protection for your applications and to get access to all the features.
data/.rvmrc CHANGED
@@ -1 +1 @@
1
- rvm use ruby-1.9.2-p290@biodiversity --create
1
+ rvm use ruby-1.9.3-p194@biodiversity --create
data/CHANGELOG CHANGED
@@ -1,3 +1,5 @@
1
+ 1.0.16 -- dirty mode now converts ë to e
2
+
1
3
  1.0.15 -- additional rules added for names ending with ssp. sp sp. and cf.
2
4
 
3
5
  1.0.14 -- canonical forms had allowed ë as a character until now. After this
data/Gemfile.lock CHANGED
@@ -1,12 +1,16 @@
1
1
  GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
+ archive-tar-minitar (0.5.2)
5
+ columnize (0.3.6)
4
6
  diff-lcs (1.1.3)
5
7
  git (1.2.5)
6
8
  jeweler (1.6.4)
7
9
  bundler (~> 1.0)
8
10
  git (>= 1.2.5)
9
11
  rake
12
+ linecache19 (0.5.12)
13
+ ruby_core_source (>= 0.1.4)
10
14
  parallel (0.5.9)
11
15
  polyglot (0.3.3)
12
16
  rake (0.9.2.2)
@@ -18,6 +22,16 @@ GEM
18
22
  rspec-expectations (2.7.0)
19
23
  diff-lcs (~> 1.1.2)
20
24
  rspec-mocks (2.7.0)
25
+ ruby-debug-base19 (0.11.25)
26
+ columnize (>= 0.3.1)
27
+ linecache19 (>= 0.5.11)
28
+ ruby_core_source (>= 0.1.4)
29
+ ruby-debug19 (0.11.6)
30
+ columnize (>= 0.3.1)
31
+ linecache19 (>= 0.5.11)
32
+ ruby-debug-base19 (>= 0.11.19)
33
+ ruby_core_source (0.1.5)
34
+ archive-tar-minitar (>= 0.5.2)
21
35
  treetop (1.4.10)
22
36
  polyglot
23
37
  polyglot (>= 0.3.1)
@@ -29,4 +43,5 @@ DEPENDENCIES
29
43
  jeweler
30
44
  parallel
31
45
  rspec
46
+ ruby-debug19
32
47
  treetop
data/README.rdoc CHANGED
@@ -1,5 +1,7 @@
1
1
  = Biodiversity
2
2
 
3
+ {<img src="https://codeclimate.com/badge.png" />}[https://codeclimate.com/github/GlobalNamesArchitecture/biodiversity]
4
+
3
5
  Parses taxonomic scientific name and breaks it into semantic elements.
4
6
 
5
7
  == Installation
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.15
1
+ 1.0.16
@@ -115,7 +115,7 @@ grammar ScientificNameDirty
115
115
  end
116
116
 
117
117
  rule latin_word
118
- a:[a-z\-ëæœàâåãäáçčéèíìïňññóòôøõöúùüŕřŗššşž] b:valid_name_letters {
118
+ a:[a-z\-æœàâåãäáçčëéèíìïňññóòôøõöúùüŕřŗššşž] b:valid_name_letters {
119
119
  def value
120
120
  res = ''
121
121
  text_value.split('').each do |l|
@@ -123,14 +123,14 @@ grammar ScientificNameDirty
123
123
  l = 'oe' if l == 'œ'
124
124
  res << l
125
125
  end
126
- res.tr('àâåãäáçčéèíìïňññóòôøõöúùüŕřŗššşž',
127
- 'aaaaaacceeiiinnnoooooouuurrrsssz')
126
+ res.tr('àâåãäáçčëéèíìïňññóòôøõöúùüŕřŗššşž',
127
+ 'aaaaaacceeeiiinnnoooooouuurrrsssz')
128
128
  end
129
129
  }
130
130
  end
131
131
 
132
132
  rule valid_name_letters
133
- [a-z\-ëæœàâåãäáçčéèíìïňññóòôøõöúùüŕřŗššşž]+ {
133
+ [a-z\-æœàâåãäáçčëéèíìïňññóòôøõöúùüŕřŗššşž]+ {
134
134
  def value
135
135
  res = ''
136
136
  text_value.split('').each do |l|
@@ -138,8 +138,9 @@ grammar ScientificNameDirty
138
138
  l = 'oe' if l == 'œ'
139
139
  res << l
140
140
  end
141
- res.tr('àâåãäáçčéèíìïňññóòôøõöúùüŕřŗššşž',
142
- 'aaaaaacceeiiinnnoooooouuurrrsssz')
141
+ res.tr('àâåãäáçčëéèíìïňññóòôøõöúùüŕřŗššşž',
142
+ 'aaaaaacceeeiiinnnoooooouuurrrsssz')
143
+
143
144
  end
144
145
  }
145
146
  end
@@ -96,6 +96,7 @@ describe ScientificNameDirty do
96
96
  names = ["Rühlella","Sténométope laevissimus Bibron 1855", "Döringina Ihering 1929"].each do |name|
97
97
  parse(name).should_not be_nil
98
98
  end
99
+ details("Hirsutëlla mâle").should == [{:uninomial=>{:string=>"Hirsutella"}}]
99
100
  end
100
101
 
101
102
  # AsterophUa japonica
@@ -56,6 +56,7 @@ Pseudocercospora dendrobii U. Braun & Crous|{"scientificName":{"parsed":true, "p
56
56
  Pseudocercospora dendrobii U. Braun et Crous|{"scientificName":{"parsed":true, "parser_version":"test_version", "parser_run":1,"verbatim":"Pseudocercospora dendrobii U. Braun et Crous","normalized":"Pseudocercospora dendrobii U. Braun et Crous","canonical":"Pseudocercospora dendrobii","hybrid":false,"details":[{"genus":{"string":"Pseudocercospora"},"species":{"string":"dendrobii","authorship":"U. Braun et Crous","basionymAuthorTeam":{"authorTeam":"U. Braun et Crous","author":["U. Braun","Crous"]}}}],"positions":{"0":["genus",16],"17":["species",26],"27":["author_word",29],"30":["author_word",35],"39":["author_word",44]}}}
57
57
  Pseudocercospora dendrobii U. Braun and Crous|{"scientificName":{"parsed":true, "parser_version":"test_version", "parser_run":1,"verbatim":"Pseudocercospora dendrobii U. Braun and Crous","normalized":"Pseudocercospora dendrobii U. Braun et Crous","canonical":"Pseudocercospora dendrobii","hybrid":false,"details":[{"genus":{"string":"Pseudocercospora"},"species":{"string":"dendrobii","authorship":"U. Braun and Crous","basionymAuthorTeam":{"authorTeam":"U. Braun and Crous","author":["U. Braun","Crous"]}}}],"positions":{"0":["genus",16],"17":["species",26],"27":["author_word",29],"30":["author_word",35],"40":["author_word",45]}}}
58
58
  Schottera nicaeënsis (J.V. Lamouroux ex Duby) Guiry & Hollenberg|{"scientificName":{"parsed":true, "parser_version":"test_version", "verbatim":"Schottera nicaeënsis (J.V. Lamouroux ex Duby) Guiry & Hollenberg", "normalized":"Schottera nicaeensis (J.V. Lamouroux ex Duby) Guiry et Hollenberg", "canonical":"Schottera nicaeensis", "hybrid":false, "details":[{"genus":{"string":"Schottera"}, "species":{"string":"nicaeensis", "authorship":"(J.V. Lamouroux ex Duby) Guiry & Hollenberg", "combinationAuthorTeam":{"authorTeam":"Guiry & Hollenberg", "author":["Guiry", "Hollenberg"]}, "basionymAuthorTeam":{"authorTeam":"J.V. Lamouroux", "author":["J.V. Lamouroux"], "exAuthorTeam":{"authorTeam":"Duby", "author":["Duby"]}}}}], "parser_run":1, "positions":{"0":["genus", 9], "10":["species", 20], "22":["author_word", 26], "27":["author_word", 36], "40":["author_word", 44], "46":["author_word", 51], "54":["author_word", 64]}}}
59
+ Hirsutëlla mâle|{"scientificName":{"parsed":true, "parser_version":"test_version", "verbatim":"Hirsutëlla mâle", "normalized":"Hirsutella", "canonical":"Hirsutella", "hybrid":false, "details":[{"uninomial":{"string":"Hirsutella"}}], "parser_run":2, "positions":{"0":["uninomial", 10]}}}
59
60
 
60
61
  #binomial with several authors and a year
61
62
  Pseudocercospora dendrobii U. Braun & Crous 2003|{"scientificName":{"parsed":true, "parser_version":"test_version", "parser_run":1,"verbatim":"Pseudocercospora dendrobii U. Braun & Crous 2003","normalized":"Pseudocercospora dendrobii U. Braun et Crous 2003","canonical":"Pseudocercospora dendrobii","hybrid":false,"details":[{"genus":{"string":"Pseudocercospora"},"species":{"string":"dendrobii","authorship":"U. Braun & Crous 2003","basionymAuthorTeam":{"authorTeam":"U. Braun & Crous","author":["U. Braun","Crous"],"year":"2003"}}}],"positions":{"0":["genus",16],"17":["species",26],"27":["author_word",29],"30":["author_word",35],"38":["author_word",43],"44":["year",48]}}}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: biodiversity19
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.15
4
+ version: 1.0.16
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-07-30 00:00:00.000000000 Z
12
+ date: 2012-08-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: treetop
@@ -160,6 +160,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
160
160
  - - ! '>='
161
161
  - !ruby/object:Gem::Version
162
162
  version: '0'
163
+ segments:
164
+ - 0
165
+ hash: 413805167991901495
163
166
  required_rubygems_version: !ruby/object:Gem::Requirement
164
167
  none: false
165
168
  requirements: