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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3bc42ac70b7c90839469815a82b541a30f77148ef141bd35ca4d9bed240296ca
4
- data.tar.gz: 5722c2b856296faea7c6a45bd1955ab514f4424dffc1672c3decd8b65acab667
3
+ metadata.gz: 20191566de59ace52095faa78645dc2ea5e2e58a31a567aa70db43d4afb837f9
4
+ data.tar.gz: 8dead132831cb46e623ed9d2f19ea30275a3b146273309b86394bc9863253129
5
5
  SHA512:
6
- metadata.gz: 79f69bf2d611d00c15b84b444717dc087691d5e08372dd33c39873d352cdacacc4fb0ce16caa586c25d65d2c6dce56137e0ad185df31639df778b0e5daf3282d
7
- data.tar.gz: 90ee645c5d6a70d8575dda385c2eacbb05aef0c549d1978ec671e3826b885a57999b71e4589f455785cef6ec1db90b2967392f5f990c85ed5bdaac7b5398a308
6
+ metadata.gz: 5c91eec66c5794fa034b4b011782bbbf481a88c5a1aabc0a6438319fad5f0ae8d4a4c7a5a77a0350ddc521b0675bf257b6cfc346432e6daabcc756bab26dc096
7
+ data.tar.gz: 8b3ef2e9d5df7f1313e2f568877a394312ec73767aba37e51af3ad86c897fc60553618e721544affc803b0ecbb93fb7457db5b1f2881ea40576393512e58ffae
@@ -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.hit[:doctype],
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>]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RelatonBsi
4
- VERSION = "1.14.0"
4
+ VERSION = "1.14.1"
5
5
  end
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.0
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: 2022-12-03 00:00:00.000000000 Z
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.2.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'