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.
Files changed (144) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +13 -0
  3. data/LICENSE.txt +1 -1
  4. data/README.md +104 -98
  5. data/lib/tty-table.rb +1 -1
  6. data/lib/tty/table.rb +70 -34
  7. data/lib/tty/table/alignment_set.rb +1 -3
  8. data/lib/tty/table/border.rb +50 -57
  9. data/lib/tty/table/border/ascii.rb +16 -16
  10. data/lib/tty/table/border/null.rb +19 -22
  11. data/lib/tty/table/border/row_line.rb +3 -2
  12. data/lib/tty/table/border/unicode.rb +16 -16
  13. data/lib/tty/table/border_dsl.rb +24 -22
  14. data/lib/tty/table/border_options.rb +32 -27
  15. data/lib/tty/table/column_constraint.rb +12 -9
  16. data/lib/tty/table/columns.rb +6 -6
  17. data/lib/tty/table/field.rb +46 -28
  18. data/lib/tty/table/header.rb +5 -5
  19. data/lib/tty/table/indentation.rb +7 -4
  20. data/lib/tty/table/operation/alignment.rb +1 -1
  21. data/lib/tty/table/operation/escape.rb +1 -2
  22. data/lib/tty/table/operation/padding.rb +1 -1
  23. data/lib/tty/table/operation/truncation.rb +1 -1
  24. data/lib/tty/table/operation/wrapped.rb +1 -1
  25. data/lib/tty/table/options.rb +1 -1
  26. data/lib/tty/table/orientation.rb +4 -4
  27. data/lib/tty/table/renderer.rb +8 -8
  28. data/lib/tty/table/renderer/ascii.rb +2 -2
  29. data/lib/tty/table/renderer/basic.rb +37 -40
  30. data/lib/tty/table/renderer/unicode.rb +1 -1
  31. data/lib/tty/table/row.rb +7 -7
  32. data/lib/tty/table/validatable.rb +23 -7
  33. data/lib/tty/table/version.rb +1 -1
  34. metadata +23 -272
  35. data/Rakefile +0 -10
  36. data/examples/alignment.rb +0 -10
  37. data/examples/basic.rb +0 -6
  38. data/examples/orientation.rb +0 -13
  39. data/examples/padding.rb +0 -15
  40. data/examples/resize.rb +0 -15
  41. data/spec/spec_helper.rb +0 -50
  42. data/spec/unit/access_spec.rb +0 -84
  43. data/spec/unit/add_row_spec.rb +0 -26
  44. data/spec/unit/alignment_set/each_spec.rb +0 -15
  45. data/spec/unit/alignment_set/new_spec.rb +0 -25
  46. data/spec/unit/alignment_set/to_ary_spec.rb +0 -12
  47. data/spec/unit/alignment_spec.rb +0 -69
  48. data/spec/unit/border/ascii/rendering_spec.rb +0 -88
  49. data/spec/unit/border/new_spec.rb +0 -25
  50. data/spec/unit/border/null/rendering_spec.rb +0 -128
  51. data/spec/unit/border/options/from_spec.rb +0 -36
  52. data/spec/unit/border/options/new_spec.rb +0 -12
  53. data/spec/unit/border/unicode/rendering_spec.rb +0 -61
  54. data/spec/unit/border_options/new_spec.rb +0 -18
  55. data/spec/unit/border_options/update_spec.rb +0 -16
  56. data/spec/unit/column_constraint/enforce_spec.rb +0 -68
  57. data/spec/unit/column_constraint/widths_spec.rb +0 -33
  58. data/spec/unit/columns/extract_widths_spec.rb +0 -41
  59. data/spec/unit/columns/total_width_spec.rb +0 -11
  60. data/spec/unit/columns/widths_from_spec.rb +0 -49
  61. data/spec/unit/data_spec.rb +0 -10
  62. data/spec/unit/each_spec.rb +0 -24
  63. data/spec/unit/each_with_index_spec.rb +0 -49
  64. data/spec/unit/empty_spec.rb +0 -21
  65. data/spec/unit/eql_spec.rb +0 -32
  66. data/spec/unit/field/equality_spec.rb +0 -49
  67. data/spec/unit/field/length_spec.rb +0 -33
  68. data/spec/unit/field/lines_spec.rb +0 -19
  69. data/spec/unit/field/new_spec.rb +0 -27
  70. data/spec/unit/field/width_spec.rb +0 -21
  71. data/spec/unit/filter_spec.rb +0 -20
  72. data/spec/unit/header/call_spec.rb +0 -28
  73. data/spec/unit/header/color_spec.rb +0 -17
  74. data/spec/unit/header/equality_spec.rb +0 -49
  75. data/spec/unit/header/height_spec.rb +0 -25
  76. data/spec/unit/header/new_spec.rb +0 -13
  77. data/spec/unit/header/set_spec.rb +0 -18
  78. data/spec/unit/header/to_ary_spec.rb +0 -12
  79. data/spec/unit/header_spec.rb +0 -11
  80. data/spec/unit/indentation/indent_spec.rb +0 -15
  81. data/spec/unit/new_spec.rb +0 -71
  82. data/spec/unit/operation/alignment/call_spec.rb +0 -37
  83. data/spec/unit/operation/escape/call_spec.rb +0 -13
  84. data/spec/unit/operation/filter/call_spec.rb +0 -14
  85. data/spec/unit/operation/truncation/call_spec.rb +0 -28
  86. data/spec/unit/operation/wrapped/call_spec.rb +0 -38
  87. data/spec/unit/operations/new_spec.rb +0 -28
  88. data/spec/unit/options/access_spec.rb +0 -12
  89. data/spec/unit/options_spec.rb +0 -23
  90. data/spec/unit/orientation_spec.rb +0 -143
  91. data/spec/unit/padding_spec.rb +0 -115
  92. data/spec/unit/properties_spec.rb +0 -23
  93. data/spec/unit/render_repeat_spec.rb +0 -39
  94. data/spec/unit/render_spec.rb +0 -61
  95. data/spec/unit/render_with_spec.rb +0 -104
  96. data/spec/unit/renderer/ascii/coloring_spec.rb +0 -83
  97. data/spec/unit/renderer/ascii/indentation_spec.rb +0 -39
  98. data/spec/unit/renderer/ascii/multiline_spec.rb +0 -99
  99. data/spec/unit/renderer/ascii/padding_spec.rb +0 -115
  100. data/spec/unit/renderer/ascii/render_spec.rb +0 -66
  101. data/spec/unit/renderer/ascii/resizing_spec.rb +0 -112
  102. data/spec/unit/renderer/ascii/separator_spec.rb +0 -38
  103. data/spec/unit/renderer/basic/alignment_spec.rb +0 -86
  104. data/spec/unit/renderer/basic/coloring_spec.rb +0 -59
  105. data/spec/unit/renderer/basic/extract_column_widths_spec.rb +0 -26
  106. data/spec/unit/renderer/basic/filter_spec.rb +0 -51
  107. data/spec/unit/renderer/basic/indentation_spec.rb +0 -46
  108. data/spec/unit/renderer/basic/multiline_spec.rb +0 -72
  109. data/spec/unit/renderer/basic/new_spec.rb +0 -24
  110. data/spec/unit/renderer/basic/options_spec.rb +0 -50
  111. data/spec/unit/renderer/basic/padding_spec.rb +0 -74
  112. data/spec/unit/renderer/basic/render_spec.rb +0 -55
  113. data/spec/unit/renderer/basic/resizing_spec.rb +0 -94
  114. data/spec/unit/renderer/basic/separator_spec.rb +0 -41
  115. data/spec/unit/renderer/basic/single_row_separator_spec.rb +0 -80
  116. data/spec/unit/renderer/basic/truncation_spec.rb +0 -33
  117. data/spec/unit/renderer/basic/wrapping_spec.rb +0 -38
  118. data/spec/unit/renderer/border_spec.rb +0 -102
  119. data/spec/unit/renderer/render_spec.rb +0 -34
  120. data/spec/unit/renderer/select_spec.rb +0 -20
  121. data/spec/unit/renderer/unicode/coloring_spec.rb +0 -68
  122. data/spec/unit/renderer/unicode/indentation_spec.rb +0 -39
  123. data/spec/unit/renderer/unicode/padding_spec.rb +0 -59
  124. data/spec/unit/renderer/unicode/render_spec.rb +0 -66
  125. data/spec/unit/renderer/unicode/separator_spec.rb +0 -36
  126. data/spec/unit/renderer_spec.rb +0 -17
  127. data/spec/unit/rotate_spec.rb +0 -84
  128. data/spec/unit/row/access_spec.rb +0 -23
  129. data/spec/unit/row/call_spec.rb +0 -43
  130. data/spec/unit/row/data_spec.rb +0 -24
  131. data/spec/unit/row/each_spec.rb +0 -29
  132. data/spec/unit/row/equality_spec.rb +0 -71
  133. data/spec/unit/row/height_spec.rb +0 -25
  134. data/spec/unit/row/new_spec.rb +0 -39
  135. data/spec/unit/row/to_ary_spec.rb +0 -12
  136. data/spec/unit/to_s_spec.rb +0 -56
  137. data/spec/unit/transformation/extract_tuples_spec.rb +0 -33
  138. data/spec/unit/utf_spec.rb +0 -31
  139. data/spec/unit/validatable/validate_options_spec.rb +0 -31
  140. data/spec/unit/validatable_spec.rb +0 -30
  141. data/tasks/console.rake +0 -11
  142. data/tasks/coverage.rake +0 -11
  143. data/tasks/spec.rake +0 -29
  144. data/tty-table.gemspec +0 -41
