relaton-bsi 1.14.0 → 1.14.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/relaton_bsi/scrapper.rb +16 -1
- data/lib/relaton_bsi/version.rb +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: 20191566de59ace52095faa78645dc2ea5e2e58a31a567aa70db43d4afb837f9
|
4
|
+
data.tar.gz: 8dead132831cb46e623ed9d2f19ea30275a3b146273309b86394bc9863253129
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5c91eec66c5794fa034b4b011782bbbf481a88c5a1aabc0a6438319fad5f0ae8d4a4c7a5a77a0350ddc521b0675bf257b6cfc346432e6daabcc756bab26dc096
|
7
|
+
data.tar.gz: 8b3ef2e9d5df7f1313e2f568877a394312ec73767aba37e51af3ad86c897fc60553618e721544affc803b0ecbb93fb7457db5b1f2881ea40576393512e58ffae
|
data/lib/relaton_bsi/scrapper.rb
CHANGED
@@ -79,7 +79,7 @@ module RelatonBsi
|
|
79
79
|
language: ["en"],
|
80
80
|
script: ["Latn"],
|
81
81
|
title: fetch_titles(hit.hit[:title]),
|
82
|
-
doctype: hit
|
82
|
+
doctype: fetch_doctype(hit),
|
83
83
|
docstatus: fetch_status(hit.hit[:status]),
|
84
84
|
ics: fetch_ics(hit.hit[:ics]),
|
85
85
|
date: fetch_dates(hit),
|
@@ -174,6 +174,21 @@ module RelatonBsi
|
|
174
174
|
RelatonBib::TypedTitleString.from_string title, "en", "Latn"
|
175
175
|
end
|
176
176
|
|
177
|
+
#
|
178
|
+
# Fetch doctype.
|
179
|
+
#
|
180
|
+
# @param [RelatonBsi::Hit] hit hit
|
181
|
+
#
|
182
|
+
# @return [String] doctype
|
183
|
+
#
|
184
|
+
def fetch_doctype(hit)
|
185
|
+
case hit.hit[:code]
|
186
|
+
when /(^|\s)Flex\s/ then "flex-standard"
|
187
|
+
when /(^|\s)PAS\s/ then "publicly-available-specification"
|
188
|
+
else hit.hit[:doctype]
|
189
|
+
end
|
190
|
+
end
|
191
|
+
|
177
192
|
# Fetch dates
|
178
193
|
# @param hit [RelatonBsi:Hit]
|
179
194
|
# @return [Array<Hash>]
|
data/lib/relaton_bsi/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: relaton-bsi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.14.
|
4
|
+
version: 1.14.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-02-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: equivalent-xml
|
@@ -193,7 +193,7 @@ licenses:
|
|
193
193
|
metadata:
|
194
194
|
homepage_uri: https://github.com/metanorma/relaton-bsi
|
195
195
|
source_code_uri: https://github.com/metanorma/relaton-bsi
|
196
|
-
post_install_message:
|
196
|
+
post_install_message:
|
197
197
|
rdoc_options: []
|
198
198
|
require_paths:
|
199
199
|
- lib
|
@@ -208,8 +208,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
208
208
|
- !ruby/object:Gem::Version
|
209
209
|
version: '0'
|
210
210
|
requirements: []
|
211
|
-
rubygems_version: 3.
|
212
|
-
signing_key:
|
211
|
+
rubygems_version: 3.1.6
|
212
|
+
signing_key:
|
213
213
|
specification_version: 4
|
214
214
|
summary: 'RelatonBsi: retrieve BSI Standards for bibliographic use using the BibliographicItem
|
215
215
|
model'
|