relaton-w3c 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 212b17cee10f6caf08f472843b59974cdbd3b83361fefb10e212d5413751a670
4
- data.tar.gz: f25d9d9c61d0671ae8050153fa5d266cf47d533e26eb8db54d56d19829026f6a
3
+ metadata.gz: 215e2c9d5f297c9aa8314eac2ed1c9fde29f9921e25ffb55024c826f02119e1d
4
+ data.tar.gz: df2f2918cf0e2b6f92139cd270e8e6c4b967b9545fe1373a6ae44f3e4eb00596
5
5
  SHA512:
6
- metadata.gz: 8db2ab1fc2d5fabb40dcc548d1b4b97177eb8b304ee3f2104077e00682b93f89e16dc997a40f5eb62d4bc8826e1e62117107a0f896ffe43d604b234181bcfd68
7
- data.tar.gz: fd8397b6b45de5dd9d1b4f7360be5df0f31704113d023ee2bbffb0b3d6ba80a303804a12b9dd76363f9797728129a1f5d9a9322211cd033ecacd869b3264f460
6
+ metadata.gz: 2445c87f6ddc4cebf8e0839d5c57261d85244574464c30f3941e17205ffc89f617343e7fa59ab51d1b3ff9971c83313cad074e5f78edf62b48d9d7e32b5230fb
7
+ data.tar.gz: 71a59b22bdaa10181ba60faa84fdc28fe50f22a4ba8429d1609a994130e98d6322df244eaebde827e946293b7f68b183f25e0d327053400a3ef6559f984ec974
@@ -1,5 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "fileutils"
4
+ require "yaml"
5
+
3
6
  module RelatonW3c
4
7
  # Page of hit collection.
5
8
  class HitCollection < RelatonBib::HitCollection
@@ -44,7 +44,7 @@ module RelatonW3c
44
44
  titles << { content: title, type: "main" }
45
45
  subtitle = doc.at("//h2[@id='subtitle']").text
46
46
  titles << { content: subtitle, tipe: "subtitle" }
47
- else
47
+ elsif hit["title"]
48
48
  titles << { content: hit["title"], type: "main" }
49
49
  end
50
50
  titles.map do |t|
@@ -1,3 +1,3 @@
1
1
  module RelatonW3c
2
- VERSION = "1.0.1".freeze
2
+ VERSION = "1.0.2".freeze
3
3
  end
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require "net/http"
4
+
3
5
  module RelatonW3c
4
6
  # Class methods for search W3C standards.
5
7
  class W3cBibliography
@@ -10,7 +12,7 @@ module RelatonW3c
10
12
  HitCollection.new text
11
13
  rescue SocketError, Timeout::Error, Errno::EINVAL, Errno::ECONNRESET,
12
14
  EOFError, Net::HTTPBadResponse, Net::HTTPHeaderSyntaxError,
13
- Net::ProtocolError, OpenSSL::SSL::SSLError, Errno::ETIMEDOUT
15
+ Net::ProtocolError, Errno::ETIMEDOUT
14
16
  raise RelatonBib::RequestError,
15
17
  "Could not access #{HitCollection::DOMAIN}"
16
18
  end
@@ -9,9 +9,9 @@ Gem::Specification.new do |spec|
9
9
  spec.email = ["open.source@ribose.com"]
10
10
 
11
11
  spec.summary = "RelatonIso: retrieve W3C Standards for bibliographic "\
12
- "use using the IsoBibliographicItem model"
12
+ "using the IsoBibliographicItem model"
13
13
  spec.description = "RelatonIso: retrieve W3C Standards for bibliographic "\
14
- "use using the IsoBibliographicItem model"
14
+ "using the IsoBibliographicItem model"
15
15
  spec.homepage = "https://github.com/relaton/relaton-wc3"
16
16
  spec.license = "BSD-2-Clause"
17
17
  spec.required_ruby_version = Gem::Requirement.new(">= 2.4.0")
@@ -39,5 +39,5 @@ Gem::Specification.new do |spec|
39
39
  spec.add_development_dependency "vcr"
40
40
  spec.add_development_dependency "webmock"
41
41
 
42
- spec.add_dependency "relaton-bib", ">= 1.0.3"
42
+ spec.add_dependency "relaton-bib", ">= 1.0.4"
43
43
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-w3c
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.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: 2020-05-20 00:00:00.000000000 Z
11
+ date: 2020-05-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: debase
@@ -114,15 +114,15 @@ dependencies:
114
114
  requirements:
115
115
  - - ">="
116
116
  - !ruby/object:Gem::Version
117
- version: 1.0.3
117
+ version: 1.0.4
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - ">="
123
123
  - !ruby/object:Gem::Version
124
- version: 1.0.3
125
- description: 'RelatonIso: retrieve W3C Standards for bibliographic use using the IsoBibliographicItem
124
+ version: 1.0.4
125
+ description: 'RelatonIso: retrieve W3C Standards for bibliographic using the IsoBibliographicItem
126
126
  model'
127
127
  email:
128
128
  - open.source@ribose.com
@@ -180,6 +180,6 @@ requirements: []
180
180
  rubygems_version: 3.0.6
181
181
  signing_key:
182
182
  specification_version: 4
183
- summary: 'RelatonIso: retrieve W3C Standards for bibliographic use using the IsoBibliographicItem
183
+ summary: 'RelatonIso: retrieve W3C Standards for bibliographic using the IsoBibliographicItem
184
184
  model'
185
185
  test_files: []