relaton-etsi 1.19.0 → 1.20.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: 7e6de56729e08a6ed75056d304e5bf59b79882496c0e86edf99ba144ef56e3ac
4
- data.tar.gz: fc98cc4219dba9e46e33a25217eab20d2ce97512229b619bdf7984e8f8d078ba
3
+ metadata.gz: 81c7a95a6b38369cc2700680b2c39f3d8d75fff3761123e4fb87565a2f04dc2d
4
+ data.tar.gz: 29d1ac8bd79de191815a29a055189d05de180f964f095f3f6bdd5f77721ed892
5
5
  SHA512:
6
- metadata.gz: 45a0d19f40ad27cd253bbabdeeda09585df5354ffbcc5b24a92ece33a1afb3fa4c1ca77d58bae5d99fc71ef7c086f317a18236345d60cb0184bf79a33d91a861
7
- data.tar.gz: c7c6c1ea3ba9544809ea59b0c90b891efea0d6212c342788e8723c970a2321d3f9912395bd2ea86ecedf9f0db9e868ced450491039f2f479dad013e056c1d04b
6
+ metadata.gz: d4d477ef680da1638a383cf1fcf4b04ef2fd9afc0e5687846868376063e194d45be309cea28ceccaee49714dded0f1eb46e52eae7c0b6cf41fd6e00e716e18f0
7
+ data.tar.gz: deebba6853e866f7ea6814aeabe5c07285fcc7c02fe69d2b47a6436acda8958fdd42a03e08e2b18703791cc344fe1843b45bdd44e3fc4169dc67f997c05c6438
@@ -55,13 +55,17 @@ module RelatonEtsi
55
55
 
56
56
  def to_hash # rubocop:disable Metrics/AbcSize
57
57
  hash = super
58
- hash["marker"] = marker if marker
59
- hash["frequency"] = frequency if frequency.any?
60
- hash["mandate"] = mandate if mandate.any?
61
- hash["custom_collection"] = custom_collection if custom_collection
58
+ hash["ext"]["marker"] = marker if marker
59
+ hash["ext"]["frequency"] = frequency if frequency.any?
60
+ hash["ext"]["mandate"] = mandate if mandate.any?
61
+ hash["ext"]["custom_collection"] = custom_collection if custom_collection
62
62
  hash
63
63
  end
64
64
 
65
+ def has_ext?
66
+ super || marker || frequency.any? || mandate.any? || custom_collection
67
+ end
68
+
65
69
  def to_asciibib(prefix = "") # rubocop:disable Metrics/AbcSize
66
70
  out = super
67
71
  pref = prefix.empty? ? prefix : "#{prefix}."
@@ -3,6 +3,15 @@ module RelatonEtsi
3
3
  include RelatonBib::HashConverter
4
4
  extend self
5
5
 
6
+ def hash_to_bib(hash) # rubocop:disable Metrics/AbcSize
7
+ ret = super
8
+ ret[:marker] = hash["ext"]["marker"] if hash.dig("ext", "marker")
9
+ ret[:frequency] = hash["ext"]["frequency"] if hash.dig("ext", "frequency")
10
+ ret[:mandate] = hash["ext"]["mandate"] if hash.dig("ext", "mandate")
11
+ ret[:custom_collection] = hash["ext"]["custom_collection"] if hash.dig("ext", "custom_collection")
12
+ ret
13
+ end
14
+
6
15
  private
7
16
 
8
17
  # @param item_hash [Hash]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RelatonEtsi
4
- VERSION = "1.19.0"
4
+ VERSION = "1.20.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relaton-etsi
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.19.0
4
+ version: 1.20.0
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: 2024-07-03 00:00:00.000000000 Z
11
+ date: 2024-12-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: csv
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 1.19.0
33
+ version: 1.20.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 1.19.0
40
+ version: 1.20.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: relaton-index
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -88,7 +88,7 @@ licenses:
88
88
  - BSD-2-Clause
89
89
  metadata:
90
90
  homepage_uri: https://github.com/relaton/relaton-etsi
91
- post_install_message:
91
+ post_install_message:
92
92
  rdoc_options: []
93
93
  require_paths:
94
94
  - lib
@@ -104,7 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
104
104
  version: '0'
105
105
  requirements: []
106
106
  rubygems_version: 3.3.27
107
- signing_key:
107
+ signing_key:
108
108
  specification_version: 4
109
109
  summary: 'RelatonEtsi: retrieve ETSI Standards for bibliographic using the BibliographicItem
110
110
  model'