tty 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- data/.rspec +2 -1
- data/.travis.yml +3 -6
- data/README.md +232 -134
- data/lib/tty/plugins/plugin.rb +56 -0
- data/lib/tty/plugins.rb +75 -0
- data/lib/tty/shell/suggestion.rb +102 -0
- data/lib/tty/shell.rb +41 -14
- data/lib/tty/system/editor.rb +111 -0
- data/lib/tty/system/which.rb +13 -1
- data/lib/tty/system.rb +44 -28
- data/lib/tty/table/border/null.rb +0 -9
- data/lib/tty/table/border/row_line.rb +21 -0
- data/lib/tty/table/border.rb +63 -32
- data/lib/tty/table/border_dsl.rb +1 -1
- data/lib/tty/table/column_set.rb +16 -17
- data/lib/tty/table/field.rb +27 -7
- data/lib/tty/table/header.rb +18 -9
- data/lib/tty/table/operation/alignment_set.rb +20 -25
- data/lib/tty/table/operation/escape.rb +30 -0
- data/lib/tty/table/operation/filter.rb +36 -0
- data/lib/tty/table/operation/truncation.rb +22 -11
- data/lib/tty/table/operation/wrapped.rb +21 -10
- data/lib/tty/table/operations.rb +10 -8
- data/lib/tty/table/orientation/horizontal.rb +1 -1
- data/lib/tty/table/renderer/ascii.rb +3 -3
- data/lib/tty/table/renderer/basic.rb +135 -65
- data/lib/tty/table/renderer/color.rb +1 -4
- data/lib/tty/table/renderer/unicode.rb +3 -3
- data/lib/tty/table/renderer.rb +48 -61
- data/lib/tty/table/row.rb +30 -3
- data/lib/tty/table/transformation.rb +38 -0
- data/lib/tty/table/validatable.rb +7 -5
- data/lib/tty/table.rb +78 -99
- data/lib/tty/terminal/color.rb +2 -2
- data/lib/tty/terminal/echo.rb +1 -1
- data/lib/tty/terminal/pager/basic.rb +52 -0
- data/lib/tty/terminal/pager/system.rb +39 -0
- data/lib/tty/terminal/pager.rb +95 -0
- data/lib/tty/terminal.rb +30 -1
- data/lib/tty/version.rb +1 -1
- data/lib/tty.rb +41 -1
- data/spec/spec_helper.rb +20 -0
- data/spec/tty/plugins/find_spec.rb +28 -0
- data/spec/tty/plugins/load_spec.rb +20 -0
- data/spec/tty/plugins/plugin/load_spec.rb +30 -0
- data/spec/tty/plugins/plugin/new_spec.rb +18 -0
- data/spec/tty/shell/suggest_spec.rb +50 -0
- data/spec/tty/support/conversion_spec.rb +3 -3
- data/spec/tty/support/delegatable_spec.rb +1 -1
- data/spec/tty/support/equatable_spec.rb +6 -9
- data/spec/tty/system/editor/available_spec.rb +40 -0
- data/spec/tty/system/editor/build_spec.rb +40 -0
- data/spec/tty/system/editor/command_spec.rb +16 -0
- data/spec/tty/system/editor/executables_spec.rb +13 -0
- data/spec/tty/system/editor/invoke_spec.rb +38 -0
- data/spec/tty/system/editor/open_spec.rb +27 -0
- data/spec/tty/system/platform_spec.rb +4 -6
- data/spec/tty/system/which/which_spec.rb +48 -0
- data/spec/tty/system/which_spec.rb +8 -34
- data/spec/tty/table/border/ascii/rendering_spec.rb +19 -5
- data/spec/tty/table/border/new_spec.rb +1 -1
- data/spec/tty/table/border/null/rendering_spec.rb +24 -8
- data/spec/tty/table/border/unicode/rendering_spec.rb +19 -5
- data/spec/tty/table/column_set/extract_widths_spec.rb +4 -15
- data/spec/tty/table/column_set/total_width_spec.rb +15 -0
- data/spec/tty/table/data_spec.rb +14 -0
- data/spec/tty/table/each_spec.rb +17 -4
- data/spec/tty/table/each_with_index_spec.rb +34 -6
- data/spec/tty/table/field/length_spec.rb +21 -0
- data/spec/tty/table/field/lines_spec.rb +21 -0
- data/spec/tty/table/filter_spec.rb +23 -0
- data/spec/tty/table/header/call_spec.rb +1 -1
- data/spec/tty/table/header/height_spec.rb +27 -0
- data/spec/tty/table/initialize_spec.rb +6 -6
- data/spec/tty/table/operation/alignment_set/call_spec.rb +39 -0
- data/spec/tty/table/operation/escape/call_spec.rb +16 -0
- data/spec/tty/table/operation/filter/call_spec.rb +17 -0
- data/spec/tty/table/operation/truncation/call_spec.rb +15 -10
- data/spec/tty/table/operation/truncation/truncate_spec.rb +1 -1
- data/spec/tty/table/operation/wrapped/call_spec.rb +15 -10
- data/spec/tty/table/operation/wrapped/wrap_spec.rb +1 -1
- data/spec/tty/table/operations/new_spec.rb +4 -4
- data/spec/tty/table/options_spec.rb +0 -28
- data/spec/tty/table/orientation_spec.rb +5 -6
- data/spec/tty/table/properties_spec.rb +1 -4
- data/spec/tty/table/render_spec.rb +57 -0
- data/spec/tty/table/{renders_with_spec.rb → render_with_spec.rb} +29 -10
- data/spec/tty/table/renderer/ascii/render_spec.rb +68 -0
- data/spec/tty/table/renderer/ascii/separator_spec.rb +28 -0
- data/spec/tty/table/renderer/basic/alignment_spec.rb +18 -16
- data/spec/tty/table/renderer/basic/extract_column_widths_spec.rb +17 -12
- data/spec/tty/table/renderer/basic/filter_spec.rb +53 -0
- data/spec/tty/table/renderer/basic/multiline_content_spec.rb +135 -0
- data/spec/tty/table/renderer/basic/new_spec.rb +13 -2
- data/spec/tty/table/renderer/basic/options_spec.rb +48 -0
- data/spec/tty/table/renderer/basic/render_spec.rb +19 -121
- data/spec/tty/table/renderer/basic/separator_spec.rb +14 -48
- data/spec/tty/table/renderer/basic/truncation_spec.rb +35 -0
- data/spec/tty/table/renderer/basic/wrapping_spec.rb +40 -0
- data/spec/tty/table/{border_spec.rb → renderer/border_spec.rb} +17 -20
- data/spec/tty/table/renderer/select_spec.rb +22 -0
- data/spec/tty/table/{border → renderer}/style_spec.rb +13 -14
- data/spec/tty/table/renderer/unicode/render_spec.rb +68 -0
- data/spec/tty/table/renderer/unicode/separator_spec.rb +26 -0
- data/spec/tty/table/rotate_spec.rb +2 -3
- data/spec/tty/table/row/call_spec.rb +1 -1
- data/spec/tty/table/row/each_spec.rb +31 -0
- data/spec/tty/table/row/height_spec.rb +27 -0
- data/spec/tty/table/to_s_spec.rb +3 -3
- data/spec/tty/table/transformation/extract_tuples_spec.rb +35 -0
- data/spec/tty/table/validatable/validate_options_spec.rb +1 -2
- data/spec/tty/terminal/home_spec.rb +3 -3
- data/spec/tty/terminal/page_spec.rb +13 -0
- data/spec/tty/terminal/pager/available_spec.rb +40 -0
- data/spec/tty/terminal/pager/basic/page_spec.rb +54 -0
- data/spec/tty/terminal/pager/command_spec.rb +16 -0
- data/spec/tty/terminal/pager/executables_spec.rb +13 -0
- data/spec/tty/terminal/pager/page_spec.rb +47 -0
- data/spec/tty/terminal/pager/system/page_spec.rb +29 -0
- data/spec/tty/text/distance/distance_spec.rb +12 -0
- data/tty.gemspec +7 -3
- metadata +160 -27
- data/spec/tty/table/operation/alignment_set/align_rows_spec.rb +0 -53
- data/spec/tty/table/renderer/pick_renderer_spec.rb +0 -25
- data/spec/tty/table/renderer_spec.rb +0 -49
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tty
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.10
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,33 +9,44 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-07-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
16
|
-
requirement: &
|
16
|
+
requirement: &2152169820 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
|
-
- -
|
19
|
+
- - ~>
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: '
|
21
|
+
version: '2.14'
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *2152169820
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rake
|
27
|
-
requirement: &
|
27
|
+
requirement: &2152168840 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
|
-
- -
|
30
|
+
- - ~>
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
32
|
+
version: '10.1'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *2152168840
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: yard
|
38
|
-
requirement: &
|
38
|
+
requirement: &2152021340 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ~>
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '0.8'
|
44
|
+
type: :development
|
45
|
+
prerelease: false
|
46
|
+
version_requirements: *2152021340
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: benchmark_suite
|
49
|
+
requirement: &2152020300 !ruby/object:Gem::Requirement
|
39
50
|
none: false
|
40
51
|
requirements:
|
41
52
|
- - ! '>='
|
@@ -43,10 +54,10 @@ dependencies:
|
|
43
54
|
version: '0'
|
44
55
|
type: :development
|
45
56
|
prerelease: false
|
46
|
-
version_requirements: *
|
57
|
+
version_requirements: *2152020300
|
47
58
|
- !ruby/object:Gem::Dependency
|
48
|
-
name:
|
49
|
-
requirement: &
|
59
|
+
name: bundler
|
60
|
+
requirement: &2152018560 !ruby/object:Gem::Requirement
|
50
61
|
none: false
|
51
62
|
requirements:
|
52
63
|
- - ! '>='
|
@@ -54,7 +65,40 @@ dependencies:
|
|
54
65
|
version: '0'
|
55
66
|
type: :development
|
56
67
|
prerelease: false
|
57
|
-
version_requirements: *
|
68
|
+
version_requirements: *2152018560
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: yard
|
71
|
+
requirement: &2152017320 !ruby/object:Gem::Requirement
|
72
|
+
none: false
|
73
|
+
requirements:
|
74
|
+
- - ~>
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '0.8'
|
77
|
+
type: :development
|
78
|
+
prerelease: false
|
79
|
+
version_requirements: *2152017320
|
80
|
+
- !ruby/object:Gem::Dependency
|
81
|
+
name: simplecov
|
82
|
+
requirement: &2152016560 !ruby/object:Gem::Requirement
|
83
|
+
none: false
|
84
|
+
requirements:
|
85
|
+
- - ~>
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: 0.7.1
|
88
|
+
type: :development
|
89
|
+
prerelease: false
|
90
|
+
version_requirements: *2152016560
|
91
|
+
- !ruby/object:Gem::Dependency
|
92
|
+
name: coveralls
|
93
|
+
requirement: &2152015560 !ruby/object:Gem::Requirement
|
94
|
+
none: false
|
95
|
+
requirements:
|
96
|
+
- - ~>
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
version: 0.6.7
|
99
|
+
type: :development
|
100
|
+
prerelease: false
|
101
|
+
version_requirements: *2152015560
|
58
102
|
description: Toolbox for developing CLI clients
|
59
103
|
email:
|
60
104
|
- ''
|
@@ -80,6 +124,8 @@ files:
|
|
80
124
|
- lib/tty/coercer/integer.rb
|
81
125
|
- lib/tty/coercer/range.rb
|
82
126
|
- lib/tty/logger.rb
|
127
|
+
- lib/tty/plugins.rb
|
128
|
+
- lib/tty/plugins/plugin.rb
|
83
129
|
- lib/tty/shell.rb
|
84
130
|
- lib/tty/shell/question.rb
|
85
131
|
- lib/tty/shell/question/modifier.rb
|
@@ -88,6 +134,7 @@ files:
|
|
88
134
|
- lib/tty/shell/response.rb
|
89
135
|
- lib/tty/shell/response_delegation.rb
|
90
136
|
- lib/tty/shell/statement.rb
|
137
|
+
- lib/tty/shell/suggestion.rb
|
91
138
|
- lib/tty/support/coercion.rb
|
92
139
|
- lib/tty/support/conversion.rb
|
93
140
|
- lib/tty/support/delegatable.rb
|
@@ -95,11 +142,13 @@ files:
|
|
95
142
|
- lib/tty/support/unicode.rb
|
96
143
|
- lib/tty/support/utils.rb
|
97
144
|
- lib/tty/system.rb
|
145
|
+
- lib/tty/system/editor.rb
|
98
146
|
- lib/tty/system/which.rb
|
99
147
|
- lib/tty/table.rb
|
100
148
|
- lib/tty/table/border.rb
|
101
149
|
- lib/tty/table/border/ascii.rb
|
102
150
|
- lib/tty/table/border/null.rb
|
151
|
+
- lib/tty/table/border/row_line.rb
|
103
152
|
- lib/tty/table/border/unicode.rb
|
104
153
|
- lib/tty/table/border_dsl.rb
|
105
154
|
- lib/tty/table/border_options.rb
|
@@ -109,6 +158,8 @@ files:
|
|
109
158
|
- lib/tty/table/header.rb
|
110
159
|
- lib/tty/table/operation/alignment.rb
|
111
160
|
- lib/tty/table/operation/alignment_set.rb
|
161
|
+
- lib/tty/table/operation/escape.rb
|
162
|
+
- lib/tty/table/operation/filter.rb
|
112
163
|
- lib/tty/table/operation/truncation.rb
|
113
164
|
- lib/tty/table/operation/wrapped.rb
|
114
165
|
- lib/tty/table/operations.rb
|
@@ -121,11 +172,15 @@ files:
|
|
121
172
|
- lib/tty/table/renderer/color.rb
|
122
173
|
- lib/tty/table/renderer/unicode.rb
|
123
174
|
- lib/tty/table/row.rb
|
175
|
+
- lib/tty/table/transformation.rb
|
124
176
|
- lib/tty/table/validatable.rb
|
125
177
|
- lib/tty/terminal.rb
|
126
178
|
- lib/tty/terminal/color.rb
|
127
179
|
- lib/tty/terminal/echo.rb
|
128
180
|
- lib/tty/terminal/home.rb
|
181
|
+
- lib/tty/terminal/pager.rb
|
182
|
+
- lib/tty/terminal/pager/basic.rb
|
183
|
+
- lib/tty/terminal/pager/system.rb
|
129
184
|
- lib/tty/text.rb
|
130
185
|
- lib/tty/text/distance.rb
|
131
186
|
- lib/tty/text/truncation.rb
|
@@ -139,6 +194,10 @@ files:
|
|
139
194
|
- spec/tty/coercer/range/coerce_spec.rb
|
140
195
|
- spec/tty/logger/new_spec.rb
|
141
196
|
- spec/tty/logger/valid_level_spec.rb
|
197
|
+
- spec/tty/plugins/find_spec.rb
|
198
|
+
- spec/tty/plugins/load_spec.rb
|
199
|
+
- spec/tty/plugins/plugin/load_spec.rb
|
200
|
+
- spec/tty/plugins/plugin/new_spec.rb
|
142
201
|
- spec/tty/shell/ask_spec.rb
|
143
202
|
- spec/tty/shell/error_spec.rb
|
144
203
|
- spec/tty/shell/print_table_spec.rb
|
@@ -167,13 +226,21 @@ files:
|
|
167
226
|
- spec/tty/shell/response/read_string_spec.rb
|
168
227
|
- spec/tty/shell/say_spec.rb
|
169
228
|
- spec/tty/shell/statement/initialize_spec.rb
|
229
|
+
- spec/tty/shell/suggest_spec.rb
|
170
230
|
- spec/tty/shell/warn_spec.rb
|
171
231
|
- spec/tty/support/coercion_spec.rb
|
172
232
|
- spec/tty/support/conversion_spec.rb
|
173
233
|
- spec/tty/support/delegatable_spec.rb
|
174
234
|
- spec/tty/support/equatable_spec.rb
|
175
235
|
- spec/tty/support/fixtures/classes.rb
|
236
|
+
- spec/tty/system/editor/available_spec.rb
|
237
|
+
- spec/tty/system/editor/build_spec.rb
|
238
|
+
- spec/tty/system/editor/command_spec.rb
|
239
|
+
- spec/tty/system/editor/executables_spec.rb
|
240
|
+
- spec/tty/system/editor/invoke_spec.rb
|
241
|
+
- spec/tty/system/editor/open_spec.rb
|
176
242
|
- spec/tty/system/platform_spec.rb
|
243
|
+
- spec/tty/system/which/which_spec.rb
|
177
244
|
- spec/tty/system/which_spec.rb
|
178
245
|
- spec/tty/table/access_spec.rb
|
179
246
|
- spec/tty/table/add_row_spec.rb
|
@@ -182,18 +249,22 @@ files:
|
|
182
249
|
- spec/tty/table/border/null/rendering_spec.rb
|
183
250
|
- spec/tty/table/border/options/from_spec.rb
|
184
251
|
- spec/tty/table/border/options/new_spec.rb
|
185
|
-
- spec/tty/table/border/style_spec.rb
|
186
252
|
- spec/tty/table/border/unicode/rendering_spec.rb
|
187
|
-
- spec/tty/table/border_spec.rb
|
188
253
|
- spec/tty/table/column_set/extract_widths_spec.rb
|
254
|
+
- spec/tty/table/column_set/total_width_spec.rb
|
255
|
+
- spec/tty/table/data_spec.rb
|
189
256
|
- spec/tty/table/each_spec.rb
|
190
257
|
- spec/tty/table/each_with_index_spec.rb
|
191
258
|
- spec/tty/table/empty_spec.rb
|
192
259
|
- spec/tty/table/eql_spec.rb
|
193
260
|
- spec/tty/table/field/equality_spec.rb
|
261
|
+
- spec/tty/table/field/length_spec.rb
|
262
|
+
- spec/tty/table/field/lines_spec.rb
|
194
263
|
- spec/tty/table/field/new_spec.rb
|
195
264
|
- spec/tty/table/field/width_spec.rb
|
265
|
+
- spec/tty/table/filter_spec.rb
|
196
266
|
- spec/tty/table/header/call_spec.rb
|
267
|
+
- spec/tty/table/header/height_spec.rb
|
197
268
|
- spec/tty/table/header/new_spec.rb
|
198
269
|
- spec/tty/table/header/set_spec.rb
|
199
270
|
- spec/tty/table/header/to_ary_spec.rb
|
@@ -201,10 +272,12 @@ files:
|
|
201
272
|
- spec/tty/table/initialize_spec.rb
|
202
273
|
- spec/tty/table/operation/alignment/format_spec.rb
|
203
274
|
- spec/tty/table/operation/alignment/new_spec.rb
|
204
|
-
- spec/tty/table/operation/alignment_set/
|
275
|
+
- spec/tty/table/operation/alignment_set/call_spec.rb
|
205
276
|
- spec/tty/table/operation/alignment_set/each_spec.rb
|
206
277
|
- spec/tty/table/operation/alignment_set/new_spec.rb
|
207
278
|
- spec/tty/table/operation/alignment_set/to_ary_spec.rb
|
279
|
+
- spec/tty/table/operation/escape/call_spec.rb
|
280
|
+
- spec/tty/table/operation/filter/call_spec.rb
|
208
281
|
- spec/tty/table/operation/truncation/call_spec.rb
|
209
282
|
- spec/tty/table/operation/truncation/truncate_spec.rb
|
210
283
|
- spec/tty/table/operation/wrapped/call_spec.rb
|
@@ -213,23 +286,37 @@ files:
|
|
213
286
|
- spec/tty/table/options_spec.rb
|
214
287
|
- spec/tty/table/orientation_spec.rb
|
215
288
|
- spec/tty/table/properties_spec.rb
|
289
|
+
- spec/tty/table/render_spec.rb
|
290
|
+
- spec/tty/table/render_with_spec.rb
|
291
|
+
- spec/tty/table/renderer/ascii/render_spec.rb
|
292
|
+
- spec/tty/table/renderer/ascii/separator_spec.rb
|
216
293
|
- spec/tty/table/renderer/basic/alignment_spec.rb
|
217
294
|
- spec/tty/table/renderer/basic/extract_column_widths_spec.rb
|
295
|
+
- spec/tty/table/renderer/basic/filter_spec.rb
|
296
|
+
- spec/tty/table/renderer/basic/multiline_content_spec.rb
|
218
297
|
- spec/tty/table/renderer/basic/new_spec.rb
|
298
|
+
- spec/tty/table/renderer/basic/options_spec.rb
|
219
299
|
- spec/tty/table/renderer/basic/render_spec.rb
|
220
300
|
- spec/tty/table/renderer/basic/separator_spec.rb
|
301
|
+
- spec/tty/table/renderer/basic/truncation_spec.rb
|
302
|
+
- spec/tty/table/renderer/basic/wrapping_spec.rb
|
221
303
|
- spec/tty/table/renderer/basic_spec.rb
|
222
|
-
- spec/tty/table/renderer/
|
223
|
-
- spec/tty/table/
|
224
|
-
- spec/tty/table/
|
304
|
+
- spec/tty/table/renderer/border_spec.rb
|
305
|
+
- spec/tty/table/renderer/select_spec.rb
|
306
|
+
- spec/tty/table/renderer/style_spec.rb
|
307
|
+
- spec/tty/table/renderer/unicode/render_spec.rb
|
308
|
+
- spec/tty/table/renderer/unicode/separator_spec.rb
|
225
309
|
- spec/tty/table/rotate_spec.rb
|
226
310
|
- spec/tty/table/row/access_spec.rb
|
227
311
|
- spec/tty/table/row/call_spec.rb
|
228
312
|
- spec/tty/table/row/data_spec.rb
|
313
|
+
- spec/tty/table/row/each_spec.rb
|
229
314
|
- spec/tty/table/row/equality_spec.rb
|
315
|
+
- spec/tty/table/row/height_spec.rb
|
230
316
|
- spec/tty/table/row/new_spec.rb
|
231
317
|
- spec/tty/table/row/to_ary_spec.rb
|
232
318
|
- spec/tty/table/to_s_spec.rb
|
319
|
+
- spec/tty/table/transformation/extract_tuples_spec.rb
|
233
320
|
- spec/tty/table/validatable/validate_options_spec.rb
|
234
321
|
- spec/tty/table/validatable_spec.rb
|
235
322
|
- spec/tty/terminal/color/code_spec.rb
|
@@ -238,6 +325,13 @@ files:
|
|
238
325
|
- spec/tty/terminal/color_spec.rb
|
239
326
|
- spec/tty/terminal/echo_spec.rb
|
240
327
|
- spec/tty/terminal/home_spec.rb
|
328
|
+
- spec/tty/terminal/page_spec.rb
|
329
|
+
- spec/tty/terminal/pager/available_spec.rb
|
330
|
+
- spec/tty/terminal/pager/basic/page_spec.rb
|
331
|
+
- spec/tty/terminal/pager/command_spec.rb
|
332
|
+
- spec/tty/terminal/pager/executables_spec.rb
|
333
|
+
- spec/tty/terminal/pager/page_spec.rb
|
334
|
+
- spec/tty/terminal/pager/system/page_spec.rb
|
241
335
|
- spec/tty/terminal/size_spec.rb
|
242
336
|
- spec/tty/text/distance/distance_spec.rb
|
243
337
|
- spec/tty/text/distance/initialize_spec.rb
|
@@ -285,6 +379,10 @@ test_files:
|
|
285
379
|
- spec/tty/coercer/range/coerce_spec.rb
|
286
380
|
- spec/tty/logger/new_spec.rb
|
287
381
|
- spec/tty/logger/valid_level_spec.rb
|
382
|
+
- spec/tty/plugins/find_spec.rb
|
383
|
+
- spec/tty/plugins/load_spec.rb
|
384
|
+
- spec/tty/plugins/plugin/load_spec.rb
|
385
|
+
- spec/tty/plugins/plugin/new_spec.rb
|
288
386
|
- spec/tty/shell/ask_spec.rb
|
289
387
|
- spec/tty/shell/error_spec.rb
|
290
388
|
- spec/tty/shell/print_table_spec.rb
|
@@ -313,13 +411,21 @@ test_files:
|
|
313
411
|
- spec/tty/shell/response/read_string_spec.rb
|
314
412
|
- spec/tty/shell/say_spec.rb
|
315
413
|
- spec/tty/shell/statement/initialize_spec.rb
|
414
|
+
- spec/tty/shell/suggest_spec.rb
|
316
415
|
- spec/tty/shell/warn_spec.rb
|
317
416
|
- spec/tty/support/coercion_spec.rb
|
318
417
|
- spec/tty/support/conversion_spec.rb
|
319
418
|
- spec/tty/support/delegatable_spec.rb
|
320
419
|
- spec/tty/support/equatable_spec.rb
|
321
420
|
- spec/tty/support/fixtures/classes.rb
|
421
|
+
- spec/tty/system/editor/available_spec.rb
|
422
|
+
- spec/tty/system/editor/build_spec.rb
|
423
|
+
- spec/tty/system/editor/command_spec.rb
|
424
|
+
- spec/tty/system/editor/executables_spec.rb
|
425
|
+
- spec/tty/system/editor/invoke_spec.rb
|
426
|
+
- spec/tty/system/editor/open_spec.rb
|
322
427
|
- spec/tty/system/platform_spec.rb
|
428
|
+
- spec/tty/system/which/which_spec.rb
|
323
429
|
- spec/tty/system/which_spec.rb
|
324
430
|
- spec/tty/table/access_spec.rb
|
325
431
|
- spec/tty/table/add_row_spec.rb
|
@@ -328,18 +434,22 @@ test_files:
|
|
328
434
|
- spec/tty/table/border/null/rendering_spec.rb
|
329
435
|
- spec/tty/table/border/options/from_spec.rb
|
330
436
|
- spec/tty/table/border/options/new_spec.rb
|
331
|
-
- spec/tty/table/border/style_spec.rb
|
332
437
|
- spec/tty/table/border/unicode/rendering_spec.rb
|
333
|
-
- spec/tty/table/border_spec.rb
|
334
438
|
- spec/tty/table/column_set/extract_widths_spec.rb
|
439
|
+
- spec/tty/table/column_set/total_width_spec.rb
|
440
|
+
- spec/tty/table/data_spec.rb
|
335
441
|
- spec/tty/table/each_spec.rb
|
336
442
|
- spec/tty/table/each_with_index_spec.rb
|
337
443
|
- spec/tty/table/empty_spec.rb
|
338
444
|
- spec/tty/table/eql_spec.rb
|
339
445
|
- spec/tty/table/field/equality_spec.rb
|
446
|
+
- spec/tty/table/field/length_spec.rb
|
447
|
+
- spec/tty/table/field/lines_spec.rb
|
340
448
|
- spec/tty/table/field/new_spec.rb
|
341
449
|
- spec/tty/table/field/width_spec.rb
|
450
|
+
- spec/tty/table/filter_spec.rb
|
342
451
|
- spec/tty/table/header/call_spec.rb
|
452
|
+
- spec/tty/table/header/height_spec.rb
|
343
453
|
- spec/tty/table/header/new_spec.rb
|
344
454
|
- spec/tty/table/header/set_spec.rb
|
345
455
|
- spec/tty/table/header/to_ary_spec.rb
|
@@ -347,10 +457,12 @@ test_files:
|
|
347
457
|
- spec/tty/table/initialize_spec.rb
|
348
458
|
- spec/tty/table/operation/alignment/format_spec.rb
|
349
459
|
- spec/tty/table/operation/alignment/new_spec.rb
|
350
|
-
- spec/tty/table/operation/alignment_set/
|
460
|
+
- spec/tty/table/operation/alignment_set/call_spec.rb
|
351
461
|
- spec/tty/table/operation/alignment_set/each_spec.rb
|
352
462
|
- spec/tty/table/operation/alignment_set/new_spec.rb
|
353
463
|
- spec/tty/table/operation/alignment_set/to_ary_spec.rb
|
464
|
+
- spec/tty/table/operation/escape/call_spec.rb
|
465
|
+
- spec/tty/table/operation/filter/call_spec.rb
|
354
466
|
- spec/tty/table/operation/truncation/call_spec.rb
|
355
467
|
- spec/tty/table/operation/truncation/truncate_spec.rb
|
356
468
|
- spec/tty/table/operation/wrapped/call_spec.rb
|
@@ -359,23 +471,37 @@ test_files:
|
|
359
471
|
- spec/tty/table/options_spec.rb
|
360
472
|
- spec/tty/table/orientation_spec.rb
|
361
473
|
- spec/tty/table/properties_spec.rb
|
474
|
+
- spec/tty/table/render_spec.rb
|
475
|
+
- spec/tty/table/render_with_spec.rb
|
476
|
+
- spec/tty/table/renderer/ascii/render_spec.rb
|
477
|
+
- spec/tty/table/renderer/ascii/separator_spec.rb
|
362
478
|
- spec/tty/table/renderer/basic/alignment_spec.rb
|
363
479
|
- spec/tty/table/renderer/basic/extract_column_widths_spec.rb
|
480
|
+
- spec/tty/table/renderer/basic/filter_spec.rb
|
481
|
+
- spec/tty/table/renderer/basic/multiline_content_spec.rb
|
364
482
|
- spec/tty/table/renderer/basic/new_spec.rb
|
483
|
+
- spec/tty/table/renderer/basic/options_spec.rb
|
365
484
|
- spec/tty/table/renderer/basic/render_spec.rb
|
366
485
|
- spec/tty/table/renderer/basic/separator_spec.rb
|
486
|
+
- spec/tty/table/renderer/basic/truncation_spec.rb
|
487
|
+
- spec/tty/table/renderer/basic/wrapping_spec.rb
|
367
488
|
- spec/tty/table/renderer/basic_spec.rb
|
368
|
-
- spec/tty/table/renderer/
|
369
|
-
- spec/tty/table/
|
370
|
-
- spec/tty/table/
|
489
|
+
- spec/tty/table/renderer/border_spec.rb
|
490
|
+
- spec/tty/table/renderer/select_spec.rb
|
491
|
+
- spec/tty/table/renderer/style_spec.rb
|
492
|
+
- spec/tty/table/renderer/unicode/render_spec.rb
|
493
|
+
- spec/tty/table/renderer/unicode/separator_spec.rb
|
371
494
|
- spec/tty/table/rotate_spec.rb
|
372
495
|
- spec/tty/table/row/access_spec.rb
|
373
496
|
- spec/tty/table/row/call_spec.rb
|
374
497
|
- spec/tty/table/row/data_spec.rb
|
498
|
+
- spec/tty/table/row/each_spec.rb
|
375
499
|
- spec/tty/table/row/equality_spec.rb
|
500
|
+
- spec/tty/table/row/height_spec.rb
|
376
501
|
- spec/tty/table/row/new_spec.rb
|
377
502
|
- spec/tty/table/row/to_ary_spec.rb
|
378
503
|
- spec/tty/table/to_s_spec.rb
|
504
|
+
- spec/tty/table/transformation/extract_tuples_spec.rb
|
379
505
|
- spec/tty/table/validatable/validate_options_spec.rb
|
380
506
|
- spec/tty/table/validatable_spec.rb
|
381
507
|
- spec/tty/terminal/color/code_spec.rb
|
@@ -384,6 +510,13 @@ test_files:
|
|
384
510
|
- spec/tty/terminal/color_spec.rb
|
385
511
|
- spec/tty/terminal/echo_spec.rb
|
386
512
|
- spec/tty/terminal/home_spec.rb
|
513
|
+
- spec/tty/terminal/page_spec.rb
|
514
|
+
- spec/tty/terminal/pager/available_spec.rb
|
515
|
+
- spec/tty/terminal/pager/basic/page_spec.rb
|
516
|
+
- spec/tty/terminal/pager/command_spec.rb
|
517
|
+
- spec/tty/terminal/pager/executables_spec.rb
|
518
|
+
- spec/tty/terminal/pager/page_spec.rb
|
519
|
+
- spec/tty/terminal/pager/system/page_spec.rb
|
387
520
|
- spec/tty/terminal/size_spec.rb
|
388
521
|
- spec/tty/text/distance/distance_spec.rb
|
389
522
|
- spec/tty/text/distance/initialize_spec.rb
|
@@ -1,53 +0,0 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
|
-
|
3
|
-
require 'spec_helper'
|
4
|
-
|
5
|
-
def to_field(value)
|
6
|
-
TTY::Table::Field.new(value)
|
7
|
-
end
|
8
|
-
|
9
|
-
describe TTY::Table::Operation::AlignmentSet, '#align_rows' do
|
10
|
-
let(:object) { described_class.new alignments }
|
11
|
-
let(:rows) {
|
12
|
-
[[to_field('a1'), to_field('a2')],
|
13
|
-
[to_field('b1'), to_field('b2')]]
|
14
|
-
}
|
15
|
-
|
16
|
-
subject { object.align_rows rows, :column_widths => widths }
|
17
|
-
|
18
|
-
context 'aligned with column widths and no alignments' do
|
19
|
-
let(:alignments) { [] }
|
20
|
-
let(:widths) { [4, 4] }
|
21
|
-
|
22
|
-
it { should be_instance_of(Array) }
|
23
|
-
|
24
|
-
it { should == [['a1 ', 'a2 '], ['b1 ', 'b2 ']] }
|
25
|
-
end
|
26
|
-
|
27
|
-
context 'aligned with column widths and alignments' do
|
28
|
-
let(:alignments) { [:right, :left] }
|
29
|
-
let(:widths) { [4, 4] }
|
30
|
-
|
31
|
-
it { should be_instance_of(Array) }
|
32
|
-
|
33
|
-
it { should == [[' a1', 'a2 '], [' b1', 'b2 ']] }
|
34
|
-
end
|
35
|
-
|
36
|
-
context 'aligned with no column widths and no alignments' do
|
37
|
-
let(:alignments) { [] }
|
38
|
-
let(:widths) { [] }
|
39
|
-
|
40
|
-
it { should be_instance_of(Array) }
|
41
|
-
|
42
|
-
it { should == [['a1', 'a2'], ['b1', 'b2']] }
|
43
|
-
end
|
44
|
-
|
45
|
-
context 'aligned with no column widths and alignments' do
|
46
|
-
let(:alignments) { [:right, :left] }
|
47
|
-
let(:widths) { [] }
|
48
|
-
|
49
|
-
it { should be_instance_of(Array) }
|
50
|
-
|
51
|
-
it { should == [['a1', 'a2'], ['b1', 'b2']] }
|
52
|
-
end
|
53
|
-
end
|
@@ -1,25 +0,0 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
|
-
|
3
|
-
require 'spec_helper'
|
4
|
-
|
5
|
-
describe TTY::Table::Renderer, '#pick_renderer' do
|
6
|
-
let(:klass) { ::Class.new }
|
7
|
-
let(:instance) { klass.new }
|
8
|
-
|
9
|
-
subject { instance.pick_renderer renderer}
|
10
|
-
|
11
|
-
before { klass.send :include, described_class }
|
12
|
-
|
13
|
-
context 'with basic' do
|
14
|
-
let(:renderer) { :basic }
|
15
|
-
|
16
|
-
it { should be_instance_of(TTY::Table::Renderer::Basic) }
|
17
|
-
end
|
18
|
-
|
19
|
-
context 'with unicode' do
|
20
|
-
let(:renderer) { :unicode }
|
21
|
-
|
22
|
-
it { should be_instance_of(TTY::Table::Renderer::Unicode) }
|
23
|
-
end
|
24
|
-
|
25
|
-
end
|
@@ -1,49 +0,0 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
|
-
|
3
|
-
require 'spec_helper'
|
4
|
-
|
5
|
-
describe TTY::Table, '#renderer' do
|
6
|
-
let(:basic_renderer) { TTY::Table::Renderer::Basic }
|
7
|
-
let(:ascii_renderer) { TTY::Table::Renderer::ASCII }
|
8
|
-
let(:unicode_renderer) { TTY::Table::Renderer::Unicode }
|
9
|
-
|
10
|
-
before do
|
11
|
-
TTY::Table.renderer = basic_renderer
|
12
|
-
end
|
13
|
-
|
14
|
-
after do
|
15
|
-
TTY::Table.renderer = basic_renderer
|
16
|
-
end
|
17
|
-
|
18
|
-
it { should respond_to(:render) }
|
19
|
-
|
20
|
-
it 'sets basic renderer' do
|
21
|
-
TTY::Table.renderer.should be TTY::Table::Renderer::Basic
|
22
|
-
end
|
23
|
-
|
24
|
-
it 'has instance renderer' do
|
25
|
-
table = TTY::Table.new
|
26
|
-
table.renderer.should be_kind_of(basic_renderer)
|
27
|
-
end
|
28
|
-
|
29
|
-
it 'allows to set ascii instance renderer' do
|
30
|
-
table = TTY::Table.new :renderer => :ascii
|
31
|
-
expect(table.renderer).to be_kind_of(ascii_renderer)
|
32
|
-
end
|
33
|
-
|
34
|
-
it 'allows to set unicode instance renderer' do
|
35
|
-
table = TTY::Table.new :renderer => :unicode
|
36
|
-
table.renderer.should be_kind_of(unicode_renderer)
|
37
|
-
end
|
38
|
-
|
39
|
-
it 'allows to set global renderer' do
|
40
|
-
TTY::Table.renderer = unicode_renderer
|
41
|
-
table = TTY::Table.new
|
42
|
-
table.renderer.should be_kind_of(unicode_renderer)
|
43
|
-
end
|
44
|
-
|
45
|
-
it 'delegates to renderer' do
|
46
|
-
table = TTY::Table.new [['a']]
|
47
|
-
table.render(table).should == 'a'
|
48
|
-
end
|
49
|
-
end
|