pxgraphviz 0.3.4 → 0.3.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d80a15b3ef83ab93650717c14492d06a8e3ee5be
4
- data.tar.gz: f182ac22828d4a4a133c16ad5f624b198996a511
3
+ metadata.gz: 2550add5829f2dda3ebca92011d905e2c4947d06
4
+ data.tar.gz: 2e2a836cfffa968ae98692827a4cea2e5926395b
5
5
  SHA512:
6
- metadata.gz: 88f5eb1f26d7ac038d21c51ce50c2d83c0e52cf623a2e1bbb4b567d4b17860feeac9e12b4b582e935f0bc43d4a0a970d23e8b37c3f302e7a2e8b61fb2a3df2af
7
- data.tar.gz: c874e42c9f079141edc7816272db489c27b716326d8164dc23fd06cb5953b47b61dcf5c37578a1bcbd07b611f845582ebd547d7f16a7ae5dba292fba6f57da77
6
+ metadata.gz: d60a42ce0a0cdadf80bc6f2d496dcef3221c72e720da588262889db840374908bfad5e692d27f4b3895847f351907e0461d53a8eb335af799f366a641575f7f3
7
+ data.tar.gz: 6136c323dcecb7ea06d78b5fd7cb0fc58f954451b6a0f269b7f16d97fdce9ab24a719aabbc2fcba83dd54b2279ec477d39bf712f5de9caa94ee1c4e78dc957a2
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/lib/pxgraphviz.rb CHANGED
@@ -67,12 +67,20 @@ class PxGraphViz
67
67
  node_records = RexleBuilder.build do |xml|
68
68
 
69
69
  xml.records do
70
+
70
71
  labels_ids.each do |x, i|
72
+
71
73
  label, shape, url = x
72
- attr = {gid: i.to_s, shape: shape, url: url}
73
- xml.node(attr) do
74
- xml.label label
74
+ attr = {gid: i.to_s, shape: shape}
75
+
76
+ if url then
77
+ xml.a({href: url}) do
78
+ xml.node(attr) { xml.label label }
79
+ end
80
+ else
81
+ xml.node(attr) { xml.label label }
75
82
  end
83
+
76
84
  end
77
85
  end
78
86
 
@@ -99,14 +107,20 @@ class PxGraphViz
99
107
  edge_records = RexleBuilder.build do |xml|
100
108
 
101
109
  xml.records do
110
+
102
111
  a_edges.each.with_index do |x, i|
112
+
103
113
  item1, item2, connection = x
114
+
104
115
  xml.edge gid: 'e' + (i+1).to_s do
105
- xml.summary do
106
- xml.label connection
107
- end
108
- xml.records { RexleArray.new([h_nodes[item1], h_nodes[item2]])}
116
+
117
+ xml.summary { xml.label connection }
118
+ elements = [h_nodes[item1], h_nodes[item2]]
119
+ nodes = elements.map {|node| node[0] == 'a' ? node[3] : node }
120
+
121
+ xml.records { RexleArray.new(nodes)}
109
122
  end
123
+
110
124
  end
111
125
  end
112
126
 
@@ -129,7 +143,7 @@ class PxGraphViz
129
143
 
130
144
  a[1] = summary
131
145
 
132
- Domle.new(a)
146
+ Rexle.new(a)
133
147
 
134
148
  end
135
149
 
@@ -146,6 +160,10 @@ class PxGraphViz
146
160
  penwidth: 1;
147
161
  style: filled;
148
162
  }
163
+
164
+ a node {
165
+ color: #0011ee;
166
+ }
149
167
 
150
168
  edge {
151
169
  arrowsize: 0.5;
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pxgraphviz
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -62,7 +62,7 @@ dependencies:
62
62
  version: '0.5'
63
63
  - - ">="
64
64
  - !ruby/object:Gem::Version
65
- version: 0.5.2
65
+ version: 0.5.3
66
66
  type: :runtime
67
67
  prerelease: false
68
68
  version_requirements: !ruby/object:Gem::Requirement
@@ -72,7 +72,7 @@ dependencies:
72
72
  version: '0.5'
73
73
  - - ">="
74
74
  - !ruby/object:Gem::Version
75
- version: 0.5.2
75
+ version: 0.5.3
76
76
  description:
77
77
  email: james@jamesrobertson.eu
78
78
  executables: []
metadata.gz.sig CHANGED
Binary file