html-table 1.7.0 → 1.7.1
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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/{CHANGES.rdoc → CHANGES.md} +73 -69
- data/Gemfile +2 -7
- data/{MANIFEST.rdoc → MANIFEST.md} +15 -15
- data/{README.rdoc → README.md} +80 -71
- data/Rakefile +7 -2
- data/doc/attributes.md +160 -0
- data/doc/table.md +173 -0
- data/doc/table_body.md +9 -0
- data/doc/table_caption.md +10 -0
- data/doc/table_colgroup.md +8 -0
- data/doc/table_colgroup_col.md +7 -0
- data/doc/table_content.md +17 -0
- data/doc/table_foot.md +8 -0
- data/doc/table_head.md +10 -0
- data/doc/table_row.md +114 -0
- data/doc/table_row_data.md +100 -0
- data/doc/table_row_header.md +6 -0
- data/examples/simple1.rb +7 -5
- data/html-table.gemspec +13 -8
- data/lib/html/body.rb +9 -7
- data/lib/html/caption.rb +4 -2
- data/lib/html/col.rb +37 -34
- data/lib/html/colgroup.rb +90 -97
- data/lib/html/content.rb +3 -6
- data/lib/html/data.rb +3 -1
- data/lib/html/foot.rb +53 -45
- data/lib/html/head.rb +54 -47
- data/lib/html/header.rb +5 -3
- data/lib/html/mixin/attribute_handler.rb +57 -53
- data/lib/html/mixin/html_handler.rb +33 -35
- data/lib/html/mixin/strongtyping.rb +6 -6
- data/lib/html/mixin/tag_handler.rb +6 -2
- data/lib/html/row.rb +156 -183
- data/lib/html/table.rb +45 -45
- data/lib/html/tablesection.rb +51 -46
- data/spec/attribute_handler_spec.rb +94 -80
- data/spec/body_spec.rb +54 -37
- data/spec/caption_spec.rb +41 -32
- data/spec/colgroup_col_spec.rb +7 -7
- data/spec/colgroup_spec.rb +50 -36
- data/spec/data_spec.rb +39 -23
- data/spec/foot_spec.rb +58 -46
- data/spec/head_spec.rb +62 -47
- data/spec/header_spec.rb +35 -22
- data/spec/html_handler_spec.rb +15 -12
- data/spec/row_spec.rb +95 -68
- data/spec/table_spec.rb +65 -31
- data/spec/tablesection_spec.rb +13 -13
- data/spec/tag_handler_spec.rb +13 -13
- data.tar.gz.sig +0 -0
- metadata +103 -78
- metadata.gz.sig +0 -0
- data/doc/attributes.rdoc +0 -143
- data/doc/table.rdoc +0 -156
- data/doc/table_body.rdoc +0 -9
- data/doc/table_caption.rdoc +0 -9
- data/doc/table_colgroup.rdoc +0 -8
- data/doc/table_colgroup_col.rdoc +0 -9
- data/doc/table_content.rdoc +0 -15
- data/doc/table_foot.rdoc +0 -8
- data/doc/table_head.rdoc +0 -11
- data/doc/table_row.rdoc +0 -105
- data/doc/table_row_data.rdoc +0 -92
- data/doc/table_row_header.rdoc +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 82a38153cceb16ff95343d215ddfd4d76c07b88d4fd918353cb3952268e0bd10
|
4
|
+
data.tar.gz: c2e5ba27dc21ac6f5e877816aa5186446c1aac7c32c5c869dd4d11ad7e4a29eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b2dd2a5e588778dd72d16099d54be08d7ec6cf7cb5ac41d427ddb876189092910394b96a6eeef8c19ba8981d788c65dbdb1147143baca4c7e5da432868d26f51
|
7
|
+
data.tar.gz: 6b8b5008c29310c29c837c0dcb3303e3c3e4a0aca99da05d191e614cdc36e7ec58afcdadb185e576772d2480b186ccb02ea165feef582472cb50283f89c9a911
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/{CHANGES.rdoc → CHANGES.md}
RENAMED
@@ -1,73 +1,77 @@
|
|
1
|
-
|
1
|
+
## 1.7.1 - 20-Jun-2025
|
2
|
+
* Mostly internal refactoring and rubocop updates.
|
3
|
+
* Switch from rdoc to markdown since github isn't rendering rdoc properly.
|
4
|
+
|
5
|
+
## 1.7.0 - 8-Sep-2020
|
2
6
|
* Switched from test-unit to rspec.
|
3
7
|
* Added a Gemfile.
|
4
8
|
|
5
|
-
|
9
|
+
## 1.6.3 - 18-Mar-2020
|
6
10
|
* Fixed the LICENSE file, which inadvertently included some unrelated
|
7
11
|
copyright notices. I also removed some unnecessary boilerplate.
|
8
12
|
* Added an explicit .rdoc extension to files that were already in that format.
|
9
13
|
|
10
|
-
|
14
|
+
## 1.6.2 - 17-Mar-2020
|
11
15
|
* Include copy of Apache-2.0 license in distribution.
|
12
16
|
|
13
|
-
|
14
|
-
* Namespace all the modules under HTML::Mixin to prevent potential clashes,
|
17
|
+
## 1.6.1 - 24-Feb-2019
|
18
|
+
* Namespace all the modules under `HTML::Mixin` to prevent potential clashes,
|
15
19
|
especially for the StrongTyping module. Thanks go to mistoo for the report.
|
16
20
|
|
17
|
-
|
18
|
-
* Changed license to Apache
|
21
|
+
## 1.6.0 - 16-Jan-2019
|
22
|
+
* Changed license to Apache-2.0.
|
19
23
|
* Removed strongtyping dependency, now comes bundled with a pure Ruby
|
20
24
|
version instead.
|
21
25
|
* Minor documentation updates.
|
22
26
|
|
23
|
-
|
27
|
+
## 1.5.2 - 4-Nov-2018
|
24
28
|
* Added metadata to gemspec.
|
25
29
|
|
26
|
-
|
30
|
+
## 1.5.1 - 31-Mar-2018
|
27
31
|
* Fixed deprecation warnings.
|
28
32
|
* Updated cert.
|
29
33
|
|
30
|
-
|
34
|
+
## 1.5.0 - 29-Mar-2017
|
31
35
|
* Updated the structured_warnings dependency to 0.3.0, and modified the
|
32
36
|
warning classes to subclass the new warning types.
|
33
37
|
* The VERSION constant is now frozen.
|
34
38
|
* Updated cert file.
|
35
39
|
|
36
|
-
|
40
|
+
## 1.4.2 - 8-Apr-2016
|
37
41
|
* This gem is now signed.
|
38
42
|
* Added the html-table.rb file for convenience.
|
39
43
|
* Updated the gem related rake tasks.
|
40
44
|
* Corrections to the README.
|
41
45
|
|
42
|
-
|
46
|
+
## 1.4.1 - 8-Nov-2014
|
43
47
|
* Minor updates to Rakefile and gemspec.
|
44
48
|
* Use require_relative where appropriate.
|
45
49
|
|
46
|
-
|
47
|
-
* The HTML::Table constructor now accepts an optional hash of options.
|
50
|
+
## 1.4.0 - 28-Aug-2013
|
51
|
+
* The `HTML::Table` constructor now accepts an optional hash of options.
|
48
52
|
If present, they are treated as table attributes.
|
49
53
|
* Some Rakefile and gemspec updates.
|
50
54
|
* Minor test file cleanup.
|
51
55
|
|
52
|
-
|
56
|
+
## 1.3.6 - 19-Sep-2011
|
53
57
|
* Fixes header.rb, data.rb and caption.rb for Ruby 1.9.
|
54
58
|
|
55
|
-
|
59
|
+
## 1.3.5 - 1-Sep-2011
|
56
60
|
* Refactored the Rakefile. Removed an old install task, reworked the
|
57
61
|
gem tasks and added a default task.
|
58
62
|
* Minor updates to the gemspec.
|
59
63
|
|
60
|
-
|
64
|
+
## 1.3.4 - 29-Sep-2009
|
61
65
|
* The test-unit library is now a development dependency instead of a
|
62
66
|
standard dependency.
|
63
67
|
* Removed all load path mangling.
|
64
|
-
* License changed to Artistic
|
68
|
+
* License changed to Artistic-2.0.
|
65
69
|
* Updated the gemspec description, added a license.
|
66
70
|
|
67
|
-
|
68
|
-
* Added structured_warnings as a requirement. The non standard tags now
|
69
|
-
raise a NonStandardExtensionWarning
|
70
|
-
used (instead of only in
|
71
|
+
## 1.3.3 - 5-Feb-2009
|
72
|
+
* Added `structured_warnings` as a requirement. The non standard tags now
|
73
|
+
raise a `NonStandardExtensionWarning`. These are now _always_ raised whenever
|
74
|
+
used (instead of only in `$VERBOSE` mode), but the warning can be disabled as
|
71
75
|
you see fit. See the documentation on structured_warnings for more details.
|
72
76
|
* Added test-unit 2.x as a requirement.
|
73
77
|
* Refactored and renamed the tests.
|
@@ -77,15 +81,15 @@
|
|
77
81
|
before.
|
78
82
|
* Added rake tasks for running the example programs.
|
79
83
|
|
80
|
-
|
84
|
+
## 1.3.2 - 15-Jul-2008
|
81
85
|
* Added to_s and to_str aliases for the html method for all classes.
|
82
86
|
* Some documentation updates.
|
83
87
|
* Removed unnecessary presetup code from the test files that was no longer
|
84
88
|
necessary thanks to Rake.
|
85
89
|
* Removed the ts_all.rb file. It was no longer necessary thanks to Rake.
|
86
90
|
|
87
|
-
|
88
|
-
* Fully qualified the HTML::Table class in the HTMLHandler module. This fix
|
91
|
+
## 1.3.1 - 8-Feb-2008
|
92
|
+
* Fully qualified the `HTML::Table` class in the `HTMLHandler` module. This fix
|
89
93
|
eliminates the need to 'include HTML' to actually get some code to work
|
90
94
|
properly. Thanks go to Jos Backus for the spot and patch.
|
91
95
|
* Added a Rakefile with tasks for testing and installation.
|
@@ -93,92 +97,92 @@
|
|
93
97
|
* Cleaned up some warnings in the AttributeHandler and TagHandler modules.
|
94
98
|
* Updated the MANIFEST and README files.
|
95
99
|
|
96
|
-
|
100
|
+
## 1.3.0 - 2-Aug-2006
|
97
101
|
* Added support for DSI style syntax, i.e. the ability to omit the explicit
|
98
102
|
receiver in block form.
|
99
|
-
* The content method now creates a Table::Content object behind the scenes
|
103
|
+
* The content method now creates a `Table::Content` object behind the scenes
|
100
104
|
(a subclass of String) and allows physical tags to generated on the fly
|
101
105
|
via a block.
|
102
|
-
* Added support for physical tags for content, e.g.
|
103
|
-
documentation for more details.
|
106
|
+
* Added support for physical tags for content, e.g. `<b>`, `<i>` etc.
|
107
|
+
See the documentation for more details.
|
104
108
|
* Added the 'style' and 'class_' attribute handlers for you CSS lovers.
|
105
109
|
* Added the 'data' alias for the 'content' method.
|
106
110
|
* Added the 'header' method to the Table class so that you can explicitly
|
107
|
-
generate
|
108
|
-
* The
|
109
|
-
disable formatting.
|
111
|
+
generate `<th>` content instead of `<td>` content if you prefer.
|
112
|
+
* The `html` singleton method now accepts an optional boolean that can be used to
|
113
|
+
disable formatting. If set to true, the output will not include newlines
|
110
114
|
or spaces between the tags (i.e. it will give you a single long string).
|
111
115
|
* Some comment additions and tweaks.
|
112
116
|
|
113
|
-
|
114
|
-
* Each class now defines its own content
|
115
|
-
method that handles it).
|
117
|
+
## 1.2.2 - 17-Jun-2005
|
118
|
+
* Each class now defines its own `content=` method (rather than a generic module
|
119
|
+
method that handles it). Internal change only.
|
116
120
|
* The Head, Foot and Body classes now use the inherited version of content=
|
117
121
|
method, instead of defining them individually (which they should have
|
118
122
|
been doing all along).
|
119
123
|
* Made the README and CHANGES file rdoc friendly.
|
120
124
|
* Removed the .rd and html files under the 'doc' directory. All of those
|
121
125
|
files have been made rdoc friendly and been given .rdoc extensions.
|
122
|
-
* Some
|
126
|
+
* Some `$LOAD_PATH` setup changes for the test suite.
|
123
127
|
|
124
|
-
|
128
|
+
## 1.2.1 - 26-Oct-2004
|
125
129
|
* Documentation additions to make the code rdoc friendly.
|
126
|
-
* Minor typo/bug fix in the background method of the AttributeHandler module.
|
130
|
+
* Minor typo/bug fix in the background method of the `AttributeHandler` module.
|
127
131
|
* Added an assertion to the test suite, mostly to make tc_all.rb work
|
128
132
|
correctly (one test was causing other tests to fail due to a global
|
129
133
|
setting that was made in a previous test).
|
130
134
|
|
131
|
-
|
132
|
-
* Added the global_end_tags
|
133
|
-
you to configure you want end tags or not for all classes, rather
|
134
|
-
having to configure each class individually.
|
135
|
+
## 1.2.0 - 8-Aug-2004
|
136
|
+
* Added the `global_end_tags=` singleton method for the Table class. This
|
137
|
+
allows you to configure you want end tags or not for all classes, rather
|
138
|
+
than having to configure each class individually. Note that classes which
|
135
139
|
require end tags are unaffected.
|
136
|
-
* Added handling for
|
137
|
-
any class that also used
|
138
|
-
* Minor update in the Table::Row#unshift method.
|
139
|
-
* Modified the border
|
140
|
-
or false as arguments.
|
140
|
+
* Added handling for `<<` for those classes where it was appropriate (i.e.
|
141
|
+
any class that also used `push`).
|
142
|
+
* Minor update in the `Table::Row#unshift` method.
|
143
|
+
* Modified the `border=` method in the AttributeHandler module to accept true
|
144
|
+
or false as arguments. I had forgotten that you could specify `border` as
|
141
145
|
an attribute without a value.
|
142
146
|
* Yet more tests.
|
143
147
|
|
144
|
-
|
148
|
+
## 1.1.0 - 6-Aug-2004
|
145
149
|
* Modified the constructors for all of the classes that can contain content
|
146
150
|
to accept an optional argument. If present it is assumed to be content.
|
147
|
-
* Fixed a bug/feature in Table::Row where it
|
148
|
-
delete Fixnums.
|
149
|
-
* The Table::ColGroup class no longer has the content or content
|
150
|
-
This was illegal in 1.0.0 as well but it now raises a NoMethodError instead.
|
151
|
+
* Fixed a bug/feature in `Table::Row` where it did not allow you to add or
|
152
|
+
delete Fixnums. Henceforth, Fixnums are stringified.
|
153
|
+
* The `Table::ColGroup` class no longer has the `content` or `content=` methods.
|
154
|
+
This was illegal in 1.0.0 as well but it now raises a `NoMethodError` instead.
|
151
155
|
* Added many more tests, including tests for attribute handlers and html
|
152
156
|
handlers.
|
153
|
-
* Made the modify_html method in the HtmlHandler module private.
|
154
|
-
have no affect on your code.
|
157
|
+
* Made the `modify_html` method in the `HtmlHandler` module private. This
|
158
|
+
should have no affect on your code.
|
155
159
|
* Added another simple sample program under doc/examples.
|
156
160
|
* Documentation updates.
|
157
161
|
|
158
|
-
|
162
|
+
## 1.0.0 - 23-May-2004
|
159
163
|
* No API changes - same as 0.0.4 but now officially declared "stable". The
|
160
164
|
only change that was made is that each class is now in its own file.
|
161
165
|
|
162
|
-
|
163
|
-
* Prerequisites now include Ruby 1.8.0 or later and the StrongTyping
|
164
|
-
Ryan Pavlik.
|
166
|
+
## 0.0.4 - 16-May-2004 (Beta4)
|
167
|
+
* Prerequisites now include Ruby 1.8.0 or later and the StrongTyping library
|
168
|
+
from Ryan Pavlik.
|
165
169
|
* More stringent type checking added using the StrongTyping package.
|
166
|
-
* Bug in Table::Foot class corrected.
|
170
|
+
* Bug in `Table::Foot` class corrected.
|
167
171
|
* Minor name change for included modules (AttributeHandler, HtmlHandler).
|
168
172
|
* Many more tests added
|
169
173
|
|
170
|
-
|
171
|
-
* Added html_case
|
172
|
-
|
173
|
-
* Fixed up the docs, added the html docs to the core distro
|
174
|
+
## 0.0.3 - 9-Jul-2003 (Beta3)
|
175
|
+
* Added the `html_case` singleton method for those who want their HTML tags
|
176
|
+
in uppercase.
|
177
|
+
* Fixed up the docs, added the html docs to the core distro.
|
174
178
|
* Added some config info to table.rb so that this package works as expected
|
175
|
-
after installation
|
179
|
+
after installation.
|
176
180
|
|
177
|
-
|
178
|
-
* API completely rewritten
|
179
|
-
* End tags and indentation level now configurable
|
181
|
+
## 0.0.2 - 5-Jul-2003 (Beta2)
|
182
|
+
* API completely rewritten.
|
183
|
+
* End tags and indentation level now configurable.
|
180
184
|
* Added all remaining tag types (caption, colgroup, col, tbody, tfoot and
|
181
|
-
thead)
|
185
|
+
thead).
|
182
186
|
|
183
|
-
|
187
|
+
## 0.0.1 11-Jun-2003 (Beta1)
|
184
188
|
* Initial Release
|
data/Gemfile
CHANGED
@@ -1,23 +1,23 @@
|
|
1
|
-
* CHANGES
|
1
|
+
* CHANGES.md
|
2
2
|
* LICENSE
|
3
|
-
* MANIFEST
|
4
|
-
* README
|
3
|
+
* MANIFEST.md
|
4
|
+
* README.md
|
5
5
|
* Gemfile
|
6
6
|
* Rakefile
|
7
7
|
* html-table.gemspec
|
8
8
|
* certs/djberg96_pub.pem
|
9
|
-
* doc/attributes.
|
10
|
-
* doc/table_body.
|
11
|
-
* doc/table_caption.
|
12
|
-
* doc/table_content.
|
13
|
-
* doc/table_colgroup.
|
14
|
-
* doc/table_colgroup_col.
|
15
|
-
* doc/table_foot.
|
16
|
-
* doc/table_head.
|
17
|
-
* doc/table_row_data.
|
18
|
-
* doc/table_row_header.
|
19
|
-
* doc/table_row.
|
20
|
-
* doc/table.
|
9
|
+
* doc/attributes.md
|
10
|
+
* doc/table_body.md
|
11
|
+
* doc/table_caption.md
|
12
|
+
* doc/table_content.md
|
13
|
+
* doc/table_colgroup.md
|
14
|
+
* doc/table_colgroup_col.md
|
15
|
+
* doc/table_foot.md
|
16
|
+
* doc/table_head.md
|
17
|
+
* doc/table_row_data.md
|
18
|
+
* doc/table_row_header.md
|
19
|
+
* doc/table_row.md
|
20
|
+
* doc/table.md
|
21
21
|
* doc/examples/advanced.rb
|
22
22
|
* doc/examples/intermediate1.rb
|
23
23
|
* doc/examples/intermediate2.rb
|
data/{README.rdoc → README.md}
RENAMED
@@ -1,74 +1,79 @@
|
|
1
|
-
|
2
|
-
An interface for generating HTML Tables with Ruby.
|
1
|
+
[](https://github.com/djberg96/html-table/actions/workflows/ruby.yml)
|
3
2
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
== Synopsis
|
8
|
-
require 'html/table'
|
9
|
-
include HTML
|
10
|
-
|
11
|
-
# Explicit syntax
|
12
|
-
table = HTML::Table.new{ |t|
|
13
|
-
t.border = 1
|
14
|
-
t.bgcolor = "red"
|
15
|
-
}
|
16
|
-
|
17
|
-
# Implicit syntax
|
18
|
-
table = HTML::Table.new do
|
19
|
-
border 1
|
20
|
-
bgcolor 'red'
|
21
|
-
end
|
22
|
-
|
23
|
-
table.push Table::Row.new{ |r|
|
24
|
-
r.align = "left"
|
25
|
-
r.bgcolor = "green"
|
26
|
-
r.content = ["foo","bar","baz"]
|
27
|
-
}
|
28
|
-
|
29
|
-
row = Table::Row.new{ |r|
|
30
|
-
r.align = "right"
|
31
|
-
r.bgcolor = "blue"
|
32
|
-
r.content = "hello world"
|
33
|
-
}
|
34
|
-
|
35
|
-
table[1] = row
|
36
|
-
|
37
|
-
puts table.html
|
38
|
-
|
39
|
-
# Output
|
40
|
-
<table border=1 bgcolor='red'>
|
41
|
-
<tr align='left' bgcolor='green'> # row 0
|
42
|
-
<td>foo</td> # column 0
|
43
|
-
<td>bar</td> # column 1
|
44
|
-
<td>baz</td> # column 2
|
45
|
-
</tr>
|
46
|
-
<tr align='right' bgcolor='blue'> # row 1
|
47
|
-
<td>hello world</td> # column 0
|
48
|
-
</tr>
|
49
|
-
</table>
|
3
|
+
## Description
|
4
|
+
An interface for generating HTML Tables with Ruby.
|
50
5
|
|
6
|
+
## Installation
|
7
|
+
`gem install html-table`
|
8
|
+
|
9
|
+
## Installing the Trusted Cert
|
10
|
+
|
11
|
+
`gem cert --add <(curl -Ls https://raw.githubusercontent.com/djberg96/html-table/main/certs/djberg96_pub.pem)`
|
12
|
+
|
13
|
+
## Synopsis
|
14
|
+
```ruby
|
15
|
+
require 'html/table'
|
16
|
+
include HTML
|
17
|
+
|
18
|
+
# Explicit syntax
|
19
|
+
table = HTML::Table.new{ |t|
|
20
|
+
t.border = 1
|
21
|
+
t.bgcolor = "red"
|
22
|
+
}
|
23
|
+
|
24
|
+
# Implicit syntax
|
25
|
+
table = HTML::Table.new do
|
26
|
+
border 1
|
27
|
+
bgcolor 'red'
|
28
|
+
end
|
29
|
+
|
30
|
+
table.push Table::Row.new{ |r|
|
31
|
+
r.align = "left"
|
32
|
+
r.bgcolor = "green"
|
33
|
+
r.content = ["foo","bar","baz"]
|
34
|
+
}
|
35
|
+
|
36
|
+
row = Table::Row.new{ |r|
|
37
|
+
r.align = "right"
|
38
|
+
r.bgcolor = "blue"
|
39
|
+
r.content = "hello world"
|
40
|
+
}
|
41
|
+
|
42
|
+
table[1] = row
|
43
|
+
|
44
|
+
puts table.html
|
45
|
+
```
|
46
|
+
Output:
|
47
|
+
```html
|
48
|
+
<table border=1 bgcolor='red'>
|
49
|
+
<tr align='left' bgcolor='green'> # row 0
|
50
|
+
<td>foo</td> # column 0
|
51
|
+
<td>bar</td> # column 1
|
52
|
+
<td>baz</td> # column 2
|
53
|
+
</tr>
|
54
|
+
<tr align='right' bgcolor='blue'> # row 1
|
55
|
+
<td>hello world</td> # column 0
|
56
|
+
</tr>
|
57
|
+
</table>
|
58
|
+
```
|
51
59
|
See the 'examples' directory under 'doc' for more examples.
|
52
60
|
|
53
|
-
|
61
|
+
## Mixins
|
54
62
|
Table is a subclass of Array, and therefore mixes in Enumerable. The
|
55
|
-
|
63
|
+
`push`, `unshift` and `[]=` methods have been modified. See below for details.
|
56
64
|
|
57
|
-
Table also mixes in AttributeHandler which provides methods for adding
|
65
|
+
Table also mixes in `AttributeHandler` which provides methods for adding
|
58
66
|
attributes to each of the tag types. See attributes.rdoc for more details.
|
59
67
|
|
60
|
-
|
61
|
-
A Table consists of Table::Row
|
62
|
-
Table::Body
|
68
|
+
## Notes
|
69
|
+
A Table consists of `Table::Row`, `Table::Caption`, `Table::ColGroup,`
|
70
|
+
`Table::Body`, `Table::Foot`, `Table::Head` and `Table::Row` objects.
|
63
71
|
|
64
|
-
Table::Row objects in turn consist of Table::Row::Data and
|
65
|
-
Table::Row::Header objects.
|
72
|
+
`Table::Row` objects in turn consist of `Table::Row::Data` and `Table::Row::Header` objects.
|
66
73
|
|
67
|
-
Table::ColGroup objects consist of Table::ColGroup::Col
|
68
|
-
objects.
|
74
|
+
`Table::ColGroup` objects consist of `Table::ColGroup::Col` objects.
|
69
75
|
|
70
|
-
Table::Head
|
71
|
-
of Table::Row objects.
|
76
|
+
`Table::Head`, `Table::Body` and `Table::Foot` objects consist of `Table::Row` objects.
|
72
77
|
|
73
78
|
String attributes are quoted. Numeric attributes are not.
|
74
79
|
|
@@ -77,37 +82,41 @@ the latter case, it is case-insensitive. See the documentation on
|
|
77
82
|
specific methods for more details.
|
78
83
|
|
79
84
|
Using a non-standard extension (e.g. "background") will emit a
|
80
|
-
NonStandardExtensionWarning
|
85
|
+
`NonStandardExtensionWarning`. See the documentation for `structured_warnings`
|
81
86
|
for more information on how to control these.
|
82
87
|
|
83
|
-
|
88
|
+
## Documentation
|
89
|
+
|
90
|
+
https://djberg96.github.io/html-table/
|
91
|
+
|
92
|
+
## Known Bugs
|
84
93
|
None that I'm aware of. Please report bugs on the project page at:
|
85
94
|
|
86
95
|
http://github.com/djberg96/html-table
|
87
96
|
|
88
|
-
|
97
|
+
## Future Plans
|
89
98
|
None at this time.
|
90
99
|
|
91
|
-
|
92
|
-
Anthony Peacock, for giving me ideas with his HTML::Table Perl module.
|
100
|
+
## Acknowledgements
|
101
|
+
Anthony Peacock, for giving me ideas with his `HTML::Table` Perl module.
|
93
102
|
Holden Glova and Culley Harrelson for API suggestions and comments.
|
94
103
|
|
95
|
-
|
104
|
+
## License
|
96
105
|
Apache-2.0
|
97
106
|
|
98
|
-
|
99
|
-
(C) 2003-
|
107
|
+
## Copyright
|
108
|
+
(C) 2003-2025 Daniel J. Berger
|
100
109
|
All Rights Reserved
|
101
110
|
|
102
|
-
|
111
|
+
## Warranty
|
103
112
|
This package is provided "as is" and without any express or
|
104
113
|
implied warranties, including, without limitation, the implied
|
105
114
|
warranties of merchantability and fitness for a particular purpose.
|
106
115
|
|
107
|
-
|
116
|
+
## Author
|
108
117
|
Daniel J. Berger
|
109
118
|
|
110
|
-
|
119
|
+
## Developer's Notes
|
111
120
|
Some people might be a little annoyed with the fact that I use a
|
112
121
|
strongtyping library. I'm not a big fan of strong typing myself.
|
113
122
|
So, why did I do this?
|
data/Rakefile
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'rake'
|
2
2
|
require 'rake/clean'
|
3
3
|
require 'rspec/core/rake_task'
|
4
|
+
require 'rubocop/rake_task'
|
4
5
|
|
5
6
|
CLEAN.include("**/*.gem", "**/*.rbc", "**/*.lock")
|
6
7
|
|
@@ -8,9 +9,9 @@ namespace :gem do
|
|
8
9
|
desc 'Build the html-table gem'
|
9
10
|
task :create => [:clean] do
|
10
11
|
require 'rubygems/package'
|
11
|
-
spec =
|
12
|
+
spec = Gem::Specification.load('html-table.gemspec')
|
12
13
|
spec.signing_key = File.join(Dir.home, '.ssh', 'gem-private_key.pem')
|
13
|
-
Gem::Package.build(spec
|
14
|
+
Gem::Package.build(spec)
|
14
15
|
end
|
15
16
|
|
16
17
|
desc "Install the html-table package as a gem"
|
@@ -52,6 +53,8 @@ namespace 'example' do
|
|
52
53
|
end
|
53
54
|
end
|
54
55
|
|
56
|
+
RuboCop::RakeTask.new
|
57
|
+
|
55
58
|
namespace :spec do
|
56
59
|
RSpec::Core::RakeTask.new(:attribute_handler) do |t|
|
57
60
|
t.pattern = 'spec/attribute_handler_spec.rb'
|
@@ -110,7 +113,9 @@ namespace :spec do
|
|
110
113
|
end
|
111
114
|
|
112
115
|
RSpec::Core::RakeTask.new(:all) do |t|
|
116
|
+
t.verbose = false
|
113
117
|
t.pattern = 'spec/*_spec.rb'
|
118
|
+
t.rspec_opts = '-f documentation'
|
114
119
|
end
|
115
120
|
end
|
116
121
|
|