dimus-biodiversity 0.5.2 → 0.5.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -15,8 +15,12 @@ grammar ScientificNameClean
15
15
  a.pos
16
16
  end
17
17
 
18
+ def hybrid
19
+ a.hybrid
20
+ end
21
+
18
22
  def details
19
- a.details
23
+ a.details.class == Array ? a.details : [a.details]
20
24
  end
21
25
  }
22
26
  end
@@ -34,7 +38,11 @@ grammar ScientificNameClean
34
38
  def pos
35
39
  a.pos.merge(c.pos)
36
40
  end
37
-
41
+
42
+ def hybrid
43
+ a.hybrid
44
+ end
45
+
38
46
  def details
39
47
  a.details.merge(b.details(c))
40
48
  end
@@ -57,8 +65,12 @@ grammar ScientificNameClean
57
65
  a.pos.merge(b.pos)
58
66
  end
59
67
 
68
+ def hybrid
69
+ true
70
+ end
71
+
60
72
  def details
61
- {:hybridFormula => [a.details, b.details]}
73
+ [a.details, b.details]
62
74
  end
63
75
  }
64
76
  /
@@ -75,8 +87,12 @@ grammar ScientificNameClean
75
87
  a.pos
76
88
  end
77
89
 
90
+ def hybrid
91
+ true
92
+ end
93
+
78
94
  def details
79
- {:hybridFormula => [a.details, "?"]}
95
+ [a.details, "?"]
80
96
  end
81
97
  }
82
98
  /
@@ -97,8 +113,12 @@ grammar ScientificNameClean
97
113
  b.pos
98
114
  end
99
115
 
116
+ def hybrid
117
+ true
118
+ end
119
+
100
120
  def details
101
- {:namedHybrid => b.details}
121
+ b.details
102
122
  end
103
123
  }
104
124
  /
@@ -119,6 +139,10 @@ grammar ScientificNameClean
119
139
  a.pos
120
140
  end
121
141
 
142
+ def hybrid
143
+ a.hybrid rescue false
144
+ end
145
+
122
146
  def details
123
147
  a.details.merge(b.details)
124
148
  end
@@ -174,6 +198,10 @@ grammar ScientificNameClean
174
198
  def pos
175
199
  a.pos.merge(b.pos).merge(c.pos).merge(d.pos)
176
200
  end
201
+
202
+ def hybrid
203
+ c.hybrid rescue false
204
+ end
177
205
 
178
206
  def details
179
207
  a.details.merge(b.details).merge(c.details).merge(d.details)
@@ -193,6 +221,10 @@ grammar ScientificNameClean
193
221
  a.pos.merge(b.pos).merge(c.pos)
194
222
  end
195
223
 
224
+ def hybrid
225
+ c.hybrid rescue false
226
+ end
227
+
196
228
  def details
197
229
  a.details.merge(b.details).merge(c.details)
198
230
  end
@@ -210,6 +242,10 @@ grammar ScientificNameClean
210
242
  def pos
211
243
  a.pos.merge(b.pos).merge(c.pos)
212
244
  end
245
+
246
+ def hybrid
247
+ b.hybrid rescue false
248
+ end
213
249
 
214
250
  def details
215
251
  a.details.merge(b.details).merge(c.details)
@@ -229,6 +265,10 @@ grammar ScientificNameClean
229
265
  a.pos.merge(b.pos)
230
266
  end
231
267
 
268
+ def hybrid
269
+ b.hybrid rescue false
270
+ end
271
+
232
272
  def details
233
273
  a.details.merge(b.details)
234
274
  end
@@ -256,7 +296,11 @@ grammar ScientificNameClean
256
296
  end
257
297
  }
258
298
  /
259
- infraspecies
299
+ infraspecies {
300
+ def details
301
+ {:infraspecies => [super[:infraspecies]]}
302
+ end
303
+ }
260
304
  end
261
305
 
262
306
  rule infraspecies
@@ -384,6 +428,10 @@ grammar ScientificNameClean
384
428
  a.canonical
385
429
  end
386
430
 
431
+ def hybrid
432
+ a.hybrid rescue false
433
+ end
434
+
387
435
  def pos
388
436
  a.pos.merge(b.pos)
389
437
  end
@@ -405,6 +453,10 @@ grammar ScientificNameClean
405
453
  def canonical
406
454
  a.value
407
455
  end
456
+
457
+ def hybrid
458
+ a.hybrid rescue false
459
+ end
408
460
 
409
461
  def pos
410
462
  {a.interval.begin => ['species', a.interval.end]}
@@ -424,6 +476,10 @@ grammar ScientificNameClean
424
476
  {interval.begin => ['species', interval.end]}
425
477
  end
426
478
 
479
+ def hybrid
480
+ false
481
+ end
482
+
427
483
  def details
428
484
  {:species => {:epitheton => value}}
429
485
  end
@@ -486,6 +542,10 @@ grammar ScientificNameClean
486
542
  a.pos.merge(b.pos)
487
543
  end
488
544
 
545
+ def hybrid
546
+ false
547
+ end
548
+
489
549
  def details
490
550
  {:uninomial => a.details[:uninomial].merge(b.details)}
491
551
  end
@@ -504,6 +564,10 @@ grammar ScientificNameClean
504
564
  {interval.begin => ['uninomial', interval.end]}
505
565
  end
506
566
 
567
+ def hybrid
568
+ false
569
+ end
570
+
507
571
  def details
508
572
  {:uninomial => {:epitheton => value}}
509
573
  end
@@ -904,12 +968,16 @@ grammar ScientificNameClean
904
968
  b.value
905
969
  end
906
970
 
971
+ def hybrid
972
+ true
973
+ end
974
+
907
975
  def pos
908
976
  {b.interval.begin => ['species', b.interval.end]}
909
977
  end
910
978
 
911
979
  def details
912
- {:species => {:epitheton => b.value, :namedHybrid => true}}
980
+ {:species => {:epitheton => b.value}}
913
981
  end
914
982
  }
915
983
  /
@@ -922,12 +990,16 @@ grammar ScientificNameClean
922
990
  b.value
923
991
  end
924
992
 
993
+ def hybrid
994
+ true
995
+ end
996
+
925
997
  def pos
926
998
  {b.interval.begin => ['species', b.interval.end]}
927
999
  end
928
1000
 
929
1001
  def details
930
- {:species => {:epitheton => b.value, :namedHybrid => true}}
1002
+ {:species => {:epitheton => b.value}}
931
1003
  end
932
1004
  }
933
1005
  /
@@ -940,12 +1012,16 @@ grammar ScientificNameClean
940
1012
  b.value
941
1013
  end
942
1014
 
1015
+ def hybrid
1016
+ true
1017
+ end
1018
+
943
1019
  def pos
944
1020
  {b.interval.begin => ['species', b.interval.end]}
945
1021
  end
946
1022
 
947
1023
  def details
948
- {:species => {:epitheton => b.value, :namedHybrid => true}}
1024
+ {:species => {:epitheton => b.value}}
949
1025
  end
950
1026
  }
951
1027
  end
@@ -9,14 +9,24 @@ describe ScientificNameClean do
9
9
  end
10
10
 
11
11
  it 'should generate standardized json' do
