suma 0.5.27 → 0.5.29
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/Gemfile +9 -8
- data/lib/suma/cli/build.rb +4 -0
- data/lib/suma/cli/core.rb +3 -0
- data/lib/suma/processor.rb +4 -1
- data/lib/suma/schema_collection.rb +1 -0
- data/lib/suma/schema_compiler.rb +8 -2
- data/lib/suma/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: ffb0f87fa6309d64f93f718a96e47dc97fbda03c5619d909f606b637550cf4f3
|
|
4
|
+
data.tar.gz: a300cc11dbd47fba84709667ff19268ba587d1bc488d30f2816b9bed7d55eb42
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3329c71077d4a0e462c4607a092e125996611ed9dccf0c7f606abc65aea88a9a3b874f4242c325150d0db514874671a3f64a78a6624a68470005c2381aca5729
|
|
7
|
+
data.tar.gz: dbaa802f59ab17e9250b354e0c4c80fafd4f7e2d0f80c3233c92ad3067190d9b025d507d402d263786c8f17d8706233998fa52c02118854d8e1d727789fafdb5
|
data/Gemfile
CHANGED
|
@@ -39,9 +39,11 @@ gem "metanorma-core", github: "metanorma/metanorma-core", branch: "main"
|
|
|
39
39
|
# and crashes collection renders. Revert to the released gem once an
|
|
40
40
|
# isodoc release carries the allowance.
|
|
41
41
|
gem "isodoc", github: "metanorma/isodoc", branch: "main"
|
|
42
|
-
# relaton
|
|
43
|
-
#
|
|
44
|
-
|
|
42
|
+
# relaton floor: isodoc main (post-relaton#462 consolidation) requires
|
|
43
|
+
# relaton ~> 3.1.1 -- the consolidated relaton gem absorbed
|
|
44
|
+
# relaton-cli/relaton-render, whose standalone lines stop being the
|
|
45
|
+
# interface.
|
|
46
|
+
gem "relaton", "~> 3.1.1"
|
|
45
47
|
# gem "metanorma-plugin-lutaml", github: "metanorma/metanorma-plugin-lutaml", branch: "main"
|
|
46
48
|
# gem "metanorma-standoc", github: "metanorma/metanorma-standoc", branch: "main"
|
|
47
49
|
# gem "expressir", github: "lutaml/expressir", branch: "main"
|
|
@@ -63,8 +65,7 @@ gem "rubocop-rspec"
|
|
|
63
65
|
# this shim (verified: HTML builds LoadError without it).
|
|
64
66
|
# Re-evaluate once suma rides released isodoc.
|
|
65
67
|
gem "sassc-embedded", "~> 1.0"
|
|
66
|
-
# relaton-
|
|
67
|
-
#
|
|
68
|
-
#
|
|
69
|
-
#
|
|
70
|
-
gem "relaton-bib", "2.1.9"
|
|
68
|
+
# The standalone relaton-bib pin is gone with the relaton#462
|
|
69
|
+
# consolidation: relaton ~> 3.1.1 embeds Relaton::Bib, and loading the
|
|
70
|
+
# standalone gem alongside it double-defines every Relaton class
|
|
71
|
+
# (RequestError superclass mismatch at require "metanorma").
|
data/lib/suma/cli/build.rb
CHANGED
|
@@ -10,6 +10,9 @@ module Suma
|
|
|
10
10
|
"Build collection specified in site manifest (`metanorma*.yml`)"
|
|
11
11
|
option :compile, type: :boolean, default: true,
|
|
12
12
|
desc: "Compile or skip compile of collection"
|
|
13
|
+
option :ext, type: :string, aliases: "-x",
|
|
14
|
+
desc: "Comma-separated schema-doc output formats " \
|
|
15
|
+
"(e.g. html) - overrides the template defaults"
|
|
13
16
|
option :schemas_all_path, type: :string, aliases: "-s",
|
|
14
17
|
desc: "Generate file that contains all schemas in the collection."
|
|
15
18
|
option :staged, type: :boolean, default: false,
|
|
@@ -100,6 +103,7 @@ module Suma
|
|
|
100
103
|
sign_method: options[:sign],
|
|
101
104
|
sign_key: options[:sign_key],
|
|
102
105
|
no_valid: options[:no_valid],
|
|
106
|
+
ext: options[:ext],
|
|
103
107
|
unresolved_eref_markers: options[:unresolved_eref_markers],
|
|
104
108
|
**staged_options(options),
|
|
105
109
|
).run
|
data/lib/suma/cli/core.rb
CHANGED
|
@@ -67,6 +67,9 @@ module Suma
|
|
|
67
67
|
|
|
68
68
|
desc "generate-schemas METANORMA_MANIFEST_FILE SCHEMA_MANIFEST_FILE",
|
|
69
69
|
"Generate EXPRESS schema manifest file from Metanorma site manifest"
|
|
70
|
+
option :exclude_paths, type: :string, aliases: "-e",
|
|
71
|
+
desc: "Exclude schemas paths by pattern " \
|
|
72
|
+
"(e.g. `*_lf.exp`)"
|
|
70
73
|
def generate_schemas(_metanorma_manifest_file, _schema_manifest_file)
|
|
71
74
|
Cli::GenerateSchemas.start
|
|
72
75
|
end
|
data/lib/suma/processor.rb
CHANGED
|
@@ -18,7 +18,8 @@ module Suma
|
|
|
18
18
|
staged_reinflate_shard: nil,
|
|
19
19
|
incremental: false, state_file: nil, jobs: 1,
|
|
20
20
|
provenance_file: nil, sign_method: nil, sign_key: nil,
|
|
21
|
-
no_valid: false, unresolved_eref_markers: false
|
|
21
|
+
no_valid: false, unresolved_eref_markers: false,
|
|
22
|
+
ext: nil)
|
|
22
23
|
@metanorma_yaml_path = metanorma_yaml_path
|
|
23
24
|
@schemas_all_path = schemas_all_path
|
|
24
25
|
@compile_flag = compile
|
|
@@ -40,6 +41,7 @@ module Suma
|
|
|
40
41
|
# Skip Metanorma document validation (metanorma `--no-valid`). Opt-in:
|
|
41
42
|
# for collections whose flavor's validators are still in flight.
|
|
42
43
|
@no_valid = no_valid
|
|
44
|
+
@ext = ext
|
|
43
45
|
@unresolved_eref_markers = unresolved_eref_markers
|
|
44
46
|
end
|
|
45
47
|
|
|
@@ -147,6 +149,7 @@ module Suma
|
|
|
147
149
|
state_file: @state_file,
|
|
148
150
|
jobs: @jobs,
|
|
149
151
|
no_valid: @no_valid,
|
|
152
|
+
ext: @ext,
|
|
150
153
|
},
|
|
151
154
|
)
|
|
152
155
|
|
data/lib/suma/schema_compiler.rb
CHANGED
|
@@ -23,12 +23,14 @@ module Suma
|
|
|
23
23
|
|
|
24
24
|
attr_reader :schema, :id, :output_path, :template
|
|
25
25
|
|
|
26
|
-
def initialize(schema:, output_path:, template:, no_valid: false
|
|
26
|
+
def initialize(schema:, output_path:, template:, no_valid: false,
|
|
27
|
+
extensions: nil)
|
|
27
28
|
@schema = schema
|
|
28
29
|
@id = schema.id
|
|
29
30
|
@output_path = output_path
|
|
30
31
|
@template = template
|
|
31
32
|
@no_valid = no_valid
|
|
33
|
+
@extensions_override = extensions
|
|
32
34
|
end
|
|
33
35
|
|
|
34
36
|
def compile
|
|
@@ -48,13 +50,17 @@ module Suma
|
|
|
48
50
|
end
|
|
49
51
|
|
|
50
52
|
def extensions
|
|
51
|
-
template.extensions
|
|
53
|
+
@extensions_override || template.extensions
|
|
52
54
|
end
|
|
53
55
|
|
|
54
56
|
# Options handed to Metanorma::Compile. Exposed for specs.
|
|
55
57
|
def compile_options
|
|
56
58
|
{ agree_to_terms: true, install_fonts: false }.tap do |options|
|
|
57
59
|
options[:novalid] = true if @no_valid
|
|
60
|
+
if @extensions_override
|
|
61
|
+
options[:extension_keys] =
|
|
62
|
+
@extensions_override.split(",").map(&:strip).map(&:to_sym)
|
|
63
|
+
end
|
|
58
64
|
end
|
|
59
65
|
end
|
|
60
66
|
|
data/lib/suma/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: suma
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.5.
|
|
4
|
+
version: 0.5.29
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-11-
|
|
11
|
+
date: 2026-11-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: expressir
|