glossarist 2.0.2 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/glossarist/concept_manager.rb +2 -2
- data/lib/glossarist/managed_concept.rb +12 -0
- data/lib/glossarist/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6db3243d2a3dee8ab236ac591b088e291f735880421d586cb7b08881b023c7b4
|
4
|
+
data.tar.gz: 4973495641223a4f88cc5c8c83c239c4979d94d77a8986dfaceaf3165ba78a6b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b731a9514198432b603978107243ab700657c5738a17a4b7a8db543fb92d4fa9f6db0f8b56c3a75b90e8a371f43d2ba2c70de494a2b393185621ad35e0014496
|
7
|
+
data.tar.gz: 852a6dc42b6332816ddbaeb73eefbb21071c685e9965337100f926a53025e892b938141ecb227c43eb662f614a1d459294860dae0745ab025642d4a1c358201a
|
@@ -33,7 +33,7 @@ module Glossarist
|
|
33
33
|
end
|
34
34
|
|
35
35
|
def load_concept_from_file(filename)
|
36
|
-
concept_hash = Psych.safe_load(File.read(filename), permitted_classes: [Date])
|
36
|
+
concept_hash = Psych.safe_load(File.read(filename), permitted_classes: [Date, Time])
|
37
37
|
concept_hash["uuid"] = concept_hash["id"] || File.basename(filename, ".*")
|
38
38
|
|
39
39
|
concept = ManagedConcept.new(concept_hash)
|
@@ -50,7 +50,7 @@ module Glossarist
|
|
50
50
|
def load_localized_concept(id)
|
51
51
|
concept_hash = Psych.safe_load(
|
52
52
|
File.read(localized_concept_path(id)),
|
53
|
-
permitted_classes: [Date],
|
53
|
+
permitted_classes: [Date, Time],
|
54
54
|
)
|
55
55
|
concept_hash["uuid"] = id
|
56
56
|
|
@@ -28,6 +28,10 @@ module Glossarist
|
|
28
28
|
# @return [Array<String>]
|
29
29
|
attr_reader :groups
|
30
30
|
|
31
|
+
# List of authorative sources.
|
32
|
+
# @return [Array<ConceptSource>]
|
33
|
+
attr_reader :sources
|
34
|
+
|
31
35
|
# All localizations for this concept.
|
32
36
|
#
|
33
37
|
# Keys are language codes and values are instances of {LocalizedConcept}.
|
@@ -87,6 +91,12 @@ module Glossarist
|
|
87
91
|
end
|
88
92
|
end
|
89
93
|
|
94
|
+
def sources=(sources)
|
95
|
+
@sources = sources&.map do |source|
|
96
|
+
ConceptSource.new(source)
|
97
|
+
end || []
|
98
|
+
end
|
99
|
+
|
90
100
|
def localizations=(localizations)
|
91
101
|
return unless localizations
|
92
102
|
|
@@ -134,6 +144,7 @@ module Glossarist
|
|
134
144
|
"identifier" => id,
|
135
145
|
"localized_concepts" => localized_concepts.empty? ? nil : localized_concepts,
|
136
146
|
"groups" => groups,
|
147
|
+
"sources" => sources&.map(&:to_h),
|
137
148
|
}.compact,
|
138
149
|
}.compact
|
139
150
|
end
|
@@ -182,6 +193,7 @@ module Glossarist
|
|
182
193
|
localizedConcepts
|
183
194
|
localizations
|
184
195
|
groups
|
196
|
+
sources
|
185
197
|
].compact
|
186
198
|
end
|
187
199
|
|
data/lib/glossarist/version.rb
CHANGED
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.0.
|
4
|
+
version: 2.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-12-
|
11
|
+
date: 2023-12-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: relaton
|