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 +1 -1
- data/lib/ruport.rb +1 -1
- data/lib/ruport/formatter/pdf.rb +3 -1
- data/test/pdf_formatter_test.rb +11 -0
- metadata +2 -2
data/Rakefile
CHANGED
data/lib/ruport.rb
CHANGED
data/lib/ruport/formatter/pdf.rb
CHANGED
@@ -318,7 +318,9 @@ module Ruport
|
|
318
318
|
|
319
319
|
table_data.rename_columns { |c| c.to_s }
|
320
320
|
|
321
|
-
|
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
|
|
data/test/pdf_formatter_test.rb
CHANGED
@@ -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.
|
7
|
-
date: 2007-
|
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
|