glossarist 2.8.16 → 2.8.17

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3dff1f025f20e6cfad5028acb99816984ddef4cd4a231991345a633c42ae5794
4
- data.tar.gz: 7eed6c0df552c7206225460f212500fac6e4c7f3bc47d04bf75bb11acd53af7d
3
+ metadata.gz: ef11d8539b9ee78a318b2ebc07db56194b683d4900aa03bdc3c0d1eb60fdaac9
4
+ data.tar.gz: '011642394c30cdd2e3fe28adeda2f43eb8f234b52a25a95493763b6b67c64c83'
5
5
  SHA512:
6
- metadata.gz: 01bda07bdfcff32b5526b33e19bd38074f0eeeab585bdf739593c95f9edacdd85cff549ce7430b53a027b18b1cd011a99a33454f71fdb2163c57be6bb1a1affb
7
- data.tar.gz: f9e036c52fa7fa63dab55c8623bd47bc46af544d1fa3660368c8f41ef9c9155373ca92ac91116c8f8d7ff18b1ca9e093fde4f6e25ce0ca7b8194c9724b2df75d
6
+ metadata.gz: 9db668ec9c2bd19547978620c4f202d4ec685d683d40b71ea8b8c85a5da6c426689e1f77339b46c14b6efd659c6b0957a26985c5d083fc67a85788074e387dce
7
+ data.tar.gz: ea7f7e228374a184d140c01deeefb5500d15e04397fa9c1109122257f39f12b0209c1e368a60ddbef386281a8ec80647a56bbe5793cbc4e0c8c7bfc027b145f7
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-13 04:17:12 UTC using RuboCop version 1.86.1.
3
+ # on 2026-06-21 09:57:59 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,101 +11,13 @@ Gemspec/RequiredRubyVersion:
11
11
  Exclude:
12
12
  - 'glossarist.gemspec'
13
13
 
14
- # Offense count: 7
15
- # This cop supports safe autocorrection (--autocorrect).
16
- # Configuration parameters: EnforcedStyle, IndentationWidth.
17
- # SupportedStyles: with_first_argument, with_fixed_indentation
18
- Layout/ArgumentAlignment:
19
- Exclude:
20
- - 'lib/glossarist/errors.rb'
21
- - 'lib/glossarist/reference_resolver.rb'
22
- - 'lib/glossarist/schema_migration/v0_to_v1.rb'
23
- - 'lib/glossarist/schema_migration/v2_to_v3.rb'
24
- - 'spec/unit/reference_resolver_spec.rb'
25
-
26
- # Offense count: 1
27
- # This cop supports safe autocorrection (--autocorrect).
28
- # Configuration parameters: IndentationWidth.
29
- Layout/AssignmentIndentation:
30
- Exclude:
31
- - 'lib/glossarist/schema_migration/v0_to_v1.rb'
32
-
33
- # Offense count: 1
34
- # This cop supports safe autocorrection (--autocorrect).
35
- # Configuration parameters: EnforcedStyleAlignWith.
36
- # SupportedStylesAlignWith: either, start_of_block, start_of_line
37
- Layout/BlockAlignment:
38
- Exclude:
39
- - 'lib/glossarist/sts/importer.rb'
40
-
41
- # Offense count: 1
42
- # This cop supports safe autocorrection (--autocorrect).
43
- Layout/BlockEndNewline:
44
- Exclude:
45
- - 'lib/glossarist/sts/importer.rb'
46
-
47
- # Offense count: 1
48
- # This cop supports safe autocorrection (--autocorrect).
49
- Layout/ClosingParenthesisIndentation:
50
- Exclude:
51
- - 'spec/unit/concept_source_spec.rb'
52
-
53
- # Offense count: 1
54
- # This cop supports safe autocorrection (--autocorrect).
55
- # Configuration parameters: EnforcedStyle, IndentationWidth.
56
- # SupportedStyles: consistent, consistent_relative_to_receiver, special_for_inner_method_call, special_for_inner_method_call_in_parentheses
57
- Layout/FirstArgumentIndentation:
58
- Exclude:
59
- - 'spec/unit/concept_source_spec.rb'
60
-
61
- # Offense count: 3
62
- # This cop supports safe autocorrection (--autocorrect).
63
- # Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
64
- # SupportedHashRocketStyles: key, separator, table
65
- # SupportedColonStyles: key, separator, table
66
- # SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
67
- Layout/HashAlignment:
68
- Exclude:
69
- - 'lib/glossarist/managed_concept.rb'
70
- - 'lib/glossarist/schema_migration/v0_to_v1.rb'
71
- - 'spec/unit/validation/rules/cite_ref_integrity_rule_spec.rb'
72
-
73
- # Offense count: 2
74
- # This cop supports safe autocorrection (--autocorrect).
75
- # Configuration parameters: Width, EnforcedStyleAlignWith, AllowedPatterns.
76
- # SupportedStylesAlignWith: start_of_line, relative_to_receiver
77
- Layout/IndentationWidth:
78
- Exclude:
79
- - 'lib/glossarist/sts/importer.rb'
80
-
81
- # Offense count: 449
14
+ # Offense count: 467
82
15
  # This cop supports safe autocorrection (--autocorrect).
