graphvizml 0.4.0 → 0.4.1
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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/graphvizml.rb +17 -17
- data.tar.gz.sig +0 -0
- metadata +1 -1
- 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: '084ecce99b3b042483e5573fd69dcdc0603999bc'
|
4
|
+
data.tar.gz: a584ecbe5abb0dbd0812fc1d35ac62783b5e315c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6c7bd783d91c214f3d47d27252ff1ee637cda948e589e51c5b44ffa26d28e0dd5da3d29f20f531b1681461fdb16505800b79d7a328769278049f22ab6f459753
|
7
|
+
data.tar.gz: 68ab72875a7ed6f68a97abdefdf3aa9c4b5a5d0372baa2decafe0dbe707521f8b21a599e4469b0d7009c96e568913564050928c124b2fb8867f70a385b25111c
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/graphvizml.rb
CHANGED
@@ -34,6 +34,10 @@ class GraphVizML
|
|
34
34
|
build()
|
35
35
|
|
36
36
|
end
|
37
|
+
|
38
|
+
def to_dot()
|
39
|
+
@g.to_dot
|
40
|
+
end
|
37
41
|
|
38
42
|
# writes to a PNG file (not a PNG blob)
|
39
43
|
#
|
@@ -87,7 +91,6 @@ class GraphVizML
|
|
87
91
|
|
88
92
|
end
|
89
93
|
|
90
|
-
#puts @g.to_dot
|
91
94
|
|
92
95
|
# add the styling once the objects have been created
|
93
96
|
|
@@ -110,26 +113,23 @@ class GraphVizML
|
|
110
113
|
[raw_selector.split(/,\s*/).map(&:strip), h]
|
111
114
|
end
|
112
115
|
|
113
|
-
node_style = a.detect {|x| x.assoc 'node'}
|
114
|
-
|
115
|
-
if node_style then
|
116
|
+
node_style = a.detect {|x| x.assoc 'node'}
|
116
117
|
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
118
|
+
nodes.each do |id, x|
|
119
|
+
|
120
|
+
_, attributes, obj = x
|
121
|
+
attributes.each {|key, value| obj.attributes[key] = value }
|
122
|
+
node_style.last.each {|key, value| obj.attributes[key] = value } if node_style
|
123
|
+
|
124
|
+
end
|
121
125
|
|
122
126
|
edge_style = a.detect {|x| x.assoc 'edge'}
|
123
127
|
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
end
|
130
|
-
end
|
131
|
-
end
|
132
|
-
|
128
|
+
nodes.each do |id,x|
|
129
|
+
x.last.connections.each do |conn|
|
130
|
+
edge_style.last.each {|key, value| conn.attributes[key] = value } if edge_style
|
131
|
+
end
|
132
|
+
end
|
133
133
|
|
134
134
|
:build
|
135
135
|
end
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|