relaton-itu 0.2.0 → 0.2.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
- SHA256:
3
- metadata.gz: cb8e6a79f5332e451c0aa9d243a702c3b06d1699b2230b17ae15ee89e03670e9
4
- data.tar.gz: 97fedc98d4f4737545529acc6ef6d42bfa6491f783d69a1ac5c7a068e37c701e
2
+ SHA1:
3
+ metadata.gz: c3a28ee1d4e888cee0a517af8cd8789b158af039
4
+ data.tar.gz: 258f1376b52da45332a7884ac483fdc141e0053c
5
5
  SHA512:
6
- metadata.gz: a139715a49f88d302d7625134864bf916186f7a61aa4cf9498a614e3a917cc3b168dacb948c6d08c4ad297498d03587d6286b6e9dc5fab65745821c434ae882a
7
- data.tar.gz: a645b6d4286de51c636eeeab9508f76e075e0c8082b026bdd923470d02181977f0053bfe8d954b2c645bfd9e60b16848c21b1b7727074a6cb9a1de66611f465b
6
+ metadata.gz: 70361e0a954f2f5d075a7d3349cae152268a84dee0b17840bf47a2a3693ca897cc56e73406c7d3ab27139961f9f698653ad8dc33d52e27f682be5c2deebb1606
7
+ data.tar.gz: ca3e769b43e48db0b04ac2aeb74ff1091d6cc590baa61aa7603f10793484bc97917b6944786064bb45ce0a82825cf199cc66179e660b8850d253e83ebd829447
data/Gemfile CHANGED
@@ -1,3 +1,6 @@
1
+ Encoding.default_external = Encoding::UTF_8
2
+ Encoding.default_internal = Encoding::UTF_8
3
+
1
4
  source "https://rubygems.org"
2
5
  # Specify your gem's dependencies in relaton_itu.gemspec
3
6
  gemspec
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- relaton-itu (0.2.0)
4
+ relaton-itu (0.2.1)
5
5
  relaton-iso-bib (~> 0.2.0)
6
6
 
7
7
  GEM
@@ -15,9 +15,9 @@ GEM
15
15
  safe_yaml (~> 1.0.0)
16
16
  debase (0.2.2)
17
17
  debase-ruby_core_source (>= 0.10.2)
18
- debase-ruby_core_source (0.10.4)
18
+ debase-ruby_core_source (0.10.5)
19
19
  diff-lcs (1.3)
20
- docile (1.3.1)
20
+ docile (1.3.2)
21
21
  equivalent-xml (0.6.0)
22
22
  nokogiri (>= 1.4.3)
23
23
  hashdiff (0.4.0)
@@ -33,12 +33,12 @@ GEM
33
33
  pry-byebug (3.7.0)
34
34
  byebug (~> 11.0)
35
35
  pry (~> 0.10)
36
- public_suffix (3.1.0)
36
+ public_suffix (3.1.1)
37
37
  rake (10.5.0)
38
- relaton-bib (0.2.0)
38
+ relaton-bib (0.2.3)
39
39
  addressable
40
40
  nokogiri (~> 1.8.4)
41
- relaton-iso-bib (0.2.0)
41
+ relaton-iso-bib (0.2.3)
42
42
  isoics (~> 0.1.6)
43
43
  nokogiri (~> 1.8.4)
44
44
  relaton-bib (~> 0.2.0)
@@ -47,16 +47,16 @@ GEM
47
47
  rspec-core (~> 3.8.0)
48
48
  rspec-expectations (~> 3.8.0)
49
49
  rspec-mocks (~> 3.8.0)
50
- rspec-core (3.8.0)
50
+ rspec-core (3.8.1)
51
51
  rspec-support (~> 3.8.0)
52
- rspec-expectations (3.8.3)
52
+ rspec-expectations (3.8.4)
53
53
  diff-lcs (>= 1.2.0, < 2.0)
54
54
  rspec-support (~> 3.8.0)
55
- rspec-mocks (3.8.0)
55
+ rspec-mocks (3.8.1)
56
56
  diff-lcs (>= 1.2.0, < 2.0)
57
57
  rspec-support (~> 3.8.0)
58
- rspec-support (3.8.0)
59
- ruby-debug-ide (0.6.1)
58
+ rspec-support (3.8.2)
59
+ ruby-debug-ide (0.7.0)
60
60
  rake (>= 0.8.1)
61
61
  ruby_deep_clone (0.8.0)
62
62
  safe_yaml (1.0.5)
@@ -66,10 +66,10 @@ GEM
66
66
  simplecov-html (~> 0.10.0)
67
67
  simplecov-html (0.10.2)
68
68
  vcr (5.0.0)
69
- webmock (3.5.1)
69
+ webmock (3.6.0)
70
70
  addressable (>= 2.3.6)
71
71
  crack (>= 0.3.2)
72
- hashdiff
72
+ hashdiff (>= 0.4.0, < 2.0.0)
73
73
 
74
74
  PLATFORMS
75
75
  ruby
@@ -18,9 +18,9 @@ module RelatonItu
18
18
  # @return [RelatonItu::HitCollection]
19
19
  def search(text, year = nil)
20
20
  HitCollection.new text, year
21
- rescue
22
- warn "Could not access http://www.itu.int"
23
- []
21
+ rescue SocketError, Timeout::Error, Errno::EINVAL, Errno::ECONNRESET, EOFError,
22
+ Net::HTTPBadResponse, Net::HTTPHeaderSyntaxError, Net::ProtocolError
23
+ raise RelatonBib::RequestError, "Could not access http://www.itu.int"
24
24
  end
25
25
 
26
26
  # @param code [String] the ISO standard Code to look up (e..g "ISO 9000")
@@ -119,6 +119,9 @@ module RelatonItu
119
119
  resp = Net::HTTP.get_response(uri) # .encode("UTF-8")
120
120
  end
121
121
  Nokogiri::HTML(resp.body)
122
+ rescue SocketError, Timeout::Error, Errno::EINVAL, Errno::ECONNRESET, EOFError,
123
+ Net::HTTPBadResponse, Net::HTTPHeaderSyntaxError, Net::ProtocolError
124
+ raise RelatonBib::RequestError, "Could not access #{url}"
122
125
  end
123
126
  # rubocop:enable Metrics/AbcSize, Metrics/MethodLength
124
127
 
@@ -1,3 +1,3 @@
1
1
  module RelatonItu
2
- VERSION = "0.2.0".freeze
2
+ VERSION = "0.2.1".freeze
3
3
  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: 0.2.0
4
+ version: 0.2.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: 2019-06-15 00:00:00.000000000 Z
11
+ date: 2019-06-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -216,7 +216,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
216
216
  version: '0'
217
217
  requirements: []
218
218
  rubyforge_project:
219
- rubygems_version: 2.7.6
219
+ rubygems_version: 2.6.12
220
220
  signing_key:
221
221
  specification_version: 4
222
222
  summary: 'RelatonItu: retrieve ITU Standards for bibliographic use using the BibliographicItem