ruby-graphviz 0.7.0 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
data/AUTHORS CHANGED
@@ -1,5 +1,7 @@
1
1
  Gregoire Lejeune <glejeune.lejeune@free.fr>
2
2
 
3
+ Brandon Coleman <metrix1978@gmail.com>
4
+
3
5
  Thanks to :
4
6
 
5
7
  Desmond Dsouza - Windows tests and corrections
data/ChangeLog CHANGED
@@ -1,3 +1,6 @@
1
+ 0.8.0 :
2
+ * Add all the features of the current graphviz version
3
+
1
4
  0.7.0 :
2
5
  * Add option "path" to output
3
6
 
data/lib/graphviz.rb CHANGED
@@ -144,6 +144,13 @@ class GraphViz
144
144
 
145
145
  xLastType = kElement["type"]
146
146
 
147
+ #Modified by
148
+ #Brandon Coleman
149
+ #verify value is NOT NULL
150
+ if kElement["value"] == nil then
151
+ raise ArgumentError, "#{kElement["name"]} has a nil value!"
152
+ end
153
+
147
154
  case kElement["type"]
148
155
  when "graph_attr"
149
156
  xData << xSeparator + kElement["name"] + " = \"" + kElement["value"] + "\""
@@ -311,13 +318,5 @@ class GraphViz
311
318
  end
312
319
  return cmd
313
320
  end
314
- # def find_executable(bin, path = nil)
315
- # path = (path || ENV['PATH']).split(File::PATH_SEPARATOR)
316
- # file = nil
317
- # path.each do |dir|
318
- # return file if File.executable?(file = File.join(dir, bin))
319
- # end
320
- # nil
321
- # end
322
321
  end
323
322
 
@@ -1,4 +1,4 @@
1
- # Copyright (C) 2004, 2005, 2006, 2007 Gregoire Lejeune <gregoire.lejeune@free.fr>
1
+ # Copyright (C) 2004 Gregoire Lejeune <gregoire.lejeune@free.fr>
2
2
  #
3
3
  # This program is free software; you can redistribute it and/or modify
4
4
  # it under the terms of the GNU General Public License as published by
@@ -15,6 +15,9 @@
15
15
  # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
16
 
17
17
  module Constants
18
+ RGV_VERSION = "0.8.0"
19
+ RGV_DATE = "2007-05-15"
20
+
18
21
  ## Const: Output formats
19
22
  FORMATS = [
20
23
  "dot",
@@ -41,14 +44,15 @@ module Constants
41
44
  "plain",
42
45
  "text",
43
46
  "canon",
44
- "none"
47
+ "none"
45
48
  ]
46
49
 
47
50
  ## Const: programs
48
51
  PROGRAMS = [
49
52
  "dot",
50
- "neato",
51
- "twopi"
53
+ "neato",
54
+ "twopi",
55
+ "fdp"
52
56
  ]
53
57
 
54
58
  ## Const: type de graphs
@@ -60,6 +64,7 @@ module Constants
60
64
  # E, N, G, S and C represent edges, nodes, the root graph, subgraphs and cluster subgraphs, respectively
