tty-table 0.11.0 → 0.12.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 +13 -0
- data/LICENSE.txt +1 -1
- data/README.md +104 -98
- data/lib/tty-table.rb +1 -1
- data/lib/tty/table.rb +70 -34
- data/lib/tty/table/alignment_set.rb +1 -3
- data/lib/tty/table/border.rb +50 -57
- data/lib/tty/table/border/ascii.rb +16 -16
- data/lib/tty/table/border/null.rb +19 -22
- data/lib/tty/table/border/row_line.rb +3 -2
- data/lib/tty/table/border/unicode.rb +16 -16
- data/lib/tty/table/border_dsl.rb +24 -22
- data/lib/tty/table/border_options.rb +32 -27
- data/lib/tty/table/column_constraint.rb +12 -9
- data/lib/tty/table/columns.rb +6 -6
- data/lib/tty/table/field.rb +46 -28
- data/lib/tty/table/header.rb +5 -5
- data/lib/tty/table/indentation.rb +7 -4
- data/lib/tty/table/operation/alignment.rb +1 -1
- data/lib/tty/table/operation/escape.rb +1 -2
- data/lib/tty/table/operation/padding.rb +1 -1
- data/lib/tty/table/operation/truncation.rb +1 -1
- data/lib/tty/table/operation/wrapped.rb +1 -1
- data/lib/tty/table/options.rb +1 -1
- data/lib/tty/table/orientation.rb +4 -4
- data/lib/tty/table/renderer.rb +8 -8
- data/lib/tty/table/renderer/ascii.rb +2 -2
- data/lib/tty/table/renderer/basic.rb +37 -40
- data/lib/tty/table/renderer/unicode.rb +1 -1
- data/lib/tty/table/row.rb +7 -7
- data/lib/tty/table/validatable.rb +23 -7
- data/lib/tty/table/version.rb +1 -1
- metadata +23 -272
- data/Rakefile +0 -10
- data/examples/alignment.rb +0 -10
- data/examples/basic.rb +0 -6
- data/examples/orientation.rb +0 -13
- data/examples/padding.rb +0 -15
- data/examples/resize.rb +0 -15
- data/spec/spec_helper.rb +0 -50
- data/spec/unit/access_spec.rb +0 -84
- data/spec/unit/add_row_spec.rb +0 -26
- data/spec/unit/alignment_set/each_spec.rb +0 -15
- data/spec/unit/alignment_set/new_spec.rb +0 -25
- data/spec/unit/alignment_set/to_ary_spec.rb +0 -12
- data/spec/unit/alignment_spec.rb +0 -69
- data/spec/unit/border/ascii/rendering_spec.rb +0 -88
- data/spec/unit/border/new_spec.rb +0 -25
- data/spec/unit/border/null/rendering_spec.rb +0 -128
- data/spec/unit/border/options/from_spec.rb +0 -36
- data/spec/unit/border/options/new_spec.rb +0 -12
- data/spec/unit/border/unicode/rendering_spec.rb +0 -61
- data/spec/unit/border_options/new_spec.rb +0 -18
- data/spec/unit/border_options/update_spec.rb +0 -16
- data/spec/unit/column_constraint/enforce_spec.rb +0 -68
- data/spec/unit/column_constraint/widths_spec.rb +0 -33
- data/spec/unit/columns/extract_widths_spec.rb +0 -41
- data/spec/unit/columns/total_width_spec.rb +0 -11
- data/spec/unit/columns/widths_from_spec.rb +0 -49
- data/spec/unit/data_spec.rb +0 -10
- data/spec/unit/each_spec.rb +0 -24
- data/spec/unit/each_with_index_spec.rb +0 -49
- data/spec/unit/empty_spec.rb +0 -21
- data/spec/unit/eql_spec.rb +0 -32
- data/spec/unit/field/equality_spec.rb +0 -49
- data/spec/unit/field/length_spec.rb +0 -33
- data/spec/unit/field/lines_spec.rb +0 -19
- data/spec/unit/field/new_spec.rb +0 -27
- data/spec/unit/field/width_spec.rb +0 -21
- data/spec/unit/filter_spec.rb +0 -20
- data/spec/unit/header/call_spec.rb +0 -28
- data/spec/unit/header/color_spec.rb +0 -17
- data/spec/unit/header/equality_spec.rb +0 -49
- data/spec/unit/header/height_spec.rb +0 -25
- data/spec/unit/header/new_spec.rb +0 -13
- data/spec/unit/header/set_spec.rb +0 -18
- data/spec/unit/header/to_ary_spec.rb +0 -12
- data/spec/unit/header_spec.rb +0 -11
- data/spec/unit/indentation/indent_spec.rb +0 -15
- data/spec/unit/new_spec.rb +0 -71
- data/spec/unit/operation/alignment/call_spec.rb +0 -37
- data/spec/unit/operation/escape/call_spec.rb +0 -13
- data/spec/unit/operation/filter/call_spec.rb +0 -14
- data/spec/unit/operation/truncation/call_spec.rb +0 -28
- data/spec/unit/operation/wrapped/call_spec.rb +0 -38
- data/spec/unit/operations/new_spec.rb +0 -28
- data/spec/unit/options/access_spec.rb +0 -12
- data/spec/unit/options_spec.rb +0 -23
- data/spec/unit/orientation_spec.rb +0 -143
- data/spec/unit/padding_spec.rb +0 -115
- data/spec/unit/properties_spec.rb +0 -23
- data/spec/unit/render_repeat_spec.rb +0 -39
- data/spec/unit/render_spec.rb +0 -61
- data/spec/unit/render_with_spec.rb +0 -104
- data/spec/unit/renderer/ascii/coloring_spec.rb +0 -83
- data/spec/unit/renderer/ascii/indentation_spec.rb +0 -39
- data/spec/unit/renderer/ascii/multiline_spec.rb +0 -99
- data/spec/unit/renderer/ascii/padding_spec.rb +0 -115
- data/spec/unit/renderer/ascii/render_spec.rb +0 -66
- data/spec/unit/renderer/ascii/resizing_spec.rb +0 -112
- data/spec/unit/renderer/ascii/separator_spec.rb +0 -38
- data/spec/unit/renderer/basic/alignment_spec.rb +0 -86
- data/spec/unit/renderer/basic/coloring_spec.rb +0 -59
- data/spec/unit/renderer/basic/extract_column_widths_spec.rb +0 -26
- data/spec/unit/renderer/basic/filter_spec.rb +0 -51
- data/spec/unit/renderer/basic/indentation_spec.rb +0 -46
- data/spec/unit/renderer/basic/multiline_spec.rb +0 -72
- data/spec/unit/renderer/basic/new_spec.rb +0 -24
- data/spec/unit/renderer/basic/options_spec.rb +0 -50
- data/spec/unit/renderer/basic/padding_spec.rb +0 -74
- data/spec/unit/renderer/basic/render_spec.rb +0 -55
- data/spec/unit/renderer/basic/resizing_spec.rb +0 -94
- data/spec/unit/renderer/basic/separator_spec.rb +0 -41
- data/spec/unit/renderer/basic/single_row_separator_spec.rb +0 -80
- data/spec/unit/renderer/basic/truncation_spec.rb +0 -33
- data/spec/unit/renderer/basic/wrapping_spec.rb +0 -38
- data/spec/unit/renderer/border_spec.rb +0 -102
- data/spec/unit/renderer/render_spec.rb +0 -34
- data/spec/unit/renderer/select_spec.rb +0 -20
- data/spec/unit/renderer/unicode/coloring_spec.rb +0 -68
- data/spec/unit/renderer/unicode/indentation_spec.rb +0 -39
- data/spec/unit/renderer/unicode/padding_spec.rb +0 -59
- data/spec/unit/renderer/unicode/render_spec.rb +0 -66
- data/spec/unit/renderer/unicode/separator_spec.rb +0 -36
- data/spec/unit/renderer_spec.rb +0 -17
- data/spec/unit/rotate_spec.rb +0 -84
- data/spec/unit/row/access_spec.rb +0 -23
- data/spec/unit/row/call_spec.rb +0 -43
- data/spec/unit/row/data_spec.rb +0 -24
- data/spec/unit/row/each_spec.rb +0 -29
- data/spec/unit/row/equality_spec.rb +0 -71
- data/spec/unit/row/height_spec.rb +0 -25
- data/spec/unit/row/new_spec.rb +0 -39
- data/spec/unit/row/to_ary_spec.rb +0 -12
- data/spec/unit/to_s_spec.rb +0 -56
- data/spec/unit/transformation/extract_tuples_spec.rb +0 -33
- data/spec/unit/utf_spec.rb +0 -31
- data/spec/unit/validatable/validate_options_spec.rb +0 -31
- data/spec/unit/validatable_spec.rb +0 -30
- data/tasks/console.rake +0 -11
- data/tasks/coverage.rake +0 -11
- data/tasks/spec.rake +0 -29
- data/tty-table.gemspec +0 -41
data/lib/tty/table/header.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require
|
3
|
+
require "forwardable"
|
4
4
|
|
5
|
-
require_relative
|
6
|
-
require_relative
|
5
|
+
require_relative "error"
|
6
|
+
require_relative "field"
|
7
7
|
|
8
8
|
module TTY
|
9
9
|
class Table
|
@@ -78,8 +78,8 @@ module TTY
|
|
78
78
|
@attributes[attribute].value
|
79
79
|
else
|
80
80
|
@attribute_for.fetch(to_field(attribute)) do |header_name|
|
81
|
-
|
82
|
-
|
81
|
+
raise UnknownAttributeError,
|
82
|
+
"the header '#{header_name.value}' is unknown"
|
83
83
|
end
|
84
84
|
end
|
85
85
|
end
|
@@ -11,7 +11,7 @@ module TTY
|
|
11
11
|
#
|
12
12
|
# @api public
|
13
13
|
def indent(part, indentation)
|
14
|
-
if part.respond_to?(:to_a)
|
14
|
+
if part.is_a?(Enumerable) && part.respond_to?(:to_a)
|
15
15
|
part.map { |line| insert_indentation(line, indentation) }
|
16
16
|
else
|
17
17
|
insert_indentation(part, indentation)
|
@@ -21,13 +21,16 @@ module TTY
|
|
21
21
|
|
22
22
|
# Insert indentation into a table renderd line
|
23
23
|
#
|
24
|
-
# @param [
|
24
|
+
# @param [String] line
|
25
25
|
# the rendered table line
|
26
|
+
# @param [Integer] indentation
|
27
|
+
# the amount of indentation to apply
|
28
|
+
#
|
29
|
+
# @return [String]
|
26
30
|
#
|
27
31
|
# @api public
|
28
32
|
def insert_indentation(line, indentation)
|
29
|
-
line
|
30
|
-
' ' * indentation + line.to_s if line
|
33
|
+
line ? " " * indentation + line.to_s : ""
|
31
34
|
end
|
32
35
|
module_function :insert_indentation
|
33
36
|
end # Indentation
|
@@ -7,7 +7,6 @@ module TTY
|
|
7
7
|
#
|
8
8
|
# @api private
|
9
9
|
class Escape
|
10
|
-
|
11
10
|
# Escape special characters in a table field
|
12
11
|
#
|
13
12
|
# @param [TTY::Table::Field] field
|
@@ -21,7 +20,7 @@ module TTY
|
|
21
20
|
# @api public
|
22
21
|
def call(field, row, col)
|
23
22
|
field.content.gsub(/(\t|\r|\n)/) do |val|
|
24
|
-
val.dump.gsub('"',
|
23
|
+
val.dump.gsub('"', "")
|
25
24
|
end
|
26
25
|
end
|
27
26
|
end # Escape
|
data/lib/tty/table/options.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require_relative
|
4
|
-
require_relative
|
3
|
+
require_relative "orientation/horizontal"
|
4
|
+
require_relative "orientation/vertical"
|
5
5
|
|
6
6
|
module TTY
|
7
7
|
class Table
|
@@ -33,8 +33,8 @@ module TTY
|
|
33
33
|
when /v|ert(ical)?/i
|
34
34
|
Vertical.new :vertical
|
35
35
|
else
|
36
|
-
|
37
|
-
|
36
|
+
raise InvalidOrientationError,
|
37
|
+
"orientation must be one of :horizontal, :vertical"
|
38
38
|
end
|
39
39
|
end
|
40
40
|
|
data/lib/tty/table/renderer.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require_relative
|
4
|
-
require_relative
|
5
|
-
require_relative
|
6
|
-
require_relative
|
3
|
+
require_relative "error"
|
4
|
+
require_relative "renderer/basic"
|
5
|
+
require_relative "renderer/ascii"
|
6
|
+
require_relative "renderer/unicode"
|
7
7
|
|
8
8
|
module TTY
|
9
9
|
class Table
|
@@ -48,12 +48,12 @@ module TTY
|
|
48
48
|
def assert_border_class(border_class)
|
49
49
|
return unless border_class
|
50
50
|
unless border_class <= TTY::Table::Border
|
51
|
-
|
52
|
-
|
51
|
+
raise TypeError,
|
52
|
+
"#{border_class} should inherit from TTY::Table::Border"
|
53
53
|
end
|
54
54
|
unless border_class.characters
|
55
|
-
|
56
|
-
|
55
|
+
raise NoImplementationError,
|
56
|
+
"#{border_class} should implement def_border"
|
57
57
|
end
|
58
58
|
end
|
59
59
|
module_function :assert_border_class
|
@@ -1,24 +1,23 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require
|
4
|
-
require
|
5
|
-
|
6
|
-
require_relative
|
7
|
-
require_relative
|
8
|
-
require_relative
|
9
|
-
require_relative
|
10
|
-
require_relative
|
11
|
-
require_relative
|
12
|
-
require_relative
|
13
|
-
require_relative
|
14
|
-
require_relative
|
15
|
-
require_relative
|
16
|
-
require_relative
|
17
|
-
require_relative
|
18
|
-
require_relative
|
19
|
-
require_relative
|
20
|
-
require_relative
|
21
|
-
require_relative '../validatable'
|
3
|
+
require "strings"
|
4
|
+
require "tty-screen"
|
5
|
+
|
6
|
+
require_relative "../alignment_set"
|
7
|
+
require_relative "../border_dsl"
|
8
|
+
require_relative "../border/null"
|
9
|
+
require_relative "../column_constraint"
|
10
|
+
require_relative "../columns"
|
11
|
+
require_relative "../header"
|
12
|
+
require_relative "../indentation"
|
13
|
+
require_relative "../operations"
|
14
|
+
require_relative "../operation/alignment"
|
15
|
+
require_relative "../operation/truncation"
|
16
|
+
require_relative "../operation/wrapped"
|
17
|
+
require_relative "../operation/filter"
|
18
|
+
require_relative "../operation/escape"
|
19
|
+
require_relative "../operation/padding"
|
20
|
+
require_relative "../validatable"
|
22
21
|
|
23
22
|
module TTY
|
24
23
|
class Table
|
@@ -113,10 +112,13 @@ module TTY
|
|
113
112
|
def initialize(table, options = {})
|
114
113
|
@table = assert_table_type(table)
|
115
114
|
@multiline = options.fetch(:multiline) { false }
|
116
|
-
@border =
|
115
|
+
@border = BorderDSL.new(options.delete(:border)).options
|
116
|
+
unless @table.separators.empty?
|
117
|
+
@border.separator ||= @table.separators
|
118
|
+
end
|
117
119
|
@column_widths = options.fetch(:column_widths, nil)
|
118
120
|
alignment = Array(options[:alignment]) * table.columns_size
|
119
|
-
@alignments =
|
121
|
+
@alignments = AlignmentSet.new(options[:alignments] || alignment)
|
120
122
|
@filter = options.fetch(:filter) { proc { |val, _| val } }
|
121
123
|
@width = options.fetch(:width) { TTY::Screen.width }
|
122
124
|
@border_class = options.fetch(:border_class) { Border::Null }
|
@@ -143,18 +145,13 @@ module TTY
|
|
143
145
|
# block representing border options
|
144
146
|
#
|
145
147
|
# @api public
|
146
|
-
def border(
|
147
|
-
@border
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
elsif !not_set
|
152
|
-
@border = TTY::Table::BorderOptions.from(options)
|
153
|
-
end
|
154
|
-
@border.separator ||= @table.separators unless @table.separators.empty?
|
155
|
-
@border
|
148
|
+
def border(border_opts = (not_set = true), &block)
|
149
|
+
return @border if not_set && !block_given?
|
150
|
+
|
151
|
+
border_opts = {} if not_set
|
152
|
+
@border = BorderDSL.new(border_opts, &block).options
|
156
153
|
end
|
157
|
-
|
154
|
+
alias border= border
|
158
155
|
|
159
156
|
# Change the value of indentation
|
160
157
|
#
|
@@ -271,8 +268,10 @@ module TTY
|
|
271
268
|
def render_header(row, data_border)
|
272
269
|
top_line = data_border.top_line
|
273
270
|
return top_line unless row.is_a?(TTY::Table::Header)
|
274
|
-
|
275
|
-
|
271
|
+
header = [top_line, data_border.row_line(row)]
|
272
|
+
if !border.separator || border.separator?(0)
|
273
|
+
header << data_border.middle_line
|
274
|
+
end
|
276
275
|
Indentation.indent(header.compact, @indent)
|
277
276
|
end
|
278
277
|
|
@@ -305,13 +304,11 @@ module TTY
|
|
305
304
|
#
|
306
305
|
# @api private
|
307
306
|
def render_row(row, index, data_border, is_not_last_row)
|
308
|
-
separator = data_border.separator
|
309
307
|
row_line = data_border.row_line(row)
|
310
|
-
line =
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
end
|
308
|
+
line = [row_line]
|
309
|
+
if border.separator?(index) && is_not_last_row
|
310
|
+
line << data_border.middle_line
|
311
|
+
end
|
315
312
|
Indentation.indent(line, @indent)
|
316
313
|
end
|
317
314
|
end # Basic
|
data/lib/tty/table/row.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require
|
3
|
+
require "forwardable"
|
4
4
|
|
5
|
-
require_relative
|
6
|
-
require_relative
|
5
|
+
require_relative "error"
|
6
|
+
require_relative "field"
|
7
7
|
|
8
8
|
module TTY
|
9
9
|
class Table
|
@@ -55,11 +55,11 @@ module TTY
|
|
55
55
|
#
|
56
56
|
# row = new TTY::Table::Row.new [1,2,3], %w[a b c]
|
57
57
|
# row[0] # => 1
|
58
|
-
# row[
|
58
|
+
# row["a"] # => 1
|
59
59
|
#
|
60
60
|
# row = new TTY::Table::Row.new {"a": 1, "b": 2, "c": 3}
|
61
61
|
# row[0] # => 1
|
62
|
-
# row[
|
62
|
+
# row["a"] # => 1
|
63
63
|
#
|
64
64
|
# @param [#to_ary] data
|
65
65
|
# the row data
|
@@ -113,7 +113,7 @@ module TTY
|
|
113
113
|
data[attributes[attribute]].value
|
114
114
|
else
|
115
115
|
data.fetch(attribute) do |name|
|
116
|
-
|
116
|
+
raise UnknownAttributeError, "the attribute #{name} is unkown"
|
117
117
|
end.value
|
118
118
|
end
|
119
119
|
end
|
@@ -144,7 +144,7 @@ module TTY
|
|
144
144
|
# Iterate over each element in the Row
|
145
145
|
#
|
146
146
|
# @example
|
147
|
-
# vec = Row.new [1,2,3], [
|
147
|
+
# vec = Row.new [1,2,3], ["a","b","c"]
|
148
148
|
# vec.each { |element| ... }
|
149
149
|
#
|
150
150
|
# @return [self]
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require_relative
|
3
|
+
require_relative "error"
|
4
4
|
|
5
5
|
module TTY
|
6
6
|
class Table
|
@@ -22,11 +22,27 @@ module TTY
|
|
22
22
|
size = (rows[0] || []).size
|
23
23
|
rows.each do |row|
|
24
24
|
next if row.size == size
|
25
|
-
|
26
|
-
|
25
|
+
raise TTY::Table::DimensionMismatchError,
|
26
|
+
"row size differs (#{row.size} should be #{size})"
|
27
27
|
end
|
28
28
|
end
|
29
29
|
|
30
|
+
# Check if table row is the correct size
|
31
|
+
#
|
32
|
+
# @raise [DimensionMismatchError]
|
33
|
+
# if the row is not the correct length
|
34
|
+
#
|
35
|
+
# @return [nil]
|
36
|
+
#
|
37
|
+
# @api private
|
38
|
+
def assert_row_size(row, rows)
|
39
|
+
return if rows.empty?
|
40
|
+
size = rows.last.size
|
41
|
+
return if row.size == size
|
42
|
+
raise TTY::Table::DimensionMismatchError,
|
43
|
+
"row size differs (#{row.size} should be #{size})"
|
44
|
+
end
|
45
|
+
|
30
46
|
# Check if table type is provided
|
31
47
|
#
|
32
48
|
# @raise [ArgumentRequired]
|
@@ -36,8 +52,8 @@ module TTY
|
|
36
52
|
# @api private
|
37
53
|
def assert_table_type(value)
|
38
54
|
return value if value.is_a?(TTY::Table)
|
39
|
-
|
40
|
-
|
55
|
+
raise ArgumentRequired,
|
56
|
+
"Expected TTY::Table instance, got #{value.inspect}"
|
41
57
|
end
|
42
58
|
|
43
59
|
# def assert_matching_widths(rows)
|
@@ -54,11 +70,11 @@ module TTY
|
|
54
70
|
rows = options[:rows]
|
55
71
|
|
56
72
|
if header && (!header.is_a?(Array) || header.empty?)
|
57
|
-
|
73
|
+
raise InvalidArgument, ":header must be a non-empty array"
|
58
74
|
end
|
59
75
|
|
60
76
|
if rows && !(rows.is_a?(Array) || rows.is_a?(Hash))
|
61
|
-
|
77
|
+
raise InvalidArgument, ":rows must be a non-empty array or hash"
|
62
78
|
end
|
63
79
|
end
|
64
80
|
end # Validatable
|
data/lib/tty/table/version.rb
CHANGED
metadata
CHANGED
@@ -1,99 +1,57 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tty-table
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.12.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:
|
11
|
+
date: 2020-09-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: equatable
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - "~>"
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '0.6'
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - "~>"
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '0.6'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: necromancer
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - "~>"
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '0.5'
|
34
|
-
type: :runtime
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - "~>"
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '0.5'
|
41
13
|
- !ruby/object:Gem::Dependency
|
42
14
|
name: pastel
|
43
15
|
requirement: !ruby/object:Gem::Requirement
|
44
16
|
requirements:
|
45
17
|
- - "~>"
|
46
18
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.
|
19
|
+
version: '0.8'
|
48
20
|
type: :runtime
|
49
21
|
prerelease: false
|
50
22
|
version_requirements: !ruby/object:Gem::Requirement
|
51
23
|
requirements:
|
52
24
|
- - "~>"
|
53
25
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.
|
26
|
+
version: '0.8'
|
55
27
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
28
|
+
name: strings
|
57
29
|
requirement: !ruby/object:Gem::Requirement
|
58
30
|
requirements:
|
59
31
|
- - "~>"
|
60
32
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
33
|
+
version: 0.2.0
|
62
34
|
type: :runtime
|
63
35
|
prerelease: false
|
64
36
|
version_requirements: !ruby/object:Gem::Requirement
|
65
37
|
requirements:
|
66
38
|
- - "~>"
|
67
39
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
40
|
+
version: 0.2.0
|
69
41
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
42
|
+
name: tty-screen
|
71
43
|
requirement: !ruby/object:Gem::Requirement
|
72
44
|
requirements:
|
73
45
|
- - "~>"
|
74
46
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0.
|
47
|
+
version: '0.8'
|
76
48
|
type: :runtime
|
77
49
|
prerelease: false
|
78
50
|
version_requirements: !ruby/object:Gem::Requirement
|
79
51
|
requirements:
|
80
52
|
- - "~>"
|
81
53
|
- !ruby/object:Gem::Version
|
82
|
-
version: 0.
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: bundler
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - ">="
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: 1.5.0
|
90
|
-
type: :development
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - ">="
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: 1.5.0
|
54
|
+
version: '0.8'
|
97
55
|
- !ruby/object:Gem::Dependency
|
98
56
|
name: rake
|
99
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -112,32 +70,29 @@ dependencies:
|
|
112
70
|
name: rspec
|
113
71
|
requirement: !ruby/object:Gem::Requirement
|
114
72
|
requirements:
|
115
|
-
- - "
|
73
|
+
- - ">="
|
116
74
|
- !ruby/object:Gem::Version
|
117
|
-
version: '3.
|
75
|
+
version: '3.0'
|
118
76
|
type: :development
|
119
77
|
prerelease: false
|
120
78
|
version_requirements: !ruby/object:Gem::Requirement
|
121
79
|
requirements:
|
122
|
-
- - "
|
80
|
+
- - ">="
|
123
81
|
- !ruby/object:Gem::Version
|
124
|
-
version: '3.
|
82
|
+
version: '3.0'
|
125
83
|
description: A flexible and intuitive table generator
|
126
84
|
email:
|
127
|
-
-
|
85
|
+
- piotr@piotrmurach.com
|
128
86
|
executables: []
|
129
87
|
extensions: []
|
130
|
-
extra_rdoc_files:
|
88
|
+
extra_rdoc_files:
|
89
|
+
- README.md
|
90
|
+
- CHANGELOG.md
|
91
|
+
- LICENSE.txt
|
131
92
|
files:
|
132
93
|
- CHANGELOG.md
|
133
94
|
- LICENSE.txt
|
134
95
|
- README.md
|
135
|
-
- Rakefile
|
136
|
-
- examples/alignment.rb
|
137
|
-
- examples/basic.rb
|
138
|
-
- examples/orientation.rb
|
139
|
-
- examples/padding.rb
|
140
|
-
- examples/resize.rb
|
141
96
|
- lib/tty-table.rb
|
142
97
|
- lib/tty/table.rb
|
143
98
|
- lib/tty/table/alignment_set.rb
|
@@ -174,111 +129,7 @@ files:
|
|
174
129
|
- lib/tty/table/transformation.rb
|
175
130
|
- lib/tty/table/validatable.rb
|
176
131
|
- lib/tty/table/version.rb
|
177
|
-
|
178
|
-
- spec/unit/access_spec.rb
|
179
|
-
- spec/unit/add_row_spec.rb
|
180
|
-
- spec/unit/alignment_set/each_spec.rb
|
181
|
-
- spec/unit/alignment_set/new_spec.rb
|
182
|
-
- spec/unit/alignment_set/to_ary_spec.rb
|
183
|
-
- spec/unit/alignment_spec.rb
|
184
|
-
- spec/unit/border/ascii/rendering_spec.rb
|
185
|
-
- spec/unit/border/new_spec.rb
|
186
|
-
- spec/unit/border/null/rendering_spec.rb
|
187
|
-
- spec/unit/border/options/from_spec.rb
|
188
|
-
- spec/unit/border/options/new_spec.rb
|
189
|
-
- spec/unit/border/unicode/rendering_spec.rb
|
190
|
-
- spec/unit/border_options/new_spec.rb
|
191
|
-
- spec/unit/border_options/update_spec.rb
|
192
|
-
- spec/unit/column_constraint/enforce_spec.rb
|
193
|
-
- spec/unit/column_constraint/widths_spec.rb
|
194
|
-
- spec/unit/columns/extract_widths_spec.rb
|
195
|
-
- spec/unit/columns/total_width_spec.rb
|
196
|
-
- spec/unit/columns/widths_from_spec.rb
|
197
|
-
- spec/unit/data_spec.rb
|
198
|
-
- spec/unit/each_spec.rb
|
199
|
-
- spec/unit/each_with_index_spec.rb
|
200
|
-
- spec/unit/empty_spec.rb
|
201
|
-
- spec/unit/eql_spec.rb
|
202
|
-
- spec/unit/field/equality_spec.rb
|
203
|
-
- spec/unit/field/length_spec.rb
|
204
|
-
- spec/unit/field/lines_spec.rb
|
205
|
-
- spec/unit/field/new_spec.rb
|
206
|
-
- spec/unit/field/width_spec.rb
|
207
|
-
- spec/unit/filter_spec.rb
|
208
|
-
- spec/unit/header/call_spec.rb
|
209
|
-
- spec/unit/header/color_spec.rb
|
210
|
-
- spec/unit/header/equality_spec.rb
|
211
|
-
- spec/unit/header/height_spec.rb
|
212
|
-
- spec/unit/header/new_spec.rb
|
213
|
-
- spec/unit/header/set_spec.rb
|
214
|
-
- spec/unit/header/to_ary_spec.rb
|
215
|
-
- spec/unit/header_spec.rb
|
216
|
-
- spec/unit/indentation/indent_spec.rb
|
217
|
-
- spec/unit/new_spec.rb
|
218
|
-
- spec/unit/operation/alignment/call_spec.rb
|
219
|
-
- spec/unit/operation/escape/call_spec.rb
|
220
|
-
- spec/unit/operation/filter/call_spec.rb
|
221
|
-
- spec/unit/operation/truncation/call_spec.rb
|
222
|
-
- spec/unit/operation/wrapped/call_spec.rb
|
223
|
-
- spec/unit/operations/new_spec.rb
|
224
|
-
- spec/unit/options/access_spec.rb
|
225
|
-
- spec/unit/options_spec.rb
|
226
|
-
- spec/unit/orientation_spec.rb
|
227
|
-
- spec/unit/padding_spec.rb
|
228
|
-
- spec/unit/properties_spec.rb
|
229
|
-
- spec/unit/render_repeat_spec.rb
|
230
|
-
- spec/unit/render_spec.rb
|
231
|
-
- spec/unit/render_with_spec.rb
|
232
|
-
- spec/unit/renderer/ascii/coloring_spec.rb
|
233
|
-
- spec/unit/renderer/ascii/indentation_spec.rb
|
234
|
-
- spec/unit/renderer/ascii/multiline_spec.rb
|
235
|
-
- spec/unit/renderer/ascii/padding_spec.rb
|
236
|
-
- spec/unit/renderer/ascii/render_spec.rb
|
237
|
-
- spec/unit/renderer/ascii/resizing_spec.rb
|
238
|
-
- spec/unit/renderer/ascii/separator_spec.rb
|
239
|
-
- spec/unit/renderer/basic/alignment_spec.rb
|
240
|
-
- spec/unit/renderer/basic/coloring_spec.rb
|
241
|
-
- spec/unit/renderer/basic/extract_column_widths_spec.rb
|
242
|
-
- spec/unit/renderer/basic/filter_spec.rb
|
243
|
-
- spec/unit/renderer/basic/indentation_spec.rb
|
244
|
-
- spec/unit/renderer/basic/multiline_spec.rb
|
245
|
-
- spec/unit/renderer/basic/new_spec.rb
|
246
|
-
- spec/unit/renderer/basic/options_spec.rb
|
247
|
-
- spec/unit/renderer/basic/padding_spec.rb
|
248
|
-
- spec/unit/renderer/basic/render_spec.rb
|
249
|
-
- spec/unit/renderer/basic/resizing_spec.rb
|
250
|
-
- spec/unit/renderer/basic/separator_spec.rb
|
251
|
-
- spec/unit/renderer/basic/single_row_separator_spec.rb
|
252
|
-
- spec/unit/renderer/basic/truncation_spec.rb
|
253
|
-
- spec/unit/renderer/basic/wrapping_spec.rb
|
254
|
-
- spec/unit/renderer/border_spec.rb
|
255
|
-
- spec/unit/renderer/render_spec.rb
|
256
|
-
- spec/unit/renderer/select_spec.rb
|
257
|
-
- spec/unit/renderer/unicode/coloring_spec.rb
|
258
|
-
- spec/unit/renderer/unicode/indentation_spec.rb
|
259
|
-
- spec/unit/renderer/unicode/padding_spec.rb
|
260
|
-
- spec/unit/renderer/unicode/render_spec.rb
|
261
|
-
- spec/unit/renderer/unicode/separator_spec.rb
|
262
|
-
- spec/unit/renderer_spec.rb
|
263
|
-
- spec/unit/rotate_spec.rb
|
264
|
-
- spec/unit/row/access_spec.rb
|
265
|
-
- spec/unit/row/call_spec.rb
|
266
|
-
- spec/unit/row/data_spec.rb
|
267
|
-
- spec/unit/row/each_spec.rb
|
268
|
-
- spec/unit/row/equality_spec.rb
|
269
|
-
- spec/unit/row/height_spec.rb
|
270
|
-
- spec/unit/row/new_spec.rb
|
271
|
-
- spec/unit/row/to_ary_spec.rb
|
272
|
-
- spec/unit/to_s_spec.rb
|
273
|
-
- spec/unit/transformation/extract_tuples_spec.rb
|
274
|
-
- spec/unit/utf_spec.rb
|
275
|
-
- spec/unit/validatable/validate_options_spec.rb
|
276
|
-
- spec/unit/validatable_spec.rb
|
277
|
-
- tasks/console.rake
|
278
|
-
- tasks/coverage.rake
|
279
|
-
- tasks/spec.rake
|
280
|
-
- tty-table.gemspec
|
281
|
-
homepage: https://piotrmurach.github.io/tty/
|
132
|
+
homepage: https://ttytoolkit.org
|
282
133
|
licenses:
|
283
134
|
- MIT
|
284
135
|
metadata:
|
@@ -286,7 +137,7 @@ metadata:
|
|
286
137
|
bug_tracker_uri: https://github.com/piotrmurach/tty-table/issues
|
287
138
|
changelog_uri: https://github.com/piotrmurach/tty-table/blob/master/CHANGELOG.md
|
288
139
|
documentation_uri: https://www.rubydoc.info/gems/tty-table
|
289
|
-
homepage_uri: https://
|
140
|
+
homepage_uri: https://ttytoolkit.org
|
290
141
|
source_code_uri: https://github.com/piotrmurach/tty-table
|
291
142
|
post_install_message:
|
292
143
|
rdoc_options: []
|
@@ -303,108 +154,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
303
154
|
- !ruby/object:Gem::Version
|
304
155
|
version: '0'
|
305
156
|
requirements: []
|
306
|
-
rubygems_version: 3.
|
157
|
+
rubygems_version: 3.1.2
|
307
158
|
signing_key:
|
308
159
|
specification_version: 4
|
309
160
|
summary: A flexible and intuitive table generator
|
310
|
-
test_files:
|
311
|
-
- spec/spec_helper.rb
|
312
|
-
- spec/unit/access_spec.rb
|
313
|
-
- spec/unit/add_row_spec.rb
|
314
|
-
- spec/unit/alignment_set/each_spec.rb
|
315
|
-
- spec/unit/alignment_set/new_spec.rb
|
316
|
-
- spec/unit/alignment_set/to_ary_spec.rb
|
317
|
-
- spec/unit/alignment_spec.rb
|
318
|
-
- spec/unit/border/ascii/rendering_spec.rb
|
319
|
-
- spec/unit/border/new_spec.rb
|
320
|
-
- spec/unit/border/null/rendering_spec.rb
|
321
|
-
- spec/unit/border/options/from_spec.rb
|
322
|
-
- spec/unit/border/options/new_spec.rb
|
323
|
-
- spec/unit/border/unicode/rendering_spec.rb
|
324
|
-
- spec/unit/border_options/new_spec.rb
|
325
|
-
- spec/unit/border_options/update_spec.rb
|
326
|
-
- spec/unit/column_constraint/enforce_spec.rb
|
327
|
-
- spec/unit/column_constraint/widths_spec.rb
|
328
|
-
- spec/unit/columns/extract_widths_spec.rb
|
329
|
-
- spec/unit/columns/total_width_spec.rb
|
330
|
-
- spec/unit/columns/widths_from_spec.rb
|
331
|
-
- spec/unit/data_spec.rb
|
332
|
-
- spec/unit/each_spec.rb
|
333
|
-
- spec/unit/each_with_index_spec.rb
|
334
|
-
- spec/unit/empty_spec.rb
|
335
|
-
- spec/unit/eql_spec.rb
|
336
|
-
- spec/unit/field/equality_spec.rb
|
337
|
-
- spec/unit/field/length_spec.rb
|
338
|
-
- spec/unit/field/lines_spec.rb
|
339
|
-
- spec/unit/field/new_spec.rb
|
340
|
-
- spec/unit/field/width_spec.rb
|
341
|
-
- spec/unit/filter_spec.rb
|
342
|
-
- spec/unit/header/call_spec.rb
|
343
|
-
- spec/unit/header/color_spec.rb
|
344
|
-
- spec/unit/header/equality_spec.rb
|
345
|
-
- spec/unit/header/height_spec.rb
|
346
|
-
- spec/unit/header/new_spec.rb
|
347
|
-
- spec/unit/header/set_spec.rb
|
348
|
-
- spec/unit/header/to_ary_spec.rb
|
349
|
-
- spec/unit/header_spec.rb
|
350
|
-
- spec/unit/indentation/indent_spec.rb
|
351
|
-
- spec/unit/new_spec.rb
|
352
|
-
- spec/unit/operation/alignment/call_spec.rb
|
353
|
-
- spec/unit/operation/escape/call_spec.rb
|
354
|
-
- spec/unit/operation/filter/call_spec.rb
|
355
|
-
- spec/unit/operation/truncation/call_spec.rb
|
356
|
-
- spec/unit/operation/wrapped/call_spec.rb
|
357
|
-
- spec/unit/operations/new_spec.rb
|
358
|
-
- spec/unit/options/access_spec.rb
|
359
|
-
- spec/unit/options_spec.rb
|
360
|
-
- spec/unit/orientation_spec.rb
|
361
|
-
- spec/unit/padding_spec.rb
|
362
|
-
- spec/unit/properties_spec.rb
|
363
|
-
- spec/unit/render_repeat_spec.rb
|
364
|
-
- spec/unit/render_spec.rb
|
365
|
-
- spec/unit/render_with_spec.rb
|
366
|
-
- spec/unit/renderer/ascii/coloring_spec.rb
|
367
|
-
- spec/unit/renderer/ascii/indentation_spec.rb
|
368
|
-
- spec/unit/renderer/ascii/multiline_spec.rb
|
369
|
-
- spec/unit/renderer/ascii/padding_spec.rb
|
370
|
-
- spec/unit/renderer/ascii/render_spec.rb
|
371
|
-
- spec/unit/renderer/ascii/resizing_spec.rb
|
372
|
-
- spec/unit/renderer/ascii/separator_spec.rb
|
373
|
-
- spec/unit/renderer/basic/alignment_spec.rb
|
374
|
-
- spec/unit/renderer/basic/coloring_spec.rb
|
375
|
-
- spec/unit/renderer/basic/extract_column_widths_spec.rb
|
376
|
-
- spec/unit/renderer/basic/filter_spec.rb
|
377
|
-
- spec/unit/renderer/basic/indentation_spec.rb
|
378
|
-
- spec/unit/renderer/basic/multiline_spec.rb
|
379
|
-
- spec/unit/renderer/basic/new_spec.rb
|
380
|
-
- spec/unit/renderer/basic/options_spec.rb
|
381
|
-
- spec/unit/renderer/basic/padding_spec.rb
|
382
|
-
- spec/unit/renderer/basic/render_spec.rb
|
383
|
-
- spec/unit/renderer/basic/resizing_spec.rb
|
384
|
-
- spec/unit/renderer/basic/separator_spec.rb
|
385
|
-
- spec/unit/renderer/basic/single_row_separator_spec.rb
|
386
|
-
- spec/unit/renderer/basic/truncation_spec.rb
|
387
|
-
- spec/unit/renderer/basic/wrapping_spec.rb
|
388
|
-
- spec/unit/renderer/border_spec.rb
|
389
|
-
- spec/unit/renderer/render_spec.rb
|
390
|
-
- spec/unit/renderer/select_spec.rb
|
391
|
-
- spec/unit/renderer/unicode/coloring_spec.rb
|
392
|
-
- spec/unit/renderer/unicode/indentation_spec.rb
|
393
|
-
- spec/unit/renderer/unicode/padding_spec.rb
|
394
|
-
- spec/unit/renderer/unicode/render_spec.rb
|
395
|
-
- spec/unit/renderer/unicode/separator_spec.rb
|
396
|
-
- spec/unit/renderer_spec.rb
|
397
|
-
- spec/unit/rotate_spec.rb
|
398
|
-
- spec/unit/row/access_spec.rb
|
399
|
-
- spec/unit/row/call_spec.rb
|
400
|
-
- spec/unit/row/data_spec.rb
|
401
|
-
- spec/unit/row/each_spec.rb
|
402
|
-
- spec/unit/row/equality_spec.rb
|
403
|
-
- spec/unit/row/height_spec.rb
|
404
|
-
- spec/unit/row/new_spec.rb
|
405
|
-
- spec/unit/row/to_ary_spec.rb
|
406
|
-
- spec/unit/to_s_spec.rb
|
407
|
-
- spec/unit/transformation/extract_tuples_spec.rb
|
408
|
-
- spec/unit/utf_spec.rb
|
409
|
-
- spec/unit/validatable/validate_options_spec.rb
|
410
|
-
- spec/unit/validatable_spec.rb
|
161
|
+
test_files: []
|