ea 0.6.87 → 0.6.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: bbd238ad74b281cd5cb44ae2df2b49edd56eec8ab0001f8cf1694259a974c385
|
|
4
|
+
data.tar.gz: 978f6880bb2ffa3a9fd308047c62dd21e0869305ea832ac64b91de9f1c8303e9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 44a797e58abb32b6434cb83eec2d84270a6499dc3c8d986a6da1a68da1074982a9217655d20e835bd5fe8812c8780a7a9775a9495d970cf0eb849694b0d6d9d3
|
|
7
|
+
data.tar.gz: 0c410271301a481b5085d7be62a2f45de58eb7fe46cad199e69e0f0f017f7648f4646305f2853ce248c5f6c62979f31c8d7087b7526945234315b8b6b6f63833
|
data/lib/ea/version.rb
CHANGED
|
@@ -4,10 +4,11 @@ module Ea
|
|
|
4
4
|
module Xmi
|
|
5
5
|
module LiquidDrops
|
|
6
6
|
class AttributeDrop < Liquid::Drop
|
|
7
|
-
def initialize(model, options = {}) # rubocop:disable Lint/MissingSuper
|
|
7
|
+
def initialize(model, options = {}, guidance = nil) # rubocop:disable Lint/MissingSuper
|
|
8
8
|
@model = model
|
|
9
9
|
@options = options
|
|
10
10
|
@lookup = options[:lookup]
|
|
11
|
+
@guidance = guidance
|
|
11
12
|
end
|
|
12
13
|
|
|
13
14
|
def id
|
|
@@ -43,7 +44,7 @@ module Ea
|
|
|
43
44
|
|
|
44
45
|
if defn.nil? || defn.empty?
|
|
45
46
|
defn = @lookup.lookup_connector_def_by_associationclass(
|
|
46
|
-
@model.association
|
|
47
|
+
@model.association
|
|
47
48
|
)
|
|
48
49
|
end
|
|
49
50
|
|
|
@@ -51,29 +52,48 @@ module Ea
|
|
|
51
52
|
end
|
|
52
53
|
|
|
53
54
|
def association
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
return unless @options[:with_assoc] && @model.association
|
|
56
|
+
|
|
57
|
+
@model.association
|
|
57
58
|
end
|
|
58
59
|
|
|
59
60
|
def association_connector
|
|
60
61
|
return unless @model.association
|
|
61
62
|
|
|
62
63
|
connector = @lookup.fetch_connector(@model.association)
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
return unless connector
|
|
65
|
+
|
|
66
|
+
::Ea::Xmi::LiquidDrops::ConnectorDrop.new(connector, @options)
|
|
66
67
|
end
|
|
67
68
|
|
|
68
69
|
def type_ns
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
return unless @options[:with_assoc] && @model.association
|
|
71
|
+
|
|
72
|
+
@model.type_ns
|
|
72
73
|
end
|
|
73
74
|
|
|
74
75
|
def stereotype
|
|
75
76
|
@lookup.doc_node_attribute_value(@model.xmi_id, "stereotype")
|
|
76
77
|
end
|
|
78
|
+
|
|
79
|
+
def used?
|
|
80
|
+
if @guidance
|
|
81
|
+
col_name = name
|
|
82
|
+
attr = @guidance["attributes"].find { |a| a["name"] == col_name }
|
|
83
|
+
return attr["used"].to_s if attr
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
"true"
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
def guidance
|
|
90
|
+
return unless @guidance
|
|
91
|
+
|
|
92
|
+
col_name = name
|
|
93
|
+
attr = @guidance["attributes"].find { |a| a["name"] == col_name }
|
|
94
|
+
|
|
95
|
+
attr["guidance"] if attr
|
|
96
|
+
end
|
|
77
97
|
end
|
|
78
98
|
end
|
|
79
99
|
end
|
|
@@ -49,8 +49,8 @@ module Ea
|
|
|
49
49
|
def attributes
|
|
50
50
|
Array(@model.attributes).filter_map do |owned_attr|
|
|
51
51
|
if @options[:with_assoc] || owned_attr.association.nil?
|
|
52
|
-
::Ea::Xmi::LiquidDrops::AttributeDrop
|
|
53
|
-
|
|
52
|
+
::Ea::Xmi::LiquidDrops::AttributeDrop
|
|
53
|
+
.new(owned_attr, @options, @data_type_guidance)
|
|
54
54
|
end
|
|
55
55
|
end
|
|
56
56
|
end
|
|
@@ -87,16 +87,17 @@ module Ea
|
|
|
87
87
|
|
|
88
88
|
def owned_attributes
|
|
89
89
|
Array(@model.attributes).filter_map do |owned_attr|
|
|
90
|
-
::Ea::Xmi::LiquidDrops::AttributeDrop
|
|
90
|
+
::Ea::Xmi::LiquidDrops::AttributeDrop
|
|
91
|
+
.new(owned_attr, @options, @data_type_guidance)
|
|
91
92
|
end
|
|
92
93
|
end
|
|
93
94
|
|
|
94
95
|
def generalization
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
96
|
+
return unless @model.generalization
|
|
97
|
+
|
|
98
|
+
::Ea::Xmi::LiquidDrops::GeneralizationDrop.new(
|
|
99
|
+
@model.generalization, @data_type_guidance, @options
|
|
100
|
+
)
|
|
100
101
|
end
|
|
101
102
|
|
|
102
103
|
def has_guidance?
|
|
@@ -74,12 +74,12 @@ module Ea
|
|
|
74
74
|
end
|
|
75
75
|
|
|
76
76
|
def guidance
|
|
77
|
-
|
|
78
|
-
col_name = "#{name_ns}:#{name}"
|
|
79
|
-
attr = @guidance["attributes"].find { |a| a["name"] == col_name }
|
|
77
|
+
return unless @guidance
|
|
80
78
|
|
|
81
|
-
|
|
82
|
-
|
|
79
|
+
col_name = "#{name_ns}:#{name}"
|
|
80
|
+
attr = @guidance["attributes"].find { |a| a["name"] == col_name }
|
|
81
|
+
|
|
82
|
+
attr["guidance"] if attr
|
|
83
83
|
end
|
|
84
84
|
end
|
|
85
85
|
end
|
|
@@ -65,8 +65,8 @@ module Ea
|
|
|
65
65
|
|
|
66
66
|
links.flat_map do |link|
|
|
67
67
|
link.generalization
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
.select { |gen| gen.end == @model.xmi_id }
|
|
69
|
+
.map(&:id)
|
|
70
70
|
end.compact
|
|
71
71
|
end
|
|
72
72
|
|
|
@@ -79,7 +79,7 @@ module Ea
|
|
|
79
79
|
::Ea::Xmi::LiquidDrops::PackageDrop.new(
|
|
80
80
|
build_uml_package(xmi_pkg),
|
|
81
81
|
@guidance,
|
|
82
|
-
@options.merge(absolute_path: "#{@options[:absolute_path]}::#{name}")
|
|
82
|
+
@options.merge(absolute_path: "#{@options[:absolute_path]}::#{name}")
|
|
83
83
|
)
|
|
84
84
|
end
|
|
85
85
|
|
|
@@ -104,14 +104,16 @@ module Ea
|
|
|
104
104
|
def attributes
|
|
105
105
|
Array(@model.attributes).filter_map do |owned_attr|
|
|
106
106
|
if @options[:with_assoc] || owned_attr.association.nil?
|
|
107
|
-
::Ea::Xmi::LiquidDrops::AttributeDrop
|
|
107
|
+
::Ea::Xmi::LiquidDrops::AttributeDrop
|
|
108
|
+
.new(owned_attr, @options, @klass_guidance)
|
|
108
109
|
end
|
|
109
110
|
end
|
|
110
111
|
end
|
|
111
112
|
|
|
112
113
|
def owned_attributes
|
|
113
114
|
Array(@model.attributes).filter_map do |owned_attr|
|
|
114
|
-
::Ea::Xmi::LiquidDrops::AttributeDrop
|
|
115
|
+
::Ea::Xmi::LiquidDrops::AttributeDrop
|
|
116
|
+
.new(owned_attr, @options, @klass_guidance)
|
|
115
117
|
end
|
|
116
118
|
end
|
|
117
119
|
|
|
@@ -153,18 +155,18 @@ module Ea
|
|
|
153
155
|
end
|
|
154
156
|
|
|
155
157
|
def generalization
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
158
|
+
return unless @options[:with_gen] && @model.generalization
|
|
159
|
+
|
|
160
|
+
::Ea::Xmi::LiquidDrops::GeneralizationDrop.new(
|
|
161
|
+
@model.generalization, @klass_guidance, @options
|
|
162
|
+
)
|
|
161
163
|
end
|
|
162
164
|
|
|
163
165
|
def upper_packaged_element
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
166
|
+
return unless @options[:with_gen]
|
|
167
|
+
|
|
168
|
+
e = @lookup.find_upper_level_packaged_element(@model.xmi_id)
|
|
169
|
+
e&.name
|
|
168
170
|
end
|
|
169
171
|
|
|
170
172
|
def subtype_of
|
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.89
|
|
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-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: lutaml-model
|