mindmapviz 0.2.2 → 0.2.3

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: d133126dd5f38165eeb04e330ef0558055cc9e84
4
- data.tar.gz: d8fc3abf664bcd356efb5fc0a051b72f1d935e56
3
+ metadata.gz: 2658be7c923a8d1f17af5acec40756121e43ec11
4
+ data.tar.gz: 59d587f8e400221418d9dc81598aa1047f0afd8e
5
5
  SHA512:
6
- metadata.gz: fd516145d8bc7f7dbbd6a0780a9bb5e38add8fadd4806471a24308b868718a0e0bac881979df3cfd8a867c3af8378c2d819b460546bd7941fafa572a1e133cef
7
- data.tar.gz: c55aaf78835573d399a79713cbc94c8397aabd8e7a7c38613e31a332e9e7306b6f3fa570f2456cfffb410733bc33baf14b98de16fcad728db4e1787e4bfaea55
6
+ metadata.gz: d8ff2a481eca8932612ae0338f83c5d5e0100e6b40f208bcf5755a5bd1dd3b9ef6d53236b1e3761d52a0d38d568c7fb818b7495c0adfd1e444c757b1bf07d671
7
+ data.tar.gz: b22b9a6b62d7333a62f2abf9c2c9e8f885be4d58de07facb90c081674d2f2b167eca6257255c2a0d3b2503b633bb5ac8bd83e348d7f34538fb704e9a75892f06
Binary file
data.tar.gz.sig CHANGED
@@ -1,5 +1 @@
1
- ��a[e��G��|Կ�b����[��NO������=Z;� Pǣ\@�tE�4rB*���s�
2
- �=E� ��� |%hA;R��"$��bw�����d�e%FM-��TF�����.p:ƍm��!n4Z�2�/
3
- ���v����)�K�!����(�P��kQ[o
4
- a�јXp_�t_;��,l=4z�r�+uI��
5
- Yyb��2-ȿ��:��N��hU`��8��r�y
1
+ | d>��KE�l�0&�A������Z�AE���yK@�c��l[c��\|M����;��U
@@ -8,9 +8,8 @@ require 'pxgraphviz'
8
8
  # inspired by https://github.com/bingwei/ruby-graphviz-mindmap
9
9
 
10
10
 
11
- class Mindmapviz
11
+ class Mindmapviz < PxGraphViz
12
12
 
13
- attr_reader :raw_doc, :pxg
14
13
 
15
14
  def initialize(s, fields: %w(label shape), delimiter: ' # ',
16
15
  style: default_stylesheet())
@@ -44,51 +43,17 @@ class Mindmapviz
44
43
 
45
44
  schema = "items[type, layout]/item[%s]" % fields.join(', ')
46
45
 
47
- @raw_doc =<<EOF
46
+ raw_doc =<<EOF
48
47
  <?polyrex schema='#{schema}' delimiter='#{delimiter}'?>
49
48
  type: graph
50
49
  layout: neato
51
50
  #{s}
52
51
  EOF
53
52
 
54
- @pxg = PxGraphViz.new(@raw_doc, style: style)
53
+ super(raw_doc, style: style)
55
54
 
56
55
  end
57
56
 
58
- def doc()
59
- @pxg.doc
60
- end
61
-
62
- def export(file='gvml.xml')
63
- File.write file, @pxg.to_doc.xml(pretty: true)
64
- end
65
-
66
- alias export_as export
67
-
68
- def save(s)
69
- File.write filename, @raw_doc
70
- end
71
-
72
- def to_dot()
73
- @pxg.to_dot
74
- end
75
-
76
- # returns a PNG blob
77
- #
78
- def to_png()
79
- @pxg.to_png
80
- end
81
-
82
- # returns an SVG blob
83
- #
84
- def to_svg()
85
- @pxg.to_svg
86
- end
87
-
88
- def write(filename)
89
- @pxg.write filename
90
- end
91
-
92
57
 
93
58
  private
94
59
 
@@ -117,7 +82,7 @@ EOF
117
82
  fontcolor: #444444;
118
83
  fontname: Verdana;
119
84
  fontsize: 8;
120
- #{@type == :digraph ? 'dir: forward;' : 'dir: none;'}
85
+ dir: none;
121
86
  weight: 1;
122
87
  }
123
88
  STYLE
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mindmapviz
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -31,7 +31,7 @@ cert_chain:
31
31
  tTfkCvm++WClBJim2NcI10xzs5g5gHaSXFNVA3y72eSSJ+moAHzciNKJ9iP3GwZK
32
32
  xwzVLef/qNXmag==
33
33
  -----END CERTIFICATE-----
34
- date: 2017-09-16 00:00:00.000000000 Z
34
+ date: 2017-09-17 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: pxgraphviz
@@ -42,7 +42,7 @@ dependencies:
42
42
  version: '0.4'
43
43
  - - ">="
44
44
  - !ruby/object:Gem::Version
45
- version: 0.4.2
45
+ version: 0.4.3
46
46
  type: :runtime
47
47
  prerelease: false
48
48
  version_requirements: !ruby/object:Gem::Requirement
@@ -52,7 +52,7 @@ dependencies:
52
52
  version: '0.4'
53
53
  - - ">="
54
54
  - !ruby/object:Gem::Version
55
- version: 0.4.2
55
+ version: 0.4.3
56
56
  description:
57
57
  email: james@jamesrobertson.eu
58
58
  executables: []
metadata.gz.sig CHANGED
Binary file