gn_crossmap 3.1.2 → 3.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/gn_crossmap/collector.rb +1 -1
- data/lib/gn_crossmap/result_processor.rb +12 -5
- data/lib/gn_crossmap/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd937cc49a912ee4e7eefd2706b8050cdb34bd03
|
4
|
+
data.tar.gz: 764ad83d40ef1e9242a937d79548383483773398
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ffb3cc23b36f9fe2310091b0f435f0c7f8245d7c5a9b2a26159800c3c3dbe0cd7f7871d0853ed4ae0ca378efdde4cba9891008ebfe4174b6717767fe40595cf3
|
7
|
+
data.tar.gz: 609754d18b3079bea30cdadbec424f54dd40f50e759dd8dc1cf3e11266feee7dae74d6b9512edb57d0e8979223a9b5fbf59f67807db7564596632b6533943a17
|
data/CHANGELOG.md
CHANGED
@@ -30,13 +30,19 @@ module GnCrossmap
|
|
30
30
|
def write_empty_result(datum)
|
31
31
|
@stats.stats[:matches][0] += 1
|
32
32
|
@stats.stats[:resolved_records] += 1
|
33
|
-
res =
|
34
|
-
res += [GnCrossmap::MATCH_TYPES[0], datum[:supplied_name_string], nil,
|
35
|
-
datum[:supplied_canonical_form], nil,
|
36
|
-
@input[datum[:supplied_id]][:rank], nil, nil, nil, nil]
|
33
|
+
res = compile_empty_result(datum)
|
37
34
|
@writer.write(res)
|
38
35
|
end
|
39
36
|
|
37
|
+
def compile_empty_result(datum)
|
38
|
+
res = @original_data[datum[:supplied_id]]
|
39
|
+
res += [GnCrossmap::MATCH_TYPES[0], datum[:supplied_name_string],
|
40
|
+
nil, nil, nil, nil,
|
41
|
+
@input[datum[:supplied_id]][:rank], nil, nil, nil, nil, nil]
|
42
|
+
res << nil if @with_classification
|
43
|
+
res
|
44
|
+
end
|
45
|
+
|
40
46
|
def write_result(datum)
|
41
47
|
collect_stats(datum)
|
42
48
|
datum[:results].each do |result|
|
@@ -72,7 +78,8 @@ module GnCrossmap
|
|
72
78
|
|
73
79
|
def canonical(name_string)
|
74
80
|
parsed = @parser.parse(name_string)[:scientificName]
|
75
|
-
parsed[:canonical].nil? || parsed[:hybrid]
|
81
|
+
return nil if parsed[:canonical].nil? || parsed[:hybrid]
|
82
|
+
parsed[:canonical]
|
76
83
|
rescue StandardError
|
77
84
|
@parser = ScientificNameParser.new
|
78
85
|
nil
|
data/lib/gn_crossmap/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gn_crossmap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dmitry Mozzherin
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-08-
|
11
|
+
date: 2017-08-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: biodiversity
|