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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 23dbce13e2b3ded9fbcca9cc7c9193fdf8bdec270fdf52b416652f334f8af593
4
- data.tar.gz: bb3482b113d31b79c7050f0d2206cb3df3588f8ef1cc45e72721c9c2dfd50201
3
+ metadata.gz: 695d73fc8a0ec542936778c62629e23278859d137bc6ee9b84e6d20336d832da
4
+ data.tar.gz: 1c529be373cf17e122e7d98cb910e83474916bb9d2b9d38a612c8a5f3d41aeb3
5
5
  SHA512:
6
- metadata.gz: a9bfbe60c42fb0ee0aee1e67c4b125715d3cad5ec9b52dfa87b1efb2484260ba768da03aabddc4794d28c2d18a840dc9f982eb28b1e41399f3166052806294d8
7
- data.tar.gz: dd40529ac753e12996e0fc57abcf8b1bfa161059f726688ab0895f921cc8d65d3b6f224eb39a51081137b2338e0e891cc042d6cd470e2aa38195e53970bf6d63
6
+ metadata.gz: ecdd90086da2528bf41a05e499da97f10409a69004e7d45786bffcabce715bc5f3261f25a79212b56f9171cbd66ef56a82b382a3c26750f0fed8a2d1142ba922
7
+ data.tar.gz: d23cdc8f56ec945e945a8b5a5cede2f84e9f68c0419f6e9fc16403988d5f8fd4917656a327ed921f216783829ec2fd91073a2f59adc982cfe249a73f2bc516c2
@@ -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 << fetch_title(d, l[:lang])
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 [Hash]
290
+ # @return [Array<RelatonBib::TypedTitleString>]
291
291
  def fetch_title(doc, lang)
292
292
  content = doc.at(
293
- "//nav[contains(@class,'eading-condensed')]/h2 | //nav[contains(@class,'eading-condensed')]/h3",
294
- )&.text
295
- RelatonIsoBib::HashConverter.split_title content, lang, script(lang)
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.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RelatonIso
4
- VERSION = "1.1.0"
4
+ VERSION = "1.2.0"
5
5
  end
@@ -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.1.0"
41
- spec.add_dependency "relaton-iso-bib", "~> 1.1.0"
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.1.0
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-03 00:00:00.000000000 Z
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.1.0
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.1.0
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.1.0
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.1.0
180
+ version: 1.2.0
181
181
  description: 'RelatonIso: retrieve ISO Standards for bibliographic use using the IsoBibliographicItem
182
182
  model'
183
183
  email: