relaton-itu 1.8.1 → 1.8.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +1 -1
- data/.rubocop.yml +1 -1
- data/lib/relaton_itu/hit_collection.rb +5 -5
- data/lib/relaton_itu/version.rb +1 -1
- data/relaton-itu.gemspec +2 -2
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b5d5c3d1072abc13993b3e87a6fab21f15237273e8b369428adb6ba5694716d1
|
4
|
+
data.tar.gz: cc70ec5cd4b1d3f0c959befcda4932edeadafd07fd1cd08d699a6c27979074f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 635bac7f29a77bc1f4085ea43950cc6687bd5ae04c36d52a9e6a5009375878ddda0ae23a5cc2474377f7ca2b636784c58c7004306429cb942e336789299250f5
|
7
|
+
data.tar.gz: c172be34c767d2c2e883b80bc949b0d84f688cfa90b63d6fe751198075c3eb3892f1c4b19277f814dcb1854cf7adf248277bc0ece5ba8d41fa0604609c5d5733
|
data/.github/workflows/rake.yml
CHANGED
data/.rubocop.yml
CHANGED
@@ -18,7 +18,7 @@ module RelatonItu
|
|
18
18
|
# @param ref [String]
|
19
19
|
# @param year [String]
|
20
20
|
def initialize(ref, year = nil) # rubocop:todo Metrics/MethodLength
|
21
|
-
text = ref.sub
|
21
|
+
text = ref.sub(/(?<=\.)Imp\s?(?=\d)/, "")
|
22
22
|
super text, year
|
23
23
|
@agent = Mechanize.new
|
24
24
|
agent.user_agent_alias = "Mac Safari"
|
@@ -27,8 +27,8 @@ module RelatonItu
|
|
27
27
|
case ref
|
28
28
|
when /^(ITU-T|ITU-R\sRR)/
|
29
29
|
request_search
|
30
|
-
when /^ITU-R\s
|
31
|
-
request_document(
|
30
|
+
when /^ITU-R\s/
|
31
|
+
request_document(ref)
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
@@ -45,7 +45,7 @@ module RelatonItu
|
|
45
45
|
def request_document(ref) # rubocop:todo Metrics/MethodLength
|
46
46
|
uri = URI::HTTPS.build(
|
47
47
|
host: "raw.githubusercontent.com",
|
48
|
-
path: "/relaton/relaton-data-itu-r/master/data/#{ref}.yaml"
|
48
|
+
path: "/relaton/relaton-data-itu-r/master/data/#{ref.gsub(/[\s.]/, '_')}.yaml",
|
49
49
|
)
|
50
50
|
resp = Net::HTTP.get_response(uri)
|
51
51
|
if resp.code == "404"
|
@@ -55,7 +55,7 @@ module RelatonItu
|
|
55
55
|
|
56
56
|
hash = YAML.safe_load resp.body
|
57
57
|
item_hash = HashConverter.hash_to_bib(hash)
|
58
|
-
item = ItuBibliographicItem.new
|
58
|
+
item = ItuBibliographicItem.new(**item_hash)
|
59
59
|
hit = Hit.new({ url: uri.to_s }, self)
|
60
60
|
hit.fetch = item
|
61
61
|
@array = [hit]
|
data/lib/relaton_itu/version.rb
CHANGED
data/relaton-itu.gemspec
CHANGED
@@ -24,7 +24,7 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.bindir = "exe"
|
25
25
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
26
26
|
spec.require_paths = ["lib"]
|
27
|
-
spec.required_ruby_version = Gem::Requirement.new(">= 2.
|
27
|
+
spec.required_ruby_version = Gem::Requirement.new(">= 2.5.0")
|
28
28
|
|
29
29
|
# spec.add_development_dependency "debase"
|
30
30
|
spec.add_development_dependency "equivalent-xml", "~> 0.6"
|
@@ -37,6 +37,6 @@ Gem::Specification.new do |spec|
|
|
37
37
|
spec.add_development_dependency "vcr", "~> 5.0.0"
|
38
38
|
spec.add_development_dependency "webmock"
|
39
39
|
|
40
|
-
spec.add_dependency "mechanize", "~> 2.
|
40
|
+
spec.add_dependency "mechanize", "~> 2.8.0"
|
41
41
|
spec.add_dependency "relaton-bib", "~> 1.8.0"
|
42
42
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton-itu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.8.
|
4
|
+
version: 1.8.2
|
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
|
+
date: 2021-07-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: equivalent-xml
|
@@ -128,14 +128,14 @@ dependencies:
|
|
128
128
|
requirements:
|
129
129
|
- - "~>"
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: 2.
|
131
|
+
version: 2.8.0
|
132
132
|
type: :runtime
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: 2.
|
138
|
+
version: 2.8.0
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
140
|
name: relaton-bib
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
@@ -200,7 +200,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
200
200
|
requirements:
|
201
201
|
- - ">="
|
202
202
|
- !ruby/object:Gem::Version
|
203
|
-
version: 2.
|
203
|
+
version: 2.5.0
|
204
204
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
205
205
|
requirements:
|
206
206
|
- - ">="
|