ea 0.6.182 → 0.6.183

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: a8f44a4f05bfc49ab0df67d631260b334c2d550bb7a8579272c57fdc6335c1fb
4
- data.tar.gz: 872e956c23de93a5d6e924da2f41d9e3202eca3de7a51efa7fac5a78216186b4
3
+ metadata.gz: 0f0fe4214ceecc675fb0e34ed58cee80366908d4424c6b9ab0a15db493d578e9
4
+ data.tar.gz: f16b57846d2bdc6cac9288a022c9560a2ba3cdd1863d5d7a3e6150e101278cfd
5
5
  SHA512:
6
- metadata.gz: 358ae9bd7191a26525ad964da4954b3e9de87672270b26cedfadaa6e7eb05cf47bede14cd3178192efd136544960284acaa84110eb3aef21ef13a8fa9bb47cc5
7
- data.tar.gz: 313009cbb3a6abff15eb72c9cb2972f2408fe2fbba7d124643878a05888bf04edef4803ef69203072cd1f20a2af24f40cc85e03b8e8a5969bddfabb7fe0ba2c4
6
+ metadata.gz: fbcd6266bf3c9b6d4ead3fe3c36610df36d9bd3c01a63ac5691bfcadf9326a56a78fc4b4854c1d11feb7e0e3c44a7bf5369d14b240d76c10e3332a1168f495d9
7
+ data.tar.gz: c59b96578cf7907b46fb7f56c13bc295c9b0c33a1e4c3181302f9d31908c784c4b65a3c9d6a695d25fdf052807f6f1ca5c48be9825b010b4c7f8ae63b168c3ef
@@ -29,7 +29,8 @@ module Ea
29
29
  ea_object.note.nil? || ea_object.note.empty?
30
30
 
31
31
  # Load and transform attributes
32
- data_type.attributes = load_attributes(ea_object.ea_object_id)
32
+ data_type.attributes = load_attributes(ea_object.ea_object_id) +
33
+ association_attributes(ea_object.ea_object_id)
33
34
 
34
35
  # Load and transform operations
35
36
  data_type.operations = load_operations(ea_object.ea_object_id)
@@ -52,6 +53,28 @@ module Ea
52
53
  end
53
54
  end
54
55
 
56
+ # Association-end roles of a data type, appended to its attributes
57
+ # by name as EA's export lists them there; the data type's table
58
+ # renders them as its own association roles.
59
+ # @param object_id [Integer] Object ID
60
+ # @return [Array<Lutaml::Uml::TopElementAttribute>] UML attributes
61
+ def association_attributes(object_id)
62
+ return [] if object_id.nil?
63
+
64
+ AssociationBuilder.new(database)
65
+ .load_association_attributes(object_id)
66
+ .sort_by { |attr| attr.name.to_s.downcase }
67
+ .map do |attr|
68
+ Lutaml::Uml::TopElementAttribute.instantiate(
69
+ name: attr.name,
70
+ type: attr.type,
71
+ cardinality: attr.cardinality,
72
+ definition: attr.definition,
73
+ association: attr.association
74
+ )
75
+ end
76
+ end
77
+
55
78
  private
56
79
 
57
80
  # The generalization of a data type that has a parent; nil for a root one
@@ -117,6 +117,7 @@ module Ea
117
117
  lookup: lookup,
118
118
  xmi_root_model: RootModelFacade.new,
119
119
  with_gen: true,
120
+ with_assoc: true,
120
121
  with_absolute_path: true
121
122
  }
122
123
  end
data/lib/ea/version.rb CHANGED
@@ -4,5 +4,5 @@ module Ea
4
4
  # Gem release version. Extracted to its own file so the
5
5
  # `gem-release` tool's `gem bump` can find and update it via the
6
6
  # standard `lib/<gem>/version.rb` convention.
7
- VERSION = "0.6.182".freeze
7
+ VERSION = "0.6.183".freeze
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ea
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.182
4
+ version: 0.6.183
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.