ea 0.6.1 → 0.6.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/lib/ea/transformers/qea_to_xmi/transformer.rb +5 -31
- data/lib/ea/version.rb +1 -1
- data/lib/ea/xmi/liquid_drops/klass_drop.rb +4 -1
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3b0b9e4dd48f98c9303cfd774e2cb79ebc35708b06162ce7cf0209b1a0a02576
|
|
4
|
+
data.tar.gz: a17bc5f257db914d34fb85dfccbcc718471bdf80193d2da8c3a94a633e77b0c6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bd97806699c81e8030479b3869259cc577948a23f2304e222fdee4223ec2850dfe3465fe804fef4db5956369b61fa61fcdb3d70ab5b5c76f41bb53d6815d5db3
|
|
7
|
+
data.tar.gz: 0af30d1a1650edb29a3c5c5c8e1f840306c806848d21876ec4bf5fa0b5825c9a7efccbc32f409605bf7b01616f7e8e8c811691a3582316a56d528ba70b9ff8b3
|
|
@@ -109,39 +109,9 @@ module Ea
|
|
|
109
109
|
def serialize(with_extensions: true)
|
|
110
110
|
xml = build_root.to_xml(use_prefix: true)
|
|
111
111
|
xml = normalize_namespaces(xml)
|
|
112
|
-
xml = plain_parameter_type(xml)
|
|
113
112
|
with_extensions ? inject_extension_content(xml) : xml
|
|
114
113
|
end
|
|
115
114
|
|
|
116
|
-
# EA writes a return parameter's type unprefixed:
|
|
117
|
-
# `<ownedParameter … type="EAnone_void"/>`. Its reference export
|
|
118
|
-
# carries 12 of these and no `xmi:type` on ownedParameter at all.
|
|
119
|
-
#
|
|
120
|
-
# `xmi:type` is the XMI metaclass discriminator; `type` is the
|
|
121
|
-
# classifier reference. Two different attributes — but
|
|
122
|
-
# lutaml-model matches by local name and collapses them into one
|
|
123
|
-
# slot, so the xmi gem can only emit one of them. It keeps the
|
|
124
|
-
# namespaced form, which is right for general UML XMI, and
|
|
125
|
-
# rewriting that in the shared model would break round-tripping
|
|
126
|
-
# for every non-Sparx consumer. Restoring the reference EA
|
|
127
|
-
# actually writes is this exporter's job, so it happens here.
|
|
128
|
-
#
|
|
129
|
-
# Scoped to ownedParameter: no other element wants it. Walks
|
|
130
|
-
# complete name="value" pairs rather than scanning the tag as
|
|
131
|
-
# text — a parameter name is free text out of EA and may itself
|
|
132
|
-
# contain the literal `xmi:type=`, which a raw substitution
|
|
133
|
-
# would happily rewrite inside the quotes.
|
|
134
|
-
ATTRIBUTE_PAIR = /([A-Za-z_][\w:.-]*)=("[^"]*")/
|
|
135
|
-
|
|
136
|
-
def plain_parameter_type(xml)
|
|
137
|
-
xml.gsub(/<ownedParameter\b[^>]*?>/m) do |tag|
|
|
138
|
-
tag.gsub(ATTRIBUTE_PAIR) do
|
|
139
|
-
name = Regexp.last_match(1)
|
|
140
|
-
name == "xmi:type" ? %(type=#{Regexp.last_match(2)}) : Regexp.last_match(0)
|
|
141
|
-
end
|
|
142
|
-
end
|
|
143
|
-
end
|
|
144
|
-
|
|
145
115
|
# EA's reference XMI uses the 2011-07-01 XMI/UML namespace URIs;
|
|
146
116
|
# the xmi gem's Root model hard-codes 2013-10-01. Post-process
|
|
147
117
|
# the serialized XML to match EA's namespace version. This is a
|
|
@@ -744,7 +714,11 @@ module Ea
|
|
|
744
714
|
),
|
|
745
715
|
name: "return",
|
|
746
716
|
direction: "return",
|
|
747
|
-
|
|
717
|
+
# EA writes the classifier reference as the UNPREFIXED
|
|
718
|
+
# type= attribute; the xmi-namespaced xmi:type is the
|
|
719
|
+
# metaclass discriminator and stays unset here. The xmi
|
|
720
|
+
# gem's classifier_type slot round-trips EA's spelling.
|
|
721
|
+
classifier_type: type_reference(op.type, op.classifier),
|
|
748
722
|
)
|
|
749
723
|
end
|
|
750
724
|
|
data/lib/ea/version.rb
CHANGED
|
@@ -12,7 +12,10 @@ module Ea
|
|
|
12
12
|
@xmi_root_model = options[:xmi_root_model]
|
|
13
13
|
@id_name_mapping = options[:id_name_mapping]
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
# Drops are built for template rendering where the model
|
|
16
|
+
# may be absent (guidance-only lookups); the dependency
|
|
17
|
+
# walk needs a model to anchor on.
|
|
18
|
+
init_xmi_dependencies if @xmi_root_model && @model
|
|
16
19
|
init_guidance(guidance) if guidance
|
|
17
20
|
end
|
|
18
21
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ea
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.6.
|
|
4
|
+
version: 0.6.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-09-
|
|
11
|
+
date: 2026-09-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: lutaml-model
|
|
@@ -72,14 +72,14 @@ dependencies:
|
|
|
72
72
|
requirements:
|
|
73
73
|
- - "~>"
|
|
74
74
|
- !ruby/object:Gem::Version
|
|
75
|
-
version:
|
|
75
|
+
version: 0.7.5
|
|
76
76
|
type: :runtime
|
|
77
77
|
prerelease: false
|
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
|
79
79
|
requirements:
|
|
80
80
|
- - "~>"
|
|
81
81
|
- !ruby/object:Gem::Version
|
|
82
|
-
version:
|
|
82
|
+
version: 0.7.5
|
|
83
83
|
- !ruby/object:Gem::Dependency
|
|
84
84
|
name: nokogiri
|
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|