prawn-table 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/prawn/table.rb +1 -0
- data/lib/prawn/table/cell.rb +5 -5
- data/lib/prawn/table/version.rb +1 -1
- data/prawn-table.gemspec +1 -1
- data/spec/spec_helper.rb +0 -1
- data/spec/table/span_dummy_spec.rb +14 -5
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bdd445559cd79a07720ef66b367f35ee02459386
|
4
|
+
data.tar.gz: 25fe46a4a1b7b6d44a148410738b68ff85cb89b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b76fb3bb2a2b9162567635bf03796e60abd2b259496c9c9e63d5274ca6855ef073612d0c44742be64f447cb74de2b94904852d8e4f1f08df19df88fad7eed7a0
|
7
|
+
data.tar.gz: 659119d602c5a3b99dac86f6975297816f0fd29c9aef0eac539e0fd859ab0bd22fc673eab05aba47945b167132d2cec6670ca288de403acd46d125de630152f3
|
data/lib/prawn/table.rb
CHANGED
data/lib/prawn/table/cell.rb
CHANGED
@@ -710,11 +710,11 @@ module Prawn
|
|
710
710
|
# Draws the cell's background color.
|
711
711
|
#
|
712
712
|
def draw_background(pt)
|
713
|
-
|
714
|
-
|
715
|
-
|
716
|
-
|
717
|
-
|
713
|
+
return unless background_color
|
714
|
+
|
715
|
+
@pdf.mask(:fill_color) do
|
716
|
+
@pdf.fill_color background_color
|
717
|
+
@pdf.fill_rectangle pt, width, height
|
718
718
|
end
|
719
719
|
end
|
720
720
|
|
data/lib/prawn/table/version.rb
CHANGED
data/prawn-table.gemspec
CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.rubyforge_project = "prawn"
|
20
20
|
spec.licenses = ['RUBY', 'GPL-2', 'GPL-3']
|
21
21
|
|
22
|
-
spec.
|
22
|
+
spec.add_dependency('prawn', '>= 1.3.0', '< 3.0.0')
|
23
23
|
spec.add_development_dependency('pdf-inspector', '~> 1.1.0')
|
24
24
|
spec.add_development_dependency('yard')
|
25
25
|
spec.add_development_dependency('rspec', '2.14.1')
|
data/spec/spec_helper.rb
CHANGED
@@ -6,12 +6,21 @@ require 'set'
|
|
6
6
|
describe "Prawn::Table::Cell::SpanDummy" do
|
7
7
|
before(:each) do
|
8
8
|
@pdf = Prawn::Document.new
|
9
|
-
@table = @pdf.table([
|
10
|
-
|
11
|
-
|
9
|
+
@table = @pdf.table([
|
10
|
+
[{:content => "A1-2", :colspan => 2}, {:content => "A-B3", :rowspan => 2}],
|
11
|
+
[{:content => "B1-2", :colspan => 2}]
|
12
|
+
], :row_colors => [nil, 'EFEFEF'])
|
13
|
+
@colspan_master = @table.cells[0,0]
|
14
|
+
@colspan_dummy = @colspan_master.dummy_cells.first
|
15
|
+
@rowspan_master = @table.cells[0,2]
|
16
|
+
@rowspan_dummy = @table.cells[1,2]
|
12
17
|
end
|
13
18
|
|
14
|
-
it "delegates background_color to the master cell" do
|
15
|
-
@
|
19
|
+
it "colspan dummy delegates background_color to the master cell" do
|
20
|
+
@colspan_dummy.background_color.should == @colspan_master.background_color
|
21
|
+
end
|
22
|
+
|
23
|
+
it "rowspan dummy delegates background_color to the master cell" do
|
24
|
+
@rowspan_dummy.background_color.should == @rowspan_master.background_color
|
16
25
|
end
|
17
26
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: prawn-table
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gregory Brown
|
@@ -13,7 +13,7 @@ authors:
|
|
13
13
|
autorequire:
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
|
-
date:
|
16
|
+
date: 2015-07-16 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: prawn
|
@@ -25,7 +25,7 @@ dependencies:
|
|
25
25
|
- - "<"
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: 3.0.0
|
28
|
-
type: :
|
28
|
+
type: :runtime
|
29
29
|
prerelease: false
|
30
30
|
version_requirements: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
@@ -224,7 +224,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
224
224
|
version: 1.3.6
|
225
225
|
requirements: []
|
226
226
|
rubyforge_project: prawn
|
227
|
-
rubygems_version: 2.
|
227
|
+
rubygems_version: 2.4.5
|
228
228
|
signing_key:
|
229
229
|
specification_version: 4
|
230
230
|
summary: Provides tables for PrawnPDF
|