ruport 1.2.1 → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Rakefile CHANGED
@@ -3,7 +3,7 @@ require "rake/testtask"
3
3
  require "rake/gempackagetask"
4
4
  #
5
5
 
6
- RUPORT_VERSION = "1.2.1"
6
+ RUPORT_VERSION = "1.2.2"
7
7
 
8
8
  begin
9
9
  require "rubygems"
data/lib/ruport.rb CHANGED
@@ -12,7 +12,7 @@
12
12
 
13
13
  module Ruport #:nodoc:#
14
14
 
15
- VERSION = "1.2.1"
15
+ VERSION = "1.2.2"
16
16
 
17
17
  class FormatterError < RuntimeError #:nodoc:
18
18
  end
@@ -318,7 +318,9 @@ module Ruport
318
318
 
319
319
  table_data.rename_columns { |c| c.to_s }
320
320
 
321
- format_opts = table_format.merge(format_opts) if table_format
321
+ if table_format
322
+ format_opts = Marshal.load(Marshal.dump(table_format.merge(format_opts)))
323
+ end
322
324
 
323
325
  old = pdf_writer.font_size
324
326
 
@@ -94,6 +94,17 @@ class TestRenderPDFTable < Test::Unit::TestCase
94
94
  def test_tables_should_render_with_symbol_column_name
95
95
  data = [[1,2,3],[4,5,6]].to_table([:a,:b,:c])
96
96
  assert_nothing_raised { data.to_pdf }
97
+ end
98
+
99
+ # draw_table has destructive behavior on nested rendering options (#359)
100
+ def test_draw_table_should_not_destroy_nested_rendering_options
101
+ f = Ruport::Formatter::PDF.new
102
+ f.options = Ruport::Renderer::Options.new
103
+ f.options[:table_format] =
104
+ { :column_options => { :heading => {:justification => :center }}}
105
+ f.draw_table [[1,2,3],[4,5,6]].to_table(%w[a b c])
106
+ assert_equal({ :justification => :center },
107
+ f.options[:table_format][:column_options][:heading])
97
108
  end
98
109
 
99
110
  end
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.4
3
3
  specification_version: 1
4
4
  name: ruport
5
5
  version: !ruby/object:Gem::Version
6
- version: 1.2.1
7
- date: 2007-09-23 00:00:00 -04:00
6
+ version: 1.2.2
7
+ date: 2007-10-29 00:00:00 -04:00
8
8
  summary: A generalized Ruby report generation and templating engine.
9
9
  require_paths:
10
10
  - lib