table_print 1.5.6 → 1.5.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +4 -4
- data/README.rdoc +1 -1
- data/features/support/step_definitions/steps.rb +1 -1
- data/lib/table_print.rb +4 -1
- data/lib/table_print/returnable.rb +1 -1
- data/lib/table_print/row_group.rb +2 -2
- data/lib/table_print/version.rb +1 -1
- data/spec/table_print_spec.rb +4 -2
- data/table_print.gemspec +1 -1
- metadata +19 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 4d550bded70ef9a5ae903bdf98d2436d282ef8d89bf760dd65c0a90476131bb4
|
4
|
+
data.tar.gz: 858aee5efcc4d4ce91c0834cf215cb29e4899964d4bc4d3c624c49c9902b592d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f7980699dada79051fdfbb5611815377eebc3200745c814401ee24955daa7d6d1d2838a72da1f942e9eca64d926974d2d044955067548a3e10b7a1be48c00e4c
|
7
|
+
data.tar.gz: 7f8eb1af627f5efc816d2751be6bc641cdca8ae74aab482e56af936266b83158d6d5eebbadf66cd48a508f974635200c045cfeafc2e8f7ba57dfee20a28cb5ce
|
data/.travis.yml
CHANGED
data/README.rdoc
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
= table_print
|
2
2
|
|
3
|
-
{<img src="https://travis-ci.org/arches/table_print.
|
3
|
+
{<img src="https://travis-ci.org/arches/table_print.svg?branch=master" />}[http://travis-ci.org/arches/table_print]
|
4
4
|
{<img src="https://codeclimate.com/github/arches/table_print.png" />}[https://codeclimate.com/github/arches/table_print]
|
5
5
|
|
6
6
|
TablePrint shows objects in nicely formatted columns for easy reading. It even lets you nest other tables
|
@@ -87,7 +87,7 @@ When /table_print ([\w\.:]*)$/ do |klass|
|
|
87
87
|
end
|
88
88
|
|
89
89
|
Then /^the output should contain$/ do |string|
|
90
|
-
output = @r.
|
90
|
+
output = @r.each_line.to_a
|
91
91
|
|
92
92
|
output.zip(string.split("\n")).each do |actual, expected|
|
93
93
|
actual.gsub(/\s/m, "").split(//).sort.join.should == expected.gsub(" ", "").split(//).sort.join
|
data/lib/table_print.rb
CHANGED
@@ -51,7 +51,10 @@ module TablePrint
|
|
51
51
|
|
52
52
|
def message
|
53
53
|
return "Printed with config" if configged?
|
54
|
-
Time.now - @start_time
|
54
|
+
(Time.now - @start_time).to_s
|
55
|
+
# the message is used to initiate Returnable
|
56
|
+
# whose argument is regarded in ruby 2.7.1 as string
|
57
|
+
# (ruby 2.7.1 calls ".includes?" method on this argument)
|
55
58
|
end
|
56
59
|
|
57
60
|
private
|
@@ -221,8 +221,8 @@ module TablePrint
|
|
221
221
|
formatters << FixedWidthFormatter.new(column_for(column_name).width)
|
222
222
|
|
223
223
|
# successively apply the formatters for a column
|
224
|
-
formatters.inject(value) do |
|
225
|
-
formatter.format(
|
224
|
+
formatters.inject(value) do |inner_value, formatter|
|
225
|
+
formatter.format(inner_value)
|
226
226
|
end
|
227
227
|
end
|
228
228
|
|
data/lib/table_print/version.rb
CHANGED
data/spec/table_print_spec.rb
CHANGED
@@ -25,8 +25,10 @@ describe TablePrint::Printer do
|
|
25
25
|
end
|
26
26
|
|
27
27
|
describe "message" do
|
28
|
-
it "defaults to the time the print took" do
|
29
|
-
Printer.new([]).message
|
28
|
+
it "defaults to the time the print took, but in string" do
|
29
|
+
message = Printer.new([]).message
|
30
|
+
message.should be_a String
|
31
|
+
expect(message.to_f.to_s).to eq(message)
|
30
32
|
end
|
31
33
|
|
32
34
|
it "shows a warning if the printed objects have config" do
|
data/table_print.gemspec
CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |gem|
|
|
19
19
|
gem.require_paths = ["lib"]
|
20
20
|
|
21
21
|
gem.add_development_dependency 'cat', '~> 0.2.1'
|
22
|
-
gem.add_development_dependency 'cucumber', '~>
|
22
|
+
gem.add_development_dependency 'cucumber', '~> 2.4.0'
|
23
23
|
gem.add_development_dependency 'rspec', '~> 2.11.0'
|
24
24
|
gem.add_development_dependency 'rake', '~> 0.9.2'
|
25
25
|
end
|
metadata
CHANGED
@@ -1,69 +1,69 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: table_print
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Doyle
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-06-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cat
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 0.2.1
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 0.2.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: cucumber
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - ~>
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 2.4.0
|
34
34
|
type: :development
|
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:
|
40
|
+
version: 2.4.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - ~>
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: 2.11.0
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - ~>
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 2.11.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rake
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - ~>
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: 0.9.2
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - ~>
|
66
|
+
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: 0.9.2
|
69
69
|
description: TablePrint turns objects into nicely formatted columns for easy reading.
|
@@ -74,10 +74,10 @@ executables: []
|
|
74
74
|
extensions: []
|
75
75
|
extra_rdoc_files: []
|
76
76
|
files:
|
77
|
-
- .document
|
78
|
-
- .gitignore
|
79
|
-
- .rspec
|
80
|
-
- .travis.yml
|
77
|
+
- ".document"
|
78
|
+
- ".gitignore"
|
79
|
+
- ".rspec"
|
80
|
+
- ".travis.yml"
|
81
81
|
- Gemfile
|
82
82
|
- LICENSE.txt
|
83
83
|
- README.rdoc
|
@@ -124,17 +124,16 @@ require_paths:
|
|
124
124
|
- lib
|
125
125
|
required_ruby_version: !ruby/object:Gem::Requirement
|
126
126
|
requirements:
|
127
|
-
- -
|
127
|
+
- - ">="
|
128
128
|
- !ruby/object:Gem::Version
|
129
129
|
version: '0'
|
130
130
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
131
131
|
requirements:
|
132
|
-
- -
|
132
|
+
- - ">="
|
133
133
|
- !ruby/object:Gem::Version
|
134
134
|
version: '0'
|
135
135
|
requirements: []
|
136
|
-
|
137
|
-
rubygems_version: 2.4.8
|
136
|
+
rubygems_version: 3.0.3
|
138
137
|
signing_key:
|
139
138
|
specification_version: 4
|
140
139
|
summary: Turn objects into nicely formatted columns for easy reading
|