tabulo 2.0.1 → 2.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +7 -14
- data/VERSION +1 -1
- data/lib/tabulo/row.rb +2 -4
- data/lib/tabulo/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 29ccac7f8f8f35e1d74b9e29eea3a94470cb0b16835c0d1ef78f2e1481f0440e
|
4
|
+
data.tar.gz: 87358166e6a07b3e08c230a163d2bb5cb0ad49fb2b5b060440bbc2e17b8a4785
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 68ca443c73c20a45a173e2bf1b6adfc29ed29e8d36e3e4d5b840dcee166d3d8fcdf63ca33663267a76a1e17e95e1869496aff9a10fec0a1813cb81b73f89ee8a
|
7
|
+
data.tar.gz: 9aea6493fe1f7db0f85308bfc8ad2cc7c7904e19c7a498e035e344dfc2f78b17b06a17042024e0019f6b1df9cec651deffe4fc27c87f0a6b127513f36f12c134
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -52,7 +52,6 @@ Tabulo has also been ported to Crystal (with some modifications): see [Tablo](ht
|
|
52
52
|
|
53
53
|
## Contents
|
54
54
|
|
55
|
-
* [Overview](#overview)
|
56
55
|
* [Features](#features)
|
57
56
|
* [Table of contents](#table-of-contents)
|
58
57
|
* [Installation](#installation)
|
@@ -390,6 +389,9 @@ table = Tabulo::Table.new(
|
|
390
389
|
+--------------+--------------+
|
391
390
|
```
|
392
391
|
|
392
|
+
The character used to indicate truncation, which defaults to `~`, can be configured using the
|
393
|
+
`truncation_indicator` option passed to `Table.new`.
|
394
|
+
|
393
395
|
<a name="formatting-cell-values"></a>
|
394
396
|
### Formatting cell values
|
395
397
|
|
@@ -423,9 +425,6 @@ Note the numbers in the "Reciprocal" column in this example are still right-alig
|
|
423
425
|
the callable passed to `formatter` returns a String. Default cell alignment is determined by the type
|
424
426
|
of the underlying cell value, not the way it is formatted. This is usually the desired result.
|
425
427
|
|
426
|
-
Note also that the item yielded to `.each` for each cell when enumerating over a `Tabulo::Row` is
|
427
|
-
the underlying value of that cell, not its formatted value.
|
428
|
-
|
429
428
|
<a name="colours-and-styling"></a>
|
430
429
|
### Colours and styling
|
431
430
|
|
@@ -554,7 +553,7 @@ calculated.)
|
|
554
553
|
|
555
554
|
Each `Tabulo::Table` is an `Enumerable` of which each element is a `Tabulo::Row`. Each `Tabulo::Row`
|
556
555
|
is itself an `Enumerable`, of `Tabulo::Cell`. The `Tabulo::Cell#value` method will return the
|
557
|
-
underlying value of the cell; while `Tabulo::Cell#
|
556
|
+
underlying value of the cell; while `Tabulo::Cell#formatted_content` will return its formatted content
|
558
557
|
as a string.
|
559
558
|
|
560
559
|
A `Tabulo::Row` can also
|
@@ -652,7 +651,7 @@ a new table in which the rows and columns are swapped:
|
|
652
651
|
By default, a header row is added to the new table, showing the string value of the element
|
653
652
|
represented in that column. This can be configured, however, along with other aspects of
|
654
653
|
`transpose`'s behaviour. For details, see the
|
655
|
-
[documentation](https://www.rubydoc.info/gems/tabulo/2.0.
|
654
|
+
[documentation](https://www.rubydoc.info/gems/tabulo/2.0.2/Tabulo/Table#transpose-instance_method).
|
656
655
|
|
657
656
|
<a name="borders"></a>
|
658
657
|
### Configuring borders
|
@@ -720,12 +719,6 @@ but without a bottom border:
|
|
720
719
|
| 3 | false | true |
|
721
720
|
```
|
722
721
|
|
723
|
-
<a name="additional-configuration-options"></a>
|
724
|
-
### Other configuration options
|
725
|
-
|
726
|
-
The character used to indicate truncation, which defaults to `~`, can be configured using the
|
727
|
-
`truncation_indicator` option passed to `Table.new`.
|
728
|
-
|
729
722
|
<a name="motivation"></a>
|
730
723
|
## Comparison with other libraries
|
731
724
|
|
@@ -828,14 +821,14 @@ The gem is available as open source under the terms of the [MIT
|
|
828
821
|
License](http://opensource.org/licenses/MIT).
|
829
822
|
|
830
823
|
[Gem Version]: https://rubygems.org/gems/tabulo
|
831
|
-
[Documentation]: http://www.rubydoc.info/gems/tabulo/2.0.
|
824
|
+
[Documentation]: http://www.rubydoc.info/gems/tabulo/2.0.2
|
832
825
|
[Build Status]: https://travis-ci.org/matt-harvey/tabulo
|
833
826
|
[Coverage Status]: https://coveralls.io/r/matt-harvey/tabulo
|
834
827
|
[Code Climate]: https://codeclimate.com/github/matt-harvey/tabulo
|
835
828
|
[Awesome Ruby]: https://github.com/markets/awesome-ruby#cli-utilities
|
836
829
|
|
837
830
|
[GV img]: https://img.shields.io/gem/v/tabulo.svg
|
838
|
-
[DC img]: https://img.shields.io/badge/documentation-v2.0.
|
831
|
+
[DC img]: https://img.shields.io/badge/documentation-v2.0.2-blue.svg
|
839
832
|
[BS img]: https://img.shields.io/travis/matt-harvey/tabulo.svg
|
840
833
|
[CS img]: https://img.shields.io/coveralls/matt-harvey/tabulo.svg
|
841
834
|
[CC img]: https://codeclimate.com/github/matt-harvey/tabulo/badges/gpa.svg
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.0.
|
1
|
+
2.0.2
|
data/lib/tabulo/row.rb
CHANGED
@@ -13,15 +13,13 @@ module Tabulo
|
|
13
13
|
@header = header
|
14
14
|
end
|
15
15
|
|
16
|
-
# Calls the given block once for each
|
17
|
-
# Each "cell" is just the calculated value for its column (pre-formatting) for this {Row}'s
|
18
|
-
# source item.
|
16
|
+
# Calls the given block once for each {Cell} in the {Row}, passing that {Cell} as parameter.
|
19
17
|
#
|
20
18
|
# @example
|
21
19
|
# table = Tabulo::Table.new([1, 10], columns: %i(itself even?))
|
22
20
|
# row = table.first
|
23
21
|
# row.each do |cell|
|
24
|
-
# puts cell
|
22
|
+
# puts cell.value # => 1, => false
|
25
23
|
# end
|
26
24
|
def each
|
27
25
|
@table.column_registry.each do |_, column|
|
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.0.
|
4
|
+
version: 2.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthew Harvey
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-11-
|
11
|
+
date: 2019-11-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tty-screen
|