relaton-w3c 1.9.3 → 1.9.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/relaton_w3c/version.rb +1 -1
- data/lib/relaton_w3c/w3c_bibliography.rb +6 -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: c8892da64cad98a7f8a24fd16101660aa96c12ef980d0d83b96b4965b3b6a052
|
4
|
+
data.tar.gz: a92f5c36650a0e5b7bb3debe0c49139d28aeb67b23c22032755bf4f3d1d92a7b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9e602df91cd13d130f803c8152c2c1c307f8727ae94c1511710f2f7e9b0b9cb34b96a88f1fcc7b7f3a72c768f290d7437f0a7d6b43d99cafc69bd1777828d7f0
|
7
|
+
data.tar.gz: 11e1da12c19f1c54e90e1e2ff4fc0a4b4863babb69fdb63fc7bfb360d91abc4dd1c34558c357c4b0ef406232d6a0ad4411974dfcb11b74bfbc909bcf1390b35d
|
data/lib/relaton_w3c/version.rb
CHANGED
@@ -15,6 +15,8 @@ module RelatonW3c
|
|
15
15
|
file = text.sub(/^W3C\s/, "").gsub(/[\s,:\/]/, "_").squeeze("_").upcase
|
16
16
|
url = "#{SOURCE}#{file}.yaml"
|
17
17
|
resp = Net::HTTP.get_response(URI.parse(url))
|
18
|
+
return unless resp.code == "200"
|
19
|
+
|
18
20
|
hash = YAML.safe_load resp.body
|
19
21
|
item_hash = ::RelatonW3c::HashConverter.hash_to_bib(hash)
|
20
22
|
::RelatonW3c::W3cBibliographicItem.new(**item_hash)
|
@@ -32,7 +34,10 @@ module RelatonW3c
|
|
32
34
|
def get(ref, _year = nil, _opts = {})
|
33
35
|
warn "[relaton-w3c] (\"#{ref}\") fetching..."
|
34
36
|
result = search(ref)
|
35
|
-
|
37
|
+
unless result
|
38
|
+
warn "[relaton-w3c] (\"#{ref}\") not found."
|
39
|
+
return
|
40
|
+
end
|
36
41
|
|
37
42
|
# ret = result.first.fetch
|
38
43
|
warn "[relaton-w3c] (\"#{ref}\") found #{result.title.first.title.content}"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton-w3c
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.9.
|
4
|
+
version: 1.9.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-11-
|
11
|
+
date: 2021-11-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: equivalent-xml
|