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 +4 -4
- data/lib/relaton_iana/data_fetcher.rb +2 -2
- data/lib/relaton_iana/iana_bibliography.rb +1 -1
- data/lib/relaton_iana/parser.rb +2 -4
- data/lib/relaton_iana/version.rb +1 -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: c3887c291726cc5dd7e7132b9f1ae021930a49833fcbfc914bf00de30552b4f7
|
4
|
+
data.tar.gz: 8507f029ab98cad3f827b0782bc0a9ec9a89feb02ef74f446163033520ed1988
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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
|
data/lib/relaton_iana/parser.rb
CHANGED
@@ -37,7 +37,7 @@ module RelatonIana
|
|
37
37
|
title: parse_title,
|
38
38
|
link: parse_link,
|
39
39
|
docid: parse_docid,
|
40
|
-
docnumber:
|
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
|
#
|
data/lib/relaton_iana/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2022-07-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: equivalent-xml
|