metanorma-plugin-lutaml 0.7.55.pre.alpha.1 → 0.7.55.pre.alpha.2
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 +3 -6
- data/Rakefile +1 -0
- data/lib/metanorma/plugin/lutaml/express_remark_adapter.rb +35 -1
- data/lib/metanorma/plugin/lutaml/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: 4df1a140d2fef0dd3a780ac070ab6f6a3906191da12c6d72b30883ad0217bf25
|
|
4
|
+
data.tar.gz: ad4569a0ce6ae86577978e7358de9e98c1955227755efa699a7182aca38ab428
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 31f6b4b4a670f661412cedc5cdb5538b074054f6618a35e06bfa15080af2dedba5075b237f163e4ba63e8ab99d95b92dc1ed8b99c35111a8abf588616fa62c37
|
|
7
|
+
data.tar.gz: 3edd282734af0e5b2d3f6e74daa6e5b9a310e51b022baca413ab00aac448a186a76d22ffb8e5924bacdf0c9c4aaf08b50ce877e2f63a22f83c3d536b68219258
|
data/Gemfile
CHANGED
|
@@ -37,9 +37,6 @@ gem "leptris", "~> 1.9.361.1"
|
|
|
37
37
|
gem "isodoc", github: "metanorma/isodoc", branch: "main"
|
|
38
38
|
gem "metanorma-standoc", github: "metanorma/metanorma-standoc", branch: "main"
|
|
39
39
|
gem "suma", github: "metanorma/suma", branch: "main"
|
|
40
|
-
# standoc main
|
|
41
|
-
#
|
|
42
|
-
|
|
43
|
-
# document main tree the suite is green against
|
|
44
|
-
gem "metanorma-document", github: "metanorma/metanorma-document",
|
|
45
|
-
ref: "ca4eb4b26f7ab0d2994a4710d0cf158607a832b4"
|
|
40
|
+
# standoc main (>= 3.5.1.pre.alpha.2) floors metanorma-document at
|
|
41
|
+
# 0.5.2.pre.alpha.1 (SvgmapElement, metanorma-standoc#1303); main carries it
|
|
42
|
+
gem "metanorma-document", github: "metanorma/metanorma-document", branch: "main"
|
data/Rakefile
CHANGED
|
@@ -10,6 +10,7 @@ XMI_HEAVY_SPEC_FILES = %w[
|
|
|
10
10
|
].freeze
|
|
11
11
|
|
|
12
12
|
XMI_SPEC_FILES = %w[
|
|
13
|
+
spec/metanorma/plugin/lutaml/lutaml_ea_uml_preprocessor_spec.rb
|
|
13
14
|
spec/metanorma/plugin/lutaml/lutaml_klass_table_block_macro_spec.rb
|
|
14
15
|
spec/metanorma/plugin/lutaml/lutaml_enum_table_block_macro_spec.rb
|
|
15
16
|
spec/metanorma/plugin/lutaml/lutaml_xmi_index_spec.rb
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require "expressir"
|
|
4
|
+
require "pathname"
|
|
4
5
|
|
|
5
6
|
module Metanorma
|
|
6
7
|
module Plugin
|
|
@@ -16,7 +17,17 @@ module Metanorma
|
|
|
16
17
|
)
|
|
17
18
|
resolved = document.path_resolver
|
|
18
19
|
.system_path(file_path, docfile_directory)
|
|
19
|
-
|
|
20
|
+
# The prefix lands inside emitted image macros, so it must not
|
|
21
|
+
# carry the absolute build path: two builds of the same tree in
|
|
22
|
+
# two directories produced different image/@src values
|
|
23
|
+
# (metanorma/metanorma-plugin-lutaml#325). A path relative to the
|
|
24
|
+
# docfile resolves to the same schema file at render time and is
|
|
25
|
+
# byte-identical across build directories.
|
|
26
|
+
# The docfile directory may be relative ("."): relative_path_from
|
|
27
|
+
# refuses mixed prefixes, so both sides expand first
|
|
28
|
+
Pathname.new(File.expand_path(resolved))
|
|
29
|
+
.relative_path_from(Pathname.new(File.expand_path(docfile_directory)))
|
|
30
|
+
.to_s
|
|
20
31
|
end
|
|
21
32
|
|
|
22
33
|
def self.for(model)
|
|
@@ -47,6 +58,7 @@ module Metanorma
|
|
|
47
58
|
end
|
|
48
59
|
|
|
49
60
|
def decorate_remarks(options)
|
|
61
|
+
promote_schema_prose
|
|
50
62
|
decorate_own_remarks(options)
|
|
51
63
|
decorate_child_remark_items(options)
|
|
52
64
|
traverse_children(options)
|
|
@@ -54,7 +66,29 @@ module Metanorma
|
|
|
54
66
|
|
|
55
67
|
private
|
|
56
68
|
|
|
69
|
+
# A bare (*"Schema_name" ...*) remark is the schema-level prose:
|
|
70
|
+
# expressir models it in Schema#remarks, not as a RemarkItem, so
|
|
71
|
+
# renders that walk remark_items (every clause-4 template) drop
|
|
72
|
+
# it (iso-10303#720). Promote it to a leading RemarkItem keyed
|
|
73
|
+
# by the schema path, the same way an entity-tagged remark names
|
|
74
|
+
# its target. The prose stays in Schema#remarks too; templates
|
|
75
|
+
# that already render it there keep working unchanged.
|
|
76
|
+
def promote_schema_prose
|
|
77
|
+
return unless @model.is_a?(Expressir::Model::Declarations::Schema)
|
|
78
|
+
return if @model.remarks.to_a.empty?
|
|
79
|
+
|
|
80
|
+
items = @model.remark_items.to_a
|
|
81
|
+
return if items.any? { |ri| ri.id == @model.id }
|
|
82
|
+
|
|
83
|
+
prose = Expressir::Model::Declarations::RemarkItem.new(
|
|
84
|
+
id: @model.id,
|
|
85
|
+
remarks: @model.remarks.dup,
|
|
86
|
+
)
|
|
87
|
+
@model.remark_items = [prose] + items
|
|
88
|
+
end
|
|
89
|
+
|
|
57
90
|
def decorate_own_remarks(options)
|
|
91
|
+
|
|
58
92
|
@model.remarks = ExpressRemarksDecorator.decorate_array(
|
|
59
93
|
@model.remarks, options
|
|
60
94
|
)
|
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.55.pre.alpha.
|
|
4
|
+
version: 0.7.55.pre.alpha.2
|
|
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-10-
|
|
11
|
+
date: 2026-10-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: asciidoctor
|