glossarist 2.8.2 → 2.8.4
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 +413 -63
- data/Gemfile +1 -0
- data/glossarist.gemspec +1 -1
- data/lib/glossarist/bibliography_data.rb +41 -0
- data/lib/glossarist/bibliography_entry.rb +13 -0
- data/lib/glossarist/citation.rb +8 -2
- data/lib/glossarist/cli/export_command.rb +10 -5
- data/lib/glossarist/cli/validate_command.rb +21 -5
- data/lib/glossarist/collection.rb +2 -2
- data/lib/glossarist/collections/bibliography_collection.rb +2 -1
- data/lib/glossarist/collections/collection.rb +2 -2
- data/lib/glossarist/collections/localization_collection.rb +4 -4
- data/lib/glossarist/concept_collector.rb +6 -6
- data/lib/glossarist/concept_document.rb +2 -1
- data/lib/glossarist/concept_manager.rb +6 -7
- data/lib/glossarist/concept_set.rb +4 -4
- data/lib/glossarist/concept_store.rb +38 -48
- data/lib/glossarist/dataset_validator.rb +2 -1
- data/lib/glossarist/gcr_package_definition.rb +37 -0
- data/lib/glossarist/gcr_statistics.rb +2 -2
- data/lib/glossarist/glossary_definition.rb +1 -1
- data/lib/glossarist/glossary_store.rb +201 -0
- data/lib/glossarist/managed_concept_collection.rb +2 -2
- data/lib/glossarist/rdf/gloss_citation.rb +8 -4
- data/lib/glossarist/rdf/gloss_concept.rb +6 -3
- data/lib/glossarist/rdf/gloss_concept_date.rb +4 -2
- data/lib/glossarist/rdf/gloss_concept_reference.rb +6 -3
- data/lib/glossarist/rdf/gloss_concept_source.rb +6 -3
- data/lib/glossarist/rdf/gloss_designation.rb +56 -25
- data/lib/glossarist/rdf/gloss_grammar_info.rb +19 -9
- data/lib/glossarist/rdf/gloss_locality.rb +6 -3
- data/lib/glossarist/rdf/gloss_localized_concept.rb +14 -7
- data/lib/glossarist/rdf/gloss_non_verbal_rep.rb +9 -4
- data/lib/glossarist/rdf/gloss_pronunciation.rb +13 -6
- data/lib/glossarist/rdf/gloss_reference.rb +8 -4
- data/lib/glossarist/rdf/namespaces.rb +3 -2
- data/lib/glossarist/rdf/relationship_predicates.rb +14 -7
- data/lib/glossarist/rdf.rb +2 -1
- data/lib/glossarist/register_data.rb +68 -18
- data/lib/glossarist/schema_migration.rb +8 -5
- data/lib/glossarist/transforms/concept_to_gloss_transform.rb +23 -10
- data/lib/glossarist/v2/concept_data.rb +2 -1
- data/lib/glossarist/v2/concept_document.rb +1 -1
- data/lib/glossarist/v3/concept_data.rb +2 -1
- data/lib/glossarist/v3/concept_document.rb +1 -1
- data/lib/glossarist/validation/asset_index.rb +2 -2
- data/lib/glossarist/validation/bibliography_index.rb +2 -1
- data/lib/glossarist/validation/rules/asciidoc_xref_rule.rb +2 -1
- data/lib/glossarist/validation/rules/authoritative_source_rule.rb +1 -1
- data/lib/glossarist/validation/rules/bibliography_yaml_rule.rb +1 -1
- data/lib/glossarist/validation/rules/citation_completeness_rule.rb +1 -1
- data/lib/glossarist/validation/rules/concept_count_rule.rb +2 -3
- data/lib/glossarist/validation/rules/concept_id_rule.rb +0 -1
- data/lib/glossarist/validation/rules/concept_id_uniqueness_rule.rb +0 -1
- data/lib/glossarist/validation/rules/concept_mention_rule.rb +1 -2
- data/lib/glossarist/validation/rules/concept_status_rule.rb +1 -2
- data/lib/glossarist/validation/rules/concept_uri_rule.rb +1 -1
- data/lib/glossarist/validation/rules/date_type_rule.rb +5 -3
- data/lib/glossarist/validation/rules/date_validity_rule.rb +1 -1
- data/lib/glossarist/validation/rules/definition_content_rule.rb +1 -2
- data/lib/glossarist/validation/rules/domain_target_rule.rb +1 -1
- data/lib/glossarist/validation/rules/duplicate_term_rule.rb +1 -2
- data/lib/glossarist/validation/rules/entry_status_rule.rb +1 -2
- data/lib/glossarist/validation/rules/filename_id_rule.rb +2 -3
- data/lib/glossarist/validation/rules/image_reference_rule.rb +3 -2
- data/lib/glossarist/validation/rules/l10n_uuid_integrity_rule.rb +1 -2
- data/lib/glossarist/validation/rules/language_coverage_rule.rb +1 -2
- data/lib/glossarist/validation/rules/language_list_rule.rb +2 -3
- data/lib/glossarist/validation/rules/locality_completeness_rule.rb +3 -1
- data/lib/glossarist/validation/rules/localization_consistency_rule.rb +1 -1
- data/lib/glossarist/validation/rules/localization_presence_rule.rb +0 -1
- data/lib/glossarist/validation/rules/model_validity_rule.rb +1 -1
- data/lib/glossarist/validation/rules/orphaned_bibliography_rule.rb +2 -1
- data/lib/glossarist/validation/rules/orphaned_images_rule.rb +6 -4
- data/lib/glossarist/validation/rules/orphaned_l10n_files_rule.rb +1 -2
- data/lib/glossarist/validation/rules/preferred_term_rule.rb +1 -2
- data/lib/glossarist/validation/rules/related_concept_cycle_rule.rb +2 -2
- data/lib/glossarist/validation/rules/related_concept_rule.rb +1 -2
- data/lib/glossarist/validation/rules/related_concept_symmetry_rule.rb +1 -1
- data/lib/glossarist/validation/rules/related_concept_target_rule.rb +1 -1
- data/lib/glossarist/validation/rules/source_type_rule.rb +2 -2
- data/lib/glossarist/validation/rules/source_urn_format_rule.rb +2 -2
- data/lib/glossarist/validation/rules/terms_presence_rule.rb +1 -1
- data/lib/glossarist/validation/rules/uuid_format_rule.rb +1 -1
- data/lib/glossarist/version.rb +1 -1
- data/lib/glossarist.rb +4 -0
- data/scripts/migrate_dataset.rb +14 -8
- data/scripts/migrate_isotc204_to_v3.rb +3 -1
- data/scripts/migrate_isotc211_to_v3.rb +5 -3
- data/scripts/migrate_osgeo_to_v3.rb +4 -2
- data/scripts/upgrade_dataset_to_v3.rb +0 -0
- metadata +13 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 89c7a717dae1507460851447c6a4d30699ef02c7eef890ed4c58da9ec14bda8a
|
|
4
|
+
data.tar.gz: 629d99f655aeee99db137139ee6f49173f5bf26d56c7452c035f63c56af7d961
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: de839b4b877b200bd870fb57d438491ac4e8f8ecfbf5a99c68c40abec4bad695071cdef108e626b28913329839ea49587973b43a80a7896d98f65e8fb6ac064b
|
|
7
|
+
data.tar.gz: 3ec787b9b02f6febf1c19475986842731bd9e831f753c10258b7bb0b10ee04b36aaa04b4b07297f994e91dc72df929f4585a6abf451da469a5bf3906dd127564
|
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-
|
|
3
|
+
# on 2026-06-03 01:34:20 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,63 +11,230 @@ Gemspec/RequiredRubyVersion:
|
|
|
11
11
|
Exclude:
|
|
12
12
|
- 'glossarist.gemspec'
|
|
13
13
|
|
|
14
|
-
# Offense count:
|
|
14
|
+
# Offense count: 166
|
|
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:
|
|
19
26
|
Exclude:
|
|
20
|
-
- 'lib/glossarist/
|
|
21
|
-
- 'spec/unit/
|
|
27
|
+
- 'lib/glossarist/rdf/relationship_predicates.rb'
|
|
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'
|
|
22
33
|
|
|
23
|
-
# Offense count:
|
|
34
|
+
# Offense count: 2
|
|
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
|
|
24
42
|
# This cop supports safe autocorrection (--autocorrect).
|
|
25
43
|
# Configuration parameters: EnforcedStyleAlignWith.
|
|
26
44
|
# SupportedStylesAlignWith: either, start_of_block, start_of_line
|
|
27
45
|
Layout/BlockAlignment:
|
|
28
46
|
Exclude:
|
|
29
|
-
- '
|
|
47
|
+
- 'lib/glossarist/rdf/gloss_designation.rb'
|
|
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'
|
|
30
59
|
|
|
31
|
-
# Offense count:
|
|
60
|
+
# Offense count: 19
|
|
32
61
|
# This cop supports safe autocorrection (--autocorrect).
|
|
33
62
|
Layout/BlockEndNewline:
|
|
34
63
|
Exclude:
|
|
35
|
-
- '
|
|
64
|
+
- 'lib/glossarist/rdf/gloss_designation.rb'
|
|
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'
|
|
36
76
|
|
|
37
|
-
# Offense count:
|
|
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'
|
|
86
|
+
|
|
87
|
+
# Offense count: 1
|
|
88
|
+
# 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
|
+
Layout/EmptyLineAfterGuardClause:
|
|
96
|
+
Exclude:
|
|
97
|
+
- 'lib/glossarist/collections/bibliography_collection.rb'
|
|
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'
|
|
106
|
+
|
|
107
|
+
# Offense count: 2
|
|
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
|
|
117
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
118
|
+
# Configuration parameters: AllowForAlignment, AllowBeforeTrailingComments, ForceEqualSignAlignment.
|
|
119
|
+
Layout/ExtraSpacing:
|
|
120
|
+
Exclude:
|
|
121
|
+
- 'lib/glossarist/rdf/namespaces.rb'
|
|
122
|
+
- 'scripts/migrate_isotc211_to_v3.rb'
|
|
123
|
+
|
|
124
|
+
# Offense count: 16
|
|
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
|
|
137
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
138
|
+
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
|
139
|
+
# SupportedStyles: special_inside_parentheses, consistent, align_braces
|
|
140
|
+
Layout/FirstHashElementIndentation:
|
|
141
|
+
Exclude:
|
|
142
|
+
- 'lib/glossarist/glossary_store.rb'
|
|
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'
|
|
147
|
+
|
|
148
|
+
# Offense count: 172
|
|
38
149
|
# This cop supports safe autocorrection (--autocorrect).
|
|
39
150
|
# Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
|
|
40
151
|
# SupportedHashRocketStyles: key, separator, table
|
|
41
152
|
# SupportedColonStyles: key, separator, table
|
|
42
153
|
# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
|
|
43
154
|
Layout/HashAlignment:
|
|
44
|
-
|
|
45
|
-
- 'spec/unit/concept_data_spec.rb'
|
|
46
|
-
- 'spec/unit/designations_spec.rb'
|
|
155
|
+
Enabled: false
|
|
47
156
|
|
|
48
|
-
# Offense count:
|
|
157
|
+
# Offense count: 40
|
|
49
158
|
# This cop supports safe autocorrection (--autocorrect).
|
|
50
159
|
# Configuration parameters: Width, EnforcedStyleAlignWith, AllowedPatterns.
|
|
51
160
|
# SupportedStylesAlignWith: start_of_line, relative_to_receiver
|
|
52
161
|
Layout/IndentationWidth:
|
|
53
162
|
Exclude:
|
|
54
|
-
- '
|
|
163
|
+
- 'lib/glossarist/cli/validate_command.rb'
|
|
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'
|
|
55
177
|
|
|
56
|
-
# Offense count:
|
|
178
|
+
# Offense count: 668
|
|
57
179
|
# This cop supports safe autocorrection (--autocorrect).
|
|
58
180
|
# Configuration parameters: Max, AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, AllowRBSInlineAnnotation, AllowCopDirectives, AllowedPatterns, SplitStrings.
|
|
59
181
|
# URISchemes: http, https
|
|
60
182
|
Layout/LineLength:
|
|
61
183
|
Enabled: false
|
|
62
184
|
|
|
63
|
-
# Offense count:
|
|
185
|
+
# Offense count: 1
|
|
186
|
+
# 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
|
+
# Configuration parameters: EnforcedStyle.
|
|
194
|
+
# SupportedStyles: symmetrical, new_line, same_line
|
|
195
|
+
Layout/MultilineHashBraceLayout:
|
|
196
|
+
Exclude:
|
|
197
|
+
- 'spec/unit/concept_comparator_spec.rb'
|
|
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'
|
|
211
|
+
|
|
212
|
+
# Offense count: 1
|
|
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
|
|
64
228
|
# This cop supports safe autocorrection (--autocorrect).
|
|
65
229
|
# Configuration parameters: AllowInHeredoc.
|
|
66
230
|
Layout/TrailingWhitespace:
|
|
231
|
+
Enabled: false
|
|
232
|
+
|
|
233
|
+
# Offense count: 1
|
|
234
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
235
|
+
Lint/AmbiguousOperatorPrecedence:
|
|
67
236
|
Exclude:
|
|
68
|
-
- 'lib/glossarist/
|
|
69
|
-
- 'spec/unit/concept_data_spec.rb'
|
|
70
|
-
- 'spec/unit/designations_spec.rb'
|
|
237
|
+
- 'lib/glossarist/validation/rules/related_concept_cycle_rule.rb'
|
|
71
238
|
|
|
72
239
|
# Offense count: 1
|
|
73
240
|
# Configuration parameters: AllowedMethods.
|
|
@@ -76,63 +243,92 @@ Lint/ConstantDefinitionInBlock:
|
|
|
76
243
|
Exclude:
|
|
77
244
|
- 'spec/unit/utilities/common_functions_spec.rb'
|
|
78
245
|
|
|
246
|
+
# Offense count: 1
|
|
247
|
+
# Configuration parameters: IgnoreLiteralBranches, IgnoreConstantBranches, IgnoreDuplicateElseBranch.
|
|
248
|
+
Lint/DuplicateBranch:
|
|
249
|
+
Exclude:
|
|
250
|
+
- 'scripts/migrate_dataset.rb'
|
|
251
|
+
|
|
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
|
+
|
|
79
260
|
# Offense count: 1
|
|
80
261
|
# 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).
|
|
81
268
|
# Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods, NotImplementedExceptions.
|
|
82
269
|
# NotImplementedExceptions: NotImplementedError
|
|
83
270
|
Lint/UnusedMethodArgument:
|
|
84
271
|
Exclude:
|
|
85
272
|
- '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'
|
|
86
280
|
|
|
87
|
-
# Offense count:
|
|
281
|
+
# Offense count: 85
|
|
88
282
|
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes, Max.
|
|
89
283
|
Metrics/AbcSize:
|
|
90
284
|
Enabled: false
|
|
91
285
|
|
|
92
|
-
# Offense count:
|
|
286
|
+
# Offense count: 7
|
|
287
|
+
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
|
|
288
|
+
# AllowedMethods: refine
|
|
289
|
+
Metrics/BlockLength:
|
|
290
|
+
Max: 41
|
|
291
|
+
|
|
292
|
+
# Offense count: 52
|
|
93
293
|
# Configuration parameters: AllowedMethods, AllowedPatterns, Max.
|
|
94
294
|
Metrics/CyclomaticComplexity:
|
|
95
|
-
|
|
96
|
-
- 'lib/glossarist/cli/export_command.rb'
|
|
97
|
-
- 'lib/glossarist/concept_validator.rb'
|
|
98
|
-
- 'lib/glossarist/designation/expression.rb'
|
|
99
|
-
- 'lib/glossarist/gcr_metadata.rb'
|
|
100
|
-
- 'lib/glossarist/gcr_statistics.rb'
|
|
101
|
-
- 'lib/glossarist/gcr_validator.rb'
|
|
102
|
-
- 'lib/glossarist/managed_concept.rb'
|
|
103
|
-
- 'lib/glossarist/reference_extractor.rb'
|
|
104
|
-
- 'lib/glossarist/reference_resolver.rb'
|
|
105
|
-
- 'lib/glossarist/resolution_adapter/local.rb'
|
|
106
|
-
- 'lib/glossarist/schema_migration.rb'
|
|
107
|
-
- 'lib/glossarist/transforms/concept_to_skos_transform.rb'
|
|
108
|
-
- 'lib/glossarist/transforms/concept_to_tbx_transform.rb'
|
|
109
|
-
- 'lib/glossarist/validation/bibliography_index.rb'
|
|
295
|
+
Enabled: false
|
|
110
296
|
|
|
111
|
-
# Offense count:
|
|
297
|
+
# Offense count: 107
|
|
112
298
|
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
|
|
113
299
|
Metrics/MethodLength:
|
|
114
|
-
Max:
|
|
300
|
+
Max: 47
|
|
115
301
|
|
|
116
|
-
# Offense count:
|
|
302
|
+
# Offense count: 5
|
|
117
303
|
# Configuration parameters: CountKeywordArgs, MaxOptionalParameters.
|
|
118
304
|
Metrics/ParameterLists:
|
|
119
305
|
Max: 6
|
|
120
306
|
|
|
121
|
-
# Offense count:
|
|
307
|
+
# Offense count: 38
|
|
122
308
|
# Configuration parameters: AllowedMethods, AllowedPatterns, Max.
|
|
123
309
|
Metrics/PerceivedComplexity:
|
|
310
|
+
Enabled: false
|
|
311
|
+
|
|
312
|
+
# Offense count: 18
|
|
313
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
314
|
+
# Configuration parameters: EnforcedStyle, BlockForwardingName.
|
|
315
|
+
# SupportedStyles: anonymous, explicit
|
|
316
|
+
Naming/BlockForwarding:
|
|
124
317
|
Exclude:
|
|
125
|
-
- 'lib/glossarist/
|
|
126
|
-
- 'lib/glossarist/
|
|
127
|
-
- 'lib/glossarist/
|
|
128
|
-
- 'lib/glossarist/
|
|
129
|
-
- 'lib/glossarist/
|
|
130
|
-
- 'lib/glossarist/
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
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'
|
|
136
332
|
|
|
137
333
|
# Offense count: 6
|
|
138
334
|
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
|
|
@@ -141,13 +337,64 @@ Naming/MethodParameterName:
|
|
|
141
337
|
Exclude:
|
|
142
338
|
- 'lib/glossarist/schema_migration.rb'
|
|
143
339
|
|
|
144
|
-
# Offense count:
|
|
145
|
-
#
|
|
146
|
-
#
|
|
147
|
-
|
|
148
|
-
|
|
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:
|
|
149
351
|
Exclude:
|
|
150
|
-
- '
|
|
352
|
+
- 'lib/glossarist/validation/rules/filename_id_rule.rb'
|
|
353
|
+
|
|
354
|
+
# 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
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
380
|
+
# Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, AllowedMethods, AllowedPatterns, AllowBracesOnProceduralOneLiners, BracesRequiredMethods.
|
|
381
|
+
# SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces
|
|
382
|
+
# ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
|
|
383
|
+
# FunctionalMethods: let, let!, subject, watch
|
|
384
|
+
# AllowedMethods: lambda, proc, it
|
|
385
|
+
Style/BlockDelimiters:
|
|
386
|
+
Exclude:
|
|
387
|
+
- 'lib/glossarist/rdf/gloss_designation.rb'
|
|
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'
|
|
151
398
|
|
|
152
399
|
# Offense count: 6
|
|
153
400
|
# This cop supports safe autocorrection (--autocorrect).
|
|
@@ -156,18 +403,121 @@ Naming/VariableNumber:
|
|
|
156
403
|
Style/FormatStringToken:
|
|
157
404
|
EnforcedStyle: unannotated
|
|
158
405
|
|
|
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
|
+
# Offense count: 2
|
|
416
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
417
|
+
Style/IdenticalConditionalBranches:
|
|
418
|
+
Exclude:
|
|
419
|
+
- 'scripts/migrate_dataset.rb'
|
|
420
|
+
|
|
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
|
+
|
|
159
447
|
# Offense count: 1
|
|
160
|
-
#
|
|
161
|
-
|
|
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:
|
|
162
474
|
Exclude:
|
|
163
|
-
- '
|
|
164
|
-
- '
|
|
165
|
-
- 'lib/glossarist.rb'
|
|
475
|
+
- 'scripts/migrate_isotc211_to_v3.rb'
|
|
476
|
+
- 'scripts/migrate_osgeo_to_v3.rb'
|
|
166
477
|
|
|
167
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
|
+
# Offense count: 3
|
|
168
490
|
# Configuration parameters: Max.
|
|
169
491
|
Style/SafeNavigationChainLength:
|
|
170
492
|
Exclude:
|
|
171
493
|
- 'lib/glossarist/managed_concept.rb'
|
|
172
|
-
- 'lib/glossarist/transforms/concept_to_skos_transform.rb'
|
|
173
494
|
- 'lib/glossarist/transforms/concept_to_tbx_transform.rb'
|
|
495
|
+
- '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
data/glossarist.gemspec
CHANGED
|
@@ -32,7 +32,7 @@ Gem::Specification.new do |spec|
|
|
|
32
32
|
spec.require_paths = ["lib"]
|
|
33
33
|
|
|
34
34
|
spec.add_dependency "lutaml-model", "~> 0.8.15"
|
|
35
|
-
spec.add_dependency "lutaml-store", "~> 0.
|
|
35
|
+
spec.add_dependency "lutaml-store", "~> 0.2.0"
|
|
36
36
|
spec.add_dependency "paint", "~> 2.3"
|
|
37
37
|
spec.add_dependency "relaton", ">= 2.0.0", "< 3"
|
|
38
38
|
spec.add_dependency "rubyzip", ">= 2.3", "< 3"
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Glossarist
|
|
4
|
+
class BibliographyData < Lutaml::Model::Serializable
|
|
5
|
+
attribute :shortname, :string, default: -> { "bibliography" }
|
|
6
|
+
attribute :entries, BibliographyEntry, collection: true,
|
|
7
|
+
initialize_empty: true
|
|
8
|
+
|
|
9
|
+
key_value do
|
|
10
|
+
map nil, to: :entries,
|
|
11
|
+
with: { from: :entries_from_hash, to: :entries_to_hash }
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def find(citation_key)
|
|
15
|
+
entries.find { |e| e.citation_key == citation_key }
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def keys
|
|
19
|
+
entries.map(&:citation_key)
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def [](citation_key)
|
|
23
|
+
entry = find(citation_key)
|
|
24
|
+
entry&.data
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def entries_from_hash(model, value)
|
|
28
|
+
return unless value.is_a?(Hash)
|
|
29
|
+
|
|
30
|
+
model.entries = value.map do |key, data|
|
|
31
|
+
BibliographyEntry.new(citation_key: key, data: data || {})
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def entries_to_hash(model, doc)
|
|
36
|
+
model.entries.each do |entry|
|
|
37
|
+
doc[entry.citation_key] = entry.data
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Glossarist
|
|
4
|
+
class BibliographyEntry < Lutaml::Model::Serializable
|
|
5
|
+
attribute :citation_key, :string
|
|
6
|
+
attribute :data, :hash, default: -> { {} }
|
|
7
|
+
|
|
8
|
+
key_value do
|
|
9
|
+
map "citation_key", to: :citation_key
|
|
10
|
+
map "data", to: :data
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|