ruby-graphviz 0.9.19 → 0.9.20

Sign up to get free protection for your applications and to get access to all the features.
Files changed (76) hide show
  1. data/AUTHORS +1 -0
  2. data/README.rdoc +6 -0
  3. data/examples/dot/so-sample001.gv +30 -0
  4. data/examples/dot/so-sample002.gv +33 -0
  5. data/examples/dot/so-sample003.gv +45 -0
  6. data/examples/graphml/cluster.graphml +4 -4
  7. data/examples/sample35.rb +1 -1
  8. data/examples/sample57.rb +2 -1
  9. data/lib/graphviz/attrs.rb +1 -1
  10. data/lib/graphviz/constants.rb +1 -1
  11. data/lib/graphviz/edge.rb +18 -2
  12. data/lib/graphviz/family_tree.rb +2 -0
  13. data/lib/graphviz/node.rb +16 -0
  14. data/lib/graphviz.rb +29 -5
  15. data/test/output/sample01.rb.png +0 -0
  16. data/test/output/sample02.rb.png +0 -0
  17. data/test/output/sample03.rb.png +0 -0
  18. data/test/output/sample04.rb.png +0 -0
  19. data/test/output/sample05.rb.png +0 -0
  20. data/test/output/sample06.rb.png +0 -0
  21. data/test/output/sample07.rb.png +0 -0
  22. data/test/output/sample08.rb.png +0 -0
  23. data/test/output/sample09.rb.png +0 -0
  24. data/test/output/sample10.rb.png +0 -0
  25. data/test/output/sample11.rb.png +0 -0
  26. data/test/output/sample12.rb.png +0 -0
  27. data/test/output/sample13.rb.png +0 -0
  28. data/test/output/sample14.rb.png +0 -0
  29. data/test/output/sample15.rb.png +0 -0
  30. data/test/output/sample16.rb.png +0 -0
  31. data/test/output/sample17.rb.png +0 -0
  32. data/test/output/sample18.rb.png +0 -0
  33. data/test/output/sample19.rb.png +0 -0
  34. data/test/output/sample20.rb.png +0 -0
  35. data/test/output/sample21.rb.html +3 -0
  36. data/test/output/sample21.rb.png +0 -0
  37. data/test/output/sample22.rb.html +5 -0
  38. data/test/output/sample22.rb.png +0 -0
  39. data/test/output/sample23.rb.png +0 -0
  40. data/test/output/sample24.rb.png +0 -0
  41. data/test/output/sample25.rb.png +0 -0
  42. data/test/output/sample26.rb.png +0 -0
  43. data/test/output/sample28.rb.png +0 -0
  44. data/test/output/sample29.rb.svg +21 -0
  45. data/test/output/sample30.rb.ps +923 -0
  46. data/test/output/sample31.rb.png +0 -0
  47. data/test/output/sample32.rb.png +0 -0
  48. data/test/output/sample35.rb.gv +24 -0
  49. data/test/output/sample35.rb.png +0 -0
  50. data/test/output/sample37.rb.dot +50 -0
  51. data/test/output/sample37.rb.png +0 -0
  52. data/test/output/sample38.rb.png +0 -0
  53. data/test/output/sample39.rb.png +0 -0
  54. data/test/output/sample40.rb.png +0 -0
  55. data/test/output/sample41.rb.svg +8 -0
  56. data/test/output/sample42.rb.png +0 -0
  57. data/test/output/sample43.rb.png +0 -0
  58. data/test/output/sample44.rb.png +0 -0
  59. data/test/output/sample45.rb.png +0 -0
  60. data/test/output/sample46.rb.png +0 -0
  61. data/test/output/sample47.rb.png +0 -0
  62. data/test/output/sample48.rb.png +0 -0
  63. data/test/output/sample49.rb.png +0 -0
  64. data/test/output/sample50.rb.png +0 -0
  65. data/test/output/sample51.rb.png +0 -0
  66. data/test/output/sample52.rb.png +0 -0
  67. data/test/output/sample53.rb.png +0 -0
  68. data/test/output/sample54.rb.png +0 -0
  69. data/test/output/sample55.rb.png +0 -0
  70. data/test/output/sample56.rb.svg +28 -0
  71. data/test/output/sample58.rb.png +0 -0
  72. data/test/output/sample99.rb.png +0 -0
  73. data/test/support.rb +7 -2
  74. data/test/test_examples.rb +4 -4
  75. data/test/test_init.rb +1 -1
  76. metadata +65 -4
