tabulo 2.6.0 → 2.6.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f9ebd03570ab58159573421765c5fa7260dbaec7a7f573a28b746a2c022dd3c8
4
- data.tar.gz: 85c7d4de41779701baceb6db3b0b66b47025f0c3f99a8181f9948306d5f826bb
3
+ metadata.gz: 5bf2b89914117264e5f213553c792d1456d4f5d99ae8afac565ff1dbc069400b
4
+ data.tar.gz: 6220df7007ae352c400291101f6308f99ad063fe98c5820820da599f674d4a43
5
5
  SHA512:
6
- metadata.gz: eabf52fe920bdbc2867184f3feee0d03e33f79d101d95b4b96095e390786d8443d22c1ab51a10e5a26645c45687f4a36f18c5dc8b35cc72d9162c90c3fb243cc
7
- data.tar.gz: d991da9c53378a981623c5622be156f970f37e6f42a3dd22b02d51b11020e1302a5b5209117a4a6b9d74e36c555f73f0a2f67eb2b6ff2dafcf7b14d172eb2e00
6
+ metadata.gz: 13228bb55890713cb9483f18d55339dcf7393aff65a7f91383eb9a5d7dce03acd968e09e883ae3f72088e4d543d1bdc962cb38a0c9444cdd1a93482c55f9c354
7
+ data.tar.gz: e865337603240b4b8456f5b2b7bbb64f660b18acfc4caf0318ef9869f58070801da24bbdd7de740133a6ef386d5c6c02ee198098605fb7a13acd60547bbdb04e
@@ -4,7 +4,7 @@ rvm:
4
4
  - 2.1.10
5
5
  - 2.2.10
6
6
  - 2.3.8
7
- - 2.4.9
7
+ - 2.4.10
8
8
  - 2.5.8
9
9
  - 2.6.6
10
10
  - 2.7.1
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ### v2.6.1
4
+
5
+ * Update dependency versions
6
+ * Minor documentation improvements
7
+
3
8
  ### v2.6.0
4
9
 
5
10
  * Add an additional, optional parameter to `styler`, `header_styler` and `title_styler`
data/README.md CHANGED
@@ -492,14 +492,14 @@ table = Tabulo::Table.new([1, 2, 5], :itself, :even?, :odd?, column_padding: 0)
492
492
  ```
493
493
 
494
494
  ```
495
- > puts table
496
- +------------+------------+------------+
497
- | itself | even? | odd? |
498
- +------------+------------+------------+
499
- | 1| false | true |
500
- | 2| true | false |
501
- | 5| false | true |
502
- +------------+------------+------------+
495
+ > puts table.pack
496
+ +------+-----+-----+
497
+ |itself|even?| odd?|
498
+ +------+-----+-----+
499
+ | 1|false| true|
500
+ | 2| true|false|
501
+ | 5|false| true|
502
+ +------+-----+-----+
503
503
  ```
504
504
 
505
505
  Passing an array of _two_ integers to this option configures the left and right padding for each
@@ -510,33 +510,35 @@ table = Tabulo::Table.new([1, 2, 5], :itself, :even?, :odd?, column_padding: [0,
510
510
  ```
511
511
 
512
512
  ```
513
- > puts table
514
- +--------------+--------------+--------------+
515
- | itself | even? | odd? |
516
- +--------------+--------------+--------------+
517
- | 1 | false | true |
518
- | 2 | true | false |
519
- | 5 | false | true |
520
- +--------------+--------------+--------------+
513
+ > puts table.pack
514
+ +--------+-------+-------+
515
+ |itself |even? | odd? |
516
+ +--------+-------+-------+
517
+ | 1 |false | true |
518
+ | 2 | true |false |
519
+ | 5 |false | true |
520
+ +--------+-------+-------+
521
521
  ```
522
522
 
523
+ Note how the padding amount is completely unaffected by the call `pack`.
524
+
523
525
  Padding can also be configured on a column-by-column basis, using the `padding` option when calling