12
- f = open(File.expand_path(dir + "../../spec/parser/test_data.txt"))
13
- f.each do |line|
14
- name, jsn, notes = line.split("|")
15
- next unless line.match(/^\s*#/) == nil && name && jsn
16
- JSON.load(json(name)).should == JSON.load(jsn)
12
+ read_test_file do |y|
13
+ JSON.load(json(y[:name])).should == JSON.load(y[:jsn]) unless y[:comment]
17
14
  end
18
15
  end
19
16
 
17
+ # it 'should generate new test_file' do
18
+ # new_test = open(File.expand_path(dir + "../../spec/parser/test_data_new.txt"),'w')
19
+ # read_test_file do |y|
20
+ # if y[:comment]
21
+ # new_test.write y[:comment]
22
+ # else
23
+ # name = y[:name]
24
+ # jsn = json(y[:name])# rescue puts(y[:name])
25
+ # new_test.write("#{name}|#{jsn}\n")
26
+ # end
27
+ # end
28
+ # end
29
+
20
30
  it 'should generate reasonable output if parser failed' do
21
31
  sn = 'ddd sljlkj 3223452432'
22
32
  json(sn).should == '{"scientificName":{"parsed":false,"verbatim":"ddd sljlkj 3223452432"}}'
@@ -10,16 +10,17 @@ describe ScientificNameCanonical do
10
10
 
11
11
  it 'should parse names with valid name part and unparseable rest' do
12
12
  [
13
- ['Morea ssjjlajajaj324$33 234243242','Morea', {:uninomial=>{:epitheton=>"Morea"}}, {0=>["uninomial", 5]}],
14
- ['Morea (Morea) Burt 2342343242 23424322342 23424234', 'Morea (Morea)', {:genus=>{:epitheton=>"Morea"}, :subgenus=>{:epitheton=>"Morea"}}, {0=>["genus", 5], 7=>["subgenus", 12]}],
15
- ['Morea (Morea) burtius 2342343242 23424322342 23424234', 'Morea (Morea) burtius', {:genus=>{:epitheton=>"Morea"}, :subgenus=>{:epitheton=>"Morea"}, :species=>{:epitheton=>"burtius"}}, {0=>["genus", 5], 7=>["subgenus", 12], 14=>["species", 21]}],
16
- ['Moraea spathulata ( (L. f. Klatt','Moraea spathulata',{:genus=>{:epitheton=>"Moraea"}, :species=>{:epitheton=>"spathulata"}}, {0=>["genus", 6], 7=>["species", 17]} ],
17
- ['Verpericola megasoma ""Dall" Pils.','Verpericola megasoma',{:genus=>{:epitheton=>"Verpericola"}, :species=>{:epitheton=>"megasoma"}}, {0=>["genus", 11], 12=>["species", 20]}]
13
+ ['Morea ssjjlajajaj324$33 234243242','Morea', [{:uninomial=>{:epitheton=>"Morea"}}], {0=>["uninomial", 5]}],
14
+ ['Morea (Morea) Burt 2342343242 23424322342 23424234', 'Morea (Morea)', [{:genus=>{:epitheton=>"Morea"}, :subgenus=>{:epitheton=>"Morea"}}], {0=>["genus", 5], 7=>["subgenus", 12]}],
15
+ ['Morea (Morea) burtius 2342343242 23424322342 23424234', 'Morea (Morea) burtius', [{:genus=>{:epitheton=>"Morea"}, :subgenus=>{:epitheton=>"Morea"}, :species=>{:epitheton=>"burtius"}}], {0=>["genus", 5], 7=>["subgenus", 12], 14=>["species", 21]}],
16
+ ['Moraea spathulata ( (L. f. Klatt','Moraea spathulata',[{:genus=>{:epitheton=>"Moraea"}, :species=>{:epitheton=>"spathulata"}}], {0=>["genus", 6], 7=>["species", 17]} ],
17
+ ['Verpericola megasoma ""Dall" Pils.','Verpericola megasoma',[{:genus=>{:epitheton=>"Verpericola"}, :species=>{:epitheton=>"megasoma"}}], {0=>["genus", 11], 12=>["species", 20]}]
18
18
  ].each do |n|
19
19
  parse(n[0]).should_not be_nil
20
20
  value(n[0]).should == n[1]
21
21
  details(n[0]).should == n[2]
22
22
  pos(n[0]).should == n[3]
23
+ parse(n[0]).hybrid.should be_false
23
24
  end
24
25
  end
25
26
 
@@ -13,19 +13,19 @@ describe ScientificNameClean do
13
13
  parse(sn).should_not be_nil
14
14
  value(sn).should == 'Pseudocercospora'
15
15
  canonical(sn).should == 'Pseudocercospora'
16
- details(sn).should == {:uninomial=>{:epitheton=>"Pseudocercospora"}}
16
+ details(sn).should == [{:uninomial=>{:epitheton=>"Pseudocercospora"}}]
17
17
  pos(sn).should == {0=>["uninomial", 16]}
18
18
  end
19
19
 
20
20
  it 'should parse uninomial with author and year' do
21
21
  sn = 'Pseudocercospora Speg.'
22
22
  parse(sn).should_not be_nil
23
- details(sn).should == {:uninomial=>{:epitheton=>"Pseudocercospora", :authorship=>"Speg.", :basionymAuthorTeam=>{:authorTeam=>"Speg.", :author=>["Speg."]}}}
23
+ details(sn).should == [{:uninomial=>{:epitheton=>"Pseudocercospora", :authorship=>"Speg.", :basionymAuthorTeam=>{:authorTeam=>"Speg.", :author=>["Speg."]}}}]
24
24
  pos(sn).should == {0=>["uninomial", 16], 17=>["author_word", 22]}
25
25
  sn = 'Pseudocercospora Spegazzini, 1910'
26
26
  parse(sn).should_not be_nil
27
27
  value(sn).should == 'Pseudocercospora Spegazzini 1910'
28
- details(sn).should == {:uninomial=>{:epitheton=>"Pseudocercospora", :authorship=>"Spegazzini, 1910", :basionymAuthorTeam=>{:authorTeam=>"Spegazzini", :author=>["Spegazzini"], :year=>"1910"}}}
28
+ details(sn).should == [{:uninomial=>{:epitheton=>"Pseudocercospora", :authorship=>"Spegazzini, 1910", :basionymAuthorTeam=>{:authorTeam=>"Spegazzini", :author=>["Spegazzini"], :year=>"1910"}}}]
29
29
  pos(sn).should == {0=>["uninomial", 16], 17=>["author_word", 27], 29=>["year", 33]}
30
30
  end
31
31
 
@@ -59,7 +59,7 @@ describe ScientificNameClean do
59
59
  parse(sn).should_not be_nil
60
60
  value(sn).should == 'Pseudocercospora dendrobii'
61
61
  canonical(sn).should == 'Pseudocercospora dendrobii'
62
- details(sn).should == {:genus=>{:epitheton=>"Pseudocercospora"}, :species=>{:epitheton=>"dendrobii"}}
62
+ details(sn).should == [{:genus=>{:epitheton=>"Pseudocercospora"}, :species=>{:epitheton=>"dendrobii"}}]
63
63
  pos(sn).should == {0=>["genus", 16], 21=>["species", 30]}
64
64
  end
65
65
 
@@ -71,12 +71,12 @@ describe ScientificNameClean do
71
71
  sn = "Platypus bicaudatulus Schedl, 1935h"
72
72
  parse(sn).should_not be_nil
73
73
  value(sn).should == "Platypus bicaudatulus Schedl 1935"
74
- details(sn).should == {:genus=>{:epitheton=>"Platypus"}, :species=>{:epitheton=>"bicaudatulus", :authorship=>"Schedl, 1935h", :basionymAuthorTeam=>{:authorTeam=>"Schedl", :author=>["Schedl"], :year=>"1935"}}}
74
+ details(sn).should == [{:genus=>{:epitheton=>"Platypus"}, :species=>{:epitheton=>"bicaudatulus", :authorship=>"Schedl, 1935h", :basionymAuthorTeam=>{:authorTeam=>"Schedl", :author=>["Schedl"], :year=>"1935"}}}]
75
75
  pos(sn).should == {0=>["genus", 8], 9=>["species", 21], 22=>["author_word", 28], 30=>["year", 35]}
76
76
  parse("Platypus bicaudatulus Schedl, 1935B").should_not be_nil
77
77
  sn = "Platypus bicaudatulus Schedl (1935h)"
78
78
  parse(sn).should_not be_nil
79
- details(sn).should == {:genus=>{:epitheton=>"Platypus"}, :species=>{:epitheton=>"bicaudatulus", :authorship=>"Schedl (1935h)", :basionymAuthorTeam=>{:authorTeam=>"Schedl", :author=>["Schedl"], :year=>"1935"}}}
79
+ details(sn).should == [{:genus=>{:epitheton=>"Platypus"}, :species=>{:epitheton=>"bicaudatulus", :authorship=>"Schedl (1935h)", :basionymAuthorTeam=>{:authorTeam=>"Schedl", :author=>["Schedl"], :year=>"1935"}}}]
80
80
  parse("Platypus bicaudatulus Schedl 1935").should_not be_nil
81
81
  end
82
82
 
@@ -84,7 +84,7 @@ describe ScientificNameClean do
84
84
  sn = "Ferganoconcha? oblonga"
85
85
  parse(sn).should_not be_nil
86
86
  value(sn).should == "Ferganoconcha oblonga"
87
- details(sn).should == {:genus=>{:epitheton=>"Ferganoconcha"}, :species=>{:epitheton=>"oblonga"}}
87
+ details(sn).should == [{:genus=>{:epitheton=>"Ferganoconcha"}, :species=>{:epitheton=>"oblonga"}}]
88
88
  pos(sn).should == {0=>["genus", 14], 15=>["species", 22]}
89
89
  end
90
90
 
@@ -113,7 +113,7 @@ describe ScientificNameClean do
113
113
  parse(sn).should_not be_nil
114
114
  value(sn).should == "Trematosphaeria phaeospora (E. Müll.) L. Holm 1957"
115
115
  canonical(sn).should == "Trematosphaeria phaeospora"
116
- details(sn).should == {:genus=>{:epitheton=>"Trematosphaeria"}, :species=>{:epitheton=>"phaeospora", :authorship=>"(E. Müll.) L. Holm 1957", :combinationAuthorTeam=>{:authorTeam=>"L. Holm", :author=>["L. Holm"], :year=>"1957"}, :basionymAuthorTeam=>{:authorTeam=>"E. Müll.", :author=>["E. Müll."]}}}
116
+ details(sn).should == [{:genus=>{:epitheton=>"Trematosphaeria"}, :species=>{:epitheton=>"phaeospora", :authorship=>"(E. Müll.) L. Holm 1957", :combinationAuthorTeam=>{:authorTeam=>"L. Holm", :author=>["L. Holm"], :year=>"1957"}, :basionymAuthorTeam=>{:authorTeam=>"E. Müll.", :author=>["E. Müll."]}}}]
117
117
  pos(sn).should == {0=>["genus", 15], 16=>["species", 26], 28=>["author_word", 30], 31=>["author_word", 36], 46=>["author_word", 48], 61=>["author_word", 65], 66=>["year", 70]}
118
118
 
119
119
  end
@@ -123,7 +123,7 @@ describe ScientificNameClean do
123
123
  parse(sn).should_not be_nil
124
124
  value(sn).should == "Hegeter (Hegeter) intercedens Lindberg H 1950"
125
125
  canonical(sn).should == "Hegeter intercedens"
126
- details(sn).should == {:genus=>{:epitheton=>"Hegeter"}, :subgenus=>{:epitheton=>"Hegeter"}, :species=>{:epitheton=>"intercedens", :authorship=>"Lindberg H 1950", :basionymAuthorTeam=>{:authorTeam=>"Lindberg H", :author=>["Lindberg H"], :year=>"1950"}}}
126
+ details(sn).should == [{:genus=>{:epitheton=>"Hegeter"}, :subgenus=>{:epitheton=>"Hegeter"}, :species=>{:epitheton=>"intercedens", :authorship=>"Lindberg H 1950", :basionymAuthorTeam=>{:authorTeam=>"Lindberg H", :author=>["Lindberg H"], :year=>"1950"}}}]
127
127
  pos(sn).should == {0=>["genus", 7], 9=>["subgenus", 16], 18=>["species", 29], 30=>["author_word", 38], 39=>["author_word", 40], 41=>["year", 45]}
128
128
  end
129
129
 
@@ -132,7 +132,7 @@ describe ScientificNameClean do
132
132
  parse(sn).should_not be_nil
133
133
  value(sn).should == "Pseudocercospora dendrobii U. Braun et Crous"
134
134
  canonical(sn).should == "Pseudocercospora dendrobii"
135
- details(sn).should == {:genus=>{:epitheton=>"Pseudocercospora"}, :species=>{:epitheton=>"dendrobii", :authorship=>"U. Braun & Crous", :basionymAuthorTeam=>{:authorTeam=>"U. Braun & Crous", :author=>["U. Braun", "Crous"]}}}
135
+ details(sn).should == [{:genus=>{:epitheton=>"Pseudocercospora"}, :species=>{:epitheton=>"dendrobii", :authorship=>"U. Braun & Crous", :basionymAuthorTeam=>{:authorTeam=>"U. Braun & Crous", :author=>["U. Braun", "Crous"]}}}]
136
136
  pos(sn).should == {0=>["genus", 16], 17=>["species", 26], 27=>["author_word", 29], 30=>["author_word", 35], 38=>["author_word", 43]}
137
137
  sn = "Pseudocercospora dendrobii U. Braun and Crous"
138
138
  parse(sn).should_not be_nil
@@ -145,7 +145,7 @@ describe ScientificNameClean do
145
145
  parse(sn).should_not be_nil
146
146
  value(sn).should == "Arthopyrenia hyalospora (Nyl.) R.C. Harris"
147
147
  canonical(sn).should == "Arthopyrenia hyalospora"
148
- details(sn).should == {:genus=>{:epitheton=>"Arthopyrenia"}, :species=>{:epitheton=>"hyalospora", :authorship=>"(Nyl.)R.C. Harris", :combinationAuthorTeam=>{:authorTeam=>"R.C. Harris", :author=>["R.C. Harris"]}, :basionymAuthorTeam=>{:authorTeam=>"Nyl.", :author=>["Nyl."]}}}
148
+ details(sn).should == [{:genus=>{:epitheton=>"Arthopyrenia"}, :species=>{:epitheton=>"hyalospora", :authorship=>"(Nyl.)R.C. Harris", :combinationAuthorTeam=>{:authorTeam=>"R.C. Harris", :author=>["R.C. Harris"]}, :basionymAuthorTeam=>{:authorTeam=>"Nyl.", :author=>["Nyl."]}}}]
149
149
  end
150
150
 
151
151
 
@@ -155,7 +155,7 @@ describe ScientificNameClean do
155
155
  parse(sn).should_not be_nil
156
156
  value(sn).should == "Pseudocercospora dendrobii U. Braun et Crous 2003"
157
157
  canonical(sn).should == "Pseudocercospora dendrobii"
158
- details(sn).should == {:genus=>{:epitheton=>"Pseudocercospora"}, :species=>{:epitheton=>"dendrobii", :authorship=>"U. Braun & Crous 2003", :basionymAuthorTeam=>{:authorTeam=>"U. Braun & Crous", :author=>["U. Braun", "Crous"], :year=>"2003"}}}
158
+ details(sn).should == [{:genus=>{:epitheton=>"Pseudocercospora"}, :species=>{:epitheton=>"dendrobii", :authorship=>"U. Braun & Crous 2003", :basionymAuthorTeam=>{:authorTeam=>"U. Braun & Crous", :author=>["U. Braun", "Crous"], :year=>"2003"}}}]
159
159
  pos(sn).should == {0=>["genus", 16], 17=>["species", 26], 27=>["author_word", 29], 30=>["author_word", 35], 38=>["author_word", 43], 44=>["year", 48]}
160
160
  sn = "Pseudocercospora dendrobii Crous, 2003"
161
161
  parse(sn).should_not be_nil
@@ -164,14 +164,14 @@ describe ScientificNameClean do
164
164
  it 'should parse basionym authors in parenthesis' do
165
165
  sn = "Zophosis persis (Chatanay, 1914)"
166
166
  parse(sn).should_not be_nil
167
- details(sn).should == {:genus=>{:epitheton=>"Zophosis"}, :species=>{:epitheton=>"persis", :authorship=>"(Chatanay, 1914)", :basionymAuthorTeam=>{:authorTeam=>"Chatanay", :author=>["Chatanay"], :year=>"1914"}}}
167
+ details(sn).should == [{:genus=>{:epitheton=>"Zophosis"}, :species=>{:epitheton=>"persis", :authorship=>"(Chatanay, 1914)", :basionymAuthorTeam=>{:authorTeam=>"Chatanay", :author=>["Chatanay"], :year=>"1914"}}}]
168
168
  sn = "Zophosis persis (Chatanay 1914)"
169
169
  parse(sn).should_not be_nil
170
- details(sn).should == {:genus=>{:epitheton=>"Zophosis"}, :species=>{:epitheton=>"persis", :authorship=>"(Chatanay 1914)", :basionymAuthorTeam=>{:authorTeam=>"Chatanay", :author=>["Chatanay"], :year=>"1914"}}}
170
+ details(sn).should == [{:genus=>{:epitheton=>"Zophosis"}, :species=>{:epitheton=>"persis", :authorship=>"(Chatanay 1914)", :basionymAuthorTeam=>{:authorTeam=>"Chatanay", :author=>["Chatanay"], :year=>"1914"}}}]
171
171
  sn = "Zophosis persis (Chatanay), 1914"
172
172
  parse(sn).should_not be_nil
173
173
  value(sn).should == "Zophosis persis (Chatanay 1914)"
174
- details(sn).should == {:genus=>{:epitheton=>"Zophosis"}, :species=>{:epitheton=>"persis", :authorship=>"(Chatanay), 1914", :basionymAuthorTeam=>{:author_team=>"(Chatanay), 1914", :author=>["Chatanay"], :year=>"1914"}}}
174
+ details(sn).should == [{:genus=>{:epitheton=>"Zophosis"}, :species=>{:epitheton=>"persis", :authorship=>"(Chatanay), 1914", :basionymAuthorTeam=>{:author_team=>"(Chatanay), 1914", :author=>["Chatanay"], :year=>"1914"}}}]
175
175
  pos(sn).should == {0=>["genus", 8], 9=>["species", 15], 17=>["author_word", 25], 28=>["year", 32]}
176
176
  parse("Zophosis persis (Chatanay) 1914").should_not be_nil
177
177
  #parse("Zophosis persis Chatanay (1914)").should_not be_nil
@@ -182,11 +182,11 @@ describe ScientificNameClean do
182
182
  parse(sn).should_not be_nil
183
183
  value(sn).should == "Pseudocercospora dendrobii (H.C. Burnett) U. Braun et Crous 2003"
184
184
  canonical(sn).should == "Pseudocercospora dendrobii"
185
- details(sn).should == {:genus=>{:epitheton=>"Pseudocercospora"}, :species=>{:epitheton=>"dendrobii", :authorship=>"(H.C. Burnett)U. Braun & Crous 2003", :combinationAuthorTeam=>{:authorTeam=>"U. Braun & Crous", :author=>["U. Braun", "Crous"], :year=>"2003"}, :basionymAuthorTeam=>{:authorTeam=>"H.C. Burnett", :author=>["H.C. Burnett"]}}}
185
+ details(sn).should == [{:genus=>{:epitheton=>"Pseudocercospora"}, :species=>{:epitheton=>"dendrobii", :authorship=>"(H.C. Burnett)U. Braun & Crous 2003", :combinationAuthorTeam=>{:authorTeam=>"U. Braun & Crous", :author=>["U. Braun", "Crous"], :year=>"2003"}, :basionymAuthorTeam=>{:authorTeam=>"H.C. Burnett", :author=>["H.C. Burnett"]}}}]
186
186
  sn = "Pseudocercospora dendrobii(H.C. Burnett,1873)U. Braun & Crous 2003"
187
187
  parse(sn).should_not be_nil
188
188
  value(sn).should == "Pseudocercospora dendrobii (H.C. Burnett 1873) U. Braun et Crous 2003"
189
- details(sn).should == {:genus=>{:epitheton=>"Pseudocercospora"}, :species=>{:epitheton=>"dendrobii", :authorship=>"(H.C. Burnett,1873)U. Braun & Crous 2003", :combinationAuthorTeam=>{:authorTeam=>"U. Braun & Crous", :author=>["U. Braun", "Crous"], :year=>"2003"}, :basionymAuthorTeam=>{:authorTeam=>"H.C. Burnett", :author=>["H.C. Burnett"], :year=>"1873"}}}
189
+ details(sn).should == [{:genus=>{:epitheton=>"Pseudocercospora"}, :species=>{:epitheton=>"dendrobii", :authorship=>"(H.C. Burnett,1873)U. Braun & Crous 2003", :combinationAuthorTeam=>{:authorTeam=>"U. Braun & Crous", :author=>["U. Braun", "Crous"], :year=>"2003"}, :basionymAuthorTeam=>{:authorTeam=>"H.C. Burnett", :author=>["H.C. Burnett"], :year=>"1873"}}}]
190
190
  end
191
191
 
192
192
  it 'should parse several authors with several years' do
@@ -194,7 +194,7 @@ describe ScientificNameClean do
194
194
  parse(sn).should_not be_nil
195
195
  value(sn).should == "Pseudocercospora dendrobii (H.C. Burnett 1883) U. Braun et Crous 2003"
196
196
  canonical(sn).should == "Pseudocercospora dendrobii"
197
- details(sn).should == {:genus=>{:epitheton=>"Pseudocercospora"}, :species=>{:epitheton=>"dendrobii", :authorship=>"(H.C. Burnett 1883) U. Braun & Crous 2003", :combinationAuthorTeam=>{:authorTeam=>"U. Braun & Crous", :author=>["U. Braun", "Crous"], :year=>"2003"}, :basionymAuthorTeam=>{:authorTeam=>"H.C. Burnett", :author=>["H.C. Burnett"], :year=>"1883"}}}
197
+ details(sn).should == [{:genus=>{:epitheton=>"Pseudocercospora"}, :species=>{:epitheton=>"dendrobii", :authorship=>"(H.C. Burnett 1883) U. Braun & Crous 2003", :combinationAuthorTeam=>{:authorTeam=>"U. Braun & Crous", :author=>["U. Braun", "Crous"], :year=>"2003"}, :basionymAuthorTeam=>{:authorTeam=>"H.C. Burnett", :author=>["H.C. Burnett"], :year=>"1883"}}}]
198
198
  pos(sn).should == {0=>["genus", 16], 17=>["species", 26], 28=>["author_word", 32], 33=>["author_word", 40], 41=>["year", 45], 47=>["author_word", 49], 50=>["author_word", 55], 58=>["author_word", 63], 64=>["year", 68]}
199
199
  end
200
200
 
@@ -203,21 +203,21 @@ describe ScientificNameClean do
203
203
  parse(sn).should_not be_nil
204
204
  value(sn).should == "Hydnellum scrobiculatum zonatum (Banker) D. Hall et D.E. Stuntz 1972"
205
205
  canonical(sn).should == "Hydnellum scrobiculatum zonatum"
206
- details(sn).should == {:genus=>{:epitheton=>"Hydnellum"}, :species=>{:epitheton=>"scrobiculatum"}, :infraspecies=>{:epitheton=>"zonatum", :rank=>"n/a", :authorship=>"(Banker) D. Hall & D.E. Stuntz 1972", :combinationAuthorTeam=>{:authorTeam=>"D. Hall & D.E. Stuntz", :author=>["D. Hall", "D.E. Stuntz"], :year=>"1972"}, :basionymAuthorTeam=>{:authorTeam=>"Banker", :author=>["Banker"]}}}
206
+ details(sn).should == [{:genus=>{:epitheton=>"Hydnellum"}, :species=>{:epitheton=>"scrobiculatum"}, :infraspecies=>[{:epitheton=>"zonatum", :rank=>"n/a", :authorship=>"(Banker) D. Hall & D.E. Stuntz 1972", :combinationAuthorTeam=>{:authorTeam=>"D. Hall & D.E. Stuntz", :author=>["D. Hall", "D.E. Stuntz"], :year=>"1972"}, :basionymAuthorTeam=>{:authorTeam=>"Banker", :author=>["Banker"]}}]}]
207
207
  pos(sn).should == {0=>["genus", 9], 10=>["species", 23], 24=>["infraspecies", 31], 33=>["author_word", 39], 41=>["author_word", 43], 44=>["author_word", 48], 51=>["author_word", 55], 56=>["author_word", 62], 63=>["year", 67]}
208
208
  sn = "Begonia pingbienensis angustior"
209
209
  parse(sn).should_not be_nil
210
- details(sn).should == {:genus=>{:epitheton=>"Begonia"}, :species=>{:epitheton=>"pingbienensis"}, :infraspecies=>{:epitheton=>"angustior", :rank=>"n/a"}}
210
+ details(sn).should == [{:genus=>{:epitheton=>"Begonia"}, :species=>{:epitheton=>"pingbienensis"}, :infraspecies=>[{:epitheton=>"angustior", :rank=>"n/a"}]}]
211
211
  pos(sn).should == {0=>["genus", 7], 8=>["species", 21], 22=>["infraspecies", 31]}
212
212
  end
213
213
 
214
214
  it 'should parse infraspecies with rank' do
215
215
  sn = "Aus bus Linn. var. bus"
216
216
  parse(sn).should_not be_nil
217
- details(sn).should == {:genus=>{:epitheton=>"Aus"}, :species=>{:epitheton=>"bus", :authorship=>"Linn.", :basionymAuthorTeam=>{:authorTeam=>"Linn.", :author=>["Linn."]}}, :infraspecies=>{:epitheton=>"bus", :rank=>"var."}}
217
+ details(sn).should == [{:genus=>{:epitheton=>"Aus"}, :species=>{:epitheton=>"bus", :authorship=>"Linn.", :basionymAuthorTeam=>{:authorTeam=>"Linn.", :author=>["Linn."]}}, :infraspecies=>[{:epitheton=>"bus", :rank=>"var."}]}]
218
218
  sn = "Agalinis purpurea (L.) Briton var. borealis (Berg.) Peterson 1987"
219
219
  parse(sn).should_not be_nil
220
- details(sn).should == {:genus=>{:epitheton=>"Agalinis"}, :species=>{:epitheton=>"purpurea", :authorship=>"(L.) Briton", :combinationAuthorTeam=>{:authorTeam=>"Briton", :author=>["Briton"]}, :basionymAuthorTeam=>{:authorTeam=>"L.", :author=>["L."]}}, :infraspecies=>{:epitheton=>"borealis", :rank=>"var.", :authorship=>"(Berg.) Peterson 1987", :combinationAuthorTeam=>{:authorTeam=>"Peterson", :author=>["Peterson"], :year=>"1987"}, :basionymAuthorTeam=>{:authorTeam=>"Berg.", :author=>["Berg."]}}}
220
+ details(sn).should == [{:genus=>{:epitheton=>"Agalinis"}, :species=>{:epitheton=>"purpurea", :authorship=>"(L.) Briton", :combinationAuthorTeam=>{:authorTeam=>"Briton", :author=>["Briton"]}, :basionymAuthorTeam=>{:authorTeam=>"L.", :author=>["L."]}}, :infraspecies=>[{:epitheton=>"borealis", :rank=>"var.", :authorship=>"(Berg.) Peterson 1987", :combinationAuthorTeam=>{:authorTeam=>"Peterson", :author=>["Peterson"], :year=>"1987"}, :basionymAuthorTeam=>{:authorTeam=>"Berg.", :author=>["Berg."]}}]}]
221
221
  pos(sn).should == {0=>["genus", 8], 9=>["species", 17], 19=>["author_word", 21], 23=>["author_word", 29], 35=>["infraspecies", 43], 45=>["author_word", 50], 52=>["author_word", 60], 61=>["year", 65]}
222
222
  sn = "Phaeographis inusta var. macularis(Leight.) A.L. Sm. 1861"
223
223
  parse(sn).should_not be_nil
@@ -230,11 +230,11 @@ describe ScientificNameClean do
230
230
  sn = "Tragacantha leporina (?) Kuntze"
231
231
  parse(sn).should_not be_nil
232
232
  value(sn).should == "Tragacantha leporina (?) Kuntze"
233
- details(sn).should == {:genus=>{:epitheton=>"Tragacantha"}, :species=>{:epitheton=>"leporina", :authorship=>"(?) Kuntze", :combinationAuthorTeam=>{:authorTeam=>"Kuntze", :author=>["Kuntze"]}, :basionymAuthorTeam=>{:authorTeam=>"(?)", :author=>["?"]}}}
233
+ details(sn).should == [{:genus=>{:epitheton=>"Tragacantha"}, :species=>{:epitheton=>"leporina", :authorship=>"(?) Kuntze", :combinationAuthorTeam=>{:authorTeam=>"Kuntze", :author=>["Kuntze"]}, :basionymAuthorTeam=>{:authorTeam=>"(?)", :author=>["?"]}}}]
234
234
  sn = "Lachenalia tricolor var. nelsonii (auct.) Baker"
235
235
  parse(sn).should_not be_nil
236
236
  value(sn).should == "Lachenalia tricolor var. nelsonii (auct.) Baker"
237
- details(sn).should == {:genus=>{:epitheton=>"Lachenalia"}, :species=>{:epitheton=>"tricolor"}, :infraspecies=>{:epitheton=>"nelsonii", :rank=>"var.", :authorship=>"(auct.) Baker", :combinationAuthorTeam=>{:authorTeam=>"Baker", :author=>["Baker"]}, :basionymAuthorTeam=>{:authorTeam=>"auct.", :author=>["unknown"]}}}
237
+ details(sn).should == [{:genus=>{:epitheton=>"Lachenalia"}, :species=>{:epitheton=>"tricolor"}, :infraspecies=>[{:epitheton=>"nelsonii", :rank=>"var.", :authorship=>"(auct.) Baker", :combinationAuthorTeam=>{:authorTeam=>"Baker", :author=>["Baker"]}, :basionymAuthorTeam=>{:authorTeam=>"auct.", :author=>["unknown"]}}]}]
238
238
  pos(sn).should == {0=>["genus", 10], 11=>["species", 19], 25=>["infraspecies", 33], 35=>["unknown_author", 40], 42=>["author_word", 47]}
239
239
  end
240
240
 
@@ -248,7 +248,7 @@ describe ScientificNameClean do
248
248
  sn = "Stagonospora polyspora M.T. Lucas & Sousa da Câmara 1934"
249
249
  parse(sn).should_not be_nil
250
250
  value(sn).should == "Stagonospora polyspora M.T. Lucas et Sousa da Câmara 1934"
251
- details(sn).should == {:genus=>{:epitheton=>"Stagonospora"}, :species=>{:epitheton=>"polyspora", :authorship=>"M.T. Lucas & Sousa da Câmara 1934", :basionymAuthorTeam=>{:authorTeam=>"M.T. Lucas & Sousa da Câmara", :author=>["M.T. Lucas", "Sousa da Câmara"], :year=>"1934"}}}
251
+ details(sn).should == [{:genus=>{:epitheton=>"Stagonospora"}, :species=>{:epitheton=>"polyspora", :authorship=>"M.T. Lucas & Sousa da Câmara 1934", :basionymAuthorTeam=>{:authorTeam=>"M.T. Lucas & Sousa da Câmara", :author=>["M.T. Lucas", "Sousa da Câmara"], :year=>"1934"}}}]
252
252
  pos(sn).should == {0=>["genus", 12], 13=>["species", 22], 23=>["author_word", 27], 28=>["author_word", 33], 36=>["author_word", 41], 42=>["author_word", 44], 45=>["author_word", 51], 52=>["year", 56]}
253
253
  parse("Cladoniicola staurospora Diederich, van den Boom & Aptroot 2001").should_not be_nil
254
254
  sn = "Yarrowia lipolytica var. lipolytica (Wick., Kurtzman & E.A. Herrm.) Van der Walt & Arx 1981"
@@ -271,14 +271,14 @@ describe ScientificNameClean do
271
271
  # author is exception
272
272
  sn = "Tuber liui A S. Xu 1999"
273
273
  parse(sn).should_not be_nil
274
- details(sn).should == {:genus=>{:epitheton=>"Tuber"}, :species=>{:epitheton=>"liui", :authorship=>"A S. Xu 1999", :basionymAuthorTeam=>{:authorTeam=>"A S. Xu", :author=>["A S. Xu"], :year=>"1999"}}}
274
+ details(sn).should == [{:genus=>{:epitheton=>"Tuber"}, :species=>{:epitheton=>"liui", :authorship=>"A S. Xu 1999", :basionymAuthorTeam=>{:authorTeam=>"A S. Xu", :author=>["A S. Xu"], :year=>"1999"}}}]
275
275
  parse('Xylaria potentillae A S. Xu').should_not be_nil
276
276
  parse("Agaricus squamula Berk. & M.A. Curtis 1860").should_not be_nil
277
277
  parse("Peltula coriacea Büdel, Henssen & Wessels 1986").should_not be_nil
278
278
  #had to add no dot rule for trinomials without a rank to make it to work
279
279
  sn = "Saccharomyces drosophilae anon."
280
280
  parse(sn).should_not be_nil
281
- details(sn).should == {:genus=>{:epitheton=>"Saccharomyces"}, :species=>{:epitheton=>"drosophilae", :authorship=>"anon.", :basionymAuthorTeam=>{:authorTeam=>"anon.", :author=>["unknown"]}}}
281
+ details(sn).should == [{:genus=>{:epitheton=>"Saccharomyces"}, :species=>{:epitheton=>"drosophilae", :authorship=>"anon.", :basionymAuthorTeam=>{:authorTeam=>"anon.", :author=>["unknown"]}}}]
282
282
  pos(sn).should == {0=>["genus", 13], 14=>["species", 25], 26=>["unknown_author", 31]}
283
283
  sn = "Abacetus laevicollis de Chaudoir, 1869"
284
284
  parse(sn).should_not be_nil
@@ -289,7 +289,7 @@ describe ScientificNameClean do
289
289
  canonical(sn).should == 'Gastrosericus eremorum'
290
290
  sn = "Cypraeovula (Luponia) amphithales perdentata"
291
291
  canonical(sn).should == 'Cypraeovula Luponia amphithales perdentata'
292
- details(sn).should == {:genus=>{:epitheton=>"Cypraeovula"}, :subgenus=>{:epitheton=>"Luponia"}, :species=>{:epitheton=>"amphithales"}, :infraspecies=>{:epitheton=>"perdentata", :rank=>"n/a"}}
292
+ details(sn).should == [{:genus=>{:epitheton=>"Cypraeovula"}, :subgenus=>{:epitheton=>"Luponia"}, :species=>{:epitheton=>"amphithales"}, :infraspecies=>[{:epitheton=>"perdentata", :rank=>"n/a"}]}]
293
293
  sn = "Polyrhachis orsyllus nat musculus Forel 1901"
294
294
  canonical(sn).should == "Polyrhachis orsyllus musculus"
295
295
  sn = 'Latrodectus 13-guttatus Thorell, 1875'
@@ -305,7 +305,7 @@ describe ScientificNameClean do
305
305
  parse(sn).should_not be_nil
306
306
  value(sn).should == "Callideriphus flavicollis morph. reductus Fuchs 1961"
307
307
  canonical(sn).should == "Callideriphus flavicollis reductus"
308
- details(sn).should == {:genus=>{:epitheton=>"Callideriphus"}, :species=>{:epitheton=>"flavicollis"}, :infraspecies=>{:epitheton=>"reductus", :rank=>"morph.", :authorship=>"Fuchs 1961", :basionymAuthorTeam=>{:authorTeam=>"Fuchs", :author=>["Fuchs"], :year=>"1961"}}}
308
+ details(sn).should == [{:genus=>{:epitheton=>"Callideriphus"}, :species=>{:epitheton=>"flavicollis"}, :infraspecies=>[{:epitheton=>"reductus", :rank=>"morph.", :authorship=>"Fuchs 1961", :basionymAuthorTeam=>{:authorTeam=>"Fuchs", :author=>["Fuchs"], :year=>"1961"}}]}]
309
309
  pos(sn).should == {0=>["genus", 13], 14=>["species", 25], 33=>["infraspecies", 41], 42=>["author_word", 47], 48=>["year", 52]}
310
310
  end
311
311
 
@@ -315,26 +315,26 @@ describe ScientificNameClean do
315
315
  parse(sn).should_not be_nil
316
316
  value(sn).should == "Caulerpa cupressoides f. nuda"
317
317
  canonical(sn).should == "Caulerpa cupressoides nuda"
318
- details(sn).should == {:genus=>{:epitheton=>"Caulerpa"}, :species=>{:epitheton=>"cupressoides"}, :infraspecies=>{:epitheton=>"nuda", :rank=>"f."}}
318
+ details(sn).should == [{:genus=>{:epitheton=>"Caulerpa"}, :species=>{:epitheton=>"cupressoides"}, :infraspecies=>[{:epitheton=>"nuda", :rank=>"f."}]}]
319
319
  pos(sn).should == {0=>["genus", 8], 9=>["species", 21], 28=>["infraspecies", 32]}
320
320
  sn = "Chlorocyperus glaber form. fasciculariforme (Lojac.) Soó"
321
321
  parse(sn).should_not be_nil
322
322
  value("Chlorocyperus glaber form. fasciculariforme (Lojac.) Soó").should == "Chlorocyperus glaber f. fasciculariforme (Lojac.) Soó"
323
323
  canonical(sn).should == "Chlorocyperus glaber fasciculariforme"
324
- details(sn).should == {:genus=>{:epitheton=>"Chlorocyperus"}, :species=>{:epitheton=>"glaber"}, :infraspecies=>{:epitheton=>"fasciculariforme", :rank=>"f.", :authorship=>"(Lojac.) Soó", :combinationAuthorTeam=>{:authorTeam=>"Soó", :author=>["Soó"]}, :basionymAuthorTeam=>{:authorTeam=>"Lojac.", :author=>["Lojac."]}}}
324
+ details(sn).should == [{:genus=>{:epitheton=>"Chlorocyperus"}, :species=>{:epitheton=>"glaber"}, :infraspecies=>[{:epitheton=>"fasciculariforme", :rank=>"f.", :authorship=>"(Lojac.) Soó", :combinationAuthorTeam=>{:authorTeam=>"Soó", :author=>["Soó"]}, :basionymAuthorTeam=>{:authorTeam=>"Lojac.", :author=>["Lojac."]}}]}]
325
325
  pos(sn).should == {0=>["genus", 13], 14=>["species", 20], 27=>["infraspecies", 43], 45=>["author_word", 51], 53=>["author_word", 56]}
326
326
  sn = "Bambusa nana Roxb. fo. alphonse-karri (Mitford ex Satow) Makino ex Shiros."
327
327
  parse(sn).should_not be_nil
328
328
  value(sn).should == "Bambusa nana Roxb. f. alphonse-karri (Mitford ex Satow) Makino ex Shiros."
329
329
  canonical(sn).should == "Bambusa nana alphonse-karri"
330
- details(sn).should == {:genus=>{:epitheton=>"Bambusa"}, :species=>{:epitheton=>"nana", :authorship=>"Roxb.", :basionymAuthorTeam=>{:authorTeam=>"Roxb.", :author=>["Roxb."]}}, :infraspecies=>{:epitheton=>"alphonse-karri", :rank=>"f.", :authorship=>"(Mitford ex Satow) Makino ex Shiros.", :combinationAuthorTeam=>{:authorTeam=>"Makino", :author=>["Makino"], :exAuthorTeam=>{:authorTeam=>"Shiros.", :author=>["Shiros."]}}, :basionymAuthorTeam=>{:authorTeam=>"Mitford", :author=>["Mitford"], :exAuthorTeam=>{:authorTeam=>"Satow", :author=>["Satow"]}}}}
330
+ details(sn).should == [{:genus=>{:epitheton=>"Bambusa"}, :species=>{:epitheton=>"nana", :authorship=>"Roxb.", :basionymAuthorTeam=>{:authorTeam=>"Roxb.", :author=>["Roxb."]}}, :infraspecies=>[{:epitheton=>"alphonse-karri", :rank=>"f.", :authorship=>"(Mitford ex Satow) Makino ex Shiros.", :combinationAuthorTeam=>{:authorTeam=>"Makino", :author=>["Makino"], :exAuthorTeam=>{:authorTeam=>"Shiros.", :author=>["Shiros."]}}, :basionymAuthorTeam=>{:authorTeam=>"Mitford", :author=>["Mitford"], :exAuthorTeam=>{:authorTeam=>"Satow", :author=>["Satow"]}}}]}]
331
331
  pos(sn).should == {0=>["genus", 7], 8=>["species", 12], 13=>["author_word", 18], 23=>["infraspecies", 37], 39=>["author_word", 46], 50=>["author_word", 55], 57=>["author_word", 63], 67=>["author_word", 74]}
332
332
  sn = " Sphaerotheca fuliginea f. dahliae Movss. 1967 "
333
333
  sn = "Sphaerotheca fuliginea f. dahliae Movss. 1967"
334
334
  parse(sn).should_not be_nil
335
335
  value(sn).should == "Sphaerotheca fuliginea f. dahliae Movss. 1967"
336
336
  canonical(sn).should == "Sphaerotheca fuliginea dahliae"
337
- details(sn).should == {:genus=>{:epitheton=>"Sphaerotheca"}, :species=>{:epitheton=>"fuliginea"}, :infraspecies=>{:epitheton=>"dahliae", :rank=>"f.", :authorship=>"Movss. 1967", :basionymAuthorTeam=>{:authorTeam=>"Movss.", :author=>["Movss."], :year=>"1967"}}}
337
+ details(sn).should == [{:genus=>{:epitheton=>"Sphaerotheca"}, :species=>{:epitheton=>"fuliginea"}, :infraspecies=>[{:epitheton=>"dahliae", :rank=>"f.", :authorship=>"Movss. 1967", :basionymAuthorTeam=>{:authorTeam=>"Movss.", :author=>["Movss."], :year=>"1967"}}]}]
338
338
  pos(sn).should == {0=>["genus", 12], 16=>["species", 25], 36=>["infraspecies", 43], 47=>["author_word", 53], 58=>["year", 62]}
339
339
  parse('Polypodium vulgare nothosubsp. mantoniae (Rothm.) Schidlay').should_not be_nil
340
340
  end
@@ -343,7 +343,7 @@ describe ScientificNameClean do
343
343
  sn = "Hydnellum scrobiculatum var. zonatum f. parvum (Banker) D. Hall & D.E. Stuntz 1972"
344
344
  parse(sn).should_not be_nil
345
345
  value(sn).should == "Hydnellum scrobiculatum var. zonatum f. parvum (Banker) D. Hall et D.E. Stuntz 1972"
346
- details(sn).should == {:genus=>{:epitheton=>"Hydnellum"}, :species=>{:epitheton=>"scrobiculatum"}, :infraspecies=>[{:epitheton=>"zonatum", :rank=>"var."}, {:epitheton=>"parvum", :rank=>"f.", :authorship=>"(Banker) D. Hall & D.E. Stuntz 1972", :combinationAuthorTeam=>{:authorTeam=>"D. Hall & D.E. Stuntz", :author=>["D. Hall", "D.E. Stuntz"], :year=>"1972"}, :basionymAuthorTeam=>{:authorTeam=>"Banker", :author=>["Banker"]}}]}
346
+ details(sn).should == [{:genus=>{:epitheton=>"Hydnellum"}, :species=>{:epitheton=>"scrobiculatum"}, :infraspecies=>[{:epitheton=>"zonatum", :rank=>"var."}, {:epitheton=>"parvum", :rank=>"f.", :authorship=>"(Banker) D. Hall & D.E. Stuntz 1972", :combinationAuthorTeam=>{:authorTeam=>"D. Hall & D.E. Stuntz", :author=>["D. Hall", "D.E. Stuntz"], :year=>"1972"}, :basionymAuthorTeam=>{:authorTeam=>"Banker", :author=>["Banker"]}}]}]
347
347
  pos(sn).should == {0=>["genus", 9], 10=>["species", 23], 29=>["infraspecies", 36], 40=>["infraspecies", 46], 48=>["author_word", 54], 56=>["author_word", 58], 59=>["author_word", 63], 66=>["author_word", 70], 71=>["author_word", 77], 78=>["year", 82]}
348
348
  parse('Senecio fuchsii C.C.Gmel. subsp. fuchsii var. expansus (Boiss. & Heldr.) Hayek').should_not be_nil
349
349
  parse('Senecio fuchsii C.C.Gmel. subsp. fuchsii var. fuchsii').should_not be_nil
@@ -356,7 +356,7 @@ describe ScientificNameClean do
356
356
  parse(sn).should_not be_nil
357
357
  value(sn).should == "Arthopyrenia hyalospora (Nyl.) R.C. Harris comb. nov."
358
358
  canonical(sn).should == "Arthopyrenia hyalospora"
359
- details(sn).should == {:genus=>{:epitheton=>"Arthopyrenia"}, :species=>{:epitheton=>"hyalospora", :authorship=>"(Nyl.) R.C. Harris", :combinationAuthorTeam=>{:authorTeam=>"R.C. Harris ", :author=>["R.C. Harris"]}, :basionymAuthorTeam=>{:authorTeam=>"Nyl.", :author=>["Nyl."]}}, :status=>"comb. nov."}
359
+ details(sn).should == [{:genus=>{:epitheton=>"Arthopyrenia"}, :species=>{:epitheton=>"hyalospora", :authorship=>"(Nyl.) R.C. Harris", :combinationAuthorTeam=>{:authorTeam=>"R.C. Harris ", :author=>["R.C. Harris"]}, :basionymAuthorTeam=>{:authorTeam=>"Nyl.", :author=>["Nyl."]}}, :status=>"comb. nov."}]
360
360
  pos(sn).should == {0=>["genus", 12], 13=>["species", 23], 25=>["author_word", 29], 31=>["author_word", 35], 36=>["author_word", 42]}
361
361
  end
362
362
 
@@ -366,89 +366,95 @@ describe ScientificNameClean do
366
366
  parse(sn).should_not be_nil
367
367
  value(sn).should == "Arthopyrenia hyalospora (Nyl. ex Banker) R.C. Harris"
368
368
  canonical(sn).should == "Arthopyrenia hyalospora"
369
- details(sn).should == {:genus=>{:epitheton=>"Arthopyrenia"}, :species=>{:epitheton=>"hyalospora", :authorship=>"(Nyl. ex Banker) R.C. Harris", :combinationAuthorTeam=>{:authorTeam=>"R.C. Harris", :author=>["R.C. Harris"]}, :basionymAuthorTeam=>{:authorTeam=>"Nyl.", :author=>["Nyl."], :exAuthorTeam=>{:authorTeam=>"Banker", :author=>["Banker"]}}}}
369
+ details(sn).should == [{:genus=>{:epitheton=>"Arthopyrenia"}, :species=>{:epitheton=>"hyalospora", :authorship=>"(Nyl. ex Banker) R.C. Harris", :combinationAuthorTeam=>{:authorTeam=>"R.C. Harris", :author=>["R.C. Harris"]}, :basionymAuthorTeam=>{:authorTeam=>"Nyl.", :author=>["Nyl."], :exAuthorTeam=>{:authorTeam=>"Banker", :author=>["Banker"]}}}}]
370
370
  pos(sn).should == {0=>["genus", 12], 13=>["species", 23], 25=>["author_word", 29], 33=>["author_word", 39], 41=>["author_word", 45], 46=>["author_word", 52]}
371
371
  sn = "Arthopyrenia hyalospora Nyl. ex Banker"
372
372
  parse(sn).should_not be_nil
373
- details(sn).should == {:genus=>{:epitheton=>"Arthopyrenia"}, :species=>{:epitheton=>"hyalospora", :authorship=>"Nyl. ex Banker", :basionymAuthorTeam=>{:authorTeam=>"Nyl.", :author=>["Nyl."], :exAuthorTeam=>{:authorTeam=>"Banker", :author=>["Banker"]}}}}
373
+ details(sn).should == [{:genus=>{:epitheton=>"Arthopyrenia"}, :species=>{:epitheton=>"hyalospora", :authorship=>"Nyl. ex Banker", :basionymAuthorTeam=>{:authorTeam=>"Nyl.", :author=>["Nyl."], :exAuthorTeam=>{:authorTeam=>"Banker", :author=>["Banker"]}}}}]
374
374
  sn = "Glomopsis lonicerae Peck ex C.J. Gould 1945"
375
375
  parse(sn).should_not be_nil
376
- details(sn).should == {:genus=>{:epitheton=>"Glomopsis"}, :species=>{:epitheton=>"lonicerae", :authorship=>"Peck ex C.J. Gould 1945", :basionymAuthorTeam=>{:authorTeam=>"Peck", :author=>["Peck"], :exAuthorTeam=>{:authorTeam=>"C.J. Gould", :author=>["C.J. Gould"], :year=>"1945"}}}}
376
+ details(sn).should == [{:genus=>{:epitheton=>"Glomopsis"}, :species=>{:epitheton=>"lonicerae", :authorship=>"Peck ex C.J. Gould 1945", :basionymAuthorTeam=>{:authorTeam=>"Peck", :author=>["Peck"], :exAuthorTeam=>{:authorTeam=>"C.J. Gould", :author=>["C.J. Gould"], :year=>"1945"}}}}]
377
377
  pos(sn).should == {0=>["genus", 9], 10=>["species", 19], 20=>["author_word", 24], 28=>["author_word", 32], 33=>["author_word", 38], 39=>["year", 43]}
378
378
  parse("Acanthobasidium delicatum (Wakef.) Oberw. ex Jülich 1979").should_not be_nil
379
379
  sn = "Mycosphaerella eryngii (Fr. ex Duby) Johanson ex Oudem. 1897"
380
380
  parse(sn).should_not be_nil
381
- details(sn).should == {:genus=>{:epitheton=>"Mycosphaerella"}, :species=>{:epitheton=>"eryngii", :authorship=>"(Fr. ex Duby) Johanson ex Oudem. 1897", :combinationAuthorTeam=>{:authorTeam=>"Johanson", :author=>["Johanson"], :exAuthorTeam=>{:authorTeam=>"Oudem.", :author=>["Oudem."], :year=>"1897"}}, :basionymAuthorTeam=>{:authorTeam=>"Fr.", :author=>["Fr."], :exAuthorTeam=>{:authorTeam=>"Duby", :author=>["Duby"]}}}}
381
+ details(sn).should == [{:genus=>{:epitheton=>"Mycosphaerella"}, :species=>{:epitheton=>"eryngii", :authorship=>"(Fr. ex Duby) Johanson ex Oudem. 1897", :combinationAuthorTeam=>{:authorTeam=>"Johanson", :author=>["Johanson"], :exAuthorTeam=>{:authorTeam=>"Oudem.", :author=>["Oudem."], :year=>"1897"}}, :basionymAuthorTeam=>{:authorTeam=>"Fr.", :author=>["Fr."], :exAuthorTeam=>{:authorTeam=>"Duby", :author=>["Duby"]}}}}]
382
382
  pos(sn).should == {0=>["genus", 14], 15=>["species", 22], 24=>["author_word", 27], 31=>["author_word", 35], 37=>["author_word", 45], 49=>["author_word", 55], 56=>["year", 60]}
383
383
  #invalid but happens
384
384
  parse("Mycosphaerella eryngii (Fr. Duby) ex Oudem. 1897").should_not be_nil
385
385
  parse("Mycosphaerella eryngii (Fr.ex Duby) ex Oudem. 1897").should_not be_nil
386
386
  sn = "Salmonella werahensis (Castellani) Hauduroy and Ehringer in Hauduroy 1937"
387
387
  parse(sn).should_not be_nil
388
- details(sn).should == {:genus=>{:epitheton=>"Salmonella"}, :species=>{:epitheton=>"werahensis", :authorship=>"(Castellani) Hauduroy and Ehringer in Hauduroy 1937", :combinationAuthorTeam=>{:authorTeam=>"Hauduroy and Ehringer", :author=>["Hauduroy", "Ehringer"], :exAuthorTeam=>{:authorTeam=>"Hauduroy", :author=>["Hauduroy"], :year=>"1937"}}, :basionymAuthorTeam=>{:authorTeam=>"Castellani", :author=>["Castellani"]}}}
388
+ details(sn).should == [{:genus=>{:epitheton=>"Salmonella"}, :species=>{:epitheton=>"werahensis", :authorship=>"(Castellani) Hauduroy and Ehringer in Hauduroy 1937", :combinationAuthorTeam=>{:authorTeam=>"Hauduroy and Ehringer", :author=>["Hauduroy", "Ehringer"], :exAuthorTeam=>{:authorTeam=>"Hauduroy", :author=>["Hauduroy"], :year=>"1937"}}, :basionymAuthorTeam=>{:authorTeam=>"Castellani", :author=>["Castellani"]}}}]
389
389
  pos(sn).should == {0=>["genus", 10], 11=>["species", 21], 23=>["author_word", 33], 35=>["author_word", 43], 48=>["author_word", 56], 60=>["author_word", 68], 69=>["year", 73]}
390
390
  end
391
391
 
392
392
  it 'should parse named hybrids' do
393
393
  [
394
- ["×Agropogon P. Fourn. 1934", {:namedHybrid=>{:uninomial=>{:epitheton=>"Agropogon", :authorship=>"P. Fourn. 1934", :basionymAuthorTeam=>{:authorTeam=>"P. Fourn.", :author=>["P. Fourn."], :year=>"1934"}}}}],
395
- ["xAgropogon P. Fourn.", {:namedHybrid=>{:uninomial=>{:epitheton=>"Agropogon", :authorship=>"P. Fourn.", :basionymAuthorTeam=>{:authorTeam=>"P. Fourn.", :author=>["P. Fourn."]}}}}],
396
- ["XAgropogon P.Fourn.", {:namedHybrid=>{:uninomial=>{:epitheton=>"Agropogon", :authorship=>"P.Fourn.", :basionymAuthorTeam=>{:authorTeam=>"P.Fourn.", :author=>["P.Fourn."]}}}}],
397
- ["× Agropogon", {:namedHybrid=>{:uninomial=>{:epitheton=>"Agropogon"}}}],
398
- ["x Agropogon", {:namedHybrid=>{:uninomial=>{:epitheton=>"Agropogon"}}}],
399
- ["X Agropogon", {:namedHybrid=>{:uninomial=>{:epitheton=>"Agropogon"}}}],
400
- ["X Cupressocyparis leylandii", {:namedHybrid=>{:genus=>{:epitheton=>"Cupressocyparis"}, :species=>{:epitheton=>"leylandii"}}}],
401
- ["×Heucherella tiarelloides", {:namedHybrid=>{:genus=>{:epitheton=>"Heucherella"}, :species=>{:epitheton=>"tiarelloides"}}}],
402
- ["xHeucherella tiarelloides", {:namedHybrid=>{:genus=>{:epitheton=>"Heucherella"}, :species=>{:epitheton=>"tiarelloides"}}}],
403
- ["x Heucherella tiarelloides", {:namedHybrid=>{:genus=>{:epitheton=>"Heucherella"}, :species=>{:epitheton=>"tiarelloides"}}}],
404
- ["×Agropogon littoralis (Sm.) C. E. Hubb. 1946", {:namedHybrid=>{:genus=>{:epitheton=>"Agropogon"}, :species=>{:epitheton=>"littoralis", :authorship=>"(Sm.) C. E. Hubb. 1946", :combinationAuthorTeam=>{:authorTeam=>"C. E. Hubb.", :author=>["C. E. Hubb."], :year=>"1946"}, :basionymAuthorTeam=>{:authorTeam=>"Sm.", :author=>["Sm."]}}}}]
394
+ ["×Agropogon P. Fourn. 1934", [{:uninomial=>{:epitheton=>"Agropogon", :authorship=>"P. Fourn. 1934", :basionymAuthorTeam=>{:authorTeam=>"P. Fourn.", :author=>["P. Fourn."], :year=>"1934"}}}]],
395
+ ["xAgropogon P. Fourn.", [{:uninomial=>{:epitheton=>"Agropogon", :authorship=>"P. Fourn.", :basionymAuthorTeam=>{:authorTeam=>"P. Fourn.", :author=>["P. Fourn."]}}}]],
396
+ ["XAgropogon P.Fourn.", [{:uninomial=>{:epitheton=>"Agropogon", :authorship=>"P.Fourn.", :basionymAuthorTeam=>{:authorTeam=>"P.Fourn.", :author=>["P.Fourn."]}}}]],
397
+ ["× Agropogon", [{:uninomial=>{:epitheton=>"Agropogon"}}]],
398
+ ["x Agropogon", [{:uninomial=>{:epitheton=>"Agropogon"}}]],
399
+ ["X Agropogon", [{:uninomial=>{:epitheton=>"Agropogon"}}]],
400
+ ["X Cupressocyparis leylandii", [{:genus=>{:epitheton=>"Cupressocyparis"}, :species=>{:epitheton=>"leylandii"}}]],
401
+ ["×Heucherella tiarelloides", [{:genus=>{:epitheton=>"Heucherella"}, :species=>{:epitheton=>"tiarelloides"}}]],
402
+ ["xHeucherella tiarelloides", [{:genus=>{:epitheton=>"Heucherella"}, :species=>{:epitheton=>"tiarelloides"}}]],
403
+ ["x Heucherella tiarelloides", [{:genus=>{:epitheton=>"Heucherella"}, :species=>{:epitheton=>"tiarelloides"}}]],
404
+ ["×Agropogon littoralis (Sm.) C. E. Hubb. 1946", [{:genus=>{:epitheton=>"Agropogon"}, :species=>{:epitheton=>"littoralis", :authorship=>"(Sm.) C. E. Hubb. 1946", :combinationAuthorTeam=>{:authorTeam=>"C. E. Hubb.", :author=>["C. E. Hubb."], :year=>"1946"}, :basionymAuthorTeam=>{:authorTeam=>"Sm.", :author=>["Sm."]}}}]]
405
405
  ].each do |res|
406
406
  parse(res[0]).should_not be_nil
407
+ parse(res[0]).hybrid.should be_true
407
408
  details(res[0]).should == res[1]
408
409
  end
409
410
  [
410
- ['Asplenium X inexpectatum (E.L. Braun 1940) Morton (1956)',{:genus=>{:epitheton=>"Asplenium"}, :species=>{:epitheton=>"inexpectatum", :namedHybrid=>true, :authorship=>"(E.L. Braun 1940) Morton (1956)", :combinationAuthorTeam=>{:authorTeam=>"Morton", :author=>["Morton"], :year=>"1956"}, :basionymAuthorTeam=>{:authorTeam=>"E.L. Braun", :author=>["E.L. Braun"], :year=>"1940"}}}],
411
- ['Mentha ×smithiana R. A. Graham 1949',{:genus=>{:epitheton=>"Mentha"}, :species=>{:epitheton=>"smithiana", :namedHybrid=>true, :authorship=>"R. A. Graham 1949", :basionymAuthorTeam=>{:authorTeam=>"R. A. Graham", :author=>["R. A. Graham"], :year=>"1949"}}}],
412
- ['Salix ×capreola Andersson (1867)',{:genus=>{:epitheton=>"Salix"}, :species=>{:epitheton=>"capreola", :namedHybrid=>true, :authorship=>"Andersson (1867)", :basionymAuthorTeam=>{:authorTeam=>"Andersson", :author=>["Andersson"], :year=>"1867"}}}],
413
- ['Salix x capreola Andersson',{:genus=>{:epitheton=>"Salix"}, :species=>{:epitheton=>"capreola", :namedHybrid=>true, :authorship=>"Andersson", :basionymAuthorTeam=>{:authorTeam=>"Andersson", :author=>["Andersson"]}}}]
411
+ ['Asplenium X inexpectatum (E.L. Braun 1940) Morton (1956)',[{:genus=>{:epitheton=>"Asplenium"}, :species=>{:epitheton=>"inexpectatum", :authorship=>"(E.L. Braun 1940) Morton (1956)", :combinationAuthorTeam=>{:authorTeam=>"Morton", :author=>["Morton"], :year=>"1956"}, :basionymAuthorTeam=>{:authorTeam=>"E.L. Braun", :author=>["E.L. Braun"], :year=>"1940"}}}]],
412
+ ['Mentha ×smithiana R. A. Graham 1949',[{:genus=>{:epitheton=>"Mentha"}, :species=>{:epitheton=>"smithiana", :authorship=>"R. A. Graham 1949", :basionymAuthorTeam=>{:authorTeam=>"R. A. Graham", :author=>["R. A. Graham"], :year=>"1949"}}}]],
413
+ ['Salix ×capreola Andersson (1867)',[{:genus=>{:epitheton=>"Salix"}, :species=>{:epitheton=>"capreola", :authorship=>"Andersson (1867)", :basionymAuthorTeam=>{:authorTeam=>"Andersson", :author=>["Andersson"], :year=>"1867"}}}]],
414
+ ['Salix x capreola Andersson',[{:genus=>{:epitheton=>"Salix"}, :species=>{:epitheton=>"capreola", :authorship=>"Andersson", :basionymAuthorTeam=>{:authorTeam=>"Andersson", :author=>["Andersson"]}}}]]
414
415
  ].each do |res|
415
416
  parse(res[0]).should_not be_nil
417
+ parse(res[0]).hybrid.should be_true
416
418
  details(res[0]).should == res[1]
417
419
  end
418
420
  end
419
421
 
420
422
  it "should parse hybrid combination" do
421
423
  sn = "Arthopyrenia hyalospora X Hydnellum scrobiculatum"
422
- parse(sn).should_not be_nil
424
+ parse(sn).should_not be_nil
425
+ parse(sn).hybrid.should be_true
423
426
  value(sn).should == "Arthopyrenia hyalospora \303\227 Hydnellum scrobiculatum"
424
427
  canonical(sn).should == "Arthopyrenia hyalospora Hydnellum scrobiculatum"
425
- details(sn).should == {:hybridFormula=>[{:genus=>{:epitheton=>"Arthopyrenia"}, :species=>{:epitheton=>"hyalospora"}}, {:genus=>{:epitheton=>"Hydnellum"}, :species=>{:epitheton=>"scrobiculatum"}}]}
428
+ details(sn).should == [{:genus=>{:epitheton=>"Arthopyrenia"}, :species=>{:epitheton=>"hyalospora"}}, {:genus=>{:epitheton=>"Hydnellum"}, :species=>{:epitheton=>"scrobiculatum"}}]
426
429
  pos(sn).should == {0=>["genus", 12], 13=>["species", 23], 26=>["genus", 35], 36=>["species", 49]}
427
430
  sn = "Arthopyrenia hyalospora (Banker) D. Hall X Hydnellum scrobiculatum D.E. Stuntz"
428
431
  parse(sn).should_not be_nil
432
+ parse(sn).hybrid.should be_true
429
433
  value(sn).should == "Arthopyrenia hyalospora (Banker) D. Hall \303\227 Hydnellum scrobiculatum D.E. Stuntz"
430
434
  canonical(sn).should == "Arthopyrenia hyalospora Hydnellum scrobiculatum"
431
435
  pos(sn).should == {0=>["genus", 12], 13=>["species", 23], 25=>["author_word", 31], 33=>["author_word", 35], 36=>["author_word", 40], 43=>["genus", 52], 53=>["species", 66], 67=>["author_word", 71], 72=>["author_word", 78]}
432
436
  value("Arthopyrenia hyalospora X").should == "Arthopyrenia hyalospora \303\227 ?"
433
437
  sn = "Arthopyrenia hyalospora x"
434
438
  parse(sn).should_not be_nil
439
+ parse(sn).hybrid.should be_true
435
440
  canonical(sn).should == "Arthopyrenia hyalospora"
436
- details(sn).should == {:hybridFormula=>[{:genus=>{:epitheton=>"Arthopyrenia"}, :species=>{:epitheton=>"hyalospora"}}, "?"]}
441
+ details(sn).should == [{:genus=>{:epitheton=>"Arthopyrenia"}, :species=>{:epitheton=>"hyalospora"}}, "?"]
437
442
  pos(sn).should == {0=>["genus", 12], 13=>["species", 23]}
438
443
  sn = "Arthopyrenia hyalospora × ?"
439
444
  parse(sn).should_not be_nil
440
- details(sn).should == {:hybridFormula=>[{:genus=>{:epitheton=>"Arthopyrenia"}, :species=>{:epitheton=>"hyalospora"}}, "?"]}
445
+ parse(sn).hybrid.should be_true
446
+ details(sn).should == [{:genus=>{:epitheton=>"Arthopyrenia"}, :species=>{:epitheton=>"hyalospora"}}, "?"]
441
447
  pos(sn).should == {0=>["genus", 12], 13=>["species", 23]}
442
448
  end
443
449
 
444
450
  it 'should parse names with taxon concept' do
445
451
  sn = "Sténométope laevissimus sec. Eschmeyer 2004"
446
452
  val = @parser.failure_reason.to_s.match(/column [0-9]*/).to_s().gsub(/column /,'')
447
- details(sn).should == {:genus=>{:epitheton=>"Sténométope"}, :species=>{:epitheton=>"laevissimus"}, :taxon_concept=>{:authorship=>"Eschmeyer 2004", :basionymAuthorTeam=>{:authorTeam=>"Eschmeyer", :author=>["Eschmeyer"], :year=>"2004"}}}
453
+ details(sn).should == [{:genus=>{:epitheton=>"Sténométope"}, :species=>{:epitheton=>"laevissimus"}, :taxon_concept=>{:authorship=>"Eschmeyer 2004", :basionymAuthorTeam=>{:authorTeam=>"Eschmeyer", :author=>["Eschmeyer"], :year=>"2004"}}}]
448
454
  pos(sn).should == {0=>["genus", 11], 12=>["species", 23], 29=>["author_word", 38], 39=>["year", 43]}
449
455
  sn = "Sténométope laevissimus Bibron 1855 sec. Eschmeyer 2004"
450
456
  parse(sn).should_not be_nil
451
- details(sn).should == {:genus=>{:epitheton=>"Sténométope"}, :species=>{:epitheton=>"laevissimus", :authorship=>"Bibron 1855", :basionymAuthorTeam=>{:authorTeam=>"Bibron", :author=>["Bibron"], :year=>"1855"}}, :taxon_concept=>{:authorship=>"Eschmeyer 2004", :basionymAuthorTeam=>{:authorTeam=>"Eschmeyer", :author=>["Eschmeyer"], :year=>"2004"}}}
457
+ details(sn).should == [{:genus=>{:epitheton=>"Sténométope"}, :species=>{:epitheton=>"laevissimus", :authorship=>"Bibron 1855", :basionymAuthorTeam=>{:authorTeam=>"Bibron", :author=>["Bibron"], :year=>"1855"}}, :taxon_concept=>{:authorship=>"Eschmeyer 2004", :basionymAuthorTeam=>{:authorTeam=>"Eschmeyer", :author=>["Eschmeyer"], :year=>"2004"}}}]
452
458
  pos(sn).should == {0=>["genus", 11], 12=>["species", 23], 24=>["author_word", 30], 31=>["year", 35], 41=>["author_word", 50], 51=>["year", 55]}
453
459
  end
454
460
 
@@ -468,31 +474,31 @@ describe ScientificNameClean do
468
474
 
469
475
  it "should parse new stuff" do
470
476
  sn = 'Nesticus quelpartensis Paik & Namkung, in Paik, Yaginuma & Namkung, 1969'
471
- details(sn).should == {:genus=>{:epitheton=>"Nesticus"}, :species=>{:epitheton=>"quelpartensis", :authorship=>"Paik & Namkung, in Paik, Yaginuma & Namkung, 1969", :basionymAuthorTeam=>{:authorTeam=>"Paik & Namkung", :author=>["Paik", "Namkung"], :exAuthorTeam=>{:authorTeam=>"Paik, Yaginuma & Namkung", :author=>["Paik", "Yaginuma", "Namkung"], :year=>"1969"}}}}
477
+ details(sn).should == [{:genus=>{:epitheton=>"Nesticus"}, :species=>{:epitheton=>"quelpartensis", :authorship=>"Paik & Namkung, in Paik, Yaginuma & Namkung, 1969", :basionymAuthorTeam=>{:authorTeam=>"Paik & Namkung", :author=>["Paik", "Namkung"], :exAuthorTeam=>{:authorTeam=>"Paik, Yaginuma & Namkung", :author=>["Paik", "Yaginuma", "Namkung"], :year=>"1969"}}}}]
472
478
  parse('Dipoena yoshidai Ono, in Ono et al., 1991').should_not be_nil
473
479
  sn = 'Choriozopella trägårdhi Lawrence, 1947'
474
- details(sn).should == {:genus=>{:epitheton=>"Choriozopella"}, :species=>{:epitheton=>"trägårdhi", :authorship=>"Lawrence, 1947", :basionymAuthorTeam=>{:authorTeam=>"Lawrence", :author=>["Lawrence"], :year=>"1947"}}}
480
+ details(sn).should == [{:genus=>{:epitheton=>"Choriozopella"}, :species=>{:epitheton=>"trägårdhi", :authorship=>"Lawrence, 1947", :basionymAuthorTeam=>{:authorTeam=>"Lawrence", :author=>["Lawrence"], :year=>"1947"}}}]
475
481
  sn = 'Latrodectus mactans bishopi Kaston, 1938'
476
- details(sn).should == {:genus=>{:epitheton=>"Latrodectus"}, :species=>{:epitheton=>"mactans"}, :infraspecies=>{:epitheton=>"bishopi", :rank=>"n/a", :authorship=>"Kaston, 1938", :basionymAuthorTeam=>{:authorTeam=>"Kaston", :author=>["Kaston"], :year=>"1938"}}}
482
+ details(sn).should == [{:genus=>{:epitheton=>"Latrodectus"}, :species=>{:epitheton=>"mactans"}, :infraspecies=>[{:epitheton=>"bishopi", :rank=>"n/a", :authorship=>"Kaston, 1938", :basionymAuthorTeam=>{:authorTeam=>"Kaston", :author=>["Kaston"], :year=>"1938"}}]}]
477
483
  sn = 'Diplocephalus aff. procerus Thaler, 1972'
478
- details(sn).should == {:genus=>{:epitheton=>"Diplocephalus"}, :species=>{:epitheton=>"procerus", :authorship=>"Thaler, 1972", :basionymAuthorTeam=>{:authorTeam=>"Thaler", :author=>["Thaler"], :year=>"1972"}}}
484
+ details(sn).should == [{:genus=>{:epitheton=>"Diplocephalus"}, :species=>{:epitheton=>"procerus", :authorship=>"Thaler, 1972", :basionymAuthorTeam=>{:authorTeam=>"Thaler", :author=>["Thaler"], :year=>"1972"}}}]
479
485
  sn = 'Dyarcyops birói Kulczynski, 1908'
480
- details(sn).should == {:genus=>{:epitheton=>"Dyarcyops"}, :species=>{:epitheton=>"birói", :authorship=>"Kulczynski, 1908", :basionymAuthorTeam=>{:authorTeam=>"Kulczynski", :author=>["Kulczynski"], :year=>"1908"}}}
486
+ details(sn).should == [{:genus=>{:epitheton=>"Dyarcyops"}, :species=>{:epitheton=>"birói", :authorship=>"Kulczynski, 1908", :basionymAuthorTeam=>{:authorTeam=>"Kulczynski", :author=>["Kulczynski"], :year=>"1908"}}}]
481
487
  sn = 'Sparassus françoisi Simon, 1898'
482
- details(sn).should == {:genus=>{:epitheton=>"Sparassus"}, :species=>{:epitheton=>"françoisi", :authorship=>"Simon, 1898", :basionymAuthorTeam=>{:authorTeam=>"Simon", :author=>["Simon"], :year=>"1898"}}}
488
+ details(sn).should == [{:genus=>{:epitheton=>"Sparassus"}, :species=>{:epitheton=>"françoisi", :authorship=>"Simon, 1898", :basionymAuthorTeam=>{:authorTeam=>"Simon", :author=>["Simon"], :year=>"1898"}}}]
483
489
  sn = 'Thiobacillus x Parker and Prisk 1953' #have to figure out black lists for this one
484
490
  sn = 'Bacille de Plaut, Kritchevsky and Séguin 1921'
485
- details(sn).should == {:uninomial=>{:epitheton=>"Bacille", :authorship=>"de Plaut, Kritchevsky and Séguin 1921", :basionymAuthorTeam=>{:authorTeam=>"de Plaut, Kritchevsky and Séguin", :author=>["de Plaut", "Kritchevsky", "Séguin"], :year=>"1921"}}}
491
+ details(sn).should == [{:uninomial=>{:epitheton=>"Bacille", :authorship=>"de Plaut, Kritchevsky and Séguin 1921", :basionymAuthorTeam=>{:authorTeam=>"de Plaut, Kritchevsky and Séguin", :author=>["de Plaut", "Kritchevsky", "Séguin"], :year=>"1921"}}}]
486
492
  sn = 'Araneus van bruysseli Petrunkevitch, 1911'
487
- details(sn).should == {:genus=>{:epitheton=>"Araneus"}, :species=>{:epitheton=>"van"}, :infraspecies=>{:epitheton=>"bruysseli", :rank=>"n/a", :authorship=>"Petrunkevitch, 1911", :basionymAuthorTeam=>{:authorTeam=>"Petrunkevitch", :author=>["Petrunkevitch"], :year=>"1911"}}}
493
+ details(sn).should == [{:genus=>{:epitheton=>"Araneus"}, :species=>{:epitheton=>"van"}, :infraspecies=>[{:epitheton=>"bruysseli", :rank=>"n/a", :authorship=>"Petrunkevitch, 1911", :basionymAuthorTeam=>{:authorTeam=>"Petrunkevitch", :author=>["Petrunkevitch"], :year=>"1911"}}]}]
488
494
  sn = 'Sapromyces laidlawi ab Sabin 1941'
489
- details(sn).should == {:genus=>{:epitheton=>"Sapromyces"}, :species=>{:epitheton=>"laidlawi", :authorship=>"ab Sabin 1941", :basionymAuthorTeam=>{:authorTeam=>"ab Sabin", :author=>["ab Sabin"], :year=>"1941"}}}
495
+ details(sn).should == [{:genus=>{:epitheton=>"Sapromyces"}, :species=>{:epitheton=>"laidlawi", :authorship=>"ab Sabin 1941", :basionymAuthorTeam=>{:authorTeam=>"ab Sabin", :author=>["ab Sabin"], :year=>"1941"}}}]
490
496
  sn = 'Nocardia rugosa di Marco and Spalla 1957'
491
- details(sn).should == {:genus=>{:epitheton=>"Nocardia"}, :species=>{:epitheton=>"rugosa", :authorship=>"di Marco and Spalla 1957", :basionymAuthorTeam=>{:authorTeam=>"di Marco and Spalla", :author=>["di Marco", "Spalla"], :year=>"1957"}}}
497
+ details(sn).should == [{:genus=>{:epitheton=>"Nocardia"}, :species=>{:epitheton=>"rugosa", :authorship=>"di Marco and Spalla 1957", :basionymAuthorTeam=>{:authorTeam=>"di Marco and Spalla", :author=>["di Marco", "Spalla"], :year=>"1957"}}}]
492
498
  sn = 'Flexibacter elegans Lewin 1969 non Soriano 1945'
493
- details(sn).should == {:genus=>{:epitheton=>"Flexibacter"}, :species=>{:epitheton=>"elegans", :authorship=>"Lewin 1969 non Soriano 1945", :basionymAuthorTeam=>{:authorTeam=>"Lewin", :author=>["Lewin"], :year=>"1969"}}}
499
+ details(sn).should == [{:genus=>{:epitheton=>"Flexibacter"}, :species=>{:epitheton=>"elegans", :authorship=>"Lewin 1969 non Soriano 1945", :basionymAuthorTeam=>{:authorTeam=>"Lewin", :author=>["Lewin"], :year=>"1969"}}}]
494
500
  sn = 'Flexibacter elegans Soriano 1945, non Lewin 1969'
495
- details(sn).should == {:genus=>{:epitheton=>"Flexibacter"}, :species=>{:epitheton=>"elegans", :authorship=>"Soriano 1945, non Lewin 1969", :basionymAuthorTeam=>{:authorTeam=>"Soriano", :author=>["Soriano"], :year=>"1945"}}}
501
+ details(sn).should == [{:genus=>{:epitheton=>"Flexibacter"}, :species=>{:epitheton=>"elegans", :authorship=>"Soriano 1945, non Lewin 1969", :basionymAuthorTeam=>{:authorTeam=>"Soriano", :author=>["Soriano"], :year=>"1945"}}}]
496
502
  end
497
503
 
498
504
  end