Binary file
Binary file
@@ -0,0 +1,24 @@
1
+ digraph G {
2
+ rankdir = "LR"; bgcolor = "transparent"; truecolor = "true";
3
+ node [label = "N"];
4
+ subgraph {
5
+ rank = "same";
6
+ mygraph [label = "# mygraph.dot\ldigraph G {\l Hello -> World\l}\l", shape = "note", fontname = "Courier", fontsize = "10"];
7
+ image [label = "", shape = "note", image = "./hello.png"];
8
+ }
9
+ subgraph {
10
+ rank = "same";
11
+ mysite [label = "\nexample.com\n ", shape = "component", fontname = "Arial"];
12
+ dotgraph [label = "\ndotgraph.net\n ", shape = "component", fontname = "Arial"];
13
+ dotgraph -> mysite [color = "red"]
14
+ mysite -> dotgraph [color = "blue"]
15
+ }
16
+ subgraph cluster_0 {
17
+ fontsize = "10"; fontname = "Courier"; color = "black"; label = "my_page.html";
18
+ zeimage [label = "", shape = "note", image = "./hello.png"];
19
+ }
20
+ mygraph -> mysite [color = "blue"]
21
+ dotgraph -> image [color = "red"]
22
+ image -> dotgraph [color = "red"]
23
+ mysite -> zeimage [color = "red"]
24
+ }
Binary file
@@ -0,0 +1,50 @@
1
+ digraph Solarsys {
2
+ Sun [label = "Sun\n", fillcolor = "orange", penwidth = "2", shape = "circle", fontsize = "12", style = "filled"];
3
+ subgraph {
4
+ rank = "same";
5
+ Moon [label = "Moon\n", fillcolor = "red", penwidth = "2", shape = "circle", fontsize = "12", style = "filled"];
6
+ Earth [label = "Earth\n", fillcolor = "blue", penwidth = "2", shape = "circle", fontsize = "12", style = "filled"];
7
+ Moon -> Earth [penwidth = "2", color = "black", labeltooltip = "distance"]
8
+ }
9
+ Sun -> Earth [penwidth = "2", color = "black", labeltooltip = "distance"]
10
+ subgraph {
11
+ rank = "same";
12
+ Mercury [label = "Mercury\n", fillcolor = "green", penwidth = "2", shape = "circle", fontsize = "12", style = "filled"];
13
+ Sun -> Mercury [label = "distance", penwidth = "2", color = "black"]
14
+ }
15
+ subgraph {
16
+ rank = "same";
17
+ Venus [label = "Venus\n", fillcolor = "green", penwidth = "2", shape = "circle", fontsize = "12", style = "filled"];
18
+ Sun -> Venus [label = "distance", penwidth = "2", color = "black"]
19
+ }
20
+ subgraph {
21
+ rank = "same";
22
+ Mars [label = "Mars\n", fillcolor = "green", penwidth = "2", shape = "circle", fontsize = "12", style = "filled"];
23
+ Sun -> Mars [label = "distance", penwidth = "2", color = "black"]
24
+ }
25
+ subgraph {
26
+ rank = "same";
27
+ Jupiter [label = "Jupiter\n", fillcolor = "green", penwidth = "2", shape = "circle", fontsize = "12", style = "filled"];
28
+ Sun -> Jupiter [label = "distance", penwidth = "2", color = "black"]
29
+ }
30
+ subgraph {
31
+ rank = "same";
32
+ Saturn [label = "Saturn\n", fillcolor = "green", penwidth = "2", shape = "circle", fontsize = "12", style = "filled"];
33
+ Sun -> Saturn [label = "distance", penwidth = "2", color = "black"]
34
+ }
35
+ subgraph {
36
+ rank = "same";
37
+ Uranus [label = "Uranus\n", fillcolor = "green", penwidth = "2", shape = "circle", fontsize = "12", style = "filled"];
38
+ Sun -> Uranus [label = "distance", penwidth = "2", color = "black"]
39
+ }
40
+ subgraph {
41
+ rank = "same";
42
+ Neptune [label = "Neptune\n", fillcolor = "green", penwidth = "2", shape = "circle", fontsize = "12", style = "filled"];
43
+ Sun -> Neptune [label = "distance", penwidth = "2", color = "black"]
44
+ }
45
+ subgraph {
46
+ rank = "same";
47
+ Pluto [label = "Pluto\n", fillcolor = "green", penwidth = "2", shape = "circle", fontsize = "12", style = "filled"];
48
+ Sun -> Pluto [label = "distance", penwidth = "2", color = "black"]
49
+ }
50
+ }
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
3
+ <!-- Generated by graphviz version 2.27.20100802.0445 (20100802.0445)
4
+ -->
5
+ <!-- Title: G Pages: 1 -->
6
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg" width="74pt" height="116pt" viewBox="0.00 0.00 74.00 116.00"><defs><linearGradient id="white" x1="0%" y1="0%" x2="0%" y2="0%"><stop offset="0%" style="stop-color:rgb(255,255,255);stop-opacity:1"/></linearGradient><linearGradient id="aquamarine" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:rgb(255,255,255);stop-opacity:1"/><stop offset="100%" style="stop-color:rgb(127,255,212);stop-opacity:1"/></linearGradient><linearGradient id="azure" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:rgb(255,255,255);stop-opacity:1"/><stop offset="100%" style="stop-color:rgb(240,255,255);stop-opacity:1"/></linearGradient><linearGradient id="blue" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:rgb(255,255,255);stop-opacity:1"/><stop offset="100%" style="stop-color:rgb(0,0,255);stop-opacity:1"/></linearGradient><linearGradient id="blueviolet" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:rgb(255,255,255);stop-opacity:1"/><stop offset="100%" style="stop-color:rgb(138,43,226);stop-opacity:1"/></linearGradient><linearGradient id="brown" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:rgb(255,255,255);stop-opacity:1"/><stop offset="100%" style="stop-color:rgb(165,42,42);stop-opacity:1"/></linearGradient><linearGradient id="cadetblue" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:rgb(255,255,255);stop-opacity:1"/><stop offset="100%" style="stop-color:rgb(95,158,160);stop-opacity:1"/></linearGradient><linearGradient id="chocolate" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:rgb(255,255,255);stop-opacity:1"/><stop offset="100%" style="stop-color:rgb(210,105,30);stop-opacity:1"/></linearGradient><linearGradient id="cornflowerblue" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:rgb(255,255,255);stop-opacity:1"/><stop offset="100%" style="stop-color:rgb(100,149,237);stop-opacity:1"/></linearGradient><linearGradient id="crimson" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:rgb(255,255,255);stop-opacity:1"/><stop offset="100%" style="stop-color:rgb(220,20,60);stop-opacity:1"/></linearGradient><linearGradient id="cyan" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:rgb(255,255,255);stop-opacity:1"/><stop offset="100%" style="stop-color:rgb(0,255,255);stop-opacity:1"/></linearGradient><linearGradient id="darkgreen" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:rgb(255,255,255);stop-opacity:1"/><stop offset="100%" style="stop-color:rgb(0,100,0);stop-opacity:1"/></linearGradient><linearGradient id="darkorange" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:rgb(255,255,255);stop-opacity:1"/><stop offset="100%" style="stop-color:rgb(255,140,0);stop-opacity:1"/></linearGradient><linearGradient id="gold" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:rgb(255,255,255);stop-opacity:1"/><stop offset="100%" style="stop-color:rgb(255,215,0);stop-opacity:1"/></linearGradient><linearGradient id="gray" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:rgb(255,255,255);stop-opacity:1"/><stop offset="100%" style="stop-color:rgb(192,192,192);stop-opacity:1"/></linearGradient><linearGradient id="greenyellow" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:rgb(255,255,255);stop-opacity:1"/><stop offset="100%" style="stop-color:rgb(173,255,47);stop-opacity:1"/></linearGradient><linearGradient id="green" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:rgb(255,255,255);stop-opacity:1"/><stop offset="100%" style="stop-color:rgb(0,255,0);stop-opacity:1"/></linearGradient><linearGradient id="grey" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:rgb(255,255,255);stop-opacity:1"/><stop offset="100%" style="stop-color:rgb(192,192,192);stop-opacity:1"/></linearGradient><linearGradient id="hotpink" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:rgb(255,255,255);stop-opacity:1"/><stop offset="100%" style="stop-color:rgb(255,105,180);stop-opacity:1"/></linearGradient><linearGradient id="indianred" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:rgb(255,255,255);stop-opacity:1"/><stop offset="100%" style="stop-color:rgb(205,92,92);stop-opacity:1"/></linearGradient><linearGradient id="indigo" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:rgb(255,255,255);stop-opacity:1"/><stop offset="100%" style="stop-color:rgb(75,0,130);stop-opacity:1"/></linearGradient><linearGradient id="lavender" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:rgb(255,255,255);stop-opacity:1"/><stop offset="100%" style="stop-color:rgb(230,230,250);stop-opacity:1"/></linearGradient><linearGradient id="lightblue" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:rgb(255,255,255);stop-opacity:1"/><stop offset="100%" style="stop-color:rgb(173,216,230);stop-opacity:1"/></linearGradient><linearGradient id="lightgray" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:rgb(255,255,255);stop-opacity:1"/><stop offset="100%" style="stop-color:rgb(211,211,211);stop-opacity:1"/></linearGradient><linearGradient id="lightgrey" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:rgb(255,255,255);stop-opacity:1"/><stop offset="100%" style="stop-color:rgb(211,211,211);stop-opacity:1"/></linearGradient><linearGradient id="magenta" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:rgb(255,255,255);stop-opacity:1"/><stop offset="100%" style="stop-color:rgb(255,0,255);stop-opacity:1"/></linearGradient><linearGradient id="maroon" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:rgb(255,255,255);stop-opacity:1"/><stop offset="100%" style="stop-color:rgb(176,48,96);stop-opacity:1"/></linearGradient><linearGradient id="mediumblue" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:rgb(255,255,255);stop-opacity:1"/><stop offset="100%" style="stop-color:rgb(0,0,205);stop-opacity:1"/></linearGradient><linearGradient id="mediumpurple" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:rgb(255,255,255);stop-opacity:1"/><stop offset="100%" style="stop-color:rgb(147,112,219);stop-opacity:1"/></linearGradient><linearGradient id="orange" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:rgb(255,255,255);stop-opacity:1"/><stop offset="100%" style="stop-color:rgb(255,165,0);stop-opacity:1"/></linearGradient><linearGradient id="pink" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:rgb(255,255,255);stop-opacity:1"/><stop offset="100%" style="stop-color:rgb(255,192,203);stop-opacity:1"/></linearGradient><linearGradient id="purple" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:rgb(255,255,255);stop-opacity:1"/><stop offset="100%" style="stop-color:rgb(160,32,240);stop-opacity:1"/></linearGradient><linearGradient id="red" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:rgb(255,255,255);stop-opacity:1"/><stop offset="100%" style="stop-color:rgb(255,0,0);stop-opacity:1"/></linearGradient><linearGradient id="steelblue" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:rgb(255,255,255);stop-opacity:1"/><stop offset="100%" style="stop-color:rgb(70,130,180);stop-opacity:1"/></linearGradient><linearGradient id="violet" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:rgb(255,255,255);stop-opacity:1"/><stop offset="100%" style="stop-color:rgb(238,130,238);stop-opacity:1"/></linearGradient><linearGradient id="yellow" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:rgb(255,255,255);stop-opacity:1"/><stop offset="100%" style="stop-color:rgb(255,255,0);stop-opacity:1"/></linearGradient><linearGradient id="none" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:rgb(255,255,255);stop-opacity:1"/><stop offset="100%" style="stop-color:rgb(255,255,255);stop-opacity:1"/></linearGradient></defs>
7
+ <g id="graph1" class="graph" transform="scale(1 1) rotate(0) translate(4 112)"><polygon fill="white" stroke="white" points="-4,5 -4,-112 71,-112 71,5 -4,5"/><title>G</title><g id="node1" class="node"><ellipse fill="lightblue" stroke="black" cx="33" cy="-90" rx="30.0465" ry="18" style="fill: black; stroke: none; fill-opacity:0.3" transform="translate(3,3)"/><ellipse fill="lightblue" stroke="black" cx="33" cy="-90" rx="30.0465" ry="18" style="fill:url(#lightblue);stroke:black;"/><text text-anchor="middle" x="33" y="-84.9" font-family="Times,serif" font-size="14.00" style="font-size:10px; font-family:Verdana">hello</text></g><g id="node2" class="node"><ellipse fill="lightgrey" stroke="black" cx="33" cy="-18" rx="33.1471" ry="18" style="fill: black; stroke: none; fill-opacity:0.3" transform="translate(3,3)"/><ellipse fill="lightgrey" stroke="black" cx="33" cy="-18" rx="33.1471" ry="18" style="fill:url(#lightgrey);stroke:black;"/><text text-anchor="middle" x="33" y="-12.9" font-family="Times,serif" font-size="14.00" style="font-size:10px; font-family:Verdana">world</text></g><g id="edge2" class="edge"><polygon fill="black" stroke="black" points="36.5001,-46.4132 33,-36.4133 29.5001,-46.4133 36.5001,-46.4132" style="fill: black; stroke: none; fill-opacity:0.3" transform="translate(3,3)"/><path fill="none" stroke="black" d="M33,-71.8314C33,-64.131 33,-54.9743 33,-46.4166" style="fill: none; stroke: black; stroke-opacity:0.3" transform="translate(3,3)"/><polygon fill="black" stroke="black" points="36.5001,-46.4132 33,-36.4133 29.5001,-46.4133 36.5001,-46.4132" style="fill:url(#black);stroke:black;"/><path fill="none" stroke="black" d="M33,-71.8314C33,-64.131 33,-54.9743 33,-46.4166"/></g></g>
8
+ </svg>
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,28 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
3
+ "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
+ <!-- Generated by graphviz version 2.27.20100802.0445 (20100802.0445)
5
+ -->
6
+ <!-- Title: G Pages: 1 -->
7
+ <svg width="88pt" height="116pt"
8
+ viewBox="0.00 0.00 88.00 116.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
9
+ <g id="graph1" class="graph" transform="scale(1 1) rotate(0) translate(4 112)">
10
+ <title>G</title>
11
+ <polygon fill="white" stroke="white" points="-4,5 -4,-112 85,-112 85,5 -4,5"/>
12
+ <!-- world -->
13
+ <g id="node1" class="node"><title>world</title>
14
+ <ellipse fill="none" stroke="black" cx="40" cy="-90" rx="39.7989" ry="18"/>
15
+ <text text-anchor="middle" x="40" y="-84.9" font-family="Times,serif" font-size="14.00">&lt;World</text>
16
+ </g>
17
+ <!-- hello -->
18
+ <g id="node2" class="node"><title>hello</title>
19
+ <ellipse fill="none" stroke="black" cx="40" cy="-18" rx="37.8486" ry="18"/>
20
+ <text text-anchor="middle" x="40" y="-12.9" font-family="Times,serif" font-size="14.00">Hello&gt;</text>
21
+ </g>
22
+ <!-- world&#45;&gt;hello -->
23
+ <g id="edge2" class="edge"><title>world&#45;&gt;hello</title>
24
+ <path fill="none" stroke="black" d="M40,-71.8314C40,-64.131 40,-54.9743 40,-46.4166"/>
25
+ <polygon fill="black" stroke="black" points="43.5001,-46.4132 40,-36.4133 36.5001,-46.4133 43.5001,-46.4132"/>
26
+ </g>
27
+ </g>
28
+ </svg>
Binary file
Binary file
data/test/support.rb CHANGED
@@ -1,8 +1,12 @@
1
1
  require 'rubygems'
