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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9478b4b00067cca1be679eea473b4db2b45f81129883cdacd0544ccfd3e7b680
4
- data.tar.gz: a78f0bc199032f6762f659a534c605114f32de019b49332a2e9ecaf21f37fd7d
3
+ metadata.gz: b5d5c3d1072abc13993b3e87a6fab21f15237273e8b369428adb6ba5694716d1
4
+ data.tar.gz: cc70ec5cd4b1d3f0c959befcda4932edeadafd07fd1cd08d699a6c27979074f1
5
5
  SHA512:
6
- metadata.gz: 59581e2701ce5a5286165acbb2c263613bb3e88754bbab724204cb4e8c67c454bac6bda235bd1dc99582401d77366ac408d38e30f1af996f8877a67efbcf2ee8
7
- data.tar.gz: 2771e587afe8badfda9da63199ef434760a76f76ad4088036a1e89237d6564547279321226efb79f69dc89a3576cb50055b3652db1dcde08eb7b89852d26ed8e
6
+ metadata.gz: 635bac7f29a77bc1f4085ea43950cc6687bd5ae04c36d52a9e6a5009375878ddda0ae23a5cc2474377f7ca2b636784c58c7004306429cb942e336789299250f5
7
+ data.tar.gz: c172be34c767d2c2e883b80bc949b0d84f688cfa90b63d6fe751198075c3eb3892f1c4b19277f814dcb1854cf7adf248277bc0ece5ba8d41fa0604609c5d5733
@@ -16,7 +16,7 @@ jobs:
16
16
  strategy:
17
17
  fail-fast: false
18
18
  matrix:
19
- ruby: [ '2.7', '2.6', '2.5', '2.4' ]
19
+ ruby: [ '2.7', '2.6', '2.5' ]
20
20
  os: [ ubuntu-latest, windows-latest, macos-latest ]
21
21
  experimental: [ false ]
22
22
  include:
data/.rubocop.yml CHANGED
@@ -5,6 +5,6 @@
5
5
  inherit_from:
6
6
  - https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml
7
7
  AllCops:
8
- TargetRubyVersion: 2.4
8
+ TargetRubyVersion: 2.5
9
9
  Rails:
10
10
  Enabled: false
@@ -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 /(?<=\.)Imp\s?(?=\d)/, ""
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([-_.\w]+)$/
31
- request_document($1.upcase)
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 **item_hash
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]
@@ -1,3 +1,3 @@
1
1
  module RelatonItu
2
- VERSION = "1.8.1".freeze
2
+ VERSION = "1.8.2".freeze
3
3
  end
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.4.0")
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.7.0"
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.1
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-05-31 00:00:00.000000000 Z
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.7.0
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.7.0
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.4.0
203
+ version: 2.5.0
204
204
  required_rubygems_version: !ruby/object:Gem::Requirement
205
205
  requirements:
206
206
  - - ">="