visionmedia-terminal-table 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/History.rdoc +13 -1
- data/README.rdoc +94 -76
- data/examples/examples.rb +9 -0
- data/lib/terminal-table/cell.rb +14 -5
- data/lib/terminal-table/heading.rb +1 -1
- data/lib/terminal-table/table.rb +29 -6
- data/lib/terminal-table/version.rb +1 -1
- data/spec/cell_spec.rb +1 -1
- data/spec/table_spec.rb +85 -26
- data/terminal-table.gemspec +3 -3
- metadata +4 -3
data/History.rdoc
CHANGED
@@ -1,4 +1,16 @@
|
|
1
1
|
|
2
|
+
=== 1.2.0 / 2009-08-06
|
3
|
+
|
4
|
+
* Added colspan support to table
|
5
|
+
|
6
|
+
=== 1.1.0 / 2009-08-06
|
7
|
+
|
8
|
+
* Added colspan support to table
|
9
|
+
|
10
|
+
=== 1.1.0 / 2009-07-13
|
11
|
+
|
12
|
+
* Added Table#==
|
13
|
+
|
2
14
|
=== 1.0.5 / 2009-03-14
|
3
15
|
|
4
16
|
* Allowing nil to be passed to table for headings
|
@@ -11,4 +23,4 @@
|
|
11
23
|
|
12
24
|
=== 1.0.0 / 2009-01-13
|
13
25
|
|
14
|
-
* Initial release
|
26
|
+
* Initial release
|
data/README.rdoc
CHANGED
@@ -9,98 +9,116 @@ Simple, feature rich ASCII table generator.
|
|
9
9
|
* Simple
|
10
10
|
* Optional headings
|
11
11
|
* Alignment of columns, headings, or cells
|
12
|
+
* Supports column span
|
12
13
|
* Easy modification of table strings (+, -, |)
|
13
14
|
|
14
15
|
== Examples:
|
15
16
|
|
16
|
-
|
17
|
-
|
17
|
+
require 'rubygems'
|
18
|
+
require 'terminal-table/import'
|
18
19
|
|
19
|
-
|
20
|
+
puts table(['a', 'b'], [1, 2], [3, 4])
|
20
21
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
22
|
+
t = table ['a', 'b']
|
23
|
+
t << [1, 2]
|
24
|
+
t << [3, 4]
|
25
|
+
puts t
|
25
26
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
27
|
+
user_table = table do |t|
|
28
|
+
t.headings = 'First Name', 'Last Name', 'Email'
|
29
|
+
t << ['TJ', 'Holowaychuk', 'tj@vision-media.ca']
|
30
|
+
t << ['Bob', 'Someone', 'bob@vision-media.ca']
|
31
|
+
t << ['Joe', 'Whatever', 'joe@vision-media.ca']
|
32
|
+
end
|
33
|
+
puts user_table
|
33
34
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
35
|
+
user_table = table do
|
36
|
+
self.headings = 'First Name', 'Last Name', 'Email'
|
37
|
+
add_row ['TJ', 'Holowaychuk', { :value => 'tj@vision-media.ca', :align => :right }]
|
38
|
+
add_row ['Bob', 'Someone', 'bob@vision-media.ca']
|
39
|
+
add_row ['Joe', 'Whatever', 'joe@vision-media.ca']
|
40
|
+
align_column 1, :center
|
41
|
+
end
|
42
|
+
puts user_table
|
43
|
+
|
44
|
+
puts
|
45
|
+
user_table = table do
|
46
|
+
self.headings = ['First Name', 'Last Name', {:value => 'Phones', :colspan => 2, :alignment => :center}]
|
47
|
+
add_row ['Bob', 'Someone', '123', '456']
|
48
|
+
add_row ['TJ', 'Holowaychuk', {:value => "No phones", :colspan => 2, :alignment => :center}]
|
49
|
+
add_row ['Joe', 'Whatever', '4324', '343242']
|
50
|
+
end
|
51
|
+
puts user_table
|
42
52
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
53
|
+
rows = []
|
54
|
+
rows << ['Lines', 100]
|
55
|
+
rows << ['Comments', 20]
|
56
|
+
rows << ['Ruby', 70]
|
57
|
+
rows << ['JavaScript', 30]
|
58
|
+
puts table([nil, 'Lines'], *rows)
|
49
59
|
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
60
|
+
rows = []
|
61
|
+
rows << ['Lines', 100]
|
62
|
+
rows << ['Comments', 20]
|
63
|
+
rows << ['Ruby', 70]
|
64
|
+
rows << ['JavaScript', 30]
|
65
|
+
puts table(nil, *rows)
|
56
66
|
|
57
67
|
== Results:
|
58
68
|
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
69
|
+
+---+---+
|
70
|
+
| a | b |
|
71
|
+
+---+---+
|
72
|
+
| 1 | 2 |
|
73
|
+
| 3 | 4 |
|
74
|
+
+---+---+
|
65
75
|
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
76
|
+
+---+---+
|
77
|
+
| a | b |
|
78
|
+
+---+---+
|
79
|
+
| 1 | 2 |
|
80
|
+
| 3 | 4 |
|
81
|
+
+---+---+
|
72
82
|
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
83
|
+
+------------+-------------+---------------------+
|
84
|
+
| First Name | Last Name | Email |
|
85
|
+
+------------+-------------+---------------------+
|
86
|
+
| TJ | Holowaychuk | tj@vision-media.ca |
|
87
|
+
| Bob | Someone | bob@vision-media.ca |
|
88
|
+
| Joe | Whatever | joe@vision-media.ca |
|
89
|
+
+------------+-------------+---------------------+
|
80
90
|
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
91
|
+
+------------+-----------------------------+---------------------+
|
92
|
+
| First Name | Last Name | Email |
|
93
|
+
+------------+-----------------------------+---------------------+
|
94
|
+
| TJ | Holowaychuk | tj@vision-media.ca |
|
95
|
+
| Bob | Someone | bob@vision-media.ca |
|
96
|
+
| Joe | Whatever | joe@vision-media.ca |
|
97
|
+
+------------+-----------------------------+---------------------+
|
98
|
+
|
99
|
+
+------------+-------------+-----------+--------+
|
100
|
+
| First Name | Last Name | Phones |
|
101
|
+
+------------+-------------+-----------+--------+
|
102
|
+
| Bob | Someone | 123 | 456 |
|
103
|
+
| TJ | Holowaychuk | No phones |
|
104
|
+
| Joe | Whatever | 4324 | 343242 |
|
105
|
+
+------------+-------------+-----------+--------+
|
106
|
+
|
107
|
+
+------------+-------+
|
108
|
+
| | Lines |
|
109
|
+
+------------+-------+
|
110
|
+
| Lines | 100 |
|
111
|
+
| Comments | 20 |
|
112
|
+
| Ruby | 70 |
|
113
|
+
| JavaScript | 30 |
|
114
|
+
+------------+-------+
|
115
|
+
|
116
|
+
+------------+-----+
|
117
|
+
| Lines | 100 |
|
118
|
+
| Comments | 20 |
|
119
|
+
| Ruby | 70 |
|
120
|
+
| JavaScript | 30 |
|
121
|
+
+------------+-----+
|
104
122
|
|
105
123
|
== License:
|
106
124
|
|
data/examples/examples.rb
CHANGED
@@ -30,6 +30,15 @@ user_table = table do
|
|
30
30
|
end
|
31
31
|
puts user_table
|
32
32
|
|
33
|
+
puts
|
34
|
+
user_table = table do
|
35
|
+
self.headings = ['First Name', 'Last Name', {:value => 'Phones', :colspan => 2, :alignment => :center}]
|
36
|
+
add_row ['Bob', 'Someone', '123', '456']
|
37
|
+
add_row ['TJ', 'Holowaychuk', {:value => "No phones", :colspan => 2, :alignment => :center}]
|
38
|
+
add_row ['Joe', 'Whatever', '4324', '343242']
|
39
|
+
end
|
40
|
+
puts user_table
|
41
|
+
|
33
42
|
rows = []
|
34
43
|
rows << ['Lines', 100]
|
35
44
|
rows << ['Comments', 20]
|
data/lib/terminal-table/cell.rb
CHANGED
@@ -3,10 +3,20 @@ module Terminal
|
|
3
3
|
class Table
|
4
4
|
class Cell
|
5
5
|
|
6
|
-
attr_accessor :value, :alignment
|
6
|
+
attr_accessor :value, :alignment, :colspan
|
7
7
|
|
8
|
-
def initialize width,
|
9
|
-
@width
|
8
|
+
def initialize width, params
|
9
|
+
@width = width
|
10
|
+
@alignment = :left
|
11
|
+
@colspan = 1
|
12
|
+
|
13
|
+
if params.is_a? Hash
|
14
|
+
@value = params[:value]
|
15
|
+
@alignment = params[:alignment] unless params[:alignment].nil?
|
16
|
+
@colspan = params[:colspan] unless params[:colspan].nil?
|
17
|
+
else
|
18
|
+
@value = params
|
19
|
+
end
|
10
20
|
end
|
11
21
|
|
12
22
|
def render
|
@@ -15,9 +25,8 @@ module Terminal
|
|
15
25
|
alias :to_s :render
|
16
26
|
|
17
27
|
def length
|
18
|
-
value.to_s.length + 2
|
28
|
+
@value.to_s.length + 2
|
19
29
|
end
|
20
|
-
|
21
30
|
end
|
22
31
|
end
|
23
32
|
end
|
data/lib/terminal-table/table.rb
CHANGED
@@ -58,14 +58,32 @@ module Terminal
|
|
58
58
|
def render
|
59
59
|
buffer = seperator << "\n"
|
60
60
|
if has_headings?
|
61
|
-
buffer << Y + headings.map_with_index do |heading, i|
|
62
|
-
|
61
|
+
buffer << Y + headings.map_with_index do |heading, i|
|
62
|
+
width = 0
|
63
|
+
if heading.is_a?(Hash) and !heading[:colspan].nil?
|
64
|
+
i.upto(i + heading[:colspan] - 1) do |col|
|
65
|
+
width += length_of_column(col)
|
66
|
+
end
|
67
|
+
width += (heading[:colspan] - 1) * (Y.length + 2)
|
68
|
+
else
|
69
|
+
width = length_of_column(i)
|
70
|
+
end
|
71
|
+
Heading.new( width, heading).render
|
63
72
|
end.join(Y) + Y
|
64
73
|
buffer << "\n#{seperator}\n"
|
65
74
|
end
|
66
75
|
buffer << rows.map do |row|
|
67
76
|
Y + row.map_with_index do |cell, i|
|
68
|
-
|
77
|
+
width = 0
|
78
|
+
if cell.is_a?(Hash) and !cell[:colspan].nil?
|
79
|
+
i.upto(i + cell[:colspan] - 1) do |col|
|
80
|
+
width += length_of_column(col)
|
81
|
+
end
|
82
|
+
width += (cell[:colspan] - 1) * (Y.length + 2)
|
83
|
+
else
|
84
|
+
width = length_of_column(i)
|
85
|
+
end
|
86
|
+
Cell.new(width, cell).render
|
69
87
|
end.join(Y) + Y
|
70
88
|
end.join("\n")
|
71
89
|
buffer << "\n#{seperator}\n"
|
@@ -121,14 +139,19 @@ module Terminal
|
|
121
139
|
# Return the largest cell found within column +n+.
|
122
140
|
|
123
141
|
def largest_cell_in_column n
|
124
|
-
column_with_headings(n).sort_by { |cell| Cell.new(0,
|
142
|
+
column_with_headings(n).sort_by { |cell| Cell.new(0, cell).length }.last
|
125
143
|
end
|
126
144
|
|
127
145
|
##
|
128
146
|
# Return length of column +n+.
|
129
147
|
|
130
148
|
def length_of_column n
|
131
|
-
largest_cell_in_column(n)
|
149
|
+
largest_cell = largest_cell_in_column(n)
|
150
|
+
if largest_cell.is_a? Hash
|
151
|
+
largest_cell[:value].length# - 2
|
152
|
+
else
|
153
|
+
largest_cell.to_s.length
|
154
|
+
end
|
132
155
|
end
|
133
156
|
|
134
157
|
##
|
@@ -144,7 +167,7 @@ module Terminal
|
|
144
167
|
|
145
168
|
def align_column n, alignment
|
146
169
|
column(n).each_with_index do |col, i|
|
147
|
-
@rows[i][n] =
|
170
|
+
@rows[i][n] = {:value => col, :alignment => alignment} unless col.is_a? Hash
|
148
171
|
end
|
149
172
|
end
|
150
173
|
|
data/spec/cell_spec.rb
CHANGED
data/spec/table_spec.rb
CHANGED
@@ -5,66 +5,66 @@ module Terminal
|
|
5
5
|
before :each do
|
6
6
|
@table = Table.new
|
7
7
|
end
|
8
|
-
|
8
|
+
|
9
9
|
it "should select columns" do
|
10
10
|
@table << ['foo', 'bar']
|
11
11
|
@table << ['big foo', 'big foo bar']
|
12
12
|
@table.column(1).should == ['bar', 'big foo bar']
|
13
13
|
end
|
14
|
-
|
14
|
+
|
15
15
|
it "should count columns" do
|
16
16
|
@table << [1, 2, 3]
|
17
17
|
@table.number_of_columns.should == 3
|
18
18
|
end
|
19
|
-
|
19
|
+
|
20
20
|
it "should iterate columns" do
|
21
21
|
@table << [1, 2, 3]
|
22
22
|
@table << [4, 5, 6]
|
23
23
|
@table.columns.should == [[1, 4], [2, 5], [3, 6]]
|
24
24
|
end
|
25
|
-
|
25
|
+
|
26
26
|
it "should select columns" do
|
27
27
|
@table.headings = ['one', 'two']
|
28
28
|
@table << ['foo', 'bar']
|
29
29
|
@table << ['big foo', 'big foo bar']
|
30
30
|
@table.column(1).should == ['bar', 'big foo bar']
|
31
31
|
end
|
32
|
-
|
32
|
+
|
33
33
|
it "should select columns when using hashes" do
|
34
34
|
@table.headings = ['one', 'two']
|
35
35
|
@table.rows = [[{ :value => 'a', :align => :left }, 1], ['b', 2], ['c', 3]]
|
36
36
|
@table.column(0).should == [{ :value => 'a', :align => :left }, 'b', 'c']
|
37
37
|
end
|
38
|
-
|
38
|
+
|
39
39
|
it "should select largest cell in a column" do
|
40
40
|
@table << ['foo', 'bar']
|
41
41
|
@table << ['big foo', 'big foo bar']
|
42
42
|
@table.largest_cell_in_column(1).should == 'big foo bar'
|
43
43
|
end
|
44
|
-
|
44
|
+
|
45
45
|
it "should find column length" do
|
46
46
|
@table << ['foo', 'bar', 'a']
|
47
47
|
@table << ['big foo', 'big foo bar']
|
48
48
|
@table.length_of_column(1).should == 11
|
49
49
|
end
|
50
|
-
|
50
|
+
|
51
51
|
it "should find column length with headings" do
|
52
52
|
@table.headings = ['one', 'super long heading']
|
53
53
|
@table << ['foo', 'bar', 'a']
|
54
54
|
@table << ['big foo', 'big foo bar']
|
55
55
|
@table.length_of_column(1).should == 18
|
56
56
|
end
|
57
|
-
|
57
|
+
|
58
58
|
it "should render seperators" do
|
59
59
|
@table.headings = ['Char', 'Num']
|
60
60
|
@table << ['a', 1]
|
61
61
|
@table.seperator.should == '+------+-----+'
|
62
62
|
end
|
63
|
-
|
63
|
+
|
64
64
|
it "should bitch and complain when you have no rows" do
|
65
65
|
lambda { @table.render }.should raise_error(Terminal::Table::Error)
|
66
66
|
end
|
67
|
-
|
67
|
+
|
68
68
|
it "should render properly" do
|
69
69
|
@table.headings = ['Char', 'Num']
|
70
70
|
@table << ['a', 1]
|
@@ -80,7 +80,7 @@ module Terminal
|
|
80
80
|
+------+-----+
|
81
81
|
EOF
|
82
82
|
end
|
83
|
-
|
83
|
+
|
84
84
|
it "should render properly without headings" do
|
85
85
|
@table << ['a', 1]
|
86
86
|
@table << ['b', 2]
|
@@ -93,7 +93,7 @@ module Terminal
|
|
93
93
|
+---+---+
|
94
94
|
EOF
|
95
95
|
end
|
96
|
-
|
96
|
+
|
97
97
|
it "should render properly using block syntax" do
|
98
98
|
table = Terminal::Table.new do |t|
|
99
99
|
t << ['a', 1]
|
@@ -108,7 +108,7 @@ module Terminal
|
|
108
108
|
+---+---+
|
109
109
|
EOF
|
110
110
|
end
|
111
|
-
|
111
|
+
|
112
112
|
it "should render properly using instance_eval block syntax" do
|
113
113
|
table = Terminal::Table.new do
|
114
114
|
add_row ['a', 1]
|
@@ -123,7 +123,7 @@ module Terminal
|
|
123
123
|
+---+---+
|
124
124
|
EOF
|
125
125
|
end
|
126
|
-
|
126
|
+
|
127
127
|
it "should allows a hash of options for creation" do
|
128
128
|
headings = ['Char', 'Num']
|
129
129
|
rows = [['a', 1], ['b', 2], ['c', 3]]
|
@@ -137,7 +137,7 @@ module Terminal
|
|
137
137
|
+------+-----+
|
138
138
|
EOF
|
139
139
|
end
|
140
|
-
|
140
|
+
|
141
141
|
it "should flex for large cells" do
|
142
142
|
@table.headings = ['Just some characters', 'Num']
|
143
143
|
@table.rows = [['a', 1], ['b', 2], ['c', 3]]
|
@@ -151,10 +151,10 @@ module Terminal
|
|
151
151
|
+----------------------+-----+
|
152
152
|
EOF
|
153
153
|
end
|
154
|
-
|
154
|
+
|
155
155
|
it "should allow alignment of headings and cells" do
|
156
|
-
@table.headings = ['Characters',
|
157
|
-
@table << [
|
156
|
+
@table.headings = ['Characters', {:value => 'Nums', :alignment => :right} ]
|
157
|
+
@table << [{:value => 'a', :alignment => :center}, 1]
|
158
158
|
@table << ['b', 222222222222222]
|
159
159
|
@table << ['c', 3]
|
160
160
|
@table.render.should == <<-EOF.deindent
|
@@ -166,12 +166,12 @@ module Terminal
|
|
166
166
|
| c | 3 |
|
167
167
|
+------------+-----------------+
|
168
168
|
EOF
|
169
|
-
|
169
|
+
|
170
170
|
end
|
171
|
-
|
171
|
+
|
172
172
|
it "should align columns, but allow specifics to remain" do
|
173
173
|
@table.headings = ['Just some characters', 'Num']
|
174
|
-
@table.rows = [[
|
174
|
+
@table.rows = [[{:value => 'a', :alignment => :left}, 1], ['b', 2], ['c', 3]]
|
175
175
|
@table.align_column 0, :center
|
176
176
|
@table.align_column 1, :right
|
177
177
|
@table.render.should == <<-EOF.deindent
|
@@ -184,7 +184,7 @@ module Terminal
|
|
184
184
|
+----------------------+-----+
|
185
185
|
EOF
|
186
186
|
end
|
187
|
-
|
187
|
+
|
188
188
|
describe "#==" do
|
189
189
|
it "should be equal to itself" do
|
190
190
|
t = Table.new
|
@@ -194,7 +194,7 @@ module Terminal
|
|
194
194
|
it "should be equal with two empty tables" do
|
195
195
|
table_one = Table.new
|
196
196
|
table_two = Table.new
|
197
|
-
|
197
|
+
|
198
198
|
table_one.should == table_two
|
199
199
|
table_two.should == table_one
|
200
200
|
end
|
@@ -204,7 +204,7 @@ module Terminal
|
|
204
204
|
table_two = Table.new
|
205
205
|
|
206
206
|
table_one.headings << "a"
|
207
|
-
|
207
|
+
|
208
208
|
table_one.should_not == table_two
|
209
209
|
table_two.should_not == table_one
|
210
210
|
end
|
@@ -214,7 +214,7 @@ module Terminal
|
|
214
214
|
table_two = Table.new
|
215
215
|
|
216
216
|
table_one.rows << "a"
|
217
|
-
|
217
|
+
|
218
218
|
table_one.should_not == table_two
|
219
219
|
table_two.should_not == table_one
|
220
220
|
end
|
@@ -233,5 +233,64 @@ module Terminal
|
|
233
233
|
table_one.should_not == table_two
|
234
234
|
end
|
235
235
|
end
|
236
|
+
|
237
|
+
it "should handle colspan inside heading" do
|
238
|
+
@table.headings = ['one', { :value => 'two', :alignment => :center, :colspan => 2}]
|
239
|
+
@table.rows = [['a', 1, 2], ['b', 3, 4], ['c', 3, 4]]
|
240
|
+
@table.render.should == <<-EOF.deindent
|
241
|
+
+-----+-----+---+
|
242
|
+
| one | two |
|
243
|
+
+-----+-----+---+
|
244
|
+
| a | 1 | 2 |
|
245
|
+
| b | 3 | 4 |
|
246
|
+
| c | 3 | 4 |
|
247
|
+
+-----+-----+---+
|
248
|
+
EOF
|
249
|
+
end
|
250
|
+
|
251
|
+
it "should handle colspan inside cells" do
|
252
|
+
@table.headings = ['one', 'two', 'three']
|
253
|
+
@table.rows = [['a', 1, 2], ['b', 3, 4], ['c', {:value => "joined", :colspan => 2,:alignment => :center}]]
|
254
|
+
@table.render.should == <<-EOF.deindent
|
255
|
+
+-----+--------+-------+
|
256
|
+
| one | two | three |
|
257
|
+
+-----+--------+-------+
|
258
|
+
| a | 1 | 2 |
|
259
|
+
| b | 3 | 4 |
|
260
|
+
| c | joined |
|
261
|
+
+-----+--------+-------+
|
262
|
+
EOF
|
263
|
+
end
|
264
|
+
|
265
|
+
|
266
|
+
it "should handle colspan 1" do
|
267
|
+
@table.headings = ['name', { :value => 'values', :colspan => 1}]
|
268
|
+
@table.rows = [['a', 1], ['b', 4], ['c', 7]]
|
269
|
+
@table.render.should == <<-EOF.deindent
|
270
|
+
+------+--------+
|
271
|
+
| name | values |
|
272
|
+
+------+--------+
|
273
|
+
| a | 1 |
|
274
|
+
| b | 4 |
|
275
|
+
| c | 7 |
|
276
|
+
+------+--------+
|
277
|
+
EOF
|
278
|
+
end
|
279
|
+
|
280
|
+
it "should handle big colspan" do
|
281
|
+
@table.headings = ['name', { :value => 'values', :alignment => :right, :colspan => 3}]
|
282
|
+
@table.headings = ['name', { :value => 'values', :colspan => 3}]
|
283
|
+
@table.rows = [['a', 1, 2, 3], ['b', 4, 5, 6], ['c', 7, 8, 9]]
|
284
|
+
|
285
|
+
@table.render.should == <<-EOF.deindent
|
286
|
+
+------+--------+---+---+
|
287
|
+
| name | values |
|
288
|
+
+------+--------+---+---+
|
289
|
+
| a | 1 | 2 | 3 |
|
290
|
+
| b | 4 | 5 | 6 |
|
291
|
+
| c | 7 | 8 | 9 |
|
292
|
+
+------+--------+---+---+
|
293
|
+
EOF
|
294
|
+
end
|
236
295
|
end
|
237
296
|
end
|
data/terminal-table.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{terminal-table}
|
5
|
-
s.version = "1.
|
5
|
+
s.version = "1.2.0"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["TJ Holowaychuk"]
|
9
|
-
s.date = %q{2009-
|
9
|
+
s.date = %q{2009-08-06}
|
10
10
|
s.description = %q{Simple,}
|
11
11
|
s.email = %q{tj@vision-media.ca}
|
12
12
|
s.extra_rdoc_files = ["lib/terminal-table/cell.rb", "lib/terminal-table/core_ext.rb", "lib/terminal-table/heading.rb", "lib/terminal-table/import.rb", "lib/terminal-table/table.rb", "lib/terminal-table/table_helper.rb", "lib/terminal-table/version.rb", "lib/terminal-table.rb", "README.rdoc", "tasks/docs.rake", "tasks/gemspec.rake", "tasks/spec.rake"]
|
@@ -15,7 +15,7 @@ Gem::Specification.new do |s|
|
|
15
15
|
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Terminal-table", "--main", "README.rdoc"]
|
16
16
|
s.require_paths = ["lib"]
|
17
17
|
s.rubyforge_project = %q{terminal-table}
|
18
|
-
s.rubygems_version = %q{1.3.
|
18
|
+
s.rubygems_version = %q{1.3.5}
|
19
19
|
s.summary = %q{Simple,}
|
20
20
|
|
21
21
|
if s.respond_to? :specification_version then
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: visionmedia-terminal-table
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- TJ Holowaychuk
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-08-06 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -60,6 +60,7 @@ files:
|
|
60
60
|
- Todo.rdoc
|
61
61
|
has_rdoc: false
|
62
62
|
homepage: http://github.com/visionmedia/terminal-table
|
63
|
+
licenses:
|
63
64
|
post_install_message:
|
64
65
|
rdoc_options:
|
65
66
|
- --line-numbers
|
@@ -85,7 +86,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
85
86
|
requirements: []
|
86
87
|
|
87
88
|
rubyforge_project: terminal-table
|
88
|
-
rubygems_version: 1.
|
89
|
+
rubygems_version: 1.3.5
|
89
90
|
signing_key:
|
90
91
|
specification_version: 3
|
91
92
|
summary: Simple,
|