metanorma-plugin-lutaml 0.7.28 → 0.7.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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3dd121eb5e209d2e11649e523ca637ec20c13776fc487a06b0f6f5c1bd0a6cfd
|
4
|
+
data.tar.gz: f6116b75a333054a2e5a9a39dbdafc558d8a4da566810dd75f9fe573beba56fc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e4ee32d5341f80f1c8792cc35e43c6f0d77a5eda123edf4ee4e7f5ba42ca68151213c7d5142549cf0bc681750f136f3a1b2821881653a99c69b1cf3da430ee2b
|
7
|
+
data.tar.gz: c361d3764d7895dde4d9bb545d7d3adc4ea3651892690424fff8a38945ccaaec41961cb207282ae76eef1d3d007e2ac624253b2659e242cbe3f204200f176069
|
@@ -48,23 +48,6 @@ module Metanorma
|
|
48
48
|
doc
|
49
49
|
end
|
50
50
|
|
51
|
-
def get_path_from_index(parent, index_name) # rubocop:disable Metrics/AbcSize,Metrics/MethodLength
|
52
|
-
lutaml_xmi_index = parent.document
|
53
|
-
.attributes["lutaml_xmi_index"][index_name]
|
54
|
-
|
55
|
-
if lutaml_xmi_index.nil? || lutaml_xmi_index[:path].nil?
|
56
|
-
::Metanorma::Util.log(
|
57
|
-
"[metanorma-plugin-lutaml] lutaml_xmi_index error: " \
|
58
|
-
"XMI index #{index_name} path not found!",
|
59
|
-
:error,
|
60
|
-
)
|
61
|
-
|
62
|
-
return nil
|
63
|
-
end
|
64
|
-
|
65
|
-
lutaml_xmi_index[:path]
|
66
|
-
end
|
67
|
-
|
68
51
|
def img_src_path(document, attrs, diagram)
|
69
52
|
base_path = attrs["base_path"]
|
70
53
|
format = attrs["format"] || "png"
|
@@ -85,6 +85,29 @@ module Metanorma
|
|
85
85
|
)
|
86
86
|
end
|
87
87
|
|
88
|
+
def get_xmi_path(parent, target, attrs)
|
89
|
+
return get_path_from_index(parent, attrs["index"]) if attrs["index"]
|
90
|
+
|
91
|
+
Utils.relative_file_path(parent.document, target)
|
92
|
+
end
|
93
|
+
|
94
|
+
def get_path_from_index(parent, index_name) # rubocop:disable Metrics/AbcSize,Metrics/MethodLength
|
95
|
+
lutaml_xmi_index = parent.document
|
96
|
+
.attributes["lutaml_xmi_index"][index_name]
|
97
|
+
|
98
|
+
if lutaml_xmi_index.nil? || lutaml_xmi_index[:path].nil?
|
99
|
+
::Metanorma::Util.log(
|
100
|
+
"[metanorma-plugin-lutaml] lutaml_xmi_index error: " \
|
101
|
+
"XMI index #{index_name} path not found!",
|
102
|
+
:error,
|
103
|
+
)
|
104
|
+
|
105
|
+
return nil
|
106
|
+
end
|
107
|
+
|
108
|
+
lutaml_xmi_index[:path]
|
109
|
+
end
|
110
|
+
|
88
111
|
def processed_lines(document, input_lines)
|
89
112
|
result = []
|
90
113
|
loop do
|
@@ -97,7 +120,7 @@ module Metanorma
|
|
97
120
|
self.class.const_get(:MACRO_REGEXP)
|
98
121
|
end
|
99
122
|
|
100
|
-
def process_xmi_index_lines(document, line)
|
123
|
+
def process_xmi_index_lines(document, line) # rubocop:disable Metrics/AbcSize
|
101
124
|
block_match = line.match(XMI_INDEX_REGEXP)
|
102
125
|
|
103
126
|
return if block_match.nil?
|
@@ -15,8 +15,8 @@ module Metanorma
|
|
15
15
|
use_dsl
|
16
16
|
named :lutaml_klass_table
|
17
17
|
|
18
|
-
def process(parent, target, attrs)
|
19
|
-
xmi_path =
|
18
|
+
def process(parent, target, attrs) # rubocop:disable Metrics/AbcSize,Metrics/MethodLength
|
19
|
+
xmi_path = get_xmi_path(parent, target, attrs)
|
20
20
|
|
21
21
|
if attrs["template"]
|
22
22
|
attrs["template"] = Utils.relative_file_path(
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
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.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: 2025-
|
11
|
+
date: 2025-05-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: asciidoctor
|