83
16
  # Configuration parameters: Max, AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, AllowRBSInlineAnnotation, AllowCopDirectives, AllowedPatterns, SplitStrings.
84
17
  # URISchemes: http, https
85
18
  Layout/LineLength:
86
19
  Enabled: false
87
20
 
88
- # Offense count: 1
89
- # This cop supports safe autocorrection (--autocorrect).
90
- # Configuration parameters: EnforcedStyle.
91
- # SupportedStyles: symmetrical, new_line, same_line
92
- Layout/MultilineMethodCallBraceLayout:
93
- Exclude:
94
- - 'spec/unit/concept_source_spec.rb'
95
-
96
- # Offense count: 11
97
- # This cop supports safe autocorrection (--autocorrect).
98
- # Configuration parameters: AllowInHeredoc.
99
- Layout/TrailingWhitespace:
100
- Exclude:
101
- - 'lib/glossarist/errors.rb'
102
- - 'lib/glossarist/managed_concept.rb'
103
- - 'lib/glossarist/reference_resolver.rb'
104
- - 'lib/glossarist/schema_migration/v0_to_v1.rb'
105
- - 'lib/glossarist/schema_migration/v2_to_v3.rb'
106
- - 'spec/unit/reference_resolver_spec.rb'
107
- - 'spec/unit/validation/rules/cite_ref_integrity_rule_spec.rb'
108
-
109
21
  # Offense count: 1
110
22
  # Configuration parameters: AllowedMethods.
111
23
  # AllowedMethods: enums
@@ -132,7 +44,7 @@ Lint/UselessConstantScoping:
132
44
  Exclude:
133
45
  - 'lib/glossarist/sts/term_extractor.rb'
134
46
 
135
- # Offense count: 89
47
+ # Offense count: 91
136
48
  # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes, Max.
137
49
  Metrics/AbcSize:
138
50
  Enabled: false
@@ -143,12 +55,12 @@ Metrics/AbcSize:
143
55
  Metrics/BlockLength:
144
56
  Max: 41
145
57
 
146
- # Offense count: 58
58
+ # Offense count: 59
147
59
  # Configuration parameters: AllowedMethods, AllowedPatterns, Max.
148
60
  Metrics/CyclomaticComplexity:
149
61
  Enabled: false
150
62
 
151
- # Offense count: 109
63
+ # Offense count: 108
152
64
  # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
153
65
  Metrics/MethodLength:
154
66
  Max: 47
@@ -163,17 +75,6 @@ Metrics/ParameterLists:
163
75
  Metrics/PerceivedComplexity:
164
76
  Enabled: false
165
77
 
166
- # Offense count: 1
167
- # This cop supports safe autocorrection (--autocorrect).
168
- # Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, AllowedMethods, AllowedPatterns, AllowBracesOnProceduralOneLiners, BracesRequiredMethods.
169
- # SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces
170
- # ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
171
- # FunctionalMethods: let, let!, subject, watch
172
- # AllowedMethods: lambda, proc, it
173
- Style/BlockDelimiters:
174
- Exclude:
175
- - 'lib/glossarist/sts/importer.rb'
176
-
177
78
  # Offense count: 6
178
79
  # This cop supports safe autocorrection (--autocorrect).
179
80
  # Configuration parameters: MaxUnannotatedPlaceholdersAllowed, Mode, AllowedMethods, AllowedPatterns.
@@ -187,18 +88,6 @@ Style/IdenticalConditionalBranches:
187
88
  Exclude:
188
89
  - 'scripts/migrate_dataset.rb'
189
90
 
190
- # Offense count: 1
191
- # This cop supports safe autocorrection (--autocorrect).
192
- Style/MultilineIfModifier:
193
- Exclude:
194
- - 'lib/glossarist/schema_migration/v0_to_v1.rb'
195
-
196
- # Offense count: 2
197
- # This cop supports safe autocorrection (--autocorrect).
198
- Style/RedundantRegexpCharacterClass:
199
- Exclude:
200
- - 'lib/glossarist/sts/term_extractor.rb'
201
-
202
91
  # Offense count: 3
203
92
  # Configuration parameters: Max.
204
93
  Style/SafeNavigationChainLength:
@@ -206,11 +95,3 @@ Style/SafeNavigationChainLength:
206
95
  - 'lib/glossarist/managed_concept.rb'
