relaton-bsi 1.14.1 → 1.14.3

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: 20191566de59ace52095faa78645dc2ea5e2e58a31a567aa70db43d4afb837f9
4
- data.tar.gz: 8dead132831cb46e623ed9d2f19ea30275a3b146273309b86394bc9863253129
3
+ metadata.gz: 105023cdc387d623e2877fa21a8baa7caeeeef510517c67df1ecba6350e2fb77
4
+ data.tar.gz: 89f942ca51c000bfaa2330c13f3fff7e95565f9b0c6873917c523ad2bb350e63
5
5
  SHA512:
6
- metadata.gz: 5c91eec66c5794fa034b4b011782bbbf481a88c5a1aabc0a6438319fad5f0ae8d4a4c7a5a77a0350ddc521b0675bf257b6cfc346432e6daabcc756bab26dc096
7
- data.tar.gz: 8b3ef2e9d5df7f1313e2f568877a394312ec73767aba37e51af3ad86c897fc60553618e721544affc803b0ecbb93fb7457db5b1f2881ea40576393512e58ffae
6
+ metadata.gz: 0364cfa877a0cea6c1d8b20c2b97ad3e022615c18e4e2bf6175f93a67d67a251cf1bbe2ef4b79b29b6332da651f0fd0970fbe867fbb8e6722922bfaf9d010495
7
+ data.tar.gz: 7a3f918ab6b795b6372e3c5ead86945a8fafa0d01f9ec03d19dada40a5615ede718bf568933e054f5c8cb504497cfc4df49689a0ca7945f8b794bc6091dcca06
@@ -9,13 +9,7 @@ module RelatonBsi
9
9
 
10
10
  SUBDOCTYPES = %w[specification method-of-test method-of-specifying vocabulary code-of-practice].freeze
11
11
 
12
- # @params price_code [String, nil]
13
- # @param cen_processing [Boolean, nil]
14
12
  def initialize(**args) # rubocop:disable Metrics/AbcSize
15
- # if args[:doctype] && !TYPES.include?(args[:doctype])
16
- # warn "[relaton-bsi] WARNING: invalid doctype: #{args[:doctype]}"
17
- # warn "[relaton-bsi] Allowed doctypes are: #{TYPES.join(', ')}"
18
- # end
19
13
  if args[:subdoctype] && !SUBDOCTYPES.include?(args[:subdoctype])
20
14
  warn "[relaton-bsi] WARNING: invalid subdoctype: #{args[:subdoctype]}"
21
15
  warn "[relaton-bsi] Allowed subdoctypes are: #{SUBDOCTYPES.join(', ')}"
@@ -37,21 +31,22 @@ module RelatonBsi
37
31
  # @option opts [Boolean] :bibdata
38
32
  # @option opts [String] :lang language
39
33
  # @return [String] XML
40
- def to_xml(**opts) # rubocop:disable Metrics/AbcSize,Metrics/CyclomaticComplexity,Metrics/MethodLength,Metrics/PerceivedComplexity
41
- super(**opts) do |b|
42
- if opts[:bibdata] && (has_ext_attrs? || price_code || !cen_processing.nil?)
43
- ext = b.ext do
44
- b.doctype doctype if doctype
45
- b.horizontal horizontal unless horizontal.nil?
46
- editorialgroup&.to_xml b
47
- ics.each { |i| i.to_xml b }
48
- structuredidentifier&.to_xml b
49
- b.stagename stagename if stagename
50
- end
51
- ext["schema-version"] = ext_schema unless opts[:embeded]
52
- end
53
- end
54
- end
34
+ # def to_xml(**opts) # rubocop:disable Metrics/AbcSize,Metrics/CyclomaticComplexity,Metrics/MethodLength,Metrics/PerceivedComplexity
35
+ # super(**opts) do |b|
36
+ # if opts[:bibdata] && (has_ext_attrs? || price_code || !cen_processing.nil?)
37
+ # ext = b.ext do
38
+ # b.doctype doctype if doctype
39
+ # b.docsubtype subdoctype if subdoctype
40
+ # # b.horizontal horizontal unless horizontal.nil?
41
+ # editorialgroup&.to_xml b
42
+ # ics.each { |i| i.to_xml b }
43
+ # structuredidentifier&.to_xml b
44
+ # b.stagename stagename if stagename
45
+ # end
46
+ # ext["schema-version"] = ext_schema unless opts[:embeded]
47
+ # end
48
+ # end
49
+ # end
55
50
 
56
51
  # @param hash [Hash]
57
52
  # @return [RelatonBsi::BsiBibliographicItem]
@@ -76,6 +76,7 @@ module RelatonBsi
76
76
  fetched: Date.today.to_s,
77
77
  type: "standard",
78
78
  docid: fetch_docid(hit.hit[:code], data),
79
+ docnumber: hit.hit[:code].gsub(/[\s:-]+/, ""),
79
80
  language: ["en"],
80
81
  script: ["Latn"],
81
82
  title: fetch_titles(hit.hit[:title]),
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RelatonBsi
4
- VERSION = "1.14.1"
4
+ VERSION = "1.14.3"
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.1
4
+ version: 1.14.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-02-08 00:00:00.000000000 Z
11
+ date: 2023-02-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: equivalent-xml