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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/pxgraphviz.rb +26 -8
- metadata +3 -3
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2550add5829f2dda3ebca92011d905e2c4947d06
|
4
|
+
data.tar.gz: 2e2a836cfffa968ae98692827a4cea2e5926395b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
73
|
-
|
74
|
-
|
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
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
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
|
-
|
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
|
+
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.
|
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.
|
75
|
+
version: 0.5.3
|
76
76
|
description:
|
77
77
|
email: james@jamesrobertson.eu
|
78
78
|
executables: []
|
metadata.gz.sig
CHANGED
Binary file
|