ea 0.6.79 → 0.6.80

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: e3198411c2599b4d10da26810f1aaa65134ec54b6c482346cf989e8a36605b98
4
- data.tar.gz: a88cff9bf3f801475eaa3b4ddd737bd302a75791f843d4be411712a61f9e5885
3
+ metadata.gz: 88ae713188a98ad67a7d37a19c456db4afdd37b9a957b1b711574449d9aefc00
4
+ data.tar.gz: a37042694b15d8bc53ee40460c74353655861e6f29154803cf6931e1875ffc61
5
5
  SHA512:
6
- metadata.gz: 7ee753de37ca671a0448d5c443419a9db99836b7a0abe237066df3e8d63c150eddb050f4768413a436122b9c5e3b5b822cb982a8faffd400567ccae7a0e3598b
7
- data.tar.gz: 04c2da26601bbd9ff9ed6697dda718f858c70af831797c990baabbbd7c55f714c7312ff850d82e6af5c409070f2748fc1273a72abd31af68cd3548d2abcb5611
6
+ metadata.gz: 2c8409d9068bc1e2dc6801e8b04bf57a0b8102a74b923a5069cd9cc24e08de6bf840bc8e2a8258fb6efada65c88c9be914192733ee4b717d77adfc0e65851b65
7
+ data.tar.gz: 5fbbd505f02490fec335a290084d05ad1d392f0d63b13fbd4752c312f7d01652d06560f4b0019e681ad48c304ddef2128c7e055fbe454f1fdc478e5b3aff616d
@@ -13,6 +13,7 @@ module Ea
13
13
  class Classifier < Base
14
14
  attribute :qualified_name, :string
15
15
  attribute :nested_parent_name, :string # t_object.ParentID owner class
16
+ attribute :gen_links_parent, :string # t_object.GenLinks 'Parent=X;' ghost
16
17
  attribute :package_id, :string # containing package
17
18
  attribute :package_name, :string # containing package name
18
19
  attribute :is_abstract, :boolean, default: false
@@ -31,6 +32,8 @@ module Ea
31
32
  map "id", to: :id
32
33
  map "name", to: :name
33
34
  map "qualifiedName", to: :qualified_name
35
+ map "nestedParentName", to: :nested_parent_name
36
+ map "genLinksParent", to: :gen_links_parent
34
37
  map "packageId", to: :package_id
35
38
  map "packageName", to: :package_name
36
39
  map "isAbstract", to: :is_abstract, render_default: true
@@ -94,6 +94,7 @@ module Ea
94
94
  package_name: package_name_for(object),
95
95
  qualified_name: qualified_name_for(object),
96
96
  nested_parent_name: nested_parent_name(object),
97
+ gen_links_parent: parse_gen_links_parent(object.genlinks),
97
98
  is_abstract: abstract?(object),
98
99
  is_root: object.isroot.to_i == 1,
99
100
  is_leaf: object.isleaf.to_i == 1,
@@ -270,6 +271,15 @@ module Ea
270
271
  pkg_name ? "#{pkg_name}::#{name}" : name
271
272
  end
272
273
 
274
+ # EA stores the off-canvas parent's VERBATIM display text in
275
+ # GenLinks ('Parent=r:LicensePart;' - owner-qualified nested
276
+ # names included). The ghost renders this string as-is.
277
+ def parse_gen_links_parent(links)
278
+ return nil if links.nil? || links.to_s.empty?
279
+
280
+ links.to_s[/Parent=([^;]+);?/, 1]
281
+ end
282
+
273
283
  # When t_object.ParentID points at a Class (not a Package),
274
284
  # the object is a nested classifier. EA qualifies its name
275
285
  # with the parent class's name, not the package name.
@@ -524,6 +524,10 @@ module Ea
524
524
  return nil unless document
525
525
  return nil unless diagram.show_parents
526
526
 
527
+ # GenLinks holds EA's verbatim ghost text ('Parent=X;').
528
+ gl = classifier.gen_links_parent.to_s
529
+ return gl unless gl.empty?
530
+
527
531
  gen = parent_generalization_for(classifier)
528
532
  return nil unless gen
529
533
 
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.79"
7
+ VERSION = "0.6.80"
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.79
4
+ version: 0.6.80
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.