524
526
  `add_column`:
525
527
 
526
528
  ```ruby
527
529
  table = Tabulo::Table.new([1, 2, 5], :itself, :even?)
528
- table.add_column(:odd?, padding: 2)
530
+ table.add_column(:odd?, padding: 3)
529
531
  ```
530
532
 
531
533
  ```
532
- > puts table
533
- +--------------+--------------+------------------+
534
- | itself | even? | odd? |
535
- +--------------+--------------+------------------+
536
- | 1 | false | true |
537
- | 2 | true | false |
538
- | 5 | false | true |
539
- +--------------+--------------+------------------+
534
+ > puts table.pack
535
+ +--------+-------+-----------+
536
+ | itself | even? | odd? |
537
+ +--------+-------+-----------+
538
+ | 1 | false | true |
539
+ | 2 | true | false |
540
+ | 5 | false | true |
541
+ +--------+-------+-----------+
540
542
  ```
541
543
 
542
544
  This column-level `padding` setting always overrides any table-level `column_padding` setting, for
@@ -681,7 +683,7 @@ the table.
681
683
  The `formatter` callback also has an alternative, 2-parameter version. If `formatter` is passed
682
684
  a 2-parameter callable, the second parameter will be given a `CellData` instance,
683
685
  containing additional information about the cell that may be useful in determining how to format
