glossarist 2.14.5 → 2.14.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/exe/glossarist +7 -1
- data/lib/glossarist/cli/export_command.rb +5 -6
- data/lib/glossarist/cli/import_command.rb +1 -2
- data/lib/glossarist/cli/package_command.rb +1 -2
- data/lib/glossarist/cli/upgrade_command.rb +1 -2
- data/lib/glossarist/cli/validate_command.rb +4 -1
- data/lib/glossarist/concept.rb +6 -2
- data/lib/glossarist/errors/cli_error.rb +12 -0
- data/lib/glossarist/errors.rb +1 -0
- data/lib/glossarist/rdf/gloss_generic_relation.rb +2 -2
- data/lib/glossarist/rdf/gloss_partitive_relation.rb +2 -2
- data/lib/glossarist/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1d7e9c15feb04132c6f4c646fff03f75e9603d82cd5f3b5227ae68d8d86de0f1
|
|
4
|
+
data.tar.gz: 37533585b2a03023fe7df4b02ba2ba0433145b8c53899c2035ea0345f95dcc65
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ab12bf6c2d0381345d9a555e03c48bb4fa4ef6ecd23ea8a013e9e0b501ebabb5784707af479f5fbcb8121f862cc02b78120a35eee83ed3eeaa97751b7ab4ffc6
|
|
7
|
+
data.tar.gz: 0baef80b82bade98dc4b90c60517ae8793ec84ec57d34a7683d4e254aee2959a4fb454dbdf6791b3d4cf89854144a1735b59682eebbea79fbd39659c9257bf9f
|
data/exe/glossarist
CHANGED
|
@@ -45,8 +45,7 @@ module Glossarist
|
|
|
45
45
|
|
|
46
46
|
validate_outputs!(formats, output_dir, name) if validate?
|
|
47
47
|
rescue ArgumentError => e
|
|
48
|
-
|
|
49
|
-
exit 1
|
|
48
|
+
raise Errors::CliError, e.message
|
|
50
49
|
end
|
|
51
50
|
|
|
52
51
|
private
|
|
@@ -248,10 +247,10 @@ module Glossarist
|
|
|
248
247
|
files << File.join(output_dir, "#{name}.ttl") if File.exist?(File.join(output_dir, "#{name}.ttl"))
|
|
249
248
|
files.concat(Dir.glob(File.join(output_dir, "concepts", "*.ttl")))
|
|
250
249
|
report = validator.validate_files(files)
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
250
|
+
return if report.conformant?
|
|
251
|
+
|
|
252
|
+
warn report.to_s
|
|
253
|
+
raise Errors::CliError, "emitted Turtle failed SHACL validation"
|
|
255
254
|
end
|
|
256
255
|
end
|
|
257
256
|
end
|
|
@@ -22,7 +22,10 @@ module Glossarist
|
|
|
22
22
|
|
|
23
23
|
$stderr.print "\r#{' ' * 60}\r" if text_output
|
|
24
24
|
report(result)
|
|
25
|
-
|
|
25
|
+
return if result.errors.empty? && !strict_failure?(result)
|
|
26
|
+
|
|
27
|
+
raise Errors::CliError,
|
|
28
|
+
"dataset invalid: #{result.errors.size} error(s)"
|
|
26
29
|
end
|
|
27
30
|
|
|
28
31
|
private
|
data/lib/glossarist/concept.rb
CHANGED
|
@@ -22,8 +22,11 @@ module Glossarist
|
|
|
22
22
|
|
|
23
23
|
map %i[date_accepted dateAccepted],
|
|
24
24
|
with: { from: :date_accepted_from_yaml, to: :date_accepted_to_yaml }
|
|
25
|
-
|
|
26
|
-
map
|
|
25
|
+
# The concept's UUID serializes to the YAML "id" key (uuid_to_yaml),
|
|
26
|
+
# so reading must map "id" back to #uuid — not just #id — or a
|
|
27
|
+
# round-tripped document lazily derives a different, content-based
|
|
28
|
+
# UUID (#247). ManagedConcept already maps both keys this way.
|
|
29
|
+
map %i[id uuid], to: :uuid, with: { to: :uuid_to_yaml, from: :uuid_from_yaml }
|
|
27
30
|
map :identifier, to: :id, with: { to: :id_to_yaml, from: :id_from_yaml }
|
|
28
31
|
end
|
|
29
32
|
|
|
@@ -75,6 +78,7 @@ module Glossarist
|
|
|
75
78
|
|
|
76
79
|
def uuid_from_yaml(model, value)
|
|
77
80
|
model.uuid = value
|
|
81
|
+
model.id = value
|
|
78
82
|
end
|
|
79
83
|
|
|
80
84
|
def id_to_yaml(model, doc); end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Glossarist
|
|
4
|
+
module Errors
|
|
5
|
+
# Raised by CLI command classes on invalid usage or failed runs.
|
|
6
|
+
# Library classes stay exception-only; exe/glossarist owns the
|
|
7
|
+
# process exit code. Calling exit from a command class would kill
|
|
8
|
+
# any host process exercising it in-process (glossarist-ruby#248).
|
|
9
|
+
class CliError < Base
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
data/lib/glossarist/errors.rb
CHANGED
|
@@ -17,7 +17,7 @@ module Glossarist
|
|
|
17
17
|
|
|
18
18
|
subject { |r| "genericRelation/#{GlossGenericRelation.deterministic_id(r)}" }
|
|
19
19
|
|
|
20
|
-
types "gloss:
|
|
20
|
+
types "gloss:GenericRelation"
|
|
21
21
|
|
|
22
22
|
predicate :comprehensive, namespace: Namespaces::GlossaristNamespace,
|
|
23
23
|
to: :comprehensive_uri, uri_reference: true
|
|
@@ -28,7 +28,7 @@ module Glossarist
|
|
|
28
28
|
predicate :criterion, namespace: Namespaces::GlossaristNamespace,
|
|
29
29
|
to: :criterion
|
|
30
30
|
|
|
31
|
-
members :generic_members, link: "gloss:
|
|
31
|
+
members :generic_members, link: "gloss:hasMember"
|
|
32
32
|
end
|
|
33
33
|
|
|
34
34
|
def self.deterministic_id(rel)
|
|
@@ -17,7 +17,7 @@ module Glossarist
|
|
|
17
17
|
|
|
18
18
|
subject { |r| "partitiveRelation/#{GlossPartitiveRelation.deterministic_id(r)}" }
|
|
19
19
|
|
|
20
|
-
types "gloss:
|
|
20
|
+
types "gloss:PartitiveRelation"
|
|
21
21
|
|
|
22
22
|
predicate :comprehensive, namespace: Namespaces::GlossaristNamespace,
|
|
23
23
|
to: :comprehensive_uri, uri_reference: true
|
|
@@ -28,7 +28,7 @@ module Glossarist
|
|
|
28
28
|
predicate :criterion, namespace: Namespaces::GlossaristNamespace,
|
|
29
29
|
to: :criterion
|
|
30
30
|
|
|
31
|
-
members :partitive_members, link: "gloss:
|
|
31
|
+
members :partitive_members, link: "gloss:hasMember"
|
|
32
32
|
end
|
|
33
33
|
|
|
34
34
|
def self.deterministic_id(rel)
|
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.14.
|
|
4
|
+
version: 2.14.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-10-
|
|
11
|
+
date: 2026-10-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: lutaml-model
|
|
@@ -259,6 +259,7 @@ files:
|
|
|
259
259
|
- lib/glossarist/errors.rb
|
|
260
260
|
- lib/glossarist/errors/base.rb
|
|
261
261
|
- lib/glossarist/errors/cache_version_mismatch_error.rb
|
|
262
|
+
- lib/glossarist/errors/cli_error.rb
|
|
262
263
|
- lib/glossarist/errors/invalid_language_code_error.rb
|
|
263
264
|
- lib/glossarist/errors/invalid_type_error.rb
|
|
264
265
|
- lib/glossarist/errors/load_error.rb
|