tty-table 0.7.0 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/README.md +2 -1
- data/appveyor.yml +23 -0
- data/examples/alignment.rb +10 -0
- data/examples/basic.rb +6 -0
- data/lib/tty-table.rb +2 -3
- data/lib/tty/table.rb +7 -7
- data/lib/tty/table/alignment_set.rb +1 -2
- data/lib/tty/table/border.rb +4 -3
- data/lib/tty/table/border/ascii.rb +1 -1
- data/lib/tty/table/border/null.rb +1 -1
- data/lib/tty/table/border/unicode.rb +2 -1
- data/lib/tty/table/border_dsl.rb +2 -1
- data/lib/tty/table/column_constraint.rb +3 -2
- data/lib/tty/table/column_set.rb +2 -0
- data/lib/tty/table/header.rb +3 -1
- data/lib/tty/table/options.rb +0 -2
- data/lib/tty/table/orientation.rb +2 -2
- data/lib/tty/table/renderer.rb +4 -3
- data/lib/tty/table/renderer/ascii.rb +2 -2
- data/lib/tty/table/renderer/basic.rb +16 -16
- data/lib/tty/table/renderer/unicode.rb +1 -1
- data/lib/tty/table/row.rb +3 -1
- data/lib/tty/table/validatable.rb +2 -0
- data/lib/tty/table/version.rb +2 -2
- data/tty-table.gemspec +2 -2
- metadata +8 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8c089433bedbafa807caaba4025f66443e2edb93
|
4
|
+
data.tar.gz: c91840f0c6ade317d39c49625f0f5858a318b212
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dbbe1cf16d1bf2e68b07f4641f3643e808fcca717361d6b71f48bf6c02c440dbd32372abc6d22c3dabd7e142897c756ad5df956c04e921be075cf606abad7f9d
|
7
|
+
data.tar.gz: 77198994da68496eeb19315bd8b4304e9f8649c52a77dc61a0ce9d629a2f454f4f3eeb526f8c175648c309af3fed942a45f0de791086d46cb8070e3631072435
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# Change log
|
2
2
|
|
3
|
+
## [v0.8.0] - 2017-02-27
|
4
|
+
|
5
|
+
### Changed
|
6
|
+
* Change necromancer dependency to fix Ruby 2.4.0
|
7
|
+
* Change to use relative paths to load files
|
8
|
+
|
3
9
|
## [v0.7.0] - 2017-01-15
|
4
10
|
|
5
11
|
### Changed
|
@@ -63,6 +69,7 @@
|
|
63
69
|
|
64
70
|
* Initial implementation and release
|
65
71
|
|
72
|
+
[v0.8.0]: https://github.com/piotrmurach/tty-table/compare/v0.7.0...v0.8.0
|
66
73
|
[v0.7.0]: https://github.com/piotrmurach/tty-table/compare/v0.6.0...v0.7.0
|
67
74
|
[v0.6.0]: https://github.com/piotrmurach/tty-table/compare/v0.5.0...v0.6.0
|
68
75
|
[v0.5.0]: https://github.com/piotrmurach/tty-table/compare/v0.4.0...v0.5.0
|
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# TTY::Table [![Gitter](https://badges.gitter.im/Join%20Chat.svg)][gitter]
|
2
|
-
|
3
2
|
[![Gem Version](https://badge.fury.io/rb/tty-table.svg)][gem]
|
4
3
|
[![Build Status](https://secure.travis-ci.org/piotrmurach/tty-table.svg?branch=master)][travis]
|
4
|
+
[![Build status](https://ci.appveyor.com/api/projects/status/8fxrbawbyomqd979?svg=true)][appveyor]
|
5
5
|
[![Code Climate](https://codeclimate.com/github/piotrmurach/tty-table/badges/gpa.svg)][codeclimate]
|
6
6
|
[![Coverage Status](https://coveralls.io/repos/github/piotrmurach/tty-table/badge.svg?branch=master)][coverage]
|
7
7
|
[![Inline docs](http://inch-ci.org/github/piotrmurach/tty-table.svg?branch=master)][inchpages]
|
@@ -9,6 +9,7 @@
|
|
9
9
|
[gitter]: https://gitter.im/piotrmurach/tty
|
10
10
|
[gem]: http://badge.fury.io/rb/tty-table
|
11
11
|
[travis]: http://travis-ci.org/piotrmurach/tty-table
|
12
|
+
[appveyor]: https://ci.appveyor.com/project/piotrmurach/tty-table
|
12
13
|
[codeclimate]: https://codeclimate.com/github/piotrmurach/tty-table
|
13
14
|
[coverage]: https://coveralls.io/github/piotrmurach/tty-table
|
14
15
|
[inchpages]: http://inch-ci.org/github/piotrmurach/tty-table
|
data/appveyor.yml
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
---
|
2
|
+
install:
|
3
|
+
- SET PATH=C:\Ruby%ruby_version%\bin;%PATH%
|
4
|
+
- ruby --version
|
5
|
+
- gem --version
|
6
|
+
- bundle install
|
7
|
+
build: off
|
8
|
+
test_script:
|
9
|
+
- bundle exec rake ci
|
10
|
+
environment:
|
11
|
+
matrix:
|
12
|
+
- ruby_version: "193"
|
13
|
+
- ruby_version: "200"
|
14
|
+
- ruby_version: "200-x64"
|
15
|
+
- ruby_version: "21"
|
16
|
+
- ruby_version: "21-x64"
|
17
|
+
- ruby_version: "22"
|
18
|
+
- ruby_version: "22-x64"
|
19
|
+
- ruby_version: "23"
|
20
|
+
- ruby_version: "23-x64"
|
21
|
+
matrix:
|
22
|
+
allow_failures:
|
23
|
+
- ruby_version: "193"
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'tty-table'
|
4
|
+
|
5
|
+
table = TTY::Table.new header: ['header1', 'header2', 'header3']
|
6
|
+
table << ['a1', 'a2', 'a3']
|
7
|
+
table << ['b1','b2', 'b3']
|
8
|
+
table << ['c1', 'c2', 'c3']
|
9
|
+
|
10
|
+
puts table.render(:ascii, alignments: [:right, :center, :left])
|
data/examples/basic.rb
ADDED
data/lib/tty-table.rb
CHANGED
data/lib/tty/table.rb
CHANGED
@@ -4,13 +4,13 @@ require 'equatable'
|
|
4
4
|
require 'forwardable'
|
5
5
|
require 'necromancer'
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
7
|
+
require_relative 'table/column_set'
|
8
|
+
require_relative 'table/header'
|
9
|
+
require_relative 'table/orientation'
|
10
|
+
require_relative 'table/row'
|
11
|
+
require_relative 'table/renderer'
|
12
|
+
require_relative 'table/transformation'
|
13
|
+
require_relative 'table/validatable'
|
14
14
|
|
15
15
|
module TTY
|
16
16
|
# A core class intended for storing data in a structured, tabular form.
|
@@ -19,8 +19,7 @@ module TTY
|
|
19
19
|
#
|
20
20
|
# @api private
|
21
21
|
def initialize(alignments)
|
22
|
-
@
|
23
|
-
@alignments = @converter.convert(alignments).to(:array).map(&:to_sym)
|
22
|
+
@alignments = Necromancer.convert(alignments).to(:array).map(&:to_sym)
|
24
23
|
end
|
25
24
|
|
26
25
|
# Iterate over each element in the alignment set
|
data/lib/tty/table/border.rb
CHANGED
@@ -4,9 +4,10 @@ require 'equatable'
|
|
4
4
|
require 'pastel'
|
5
5
|
require 'verse'
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
|
7
|
+
require_relative 'border_options'
|
8
|
+
require_relative 'border_dsl'
|
9
|
+
require_relative 'border/row_line'
|
10
|
+
require_relative 'error'
|
10
11
|
|
11
12
|
module TTY
|
12
13
|
class Table
|
data/lib/tty/table/border_dsl.rb
CHANGED
data/lib/tty/table/column_set.rb
CHANGED
data/lib/tty/table/header.rb
CHANGED
data/lib/tty/table/options.rb
CHANGED
data/lib/tty/table/renderer.rb
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
require_relative 'error'
|
4
|
+
require_relative 'renderer/basic'
|
5
|
+
require_relative 'renderer/ascii'
|
6
|
+
require_relative 'renderer/unicode'
|
6
7
|
|
7
8
|
module TTY
|
8
9
|
class Table
|
@@ -3,22 +3,22 @@
|
|
3
3
|
require 'tty-screen'
|
4
4
|
require 'verse'
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
6
|
+
require_relative '../alignment_set'
|
7
|
+
require_relative '../border_dsl'
|
8
|
+
require_relative '../border_options'
|
9
|
+
require_relative '../border/null'
|
10
|
+
require_relative '../column_constraint'
|
11
|
+
require_relative '../column_set'
|
12
|
+
require_relative '../header'
|
13
|
+
require_relative '../indentation'
|
14
|
+
require_relative '../operations'
|
15
|
+
require_relative '../operation/alignment'
|
16
|
+
require_relative '../operation/truncation'
|
17
|
+
require_relative '../operation/wrapped'
|
18
|
+
require_relative '../operation/filter'
|
19
|
+
require_relative '../operation/escape'
|
20
|
+
require_relative '../operation/padding'
|
21
|
+
require_relative '../validatable'
|
22
22
|
|
23
23
|
module TTY
|
24
24
|
class Table
|
data/lib/tty/table/row.rb
CHANGED
data/lib/tty/table/version.rb
CHANGED
data/tty-table.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.email = [""]
|
11
11
|
spec.summary = %q{A flexible and intuitive table generator}
|
12
12
|
spec.description = %q{A flexible and intuitive table generator}
|
13
|
-
spec.homepage = "
|
13
|
+
spec.homepage = "https://piotrmurach.github.io/tty/"
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
16
16
|
spec.files = `git ls-files -z`.split("\x0")
|
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
21
|
spec.add_dependency 'equatable', '~> 0.5.0'
|
22
|
-
spec.add_dependency 'necromancer', '~> 0.
|
22
|
+
spec.add_dependency 'necromancer', '~> 0.4.0'
|
23
23
|
spec.add_dependency 'pastel', '~> 0.7.0'
|
24
24
|
spec.add_dependency 'tty-screen', '~> 0.5.0'
|
25
25
|
spec.add_dependency 'verse', '~> 0.5.0'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tty-table
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Piotr Murach
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-02-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: equatable
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
33
|
+
version: 0.4.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.
|
40
|
+
version: 0.4.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: pastel
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -144,7 +144,10 @@ files:
|
|
144
144
|
- LICENSE.txt
|
145
145
|
- README.md
|
146
146
|
- Rakefile
|
147
|
+
- appveyor.yml
|
147
148
|
- benchmarks/speed.rb
|
149
|
+
- examples/alignment.rb
|
150
|
+
- examples/basic.rb
|
148
151
|
- lib/tty-table.rb
|
149
152
|
- lib/tty/table.rb
|
150
153
|
- lib/tty/table/alignment_set.rb
|
@@ -284,7 +287,7 @@ files:
|
|
284
287
|
- tasks/coverage.rake
|
285
288
|
- tasks/spec.rake
|
286
289
|
- tty-table.gemspec
|
287
|
-
homepage:
|
290
|
+
homepage: https://piotrmurach.github.io/tty/
|
288
291
|
licenses:
|
289
292
|
- MIT
|
290
293
|
metadata: {}
|