pxgraphviz 0.1.0 → 0.1.1

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
2
  SHA1:
3
- metadata.gz: df8acdacf026a578e3a1e05b96251d6807a6fcf5
4
- data.tar.gz: c99b44081e5da991ad20fd71425fc80a3b13714d
3
+ metadata.gz: cf27878fabf68e6ae26efefacf1f2815413cc952
4
+ data.tar.gz: c5d47853c7293edb325a00d8eb567d823985c04b
5
5
  SHA512:
6
- metadata.gz: 661b9432f1f5295d3708de8cc6c76ae5f4cbf9c408181fa4620142713bce3caec5d5f6575e38213fd176d777cc732e25baf6a80ec7ded237c25dcbfe3107bf82
7
- data.tar.gz: 29b31b35a709b2d3f3cd4f6de804be563e07e11d7b3eb4c4a68d2f8343c1358ce25e62c9be8048e6ff3514a70d07ab58eeb58b0eec3ce9c06ac7b766c7f7820f
6
+ metadata.gz: 2cb94120a61e0ba38848d09e80f06d8523de61b8435bb4ad1bf54f41fe0512d5d9da2f8e505d4cef5df9817bb17a33bdf212c81cb9d284193eed4d3f11b04c65
7
+ data.tar.gz: 661f1d94bcc76282f0fe22def550970555f8b03c1e9d606347fbb5c8ea74eba1febb3e0b6be76ec2ad963f2b36235a082d38ae9481681501ba5c37d21383c591
checksums.yaml.gz.sig CHANGED
@@ -1 +1,4 @@
1
- \����F+�ׇ ��Z;�]8J?�vZ&�^�w���m(�f���Wޏ�*��f�:%=��6����h��<�6��n�S-FV�4zEX�� J�N�̓��
1
+ }��$��.q�
2
+ ��F������)co�*�r��.F�~��+���E�Wϼ˥�'{x́�q���s�
3
+ v[�7�߻|Dy�)��6Jj�5���������JQ�������S�j�Ru�Se[��*mIS�I��U���VEw��#�Ei!�w���Y�
4
+ �}�M�g�p�g9�O�'t�> ������t�$��o���Bv�e��Y!��[=�T�4��cl�l�m�H$ �懽��#��
data.tar.gz.sig CHANGED
Binary file
data/lib/pxgraphviz.rb CHANGED
@@ -46,7 +46,7 @@ class PxGraphViz
46
46
  @px.each_recursive do |x, parent, level|
47
47
 
48
48
  next if level <= 0
49
- a_edges << [parent.label, x.label]
49
+ a_edges << [parent.label, x.label, x.connection]
50
50
 
51
51
  end
52
52
 
@@ -56,9 +56,12 @@ class PxGraphViz
56
56
  edge_records = RexleBuilder.build do |xml|
57
57
 
58
58
  xml.records do
59
- a_edges.each do |item1, item2|
60
- xml.edge do
61
- xml.summary
59
+ a_edges.each.with_index do |x, i|
60
+ item1, item2, connection = x
61
+ xml.edge id: 'e' + (i+1).to_s do
62
+ xml.summary do
63
+ xml.label connection
64
+ end
62
65
  xml.records { RexleArray.new([h_nodes[item1], h_nodes[item2]])}
63
66
  end
64
67
  end
@@ -74,31 +77,31 @@ class PxGraphViz
74
77
  [['option', {}, '',
75
78
  ['summary',{},'', ['type',{}, 'node']],
76
79
  ['records',{}, '',
77
- ['attribute', {name: 'color', value: '#ddaa66'}],
78
- ['attribute', {name: 'style', value: 'filled'}],
79
- ['attribute', {name: 'shape', value: 'box'}],
80
- ['attribute', {name: 'penwidth', value: '1'}],
81
- ['attribute', {name: 'fontname', value: 'Trebuchet MS'}],
82
- ['attribute', {name: 'fontsize', value: '8'}],
83
- ['attribute', {name: 'fillcolor', value: '#775500'}],
84
- ['attribute', {name: 'fontcolor', value: '#ffeecc'}],
85
- ['attribute', {name: 'margin', value: '0.0'}]
80
+ ['attribute', {}, '', ['name', {}, 'color'], ['value', {}, '#ddaa66']],
81
+ ['attribute', {}, '', ['name', {}, 'style'], ['value', {}, 'filled']],
82
+ ['attribute', {}, '', ['name', {}, 'shape'], ['value', {}, 'box']],
83
+ ['attribute', {}, '', ['name', {}, 'penwidth'], ['value', {}, '1']],
84
+ ['attribute', {}, '', ['name', {}, 'fontname'], ['value', {}, 'Trebuchet MS']],
85
+ ['attribute', {}, '', ['name', {}, 'fontsize'], ['value', {}, '8']],
86
+ ['attribute', {}, '', ['name', {}, 'fillcolor'], ['value', {}, '#775500']],
87
+ ['attribute', {}, '', ['name', {}, 'fontcolor'], ['value', {}, '#ffeecc']],
88
+ ['attribute', {}, '', ['name', {}, 'margin'], ['value', {}, '0.0']]
86
89
  ]
87
90
  ],
88
91
  ['option', {}, '',
89
92
  ['summary', {}, '', ['type', {}, 'edge']],
90
93
  ['records', {}, '',
91
- ['attribute', {name: 'color', value: '#ddaa66'}],
92
- ['attribute', {name: 'weight', value: '1'}],
93
- ['attribute', {name: 'fontsize', value: '8'}],
94
- ['attribute', {name: 'fontcolor', value: '#ffeecc'}],
95
- ['attribute', {name: 'fontname', value: 'Trebuchet MS'}],
96
- ['attribute', {name: 'dir', value: 'forward'}],
97
- ['attribute', {name: 'arrowsize', value: '0.5'}]
94
+ ['attribute', {}, '', ['name', {}, 'color'], ['value', {}, '#999999']],
95
+ ['attribute', {}, '', ['name', {}, 'weight'], ['value', {}, '1']],
96
+ ['attribute', {}, '', ['name', {}, 'fontsize'], ['value', {}, '8']],
97
+ ['attribute', {}, '', ['name', {}, 'fontcolor'], ['value', {}, '#444444']],
98
+ ['attribute', {}, '', ['name', {}, 'fontname'], ['value', {}, 'Verdana']],
99
+ ['attribute', {}, '', ['name', {}, 'dir'], ['value', {}, 'forward']],
100
+ ['attribute', {}, '', ['name', {}, 'arrowsize'], ['value', {}, '0.5']]
98
101
  ]
99
102
  ]]
100
103
  },
101
- nodes: {summary: '', records: node_records},
104
+ nodes: {summary: '', records: node_records[3..-1]},
102
105
  edges: {summary: '', records: edge_records[3..-1]}
103
106
  }
104
107
 
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.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
metadata.gz.sig CHANGED
Binary file