metanorma-plugin-lutaml 0.7.88 → 0.7.89
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a9593fc7c8cc907059585053bfb0f26590b838a0f692a552dbfcb29a6536b3b5
|
|
4
|
+
data.tar.gz: 9f44c2f283bc637ae1a566510ae04c045ce33cf15a303538928dc17920509ef5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 40cdafa865358d44fcc703795a39002b5d43509116182e49cc3b0241018276ab00e87531d38823ee984bf3d8b211db0e824224921ec3871622dfa62b44336313
|
|
7
|
+
data.tar.gz: 10addd80253aa7507aeb093e40e1bfd830f7dd8083711d90de0bbe5f2e3a325d9a99e1dce72aa2c953631771bbc13eb712f989658c632959902f3f196a1a498b
|
|
@@ -37,7 +37,11 @@ module Metanorma
|
|
|
37
37
|
end
|
|
38
38
|
else
|
|
39
39
|
file = File.new(full_path, encoding: "UTF-8")
|
|
40
|
-
|
|
40
|
+
# The lutaml monogem front door (lutaml-lml >= 0.3.8 shims it):
|
|
41
|
+
# Source.wrap reads the File's contents and carries its path for
|
|
42
|
+
# imports. The bare Parser.parse would grammar-parse the File's
|
|
43
|
+
# PATH STRING - its contract is an in-memory input.
|
|
44
|
+
::Lutaml::Lml.parse(file)
|
|
41
45
|
end
|
|
42
46
|
end
|
|
43
47
|
|
|
@@ -271,7 +271,13 @@ module Metanorma
|
|
|
271
271
|
|
|
272
272
|
file_paths = yaml_content["schemas"].map do |key, value|
|
|
273
273
|
schema_path = Pathname.new(value["path"] || "#{key}.exp")
|
|
274
|
-
|
|
274
|
+
# Absolute, not cleanpath: an index yaml whose schema paths
|
|
275
|
+
# escape its own directory (../../schemas/...) keeps its ..
|
|
276
|
+
# segments under cleanpath, and the figure decoration's
|
|
277
|
+
# system_path then cannot resolve the schema directory - the
|
|
278
|
+
# FATAL-Image-not-found of metanorma-plugin-lutaml#377.
|
|
279
|
+
# expand_path resolves the real location at any depth.
|
|
280
|
+
File.expand_path(schema_yaml_base_path + schema_path).to_s
|
|
275
281
|
end
|
|
276
282
|
|
|
277
283
|
parse_express_files(file_paths)
|
|
@@ -120,7 +120,7 @@ yaml_config_path = nil)
|
|
|
120
120
|
end
|
|
121
121
|
|
|
122
122
|
::Ea::Xmi::LiquidDrops::KlassDrop.new(
|
|
123
|
-
klass, guidance, parsed
|
|
123
|
+
klass, guidance, guided_drop_options(parsed, guidance)
|
|
124
124
|
)
|
|
125
125
|
end
|
|
126
126
|
|
|
@@ -136,7 +136,7 @@ yaml_config_path = nil)
|
|
|
136
136
|
end
|
|
137
137
|
|
|
138
138
|
::Ea::Xmi::LiquidDrops::DataTypeDrop.new(
|
|
139
|
-
datatype, guidance, parsed
|
|
139
|
+
datatype, guidance, guided_drop_options(parsed, guidance)
|
|
140
140
|
)
|
|
141
141
|
end
|
|
142
142
|
|
|
@@ -156,6 +156,21 @@ yaml_config_path = nil)
|
|
|
156
156
|
)
|
|
157
157
|
end
|
|
158
158
|
|
|
159
|
+
# Loader.build_drop_options banks a guidance-less LookupService in
|
|
160
|
+
# the cached parse - guidance arrives per macro invocation, after
|
|
161
|
+
# the parse is banked - so the drop's init_guidance lookup branch
|
|
162
|
+
# indexes an empty guidance set and every attribute renders
|
|
163
|
+
# Used/Guidance empty (metanorma-plugin-lutaml#409). Rebuild the
|
|
164
|
+
# lookup with the invocation's guidance; the service memoizes its
|
|
165
|
+
# indexes lazily, so this is one small object per drop.
|
|
166
|
+
def guided_drop_options(parsed, guidance)
|
|
167
|
+
return parsed.drop_options unless guidance
|
|
168
|
+
|
|
169
|
+
parsed.drop_options.merge(
|
|
170
|
+
lookup: ::Ea::Xmi::LookupService.new(parsed.parser, guidance),
|
|
171
|
+
)
|
|
172
|
+
end
|
|
173
|
+
|
|
159
174
|
private
|
|
160
175
|
|
|
161
176
|
def resolve_packaged_klass(parsed, name)
|
|
@@ -43,9 +43,14 @@ Gem::Specification.new do |spec|
|
|
|
43
43
|
spec.add_dependency "expressir", "~> 2.3", ">= 2.3.5"
|
|
44
44
|
spec.add_dependency "isodoc", ">= 3.5.0"
|
|
45
45
|
spec.add_dependency "liquid", "~> 5"
|
|
46
|
-
spec.add_dependency "lutaml-jsonschema", "~> 0.1", ">= 0.1.29"
|
|
47
46
|
spec.add_dependency "lutaml-graphviz"
|
|
48
|
-
spec.add_dependency "lutaml-
|
|
47
|
+
spec.add_dependency "lutaml-jsonschema", "~> 0.1", ">= 0.1.29"
|
|
48
|
+
# >= 0.3.8: floors away the parslet-era 0.1.5 (whose Lutaml::Lml::Parser
|
|
49
|
+
# has no class-level parse - metanorma-plugin-lutaml#361's silent
|
|
50
|
+
# resolver fallback) and 0.3.6's parsanol ~> 1.3.68 pin (which conflicts
|
|
51
|
+
# with the parsanol 1.5 fleet). 0.3.8 is a shim carrying the lutaml
|
|
52
|
+
# monogem dependency; the parser lives in lutaml >= 0.11.8.
|
|
53
|
+
spec.add_dependency "lutaml-lml", ">= 0.3.8"
|
|
49
54
|
spec.add_dependency "lutaml-model", "~> 0.8.159"
|
|
50
55
|
# >= 1.0.4: Lutaml::Uml::Value#initial (enum literal codes) — required by
|
|
51
56
|
# ea >= 0.6.151+ which writes initial values during XMI parsing.
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: metanorma-plugin-lutaml
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.7.
|
|
4
|
+
version: 0.7.89
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
@@ -129,53 +129,53 @@ dependencies:
|
|
|
129
129
|
- !ruby/object:Gem::Version
|
|
130
130
|
version: '5'
|
|
131
131
|
- !ruby/object:Gem::Dependency
|
|
132
|
-
name: lutaml-
|
|
132
|
+
name: lutaml-graphviz
|
|
133
133
|
requirement: !ruby/object:Gem::Requirement
|
|
134
134
|
requirements:
|
|
135
|
-
- - "~>"
|
|
136
|
-
- !ruby/object:Gem::Version
|
|
137
|
-
version: '0.1'
|
|
138
135
|
- - ">="
|
|
139
136
|
- !ruby/object:Gem::Version
|
|
140
|
-
version: 0
|
|
137
|
+
version: '0'
|
|
141
138
|
type: :runtime
|
|
142
139
|
prerelease: false
|
|
143
140
|
version_requirements: !ruby/object:Gem::Requirement
|
|
144
141
|
requirements:
|
|
145
|
-
- - "~>"
|
|
146
|
-
- !ruby/object:Gem::Version
|
|
147
|
-
version: '0.1'
|
|
148
142
|
- - ">="
|
|
149
143
|
- !ruby/object:Gem::Version
|
|
150
|
-
version: 0
|
|
144
|
+
version: '0'
|
|
151
145
|
- !ruby/object:Gem::Dependency
|
|
152
|
-
name: lutaml-
|
|
146
|
+
name: lutaml-jsonschema
|
|
153
147
|
requirement: !ruby/object:Gem::Requirement
|
|
154
148
|
requirements:
|
|
149
|
+
- - "~>"
|
|
150
|
+
- !ruby/object:Gem::Version
|
|
151
|
+
version: '0.1'
|
|
155
152
|
- - ">="
|
|
156
153
|
- !ruby/object:Gem::Version
|
|
157
|
-
version:
|
|
154
|
+
version: 0.1.29
|
|
158
155
|
type: :runtime
|
|
159
156
|
prerelease: false
|
|
160
157
|
version_requirements: !ruby/object:Gem::Requirement
|
|
161
158
|
requirements:
|
|
159
|
+
- - "~>"
|
|
160
|
+
- !ruby/object:Gem::Version
|
|
161
|
+
version: '0.1'
|
|
162
162
|
- - ">="
|
|
163
163
|
- !ruby/object:Gem::Version
|
|
164
|
-
version:
|
|
164
|
+
version: 0.1.29
|
|
165
165
|
- !ruby/object:Gem::Dependency
|
|
166
166
|
name: lutaml-lml
|
|
167
167
|
requirement: !ruby/object:Gem::Requirement
|
|
168
168
|
requirements:
|
|
169
169
|
- - ">="
|
|
170
170
|
- !ruby/object:Gem::Version
|
|
171
|
-
version:
|
|
171
|
+
version: 0.3.8
|
|
172
172
|
type: :runtime
|
|
173
173
|
prerelease: false
|
|
174
174
|
version_requirements: !ruby/object:Gem::Requirement
|
|
175
175
|
requirements:
|
|
176
176
|
- - ">="
|
|
177
177
|
- !ruby/object:Gem::Version
|
|
178
|
-
version:
|
|
178
|
+
version: 0.3.8
|
|
179
179
|
- !ruby/object:Gem::Dependency
|
|
180
180
|
name: lutaml-model
|
|
181
181
|
requirement: !ruby/object:Gem::Requirement
|