relaton-w3c 1.5.0 → 1.6.pre1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/macos.yml +2 -0
- data/lib/relaton_w3c/hit_collection.rb +1 -1
- data/lib/relaton_w3c/scrapper.rb +5 -2
- data/lib/relaton_w3c/version.rb +1 -1
- data/relaton_w3c.gemspec +1 -1
- 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: 25d49fa941d5b6aeff2f14a9307eeba5f8c87ad18dbc5e7c9f4660d7a4e97731
|
4
|
+
data.tar.gz: e89d352bb1f7dcc88e84ea0a56009171fa6dd02fa47c80d895c274564e01a375
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b24ebff9a4d5265b9b236d1c0c6c22fa5d4d588118260479d9b9e021ba8569afa508312448805bb75fb32b474c53815102d03cf2259e1218bb2af767640e53f6
|
7
|
+
data.tar.gz: c60dc6d4602228745e27341bc4d39545694282e912b0df2f338291fdbc08e6b84134b8149911266ad88367ff482da4ea1d92835c2d1650433ff0320e5cf28172
|
data/.github/workflows/macos.yml
CHANGED
@@ -32,6 +32,8 @@ jobs:
|
|
32
32
|
- name: Update gems
|
33
33
|
run: |
|
34
34
|
sudo gem install bundler --force
|
35
|
+
ruby -v | grep 2.5 && bundle config set build.debase --with-cflags="-Wno-error=implicit-function-declaration"
|
36
|
+
ruby -v | grep 2.5 && bundle config set build.ruby-debug-ide --with-cflags="-Wno-error=implicit-function-declaration"
|
35
37
|
bundle install --jobs 4 --retry 3
|
36
38
|
- name: Run specs
|
37
39
|
run: |
|
@@ -17,7 +17,7 @@ module RelatonW3c
|
|
17
17
|
}.freeze
|
18
18
|
DOMAIN = "https://www.w3.org"
|
19
19
|
DATADIR = File.expand_path(".relaton/w3c", Dir.home).freeze
|
20
|
-
DATAFILE = File.expand_path("
|
20
|
+
DATAFILE = File.expand_path("bibliography.yml", DATADIR).freeze
|
21
21
|
|
22
22
|
# @param ref [String] reference to search
|
23
23
|
def initialize(ref)
|
data/lib/relaton_w3c/scrapper.rb
CHANGED
@@ -49,7 +49,9 @@ module RelatonW3c
|
|
49
49
|
titles = []
|
50
50
|
if doc
|
51
51
|
title = doc.at("//*[contains(@id, 'title')]")&.text
|
52
|
-
|
52
|
+
if title && !title.empty?
|
53
|
+
titles << { content: title.gsub(/\n/, " "), type: "main" }
|
54
|
+
end
|
53
55
|
subtitle = doc.at(
|
54
56
|
"//h2[@id='subtitle']|//p[contains(@class, 'subline')]"
|
55
57
|
)&.text
|
@@ -71,7 +73,8 @@ module RelatonW3c
|
|
71
73
|
def fetch_abstract(doc)
|
72
74
|
return [] unless doc
|
73
75
|
|
74
|
-
content = doc.at("//h2[.='Abstract']/following-sibling::p"
|
76
|
+
content = doc.at("//h2[.='Abstract']/following-sibling::p",
|
77
|
+
"//div[@class='abstract']/p").text
|
75
78
|
[RelatonBib::FormattedString.new(content: content, language: "en",
|
76
79
|
script: "Latn")]
|
77
80
|
end
|
data/lib/relaton_w3c/version.rb
CHANGED
data/relaton_w3c.gemspec
CHANGED
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.
|
4
|
+
version: 1.6.pre1
|
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-
|
11
|
+
date: 2020-11-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: debase
|
@@ -114,14 +114,14 @@ dependencies:
|
|
114
114
|
requirements:
|
115
115
|
- - ">="
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: 1.
|
117
|
+
version: 1.6.pre
|
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.
|
124
|
+
version: 1.6.pre
|
125
125
|
description: 'RelatonIso: retrieve W3C Standards for bibliographic using the IsoBibliographicItem
|
126
126
|
model'
|
127
127
|
email:
|
@@ -173,9 +173,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
173
173
|
version: 2.4.0
|
174
174
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
175
175
|
requirements:
|
176
|
-
- - "
|
176
|
+
- - ">"
|
177
177
|
- !ruby/object:Gem::Version
|
178
|
-
version:
|
178
|
+
version: 1.3.1
|
179
179
|
requirements: []
|
180
180
|
rubygems_version: 3.0.6
|
181
181
|
signing_key:
|