relaton-iso 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/relaton_iso/scrapper.rb +7 -5
- data/lib/relaton_iso/version.rb +1 -1
- data/relaton_iso.gemspec +2 -2
- 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: 695d73fc8a0ec542936778c62629e23278859d137bc6ee9b84e6d20336d832da
|
4
|
+
data.tar.gz: 1c529be373cf17e122e7d98cb910e83474916bb9d2b9d38a612c8a5f3d41aeb3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ecdd90086da2528bf41a05e499da97f10409a69004e7d45786bffcabce715bc5f3261f25a79212b56f9171cbd66ef56a82b382a3c26750f0fed8a2d1142ba922
|
7
|
+
data.tar.gz: d23cdc8f56ec945e945a8b5a5cede2f84e9f68c0419f6e9fc16403988d5f8fd4917656a327ed921f216783829ec2fd91073a2f59adc982cfe249a73f2bc516c2
|
data/lib/relaton_iso/scrapper.rb
CHANGED
@@ -104,7 +104,7 @@ module RelatonIso
|
|
104
104
|
d = l[:path] ? get_page(l[:path])[0] : doc
|
105
105
|
unless d.at("//h5[@class='help-block'][.='недоступно на русском языке']")
|
106
106
|
s << l
|
107
|
-
titles
|
107
|
+
titles += fetch_title(d, l[:lang])
|
108
108
|
|
109
109
|
# Fetch abstracts.
|
110
110
|
abstract_content = d.css("div[itemprop='description'] p").text
|
@@ -287,12 +287,14 @@ module RelatonIso
|
|
287
287
|
# Fetch titles.
|
288
288
|
# @param doc [Nokogiri::HTML::Document]
|
289
289
|
# @param lang [String]
|
290
|
-
# @return [
|
290
|
+
# @return [Array<RelatonBib::TypedTitleString>]
|
291
291
|
def fetch_title(doc, lang)
|
292
292
|
content = doc.at(
|
293
|
-
"//nav[contains(@class,'
|
294
|
-
)&.text
|
295
|
-
|
293
|
+
"//nav[contains(@class,'heading-condensed')]/h2 | //nav[contains(@class,'heading-condensed')]/h3",
|
294
|
+
)&.text&.gsub(/\u2014/, "-")
|
295
|
+
return [] unless content
|
296
|
+
|
297
|
+
RelatonBib::TypedTitleString.from_string content, lang, script(lang)
|
296
298
|
end
|
297
299
|
|
298
300
|
# Return ISO script code.
|
data/lib/relaton_iso/version.rb
CHANGED
data/relaton_iso.gemspec
CHANGED
@@ -37,6 +37,6 @@ Gem::Specification.new do |spec|
|
|
37
37
|
spec.add_development_dependency "vcr"
|
38
38
|
spec.add_development_dependency "webmock"
|
39
39
|
|
40
|
-
spec.add_dependency "relaton-iec", "~> 1.
|
41
|
-
spec.add_dependency "relaton-iso-bib", "~> 1.
|
40
|
+
spec.add_dependency "relaton-iec", "~> 1.2.0"
|
41
|
+
spec.add_dependency "relaton-iso-bib", "~> 1.2.0"
|
42
42
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton-iso
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
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-06-
|
11
|
+
date: 2020-06-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: byebug
|
@@ -156,28 +156,28 @@ dependencies:
|
|
156
156
|
requirements:
|
157
157
|
- - "~>"
|
158
158
|
- !ruby/object:Gem::Version
|
159
|
-
version: 1.
|
159
|
+
version: 1.2.0
|
160
160
|
type: :runtime
|
161
161
|
prerelease: false
|
162
162
|
version_requirements: !ruby/object:Gem::Requirement
|
163
163
|
requirements:
|
164
164
|
- - "~>"
|
165
165
|
- !ruby/object:Gem::Version
|
166
|
-
version: 1.
|
166
|
+
version: 1.2.0
|
167
167
|
- !ruby/object:Gem::Dependency
|
168
168
|
name: relaton-iso-bib
|
169
169
|
requirement: !ruby/object:Gem::Requirement
|
170
170
|
requirements:
|
171
171
|
- - "~>"
|
172
172
|
- !ruby/object:Gem::Version
|
173
|
-
version: 1.
|
173
|
+
version: 1.2.0
|
174
174
|
type: :runtime
|
175
175
|
prerelease: false
|
176
176
|
version_requirements: !ruby/object:Gem::Requirement
|
177
177
|
requirements:
|
178
178
|
- - "~>"
|
179
179
|
- !ruby/object:Gem::Version
|
180
|
-
version: 1.
|
180
|
+
version: 1.2.0
|
181
181
|
description: 'RelatonIso: retrieve ISO Standards for bibliographic use using the IsoBibliographicItem
|
182
182
|
model'
|
183
183
|
email:
|