Spreadsheet-HTML 0.0.11 → 0.0.12

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 193027f607dd3ef04e4265fd03be81f3bdf75d86
4
- data.tar.gz: a519f019fc77f3fca13384e64acb69d9b9231d99
3
+ metadata.gz: e8ceaee77f05b755a6f0fdc84a5931750d0665a4
4
+ data.tar.gz: eb787f07df9f1449972e1bf6d9625e7612865608
5
5
  SHA512:
6
- metadata.gz: e1712621904d70a3938d4d257e3839bc2b085df25d0aeb9d20d9bc6b7ec903892005b509b873d1c17da7658c35286721ae52c67b879b19a77fe399d2c5b6b87f
7
- data.tar.gz: 2c2035633f4d03f4cdbfbba0d23d515de0adc751f1d53c89fb6def0521766b02450e360db17a769fd7a451cf4402da8eae9236c688fea2cc83ba8500ea3cf49f
6
+ metadata.gz: 79f2c114c130dc28f64c4edeb92a9ba74a0e3333c8f440a3b8942d860fbec3274e4acb5ca55860082345a35b3d409467201a0dbb28e8dfeefbeab1ea5c256261
7
+ data.tar.gz: 3d162b8db693617c738b05c304da25c45bf45fe9a14b2ca8da105e4de57d6415b89b27f6d12025045f0ddfe74481180e194f7e6e6cec302b4af8988557035bef
data/Changes CHANGED
@@ -1,5 +1,10 @@
1
1
  Revision history for html-autotag-ruby
2
2
 
3
+ 1.0.0
4
+ - production ready
5
+ - corrected docs
6
+ - require HTML::AutoTag v1.0.7
7
+
3
8
  0.0.11
4
9
  - added col and colgroup params
5
10
  - added caption param
data/README CHANGED
@@ -140,14 +140,6 @@ fill
140
140
 
141
141
  'fill' => '8x12' # 8 rows, 12 columns
142
142
 
143
- caption
144
- Caption is special in that you can either pass a string to be used as CDATA or a hash whose only
145
- key is the string to be used as CDATA.
146
-
147
- 'caption' => 'Just Another Title'
148
-
149
- 'caption' => { 'A Title With Attributes' => { 'align' => 'bottom' } }
150
-
151
143
  == Dynamic Parameters
152
144
  Dynamic parameters provide a means to control the micro elements of the table,
153
145
  such as modifying headings by their name and rows and columns by their indices.
@@ -226,6 +218,28 @@ td
226
218
  'td' => lambda { |c| c.upcase }
227
219
  'td' => [ { 'style' => { 'color' => %w{ red green blue } }, lambda { |c| c.upcase } ]
228
220
 
221
+ caption
222
+ Caption is special in that you can either pass a string to be used as CDATA or a hash whose only
223
+ key is the string to be used as CDATA.
224
+
225
+ 'caption' => 'Just Another Title'
226
+
227
+ 'caption' => { 'A Title With Attributes' => { 'align' => 'bottom' } }
228
+
229
+ colgroup
230
+ Add colgroup tag(s) to the table. Use an AoH for multiple.
231
+
232
+ colgroup => { 'span => '2', 'style' => { 'background-color' => 'orange' } }
233
+
234
+ colgroup => Array[ { 'span => '20' }, { 'span' => '1', 'class' => 'end' } ]
235
+
236
+ col
237
+ Add col tag(s) to the table. Use an AoH for multiple. Wraps tags within a colgroup tag. Same usage as colgroup.
238
+
239
+ col => { 'span' => '2', 'style' => { 'background-color' => 'orange' } }
240
+
241
+ col => Array[ { 'span' => 20 }, { 'span' => '1', 'class' => 'end' } ]
242
+
229
243
  thead.tr
230
244
  When tgroups is 1 or 2, this tag parameter is available to control the attributes of
231
245
  the <tr> tag within the <thead> group.
@@ -22,5 +22,5 @@ Gem::Specification.new do |spec|
22
22
 
23
23
  spec.add_development_dependency "bundler", "~> 1.3"
24
24
  spec.add_development_dependency 'rake'
25
- spec.add_runtime_dependency 'HTML-AutoTag', '>= 1.0.6'
25
+ spec.add_runtime_dependency 'HTML-AutoTag', '>= 1.0.7'
26
26
  end
@@ -1,5 +1,5 @@
1
1
  module Spreadsheet
2
2
  class HTML
3
- VERSION = "0.0.11"
3
+ VERSION = "0.0.12"
4
4
  end
5
5
  end
data/t/14-colgroup.rb CHANGED
@@ -11,7 +11,7 @@ class Test_Colgroup < Test::Unit::TestCase
11
11
  %w( 4 5 6 ),
12
12
  ]
13
13
 
14
- gen = Spreadsheet::HTML.new( 'data' => data, 'colgroup' => { 'span' => '3', 'width' => '100' }, 'attr_sort' => 1 );
14
+ gen = Spreadsheet::HTML.new( 'data' => data, 'colgroup' => { 'span' => 3, 'width' => 100 }, 'attr_sort' => 1 );
15
15
 
16
16
  assert_equal(
17
17
  '<table><colgroup span="3" width="100" /><tr><th>a</th><th>b</th><th>c</th></tr><tr><td>1</td><td>2</td><td>3</td></tr><tr><td>4</td><td>5</td><td>6</td></tr></table>',
@@ -39,7 +39,7 @@ class Test_Colgroup < Test::Unit::TestCase
39
39
 
40
40
  assert_equal(
41
41
  '<table><colgroup color="red" span="1" /><colgroup color="blue" span="2" /><tr><th>a</th><th>b</th><th>c</th></tr><tr><td>1</td><td>2</td><td>3</td></tr><tr><td>4</td><td>5</td><td>6</td></tr></table>',
42
- gen.generate( 'colgroup' => [ { 'span' => '1', 'color' => 'red' }, { 'span' => '2', 'color' => 'blue' } ] ),
42
+ gen.generate( 'colgroup' => [ { 'span' => 1, 'color' => 'red' }, { 'span' => 2, 'color' => 'blue' } ] ),
43
43
  "can specify multiple colgroups"
44
44
  )
45
45
 
@@ -53,7 +53,7 @@ class Test_Colgroup < Test::Unit::TestCase
53
53
  %w( 4 5 6 ),
54
54
  ]
55
55
 
56
- gen = Spreadsheet::HTML.new( 'data' => data, 'colgroup' => { 'span' => '3', 'width' => '100' }, 'attr_sort' => 1 );
56
+ gen = Spreadsheet::HTML.new( 'data' => data, 'colgroup' => { 'span' => 3, 'width' => 100 }, 'attr_sort' => 1 );
57
57
 
58
58
  assert_equal(
59
59
  '<table><colgroup span="3" width="100"><col /></colgroup><tr><th>a</th><th>b</th><th>c</th></tr><tr><td>1</td><td>2</td><td>3</td></tr><tr><td>4</td><td>5</td><td>6</td></tr></table>',
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: Spreadsheet-HTML
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - jeffa
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-10 00:00:00.000000000 Z
11
+ date: 2015-12-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: 1.0.6
47
+ version: 1.0.7
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: 1.0.6
54
+ version: 1.0.7
55
55
  description: Just another HTML table generator
56
56
  email:
57
57
  - jeffa@cpan.org