terminal-table 3.0.1 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +6 -0
- data/.github/workflows/ci.yml +3 -4
- data/.gitignore +1 -0
- data/History.rdoc +12 -0
- data/lib/terminal-table/cell.rb +1 -1
- data/lib/terminal-table/table.rb +4 -4
- data/lib/terminal-table/version.rb +1 -1
- data/terminal-table.gemspec +1 -2
- metadata +6 -24
- data/Gemfile.lock +0 -49
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d9db4bcea8ed79e15e8d0a0ec33cb35f757d72fe9e90777e5f52114ac12dd913
|
4
|
+
data.tar.gz: 8168380a0569095ec2674df9e8e87ae99a4d377b43e1d24ac97ca7cd3a42c765
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e1a8408364ea76d142015a37009a606d4e9daa49b225fabe1a3e7133eee0e266d44c3f538fce149586af4bbbefc3e6afcdee64cb49dc5cbf8e6f7cc2471d5663
|
7
|
+
data.tar.gz: ae686076af61387d41592db7289fc39dde785f614bd840841a3950cca024402ebb59b20ce04bb7098f9c09349e1c042672fb051e7daaeb19be33504c1ad9791c
|
data/.github/workflows/ci.yml
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
name: CI
|
2
|
-
on: [push]
|
2
|
+
on: [push, pull_request, workflow_dispatch]
|
3
3
|
|
4
4
|
jobs:
|
5
5
|
test:
|
@@ -12,17 +12,16 @@ jobs:
|
|
12
12
|
|
13
13
|
matrix:
|
14
14
|
os: [ubuntu]
|
15
|
-
ruby: [2.4, 2.5, 2.6, 2.7]
|
15
|
+
ruby: [2.4, 2.5, 2.6, 2.7, '3.0', 3.1, 3.2, 3.3, 3.4]
|
16
16
|
|
17
17
|
runs-on: ${{ matrix.os }}-latest
|
18
18
|
|
19
19
|
steps:
|
20
|
-
- uses: actions/checkout@
|
20
|
+
- uses: actions/checkout@v4
|
21
21
|
|
22
22
|
- uses: ruby/setup-ruby@v1
|
23
23
|
with:
|
24
24
|
bundler-cache: true
|
25
25
|
ruby-version: ${{ matrix.ruby }}
|
26
26
|
|
27
|
-
- run: bundle install
|
28
27
|
- run: bundle exec rspec
|
data/.gitignore
CHANGED
data/History.rdoc
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
+
4.0.0 / 2025-01-28
|
2
|
+
==================
|
3
|
+
|
4
|
+
- Non-unicode characters are no longer supported. They will be replaced.
|
5
|
+
- Headings may be set to nil.
|
6
|
+
- unicode-display-width version 3 supported.
|
7
|
+
|
8
|
+
3.0.2 / 2021-09-19
|
9
|
+
==================
|
10
|
+
|
11
|
+
- fix align_column for nil values and colspan
|
12
|
+
|
1
13
|
3.0.1 / 2021-05-10
|
2
14
|
==================
|
3
15
|
|
data/lib/terminal-table/cell.rb
CHANGED
data/lib/terminal-table/table.rb
CHANGED
@@ -27,10 +27,8 @@ module Terminal
|
|
27
27
|
# Align column _n_ to the given _alignment_ of :center, :left, or :right.
|
28
28
|
|
29
29
|
def align_column n, alignment
|
30
|
-
|
31
|
-
column(n).
|
32
|
-
cell = r[i][n]
|
33
|
-
next unless cell
|
30
|
+
# nil forces the column method to return the cell itself
|
31
|
+
column(n, nil).each do |cell|
|
34
32
|
cell.alignment = alignment unless cell.alignment?
|
35
33
|
end
|
36
34
|
end
|
@@ -111,6 +109,8 @@ module Terminal
|
|
111
109
|
# Set the headings
|
112
110
|
|
113
111
|
def headings= arrays
|
112
|
+
return if arrays.nil?
|
113
|
+
|
114
114
|
arrays = [arrays] unless arrays.first.is_a?(Array)
|
115
115
|
@headings = arrays.map do |array|
|
116
116
|
row = Row.new(self, array)
|
data/terminal-table.gemspec
CHANGED
@@ -19,8 +19,7 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.add_development_dependency "bundler", "~> 2"
|
20
20
|
spec.add_development_dependency "rake", "~> 13.0"
|
21
21
|
spec.add_development_dependency "rspec", ">= 3.0"
|
22
|
-
spec.add_development_dependency "term-ansicolor"
|
23
22
|
spec.add_development_dependency "pry"
|
24
23
|
|
25
|
-
spec.add_runtime_dependency "unicode-display_width", [">= 1.1.1", "<
|
24
|
+
spec.add_runtime_dependency "unicode-display_width", [">= 1.1.1", "< 4"]
|
26
25
|
end
|
metadata
CHANGED
@@ -1,15 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: terminal-table
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 4.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- TJ Holowaychuk
|
8
8
|
- Scott J. Goldman
|
9
|
-
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2025-01-27 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: bundler
|
@@ -53,20 +52,6 @@ dependencies:
|
|
53
52
|
- - ">="
|
54
53
|
- !ruby/object:Gem::Version
|
55
54
|
version: '3.0'
|
56
|
-
- !ruby/object:Gem::Dependency
|
57
|
-
name: term-ansicolor
|
58
|
-
requirement: !ruby/object:Gem::Requirement
|
59
|
-
requirements:
|
60
|
-
- - ">="
|
61
|
-
- !ruby/object:Gem::Version
|
62
|
-
version: '0'
|
63
|
-
type: :development
|
64
|
-
prerelease: false
|
65
|
-
version_requirements: !ruby/object:Gem::Requirement
|
66
|
-
requirements:
|
67
|
-
- - ">="
|
68
|
-
- !ruby/object:Gem::Version
|
69
|
-
version: '0'
|
70
55
|
- !ruby/object:Gem::Dependency
|
71
56
|
name: pry
|
72
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -90,7 +75,7 @@ dependencies:
|
|
90
75
|
version: 1.1.1
|
91
76
|
- - "<"
|
92
77
|
- !ruby/object:Gem::Version
|
93
|
-
version: '
|
78
|
+
version: '4'
|
94
79
|
type: :runtime
|
95
80
|
prerelease: false
|
96
81
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -100,18 +85,17 @@ dependencies:
|
|
100
85
|
version: 1.1.1
|
101
86
|
- - "<"
|
102
87
|
- !ruby/object:Gem::Version
|
103
|
-
version: '
|
104
|
-
description:
|
88
|
+
version: '4'
|
105
89
|
email:
|
106
90
|
- tj@vision-media.ca
|
107
91
|
executables: []
|
108
92
|
extensions: []
|
109
93
|
extra_rdoc_files: []
|
110
94
|
files:
|
95
|
+
- ".github/dependabot.yml"
|
111
96
|
- ".github/workflows/ci.yml"
|
112
97
|
- ".gitignore"
|
113
98
|
- Gemfile
|
114
|
-
- Gemfile.lock
|
115
99
|
- History.rdoc
|
116
100
|
- LICENSE.txt
|
117
101
|
- Manifest
|
@@ -142,7 +126,6 @@ homepage: https://github.com/tj/terminal-table
|
|
142
126
|
licenses:
|
143
127
|
- MIT
|
144
128
|
metadata: {}
|
145
|
-
post_install_message:
|
146
129
|
rdoc_options: []
|
147
130
|
require_paths:
|
148
131
|
- lib
|
@@ -157,8 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
157
140
|
- !ruby/object:Gem::Version
|
158
141
|
version: '0'
|
159
142
|
requirements: []
|
160
|
-
rubygems_version: 3.2
|
161
|
-
signing_key:
|
143
|
+
rubygems_version: 3.6.2
|
162
144
|
specification_version: 4
|
163
145
|
summary: Simple, feature rich ascii table generation library
|
164
146
|
test_files: []
|
data/Gemfile.lock
DELETED
@@ -1,49 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
terminal-table (3.0.1)
|
5
|
-
unicode-display_width (>= 1.1.1, < 3)
|
6
|
-
|
7
|
-
GEM
|
8
|
-
remote: https://rubygems.org/
|
9
|
-
specs:
|
10
|
-
coderay (1.1.3)
|
11
|
-
diff-lcs (1.4.4)
|
12
|
-
method_source (1.0.0)
|
13
|
-
pry (0.13.1)
|
14
|
-
coderay (~> 1.1)
|
15
|
-
method_source (~> 1.0)
|
16
|
-
rake (13.0.1)
|
17
|
-
rspec (3.10.0)
|
18
|
-
rspec-core (~> 3.10.0)
|
19
|
-
rspec-expectations (~> 3.10.0)
|
20
|
-
rspec-mocks (~> 3.10.0)
|
21
|
-
rspec-core (3.10.0)
|
22
|
-
rspec-support (~> 3.10.0)
|
23
|
-
rspec-expectations (3.10.0)
|
24
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
25
|
-
rspec-support (~> 3.10.0)
|
26
|
-
rspec-mocks (3.10.0)
|
27
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
28
|
-
rspec-support (~> 3.10.0)
|
29
|
-
rspec-support (3.10.0)
|
30
|
-
term-ansicolor (1.7.1)
|
31
|
-
tins (~> 1.0)
|
32
|
-
tins (1.0.1)
|
33
|
-
unicode-display_width (2.0.0)
|
34
|
-
|
35
|
-
PLATFORMS
|
36
|
-
ruby
|
37
|
-
x86_64-linux
|
38
|
-
|
39
|
-
DEPENDENCIES
|
40
|
-
bundler (~> 2)
|
41
|
-
pry
|
42
|
-
rake (~> 13.0)
|
43
|
-
rspec (>= 3.0)
|
44
|
-
term-ansicolor
|
45
|
-
terminal-table!
|
46
|
-
tins (~> 1.0.0)
|
47
|
-
|
48
|
-
BUNDLED WITH
|
49
|
-
2.2.3
|