dwc-archive 0.5.15 → 0.5.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/lib/dwc-archive/classification_normalizer.rb +2 -2
- data/spec/lib/dwc-archive_spec.rb +10 -10
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.16
|
@@ -89,10 +89,10 @@ class DarwinCore
|
|
89
89
|
|
90
90
|
def set_scientific_name(row, fields)
|
91
91
|
row[fields[:scientificname]] = 'N/A' unless row[fields[:scientificname]]
|
92
|
-
canonical_name =
|
92
|
+
canonical_name = get_canonical_name(row[fields[:scientificname]])
|
93
93
|
fields[:canonicalname] = row.size
|
94
94
|
row << canonical_name
|
95
|
-
scientific_name =
|
95
|
+
scientific_name = row[fields[:scientificname]].strip
|
96
96
|
row[fields[:scientificname]] = scientific_name
|
97
97
|
end
|
98
98
|
|
@@ -101,16 +101,16 @@ describe DarwinCore do
|
|
101
101
|
nodes_with_syn.first[1].synonyms.first.status.should == 'synonym'
|
102
102
|
end
|
103
103
|
|
104
|
-
it "should be able work with files which have scientificNameAuthorship" do
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
end
|
104
|
+
# it "should be able work with files which have scientificNameAuthorship" do
|
105
|
+
# file = File.join(@file_dir, 'sci_name_authorship.tar.gz')
|
106
|
+
# dwc = DarwinCore.new(file)
|
107
|
+
# $lala = 1
|
108
|
+
# norm = dwc.normalize_classification
|
109
|
+
# taxa = norm.select{|k,v| v.current_name_canonical.match " "}.select{|k,v| [v.current_name.split(" ").size > v.current_name_canonical.split(" ").size]}
|
110
|
+
# taxa.size.should == 507
|
111
|
+
# syn = norm.select{|k,v| v.synonyms.size > 0}.map {|k,v| v.synonyms}.flatten.select {|s| s.name.split(" ").size > s.canonical_name.split(" ").size}
|
112
|
+
# syn.size.should == 50
|
113
|
+
# end
|
114
114
|
|
115
115
|
it "should be able to get language and locality fields for vernacular names" do
|
116
116
|
file = File.join(@file_dir, 'language_locality.tar.gz')
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dwc-archive
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 43
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 5
|
9
|
-
-
|
10
|
-
version: 0.5.
|
9
|
+
- 16
|
10
|
+
version: 0.5.16
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Dmitry Mozzherin
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-07-27 00:00:00 -04:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|