684
- it—see the [documentation](https://www.rubydoc.info/gems/tabulo/2.6.0/Tabulo/CellData.html)
686
+ it—see the [documentation](https://www.rubydoc.info/gems/tabulo/2.6.1/Tabulo/CellData.html)
685
687
  for details.
686
688
 
687
689
  <a name="colours-and-styling"></a>
@@ -721,13 +723,13 @@ table.add_column(
721
723
  )
722
724
  ```
723
725
 
724
- The `styler` option should be passed a callable that takes either two, three or four parameters.
726
+ The `styler` option should be passed a callable that takes either 2, 3 or 4 parameters.
725
727
  The first parameter represents the underlying value of the cell (in this case a boolean indicating whether the
726
728
  number is even). The second parameter represents the formatted string value of that cell, i.e. the cell
727
729
  content after any processing by the [formatter](#formatting-cell-values). The third and fourth
728
730
  parameters are optional, and contain further information about the cell and its contents that may be useful in
729
- determining how to style it. See the [documentation](https://www.rubydoc.info/gems/tabulo/2.6.0/Tabulo/CellData.html)
730
- for details.
731
+ determining how to style it. See the
732
+ [documentation](https://www.rubydoc.info/gems/tabulo/2.6.1/Tabulo/Table#add_column-instance_method) for details.
731
733
 
732
734
  If the content of a cell is wrapped over multiple lines, then the `styler` will be called once
733
735
  per line, so that each line of the cell will have the escape sequence applied to it separately
@@ -747,7 +749,7 @@ table.add_column(:even?, header_styler: -> (s) { "\033[32m#{s}\033[0m" })
747
749
  ```
748
750
 
749
751
  The `header_styler` option accepts a 1-, 2- or 3-parameter callable. See the
750
- [documentation](https://www.rubydoc.info/gems/tabulo/2.6.0/Tabulo/Table#add_column-instance_method)
752
+ [documentation](https://www.rubydoc.info/gems/tabulo/2.6.1/Tabulo/Table#add_column-instance_method)
751
753
  for details.
752
754
 
753
755
  <a name="styling-title"></a>
@@ -761,7 +763,7 @@ table = Tabulo::Table.new(1..5, :itself, :even?, :odd?, title: "Numbers", title_
761
763
  ```
762
764
 
763
765
  The `title_styler` option accepts a 1- or 2-parameter callable. See the
764
- [documentation](https://www.rubydoc.info/gems/tabulo/2.6.0/Tabulo/Table#initialize-instance_method)
766
+ [documentation](https://www.rubydoc.info/gems/tabulo/2.6.1/Tabulo/Table#initialize-instance_method)
765
767
  for details.
766
768
 
767
769
  <a name="styling-borders"></a>
@@ -956,7 +958,7 @@ a new table in which the rows and columns are swapped:
956
958
  By default, a header row is added to the new table, showing the string value of the element
957
959
  represented in that column. This can be configured, however, along with other aspects of
958
960
  `transpose`&#8217;s behaviour. For details, see the
959
- [documentation](https://www.rubydoc.info/gems/tabulo/2.6.0/Tabulo/Table#transpose-instance_method).
961
+ [documentation](https://www.rubydoc.info/gems/tabulo/2.6.1/Tabulo/Table#transpose-instance_method).
960
962
 
961
963
  <a name="borders"></a>
962
964
  ### Configuring borders [&#x2191;](#contents)
@@ -1339,14 +1341,14 @@ The gem is available as open source under the terms of the [MIT
1339
1341
  License](http://opensource.org/licenses/MIT).
1340
1342
 
1341
1343
  [Gem Version]: https://rubygems.org/gems/tabulo
1342
- [Documentation]: http://www.rubydoc.info/gems/tabulo/2.6.0
1344
+ [Documentation]: http://www.rubydoc.info/gems/tabulo/2.6.1
1343
1345
  [Build Status]: https://travis-ci.org/matt-harvey/tabulo
1344
1346
  [Coverage Status]: https://coveralls.io/r/matt-harvey/tabulo
1345
1347
  [Code Climate]: https://codeclimate.com/github/matt-harvey/tabulo
1346
1348
  [Awesome Ruby]: https://github.com/markets/awesome-ruby#cli-utilities
1347
1349
 
1348
1350
  [GV img]: https://img.shields.io/gem/v/tabulo.svg
1349
- [DC img]: https://img.shields.io/badge/documentation-v2.6.0-blue.svg
1351
+ [DC img]: https://img.shields.io/badge/documentation-v2.6.1-blue.svg
1350
1352
  [BS img]: https://img.shields.io/travis/matt-harvey/tabulo.svg
1351
1353
  [CS img]: https://img.shields.io/coveralls/matt-harvey/tabulo.svg
1352
1354
  [CC img]: https://codeclimate.com/github/matt-harvey/tabulo/badges/gpa.svg
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.6.0
1
+ 2.6.1
@@ -1,3 +1,3 @@
1
1
  module Tabulo
2
- VERSION = "2.6.0"
2
+ VERSION = "2.6.1"
3
3
  end
@@ -28,12 +28,12 @@ Gem::Specification.new do |spec|
28
28
  "changelog_uri" => "https://raw.githubusercontent.com/matt-harvey/tabulo/master/CHANGELOG.md"
29
29
  }
30
30
 
31
- spec.add_runtime_dependency "tty-screen", "0.7.1"
31
+ spec.add_runtime_dependency "tty-screen", "0.8.1"
32
32
  spec.add_runtime_dependency "unicode-display_width", "1.7.0"
33
33
 
34
34
  spec.add_development_dependency "bundler"
35
35
  spec.add_development_dependency "rake", "~> 12.3.3"
36
- spec.add_development_dependency "rspec", "~> 3.0"
36
+ spec.add_development_dependency "rspec", "~> 3.9"
37
37
  spec.add_development_dependency "simplecov"
38
38
  spec.add_development_dependency "coveralls"
39
39
  spec.add_development_dependency "yard"
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.6.0
4
+ version: 2.6.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-05-17 00:00:00.000000000 Z
11
+ date: 2020-07-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tty-screen
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.7.1
19
+ version: 0.8.1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 0.7.1
26
+ version: 0.8.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: unicode-display_width
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '3.0'
75
+ version: '3.9'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '3.0'
82
+ version: '3.9'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: simplecov
85
85
  requirement: !ruby/object:Gem::Requirement