ea 0.6.85 → 0.6.86

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: 77f0f63763ffec6a8849af3f3251e4cb677fa668abeebbd893ca3895c99e8f94
4
- data.tar.gz: bbd2e8c1db14478058c7e868958d9be27e6a55721cc9a5f6ac5484df74752b30
3
+ metadata.gz: d265f1502ae56f1c39b2a03af8a59b7fa5d4f295782ce7c8f08e71be3a5c73fa
4
+ data.tar.gz: 38328cfd1956e44fd6b1ad2343117d4e4db50f46e60f4ee1af829e922184ebb3
5
5
  SHA512:
6
- metadata.gz: 7f6bf750626819a32363f97c0ac81a56c4945141ec3261820582f5967603269a7deff3355062e269193efb876828be0d2b3546967ef34b4446dfcc4154260302
7
- data.tar.gz: e00210aa57c166e8ea19be6fc83362f7460a2859601c5a398048ba8b280ea6fe63ada49f9c542ca449dc936cb14acccbcc39180f1713f48abd1ae58d559ccb54
6
+ metadata.gz: 2dd0cce5f97bc753203bffc6a56fb71ee97c34608c6d8294cb3f33ad9dc571e5287ee60054facaa9924fd44d33ef36d92f7e5c895b5aeaab0649befb1923f48d
7
+ data.tar.gz: 3aae3266a3a835ca4eded0fcfdfca0eded377204cd54c1c55a8034abec707e6701671155d98c4782b6ca253ebc811f706d09a6afa0097184c6eedeaf81fe095a
@@ -68,10 +68,14 @@ module Ea
68
68
  # dominant with a +3 minority).
69
69
  mult_pos = [anchor[0] + 12, anchor[1] + 15]
70
70
  end
71
- show_property = property_label?(connector, end_kind)
71
+ # The end's stored stereotype renders verbatim («Type» on
72
+ # 066E0FD1, «Property» on the Property ends); no line when
73
+ # the end has none.
74
+ stereo = connector_source_dest_stereotype(connector, end_kind)
75
+ stereo = stereo.nil? || stereo.empty? ? nil : "«#{stereo}»"
72
76
 
73
77
  build_texts(role:, mult:, standalone:,
74
- text_pos:, mult_pos:, show_property:)
78
+ text_pos:, mult_pos:, stereo:)
75
79
  end
76
80
 
77
81
  private
@@ -106,12 +110,12 @@ module Ea
106
110
  end
107
111
 
108
112
  def build_texts(role:, mult:, standalone:, text_pos:, mult_pos:,
109
- show_property:)
113
+ stereo:)
110
114
  if role && !role.empty? && text_pos
111
115
  x, y = text_pos
112
116
  texts = [text_at(x, y, role)]
113
- if show_property
114
- texts << text_at(x, y + property_y_offset, PROPERTY_STEREOTYPE)
117
+ if stereo
118
+ texts << text_at(x, y + property_y_offset, stereo)
115
119
  end
116
120
  if mult && !mult.empty? && mult_pos
117
121
  texts << text_at(*mult_pos, mult)
@@ -133,6 +137,12 @@ module Ea
133
137
  # profile diagrams mark ends explicitly.
134
138
  PROPERTY_KEYWORD = "property"
135
139
 
140
+ def connector_source_dest_stereotype(connector, end_kind)
141
+ stereo = end_kind == :source ? connector.source_stereotype :
142
+ connector.target_stereotype
143
+ stereo.to_s.strip
144
+ end
145
+
136
146
  def property_label?(connector, end_kind)
137
147
  stereo = end_kind == :source ? connector.source_stereotype : connector.target_stereotype
138
148
  stereo.to_s.downcase == PROPERTY_KEYWORD
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.85"
7
+ VERSION = "0.6.86"
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.85
4
+ version: 0.6.86
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.