graphvizml 0.5.3 → 0.5.4
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 +15 -6
- data.tar.gz.sig +0 -0
- metadata +2 -2
- 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: 78dc36faf679576f5f913a3135a1247b6bbcfeb2
|
4
|
+
data.tar.gz: 356e751c7b8dc79f8dc609b586fb49d0c25bce82
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6ccbb933bfa3271231bca47d52a3a9c8ce5b0a7dec25783dbda8a85938df88463929dd1e901262f3099057c12f32bc3b202a38379cf22a707a4dc38bf4af3e7d
|
7
|
+
data.tar.gz: 491c0d9fdf2d41518f8254e3e57f5b3757f33537bda9ebaa3bab3d7b40f1498a8fc9bae244d1c24c1854480f3100b8c8ea0aa8d6b846956d507ec159017e3fb5
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/graphvizml.rb
CHANGED
@@ -5,6 +5,7 @@
|
|
5
5
|
|
6
6
|
require 'domle'
|
7
7
|
require 'graphviz'
|
8
|
+
require 'tempfile'
|
8
9
|
|
9
10
|
|
10
11
|
class GraphVizML
|
@@ -48,17 +49,25 @@ class GraphVizML
|
|
48
49
|
@g.to_dot
|
49
50
|
end
|
50
51
|
|
51
|
-
#
|
52
|
+
# returns a PNG blob
|
52
53
|
#
|
53
|
-
def to_png(
|
54
|
-
|
54
|
+
def to_png()
|
55
|
+
f = Tempfile.new('graphvizml')
|
56
|
+
Graphviz::output(@g, output_format: 'png', path: f.path)
|
57
|
+
File.read f.path
|
55
58
|
end
|
56
59
|
|
57
|
-
#
|
60
|
+
# returns an SVG blob
|
58
61
|
#
|
59
|
-
def to_svg(
|
62
|
+
def to_svg()
|
63
|
+
f = Tempfile.new('graphvizml')
|
64
|
+
Graphviz::output(@g, format: 'svg', path: f.path)
|
65
|
+
File.read f.path
|
66
|
+
end
|
67
|
+
|
68
|
+
def write(filename)
|
60
69
|
Graphviz::output(@g, :path => filename)
|
61
|
-
end
|
70
|
+
end
|
62
71
|
|
63
72
|
private
|
64
73
|
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: graphvizml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
31
31
|
0fBBWVqwHyWs77T9gCuDZmQrw2NmfyhNWhBw0iljBXo7WLDNB3x0nP6mYTzk47O8
|
32
32
|
sL5FGYJNgQqFlw==
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date: 2017-09-
|
34
|
+
date: 2017-09-09 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: domle
|
metadata.gz.sig
CHANGED
Binary file
|