2
2
  require 'test/unit'
3
+ begin
3
4
  require 'ruby-debug'
5
+ rescue LoadError
6
+ end
7
+ require 'stringio'
4
8
 
5
- root = File.expand_path('../..',__FILE__)
9
+ root = File.expand_path('../../lib',__FILE__)
6
10
  $:.unshift(root) unless $:.include?(root)
7
11
 
8
12
  require 'graphviz'
@@ -19,7 +23,7 @@ module TestSupport
19
23
 
20
24
  # @todo move to app?
21
25
  def windows?
22
- /Windows/ =~ ENV['OS']
26
+ /mswin|mingw/ =~ RUBY_PLATFORM
23
27
  end
24
28
 
25
29
  def dev_null
@@ -51,6 +55,7 @@ module IoHack
51
55
  #
52
56
 
53
57
  except = %w(inspect kind_of?)
58
+ except += except.map{|x| x.to_sym } # for Ruby 1.9
54
59
  these = ancestors[0].instance_methods
55
60
  # these = [1,2,3].map{|x| ancestors[x].instance_methods(false)}.flatten
56
61
  eraseme = (these - except)
@@ -1,4 +1,4 @@
1
- require File.join(File.dirname(__FILE__),'support.rb')
1
+ require File.expand_path('support.rb', File.dirname(__FILE__))
2
2
 
