glossarist 2.1.0 → 2.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: ab9f794633ad83fc5d35fec74fad5006d187a4cd3c5c1ba91e563506a16ddaed
4
- data.tar.gz: 1c0af3de4b228856e9adc0f579f709e2f4c63a44d827b66325f2ea1b79df776a
3
+ metadata.gz: d174478d1fdc030866f09175b1a229e7133ea77005fa00f7b3f46a904a12248e
4
+ data.tar.gz: 54fb2bfcbb816f5514d3bc0c54f3fd37debdbb87af2279b117edffaa3ea77aa7
5
5
  SHA512:
6
- metadata.gz: 0cb0ad5ac9ea10c2aaad16062c6c5a10878b7c7f7bf6dd7a9e7641417ed2d1f47ee3fd3c9fc86fbca7262234e5a05141a11f584e798fe493d99064b73bcead0d
7
- data.tar.gz: e4431def5662c9f7eceff74cbff8258128525e657fb4901e06fd21a2243ad8f3d98fad62e28766aa5bdf0d20149ffd66525389fd3b703c57907e4fb2873dbd03
6
+ metadata.gz: 2ce6fffeda48412bda622570f2eee9ae17065346a520821293f16bf2d29bb4c90674e6a0ce3a7f8e3dc75cb871c9d9308841c318739f0a942ea9d42c108b0ae9
7
+ data.tar.gz: 56ff4885111df64c8fe8a179e15f73164ad1e0dd4651f63ae27685b23fbcb94ae32b1250b82e2fd99430a8fd07a7efc31fcf0f4b284364c2954c802435fea6ca
@@ -57,7 +57,7 @@ module Glossarist
57
57
  end
58
58
 
59
59
  def uuid
60
- @uuid ||= Glossarist::Utilities::UUID.uuid_v5(@uuid_namespace, to_h.to_yaml)
60
+ @uuid ||= Glossarist::Utilities::UUID.uuid_v5(@uuid_namespace, to_h_no_uuid.to_yaml)
61
61
  end
62
62
 
63
63
  def related=(related)
@@ -141,7 +141,7 @@ module Glossarist
141
141
 
142
142
  alias :l10n :localization
143
143
 
144
- def to_h
144
+ def to_h_no_uuid
145
145
  {
146
146
  "data" => {
147
147
  "identifier" => id,
@@ -149,9 +149,16 @@ module Glossarist
149
149
  "groups" => groups,
150
150
  "sources" => sources&.map(&:to_h),
151
151
  }.compact,
152
+ "related" => related&.map(&:to_h),
153
+ "date_accepted" => date_accepted&.date,
154
+ "status" => status,
152
155
  }.compact
153
156
  end
154
157
 
158
+ def to_h
159
+ to_h_no_uuid.merge("id" => uuid)
160
+ end
161
+
155
162
  def default_designation
156
163
  localized = localization("eng") || localizations.values.first
157
164
  terms = localized&.preferred_terms&.first || localized&.terms&.first
@@ -178,6 +185,7 @@ module Glossarist
178
185
  end
179
186
 
180
187
  def date_accepted
188
+ return nil unless @dates
181
189
  @dates.find { |date| date.accepted? }
182
190
  end
183
191
 
@@ -4,5 +4,5 @@
4
4
  #
5
5
 
6
6
  module Glossarist
7
- VERSION = "2.1.0"
7
+ VERSION = "2.2.0"
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glossarist
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-04-29 00:00:00.000000000 Z
11
+ date: 2024-11-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: relaton