207
96
  - 'lib/glossarist/transforms/concept_to_tbx_transform.rb'
208
97
  - 'lib/glossarist/validation/rules/source_urn_format_rule.rb'
209
-
210
- # Offense count: 1
211
- # This cop supports safe autocorrection (--autocorrect).
212
- # Configuration parameters: EnforcedStyleForMultiline.
213
- # SupportedStylesForMultiline: comma, consistent_comma, diff_comma, no_comma
214
- Style/TrailingCommaInArguments:
215
- Exclude:
216
- - 'spec/unit/concept_source_spec.rb'
@@ -86,7 +86,7 @@ module Glossarist
86
86
  def all_sources
87
87
  list = sources.to_a
88
88
  self.class.detailed_definition_fields.each do |field|
89
- public_send(field).each { |d| list.concat(d.sources.to_a) }
89
+ public_send(field).each { |d| list.concat(d.all_sources) }
90
90
  end
91
91
  Array(terms).each { |t| list.concat(Array(t.sources)) }
92
92
  list
@@ -95,7 +95,7 @@ module Glossarist
95
95
  def text_content
96
96
  texts = []
97
97
  self.class.detailed_definition_fields.each do |field|
98
- public_send(field).each { |d| texts << d.content if d.content }
98
+ public_send(field).each { |d| texts.concat(d.text_content) }
99
99
  end
100
100
  texts
101
101
  end
@@ -4,10 +4,26 @@ module Glossarist
4
4
  class DetailedDefinition < Lutaml::Model::Serializable
5
5
  attribute :content, :string
6
6
  attribute :sources, ConceptSource, collection: true
7
+ attribute :examples, DetailedDefinition, collection: true,
8
+ initialize_empty: true
7
9
 
8
10
  key_value do
9
11
  map :content, to: :content
10
12
  map :sources, to: :sources
13
+ map :examples, to: :examples
14
+ end
15
+
16
+ def all_sources
17
+ list = sources.to_a
18
+ examples.each { |example| list.concat(example.all_sources) }
19
+ list
20
+ end
21
+
22
+ def text_content
23
+ texts = []
24
+ texts << content if content
25
+ examples.each { |example| texts.concat(example.text_content) }
26
+ texts
11
27
  end
12
28
  end
13
29
  end
@@ -7,6 +7,7 @@ module Glossarist
7
7
  class GlossDetailedDefinition < Lutaml::Model::Serializable
8
8
  attribute :content, :string
9
9
  attribute :sources, GlossConceptSource, collection: true
10
+ attribute :examples, GlossDetailedDefinition, collection: true
10
11
 
11
12
  rdf do
12
13
  namespace Namespaces::GlossaristNamespace, Namespaces::RdfNamespace
@@ -18,6 +19,7 @@ module Glossarist
18
19
  predicate :value, namespace: Namespaces::RdfNamespace, to: :content
19
20
 
20
21
  members :sources
22
+ members :examples, link: "gloss:hasExample"
21
23
  end
22
24
  end
23
25
  end
@@ -232,6 +232,7 @@ module Glossarist
232
232
  Rdf::GlossDetailedDefinition.new(
233
233
  content: dd.content,
234
234
  sources: build_gloss_sources(dd.sources),
235
+ examples: build_gloss_definitions(dd.examples),
235
236
  )
236
237
  end
237
238
  end
@@ -4,10 +4,13 @@ module Glossarist
4
4
  module V2
5
5
  class DetailedDefinition < Glossarist::DetailedDefinition
6
6
  attribute :sources, V2::ConceptSource, collection: true
7
+ attribute :examples, V2::DetailedDefinition, collection: true,
8
+ initialize_empty: true
7
9
 
8
10
  key_value do
9
11
  map :content, to: :content
10
12
  map :sources, to: :sources
13
+ map :examples, to: :examples
11
14
  end
12
15
  end
13
16
  end
@@ -4,10 +4,13 @@ module Glossarist
4
4
  module V3
5
5
  class DetailedDefinition < Glossarist::DetailedDefinition
6
6
  attribute :sources, V3::ConceptSource, collection: true
7
+ attribute :examples, V3::DetailedDefinition, collection: true,
8
+ initialize_empty: true
7
9
 
8
10
  key_value do
9
11
  map :content, to: :content
10
12
  map :sources, to: :sources
13
+ map :examples, to: :examples
11
14
  end
12
15
  end
13
16
  end
@@ -4,5 +4,5 @@
4
4
  #
5
5
 
6
6
  module Glossarist
7
- VERSION = "2.8.16"
7
+ VERSION = "2.8.17"
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glossarist
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.8.16
4
+ version: 2.8.17
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-18 00:00:00.000000000 Z
11
+ date: 2026-06-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: lutaml-model