relaton-w3c 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/relaton_w3c/hit_collection.rb +3 -0
- data/lib/relaton_w3c/scrapper.rb +1 -1
- data/lib/relaton_w3c/version.rb +1 -1
- data/lib/relaton_w3c/w3c_bibliography.rb +3 -1
- data/relaton_w3c.gemspec +3 -3
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 215e2c9d5f297c9aa8314eac2ed1c9fde29f9921e25ffb55024c826f02119e1d
|
4
|
+
data.tar.gz: df2f2918cf0e2b6f92139cd270e8e6c4b967b9545fe1373a6ae44f3e4eb00596
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2445c87f6ddc4cebf8e0839d5c57261d85244574464c30f3941e17205ffc89f617343e7fa59ab51d1b3ff9971c83313cad074e5f78edf62b48d9d7e32b5230fb
|
7
|
+
data.tar.gz: 71a59b22bdaa10181ba60faa84fdc28fe50f22a4ba8429d1609a994130e98d6322df244eaebde827e946293b7f68b183f25e0d327053400a3ef6559f984ec974
|
data/lib/relaton_w3c/scrapper.rb
CHANGED
@@ -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
|
-
|
47
|
+
elsif hit["title"]
|
48
48
|
titles << { content: hit["title"], type: "main" }
|
49
49
|
end
|
50
50
|
titles.map do |t|
|
data/lib/relaton_w3c/version.rb
CHANGED
@@ -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,
|
15
|
+
Net::ProtocolError, Errno::ETIMEDOUT
|
14
16
|
raise RelatonBib::RequestError,
|
15
17
|
"Could not access #{HitCollection::DOMAIN}"
|
16
18
|
end
|
data/relaton_w3c.gemspec
CHANGED
@@ -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
|
-
"
|
12
|
+
"using the IsoBibliographicItem model"
|
13
13
|
spec.description = "RelatonIso: retrieve W3C Standards for bibliographic "\
|
14
|
-
"
|
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.
|
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.
|
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-
|
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.
|
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.
|
125
|
-
description: 'RelatonIso: retrieve W3C Standards for bibliographic
|
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
|
183
|
+
summary: 'RelatonIso: retrieve W3C Standards for bibliographic using the IsoBibliographicItem
|
184
184
|
model'
|
185
185
|
test_files: []
|