relaton-iana 1.12.0 → 1.12.3

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: 6c0bcd54c41a0fbff9fd5c3899e183d0e7fad802d836ecdd6de47ffda535980e
4
- data.tar.gz: 486a2e025bd5c55316cc501c4ba8b2d94803f89dcf793112f8a8ac5059cdb9f5
3
+ metadata.gz: 2f83f06a1729e6bdd28bd55a53e38c3569af02f21688df68237a2c8e57f8ea40
4
+ data.tar.gz: 461d3ec1a68a95a78e91448f9975d6973deeb0260e1a1590d1299ab04f1d3d01
5
5
  SHA512:
6
- metadata.gz: c54cb86040bbdbf4e7f0c33027ea9e4e7df4a9673744226d5ddeb471e9195755880650a3273e4fff86caed390e67e289bf5c820f106407000baaeaffddbc1547
7
- data.tar.gz: ea91c5e4943dd98991c85e30f68209aa05e4cede415abfe3c8f7e5e8e1f9d42b447cd4ffa0e3e76a908872a68c63588adec2673aa0418c8721116d130206d645
6
+ metadata.gz: 5fe87f10e54798f20bb6a51a28911df61170b1593a4b3b915c964586cc74345bffae6c3710762e5c1b8158be520de5b82dcb5ec5b6627f9cd260c54aba00cf9c
7
+ data.tar.gz: '08857ab11716d87e77c96909370861a03bf6139aebdc88fa77f8ec4712e62b5a241d87fd53ada0265a692e4d76c67f75947ef950a84c03e7eddfe4bc177e973c'
@@ -24,7 +24,7 @@ module RelatonIana
24
24
  def self.fetch(output: "data", format: "yaml")
25
25
  t1 = Time.now
26
26
  puts "Started at: #{t1}"
27
- FileUtils.mkdir_p output unless Dir.exist? output
27
+ FileUtils.mkdir_p output
28
28
  new(output, format).fetch
29
29
  t2 = Time.now
30
30
  puts "Stopped at: #{t2}"
@@ -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"]
@@ -115,7 +115,7 @@ module RelatonIana
115
115
  # @return [String] file name
116
116
  #
117
117
  def file_name(bib)
118
- name = bib.docnumber.gsub(/[\s,:\/]/, "_").squeeze("_")
118
+ name = bib.docnumber.downcase.gsub(/[\s,:\/]/, "_").squeeze("_")
119
119
  File.join @output, "#{name}.#{@ext}"
120
120
  end
121
121
  end
@@ -8,7 +8,7 @@ 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,:\/]/, "_")
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
14
  hash = YAML.safe_load resp.body
@@ -37,7 +37,7 @@ module RelatonIana
37
37
  title: parse_title,
38
38
  link: parse_link,
39
39
  docid: parse_docid,
40
- docnumber: anchor,
40
+ docnumber: docnumber,
41
41
  date: parse_date,
42
42
  contributor: contributor,
43
43
  )
@@ -73,9 +73,7 @@ module RelatonIana
73
73
  # @return [Arra<RelatonBib::DocumentIdentifier>] docidentifier
74
74
  #
75
75
  def parse_docid
76
- [
77
- RelatonBib::DocumentIdentifier.new(type: "IANA", id: pub_id, primary: true),
78
- ]
76
+ [RelatonBib::DocumentIdentifier.new(type: "IANA", id: pub_id, primary: true)]
79
77
  end
80
78
 
81
79
  #
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RelatonIana
4
- VERSION = "1.12.0"
4
+ VERSION = "1.12.3"
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.0
4
+ version: 1.12.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: 2022-06-25 00:00:00.000000000 Z
11
+ date: 2022-07-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: equivalent-xml