pxgraphviz 0.4.3 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/pxgraphviz.rb +23 -6
- metadata +35 -32
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: e90ef9f1d848d1421bbb784f71950f9dc41809b46c07f7d109d8575b0ad8f81a
|
4
|
+
data.tar.gz: '085f1ceda84ba43f9c55b21ff6b136bba17dc67e3a8ed0eb613f8073b5d3fcbd'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 51087041356ab39e18477fbaee7a3c8d5c65ed0e160cce0e084ec3348305d5a03a0e445fc34b150a51c10536259785de4e70f2030e648640966e3ed3ef60cd06
|
7
|
+
data.tar.gz: 5e15dafb8f5fc008701452a08c1309f0969840f1c148f02c5cfe1190e8d9005816314c333cd2024c137b78efd6e3328a74f82989004d3ff7c1ccfcc53bb76e47
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/pxgraphviz.rb
CHANGED
@@ -8,20 +8,36 @@ require 'graphvizml'
|
|
8
8
|
|
9
9
|
|
10
10
|
class PxGraphViz < GraphVizML
|
11
|
+
using ColouredText
|
11
12
|
|
12
13
|
attr_reader :doc, :px
|
13
14
|
|
14
|
-
def initialize(s, style:
|
15
|
+
def initialize(s, style: nil, debug: false, fill: '#778833',
|
16
|
+
stroke: '#999999', text_color: '#ffeecc')
|
15
17
|
|
16
18
|
@px = s =~ /^<\?/ ? Polyrex.new.import(s) : Polyrex.new(s)
|
17
19
|
|
20
|
+
@type = @px.summary[:type] == 'digraph' ? 'dir: forward;' : 'dir: none;'
|
21
|
+
@shape = @px.summary[:shape] || 'ellipse;'
|
22
|
+
|
23
|
+
style ||= default_stylesheet()
|
18
24
|
doc = Rexslt.new(xslt_stylesheet(), @px.to_xml)\
|
19
25
|
.to_doc.root.element('nodes')
|
20
|
-
|
26
|
+
|
21
27
|
doc.root.elements.first.insert_before Rexle::Element.new('style')\
|
22
28
|
.add_text style
|
23
29
|
@doc = doc
|
24
|
-
super
|
30
|
+
puts 'pxgraphviz: before super'.info if debug
|
31
|
+
|
32
|
+
super(doc, debug: debug, fill: fill,
|
33
|
+
stroke: stroke, text_color: text_color)
|
34
|
+
|
35
|
+
@css = "
|
36
|
+
.node ellipse {stroke: #{stroke}; fill: #{fill}}
|
37
|
+
.node text {fill: #{text_color}}
|
38
|
+
.edge path {stroke: #{stroke}}
|
39
|
+
.edge polygon {stroke: #{stroke}; fill: #{stroke}}
|
40
|
+
"
|
25
41
|
|
26
42
|
end
|
27
43
|
|
@@ -33,13 +49,14 @@ class PxGraphViz < GraphVizML
|
|
33
49
|
<<STYLE
|
34
50
|
node {
|
35
51
|
color: #ddaa66;
|
36
|
-
fillcolor: #
|
52
|
+
fillcolor: #778833;
|
37
53
|
fontcolor: #ffeecc;
|
38
54
|
fontname: 'Trebuchet MS';
|
39
55
|
fontsize: 8;
|
40
56
|
margin: 0.0;
|
41
57
|
penwidth: 1;
|
42
58
|
style: filled;
|
59
|
+
shape: #{@shape};
|
43
60
|
}
|
44
61
|
|
45
62
|
a node {
|
@@ -52,7 +69,7 @@ class PxGraphViz < GraphVizML
|
|
52
69
|
fontcolor: #444444;
|
53
70
|
fontname: Verdana;
|
54
71
|
fontsize: 8;
|
55
|
-
#{@type
|
72
|
+
#{@type}
|
56
73
|
weight: 1;
|
57
74
|
}
|
58
75
|
STYLE
|
@@ -152,4 +169,4 @@ STYLE
|
|
152
169
|
XSLT
|
153
170
|
end
|
154
171
|
|
155
|
-
end
|
172
|
+
end
|
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.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -10,28 +10,32 @@ bindir: bin
|
|
10
10
|
cert_chain:
|
11
11
|
- |
|
12
12
|
-----BEGIN CERTIFICATE-----
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
13
|
+
MIIEXjCCAsagAwIBAgIBATANBgkqhkiG9w0BAQsFADAsMSowKAYDVQQDDCFnZW1t
|
14
|
+
YXN0ZXIvREM9amFtZXNyb2JlcnRzb24vREM9ZXUwHhcNMTkwNjA5MjEzOTE3WhcN
|
15
|
+
MjAwNjA4MjEzOTE3WjAsMSowKAYDVQQDDCFnZW1tYXN0ZXIvREM9amFtZXNyb2Jl
|
16
|
+
cnRzb24vREM9ZXUwggGiMA0GCSqGSIb3DQEBAQUAA4IBjwAwggGKAoIBgQC4WgMZ
|
17
|
+
e8riZEJtUZOk0m7zdNgVdI9tUhwz0TvyIMcXy+CXdyLhBXlotsqBYluCKuPDv+Ev
|
18
|
+
XEgzTpT9GxUY/k3W4BCGlV/+/GAnnMmYbNnWwQDXO3au3TxLzRo9QtAamr2LlcXf
|
19
|
+
r6SyQU2HOF5uzgxpmIuj/Fva2qQKkX373pcOOIeaWR2Xv4QMYrTKikhFRxS6TLJo
|
20
|
+
3p4x5xadq85ixScBJPs1SAUgCq0T9mLtTTiEBfArqKhKOSs8scIK7CTLqQz64I8X
|
21
|
+
IXPtntGQJoUpp0aMaPdkcQxXI4Vx9piyWQOKSPhn53u1H4QtY4fzvb0+jPNAxq/K
|
22
|
+
4OYFrdlxEPe/NiXCSgjw1af0Ht382BqCwdhrz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:00.000000000 Z
|
35
39
|
dependencies:
|
36
40
|
- !ruby/object:Gem::Dependency
|
37
41
|
name: polyrex
|
@@ -39,40 +43,40 @@ dependencies:
|
|
39
43
|
requirements:
|
40
44
|
- - "~>"
|
41
45
|
- !ruby/object:Gem::Version
|
42
|
-
version: '1.
|
46
|
+
version: '1.2'
|
43
47
|
- - ">="
|
44
48
|
- !ruby/object:Gem::Version
|
45
|
-
version: 1.1
|
49
|
+
version: 1.2.1
|
46
50
|
type: :runtime
|
47
51
|
prerelease: false
|
48
52
|
version_requirements: !ruby/object:Gem::Requirement
|
49
53
|
requirements:
|
50
54
|
- - "~>"
|
51
55
|
- !ruby/object:Gem::Version
|
52
|
-
version: '1.
|
56
|
+
version: '1.2'
|
53
57
|
- - ">="
|
54
58
|
- !ruby/object:Gem::Version
|
55
|
-
version: 1.1
|
59
|
+
version: 1.2.1
|
56
60
|
- !ruby/object:Gem::Dependency
|
57
61
|
name: graphvizml
|
58
62
|
requirement: !ruby/object:Gem::Requirement
|
59
63
|
requirements:
|
60
64
|
- - "~>"
|
61
65
|
- !ruby/object:Gem::Version
|
62
|
-
version: '0.
|
66
|
+
version: '0.6'
|
63
67
|
- - ">="
|
64
68
|
- !ruby/object:Gem::Version
|
65
|
-
version: 0.
|
69
|
+
version: 0.6.3
|
66
70
|
type: :runtime
|
67
71
|
prerelease: false
|
68
72
|
version_requirements: !ruby/object:Gem::Requirement
|
69
73
|
requirements:
|
70
74
|
- - "~>"
|
71
75
|
- !ruby/object:Gem::Version
|
72
|
-
version: '0.
|
76
|
+
version: '0.6'
|
73
77
|
- - ">="
|
74
78
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0.
|
79
|
+
version: 0.6.3
|
76
80
|
description:
|
77
81
|
email: james@jamesrobertson.eu
|
78
82
|
executables: []
|
@@ -99,8 +103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
99
103
|
- !ruby/object:Gem::Version
|
100
104
|
version: '0'
|
101
105
|
requirements: []
|
102
|
-
|
103
|
-
rubygems_version: 2.6.8
|
106
|
+
rubygems_version: 3.0.1
|
104
107
|
signing_key:
|
105
108
|
specification_version: 4
|
106
109
|
summary: Generates a GraphViz Markup Language file from a Polyrex document
|
metadata.gz.sig
CHANGED
Binary file
|