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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: c8fdfe515b35e673018cc05775619843fd87e3c1
4
- data.tar.gz: da0c295e2bff4ed4ee25a6dcbd7f9a9ad1242f7b
2
+ SHA256:
3
+ metadata.gz: e90ef9f1d848d1421bbb784f71950f9dc41809b46c07f7d109d8575b0ad8f81a
4
+ data.tar.gz: '085f1ceda84ba43f9c55b21ff6b136bba17dc67e3a8ed0eb613f8073b5d3fcbd'
5
5
  SHA512:
6
- metadata.gz: e5c46e6ceca585fac4d05e8ab19d17aa1fa1f9c19601985dcbd071d6f38bef7861aada1d558dac8eeefeb4e069a9fa3da768776bdb540fdafb7fec5ce80d8d1a
7
- data.tar.gz: 6e9bdb7d87eee243d70d56b1f3fee7bc187574f60d1e61250fa9375f1b1edde587250781ad2539247c0b42deec4d7d7a93a059ae5df9e9bfd73580191606dad6
6
+ metadata.gz: 51087041356ab39e18477fbaee7a3c8d5c65ed0e160cce0e084ec3348305d5a03a0e445fc34b150a51c10536259785de4e70f2030e648640966e3ed3ef60cd06
7
+ data.tar.gz: 5e15dafb8f5fc008701452a08c1309f0969840f1c148f02c5cfe1190e8d9005816314c333cd2024c137b78efd6e3328a74f82989004d3ff7c1ccfcc53bb76e47
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -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: default_stylesheet())
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(doc)
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: #775533;
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 == :digraph ? 'dir: forward;' : 'dir: none;'}
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.3
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
- MIIDljCCAn6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NVHRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNVHQ4EFgQUM7kVhjOH
26
+ qwZ0y7UF/yN+MI4r5ggwJgYDVR0RBB8wHYEbZ2VtbWFzdGVyQGphbWVzcm9iZXJ0
27
+ c29uLmV1MCYGA1UdEgQfMB2BG2dlbW1hc3RlckBqYW1lc3JvYmVydHNvbi5ldTAN
28
+ BgkqhkiG9w0BAQsFAAOCAYEATTooi3YSpusmxMfRXBKu935fdFhsX2/e81ckvIQh
29
+ 8fmcNRd9mE7nfts1ipjmt7UkPVRUhD5Ag+Bbd7HSbA+pmbLsFzsq3T+hDcO82KfA
30
+ RRVGzcBi5LI5yjGYa5yTAf1z9VnNZ+OffVQce3/usuXEN8WWwSu+qiJkz1/tYjuH
31
+ VHnWd2ev/sdQK+S2x/icqXIPubabC9f1V9yLcZXkAC7TOaxc3/nAiGhDGDoY+PVH
32
+ KShAlMz8gPqci5EwWK6yy+tOSv2e8xpipTPEZ1JyR4FiAz5AOrJzn7Z2idELpcY5
33
+ OifmF8AO85wYwTUAW0O04ihDElZHR9uao79oiUNUY1Tdl/tXbrMI1l0dteQZdyNR
34
+ aQIB0TXpdRb2V63OwA7958Xd2I5M/9SwsHLV6vInmmSRrtf05mxmKSZqF9gkSUNh
35
+ UsYtvIztjMa8JTBJoeeVZQth+cfIFVp37noogboz8XiH8Q7j6kei39fxssRfOn8Z
36
+ LQb4grw+PYKG3ZWURYEkALEW
33
37
  -----END CERTIFICATE-----
34
- date: 2017-09-17 00:00:00.000000000 Z
38
+ date: 2019-06-09 00:00: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.1'
46
+ version: '1.2'
43
47
  - - ">="
44
48
  - !ruby/object:Gem::Version
45
- version: 1.1.12
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.1'
56
+ version: '1.2'
53
57
  - - ">="
54
58
  - !ruby/object:Gem::Version
55
- version: 1.1.12
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.5'
66
+ version: '0.6'
63
67
  - - ">="
64
68
  - !ruby/object:Gem::Version
65
- version: 0.5.8
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.5'
76
+ version: '0.6'
73
77
  - - ">="
74
78
  - !ruby/object:Gem::Version
75
- version: 0.5.8
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
- rubyforge_project:
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