relaton-iana 1.12.1 → 1.12.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: c3887c291726cc5dd7e7132b9f1ae021930a49833fcbfc914bf00de30552b4f7
4
- data.tar.gz: 8507f029ab98cad3f827b0782bc0a9ec9a89feb02ef74f446163033520ed1988
3
+ metadata.gz: 000e88f14c8ea63fb6272d0bd2ec08b1c58421d0742c68361207ab046d2a0de4
4
+ data.tar.gz: 4c8d35a3eb5fd824a66e1f21654a9cd6b09d23dd638c883f9bb799fea7b7b580
5
5
  SHA512:
6
- metadata.gz: db1dbb45d53c37a47a6bcfa70fc642453559ed7ae44775b71d0386763f2f91633beadab28eb324bf6c7c08befd25437616e12d8d36577166ef0b4f0901dc261d
7
- data.tar.gz: 6face6ef71a6fa6828f5ba13aa04e6e4294ac63b2c2fb50c29a1a90d2af1162340165be0c09a09c0e478666029ecfe6e32ec54b3aa18c3657a8ee29d1cabd91d
6
+ metadata.gz: b291d8a9ae54560d55f9c68d2310fddbd76c8e0bb547a728379b7217bcbe06b2401d30869987e97f4173668d4b8c4f7da889fc0796ff7b9e46cd37389580ca69
7
+ data.tar.gz: feece0d34118c64f01562e387a5f892a9c8ba85e1ef778a8a14ace9f2d7eaf88405e1f8c61108dfc954e8b231d030f58d1e5c8180536ff987c5ac486f25c9bda
@@ -38,7 +38,7 @@ module RelatonIana
38
38
  #
39
39
  def fetch(page = 1) # rubocop:disable Metrics/AbcSize, Metrics/MethodLength, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
40
40
  params = {
41
- q: "repo:ietf-ribose/iana-registries extension:xml",
41
+ q: "repo:ietf-tools/iana-registries extension:xml",
42
42
  page: page, per_page: 100
43
43
  }
44
44
  if ENV["GITHUB_TOKEN"]
@@ -8,9 +8,11 @@ module RelatonIana
8
8
  # @param text [String]
9
9
  # @return [RelatonBib::BibliographicItem]
10
10
  def search(text) # rubocop:disable Metrics/MethodLength
11
- file = text.sub(/^IANA\s/, "").gsub(/[\s,:\/]/, "_").upcase
11
+ file = text.sub(/^IANA\s/, "").gsub(/[\s,:\/]/, "_").downcase
12
12
  url = "#{SOURCE}#{file}.yaml"
13
13
  resp = Net::HTTP.get_response URI(url)
14
+ return unless resp.code == "200"
15
+
14
16
  hash = YAML.safe_load resp.body
15
17
  RelatonBib::BibliographicItem.from_hash hash
16
18
  rescue SocketError, Timeout::Error, Errno::EINVAL, Errno::ECONNRESET,
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RelatonIana
4
- VERSION = "1.12.1"
4
+ VERSION = "1.12.4"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-iana
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.12.1
4
+ version: 1.12.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: 2022-07-01 00:00:00.000000000 Z
11
+ date: 2022-08-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: equivalent-xml