glossarist 2.8.6 → 2.8.7
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 +2 -30
- data/lib/glossarist/citation.rb +5 -0
- data/lib/glossarist/concept_data.rb +4 -0
- data/lib/glossarist/concept_manager.rb +9 -0
- data/lib/glossarist/v3/citation.rb +2 -0
- data/lib/glossarist/v3/managed_concept_data.rb +1 -0
- data/lib/glossarist/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b6de74f1a2e3c9d3379f35ccf94a46a0d407149329e27fa95521e40e8a22c883
|
|
4
|
+
data.tar.gz: 2159f19a3d6c355b7bafba1f76d3f673fe3a0813af919479c1835dbcd609dbd7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9c46b4f37c08ce6d40158098c5b39006b319a3dab247660a43aa4ebb82ba7527ee9898ccf1513e960abf56a6987dea8b083d9b11b4cff2306d66e5e0b054af03
|
|
7
|
+
data.tar.gz: 4bb9c91a99347f353bcabb17702d13e295f50323173c8fd25fde164af7ac0ea117d38542b9e03449fd386e253f31cd003832310ce5cc5b3f85e4c34978a33fdd
|
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-09 09:29:01 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,35 +11,13 @@ Gemspec/RequiredRubyVersion:
|
|
|
11
11
|
Exclude:
|
|
12
12
|
- 'glossarist.gemspec'
|
|
13
13
|
|
|
14
|
-
# Offense count:
|
|
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/designation.rb'
|
|
21
|
-
|
|
22
|
-
# Offense count: 1
|
|
23
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
24
|
-
# Configuration parameters: AllowForAlignment, AllowBeforeTrailingComments, ForceEqualSignAlignment.
|
|
25
|
-
Layout/ExtraSpacing:
|
|
26
|
-
Exclude:
|
|
27
|
-
- 'lib/glossarist/designation.rb'
|
|
28
|
-
|
|
29
|
-
# Offense count: 420
|
|
14
|
+
# Offense count: 419
|
|
30
15
|
# This cop supports safe autocorrection (--autocorrect).
|
|
31
16
|
# Configuration parameters: Max, AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, AllowRBSInlineAnnotation, AllowCopDirectives, AllowedPatterns, SplitStrings.
|
|
32
17
|
# URISchemes: http, https
|
|
33
18
|
Layout/LineLength:
|
|
34
19
|
Enabled: false
|
|
35
20
|
|
|
36
|
-
# Offense count: 1
|
|
37
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
38
|
-
# Configuration parameters: AllowInHeredoc.
|
|
39
|
-
Layout/TrailingWhitespace:
|
|
40
|
-
Exclude:
|
|
41
|
-
- 'lib/glossarist/designation.rb'
|
|
42
|
-
|
|
43
21
|
# Offense count: 1
|
|
44
22
|
# Configuration parameters: AllowedMethods.
|
|
45
23
|
# AllowedMethods: enums
|
|
@@ -112,12 +90,6 @@ Style/IdenticalConditionalBranches:
|
|
|
112
90
|
Exclude:
|
|
113
91
|
- 'scripts/migrate_dataset.rb'
|
|
114
92
|
|
|
115
|
-
# Offense count: 1
|
|
116
|
-
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
117
|
-
Style/ReduceToHash:
|
|
118
|
-
Exclude:
|
|
119
|
-
- 'lib/glossarist/transforms/concept_to_gloss_transform.rb'
|
|
120
|
-
|
|
121
93
|
# Offense count: 3
|
|
122
94
|
# Configuration parameters: Max.
|
|
123
95
|
Style/SafeNavigationChainLength:
|
data/lib/glossarist/citation.rb
CHANGED
|
@@ -15,6 +15,7 @@ module Glossarist
|
|
|
15
15
|
end
|
|
16
16
|
|
|
17
17
|
attribute :ref, Ref
|
|
18
|
+
attribute :text, :string
|
|
18
19
|
attribute :locality, Locality
|
|
19
20
|
attribute :link, :string
|
|
20
21
|
attribute :original, :string
|
|
@@ -35,6 +36,10 @@ module Glossarist
|
|
|
35
36
|
parts.empty? ? nil : parts.join(" ")
|
|
36
37
|
end
|
|
37
38
|
|
|
39
|
+
def text
|
|
40
|
+
@text || label
|
|
41
|
+
end
|
|
42
|
+
|
|
38
43
|
def locality_from_yaml(model, value)
|
|
39
44
|
locality = Locality.new
|
|
40
45
|
|
|
@@ -50,6 +50,7 @@ module Glossarist
|
|
|
50
50
|
|
|
51
51
|
def load_concept_from_file(filename) # rubocop:disable Metrics/CyclomaticComplexity
|
|
52
52
|
raw = File.read(filename, encoding: "utf-8")
|
|
53
|
+
self.version = detect_version(raw)
|
|
53
54
|
doc = concept_document_class.from_yamls(raw)
|
|
54
55
|
concept = doc.concept
|
|
55
56
|
unless concept
|
|
@@ -166,6 +167,14 @@ module Glossarist
|
|
|
166
167
|
end
|
|
167
168
|
end
|
|
168
169
|
|
|
170
|
+
def detect_version(raw)
|
|
171
|
+
if (m = raw.match(/^schema_version:\s*v?(\d)/))
|
|
172
|
+
m[1]
|
|
173
|
+
else
|
|
174
|
+
version
|
|
175
|
+
end
|
|
176
|
+
end
|
|
177
|
+
|
|
169
178
|
def v1_collection?
|
|
170
179
|
@v1_collection ||= !Dir.glob(File.join(path,
|
|
171
180
|
"concept-*.{yaml,yml}")).empty?
|
|
@@ -17,6 +17,7 @@ module Glossarist
|
|
|
17
17
|
with: { from: :domains_from_yaml, to: :domains_to_yaml }
|
|
18
18
|
map :tags, to: :tags
|
|
19
19
|
map :sources, to: :sources
|
|
20
|
+
map :related, to: :related
|
|
20
21
|
map :localizations, to: :localizations,
|
|
21
22
|
with: { from: :localizations_from_yaml, to: :localizations_to_yaml }
|
|
22
23
|
end
|
data/lib/glossarist/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: glossarist
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.8.
|
|
4
|
+
version: 2.8.7
|
|
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-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: lutaml-model
|