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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d5e153b3ec55b3b7580684e3be7e740203fd6ab222c7bfc897829b175ba74855
4
- data.tar.gz: 48d1c1dfb62b838d264bed6b3922eda7c5d74b76b34a3c16a0cf89cd843bd26c
3
+ metadata.gz: c8892da64cad98a7f8a24fd16101660aa96c12ef980d0d83b96b4965b3b6a052
4
+ data.tar.gz: a92f5c36650a0e5b7bb3debe0c49139d28aeb67b23c22032755bf4f3d1d92a7b
5
5
  SHA512:
6
- metadata.gz: b800789cabc1e5a73c3aa11b1ce73bb4ebd6bffd2c973f548d01b94568e2e679785a3daa17d80bedbc524795a79b068d88de5d31771dbd7b33450fae6b6052af
7
- data.tar.gz: 35051594acea5120536e46e0e621539db7ba0c496f917669deac68d189e2dcdd9a79a63cf46d59b493921b7b8d923f09b4ecf089e86fee8229cdeb8ffdbe29a5
6
+ metadata.gz: 9e602df91cd13d130f803c8152c2c1c307f8727ae94c1511710f2f7e9b0b9cb34b96a88f1fcc7b7f3a72c768f290d7437f0a7d6b43d99cafc69bd1777828d7f0
7
+ data.tar.gz: 11e1da12c19f1c54e90e1e2ff4fc0a4b4863babb69fdb63fc7bfb360d91abc4dd1c34558c357c4b0ef406232d6a0ad4411974dfcb11b74bfbc909bcf1390b35d
@@ -1,3 +1,3 @@
1
1
  module RelatonW3c
2
- VERSION = "1.9.3".freeze
2
+ VERSION = "1.9.4".freeze
3
3
  end
@@ -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
- return unless result # .any?
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.3
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-20 00:00:00.000000000 Z
11
+ date: 2021-11-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: equivalent-xml