dwc-archive 0.8.1 → 0.8.2
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/CHANGELOG +2 -0
- data/VERSION +1 -1
- data/lib/dwc-archive/classification_normalizer.rb +0 -7
- data/spec/lib/dwc-archive_spec.rb +1 -1
- metadata +1 -1
data/CHANGELOG
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
0.8.2 Removed species info from linnean classification path
|
2
|
+
|
1
3
|
0.8.1 Linnean classification path is now only for species and infraspecies with canonical forms. It ends with a canonical form of the taxon
|
2
4
|
|
3
5
|
0.8.0 Added linnean classification path to normalized data from DwCA. It consists of data associated with clades like 'kingdom', 'order' etc.
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.8.
|
1
|
+
0.8.2
|
@@ -320,13 +320,6 @@ class DarwinCore
|
|
320
320
|
[:kingdom, :phylum, :class, :order, :family, :genus, :subgenus].each do |clade|
|
321
321
|
res << [row[@core_fields[clade]], clade] if @core_fields[clade]
|
322
322
|
end
|
323
|
-
if !res.empty?
|
324
|
-
if taxon.current_name_canonical && taxon.current_name_canonical.split(" ").size > 1 && taxon.current_name != res[-1][0]
|
325
|
-
res << [taxon.current_name_canonical, taxon.rank]
|
326
|
-
else
|
327
|
-
res = []
|
328
|
-
end
|
329
|
-
end
|
330
323
|
res
|
331
324
|
end
|
332
325
|
|
@@ -157,7 +157,7 @@ describe DarwinCore do
|
|
157
157
|
dwc = DarwinCore.new(file)
|
158
158
|
cn = DarwinCore::ClassificationNormalizer.new(dwc)
|
159
159
|
norm = cn.normalize
|
160
|
-
cn.normalized_data.first.last.linnean_classification_path.should == [["Animalia", :kingdom], ["Arthropoda", :phylum], ["Insecta", :class], ["Diptera", :order], ["Cecidomyiidae", :family], ["Resseliella", :genus]
|
160
|
+
cn.normalized_data.first.last.linnean_classification_path.should == [["Animalia", :kingdom], ["Arthropoda", :phylum], ["Insecta", :class], ["Diptera", :order], ["Cecidomyiidae", :family], ["Resseliella", :genus]]
|
161
161
|
end
|
162
162
|
|
163
163
|
it "should keep linnean classification empty if terms are not there" do
|