glossarist 2.3.0 → 2.3.2
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/.rubocop.yml +1 -0
- data/.rubocop_todo.yml +65 -0
- data/README.adoc +2 -2
- data/config.yml +1 -1
- data/exe/glossarist +5 -3
- data/glossarist.gemspec +1 -0
- data/lib/glossarist/asset.rb +4 -9
- data/lib/glossarist/citation.rb +73 -41
- data/lib/glossarist/collection.rb +2 -11
- data/lib/glossarist/collections/asset_collection.rb +0 -3
- data/lib/glossarist/collections/bibliography_collection.rb +1 -1
- data/lib/glossarist/concept.rb +66 -206
- data/lib/glossarist/concept_data.rb +66 -0
- data/lib/glossarist/concept_date.rb +7 -11
- data/lib/glossarist/concept_manager.rb +19 -29
- data/lib/glossarist/concept_set.rb +6 -4
- data/lib/glossarist/concept_source.rb +15 -58
- data/lib/glossarist/config.rb +4 -4
- data/lib/glossarist/designation/abbreviation.rb +15 -16
- data/lib/glossarist/designation/base.rb +16 -15
- data/lib/glossarist/designation/expression.rb +18 -26
- data/lib/glossarist/designation/grammar_info.rb +27 -45
- data/lib/glossarist/designation/graphical_symbol.rb +12 -8
- data/lib/glossarist/designation/letter_symbol.rb +13 -11
- data/lib/glossarist/designation/symbol.rb +11 -13
- data/lib/glossarist/designation.rb +3 -3
- data/lib/glossarist/detailed_definition.rb +6 -24
- data/lib/glossarist/error.rb +4 -4
- data/lib/glossarist/glossary_definition.rb +6 -3
- data/lib/glossarist/localized_concept.rb +17 -62
- data/lib/glossarist/managed_concept.rb +73 -146
- data/lib/glossarist/managed_concept_collection.rb +15 -24
- data/lib/glossarist/managed_concept_data.rb +47 -0
- data/lib/glossarist/non_verb_rep.rb +10 -13
- data/lib/glossarist/related_concept.rb +14 -21
- data/lib/glossarist/utilities/uuid.rb +10 -5
- data/lib/glossarist/utilities.rb +0 -2
- data/lib/glossarist/version.rb +1 -1
- data/lib/glossarist.rb +10 -9
- metadata +23 -13
- data/lib/glossarist/model.rb +0 -40
- data/lib/glossarist/utilities/boolean_attributes.rb +0 -35
- data/lib/glossarist/utilities/enum/class_methods.rb +0 -99
- data/lib/glossarist/utilities/enum/enum_collection.rb +0 -45
- data/lib/glossarist/utilities/enum/instance_methods.rb +0 -55
- data/lib/glossarist/utilities/enum.rb +0 -21
- data/lib/glossarist/v1_reader.rb +0 -28
@@ -1,90 +1,101 @@
|
|
1
|
-
|
1
|
+
require_relative "localized_concept"
|
2
2
|
|
3
3
|
module Glossarist
|
4
|
-
class ManagedConcept < Model
|
5
|
-
include Glossarist::Utilities::Enum
|
4
|
+
class ManagedConcept < Lutaml::Model::Serializable
|
6
5
|
include Glossarist::Utilities::CommonFunctions
|
7
6
|
|
8
|
-
|
9
|
-
attr_accessor :id
|
10
|
-
alias :termid= :id=
|
11
|
-
alias :identifier= :id=
|
7
|
+
attribute :data, ManagedConceptData
|
12
8
|
|
13
|
-
|
9
|
+
attribute :related, RelatedConcept, collection: true
|
10
|
+
attribute :dates, ConceptDate, collection: true
|
11
|
+
attribute :sources, ConceptSource
|
12
|
+
attribute :date_accepted, ConceptDate
|
13
|
+
# TODO: convert to LocalizedConceptCollection when custom
|
14
|
+
# collections are implemented in lutaml-model
|
15
|
+
attribute :status, :string,
|
16
|
+
values: Glossarist::GlossaryDefinition::CONCEPT_STATUSES
|
14
17
|
|
15
|
-
|
16
|
-
|
18
|
+
attribute :identifier, :string
|
19
|
+
alias :id :identifier
|
20
|
+
alias :id= :identifier=
|
17
21
|
|
18
|
-
|
19
|
-
register_enum :status, Glossarist::GlossaryDefinition::CONCEPT_STATUSES
|
22
|
+
attribute :uuid, :string
|
20
23
|
|
21
|
-
|
22
|
-
|
24
|
+
yaml do
|
25
|
+
map :data, to: :data
|
26
|
+
map :id, with: { to: :identifier_to_yaml, from: :identifier_from_yaml }
|
27
|
+
map :identifier,
|
28
|
+
with: { to: :identifier_to_yaml, from: :identifier_from_yaml }
|
29
|
+
map :related, to: :related
|
30
|
+
map :dates, to: :dates
|
31
|
+
map %i[date_accepted dateAccepted], with: { from: :date_accepted_from_yaml, to: :date_accepted_to_yaml }
|
32
|
+
map :status, to: :status
|
23
33
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
# Concept group
|
28
|
-
# @return [Array<String>]
|
29
|
-
attr_reader :groups
|
30
|
-
|
31
|
-
# List of authorative sources.
|
32
|
-
# @return [Array<ConceptSource>]
|
33
|
-
attr_reader :sources
|
34
|
+
map :uuid, to: :uuid, with: { from: :uuid_from_yaml, to: :uuid_to_yaml }
|
35
|
+
end
|
34
36
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
# @return [Hash<String, LocalizedConcept>]
|
39
|
-
attr_reader :localizations
|
37
|
+
def localized_concepts
|
38
|
+
data.localized_concepts
|
39
|
+
end
|
40
40
|
|
41
|
-
def
|
42
|
-
|
43
|
-
|
44
|
-
@localized_concept_class = Config.class_for(:localized_concept)
|
45
|
-
@uuid_namespace = Glossarist::Utilities::UUID::OID_NAMESPACE
|
41
|
+
def localized_concepts=(val)
|
42
|
+
data.localized_concepts = val
|
43
|
+
end
|
46
44
|
|
47
|
-
|
48
|
-
|
45
|
+
def localizations
|
46
|
+
data.localizations
|
47
|
+
end
|
49
48
|
|
50
|
-
|
51
|
-
|
52
|
-
|
49
|
+
def localization(lang)
|
50
|
+
localizations[lang]
|
51
|
+
end
|
52
|
+
alias :l10n :localization
|
53
53
|
|
54
|
-
|
54
|
+
def date_accepted_from_yaml(model, value)
|
55
|
+
model.dates ||= []
|
56
|
+
model.dates << ConceptDate.of_yaml({ "date" => value,
|
57
|
+
"type" => "accepted" })
|
58
|
+
end
|
55
59
|
|
56
|
-
|
60
|
+
def date_accepted_to_yaml(model, doc)
|
61
|
+
doc["date_accepted"] = model.date_accepted.date if model.date_accepted
|
57
62
|
end
|
58
63
|
|
59
|
-
def
|
60
|
-
|
64
|
+
def uuid_to_yaml(model, doc)
|
65
|
+
doc["id"] = model.uuid if model.uuid
|
61
66
|
end
|
62
67
|
|
63
|
-
def
|
64
|
-
|
68
|
+
def uuid_from_yaml(model, value)
|
69
|
+
model.uuid = value if value
|
65
70
|
end
|
66
71
|
|
67
|
-
def
|
68
|
-
@
|
72
|
+
def uuid
|
73
|
+
@uuid ||= Glossarist::Utilities::UUID.uuid_v5(
|
74
|
+
Glossarist::Utilities::UUID::OID_NAMESPACE,
|
75
|
+
to_yaml(except: [:uuid]),
|
76
|
+
)
|
69
77
|
end
|
70
78
|
|
71
|
-
def
|
72
|
-
|
79
|
+
def identifier_to_yaml(model, doc)
|
80
|
+
value = model.identifier || model.id
|
81
|
+
doc["id"] = value if value && !doc["id"]
|
82
|
+
end
|
73
83
|
|
74
|
-
|
84
|
+
def identifier_from_yaml(model, value)
|
85
|
+
model.identifier = value || model.identifier
|
75
86
|
end
|
76
87
|
|
77
|
-
def localized_concepts=(
|
78
|
-
return unless
|
88
|
+
def localized_concepts=(localized_concepts_collection)
|
89
|
+
return unless localized_concepts_collection
|
79
90
|
|
80
|
-
if
|
81
|
-
@localized_concepts = stringify_keys(
|
91
|
+
if localized_concepts_collection.is_a?(Hash)
|
92
|
+
@localized_concepts = stringify_keys(localized_concepts_collection)
|
82
93
|
else
|
83
|
-
|
84
|
-
lang = localized_concept_hash
|
94
|
+
localized_concepts_collection.each do |localized_concept_hash|
|
95
|
+
lang = localized_concept_hash.dig("data", "language_code").to_s
|
85
96
|
|
86
97
|
localized_concept = add_localization(
|
87
|
-
|
98
|
+
Config.class_for(:localized_concept).of_yaml(localized_concept_hash),
|
88
99
|
)
|
89
100
|
|
90
101
|
@localized_concepts[lang] = localization(lang).uuid
|
@@ -93,72 +104,22 @@ module Glossarist
|
|
93
104
|
end
|
94
105
|
end
|
95
106
|
end
|
96
|
-
|
97
|
-
def sources=(sources)
|
98
|
-
@sources = sources&.map do |source|
|
99
|
-
ConceptSource.new(source)
|
100
|
-
end || []
|
101
|
-
end
|
102
|
-
|
103
|
-
def localizations=(localizations)
|
104
|
-
return unless localizations
|
105
|
-
|
106
|
-
@localizations = {}
|
107
|
-
|
108
|
-
localizations.each do |localized_concept|
|
109
|
-
unless localized_concept.is_a?(@localized_concept_class)
|
110
|
-
localized_concept = @localized_concept_class.new(
|
111
|
-
localized_concept["data"] || localized_concept,
|
112
|
-
)
|
113
|
-
end
|
114
|
-
|
115
|
-
add_l10n(localized_concept)
|
116
|
-
end
|
117
|
-
end
|
118
|
-
|
119
|
-
def localizations_hash
|
120
|
-
@localizations.map do |key, localized_concept|
|
121
|
-
[key, localized_concept.to_h]
|
122
|
-
end.to_h
|
123
|
-
end
|
107
|
+
attr_reader :localized_concepts
|
124
108
|
|
125
109
|
# Adds concept localization.
|
126
110
|
# @param localized_concept [LocalizedConcept]
|
127
111
|
def add_localization(localized_concept)
|
128
112
|
lang = localized_concept.language_code
|
129
|
-
@localized_concepts
|
113
|
+
@localized_concepts ||= {}
|
114
|
+
@localized_concepts[lang] =
|
115
|
+
@localized_concepts[lang] || localized_concept.uuid
|
130
116
|
localizations.store(lang, localized_concept)
|
131
117
|
end
|
132
|
-
|
133
118
|
alias :add_l10n :add_localization
|
134
119
|
|
135
120
|
# Returns concept localization.
|
136
121
|
# @param lang [String] language code
|
137
122
|
# @return [LocalizedConcept]
|
138
|
-
def localization(lang)
|
139
|
-
localizations[lang]
|
140
|
-
end
|
141
|
-
|
142
|
-
alias :l10n :localization
|
143
|
-
|
144
|
-
def to_h_no_uuid
|
145
|
-
{
|
146
|
-
"data" => {
|
147
|
-
"identifier" => id,
|
148
|
-
"localized_concepts" => localized_concepts.empty? ? nil : localized_concepts,
|
149
|
-
"groups" => groups,
|
150
|
-
"sources" => sources&.map(&:to_h),
|
151
|
-
}.compact,
|
152
|
-
"related" => related&.map(&:to_h),
|
153
|
-
"date_accepted" => date_accepted&.date,
|
154
|
-
"status" => status,
|
155
|
-
}.compact
|
156
|
-
end
|
157
|
-
|
158
|
-
def to_h
|
159
|
-
to_h_no_uuid.merge("id" => uuid)
|
160
|
-
end
|
161
|
-
|
162
123
|
def default_designation
|
163
124
|
localized = localization("eng") || localizations.values.first
|
164
125
|
terms = localized&.preferred_terms&.first || localized&.terms&.first
|
@@ -167,47 +128,13 @@ module Glossarist
|
|
167
128
|
|
168
129
|
def default_definition
|
169
130
|
localized = localization("eng") || localizations.values.first
|
170
|
-
localized&.definition&.first&.content
|
131
|
+
localized&.data&.definition&.first&.content
|
171
132
|
end
|
172
133
|
|
173
134
|
def default_lang
|
174
135
|
localization("eng") || localizations.values.first
|
175
136
|
end
|
176
137
|
|
177
|
-
def date_accepted=(date)
|
178
|
-
date_hash = {
|
179
|
-
"type" => "accepted",
|
180
|
-
"date" => date,
|
181
|
-
}
|
182
|
-
|
183
|
-
@dates ||= []
|
184
|
-
@dates << ConceptDate.new(date_hash)
|
185
|
-
end
|
186
|
-
|
187
|
-
def date_accepted
|
188
|
-
return nil unless @dates
|
189
|
-
@dates.find { |date| date.accepted? }
|
190
|
-
end
|
191
|
-
|
192
|
-
def managed_concept_attributes
|
193
|
-
%i[
|
194
|
-
data
|
195
|
-
id
|
196
|
-
identifier
|
197
|
-
uuid
|
198
|
-
related
|
199
|
-
status
|
200
|
-
dates
|
201
|
-
date_accepted
|
202
|
-
dateAccepted
|
203
|
-
localized_concepts
|
204
|
-
localizedConcepts
|
205
|
-
localizations
|
206
|
-
groups
|
207
|
-
sources
|
208
|
-
].compact
|
209
|
-
end
|
210
|
-
|
211
138
|
Glossarist::GlossaryDefinition::RELATED_CONCEPT_TYPES.each do |type|
|
212
139
|
# List of related concepts of the specified type.
|
213
140
|
# @return [Array<RelatedConcept>]
|
@@ -1,36 +1,23 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
1
|
module Glossarist
|
4
2
|
class ManagedConceptCollection
|
5
3
|
include Enumerable
|
6
4
|
|
5
|
+
attr_accessor :managed_concepts
|
6
|
+
|
7
7
|
def initialize
|
8
|
-
@managed_concepts =
|
8
|
+
@managed_concepts = []
|
9
9
|
@managed_concepts_ids = {}
|
10
10
|
@concept_manager = ConceptManager.new
|
11
11
|
end
|
12
12
|
|
13
|
-
# @return [Array<ManagedConcept>]
|
14
|
-
def managed_concepts
|
15
|
-
@managed_concepts.values
|
16
|
-
end
|
17
|
-
|
18
|
-
def managed_concepts=(managed_concepts = [])
|
19
|
-
managed_concepts.each do |managed_concept|
|
20
|
-
store(Config.class_for(:managed_concept).new(managed_concept))
|
21
|
-
end
|
22
|
-
|
23
|
-
@managed_concepts.values
|
24
|
-
end
|
25
|
-
|
26
13
|
def to_h
|
27
14
|
{
|
28
|
-
"managed_concepts" => managed_concepts.map(&:
|
15
|
+
"managed_concepts" => managed_concepts.map(&:to_yaml_hash),
|
29
16
|
}.compact
|
30
17
|
end
|
31
18
|
|
32
19
|
def each(&block)
|
33
|
-
@managed_concepts.
|
20
|
+
@managed_concepts.each(&block)
|
34
21
|
end
|
35
22
|
|
36
23
|
# Returns concept with given ID, if it is present in collection, or +nil+
|
@@ -40,9 +27,10 @@ module Glossarist
|
|
40
27
|
# ManagedConcept ID
|
41
28
|
# @return [ManagedConcept, nil]
|
42
29
|
def fetch(id)
|
43
|
-
@managed_concepts
|
30
|
+
@managed_concepts.find do |c|
|
31
|
+
c.uuid == id || c.uuid == @managed_concepts_ids[id]
|
32
|
+
end
|
44
33
|
end
|
45
|
-
|
46
34
|
alias :[] :fetch
|
47
35
|
|
48
36
|
# If ManagedConcept with given ID is present in this collection, then
|
@@ -53,7 +41,7 @@ module Glossarist
|
|
53
41
|
# ManagedConcept ID
|
54
42
|
# @return [ManagedConcept]
|
55
43
|
def fetch_or_initialize(id)
|
56
|
-
fetch(id) or store(Config.class_for(:managed_concept).
|
44
|
+
fetch(id) or store(Config.class_for(:managed_concept).of_yaml(data: { id: id }))
|
57
45
|
end
|
58
46
|
|
59
47
|
# Adds concept to the collection. If collection contains a concept with
|
@@ -62,12 +50,15 @@ module Glossarist
|
|
62
50
|
# @param managed_concept [ManagedConcept]
|
63
51
|
# ManagedConcept about to be added
|
64
52
|
def store(managed_concept)
|
65
|
-
@managed_concepts[
|
66
|
-
@
|
53
|
+
@managed_concepts ||= []
|
54
|
+
@managed_concepts << managed_concept
|
55
|
+
if managed_concept.data.id
|
56
|
+
@managed_concepts_ids[managed_concept.data.id] =
|
57
|
+
managed_concept.uuid
|
58
|
+
end
|
67
59
|
|
68
60
|
managed_concept
|
69
61
|
end
|
70
|
-
|
71
62
|
alias :<< :store
|
72
63
|
|
73
64
|
def load_from_files(path)
|
@@ -0,0 +1,47 @@
|
|
1
|
+
module Glossarist
|
2
|
+
class ManagedConceptData < Lutaml::Model::Serializable
|
3
|
+
include Glossarist::Utilities::CommonFunctions
|
4
|
+
|
5
|
+
attribute :id, :string
|
6
|
+
attribute :localized_concepts, :hash
|
7
|
+
attribute :groups, :string, collection: true
|
8
|
+
attribute :sources, ConceptSource, collection: true
|
9
|
+
attribute :localizations, :hash, collection: true, default: -> { {} }
|
10
|
+
|
11
|
+
yaml do
|
12
|
+
map %i[id identifier], to: :id,
|
13
|
+
with: { to: :id_to_yaml, from: :id_from_yaml }
|
14
|
+
map %i[localized_concepts localizedConcepts], to: :localized_concepts
|
15
|
+
map :groups, to: :groups
|
16
|
+
map :sources, to: :sources
|
17
|
+
map :localizations, to: :localizations,
|
18
|
+
with: { from: :localizations_from_yaml, to: :localizations_to_yaml }
|
19
|
+
end
|
20
|
+
|
21
|
+
def id_to_yaml(model, doc)
|
22
|
+
value = model.id || model.identifier
|
23
|
+
doc["identifier"] = value if value && !doc["identifier"]
|
24
|
+
end
|
25
|
+
|
26
|
+
def id_from_yaml(model, value)
|
27
|
+
model.id = value unless model.id
|
28
|
+
end
|
29
|
+
|
30
|
+
def localizations_from_yaml(model, value)
|
31
|
+
model.localizations ||= {}
|
32
|
+
|
33
|
+
value.each do |localized_concept_hash|
|
34
|
+
localized_concept = Glossarist::LocalizedConcept.of_yaml(localized_concept_hash)
|
35
|
+
model.localizations[localized_concept.language_code] = localized_concept
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
def localizations_to_yaml(model, doc); end
|
40
|
+
|
41
|
+
def authoritative_source
|
42
|
+
return [] unless sources
|
43
|
+
|
44
|
+
sources.select(&:authoritative?)
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
@@ -1,18 +1,15 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
1
|
module Glossarist
|
4
|
-
class NonVerbRep
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
# @return [Array<ConceptSource>]
|
10
|
-
attr_reader :sources
|
2
|
+
class NonVerbRep < Lutaml::Model::Serializable
|
3
|
+
attribute :image, :string
|
4
|
+
attribute :table, :string
|
5
|
+
attribute :formula, :string
|
6
|
+
attribute :sources, ConceptSource, collection: true
|
11
7
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
8
|
+
yaml do
|
9
|
+
map :image, to: :image
|
10
|
+
map :table, to: :table
|
11
|
+
map :formula, to: :formula
|
12
|
+
map :sources, to: :sources
|
16
13
|
end
|
17
14
|
end
|
18
15
|
end
|
@@ -1,31 +1,24 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module Glossarist
|
4
|
-
class RelatedConcept < Model
|
5
|
-
|
4
|
+
class RelatedConcept < Lutaml::Model::Serializable
|
5
|
+
attribute :content, :string
|
6
|
+
attribute :type, :string,
|
7
|
+
values: Glossarist::GlossaryDefinition::RELATED_CONCEPT_TYPES
|
8
|
+
attribute :ref, Citation
|
6
9
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
# Reference to the related concept.
|
13
|
-
# @return [Citation]
|
14
|
-
attr_reader :ref
|
15
|
-
|
16
|
-
def ref=(ref)
|
17
|
-
@ref = Citation.new(ref)
|
10
|
+
yaml do
|
11
|
+
map :content, to: :content
|
12
|
+
map :type, to: :type
|
13
|
+
map :ref, with: { from: :ref_from_yaml, to: :ref_to_yaml }
|
18
14
|
end
|
19
15
|
|
20
|
-
def
|
21
|
-
|
22
|
-
|
16
|
+
def ref_to_yaml(model, doc)
|
17
|
+
doc["ref"] = Citation.as_yaml(model.ref)["ref"] if model.ref
|
18
|
+
end
|
23
19
|
|
24
|
-
|
25
|
-
|
26
|
-
"content" => content,
|
27
|
-
"ref" => reference,
|
28
|
-
}.compact
|
20
|
+
def ref_from_yaml(model, value)
|
21
|
+
model.ref = Citation.of_yaml(value)
|
29
22
|
end
|
30
23
|
end
|
31
24
|
end
|
@@ -21,12 +21,13 @@ module Glossarist
|
|
21
21
|
#
|
22
22
|
# See RFC 4122 for details of UUID at: https://www.ietf.org/rfc/rfc4122.txt
|
23
23
|
def self.uuid_from_hash(hash_class, namespace, name)
|
24
|
-
if
|
24
|
+
if [Digest::MD5, OpenSSL::Digest::MD5].include?(hash_class)
|
25
25
|
version = 3
|
26
|
-
elsif
|
26
|
+
elsif [Digest::SHA1, OpenSSL::Digest::SHA1].include?(hash_class)
|
27
27
|
version = 5
|
28
28
|
else
|
29
|
-
raise ArgumentError,
|
29
|
+
raise ArgumentError,
|
30
|
+
"Expected OpenSSL::Digest::SHA1 or OpenSSL::Digest::MD5, got #{hash_class.name}."
|
30
31
|
end
|
31
32
|
|
32
33
|
uuid_namespace = pack_uuid_namespace(namespace)
|
@@ -58,12 +59,16 @@ module Glossarist
|
|
58
59
|
end
|
59
60
|
|
60
61
|
def self.pack_uuid_namespace(namespace)
|
61
|
-
if [DNS_NAMESPACE, OID_NAMESPACE, URL_NAMESPACE,
|
62
|
+
if [DNS_NAMESPACE, OID_NAMESPACE, URL_NAMESPACE,
|
63
|
+
X500_NAMESPACE].include?(namespace)
|
62
64
|
namespace
|
63
65
|
else
|
64
66
|
match_data = namespace.match(/\A(\h{8})-(\h{4})-(\h{4})-(\h{4})-(\h{4})(\h{8})\z/)
|
65
67
|
|
66
|
-
|
68
|
+
unless match_data.present?
|
69
|
+
raise ArgumentError,
|
70
|
+
"Only UUIDs are valid namespace identifiers"
|
71
|
+
end
|
67
72
|
|
68
73
|
match_data.captures.map { |s| s.to_i(16) }.pack("NnnnnN")
|
69
74
|
end
|
data/lib/glossarist/utilities.rb
CHANGED
data/lib/glossarist/version.rb
CHANGED
data/lib/glossarist.rb
CHANGED
@@ -5,28 +5,29 @@
|
|
5
5
|
|
6
6
|
require "psych"
|
7
7
|
require "thor"
|
8
|
+
require "lutaml/model"
|
8
9
|
|
9
10
|
require_relative "glossarist/utilities"
|
10
11
|
require_relative "glossarist/version"
|
11
12
|
require_relative "glossarist/glossary_definition"
|
12
13
|
|
14
|
+
require_relative "glossarist/designation"
|
13
15
|
require_relative "glossarist/asset"
|
14
|
-
require_relative "glossarist/model"
|
15
|
-
require_relative "glossarist/concept_date"
|
16
|
-
require_relative "glossarist/detailed_definition"
|
17
|
-
require_relative "glossarist/related_concept"
|
18
16
|
require_relative "glossarist/citation"
|
17
|
+
require_relative "glossarist/collection"
|
18
|
+
require_relative "glossarist/concept_date"
|
19
|
+
require_relative "glossarist/concept_manager"
|
19
20
|
require_relative "glossarist/concept_set"
|
20
21
|
require_relative "glossarist/concept_source"
|
21
|
-
require_relative "glossarist/
|
22
|
-
require_relative "glossarist/
|
22
|
+
require_relative "glossarist/detailed_definition"
|
23
|
+
require_relative "glossarist/related_concept"
|
24
|
+
require_relative "glossarist/concept_data"
|
23
25
|
require_relative "glossarist/concept"
|
24
26
|
require_relative "glossarist/localized_concept"
|
25
|
-
require_relative "glossarist/
|
26
|
-
require_relative "glossarist/concept_manager"
|
27
|
+
require_relative "glossarist/managed_concept_data"
|
27
28
|
require_relative "glossarist/managed_concept"
|
29
|
+
require_relative "glossarist/managed_concept_collection"
|
28
30
|
require_relative "glossarist/non_verb_rep"
|
29
|
-
require_relative "glossarist/v1_reader"
|
30
31
|
|
31
32
|
require_relative "glossarist/collections"
|
32
33
|
|
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: glossarist
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.3.
|
4
|
+
version: 2.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-02-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: lutaml-model
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0.6'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0.6'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: relaton
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -38,7 +52,7 @@ dependencies:
|
|
38
52
|
- - ">="
|
39
53
|
- !ruby/object:Gem::Version
|
40
54
|
version: '0'
|
41
|
-
description:
|
55
|
+
description:
|
42
56
|
email:
|
43
57
|
- open.source@ribose.com
|
44
58
|
executables:
|
@@ -53,6 +67,7 @@ files:
|
|
53
67
|
- ".hound.yml"
|
54
68
|
- ".rspec"
|
55
69
|
- ".rubocop.yml"
|
70
|
+
- ".rubocop_todo.yml"
|
56
71
|
- Gemfile
|
57
72
|
- LICENSE.txt
|
58
73
|
- README.adoc
|
@@ -70,6 +85,7 @@ files:
|
|
70
85
|
- lib/glossarist/collections/collection.rb
|
71
86
|
- lib/glossarist/collections/designation_collection.rb
|
72
87
|
- lib/glossarist/concept.rb
|
88
|
+
- lib/glossarist/concept_data.rb
|
73
89
|
- lib/glossarist/concept_date.rb
|
74
90
|
- lib/glossarist/concept_manager.rb
|
75
91
|
- lib/glossarist/concept_set.rb
|
@@ -92,18 +108,12 @@ files:
|
|
92
108
|
- lib/glossarist/localized_concept.rb
|
93
109
|
- lib/glossarist/managed_concept.rb
|
94
110
|
- lib/glossarist/managed_concept_collection.rb
|
95
|
-
- lib/glossarist/
|
111
|
+
- lib/glossarist/managed_concept_data.rb
|
96
112
|
- lib/glossarist/non_verb_rep.rb
|
97
113
|
- lib/glossarist/related_concept.rb
|
98
114
|
- lib/glossarist/utilities.rb
|
99
|
-
- lib/glossarist/utilities/boolean_attributes.rb
|
100
115
|
- lib/glossarist/utilities/common_functions.rb
|
101
|
-
- lib/glossarist/utilities/enum.rb
|
102
|
-
- lib/glossarist/utilities/enum/class_methods.rb
|
103
|
-
- lib/glossarist/utilities/enum/enum_collection.rb
|
104
|
-
- lib/glossarist/utilities/enum/instance_methods.rb
|
105
116
|
- lib/glossarist/utilities/uuid.rb
|
106
|
-
- lib/glossarist/v1_reader.rb
|
107
117
|
- lib/glossarist/version.rb
|
108
118
|
homepage: https://github.com/glossarist/glossarist-ruby
|
109
119
|
licenses:
|
@@ -112,7 +122,7 @@ metadata:
|
|
112
122
|
homepage_uri: https://github.com/glossarist/glossarist-ruby
|
113
123
|
source_code_uri: https://github.com/glossarist/glossarist-ruby
|
114
124
|
bug_tracker_uri: https://github.com/glossarist/glossarist-ruby/issues
|
115
|
-
post_install_message:
|
125
|
+
post_install_message:
|
116
126
|
rdoc_options: []
|
117
127
|
require_paths:
|
118
128
|
- lib
|
@@ -128,7 +138,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
128
138
|
version: '0'
|
129
139
|
requirements: []
|
130
140
|
rubygems_version: 3.3.27
|
131
|
-
signing_key:
|
141
|
+
signing_key:
|
132
142
|
specification_version: 4
|
133
143
|
summary: Concept models for terminology glossaries conforming ISO 10241-1.
|
134
144
|
test_files: []
|