relaton-gb 1.8.0 → 1.8.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: 32983d0e786c9f73c0e332a40cd6b43c5eb712a2e46bad9a085df562482fe493
4
- data.tar.gz: 2b05de912dc96c46f4095349eb9e48e2fc0ea63b9494ab490cc8a9377b048a6c
3
+ metadata.gz: c00af5fa883925aa53e06bd93c8d98f8fb074ce0c5ac7cc14031e06610d48a4e
4
+ data.tar.gz: d216f984fb2a18aa832c90158e2b97c1ba72df08d0e627c2d46616092ef86c12
5
5
  SHA512:
6
- metadata.gz: 4f4da11264ac8c1f9a390151875fd9bb743c34f4b155ef107ed2871f06b096305cba86fd7383180c6357aab6f7c19dece91c1c376eb92e1c9dfe39d0e42c8f24
7
- data.tar.gz: 7d20394e227dab5e9e6539a8d822a3b251c54cb9dc77b29c39e614ef854961e1af79c7c67afb8170e6928a4c741328f013e2bd0615b9ee22c6425d8fef17db28
6
+ metadata.gz: c5e3a85be4e92b9a1ee5206606dc5c78d4283a48c452417d2a545b4471775558312077fe64ad444f32486213af6f8c93aaebbe92d2f0a944f88fca3af804819b
7
+ data.tar.gz: 8e413f82216e8cd22baa3dca537726cdd4943fc20a9e606ee6a16e57d9517368d502472b1ad1832d8102e3ce6ccb47acb501781abfe01eb04cd4ae24979d06b8
@@ -28,7 +28,7 @@ module RelatonGb
28
28
  Hit.new pid: pid, docref: ref.text, scrapper: self, release_date: rdate
29
29
  end
30
30
  HitCollection.new hits.sort_by(&:release_date).reverse
31
- rescue OpenURI::HTTPError, SocketError, OpenSSL::SSL::SSLError
31
+ rescue OpenURI::HTTPError, SocketError, OpenSSL::SSL::SSLError, Net::OpenTimeout
32
32
  raise RelatonBib::RequestError, "Cannot access http://www.std.gov.cn/bzgk/gb/std_list"
33
33
  end
34
34
 
@@ -38,7 +38,7 @@ module RelatonGb
38
38
  src = "http://openstd.samr.gov.cn/bzgk/gb/newGbInfo?hcno=" + hit.pid
39
39
  doc = Nokogiri::HTML OpenURI.open_uri(src)
40
40
  GbBibliographicItem.new **scrapped_data(doc, src, hit)
41
- rescue OpenURI::HTTPError, SocketError, OpenSSL::SSL::SSLError
41
+ rescue OpenURI::HTTPError, SocketError, OpenSSL::SSL::SSLError, Net::OpenTimeout
42
42
  raise RelatonBib::RequestError, "Cannot access #{src}"
43
43
  end
44
44
 
@@ -32,7 +32,7 @@ module RelatonGb
32
32
  HitCollection.new hits
33
33
  rescue SocketError, Timeout::Error, Errno::EINVAL, Errno::ECONNRESET, EOFError,
34
34
  Net::HTTPBadResponse, Net::HTTPHeaderSyntaxError, Net::ProtocolError,
35
- OpenSSL::SSL::SSLError, Errno::ETIMEDOUT
35
+ OpenSSL::SSL::SSLError, Errno::ETIMEDOUT, Net::OpenTimeout
36
36
  raise RelatonBib::RequestError, "Cannot access #{uri}"
37
37
  end
38
38
 
@@ -45,7 +45,7 @@ module RelatonGb
45
45
  GbBibliographicItem.new **scrapped_data(doc, src, hit)
46
46
  rescue SocketError, Timeout::Error, Errno::EINVAL, Errno::ECONNRESET, EOFError,
47
47
  Net::HTTPBadResponse, Net::HTTPHeaderSyntaxError, Net::ProtocolError,
48
- OpenSSL::SSL::SSLError, Errno::ETIMEDOUT
48
+ OpenSSL::SSL::SSLError, Errno::ETIMEDOUT, Net::OpenTimeout
49
49
  raise RelatonBib::RequestError, "Cannot access #{src}"
50
50
  end
51
51
 
@@ -33,7 +33,7 @@ module RelatonGb
33
33
  Hit.new pid: pid, docref: docref, status: status, scrapper: self
34
34
  end
35
35
  HitCollection.new hits
36
- rescue OpenURI::HTTPError, SocketError, OpenSSL::SSL::SSLError
36
+ rescue OpenURI::HTTPError, SocketError, OpenSSL::SSL::SSLError, Net::OpenTimeout
37
37
  raise RelatonBib::RequestError, "Cannot access http://www.ttbz.org.cn/Home/Standard"
38
38
  end
39
39
  # rubocop:enable Metrics/MethodLength, Metrics/AbcSize
@@ -44,7 +44,7 @@ module RelatonGb
44
44
  src = "http://www.ttbz.org.cn#{hit.pid}"
45
45
  doc = Nokogiri::HTML OpenURI.open_uri(src), nil, Encoding::UTF_8.to_s
46
46
  GbBibliographicItem.new **scrapped_data(doc, src, hit)
47
- rescue OpenURI::HTTPError, SocketError, OpenSSL::SSL::SSLError
47
+ rescue OpenURI::HTTPError, SocketError, OpenSSL::SSL::SSLError, Net::OpenTimeout
48
48
  raise RelatonBib::RequestError, "Cannot access #{src}"
49
49
  end
50
50
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RelatonGb
4
- VERSION = "1.8.0"
4
+ VERSION = "1.8.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-gb
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.0
4
+ version: 1.8.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: 2021-05-17 00:00:00.000000000 Z
11
+ date: 2021-06-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: equivalent-xml