GraphvizR 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,7 @@
1
+ == 0.5.1 / 2007-03-19
2
+
3
+ * support left aligned text in record nodes
4
+
1
5
  == 0.5.0 / 2007-03-11
2
6
 
3
7
  * remove all deprecated code
@@ -141,7 +141,7 @@
141
141
  # c -> f [lhead = cluster1];
142
142
  #
143
143
  class GraphvizR
144
- VERSION = '0.5.0'
144
+ VERSION = '0.5.1'
145
145
  INDENT_UNIT = ' '
146
146
 
147
147
  attr_reader :statements, :graph_type
@@ -369,7 +369,7 @@ end
369
369
 
370
370
  class String #:nodoc:
371
371
  def to_dot
372
- inspect
372
+ inspect.gsub('\e', '\l')
373
373
  end
374
374
  end
375
375
 
@@ -364,6 +364,19 @@ digraph sample {
364
364
  alpha -> gamma [label = "label1"];
365
365
  beta -> delta [label = "label2"];
366
366
  delta -> size;
367
+ }
368
+ end_of_string
369
+ end
370
+
371
+ def test_left_aligned_text_in_record_nodes
372
+ gvr = GraphvizR.new 'sample'
373
+ gvr.node [:shape => 'record']
374
+ gvr.node1 [:label => "Object|left\eright\rcentered\n"]
375
+
376
+ assert_equal <<-'end_of_string', gvr.data(:dot)
377
+ digraph sample {
378
+ node [shape = "record"];
379
+ node1 [label = "Object|left\lright\rcentered\n"];
367
380
  }
368
381
  end_of_string
369
382
  end
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.0
3
3
  specification_version: 1
4
4
  name: GraphvizR
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.5.0
7
- date: 2007-03-11 00:00:00 +09:00
6
+ version: 0.5.1
7
+ date: 2007-03-19 00:00:00 +09:00
8
8
  summary: Graphviz wrapper for Ruby and Rails
9
9
  require_paths:
10
10
  - lib