relaton-ogc 0.7.2 → 0.7.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/relaton_ogc/hit_collection.rb +8 -2
- data/lib/relaton_ogc/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b0588bbb11ac1d847d00506794072698ff2290d74d8808aa7459e098ea9d8d6b
|
4
|
+
data.tar.gz: beef430cb8f52f468882efaf7c978476051848580f844ce30adb9e4479a5bb0a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9296b53dbbd307564ca9c104164c51e03ec08ede9e26c625da4b1343a17db2eb54afac023cfabe203253aecc9e1a6772fb4ff373d920756a4c4501e7eb17fed9
|
7
|
+
data.tar.gz: 713270bf7321e4b03b8a963f3a69a36940ed00d3f3819a30dad93e046e4f8778bcd44e89d42b1cccacace34c64c090ebc2276aa6ab4f5227d9b70b24d28af859
|
@@ -16,7 +16,11 @@ module RelatonOgc
|
|
16
16
|
def initialize(ref, year = nil)
|
17
17
|
super
|
18
18
|
@array = from_json(ref).sort_by do |hit|
|
19
|
-
|
19
|
+
begin
|
20
|
+
hit.hit["date"] ? Date.parse(hit.hit["date"]) : Date.new
|
21
|
+
rescue ArgumentError
|
22
|
+
Date.parse "0000-01-01"
|
23
|
+
end
|
20
24
|
end.reverse
|
21
25
|
end
|
22
26
|
|
@@ -27,7 +31,9 @@ module RelatonOgc
|
|
27
31
|
#
|
28
32
|
# @param docid [String]
|
29
33
|
def from_json(docid, **_opts)
|
30
|
-
ref = docid.sub
|
34
|
+
ref = docid.sub(/^OGC\s/, "").strip
|
35
|
+
return [] if ref.empty?
|
36
|
+
|
31
37
|
data.select do |_k, doc|
|
32
38
|
doc["type"] != "CC" && doc["identifier"].include?(ref)
|
33
39
|
end.map { |_k, h| Hit.new(h, self) }
|
data/lib/relaton_ogc/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton-ogc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-04-
|
11
|
+
date: 2020-04-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: debase
|