glossarist 2.8.4 → 2.8.5
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_todo.yml +25 -361
- data/Gemfile +0 -1
- data/lib/glossarist/concept_reference.rb +4 -0
- data/lib/glossarist/concept_store.rb +0 -2
- data/lib/glossarist/dataset_register.rb +72 -0
- data/lib/glossarist/gcr_metadata.rb +8 -5
- data/lib/glossarist/gcr_package_definition.rb +0 -2
- data/lib/glossarist/glossary_store.rb +0 -3
- data/lib/glossarist/register_data.rb +4 -0
- data/lib/glossarist/section.rb +39 -0
- data/lib/glossarist/transforms/concept_to_gloss_transform.rb +1 -1
- data/lib/glossarist/version.rb +1 -1
- data/lib/glossarist.rb +3 -0
- metadata +4 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bb636339e439da216185715fcfe387842aabd1b38147dd49b5e4fdb5909b6d2d
|
|
4
|
+
data.tar.gz: 2704b81c1f4d179d8909bc1d245b9caee83d2e54fa56a6148699892f021e9d6f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5e39df7a02295426fb6463f93189cf6e3d457e60457b9bb5cde1881eeb549fe1afd4730e3ac280030be8de60734dbc2e0532b14030890e107b9df35dabbd1ede
|
|
7
|
+
data.tar.gz: 5e4ef4cf71118c020f29b105bb81bb19d753dcb9484f367d0a2caab0b51927e7bcf69e325549bb4e7f44f9f1ec571ffb4223710ca8cc7987dd10eb4750148514
|
data/.rubocop_todo.yml
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# This configuration was generated by
|
|
2
2
|
# `rubocop --auto-gen-config`
|
|
3
|
-
# on 2026-06-
|
|
3
|
+
# on 2026-06-04 14:04:56 UTC using RuboCop version 1.86.1.
|
|
4
4
|
# The point is for the user to remove these configuration records
|
|
5
5
|
# one by one as the offenses are removed from the code base.
|
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
|
@@ -11,171 +11,68 @@ Gemspec/RequiredRubyVersion:
|
|
|
11
11
|
Exclude:
|
|
12
12
|
- 'glossarist.gemspec'
|
|
13
13
|
|
|
14
|
-
# Offense count:
|
|
14
|
+
# Offense count: 6
|
|
15
15
|
# This cop supports safe autocorrection (--autocorrect).
|
|
16
16
|
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
|
17
17
|
# SupportedStyles: with_first_argument, with_fixed_indentation
|
|
18
18
|
Layout/ArgumentAlignment:
|
|
19
|
-
Enabled: false
|
|
20
|
-
|
|
21
|
-
# Offense count: 42
|
|
22
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
23
|
-
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
|
24
|
-
# SupportedStyles: with_first_element, with_fixed_indentation
|
|
25
|
-
Layout/ArrayAlignment:
|
|
26
19
|
Exclude:
|
|
27
|
-
- '
|
|
28
|
-
- 'spec/unit/rdf/ontology_conformance_spec.rb'
|
|
29
|
-
- 'spec/unit/rdf/rdf_view_classes_spec.rb'
|
|
30
|
-
- 'spec/unit/rdf/round_trip_spec.rb'
|
|
31
|
-
- 'spec/unit/tags_spec.rb'
|
|
32
|
-
- 'spec/unit/transforms/concept_to_gloss_transform_spec.rb'
|
|
20
|
+
- 'spec/unit/section_spec.rb'
|
|
33
21
|
|
|
34
|
-
# Offense count:
|
|
35
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
36
|
-
# Configuration parameters: IndentationWidth.
|
|
37
|
-
Layout/AssignmentIndentation:
|
|
38
|
-
Exclude:
|
|
39
|
-
- 'lib/glossarist/citation.rb'
|
|
40
|
-
|
|
41
|
-
# Offense count: 20
|
|
22
|
+
# Offense count: 3
|
|
42
23
|
# This cop supports safe autocorrection (--autocorrect).
|
|
43
24
|
# Configuration parameters: EnforcedStyleAlignWith.
|
|
44
25
|
# SupportedStylesAlignWith: either, start_of_block, start_of_line
|
|
45
26
|
Layout/BlockAlignment:
|
|
46
27
|
Exclude:
|
|
47
|
-
- '
|
|
48
|
-
- 'lib/glossarist/rdf/gloss_grammar_info.rb'
|
|
49
|
-
- 'lib/glossarist/rdf/gloss_non_verbal_rep.rb'
|
|
50
|
-
- 'lib/glossarist/rdf/gloss_pronunciation.rb'
|
|
51
|
-
- 'lib/glossarist/transforms/concept_to_gloss_transform.rb'
|
|
52
|
-
- 'lib/glossarist/validation/rules/locality_completeness_rule.rb'
|
|
53
|
-
- 'scripts/migrate_isotc204_to_v3.rb'
|
|
54
|
-
- 'scripts/migrate_isotc211_to_v3.rb'
|
|
55
|
-
- 'scripts/migrate_osgeo_to_v3.rb'
|
|
56
|
-
- 'spec/unit/concept_comparator_spec.rb'
|
|
57
|
-
- 'spec/unit/rdf/ontology_conformance_spec.rb'
|
|
58
|
-
- 'spec/unit/transforms/concept_to_gloss_transform_spec.rb'
|
|
28
|
+
- 'spec/unit/section_spec.rb'
|
|
59
29
|
|
|
60
|
-
# Offense count:
|
|
30
|
+
# Offense count: 3
|
|
61
31
|
# This cop supports safe autocorrection (--autocorrect).
|
|
62
32
|
Layout/BlockEndNewline:
|
|
63
33
|
Exclude:
|
|
64
|
-
- '
|
|
65
|
-
- 'lib/glossarist/rdf/gloss_grammar_info.rb'
|
|
66
|
-
- 'lib/glossarist/rdf/gloss_non_verbal_rep.rb'
|
|
67
|
-
- 'lib/glossarist/rdf/gloss_pronunciation.rb'
|
|
68
|
-
- 'lib/glossarist/transforms/concept_to_gloss_transform.rb'
|
|
69
|
-
- 'lib/glossarist/validation/rules/locality_completeness_rule.rb'
|
|
70
|
-
- 'scripts/migrate_isotc204_to_v3.rb'
|
|
71
|
-
- 'scripts/migrate_isotc211_to_v3.rb'
|
|
72
|
-
- 'scripts/migrate_osgeo_to_v3.rb'
|
|
73
|
-
- 'spec/unit/concept_comparator_spec.rb'
|
|
74
|
-
- 'spec/unit/rdf/ontology_conformance_spec.rb'
|
|
75
|
-
- 'spec/unit/transforms/concept_to_gloss_transform_spec.rb'
|
|
76
|
-
|
|
77
|
-
# Offense count: 16
|
|
78
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
79
|
-
Layout/ClosingParenthesisIndentation:
|
|
80
|
-
Exclude:
|
|
81
|
-
- 'lib/glossarist/transforms/concept_to_gloss_transform.rb'
|
|
82
|
-
- 'scripts/migrate_dataset.rb'
|
|
83
|
-
- 'spec/features/v2_serialization_spec.rb'
|
|
84
|
-
- 'spec/unit/rdf/round_trip_spec.rb'
|
|
85
|
-
- 'spec/unit/validation_result_spec.rb'
|
|
34
|
+
- 'spec/unit/section_spec.rb'
|
|
86
35
|
|
|
87
36
|
# Offense count: 1
|
|
88
37
|
# This cop supports safe autocorrection (--autocorrect).
|
|
89
|
-
Layout/ElseAlignment:
|
|
90
|
-
Exclude:
|
|
91
|
-
- 'lib/glossarist/cli/validate_command.rb'
|
|
92
|
-
|
|
93
|
-
# Offense count: 10
|
|
94
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
95
38
|
Layout/EmptyLineAfterGuardClause:
|
|
96
39
|
Exclude:
|
|
97
|
-
- 'lib/glossarist/
|
|
98
|
-
- 'lib/glossarist/register_data.rb'
|
|
99
|
-
- 'lib/glossarist/validation/rules/asciidoc_xref_rule.rb'
|
|
100
|
-
- 'lib/glossarist/validation/rules/date_type_rule.rb'
|
|
101
|
-
- 'lib/glossarist/validation/rules/image_reference_rule.rb'
|
|
102
|
-
- 'lib/glossarist/validation/rules/orphaned_bibliography_rule.rb'
|
|
103
|
-
- 'lib/glossarist/validation/rules/orphaned_images_rule.rb'
|
|
104
|
-
- 'scripts/migrate_dataset.rb'
|
|
105
|
-
- 'spec/unit/glossary_store_spec.rb'
|
|
40
|
+
- 'lib/glossarist/section.rb'
|
|
106
41
|
|
|
107
|
-
# Offense count:
|
|
108
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
109
|
-
# Configuration parameters: EnforcedStyleAlignWith.
|
|
110
|
-
# SupportedStylesAlignWith: keyword, variable, start_of_line
|
|
111
|
-
Layout/EndAlignment:
|
|
112
|
-
Exclude:
|
|
113
|
-
- 'lib/glossarist/cli/validate_command.rb'
|
|
114
|
-
- 'scripts/migrate_dataset.rb'
|
|
115
|
-
|
|
116
|
-
# Offense count: 3
|
|
42
|
+
# Offense count: 1
|
|
117
43
|
# This cop supports safe autocorrection (--autocorrect).
|
|
118
|
-
|
|
119
|
-
Layout/ExtraSpacing:
|
|
44
|
+
Layout/EmptyLines:
|
|
120
45
|
Exclude:
|
|
121
|
-
- '
|
|
122
|
-
- 'scripts/migrate_isotc211_to_v3.rb'
|
|
46
|
+
- 'Gemfile'
|
|
123
47
|
|
|
124
|
-
# Offense count:
|
|
125
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
126
|
-
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
|
127
|
-
# SupportedStyles: consistent, consistent_relative_to_receiver, special_for_inner_method_call, special_for_inner_method_call_in_parentheses
|
|
128
|
-
Layout/FirstArgumentIndentation:
|
|
129
|
-
Exclude:
|
|
130
|
-
- 'lib/glossarist/transforms/concept_to_gloss_transform.rb'
|
|
131
|
-
- 'scripts/migrate_dataset.rb'
|
|
132
|
-
- 'spec/features/v2_serialization_spec.rb'
|
|
133
|
-
- 'spec/unit/rdf/round_trip_spec.rb'
|
|
134
|
-
- 'spec/unit/validation_result_spec.rb'
|
|
135
|
-
|
|
136
|
-
# Offense count: 22
|
|
48
|
+
# Offense count: 2
|
|
137
49
|
# This cop supports safe autocorrection (--autocorrect).
|
|
138
50
|
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
|
139
51
|
# SupportedStyles: special_inside_parentheses, consistent, align_braces
|
|
140
52
|
Layout/FirstHashElementIndentation:
|
|
141
53
|
Exclude:
|
|
142
|
-
- '
|
|
143
|
-
- 'spec/unit/concept_comparator_spec.rb'
|
|
144
|
-
- 'spec/unit/glossary_store_spec.rb'
|
|
145
|
-
- 'spec/unit/schema_version_spec.rb'
|
|
146
|
-
- 'spec/unit/validation/rules/model_validity_rule_spec.rb'
|
|
54
|
+
- 'spec/unit/section_spec.rb'
|
|
147
55
|
|
|
148
|
-
# Offense count:
|
|
56
|
+
# Offense count: 8
|
|
149
57
|
# This cop supports safe autocorrection (--autocorrect).
|
|
150
58
|
# Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
|
|
151
59
|
# SupportedHashRocketStyles: key, separator, table
|
|
152
60
|
# SupportedColonStyles: key, separator, table
|
|
153
61
|
# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
|
|
154
62
|
Layout/HashAlignment:
|
|
155
|
-
|
|
63
|
+
Exclude:
|
|
64
|
+
- 'spec/unit/dataset_register_spec.rb'
|
|
65
|
+
- 'spec/unit/section_spec.rb'
|
|
156
66
|
|
|
157
|
-
# Offense count:
|
|
67
|
+
# Offense count: 6
|
|
158
68
|
# This cop supports safe autocorrection (--autocorrect).
|
|
159
69
|
# Configuration parameters: Width, EnforcedStyleAlignWith, AllowedPatterns.
|
|
160
70
|
# SupportedStylesAlignWith: start_of_line, relative_to_receiver
|
|
161
71
|
Layout/IndentationWidth:
|
|
162
72
|
Exclude:
|
|
163
|
-
- '
|
|
164
|
-
- 'lib/glossarist/rdf/gloss_designation.rb'
|
|
165
|
-
- 'lib/glossarist/rdf/gloss_grammar_info.rb'
|
|
166
|
-
- 'lib/glossarist/rdf/gloss_non_verbal_rep.rb'
|
|
167
|
-
- 'lib/glossarist/rdf/gloss_pronunciation.rb'
|
|
168
|
-
- 'lib/glossarist/transforms/concept_to_gloss_transform.rb'
|
|
169
|
-
- 'lib/glossarist/validation/rules/locality_completeness_rule.rb'
|
|
170
|
-
- 'scripts/migrate_dataset.rb'
|
|
171
|
-
- 'scripts/migrate_isotc204_to_v3.rb'
|
|
172
|
-
- 'scripts/migrate_isotc211_to_v3.rb'
|
|
173
|
-
- 'scripts/migrate_osgeo_to_v3.rb'
|
|
174
|
-
- 'spec/unit/concept_comparator_spec.rb'
|
|
175
|
-
- 'spec/unit/rdf/ontology_conformance_spec.rb'
|
|
176
|
-
- 'spec/unit/transforms/concept_to_gloss_transform_spec.rb'
|
|
73
|
+
- 'spec/unit/section_spec.rb'
|
|
177
74
|
|
|
178
|
-
# Offense count:
|
|
75
|
+
# Offense count: 424
|
|
179
76
|
# This cop supports safe autocorrection (--autocorrect).
|
|
180
77
|
# Configuration parameters: Max, AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, AllowRBSInlineAnnotation, AllowCopDirectives, AllowedPatterns, SplitStrings.
|
|
181
78
|
# URISchemes: http, https
|
|
@@ -184,57 +81,19 @@ Layout/LineLength:
|
|
|
184
81
|
|
|
185
82
|
# Offense count: 1
|
|
186
83
|
# This cop supports safe autocorrection (--autocorrect).
|
|
187
|
-
Layout/MultilineBlockLayout:
|
|
188
|
-
Exclude:
|
|
189
|
-
- 'spec/unit/concept_comparator_spec.rb'
|
|
190
|
-
|
|
191
|
-
# Offense count: 5
|
|
192
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
193
84
|
# Configuration parameters: EnforcedStyle.
|
|
194
85
|
# SupportedStyles: symmetrical, new_line, same_line
|
|
195
86
|
Layout/MultilineHashBraceLayout:
|
|
196
87
|
Exclude:
|
|
197
|
-
- 'spec/unit/
|
|
198
|
-
- 'spec/unit/schema_version_spec.rb'
|
|
199
|
-
- 'spec/unit/validation/rules/model_validity_rule_spec.rb'
|
|
200
|
-
|
|
201
|
-
# Offense count: 15
|
|
202
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
203
|
-
# Configuration parameters: EnforcedStyle.
|
|
204
|
-
# SupportedStyles: symmetrical, new_line, same_line
|
|
205
|
-
Layout/MultilineMethodCallBraceLayout:
|
|
206
|
-
Exclude:
|
|
207
|
-
- 'lib/glossarist/transforms/concept_to_gloss_transform.rb'
|
|
208
|
-
- 'scripts/migrate_dataset.rb'
|
|
209
|
-
- 'spec/unit/rdf/round_trip_spec.rb'
|
|
210
|
-
- 'spec/unit/validation_result_spec.rb'
|
|
88
|
+
- 'spec/unit/section_spec.rb'
|
|
211
89
|
|
|
212
|
-
# Offense count:
|
|
213
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
214
|
-
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
|
215
|
-
# SupportedStyles: aligned, indented
|
|
216
|
-
Layout/MultilineOperationIndentation:
|
|
217
|
-
Exclude:
|
|
218
|
-
- 'lib/glossarist/collections/bibliography_collection.rb'
|
|
219
|
-
|
|
220
|
-
# Offense count: 16
|
|
221
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
222
|
-
# Configuration parameters: EnforcedStyle.
|
|
223
|
-
# SupportedStyles: final_newline, final_blank_line
|
|
224
|
-
Layout/TrailingEmptyLines:
|
|
225
|
-
Enabled: false
|
|
226
|
-
|
|
227
|
-
# Offense count: 226
|
|
90
|
+
# Offense count: 7
|
|
228
91
|
# This cop supports safe autocorrection (--autocorrect).
|
|
229
92
|
# Configuration parameters: AllowInHeredoc.
|
|
230
93
|
Layout/TrailingWhitespace:
|
|
231
|
-
Enabled: false
|
|
232
|
-
|
|
233
|
-
# Offense count: 1
|
|
234
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
235
|
-
Lint/AmbiguousOperatorPrecedence:
|
|
236
94
|
Exclude:
|
|
237
|
-
- '
|
|
95
|
+
- 'spec/unit/dataset_register_spec.rb'
|
|
96
|
+
- 'spec/unit/section_spec.rb'
|
|
238
97
|
|
|
239
98
|
# Offense count: 1
|
|
240
99
|
# Configuration parameters: AllowedMethods.
|
|
@@ -249,34 +108,13 @@ Lint/DuplicateBranch:
|
|
|
249
108
|
Exclude:
|
|
250
109
|
- 'scripts/migrate_dataset.rb'
|
|
251
110
|
|
|
252
|
-
# Offense count: 4
|
|
253
|
-
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
254
|
-
Lint/RedundantDirGlobSort:
|
|
255
|
-
Exclude:
|
|
256
|
-
- 'spec/spec_helper.rb'
|
|
257
|
-
- 'spec/unit/rdf/ontology_conformance_spec.rb'
|
|
258
|
-
- 'spec/unit/rdf/round_trip_spec.rb'
|
|
259
|
-
|
|
260
111
|
# Offense count: 1
|
|
261
112
|
# This cop supports safe autocorrection (--autocorrect).
|
|
262
|
-
Lint/ScriptPermission:
|
|
263
|
-
Exclude:
|
|
264
|
-
- 'scripts/upgrade_dataset_to_v3.rb'
|
|
265
|
-
|
|
266
|
-
# Offense count: 2
|
|
267
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
268
113
|
# Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods, NotImplementedExceptions.
|
|
269
114
|
# NotImplementedExceptions: NotImplementedError
|
|
270
115
|
Lint/UnusedMethodArgument:
|
|
271
116
|
Exclude:
|
|
272
117
|
- 'lib/glossarist/dataset_validator.rb'
|
|
273
|
-
- 'scripts/migrate_dataset.rb'
|
|
274
|
-
|
|
275
|
-
# Offense count: 1
|
|
276
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
277
|
-
Lint/UselessAssignment:
|
|
278
|
-
Exclude:
|
|
279
|
-
- 'scripts/migrate_dataset.rb'
|
|
280
118
|
|
|
281
119
|
# Offense count: 85
|
|
282
120
|
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes, Max.
|
|
@@ -309,27 +147,6 @@ Metrics/ParameterLists:
|
|
|
309
147
|
Metrics/PerceivedComplexity:
|
|
310
148
|
Enabled: false
|
|
311
149
|
|
|
312
|
-
# Offense count: 18
|
|
313
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
314
|
-
# Configuration parameters: EnforcedStyle, BlockForwardingName.
|
|
315
|
-
# SupportedStyles: anonymous, explicit
|
|
316
|
-
Naming/BlockForwarding:
|
|
317
|
-
Exclude:
|
|
318
|
-
- 'lib/glossarist/collection.rb'
|
|
319
|
-
- 'lib/glossarist/collections/collection.rb'
|
|
320
|
-
- 'lib/glossarist/collections/localization_collection.rb'
|
|
321
|
-
- 'lib/glossarist/concept_collector.rb'
|
|
322
|
-
- 'lib/glossarist/managed_concept_collection.rb'
|
|
323
|
-
- 'lib/glossarist/validation/asset_index.rb'
|
|
324
|
-
|
|
325
|
-
# Offense count: 3
|
|
326
|
-
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
327
|
-
# Configuration parameters: EnforcedStyleForLeadingUnderscores.
|
|
328
|
-
# SupportedStylesForLeadingUnderscores: disallowed, required, optional
|
|
329
|
-
Naming/MemoizedInstanceVariableName:
|
|
330
|
-
Exclude:
|
|
331
|
-
- 'lib/glossarist/validation/rules/orphaned_images_rule.rb'
|
|
332
|
-
|
|
333
150
|
# Offense count: 6
|
|
334
151
|
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
|
|
335
152
|
# AllowedNames: as, at, by, cc, db, id, if, in, io, ip, of, on, os, pp, to
|
|
@@ -337,45 +154,7 @@ Naming/MethodParameterName:
|
|
|
337
154
|
Exclude:
|
|
338
155
|
- 'lib/glossarist/schema_migration.rb'
|
|
339
156
|
|
|
340
|
-
# Offense count: 1
|
|
341
|
-
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
342
|
-
# Configuration parameters: SafeMultiline.
|
|
343
|
-
Performance/DeletePrefix:
|
|
344
|
-
Exclude:
|
|
345
|
-
- 'lib/glossarist/validation/rules/filename_id_rule.rb'
|
|
346
|
-
|
|
347
|
-
# Offense count: 1
|
|
348
|
-
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
349
|
-
# Configuration parameters: SafeMultiline.
|
|
350
|
-
Performance/DeleteSuffix:
|
|
351
|
-
Exclude:
|
|
352
|
-
- 'lib/glossarist/validation/rules/filename_id_rule.rb'
|
|
353
|
-
|
|
354
157
|
# Offense count: 5
|
|
355
|
-
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
356
|
-
Performance/MapCompact:
|
|
357
|
-
Exclude:
|
|
358
|
-
- 'lib/glossarist/concept_set.rb'
|
|
359
|
-
- 'lib/glossarist/gcr_statistics.rb'
|
|
360
|
-
- 'lib/glossarist/schema_migration.rb'
|
|
361
|
-
- 'lib/glossarist/validation/rules/localization_consistency_rule.rb'
|
|
362
|
-
|
|
363
|
-
# Offense count: 16
|
|
364
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
365
|
-
# Configuration parameters: AllowOnlyRestArgument, UseAnonymousForwarding, RedundantRestArgumentNames, RedundantKeywordRestArgumentNames, RedundantBlockArgumentNames.
|
|
366
|
-
# RedundantRestArgumentNames: args, arguments
|
|
367
|
-
# RedundantKeywordRestArgumentNames: kwargs, options, opts
|
|
368
|
-
# RedundantBlockArgumentNames: blk, block, proc
|
|
369
|
-
Style/ArgumentsForwarding:
|
|
370
|
-
Exclude:
|
|
371
|
-
- 'lib/glossarist/collection.rb'
|
|
372
|
-
- 'lib/glossarist/collections/collection.rb'
|
|
373
|
-
- 'lib/glossarist/collections/localization_collection.rb'
|
|
374
|
-
- 'lib/glossarist/concept_collector.rb'
|
|
375
|
-
- 'lib/glossarist/managed_concept_collection.rb'
|
|
376
|
-
- 'lib/glossarist/validation/asset_index.rb'
|
|
377
|
-
|
|
378
|
-
# Offense count: 23
|
|
379
158
|
# This cop supports safe autocorrection (--autocorrect).
|
|
380
159
|
# Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, AllowedMethods, AllowedPatterns, AllowBracesOnProceduralOneLiners, BracesRequiredMethods.
|
|
381
160
|
# SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces
|
|
@@ -384,17 +163,7 @@ Style/ArgumentsForwarding:
|
|
|
384
163
|
# AllowedMethods: lambda, proc, it
|
|
385
164
|
Style/BlockDelimiters:
|
|
386
165
|
Exclude:
|
|
387
|
-
- '
|
|
388
|
-
- 'lib/glossarist/rdf/gloss_grammar_info.rb'
|
|
389
|
-
- 'lib/glossarist/rdf/gloss_non_verbal_rep.rb'
|
|
390
|
-
- 'lib/glossarist/rdf/gloss_pronunciation.rb'
|
|
391
|
-
- 'lib/glossarist/transforms/concept_to_gloss_transform.rb'
|
|
392
|
-
- 'lib/glossarist/validation/rules/locality_completeness_rule.rb'
|
|
393
|
-
- 'scripts/migrate_isotc204_to_v3.rb'
|
|
394
|
-
- 'scripts/migrate_isotc211_to_v3.rb'
|
|
395
|
-
- 'scripts/migrate_osgeo_to_v3.rb'
|
|
396
|
-
- 'spec/unit/rdf/ontology_conformance_spec.rb'
|
|
397
|
-
- 'spec/unit/transforms/concept_to_gloss_transform_spec.rb'
|
|
166
|
+
- 'spec/unit/section_spec.rb'
|
|
398
167
|
|
|
399
168
|
# Offense count: 6
|
|
400
169
|
# This cop supports safe autocorrection (--autocorrect).
|
|
@@ -403,89 +172,12 @@ Style/BlockDelimiters:
|
|
|
403
172
|
Style/FormatStringToken:
|
|
404
173
|
EnforcedStyle: unannotated
|
|
405
174
|
|
|
406
|
-
# Offense count: 2
|
|
407
|
-
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
408
|
-
# Configuration parameters: AllowedReceivers.
|
|
409
|
-
# AllowedReceivers: Thread.current
|
|
410
|
-
Style/HashEachMethods:
|
|
411
|
-
Exclude:
|
|
412
|
-
- 'lib/glossarist/validation/rules/model_validity_rule.rb'
|
|
413
|
-
- 'lib/glossarist/validation/rules/related_concept_cycle_rule.rb'
|
|
414
|
-
|
|
415
175
|
# Offense count: 2
|
|
416
176
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
417
177
|
Style/IdenticalConditionalBranches:
|
|
418
178
|
Exclude:
|
|
419
179
|
- 'scripts/migrate_dataset.rb'
|
|
420
180
|
|
|
421
|
-
# Offense count: 1
|
|
422
|
-
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
423
|
-
Style/MapToHash:
|
|
424
|
-
Exclude:
|
|
425
|
-
- 'lib/glossarist/concept_set.rb'
|
|
426
|
-
|
|
427
|
-
# Offense count: 1
|
|
428
|
-
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
429
|
-
Style/MapToSet:
|
|
430
|
-
Exclude:
|
|
431
|
-
- 'scripts/migrate_dataset.rb'
|
|
432
|
-
|
|
433
|
-
# Offense count: 6
|
|
434
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
435
|
-
Style/MultilineIfModifier:
|
|
436
|
-
Exclude:
|
|
437
|
-
- 'lib/glossarist/citation.rb'
|
|
438
|
-
- 'lib/glossarist/cli/validate_command.rb'
|
|
439
|
-
- 'lib/glossarist/schema_migration.rb'
|
|
440
|
-
|
|
441
|
-
# Offense count: 2
|
|
442
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
443
|
-
Style/MultilineTernaryOperator:
|
|
444
|
-
Exclude:
|
|
445
|
-
- 'lib/glossarist/cli/validate_command.rb'
|
|
446
|
-
|
|
447
|
-
# Offense count: 1
|
|
448
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
449
|
-
# Configuration parameters: AllowMethodComparison, ComparisonsThreshold.
|
|
450
|
-
Style/MultipleComparison:
|
|
451
|
-
Exclude:
|
|
452
|
-
- 'lib/glossarist/glossary_store.rb'
|
|
453
|
-
|
|
454
|
-
# Offense count: 6
|
|
455
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
456
|
-
Style/RedundantFreeze:
|
|
457
|
-
Exclude:
|
|
458
|
-
- 'lib/glossarist/schema_migration.rb'
|
|
459
|
-
- 'lib/glossarist/validation/rules/domain_target_rule.rb'
|
|
460
|
-
- 'lib/glossarist/validation/rules/related_concept_target_rule.rb'
|
|
461
|
-
- 'lib/glossarist/validation/rules/source_urn_format_rule.rb'
|
|
462
|
-
- 'lib/glossarist/validation/rules/uuid_format_rule.rb'
|
|
463
|
-
|
|
464
|
-
# Offense count: 2
|
|
465
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
466
|
-
Style/RedundantParentheses:
|
|
467
|
-
Exclude:
|
|
468
|
-
- 'lib/glossarist/validation/rules/date_type_rule.rb'
|
|
469
|
-
- 'lib/glossarist/validation/rules/date_validity_rule.rb'
|
|
470
|
-
|
|
471
|
-
# Offense count: 4
|
|
472
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
473
|
-
Style/RedundantRegexpCharacterClass:
|
|
474
|
-
Exclude:
|
|
475
|
-
- 'scripts/migrate_isotc211_to_v3.rb'
|
|
476
|
-
- 'scripts/migrate_osgeo_to_v3.rb'
|
|
477
|
-
|
|
478
|
-
# Offense count: 4
|
|
479
|
-
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
480
|
-
# Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods, MaxChainLength.
|
|
481
|
-
# AllowedMethods: present?, blank?, presence, try, try!
|
|
482
|
-
Style/SafeNavigation:
|
|
483
|
-
Exclude:
|
|
484
|
-
- 'lib/glossarist/validation/rules/concept_count_rule.rb'
|
|
485
|
-
- 'lib/glossarist/validation/rules/date_type_rule.rb'
|
|
486
|
-
- 'lib/glossarist/validation/rules/related_concept_symmetry_rule.rb'
|
|
487
|
-
- 'lib/glossarist/validation/rules/source_urn_format_rule.rb'
|
|
488
|
-
|
|
489
181
|
# Offense count: 3
|
|
490
182
|
# Configuration parameters: Max.
|
|
491
183
|
Style/SafeNavigationChainLength:
|
|
@@ -493,31 +185,3 @@ Style/SafeNavigationChainLength:
|
|
|
493
185
|
- 'lib/glossarist/managed_concept.rb'
|
|
494
186
|
- 'lib/glossarist/transforms/concept_to_tbx_transform.rb'
|
|
495
187
|
- 'lib/glossarist/validation/rules/source_urn_format_rule.rb'
|
|
496
|
-
|
|
497
|
-
# Offense count: 1
|
|
498
|
-
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
499
|
-
Style/SingleArgumentDig:
|
|
500
|
-
Exclude:
|
|
501
|
-
- 'spec/unit/register_data_spec.rb'
|
|
502
|
-
|
|
503
|
-
# Offense count: 2
|
|
504
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
505
|
-
# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
|
|
506
|
-
# SupportedStyles: single_quotes, double_quotes
|
|
507
|
-
Style/StringLiterals:
|
|
508
|
-
Exclude:
|
|
509
|
-
- 'lib/glossarist/validation/rules/filename_id_rule.rb'
|
|
510
|
-
|
|
511
|
-
# Offense count: 48
|
|
512
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
513
|
-
# Configuration parameters: EnforcedStyleForMultiline.
|
|
514
|
-
# SupportedStylesForMultiline: comma, consistent_comma, diff_comma, no_comma
|
|
515
|
-
Style/TrailingCommaInArguments:
|
|
516
|
-
Enabled: false
|
|
517
|
-
|
|
518
|
-
# Offense count: 3
|
|
519
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
520
|
-
Style/YAMLFileRead:
|
|
521
|
-
Exclude:
|
|
522
|
-
- 'spec/unit/rdf/ontology_conformance_spec.rb'
|
|
523
|
-
- 'spec/unit/rdf/round_trip_spec.rb'
|
data/Gemfile
CHANGED
|
@@ -26,6 +26,10 @@ module Glossarist
|
|
|
26
26
|
new(concept_id: concept_id, ref_type: "domain")
|
|
27
27
|
end
|
|
28
28
|
|
|
29
|
+
def self.section(concept_id)
|
|
30
|
+
new(concept_id: concept_id, ref_type: "section")
|
|
31
|
+
end
|
|
32
|
+
|
|
29
33
|
def local?
|
|
30
34
|
%w[local designation].include?(ref_type) ||
|
|
31
35
|
(ref_type.nil? && (source.nil? || source.empty?))
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Glossarist
|
|
4
|
+
class DatasetRegister < Lutaml::Model::Serializable
|
|
5
|
+
attribute :schema_type, :string, default: -> { "glossarist" }
|
|
6
|
+
attribute :schema_version, :string, default: -> { "3" }
|
|
7
|
+
attribute :id, :string
|
|
8
|
+
attribute :ref, :string
|
|
9
|
+
attribute :year, :integer
|
|
10
|
+
attribute :urn, :string
|
|
11
|
+
attribute :urn_aliases, :string, collection: true
|
|
12
|
+
attribute :ref_aliases, :string, collection: true
|
|
13
|
+
attribute :status, :string
|
|
14
|
+
attribute :supersedes, :string
|
|
15
|
+
attribute :owner, :string
|
|
16
|
+
attribute :source_repo, :string
|
|
17
|
+
attribute :tags, :string, collection: true
|
|
18
|
+
attribute :languages, :string, collection: true
|
|
19
|
+
attribute :language_order, :string, collection: true
|
|
20
|
+
attribute :ordering, :string
|
|
21
|
+
attribute :sections, Section, collection: true
|
|
22
|
+
attribute :description, :hash
|
|
23
|
+
attribute :about, :hash
|
|
24
|
+
attribute :logo, :string
|
|
25
|
+
|
|
26
|
+
key_value do
|
|
27
|
+
map "schema_type", to: :schema_type
|
|
28
|
+
map "schema_version", to: :schema_version
|
|
29
|
+
map "id", to: :id
|
|
30
|
+
map "ref", to: :ref
|
|
31
|
+
map "year", to: :year
|
|
32
|
+
map "urn", to: :urn
|
|
33
|
+
map "urnAliases", to: :urn_aliases
|
|
34
|
+
map "refAliases", to: :ref_aliases
|
|
35
|
+
map "status", to: :status
|
|
36
|
+
map "supersedes", to: :supersedes
|
|
37
|
+
map "owner", to: :owner
|
|
38
|
+
map "sourceRepo", to: :source_repo
|
|
39
|
+
map "tags", to: :tags
|
|
40
|
+
map "languages", to: :languages
|
|
41
|
+
map "languageOrder", to: :language_order
|
|
42
|
+
map "ordering", to: :ordering
|
|
43
|
+
map "sections", to: :sections
|
|
44
|
+
map "description", to: :description
|
|
45
|
+
map "about", to: :about
|
|
46
|
+
map "logo", to: :logo
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
def section_by_id(target_id)
|
|
50
|
+
sections&.each do |section|
|
|
51
|
+
return section if section.id == target_id
|
|
52
|
+
|
|
53
|
+
found = section.descendant_by_id(target_id)
|
|
54
|
+
return found if found
|
|
55
|
+
end
|
|
56
|
+
nil
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
def self.from_file(path)
|
|
60
|
+
return nil unless File.exist?(path)
|
|
61
|
+
|
|
62
|
+
from_yaml(File.read(path, encoding: "utf-8"))
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
def self.from_directory(dir)
|
|
66
|
+
register_path = File.join(dir, "register.yaml")
|
|
67
|
+
return nil unless File.exist?(register_path)
|
|
68
|
+
|
|
69
|
+
from_file(register_path)
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
end
|
|
@@ -21,6 +21,7 @@ module Glossarist
|
|
|
21
21
|
attribute :concept_uri_template, :string
|
|
22
22
|
attribute :compiled_formats, :string, collection: true
|
|
23
23
|
attribute :external_references, :hash, collection: true
|
|
24
|
+
attribute :translations, :hash, default: -> { {} }
|
|
24
25
|
|
|
25
26
|
key_value do
|
|
26
27
|
map :shortname, to: :shortname
|
|
@@ -42,28 +43,30 @@ module Glossarist
|
|
|
42
43
|
map :concept_uri_template, to: :concept_uri_template
|
|
43
44
|
map :compiled_formats, to: :compiled_formats
|
|
44
45
|
map :external_references, to: :external_references
|
|
46
|
+
map :translations, to: :translations
|
|
45
47
|
end
|
|
46
48
|
|
|
47
49
|
def self.from_concepts(concepts, register_data: nil, options: {})
|
|
48
50
|
stats = GcrStatistics.from_concepts(concepts)
|
|
49
51
|
rd = register_data
|
|
50
52
|
new(
|
|
51
|
-
shortname: options[:shortname] || rd&.
|
|
52
|
-
version: options[:version] || rd&.
|
|
53
|
-
title: options[:title] || rd&.
|
|
54
|
-
description: options[:description] || rd&.
|
|
53
|
+
shortname: options[:shortname] || rd&.shortname,
|
|
54
|
+
version: options[:version] || rd&.version,
|
|
55
|
+
title: options[:title] || rd&.name,
|
|
56
|
+
description: options[:description] || rd&.description,
|
|
55
57
|
owner: options[:owner],
|
|
56
58
|
tags: options[:tags] || [],
|
|
57
59
|
concept_count: concepts.length,
|
|
58
60
|
languages: stats.languages,
|
|
59
61
|
created_at: Time.now.utc.iso8601,
|
|
60
62
|
glossarist_version: Glossarist::VERSION,
|
|
61
|
-
schema_version: rd&.
|
|
63
|
+
schema_version: rd&.schema_version || SchemaMigration::CURRENT_SCHEMA_VERSION,
|
|
62
64
|
statistics: stats,
|
|
63
65
|
uri_prefix: options[:uri_prefix],
|
|
64
66
|
concept_uri_template: options[:concept_uri_template],
|
|
65
67
|
compiled_formats: options[:compiled_formats] || [],
|
|
66
68
|
external_references: derive_external_references(concepts),
|
|
69
|
+
translations: rd&.translations || {},
|
|
67
70
|
)
|
|
68
71
|
end
|
|
69
72
|
|
|
@@ -17,6 +17,7 @@ module Glossarist
|
|
|
17
17
|
attribute :repository, :string
|
|
18
18
|
attribute :license, :string
|
|
19
19
|
attribute :tags, :string, collection: true
|
|
20
|
+
attribute :translations, :hash, default: -> { {} }
|
|
20
21
|
|
|
21
22
|
key_value do
|
|
22
23
|
map %i[id shortname], to: :shortname
|
|
@@ -33,6 +34,7 @@ module Glossarist
|
|
|
33
34
|
map "repository", to: :repository
|
|
34
35
|
map "license", to: :license
|
|
35
36
|
map "tags", to: :tags
|
|
37
|
+
map "translations", to: :translations
|
|
36
38
|
end
|
|
37
39
|
|
|
38
40
|
def [](key)
|
|
@@ -51,6 +53,7 @@ module Glossarist
|
|
|
51
53
|
when "repository" then repository
|
|
52
54
|
when "license" then license
|
|
53
55
|
when "tags" then tags
|
|
56
|
+
when "translations" then translations
|
|
54
57
|
end
|
|
55
58
|
end
|
|
56
59
|
|
|
@@ -77,6 +80,7 @@ module Glossarist
|
|
|
77
80
|
h["repository"] = repository if repository
|
|
78
81
|
h["license"] = license if license
|
|
79
82
|
h["tags"] = tags if tags && !tags.empty?
|
|
83
|
+
h["translations"] = translations if translations && !translations.empty?
|
|
80
84
|
h
|
|
81
85
|
end
|
|
82
86
|
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Glossarist
|
|
4
|
+
class Section < Lutaml::Model::Serializable
|
|
5
|
+
attribute :id, :string
|
|
6
|
+
attribute :names, :hash
|
|
7
|
+
attribute :ordering, :string
|
|
8
|
+
attribute :children, Section, collection: true
|
|
9
|
+
|
|
10
|
+
key_value do
|
|
11
|
+
map :id, to: :id
|
|
12
|
+
map :names, to: :names
|
|
13
|
+
map :ordering, to: :ordering
|
|
14
|
+
map :children, to: :children
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def name(lang = nil)
|
|
18
|
+
return names&.dig("eng") if lang.nil?
|
|
19
|
+
|
|
20
|
+
names&.dig(lang) || names&.dig("eng")
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def descendant_by_id(target_id)
|
|
24
|
+
children&.each do |child|
|
|
25
|
+
return child if child.id == target_id
|
|
26
|
+
|
|
27
|
+
found = child.descendant_by_id(target_id)
|
|
28
|
+
return found if found
|
|
29
|
+
end
|
|
30
|
+
nil
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def self.from_file(path)
|
|
34
|
+
return nil unless File.exist?(path)
|
|
35
|
+
|
|
36
|
+
from_yaml(File.read(path, encoding: "utf-8"))
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
@@ -155,7 +155,7 @@ module Glossarist
|
|
|
155
155
|
Rdf::RelationshipPredicates::DESIGNATION_REL_PREDICATES,
|
|
156
156
|
)
|
|
157
157
|
rel_targets.each do |attr_name, targets|
|
|
158
|
-
instance.
|
|
158
|
+
instance.public_send(:"#{attr_name}=", targets) unless targets.empty?
|
|
159
159
|
end
|
|
160
160
|
instance
|
|
161
161
|
end
|
data/lib/glossarist/version.rb
CHANGED
data/lib/glossarist.rb
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
require "psych"
|
|
7
7
|
require "thor"
|
|
8
8
|
require "lutaml/model"
|
|
9
|
+
require "lutaml/store"
|
|
9
10
|
|
|
10
11
|
module Glossarist
|
|
11
12
|
autoload :Asset, "glossarist/asset"
|
|
@@ -71,6 +72,8 @@ module Glossarist
|
|
|
71
72
|
autoload :Utilities, "glossarist/utilities"
|
|
72
73
|
autoload :Validation, "glossarist/validation"
|
|
73
74
|
autoload :RegisterData, "glossarist/register_data"
|
|
75
|
+
autoload :Section, "glossarist/section"
|
|
76
|
+
autoload :DatasetRegister, "glossarist/dataset_register"
|
|
74
77
|
autoload :ValidationResult, "glossarist/validation_result"
|
|
75
78
|
autoload :V1, "glossarist/v1"
|
|
76
79
|
autoload :V2, "glossarist/v2"
|
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.8.
|
|
4
|
+
version: 2.8.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-06-
|
|
11
|
+
date: 2026-06-04 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: lutaml-model
|
|
@@ -216,6 +216,7 @@ files:
|
|
|
216
216
|
- lib/glossarist/config.rb
|
|
217
217
|
- lib/glossarist/context_configuration.rb
|
|
218
218
|
- lib/glossarist/custom_locality.rb
|
|
219
|
+
- lib/glossarist/dataset_register.rb
|
|
219
220
|
- lib/glossarist/dataset_validator.rb
|
|
220
221
|
- lib/glossarist/designation.rb
|
|
221
222
|
- lib/glossarist/designation/abbreviation.rb
|
|
@@ -284,6 +285,7 @@ files:
|
|
|
284
285
|
- lib/glossarist/resolution_adapter/remote.rb
|
|
285
286
|
- lib/glossarist/resolution_adapter/route.rb
|
|
286
287
|
- lib/glossarist/schema_migration.rb
|
|
288
|
+
- lib/glossarist/section.rb
|
|
287
289
|
- lib/glossarist/sts.rb
|
|
288
290
|
- lib/glossarist/sts/extracted_designation.rb
|
|
289
291
|
- lib/glossarist/sts/extracted_lang_set.rb
|