@@ -1,9 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'forwardable'
3
+ require "forwardable"
4
4
 
5
- require_relative 'error'
6
- require_relative 'field'
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
- fail UnknownAttributeError,
82
- "the header '#{header_name.value}' is unknown"
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 [#to_a, #to_s] line
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 = Array(line)[0]
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
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'strings'
3
+ require "strings"
4
4
 
5
5
  module TTY
6
6
  class Table
@@ -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
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'strings'
3
+ require "strings"
4
4
 
5
5
  module TTY
6
6
  class Table
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'strings'
3
+ require "strings"
4
4
 
5
5
  module TTY
6
6
  class Table
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'strings'
3
+ require "strings"
4
4
 
5
5
  module TTY
6
6
  class Table
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'delegate'
3
+ require "delegate"
4
4
 
5
5
  module TTY
6
6
  class Table
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative 'orientation/horizontal'
4
- require_relative 'orientation/vertical'
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
- fail InvalidOrientationError,
37
- 'orientation must be one of :horizontal, :vertical'
36
+ raise InvalidOrientationError,
37
+ "orientation must be one of :horizontal, :vertical"
38
38
  end
39
39
  end
40
40
 
@@ -1,9 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative 'error'
4
- require_relative 'renderer/basic'
5
- require_relative 'renderer/ascii'
6
- require_relative 'renderer/unicode'
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
- fail TypeError,
52
- "#{border_class} should inherit from TTY::Table::Border"
51
+ raise TypeError,
52
+ "#{border_class} should inherit from TTY::Table::Border"
53
53
  end
54
54
  unless border_class.characters
55
- fail NoImplementationError,
56
- "#{border_class} should implement def_border"
55
+ raise NoImplementationError,
56
+ "#{border_class} should implement def_border"
57
57
  end
58
58
  end
59
59
  module_function :assert_border_class
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative '../border/ascii'
4
- require_relative '../renderer/basic'
3
+ require_relative "../border/ascii"
4
+ require_relative "../renderer/basic"
5
5
 
6
6
  module TTY
7
7
  class Table
@@ -1,24 +1,23 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'tty-screen'
4
- require 'strings'
5
-
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 '../columns'
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'
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 = TTY::Table::BorderOptions.from(options.delete(: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 = TTY::Table::AlignmentSet.new(options[:alignments] || alignment)
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(options=(not_set=true), &block)
147
- @border = TTY::Table::BorderOptions.new unless @border
148
- if block_given?
149
- border_dsl = TTY::Table::BorderDSL.new(&block)
150
- @border = border_dsl.options
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
- alias_method :border=, :border
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
- separator = data_border.separator if !border.separator || border.separator?(0)
275
- header = [top_line, data_border.row_line(row), separator]
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 = if border.separator?(index) && is_not_last_row
311
- [row_line, separator]
312
- else
313
- row_line
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
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative '../border/unicode'
3
+ require_relative "../border/unicode"
4
4
 
5
5
  module TTY
6
6
  class Table
@@ -1,9 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'forwardable'
3
+ require "forwardable"
4
4
 
5
- require_relative 'error'
6
- require_relative 'field'
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['a'] # => 1
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['a'] # => 1
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
- fail UnknownAttributeError, "the attribute #{name} is unkown"
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], ['a','b','c']
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 'error'
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
- fail TTY::Table::DimensionMismatchError,
26
- "row size differs (#{row.size} should be #{size})"
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
- fail ArgumentRequired,
40
- "Expected TTY::Table instance, got #{value.inspect}"
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
- fail InvalidArgument, ':header must be a non-empty array'
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
- fail InvalidArgument, ':rows must be a non-empty array or hash'
77
+ raise InvalidArgument, ":rows must be a non-empty array or hash"
62
78
  end
63
79
  end
64
80
  end # Validatable
@@ -2,6 +2,6 @@
2
2
 
3
3
  module TTY
4
4
  class Table
5
- VERSION = "0.11.0"
5
+ VERSION = "0.12.0"
6
6
  end # Table
7
7
  end # TTY
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.11.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: 2019-08-01 00:00:00.000000000 Z
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.7.2
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.7.2
26
+ version: '0.8'
55
27
  - !ruby/object:Gem::Dependency
56
- name: tty-screen
28
+ name: strings
57
29
  requirement: !ruby/object:Gem::Requirement
58
30
  requirements:
59
31
  - - "~>"
60
32
  - !ruby/object:Gem::Version
61
- version: '0.7'
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: '0.7'
40
+ version: 0.2.0
69
41
  - !ruby/object:Gem::Dependency
70
- name: strings
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.1.5
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.1.5
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.1'
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.1'
82
+ version: '3.0'
125
83
  description: A flexible and intuitive table generator
126
84
  email:
127
- - me@piotrmurach.com
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
- - spec/spec_helper.rb
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://piotrmurach.github.io/tty/
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.0.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: []