3
3
  class GraphVizTest < Test::Unit::TestCase
4
4
 
@@ -103,7 +103,7 @@ private
103
103
  setup_sample path
104
104
  out, err = fake_popen2(path)
105
105
  assert_equal "", err, "no errors"
106
- assert_match tgt_regexp, out, "output for sample#{number} should match regexp"
106
+ assert_match tgt_regexp, out.gsub(/\r\n/, "\n"), "output for sample#{number} should match regexp"
107
107
  end
108
108
 
109
109
  def assert_sample_file_has_no_output path
@@ -131,8 +131,8 @@ private
131
131
  def hack_output_path path
132
132
  # hack $0 to change where the output image is written to
133
133
  fake_example_path = File.join(OutputDir, File.basename(path))
134
- $0 = fake_example_path.dup
135
- fail("hack failed") if ($0 != fake_example_path)
134
+ $program_name = fake_example_path.dup
135
+ alias $0 $program_name
136
136
  self.class.last_image_path = "#{$0}.png"
137
137
  end
138
138
  end
data/test/test_init.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  require 'test/unit'
2
- $:.unshift("../lib")
2
+ $:.unshift(File.expand_path('../../lib',__FILE__))
3
3
  require 'graphviz'
4
4
 
5
5
  class GraphVizTest < Test::Unit::TestCase
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-graphviz
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 9
9
- - 19
10
- version: 0.9.19
9
+ - 20
10
+ version: 0.9.20
11
11
  platform: ruby