61
65
  GENCS_ATTRS = {
62
66
  "Damping" => { "UseBy" => "G", "Type" => "double" },
67
+ "K" => { "UseBy" => "GC", "Tyep" => "double" },
63
68
  "URL" => { "UseBy" => "ENGC", "Type" => "escString, string" },
64
69
  "arrowhead" => { "UseBy" => "E", "Type" => "arrowType" },
65
70
  "arrowsize" => { "UseBy" => "E", "Type" => "double" },
@@ -68,9 +73,11 @@ module Constants
68
73
  "bgcolor" => { "UseBy" => "GC", "Type" => "color" },
69
74
  "bottomlabel" => { "UseBy" => "N", "Type" => "string" },
70
75
  "center" => { "UseBy" => "G", "Type" => "bool" },
76
+ "charset" => { "UseBy" => "G", "Type" => "string" },
71
77
  "clusterrank" => { "UseBy" => "G", "Type" => "clusterMode" },
72
78
  "color" => { "UseBy" => "ENC", "Type" => "color, colorList" },
73
- "comment" => { "UseBy" => "ENG", "Type" => "string" },
79
+ "colorscheme" => { "UseBy" => "ENCG", "Type" => "string" },
80
+ "comment" => { "UseBy" => "ENG", "Type" => "string" },
74
81
  "compound" => { "UseBy" => "G", "Type" => "bool" },
75
82
  "concentrate" => { "UseBy" => "G", "Type" => "bool" },
76
83
  "constraint" => { "UseBy" => "E", "Type" => "bool" },
@@ -78,9 +85,15 @@ module Constants
78
85
  "defaultdist" => { "UseBy" => "G", "Type" => "double" },
79
86
  "dim" => { "UseBy" => "G", "Type" => "int" },
80
87
  "dir" => { "UseBy" => "E", "Type" => "dirType" },
88
+ "diredgeconstraints"=> { "UseBy" => "N", "Type" => "double" },
81
89
  "distortion" => { "UseBy" => "N", "Type" => "double" },
82
90
  "dpi" => { "UseBy" => "G", "Type" => "double" },
91
+ "edgeURL" => { "UseBy" => "E", "Type" => "lblString" },
92
+ "edgehref" => { "UseBy" => "E", "Type" => "lblString" },
93
+ "edgetarget" => { "UseBy" => "E", "Type" => "escString" },
94
+ "edgetooltip" => { "UseBy" => "E", "Type" => "escString" },
83
95
  "epsilon" => { "UseBy" => "G", "Type" => "double" },
96
+ "esep" => { "UseBy" => "G", "Type" => "double" },
84
97
  "fillcolor" => { "UseBy" => "NC", "Type" => "color" },
85
98
  "fixedsize" => { "UseBy" => "N", "Type" => "bool" },
86
99
  "fontcolor" => { "UseBy" => "ENGC", "Type" => "color" },
@@ -96,21 +109,26 @@ module Constants
96
109
  "headtarget" => { "UseBy" => "E", "Type" => "escString" },
97
110
  "headtooltip" => { "UseBy" => "E", "Type" => "escString" },
98
111
  "height" => { "UseBy" => "N", "Type" => "double" },
99
- "href" => { "UseBy" => "E", "Type" => "escString" },
100
- "label" => { "UseBy" => "ENGC", "Type" => "lblString" },
112
+ "href" => { "UseBy" => "E", "Type" => "lblString" },
101
113
  "html" => { "UseBy" => "N", "Type" => "lblString" }, # API extension
114
+ "labelURL" => { "UseBy" => "E", "Type" => "double" },
102
115
  "labelangle" => { "UseBy" => "E", "Type" => "double" },
103
116
  "labeldistance" => { "UseBy" => "E", "Type" => "double" },
104
117
  "labelfloat" => { "UseBy" => "E", "Type" => "bool" },
105
118
  "labelfontcolor" => { "UseBy" => "E", "Type" => "color" },
106
119
  "labelfontname" => { "UseBy" => "E", "Type" => "string" },
107
120
  "labelfontsize" => { "UseBy" => "E", "Type" => "double" },
121
+ "labelhref" => { "UseBy" => "E", "Type" => "double" },
108
122
  "labeljust" => { "UseBy" => "GC", "Type" => "string" },
109
123
  "labelloc" => { "UseBy" => "GC", "Type" => "string" },
124
+ "labeltarget" => { "UseBy" => "E", "Type" => "escString" },
125
+ "labeltooltip" => { "UseBy" => "E", "Type" => "escString" },
126
+ "landscape" => { "UseBy" => "G", "Type" => "bool" },
110
127
  "layer" => { "UseBy" => "EN", "Type" => "layerRange" },
111
128
  "layers" => { "UseBy" => "G", "Type" => "layerList" },
112
129
  "layersep" => { "UseBy" => "G", "Type" => "string" },
113
130
  "len" => { "UseBy" => "E", "Type" => "double" },
131
+ "levelsgap" => { "UseBy" => "G", "Type" => "double" },
114
132
  "lhead" => { "UseBy" => "E", "Type" => "string" },
115
133
  "lp" => { "UseBy" => "EGC", "Type" => "point" },
116
134
  "ltail" => { "UseBy" => "E", "Type" => "string" },
@@ -121,10 +139,12 @@ module Constants
121
139
  "minlen" => { "UseBy" => "E", "Type" => "int" },
122
140
  "mode" => { "UseBy" => "G", "Type" => "string" },
123
141
  "model" => { "UseBy" => "G", "Type" => "string" },
142
+ "mosek" => { "UseBy" => "G", "Type" => "bool" },
124
143
  "nodesep" => { "UseBy" => "G", "Type" => "double" },
125
144
  "nojustify" => { "UseBy" => "GCNE", "Type" => "bool" },
126
145
  "normalize" => { "UseBy" => "G", "Type" => "bool" },
127
- "nslimitnslimit1" => { "UseBy" => "G", "Type" => "double" },
146
+ "nslimit" => { "UseBy" => "G", "Type" => "double" },
147
+ "nslimit1" => { "UseBy" => "G", "Type" => "double" },
128
148
  "ordering" => { "UseBy" => "G", "Type" => "string" },
129
149
  "orientation" => { "UseBy" => "N", "Type" => "double" },
130
150
  "orientation" => { "UseBy" => "G", "Type" => "string" },
@@ -132,6 +152,7 @@ module Constants
132
152
  "overlap" => { "UseBy" => "G", "Type" => "string, bool" },
133
153
  "pack" => { "UseBy" => "G", "Type" => "bool, int" },
134
154
  "packmode" => { "UseBy" => "G", "Type" => "packMode" },
155
+ "pad" => { "UseBy" => "G", "Type" => "double, pointf" },
135
156
  "page" => { "UseBy" => "G", "Type" => "pointf" },
136
157
  "pagedir" => { "UseBy" => "G", "Type" => "pagedir" },
137
158
  "pencolor" => { "UseBy" => "C", "Type" => "color" },
@@ -153,7 +174,7 @@ module Constants
153
174
  "sametail" => { "UseBy" => "E", "Type" => "string" },
154
175
  "samplepoints" => { "UseBy" => "G", "Type" => "int" },
155
176
  "searchsize" => { "UseBy" => "G", "Type" => "int" },
156
- "sep" => { "UseBy" => "G", "Type" => "double" },
177
+ "sep" => { "UseBy" => "G", "Type" => "double, pointf" },
157
178
  "shape" => { "UseBy" => "N", "Type" => "shape" },
158
179
  "shapefile" => { "UseBy" => "N", "Type" => "string" },
159
180
  "showboxes" => { "UseBy" => "ENG", "Type" => "int" },
@@ -185,49 +206,93 @@ module Constants
185
206
 
186
207
  ## Const: Graph attributs
187
208
  GRAPHSATTRS = [
209
+ "Damping",
210
+ "K",
211
+ "URL",
212
+ "bb",
188
213
  "bgcolor",
189
214
  "center",
215
+ "charset",
190
216
  "clusterrank",
191
217
  "color",
218
+ "colorscheme",
192
219
  "comment",
193
220
  "compound",
194
221
  "concentrate",
222
+ "defaultdist",
223
+ "dim",
224
+ "diredgeconstraints",
225
+ "dpi",
226
+ "epsilon",
227
+ "esep",
195
228
  "fillcolor",
196
229
  "fontcolor",
197
230
  "fontname",
231
+ "fontnames",
198
232
  "fontpath",
199
233
  "fontsize",
200
234
  "label",
201
235
  "labeljust",
202
236
  "labelloc",
237
+ "landscape",
203
238
  "layer",
239
+ "layers",
240
+ "layersep",
241
+ "lp",
204
242
  "margin",
243
+ "maxiter",
205
244
  "mclimit",
245
+ "mindist",
246
+ "mode",
247
+ "model",
248
+ "mosek",
206
249
  "nodesep",
250
+ "nojustify",
251
+ "normalize",
207
252
  "nslimit",
208
253
  "nslimit1",
209
254
  "ordering",
210
255
  "orientation",
256
+ "outputorder",
257
+ "overlap",
258
+ "pack",
259
+ "packmode",
260
+ "pad",
211
261
  "page",
212
262
  "pagedir",
263
+ "pencolor",
264
+ "peripheries",
213
265
  "quantum",
214
266
  "rank",
215
267
  "rankdir",
216
268
  "ranksep",
217
269
  "ratio",
218
270
  "remincross",
271
+ "resolution",
272
+ "root",
219
273
  "rotate",
220
274
  "samplepoints",
221
275
  "searchsize",
276
+ "sep",
277
+ "showboxes",
222
278
  "size",
279
+ "splines",
280
+ "start",
223
281
  "style",
224
- "URL"
282
+ "stylesheet",
283
+ "target",
284
+ "tooltip",
285
+ "truecolor",
286
+ "viewport",
287
+ "voro_margin"
225
288
  ]
226
289
 
227
290
  ## Const: Node attributs
228
291
  NODESATTRS = [
292
+ "URL",
229
293
  "bottomlabel",
230
294
  "color",
295
+ "colorscheme",
231
296
  "comment",
232
297
  "distortion",
233
298
  "fillcolor",
@@ -239,16 +304,26 @@ module Constants
239
304
  "height",
240
305
  "label", "html",
241
306
  "layer",
307
+ "margin",
308
+ "nojustify",
242
309
  "orientation",
243
310
  "peripheries",
311
+ "pin",
312
+ "pos",
313
+ "rects",
244
314
  "regular",
315
+ "root",
316
+ "samplepoints",
245
317
  "shape",
246
318
  "shapefile",
247
319
  "sides",
248
320
  "skew",
249
321
  "style",
250
- "toplabel",
251
- "URL",
322
+ "target",
323
+ "tooltip",
324
+ #"toplabel",
325
+ #does not appear to be an option according to attributes info
326
+ "vertices",
252
327
  "width",
253
328
  "z"
254
329
  ]
@@ -259,32 +334,58 @@ module Constants
259
334
  "arrowsize",
260
335
  "arrowtail",
261
336
  "color",
337
+ "colorscheme",
338
+ "comment",
262
339
  "constraint",
263
340
  "decorate",
264
341
  "dir",
342
+ "edgeURL",
343
+ "edgehref",
344
+ "edgetarget",
345
+ "edgetooltip",
265
346
  "fontcolor",
266
347
  "fontname",
267
348
  "fontsize",
349
+ "headURL",
350
+ "headclip",
351
+ "headhref",
268
352
  "headlabel",
269
353
  "headport",
270
- "hearURL",
354
+ "headtarget",
355
+ "headtooltip",
356
+ "href",
271
357
  "label",
358
+ "labelURL",
272
359
  "labelangle",
273
360
  "labeldistance",
274
361
  "labelfloat",
275
362
  "labelfontcolor",
276
363
  "labelfontname",
277
364
  "labelfontsize",
365
+ "labelhref",
366
+ "labeltarget",
367
+ "labeltooltip",
278
368
  "layer",
369
+ "len",
279
370
  "lhead",
371
+ "lp",
280
372
  "ltail",
281
373
  "minlen",
374
+ "nojustify",
375
+ "pos",
282
376
  "samehead",
283
377
  "sametail",
378
+ "showboxes",
284
379
  "style",
285
- "taillael",
286
- "tailport",
287
380
  "tailURL",
381
+ "tailclip",
382
+ "tailhref",
383
+ "taillabel",
384
+ "tailport",
385
+ "tailtarget",
386
+ "tailtooltip",
387
+ "target",
388
+ "tooltip",
288
389
  "weight"
289
390
  ]
290
391
  end
metadata CHANGED
@@ -1,10 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.9.2
2
+ rubygems_version: 0.9.3
3
3
  specification_version: 1
4
4
  name: ruby-graphviz
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.7.0
7
- date: 2007-05-14 00:00:00 +02:00
6
+ version: 0.8.0
7
+ date: 2007-05-15 00:00:00 +02:00
8
8
  summary: Interface to the GraphViz graphing tool
9
9
  require_paths:
10
10
  - lib