tabulo 2.4.0 → 2.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/README.md +8 -8
- data/VERSION +1 -1
- data/lib/tabulo/border.rb +1 -1
- data/lib/tabulo/cell_data.rb +2 -1
- data/lib/tabulo/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d49cd1a3bfb031b2ced0f4539bd8ea16b2943df0c999f7b70e8ddf83cfcd5fa1
|
4
|
+
data.tar.gz: 745a3834a8c62ba85a7fbd8bdd826dc0bf9e18a1cb6fd54ac81e311870c02f61
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 939d50fdbe7bdfd94740ddddc86d3774c688e505633e693e27f41806224af8c601de6a4aa124ff868aefdc151ca72d4da89dfa2c045bce2b9e45c61064a7723a
|
7
|
+
data.tar.gz: 6cad47f7c06a52de935ebeec3710722344ac7d28159bca3d7efb2b9b627751a1c4d879d8b0d22beb0eb4af8705f03ee310d925b96b86d175d4c39e3f7b76acbf
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -261,7 +261,7 @@ table. However, if you want to insert a new column into some other position, you
|
|
261
261
|
`before` option, passing the label of the column to the left of which you want the new column to be added:
|
262
262
|
|
263
263
|
```ruby
|
264
|
-
table =
|
264
|
+
table = Tabulo::Table.new([1, 2, 3], :itself, :odd?)
|
265
265
|
table.add_column(:even?, before: :odd?)
|
266
266
|
```
|
267
267
|
|
@@ -573,10 +573,10 @@ end
|
|
573
573
|
Formatters set for individual columns on calling `#add_column` always override the default formatter for
|
574
574
|
the table.
|
575
575
|
|
576
|
-
The `formatter` callback has an alternative, 2-parameter version. If `formatter` is passed
|
576
|
+
The `formatter` callback also has an alternative, 2-parameter version. If `formatter` is passed
|
577
577
|
a 2-parameter callable, the second parameter will be given a `CellData` instance,
|
578
578
|
containing additional information about the cell that may be useful in determining how to format
|
579
|
-
it—see the [documentation](https://www.rubydoc.info/gems/tabulo/2.4.
|
579
|
+
it—see the [documentation](https://www.rubydoc.info/gems/tabulo/2.4.1/Tabulo/CellData.html)
|
580
580
|
for details.
|
581
581
|
|
582
582
|
<a name="colours-and-styling"></a>
|
@@ -622,7 +622,7 @@ the number is even); the second represents the formatted string value of that ce
|
|
622
622
|
content after any processing by the [formatter](#formatting-cell-values); and the third parameter,
|
623
623
|
if present, will be passed a `CellData` object, containing other information about the cell
|
624
624
|
that may be useful in determining how to style it—see the
|
625
|
-
[documentation](https://www.rubydoc.info/gems/tabulo/2.4.
|
625
|
+
[documentation](https://www.rubydoc.info/gems/tabulo/2.4.1/Tabulo/CellData.html) for details.
|
626
626
|
|
627
627
|
If the content of a cell is wrapped over multiple lines, then the `styler` will be called once
|
628
628
|
per line, so that each line of the cell will have the escape sequence applied to it separately
|
@@ -642,7 +642,7 @@ table.add_column(:even?, header_styler: -> (s) { "\033[32m#{s}\033[0m" })
|
|
642
642
|
```
|
643
643
|
|
644
644
|
The `header_styler` option accepts either a 1- or 2-parameter callable. See the
|
645
|
-
[documentation](https://www.rubydoc.info/gems/tabulo/2.4.
|
645
|
+
[documentation](https://www.rubydoc.info/gems/tabulo/2.4.1/Tabulo/Table#add_column-instance_method)
|
646
646
|
for details.
|
647
647
|
|
648
648
|
<a name="default-styles"></a>
|
@@ -835,7 +835,7 @@ a new table in which the rows and columns are swapped:
|
|
835
835
|
By default, a header row is added to the new table, showing the string value of the element
|
836
836
|
represented in that column. This can be configured, however, along with other aspects of
|
837
837
|
`transpose`’s behaviour. For details, see the
|
838
|
-
[documentation](https://www.rubydoc.info/gems/tabulo/2.4.
|
838
|
+
[documentation](https://www.rubydoc.info/gems/tabulo/2.4.1/Tabulo/Table#transpose-instance_method).
|
839
839
|
|
840
840
|
<a name="borders"></a>
|
841
841
|
### Configuring borders
|
@@ -1144,14 +1144,14 @@ The gem is available as open source under the terms of the [MIT
|
|
1144
1144
|
License](http://opensource.org/licenses/MIT).
|
1145
1145
|
|
1146
1146
|
[Gem Version]: https://rubygems.org/gems/tabulo
|
1147
|
-
[Documentation]: http://www.rubydoc.info/gems/tabulo/2.4.
|
1147
|
+
[Documentation]: http://www.rubydoc.info/gems/tabulo/2.4.1
|
1148
1148
|
[Build Status]: https://travis-ci.org/matt-harvey/tabulo
|
1149
1149
|
[Coverage Status]: https://coveralls.io/r/matt-harvey/tabulo
|
1150
1150
|
[Code Climate]: https://codeclimate.com/github/matt-harvey/tabulo
|
1151
1151
|
[Awesome Ruby]: https://github.com/markets/awesome-ruby#cli-utilities
|
1152
1152
|
|
1153
1153
|
[GV img]: https://img.shields.io/gem/v/tabulo.svg
|
1154
|
-
[DC img]: https://img.shields.io/badge/documentation-v2.4.
|
1154
|
+
[DC img]: https://img.shields.io/badge/documentation-v2.4.1-blue.svg
|
1155
1155
|
[BS img]: https://img.shields.io/travis/matt-harvey/tabulo.svg
|
1156
1156
|
[CS img]: https://img.shields.io/coveralls/matt-harvey/tabulo.svg
|
1157
1157
|
[CC img]: https://codeclimate.com/github/matt-harvey/tabulo/badges/gpa.svg
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.4.
|
1
|
+
2.4.1
|
data/lib/tabulo/border.rb
CHANGED
data/lib/tabulo/cell_data.rb
CHANGED
@@ -5,7 +5,8 @@ module Tabulo
|
|
5
5
|
# @attr source [Object] The member of this {Cell}'s {Table}'s underlying enumerable from which
|
6
6
|
# this {Cell}'s {Row} was derived.
|
7
7
|
# @attr row_index [Integer] The positional index of the {Cell}'s {Row}. The topmost {Row} of the
|
8
|
-
# {Table} has index 0, the next has index 1, etc..
|
8
|
+
# {Table} has index 0, the next has index 1, etc.. The header row(s) are not counted for the purpose
|
9
|
+
# of this numbering.
|
9
10
|
# @attr column_index [Integer] The positional index of the {Cell}'s {Column}. The leftmost {Column}
|
10
11
|
# of the {Table} has index 0, the next has index 1, etc..
|
11
12
|
CellData = Struct.new(:source, :row_index, :column_index)
|
data/lib/tabulo/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tabulo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.4.
|
4
|
+
version: 2.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthew Harvey
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-04-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tty-screen
|
@@ -219,8 +219,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
219
219
|
- !ruby/object:Gem::Version
|
220
220
|
version: '0'
|
221
221
|
requirements: []
|
222
|
-
|
223
|
-
rubygems_version: 2.7.6
|
222
|
+
rubygems_version: 3.1.2
|
224
223
|
signing_key:
|
225
224
|
specification_version: 4
|
226
225
|
summary: Terminal table generator
|