12
12
  authors:
13
13
  - Gregoire Lejeune
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-11-02 00:00:00 +01:00
18
+ date: 2010-11-20 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies: []
21
21
 
@@ -56,6 +56,9 @@ files:
56
56
  - examples/dot/rank.dot
57
57
  - examples/dot/sdh.dot
58
58
  - examples/dot/siblings.dot
59
+ - examples/dot/so-sample001.gv
60
+ - examples/dot/so-sample002.gv
61
+ - examples/dot/so-sample003.gv
59
62
  - examples/dot/test.dot
60
63
  - examples/dot/test_parse.rb
61
64
  - examples/dot/this_crach_with_dot_2.20.dot
@@ -164,6 +167,64 @@ files:
164
167
  - lib/graphviz/utils.rb
165
168
  - lib/graphviz/xml.rb
166
169
  - lib/graphviz.rb
170
+ - test/output/sample01.rb.png
171
+ - test/output/sample02.rb.png
172
+ - test/output/sample03.rb.png
173
+ - test/output/sample04.rb.png
174
+ - test/output/sample05.rb.png
175
+ - test/output/sample06.rb.png
176
+ - test/output/sample07.rb.png
177
+ - test/output/sample08.rb.png
178
+ - test/output/sample09.rb.png
179
+ - test/output/sample10.rb.png
180
+ - test/output/sample11.rb.png
181
+ - test/output/sample12.rb.png
182
+ - test/output/sample13.rb.png
183
+ - test/output/sample14.rb.png
184
+ - test/output/sample15.rb.png
185
+ - test/output/sample16.rb.png
186
+ - test/output/sample17.rb.png
187
+ - test/output/sample18.rb.png
188
+ - test/output/sample19.rb.png
189
+ - test/output/sample20.rb.png
190
+ - test/output/sample21.rb.html
191
+ - test/output/sample21.rb.png
192
+ - test/output/sample22.rb.html
193
+ - test/output/sample22.rb.png
194
+ - test/output/sample23.rb.png
195
+ - test/output/sample24.rb.png
196
+ - test/output/sample25.rb.png
197
+ - test/output/sample26.rb.png
198
+ - test/output/sample28.rb.png
199
+ - test/output/sample29.rb.svg
200
+ - test/output/sample30.rb.ps
201
+ - test/output/sample31.rb.png
202
+ - test/output/sample32.rb.png
203
+ - test/output/sample35.rb.gv
204
+ - test/output/sample35.rb.png
205
+ - test/output/sample37.rb.dot
206
+ - test/output/sample37.rb.png
207
+ - test/output/sample38.rb.png
208
+ - test/output/sample39.rb.png
209
+ - test/output/sample40.rb.png
210
+ - test/output/sample41.rb.svg
211
+ - test/output/sample42.rb.png
212
+ - test/output/sample43.rb.png
213
+ - test/output/sample44.rb.png
214
+ - test/output/sample45.rb.png
215
+ - test/output/sample46.rb.png
216
+ - test/output/sample47.rb.png
217
+ - test/output/sample48.rb.png
218
+ - test/output/sample49.rb.png
219
+ - test/output/sample50.rb.png
220
+ - test/output/sample51.rb.png
221
+ - test/output/sample52.rb.png
222
+ - test/output/sample53.rb.png
223
+ - test/output/sample54.rb.png
224
+ - test/output/sample55.rb.png
225
+ - test/output/sample56.rb.svg
226
+ - test/output/sample58.rb.png
227
+ - test/output/sample99.rb.png
167
228
  - test/support.rb
168
229
  - test/test_examples.rb
169
230
  - test/test_init.rb