capistrano-data_plane_api 0.1.4 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rubocop.yml +5 -2
- data/.ruby-version +1 -1
- data/CHANGELOG.md +6 -0
- data/Gemfile +7 -4
- data/Gemfile.lock +108 -69
- data/README.md +5 -0
- data/capistrano-data_plane_api.gemspec +5 -2
- data/exe/cap_data_plane_api +3 -2
- data/lib/capistrano/data_plane_api/configuration/backend.rb +2 -0
- data/lib/capistrano/data_plane_api/configuration/server.rb +4 -2
- data/lib/capistrano/data_plane_api/configuration/symbol.rb +2 -0
- data/lib/capistrano/data_plane_api/configuration.rb +3 -3
- data/lib/capistrano/data_plane_api/deploy/args.rb +71 -40
- data/lib/capistrano/data_plane_api/deploy/deployment_stats.rb +29 -25
- data/lib/capistrano/data_plane_api/deploy/group.rb +33 -24
- data/lib/capistrano/data_plane_api/deploy/helper.rb +3 -5
- data/lib/capistrano/data_plane_api/deploy/server_stats.rb +60 -43
- data/lib/capistrano/data_plane_api/deploy.rb +3 -2
- data/lib/capistrano/data_plane_api/diggable.rb +5 -2
- data/lib/capistrano/data_plane_api/equatable.rb +4 -2
- data/lib/capistrano/data_plane_api/helper.rb +31 -27
- data/lib/capistrano/data_plane_api/hooks.rb +1 -0
- data/lib/capistrano/data_plane_api/show_state.rb +15 -12
- data/lib/capistrano/data_plane_api/tasks.rb +26 -2
- data/lib/capistrano/data_plane_api/terminal_print_loop.rb +7 -4
- data/lib/capistrano/data_plane_api/type.rb +9 -5
- data/lib/capistrano/data_plane_api/version.rb +2 -2
- data/lib/capistrano/data_plane_api.rb +96 -74
- data/lib/capistrano-data_plane_api.rb +4 -0
- data/rbi/capistrano-data_plane_api.rbi +283 -0
- data/sorbet/config +6 -0
- data/sorbet/rbi/annotations/.gitattributes +1 -0
- data/sorbet/rbi/annotations/faraday.rbi +17 -0
- data/sorbet/rbi/annotations/minitest.rbi +119 -0
- data/sorbet/rbi/annotations/rainbow.rbi +269 -0
- data/sorbet/rbi/annotations/webmock.rbi +9 -0
- data/sorbet/rbi/dsl/.gitattributes +1 -0
- data/sorbet/rbi/dsl/capistrano/data_plane_api/configuration/backend.rbi +50 -0
- data/sorbet/rbi/dsl/capistrano/data_plane_api/configuration/server.rbi +24 -0
- data/sorbet/rbi/dsl/capistrano/data_plane_api/configuration.rbi +52 -0
- data/sorbet/rbi/dsl/capistrano/data_plane_api/type.rbi +12 -0
- data/sorbet/rbi/gems/.gitattributes +1 -0
- data/sorbet/rbi/gems/addressable@2.8.7.rbi +1994 -0
- data/sorbet/rbi/gems/ast@2.4.3.rbi +585 -0
- data/sorbet/rbi/gems/base64@0.2.0.rbi +509 -0
- data/sorbet/rbi/gems/bigdecimal@3.1.9.rbi +8 -0
- data/sorbet/rbi/gems/booleans@0.1.3.rbi +28 -0
- data/sorbet/rbi/gems/byebug@12.0.0.rbi +37 -0
- data/sorbet/rbi/gems/crack@1.0.0.rbi +145 -0
- data/sorbet/rbi/gems/data_plane_api@0.2.0.rbi +238 -0
- data/sorbet/rbi/gems/faraday-net_http@3.4.0.rbi +147 -0
- data/sorbet/rbi/gems/faraday@2.13.0.rbi +2974 -0
- data/sorbet/rbi/gems/hashdiff@1.1.2.rbi +353 -0
- data/sorbet/rbi/gems/json@2.10.2.rbi +2113 -0
- data/sorbet/rbi/gems/lint_roller@1.1.0.rbi +240 -0
- data/sorbet/rbi/gems/logger@1.7.0.rbi +963 -0
- data/sorbet/rbi/gems/minitest@5.25.5.rbi +1547 -0
- data/sorbet/rbi/gems/net-http@0.6.0.rbi +4247 -0
- data/sorbet/rbi/gems/parallel@1.26.3.rbi +291 -0
- data/sorbet/rbi/gems/pastel@0.8.0.rbi +733 -0
- data/sorbet/rbi/gems/public_suffix@6.0.1.rbi +936 -0
- data/sorbet/rbi/gems/racc@1.8.1.rbi +160 -0
- data/sorbet/rbi/gems/rainbow@3.1.1.rbi +404 -0
- data/sorbet/rbi/gems/rake@13.0.6.rbi +3030 -0
- data/sorbet/rbi/gems/rexml@3.4.1.rbi +5346 -0
- data/sorbet/rbi/gems/rubocop-espago@1.1.8.rbi +9 -0
- data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +1318 -0
- data/sorbet/rbi/gems/shale-builder@0.2.4.rbi +9 -0
- data/sorbet/rbi/gems/shale@1.2.2.rbi +2323 -0
- data/sorbet/rbi/gems/shoulda-context@2.0.0.rbi +563 -0
- data/sorbet/rbi/gems/strings-ansi@0.2.0.rbi +178 -0
- data/sorbet/rbi/gems/strings@0.2.1.rbi +830 -0
- data/sorbet/rbi/gems/thor@1.2.1.rbi +3957 -0
- data/sorbet/rbi/gems/tty-box@0.7.0.rbi +593 -0
- data/sorbet/rbi/gems/tty-color@0.6.0.rbi +241 -0
- data/sorbet/rbi/gems/tty-cursor@0.7.1.rbi +443 -0
- data/sorbet/rbi/gems/unicode-display_width@2.6.0.rbi +66 -0
- data/sorbet/rbi/gems/unicode_utils@1.4.0.rbi +184 -0
- data/sorbet/rbi/gems/uri@1.0.3.rbi +2349 -0
- data/sorbet/rbi/gems/vcr@6.3.1.rbi +3040 -0
- data/sorbet/rbi/gems/webmock@3.25.1.rbi +1792 -0
- data/sorbet/rbi/shims/gems/faraday.rbi +21 -0
- data/sorbet/rbi/shims/gems/shoulda-context@2.0.0.rbi +15 -0
- data/sorbet/rbi/todo.rbi +7 -0
- data/sorbet/tapioca/config.yml +28 -0
- data/sorbet/tapioca/extensions/load_gem.rb +1 -0
- data/sorbet/tapioca/require.rb +4 -0
- data/templates/bin/deploy.rb +1 -0
- metadata +106 -8
@@ -0,0 +1,593 @@
|
|
1
|
+
# typed: true
|
2
|
+
|
3
|
+
# DO NOT EDIT MANUALLY
|
4
|
+
# This is an autogenerated file for types exported from the `tty-box` gem.
|
5
|
+
# Please instead update this file by running `bin/tapioca gem tty-box`.
|
6
|
+
|
7
|
+
|
8
|
+
# source://tty-box//lib/tty/box/border.rb#3
|
9
|
+
module TTY; end
|
10
|
+
|
11
|
+
# source://tty-box//lib/tty/box/border.rb#4
|
12
|
+
module TTY::Box
|
13
|
+
private
|
14
|
+
|
15
|
+
# Bottom border
|
16
|
+
#
|
17
|
+
# @api private
|
18
|
+
# @return [String]
|
19
|
+
#
|
20
|
+
# source://tty-box//lib/tty/box.rb#493
|
21
|
+
def bottom_border(title, width, border, style); end
|
22
|
+
|
23
|
+
# Bottom left corner
|
24
|
+
#
|
25
|
+
# @api private
|
26
|
+
# @param border [Border]
|
27
|
+
# @return [String]
|
28
|
+
#
|
29
|
+
# source://tty-box//lib/tty/box.rb#455
|
30
|
+
def bottom_left_corner(border); end
|
31
|
+
|
32
|
+
# Bottom right corner
|
33
|
+
#
|
34
|
+
# @api private
|
35
|
+
# @param border [Border]
|
36
|
+
# @return [String]
|
37
|
+
#
|
38
|
+
# source://tty-box//lib/tty/box.rb#469
|
39
|
+
def bottom_right_corner(border); end
|
40
|
+
|
41
|
+
# Bottom space taken by titles and corners
|
42
|
+
#
|
43
|
+
# @api private
|
44
|
+
# @return [Integer]
|
45
|
+
#
|
46
|
+
# source://tty-box//lib/tty/box.rb#441
|
47
|
+
def bottom_space_taken(title, border); end
|
48
|
+
|
49
|
+
# Bottom titles size
|
50
|
+
#
|
51
|
+
# @api private
|
52
|
+
# @return [Integer]
|
53
|
+
#
|
54
|
+
# source://tty-box//lib/tty/box.rb#481
|
55
|
+
def bottom_titles_size(title); end
|
56
|
+
|
57
|
+
# source://tty-box//lib/tty/box.rb#73
|
58
|
+
def color(enabled: T.unsafe(nil)); end
|
59
|
+
|
60
|
+
# Convert content array to string
|
61
|
+
#
|
62
|
+
# @api private
|
63
|
+
# @param content [Array<String>]
|
64
|
+
# @return [String]
|
65
|
+
#
|
66
|
+
# source://tty-box//lib/tty/box.rb#275
|
67
|
+
def content_to_str(content); end
|
68
|
+
|
69
|
+
# The maximum content width for all the lines
|
70
|
+
#
|
71
|
+
# @api private
|
72
|
+
# @param lines [Array<String>]
|
73
|
+
# @return [Integer]
|
74
|
+
#
|
75
|
+
# source://tty-box//lib/tty/box.rb#307
|
76
|
+
def content_width(lines); end
|
77
|
+
|
78
|
+
# source://tty-box//lib/tty/box.rb#37
|
79
|
+
def corner_bottom_left_char(border = T.unsafe(nil)); end
|
80
|
+
|
81
|
+
# source://tty-box//lib/tty/box.rb#25
|
82
|
+
def corner_bottom_right_char(border = T.unsafe(nil)); end
|
83
|
+
|
84
|
+
# source://tty-box//lib/tty/box.rb#33
|
85
|
+
def corner_top_left_char(border = T.unsafe(nil)); end
|
86
|
+
|
87
|
+
# source://tty-box//lib/tty/box.rb#29
|
88
|
+
def corner_top_right_char(border = T.unsafe(nil)); end
|
89
|
+
|
90
|
+
# source://tty-box//lib/tty/box.rb#65
|
91
|
+
def cross_char(border = T.unsafe(nil)); end
|
92
|
+
|
93
|
+
# source://tty-box//lib/tty/box.rb#69
|
94
|
+
def cursor; end
|
95
|
+
|
96
|
+
# source://tty-box//lib/tty/box.rb#49
|
97
|
+
def divider_down_char(border = T.unsafe(nil)); end
|
98
|
+
|
99
|
+
# source://tty-box//lib/tty/box.rb#41
|
100
|
+
def divider_left_char(border = T.unsafe(nil)); end
|
101
|
+
|
102
|
+
# source://tty-box//lib/tty/box.rb#53
|
103
|
+
def divider_right_char(border = T.unsafe(nil)); end
|
104
|
+
|
105
|
+
# source://tty-box//lib/tty/box.rb#45
|
106
|
+
def divider_up_char(border = T.unsafe(nil)); end
|
107
|
+
|
108
|
+
# A frame for error type message
|
109
|
+
#
|
110
|
+
# @api public
|
111
|
+
# @param message [String] the message to display
|
112
|
+
#
|
113
|
+
# source://tty-box//lib/tty/box.rb#152
|
114
|
+
def error(message, **opts); end
|
115
|
+
|
116
|
+
# Convert style keywords into styling
|
117
|
+
#
|
118
|
+
# @api private
|
119
|
+
# @return [Array[Proc, Proc]]
|
120
|
+
#
|
121
|
+
# source://tty-box//lib/tty/box.rb#353
|
122
|
+
def extract_style(style); end
|
123
|
+
|
124
|
+
# Format content by wrapping, aligning and padding out
|
125
|
+
#
|
126
|
+
# @api private
|
127
|
+
# @param lines [Array<String>] the lines to format
|
128
|
+
# @param width [Integer] the maximum width
|
129
|
+
# @param padding [Integer, Array<Integer>] the amount of padding
|
130
|
+
# @param align [Symbol] the type of alignment
|
131
|
+
# @param separator [String] the newline separator
|
132
|
+
# @return [Array[String]]
|
133
|
+
#
|
134
|
+
# source://tty-box//lib/tty/box.rb#330
|
135
|
+
def format(lines, width, padding, align, separator); end
|
136
|
+
|
137
|
+
# Create a frame
|
138
|
+
#
|
139
|
+
# @api public
|
140
|
+
# @param top [Integer] the offset from the terminal top
|
141
|
+
# @param left [Integer] the offset from the terminal left
|
142
|
+
# @param width [Integer] the width of the box
|
143
|
+
# @param height [Integer] the height of the box
|
144
|
+
# @param align [Symbol] the content alignment
|
145
|
+
# @param padding [Integer, Array[Integer]] the padding around content
|
146
|
+
# @param title [Hash] the title for top or bottom border
|
147
|
+
# @param border [Hash, Symbol] the border type
|
148
|
+
# @param style [Hash] the styling for the front and background
|
149
|
+
#
|
150
|
+
# source://tty-box//lib/tty/box.rb#191
|
151
|
+
def frame(*content, top: T.unsafe(nil), left: T.unsafe(nil), width: T.unsafe(nil), height: T.unsafe(nil), align: T.unsafe(nil), padding: T.unsafe(nil), title: T.unsafe(nil), border: T.unsafe(nil), style: T.unsafe(nil), enable_color: T.unsafe(nil)); end
|
152
|
+
|
153
|
+
# Infer box dimensions based on content lines and padding
|
154
|
+
#
|
155
|
+
# @api private
|
156
|
+
# @param lines [Array[String]]
|
157
|
+
# @param padding [Array[Integer]|Integer]
|
158
|
+
# @return [Array[Integer]]
|
159
|
+
#
|
160
|
+
# source://tty-box//lib/tty/box.rb#292
|
161
|
+
def infer_dimensions(lines, padding); end
|
162
|
+
|
163
|
+
# A frame for info type message
|
164
|
+
#
|
165
|
+
# @api public
|
166
|
+
# @param message [String] the message to display
|
167
|
+
#
|
168
|
+
# source://tty-box//lib/tty/box.rb#83
|
169
|
+
def info(message, **opts); end
|
170
|
+
|
171
|
+
# source://tty-box//lib/tty/box.rb#57
|
172
|
+
def line_char(border = T.unsafe(nil)); end
|
173
|
+
|
174
|
+
# source://tty-box//lib/tty/box.rb#61
|
175
|
+
def pipe_char(border = T.unsafe(nil)); end
|
176
|
+
|
177
|
+
# A frame for for success type message
|
178
|
+
#
|
179
|
+
# @api public
|
180
|
+
# @param message [String] the message to display
|
181
|
+
#
|
182
|
+
# source://tty-box//lib/tty/box.rb#129
|
183
|
+
def success(message, **opts); end
|
184
|
+
|
185
|
+
# Top border
|
186
|
+
#
|
187
|
+
# @api private
|
188
|
+
# @return [String]
|
189
|
+
#
|
190
|
+
# source://tty-box//lib/tty/box.rb#417
|
191
|
+
def top_border(title, width, border, style); end
|
192
|
+
|
193
|
+
# Top left corner
|
194
|
+
#
|
195
|
+
# @api private
|
196
|
+
# @param border [Border]
|
197
|
+
# @return [String]
|
198
|
+
#
|
199
|
+
# source://tty-box//lib/tty/box.rb#379
|
200
|
+
def top_left_corner(border); end
|
201
|
+
|
202
|
+
# Top right corner
|
203
|
+
#
|
204
|
+
# @api private
|
205
|
+
# @param border [Border]
|
206
|
+
# @return [String]
|
207
|
+
#
|
208
|
+
# source://tty-box//lib/tty/box.rb#393
|
209
|
+
def top_right_corner(border); end
|
210
|
+
|
211
|
+
# Top space taken by titles and corners
|
212
|
+
#
|
213
|
+
# @api private
|
214
|
+
# @return [Integer]
|
215
|
+
#
|
216
|
+
# source://tty-box//lib/tty/box.rb#365
|
217
|
+
def top_space_taken(title, border); end
|
218
|
+
|
219
|
+
# Top titles size
|
220
|
+
#
|
221
|
+
# @api private
|
222
|
+
# @return [Integer]
|
223
|
+
#
|
224
|
+
# source://tty-box//lib/tty/box.rb#405
|
225
|
+
def top_titles_size(title); end
|
226
|
+
|
227
|
+
# A frame for warning type message
|
228
|
+
#
|
229
|
+
# @api public
|
230
|
+
# @param message [String] the message to display
|
231
|
+
#
|
232
|
+
# source://tty-box//lib/tty/box.rb#106
|
233
|
+
def warn(message, **opts); end
|
234
|
+
|
235
|
+
class << self
|
236
|
+
# source://tty-box//lib/tty/box.rb#73
|
237
|
+
def color(enabled: T.unsafe(nil)); end
|
238
|
+
|
239
|
+
# source://tty-box//lib/tty/box.rb#37
|
240
|
+
def corner_bottom_left_char(border = T.unsafe(nil)); end
|
241
|
+
|
242
|
+
# source://tty-box//lib/tty/box.rb#25
|
243
|
+
def corner_bottom_right_char(border = T.unsafe(nil)); end
|
244
|
+
|
245
|
+
# source://tty-box//lib/tty/box.rb#33
|
246
|
+
def corner_top_left_char(border = T.unsafe(nil)); end
|
247
|
+
|
248
|
+
# source://tty-box//lib/tty/box.rb#29
|
249
|
+
def corner_top_right_char(border = T.unsafe(nil)); end
|
250
|
+
|
251
|
+
# source://tty-box//lib/tty/box.rb#65
|
252
|
+
def cross_char(border = T.unsafe(nil)); end
|
253
|
+
|
254
|
+
# source://tty-box//lib/tty/box.rb#69
|
255
|
+
def cursor; end
|
256
|
+
|
257
|
+
# source://tty-box//lib/tty/box.rb#49
|
258
|
+
def divider_down_char(border = T.unsafe(nil)); end
|
259
|
+
|
260
|
+
# source://tty-box//lib/tty/box.rb#41
|
261
|
+
def divider_left_char(border = T.unsafe(nil)); end
|
262
|
+
|
263
|
+
# source://tty-box//lib/tty/box.rb#53
|
264
|
+
def divider_right_char(border = T.unsafe(nil)); end
|
265
|
+
|
266
|
+
# source://tty-box//lib/tty/box.rb#45
|
267
|
+
def divider_up_char(border = T.unsafe(nil)); end
|
268
|
+
|
269
|
+
# A frame for error type message
|
270
|
+
#
|
271
|
+
# @api public
|
272
|
+
# @param message [String] the message to display
|
273
|
+
#
|
274
|
+
# source://tty-box//lib/tty/box.rb#152
|
275
|
+
def error(message, **opts); end
|
276
|
+
|
277
|
+
# Create a frame
|
278
|
+
#
|
279
|
+
# @api public
|
280
|
+
# @param top [Integer] the offset from the terminal top
|
281
|
+
# @param left [Integer] the offset from the terminal left
|
282
|
+
# @param width [Integer] the width of the box
|
283
|
+
# @param height [Integer] the height of the box
|
284
|
+
# @param align [Symbol] the content alignment
|
285
|
+
# @param padding [Integer, Array[Integer]] the padding around content
|
286
|
+
# @param title [Hash] the title for top or bottom border
|
287
|
+
# @param border [Hash, Symbol] the border type
|
288
|
+
# @param style [Hash] the styling for the front and background
|
289
|
+
#
|
290
|
+
# source://tty-box//lib/tty/box.rb#191
|
291
|
+
def frame(*content, top: T.unsafe(nil), left: T.unsafe(nil), width: T.unsafe(nil), height: T.unsafe(nil), align: T.unsafe(nil), padding: T.unsafe(nil), title: T.unsafe(nil), border: T.unsafe(nil), style: T.unsafe(nil), enable_color: T.unsafe(nil)); end
|
292
|
+
|
293
|
+
# A frame for info type message
|
294
|
+
#
|
295
|
+
# @api public
|
296
|
+
# @param message [String] the message to display
|
297
|
+
#
|
298
|
+
# source://tty-box//lib/tty/box.rb#83
|
299
|
+
def info(message, **opts); end
|
300
|
+
|
301
|
+
# source://tty-box//lib/tty/box.rb#57
|
302
|
+
def line_char(border = T.unsafe(nil)); end
|
303
|
+
|
304
|
+
# source://tty-box//lib/tty/box.rb#61
|
305
|
+
def pipe_char(border = T.unsafe(nil)); end
|
306
|
+
|
307
|
+
# A frame for for success type message
|
308
|
+
#
|
309
|
+
# @api public
|
310
|
+
# @param message [String] the message to display
|
311
|
+
#
|
312
|
+
# source://tty-box//lib/tty/box.rb#129
|
313
|
+
def success(message, **opts); end
|
314
|
+
|
315
|
+
# A frame for warning type message
|
316
|
+
#
|
317
|
+
# @api public
|
318
|
+
# @param message [String] the message to display
|
319
|
+
#
|
320
|
+
# source://tty-box//lib/tty/box.rb#106
|
321
|
+
def warn(message, **opts); end
|
322
|
+
|
323
|
+
private
|
324
|
+
|
325
|
+
# Bottom border
|
326
|
+
#
|
327
|
+
# @api private
|
328
|
+
# @return [String]
|
329
|
+
#
|
330
|
+
# source://tty-box//lib/tty/box.rb#493
|
331
|
+
def bottom_border(title, width, border, style); end
|
332
|
+
|
333
|
+
# Bottom left corner
|
334
|
+
#
|
335
|
+
# @api private
|
336
|
+
# @param border [Border]
|
337
|
+
# @return [String]
|
338
|
+
#
|
339
|
+
# source://tty-box//lib/tty/box.rb#455
|
340
|
+
def bottom_left_corner(border); end
|
341
|
+
|
342
|
+
# Bottom right corner
|
343
|
+
#
|
344
|
+
# @api private
|
345
|
+
# @param border [Border]
|
346
|
+
# @return [String]
|
347
|
+
#
|
348
|
+
# source://tty-box//lib/tty/box.rb#469
|
349
|
+
def bottom_right_corner(border); end
|
350
|
+
|
351
|
+
# Bottom space taken by titles and corners
|
352
|
+
#
|
353
|
+
# @api private
|
354
|
+
# @return [Integer]
|
355
|
+
#
|
356
|
+
# source://tty-box//lib/tty/box.rb#441
|
357
|
+
def bottom_space_taken(title, border); end
|
358
|
+
|
359
|
+
# Bottom titles size
|
360
|
+
#
|
361
|
+
# @api private
|
362
|
+
# @return [Integer]
|
363
|
+
#
|
364
|
+
# source://tty-box//lib/tty/box.rb#481
|
365
|
+
def bottom_titles_size(title); end
|
366
|
+
|
367
|
+
# Convert content array to string
|
368
|
+
#
|
369
|
+
# @api private
|
370
|
+
# @param content [Array<String>]
|
371
|
+
# @return [String]
|
372
|
+
#
|
373
|
+
# source://tty-box//lib/tty/box.rb#275
|
374
|
+
def content_to_str(content); end
|
375
|
+
|
376
|
+
# The maximum content width for all the lines
|
377
|
+
#
|
378
|
+
# @api private
|
379
|
+
# @param lines [Array<String>]
|
380
|
+
# @return [Integer]
|
381
|
+
#
|
382
|
+
# source://tty-box//lib/tty/box.rb#307
|
383
|
+
def content_width(lines); end
|
384
|
+
|
385
|
+
# Convert style keywords into styling
|
386
|
+
#
|
387
|
+
# @api private
|
388
|
+
# @return [Array[Proc, Proc]]
|
389
|
+
#
|
390
|
+
# source://tty-box//lib/tty/box.rb#353
|
391
|
+
def extract_style(style); end
|
392
|
+
|
393
|
+
# Format content by wrapping, aligning and padding out
|
394
|
+
#
|
395
|
+
# @api private
|
396
|
+
# @param lines [Array<String>] the lines to format
|
397
|
+
# @param width [Integer] the maximum width
|
398
|
+
# @param padding [Integer, Array<Integer>] the amount of padding
|
399
|
+
# @param align [Symbol] the type of alignment
|
400
|
+
# @param separator [String] the newline separator
|
401
|
+
# @return [Array[String]]
|
402
|
+
#
|
403
|
+
# source://tty-box//lib/tty/box.rb#330
|
404
|
+
def format(lines, width, padding, align, separator); end
|
405
|
+
|
406
|
+
# Infer box dimensions based on content lines and padding
|
407
|
+
#
|
408
|
+
# @api private
|
409
|
+
# @param lines [Array[String]]
|
410
|
+
# @param padding [Array[Integer]|Integer]
|
411
|
+
# @return [Array[Integer]]
|
412
|
+
#
|
413
|
+
# source://tty-box//lib/tty/box.rb#292
|
414
|
+
def infer_dimensions(lines, padding); end
|
415
|
+
|
416
|
+
# Top border
|
417
|
+
#
|
418
|
+
# @api private
|
419
|
+
# @return [String]
|
420
|
+
#
|
421
|
+
# source://tty-box//lib/tty/box.rb#417
|
422
|
+
def top_border(title, width, border, style); end
|
423
|
+
|
424
|
+
# Top left corner
|
425
|
+
#
|
426
|
+
# @api private
|
427
|
+
# @param border [Border]
|
428
|
+
# @return [String]
|
429
|
+
#
|
430
|
+
# source://tty-box//lib/tty/box.rb#379
|
431
|
+
def top_left_corner(border); end
|
432
|
+
|
433
|
+
# Top right corner
|
434
|
+
#
|
435
|
+
# @api private
|
436
|
+
# @param border [Border]
|
437
|
+
# @return [String]
|
438
|
+
#
|
439
|
+
# source://tty-box//lib/tty/box.rb#393
|
440
|
+
def top_right_corner(border); end
|
441
|
+
|
442
|
+
# Top space taken by titles and corners
|
443
|
+
#
|
444
|
+
# @api private
|
445
|
+
# @return [Integer]
|
446
|
+
#
|
447
|
+
# source://tty-box//lib/tty/box.rb#365
|
448
|
+
def top_space_taken(title, border); end
|
449
|
+
|
450
|
+
# Top titles size
|
451
|
+
#
|
452
|
+
# @api private
|
453
|
+
# @return [Integer]
|
454
|
+
#
|
455
|
+
# source://tty-box//lib/tty/box.rb#405
|
456
|
+
def top_titles_size(title); end
|
457
|
+
end
|
458
|
+
end
|
459
|
+
|
460
|
+
# source://tty-box//lib/tty/box.rb#19
|
461
|
+
TTY::Box::BOX_CHARS = T.let(T.unsafe(nil), Hash)
|
462
|
+
|
463
|
+
# A class reponsible for retrieving border options
|
464
|
+
#
|
465
|
+
# @api private
|
466
|
+
#
|
467
|
+
# source://tty-box//lib/tty/box/border.rb#8
|
468
|
+
class TTY::Box::Border
|
469
|
+
# @api private
|
470
|
+
# @return [Border] a new instance of Border
|
471
|
+
#
|
472
|
+
# source://tty-box//lib/tty/box/border.rb#47
|
473
|
+
def initialize(type: T.unsafe(nil), top: T.unsafe(nil), top_left: T.unsafe(nil), top_right: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), bottom: T.unsafe(nil), bottom_left: T.unsafe(nil), bottom_right: T.unsafe(nil)); end
|
474
|
+
|
475
|
+
# @api private
|
476
|
+
#
|
477
|
+
# source://tty-box//lib/tty/box/border.rb#35
|
478
|
+
def bottom; end
|
479
|
+
|
480
|
+
# @api private
|
481
|
+
#
|
482
|
+
# source://tty-box//lib/tty/box/border.rb#35
|
483
|
+
def bottom?; end
|
484
|
+
|
485
|
+
# @api private
|
486
|
+
#
|
487
|
+
# source://tty-box//lib/tty/box/border.rb#35
|
488
|
+
def bottom_left; end
|
489
|
+
|
490
|
+
# @api private
|
491
|
+
#
|
492
|
+
# source://tty-box//lib/tty/box/border.rb#35
|
493
|
+
def bottom_left?; end
|
494
|
+
|
495
|
+
# @api private
|
496
|
+
#
|
497
|
+
# source://tty-box//lib/tty/box/border.rb#35
|
498
|
+
def bottom_right; end
|
499
|
+
|
500
|
+
# @api private
|
501
|
+
#
|
502
|
+
# source://tty-box//lib/tty/box/border.rb#35
|
503
|
+
def bottom_right?; end
|
504
|
+
|
505
|
+
# @api private
|
506
|
+
#
|
507
|
+
# source://tty-box//lib/tty/box/border.rb#35
|
508
|
+
def left; end
|
509
|
+
|
510
|
+
# @api private
|
511
|
+
#
|
512
|
+
# source://tty-box//lib/tty/box/border.rb#35
|
513
|
+
def left?; end
|
514
|
+
|
515
|
+
# @api private
|
516
|
+
#
|
517
|
+
# source://tty-box//lib/tty/box/border.rb#35
|
518
|
+
def right; end
|
519
|
+
|
520
|
+
# @api private
|
521
|
+
#
|
522
|
+
# source://tty-box//lib/tty/box/border.rb#35
|
523
|
+
def right?; end
|
524
|
+
|
525
|
+
# @api private
|
526
|
+
#
|
527
|
+
# source://tty-box//lib/tty/box/border.rb#35
|
528
|
+
def top; end
|
529
|
+
|
530
|
+
# @api private
|
531
|
+
#
|
532
|
+
# source://tty-box//lib/tty/box/border.rb#35
|
533
|
+
def top?; end
|
534
|
+
|
535
|
+
# @api private
|
536
|
+
#
|
537
|
+
# source://tty-box//lib/tty/box/border.rb#35
|
538
|
+
def top_left; end
|
539
|
+
|
540
|
+
# @api private
|
541
|
+
#
|
542
|
+
# source://tty-box//lib/tty/box/border.rb#35
|
543
|
+
def top_left?; end
|
544
|
+
|
545
|
+
# @api private
|
546
|
+
#
|
547
|
+
# source://tty-box//lib/tty/box/border.rb#35
|
548
|
+
def top_right; end
|
549
|
+
|
550
|
+
# @api private
|
551
|
+
#
|
552
|
+
# source://tty-box//lib/tty/box/border.rb#35
|
553
|
+
def top_right?; end
|
554
|
+
|
555
|
+
# @api private
|
556
|
+
#
|
557
|
+
# source://tty-box//lib/tty/box/border.rb#35
|
558
|
+
def type; end
|
559
|
+
|
560
|
+
private
|
561
|
+
|
562
|
+
# Check if border values name is allowed
|
563
|
+
#
|
564
|
+
# @api private
|
565
|
+
# @raise [ArgumentError]
|
566
|
+
#
|
567
|
+
# source://tty-box//lib/tty/box/border.rb#75
|
568
|
+
def check_name(key, value); end
|
569
|
+
|
570
|
+
class << self
|
571
|
+
# @api private
|
572
|
+
#
|
573
|
+
# source://tty-box//lib/tty/box/border.rb#23
|
574
|
+
def parse(border); end
|
575
|
+
end
|
576
|
+
end
|
577
|
+
|
578
|
+
# @api private
|
579
|
+
#
|
580
|
+
# source://tty-box//lib/tty/box/border.rb#9
|
581
|
+
TTY::Box::Border::BORDER_VALUES = T.let(T.unsafe(nil), Array)
|
582
|
+
|
583
|
+
# source://tty-box//lib/tty/box.rb#17
|
584
|
+
TTY::Box::LINE_BREAK = T.let(T.unsafe(nil), Regexp)
|
585
|
+
|
586
|
+
# source://tty-box//lib/tty/box.rb#14
|
587
|
+
TTY::Box::NEWLINE = T.let(T.unsafe(nil), String)
|
588
|
+
|
589
|
+
# source://tty-box//lib/tty/box.rb#15
|
590
|
+
TTY::Box::SPACE = T.let(T.unsafe(nil), String)
|
591
|
+
|
592
|
+
# source://tty-box//lib/tty/box/version.rb#5
|
593
|
+
TTY::Box::VERSION = T.let(T.unsafe(nil), String)
|