relaton-iana 1.12.0 → 1.12.1

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: c3887c291726cc5dd7e7132b9f1ae021930a49833fcbfc914bf00de30552b4f7
4
+ data.tar.gz: 8507f029ab98cad3f827b0782bc0a9ec9a89feb02ef74f446163033520ed1988
5
5
  SHA512:
6
- metadata.gz: c54cb86040bbdbf4e7f0c33027ea9e4e7df4a9673744226d5ddeb471e9195755880650a3273e4fff86caed390e67e289bf5c820f106407000baaeaffddbc1547
7
- data.tar.gz: ea91c5e4943dd98991c85e30f68209aa05e4cede415abfe3c8f7e5e8e1f9d42b447cd4ffa0e3e76a908872a68c63588adec2673aa0418c8721116d130206d645
6
+ metadata.gz: db1dbb45d53c37a47a6bcfa70fc642453559ed7ae44775b71d0386763f2f91633beadab28eb324bf6c7c08befd25437616e12d8d36577166ef0b4f0901dc261d
7
+ data.tar.gz: 6face6ef71a6fa6828f5ba13aa04e6e4294ac63b2c2fb50c29a1a90d2af1162340165be0c09a09c0e478666029ecfe6e32ec54b3aa18c3657a8ee29d1cabd91d
@@ -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}"
@@ -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,:\/]/, "_").upcase
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.1"
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.1
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-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: equivalent-xml