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.
Files changed (90) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +5 -2
  3. data/.ruby-version +1 -1
  4. data/CHANGELOG.md +6 -0
  5. data/Gemfile +7 -4
  6. data/Gemfile.lock +108 -69
  7. data/README.md +5 -0
  8. data/capistrano-data_plane_api.gemspec +5 -2
  9. data/exe/cap_data_plane_api +3 -2
  10. data/lib/capistrano/data_plane_api/configuration/backend.rb +2 -0
  11. data/lib/capistrano/data_plane_api/configuration/server.rb +4 -2
  12. data/lib/capistrano/data_plane_api/configuration/symbol.rb +2 -0
  13. data/lib/capistrano/data_plane_api/configuration.rb +3 -3
  14. data/lib/capistrano/data_plane_api/deploy/args.rb +71 -40
  15. data/lib/capistrano/data_plane_api/deploy/deployment_stats.rb +29 -25
  16. data/lib/capistrano/data_plane_api/deploy/group.rb +33 -24
  17. data/lib/capistrano/data_plane_api/deploy/helper.rb +3 -5
  18. data/lib/capistrano/data_plane_api/deploy/server_stats.rb +60 -43
  19. data/lib/capistrano/data_plane_api/deploy.rb +3 -2
  20. data/lib/capistrano/data_plane_api/diggable.rb +5 -2
  21. data/lib/capistrano/data_plane_api/equatable.rb +4 -2
  22. data/lib/capistrano/data_plane_api/helper.rb +31 -27
  23. data/lib/capistrano/data_plane_api/hooks.rb +1 -0
  24. data/lib/capistrano/data_plane_api/show_state.rb +15 -12
  25. data/lib/capistrano/data_plane_api/tasks.rb +26 -2
  26. data/lib/capistrano/data_plane_api/terminal_print_loop.rb +7 -4
  27. data/lib/capistrano/data_plane_api/type.rb +9 -5
  28. data/lib/capistrano/data_plane_api/version.rb +2 -2
  29. data/lib/capistrano/data_plane_api.rb +96 -74
  30. data/lib/capistrano-data_plane_api.rb +4 -0
  31. data/rbi/capistrano-data_plane_api.rbi +283 -0
  32. data/sorbet/config +6 -0
  33. data/sorbet/rbi/annotations/.gitattributes +1 -0
  34. data/sorbet/rbi/annotations/faraday.rbi +17 -0
  35. data/sorbet/rbi/annotations/minitest.rbi +119 -0
  36. data/sorbet/rbi/annotations/rainbow.rbi +269 -0
  37. data/sorbet/rbi/annotations/webmock.rbi +9 -0
  38. data/sorbet/rbi/dsl/.gitattributes +1 -0
  39. data/sorbet/rbi/dsl/capistrano/data_plane_api/configuration/backend.rbi +50 -0
  40. data/sorbet/rbi/dsl/capistrano/data_plane_api/configuration/server.rbi +24 -0
  41. data/sorbet/rbi/dsl/capistrano/data_plane_api/configuration.rbi +52 -0
  42. data/sorbet/rbi/dsl/capistrano/data_plane_api/type.rbi +12 -0
  43. data/sorbet/rbi/gems/.gitattributes +1 -0
  44. data/sorbet/rbi/gems/addressable@2.8.7.rbi +1994 -0
  45. data/sorbet/rbi/gems/ast@2.4.3.rbi +585 -0
  46. data/sorbet/rbi/gems/base64@0.2.0.rbi +509 -0
  47. data/sorbet/rbi/gems/bigdecimal@3.1.9.rbi +8 -0
  48. data/sorbet/rbi/gems/booleans@0.1.3.rbi +28 -0
  49. data/sorbet/rbi/gems/byebug@12.0.0.rbi +37 -0
  50. data/sorbet/rbi/gems/crack@1.0.0.rbi +145 -0
  51. data/sorbet/rbi/gems/data_plane_api@0.2.0.rbi +238 -0
  52. data/sorbet/rbi/gems/faraday-net_http@3.4.0.rbi +147 -0
  53. data/sorbet/rbi/gems/faraday@2.13.0.rbi +2974 -0
  54. data/sorbet/rbi/gems/hashdiff@1.1.2.rbi +353 -0
  55. data/sorbet/rbi/gems/json@2.10.2.rbi +2113 -0
  56. data/sorbet/rbi/gems/lint_roller@1.1.0.rbi +240 -0
  57. data/sorbet/rbi/gems/logger@1.7.0.rbi +963 -0
  58. data/sorbet/rbi/gems/minitest@5.25.5.rbi +1547 -0
  59. data/sorbet/rbi/gems/net-http@0.6.0.rbi +4247 -0
  60. data/sorbet/rbi/gems/parallel@1.26.3.rbi +291 -0
  61. data/sorbet/rbi/gems/pastel@0.8.0.rbi +733 -0
  62. data/sorbet/rbi/gems/public_suffix@6.0.1.rbi +936 -0
  63. data/sorbet/rbi/gems/racc@1.8.1.rbi +160 -0
  64. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +404 -0
  65. data/sorbet/rbi/gems/rake@13.0.6.rbi +3030 -0
  66. data/sorbet/rbi/gems/rexml@3.4.1.rbi +5346 -0
  67. data/sorbet/rbi/gems/rubocop-espago@1.1.8.rbi +9 -0
  68. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +1318 -0
  69. data/sorbet/rbi/gems/shale-builder@0.2.4.rbi +9 -0
  70. data/sorbet/rbi/gems/shale@1.2.2.rbi +2323 -0
  71. data/sorbet/rbi/gems/shoulda-context@2.0.0.rbi +563 -0
  72. data/sorbet/rbi/gems/strings-ansi@0.2.0.rbi +178 -0
  73. data/sorbet/rbi/gems/strings@0.2.1.rbi +830 -0
  74. data/sorbet/rbi/gems/thor@1.2.1.rbi +3957 -0
  75. data/sorbet/rbi/gems/tty-box@0.7.0.rbi +593 -0
  76. data/sorbet/rbi/gems/tty-color@0.6.0.rbi +241 -0
  77. data/sorbet/rbi/gems/tty-cursor@0.7.1.rbi +443 -0
  78. data/sorbet/rbi/gems/unicode-display_width@2.6.0.rbi +66 -0
  79. data/sorbet/rbi/gems/unicode_utils@1.4.0.rbi +184 -0
  80. data/sorbet/rbi/gems/uri@1.0.3.rbi +2349 -0
  81. data/sorbet/rbi/gems/vcr@6.3.1.rbi +3040 -0
  82. data/sorbet/rbi/gems/webmock@3.25.1.rbi +1792 -0
  83. data/sorbet/rbi/shims/gems/faraday.rbi +21 -0
  84. data/sorbet/rbi/shims/gems/shoulda-context@2.0.0.rbi +15 -0
  85. data/sorbet/rbi/todo.rbi +7 -0
  86. data/sorbet/tapioca/config.yml +28 -0
  87. data/sorbet/tapioca/extensions/load_gem.rb +1 -0
  88. data/sorbet/tapioca/require.rb +4 -0
  89. data/templates/bin/deploy.rb +1 -0
  90. metadata +106 -8
@@ -0,0 +1,3957 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `thor` gem.
5
+ # Please instead update this file by running `bin/tapioca gem thor`.
6
+
7
+
8
+ # source://thor//lib/thor/command.rb#1
9
+ class Thor
10
+ include ::Thor::Base
11
+ include ::Thor::Invocation
12
+ include ::Thor::Shell
13
+ extend ::Thor::Base::ClassMethods
14
+ extend ::Thor::Invocation::ClassMethods
15
+
16
+ # source://thor//lib/thor.rb#505
17
+ def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end
18
+
19
+ class << self
20
+ # Extend check unknown options to accept a hash of conditions.
21
+ #
22
+ # === Parameters
23
+ # options<Hash>: A hash containing :only and/or :except keys
24
+ #
25
+ # source://thor//lib/thor.rb#255
26
+ def check_unknown_options!(options = T.unsafe(nil)); end
27
+
28
+ # Overwrite check_unknown_options? to take subcommands and options into account.
29
+ #
30
+ # @return [Boolean]
31
+ #
32
+ # source://thor//lib/thor.rb#268
33
+ def check_unknown_options?(config); end
34
+
35
+ # Prints help information for the given command.
36
+ #
37
+ # ==== Parameters
38
+ # shell<Thor::Shell>
39
+ # command_name<String>
40
+ #
41
+ # source://thor//lib/thor.rb#172
42
+ def command_help(shell, command_name); end
43
+
44
+ # Sets the default command when thor is executed without an explicit command to be called.
45
+ #
46
+ # ==== Parameters
47
+ # meth<Symbol>:: name of the default command
48
+ #
49
+ # source://thor//lib/thor.rb#21
50
+ def default_command(meth = T.unsafe(nil)); end
51
+
52
+ # Sets the default command when thor is executed without an explicit command to be called.
53
+ #
54
+ # ==== Parameters
55
+ # meth<Symbol>:: name of the default command
56
+ #
57
+ # source://thor//lib/thor.rb#21
58
+ def default_task(meth = T.unsafe(nil)); end
59
+
60
+ # source://thor//lib/thor/base.rb#26
61
+ def deprecation_warning(message); end
62
+
63
+ # Defines the usage and the description of the next command.
64
+ #
65
+ # ==== Parameters
66
+ # usage<String>
67
+ # description<String>
68
+ # options<String>
69
+ #
70
+ # source://thor//lib/thor.rb#54
71
+ def desc(usage, description, options = T.unsafe(nil)); end
72
+
73
+ # Disable the check for required options for the given commands.
74
+ # This is useful if you have a command that does not need the required options
75
+ # to work, like help.
76
+ #
77
+ # ==== Parameters
78
+ # Symbol ...:: A list of commands that should be affected.
79
+ #
80
+ # source://thor//lib/thor.rb#339
81
+ def disable_required_check!(*command_names); end
82
+
83
+ # @return [Boolean]
84
+ #
85
+ # source://thor//lib/thor.rb#343
86
+ def disable_required_check?(command); end
87
+
88
+ # Prints help information for this class.
89
+ #
90
+ # ==== Parameters
91
+ # shell<Thor::Shell>
92
+ #
93
+ # source://thor//lib/thor.rb#195
94
+ def help(shell, subcommand = T.unsafe(nil)); end
95
+
96
+ # Defines the long description of the next command.
97
+ #
98
+ # ==== Parameters
99
+ # long description<String>
100
+ #
101
+ # source://thor//lib/thor.rb#71
102
+ def long_desc(long_description, options = T.unsafe(nil)); end
103
+
104
+ # Maps an input to a command. If you define:
105
+ #
106
+ # map "-T" => "list"
107
+ #
108
+ # Running:
109
+ #
110
+ # thor -T
111
+ #
112
+ # Will invoke the list command.
113
+ #
114
+ # ==== Parameters
115
+ # Hash[String|Array => Symbol]:: Maps the string or the strings in the array to the given command.
116
+ #
117
+ # source://thor//lib/thor.rb#93
118
+ def map(mappings = T.unsafe(nil), **kw); end
119
+
120
+ # Adds an option to the set of method options. If :for is given as option,
121
+ # it allows you to change the options from a previous defined command.
122
+ #
123
+ # def previous_command
124
+ # # magic
125
+ # end
126
+ #
127
+ # method_option :foo => :bar, :for => :previous_command
128
+ #
129
+ # def next_command
130
+ # # magic
131
+ # end
132
+ #
133
+ # ==== Parameters
134
+ # name<Symbol>:: The name of the argument.
135
+ # options<Hash>:: Described below.
136
+ #
137
+ # ==== Options
138
+ # :desc - Description for the argument.
139
+ # :required - If the argument is required or not.
140
+ # :default - Default value for this argument. It cannot be required and have default values.
141
+ # :aliases - Aliases for this option.
142
+ # :type - The type of the argument, can be :string, :hash, :array, :numeric or :boolean.
143
+ # :banner - String to show on usage notes.
144
+ # :hide - If you want to hide this option from the help.
145
+ #
146
+ # source://thor//lib/thor.rb#155
147
+ def method_option(name, options = T.unsafe(nil)); end
148
+
149
+ # Declares the options for the next command to be declared.
150
+ #
151
+ # ==== Parameters
152
+ # Hash[Symbol => Object]:: The hash key is the name of the option and the value
153
+ # is the type of the option. Can be :string, :array, :hash, :boolean, :numeric
154
+ # or :required (string). If you give a value, the type of the value is used.
155
+ #
156
+ # source://thor//lib/thor.rb#121
157
+ def method_options(options = T.unsafe(nil)); end
158
+
159
+ # Adds an option to the set of method options. If :for is given as option,
160
+ # it allows you to change the options from a previous defined command.
161
+ #
162
+ # def previous_command
163
+ # # magic
164
+ # end
165
+ #
166
+ # method_option :foo => :bar, :for => :previous_command
167
+ #
168
+ # def next_command
169
+ # # magic
170
+ # end
171
+ #
172
+ # ==== Parameters
173
+ # name<Symbol>:: The name of the argument.
174
+ # options<Hash>:: Described below.
175
+ #
176
+ # ==== Options
177
+ # :desc - Description for the argument.
178
+ # :required - If the argument is required or not.
179
+ # :default - Default value for this argument. It cannot be required and have default values.
180
+ # :aliases - Aliases for this option.
181
+ # :type - The type of the argument, can be :string, :hash, :array, :numeric or :boolean.
182
+ # :banner - String to show on usage notes.
183
+ # :hide - If you want to hide this option from the help.
184
+ #
185
+ # source://thor//lib/thor.rb#155
186
+ def option(name, options = T.unsafe(nil)); end
187
+
188
+ # Declares the options for the next command to be declared.
189
+ #
190
+ # ==== Parameters
191
+ # Hash[Symbol => Object]:: The hash key is the name of the option and the value
192
+ # is the type of the option. Can be :string, :array, :hash, :boolean, :numeric
193
+ # or :required (string). If you give a value, the type of the value is used.
194
+ #
195
+ # source://thor//lib/thor.rb#121
196
+ def options(options = T.unsafe(nil)); end
197
+
198
+ # Allows for custom "Command" package naming.
199
+ #
200
+ # === Parameters
201
+ # name<String>
202
+ # options<Hash>
203
+ #
204
+ # source://thor//lib/thor.rb#12
205
+ def package_name(name, _ = T.unsafe(nil)); end
206
+
207
+ # Returns commands ready to be printed.
208
+ #
209
+ # source://thor//lib/thor.rb#214
210
+ def printable_commands(all = T.unsafe(nil), subcommand = T.unsafe(nil)); end
211
+
212
+ # Returns commands ready to be printed.
213
+ #
214
+ # source://thor//lib/thor.rb#214
215
+ def printable_tasks(all = T.unsafe(nil), subcommand = T.unsafe(nil)); end
216
+
217
+ # Registers another Thor subclass as a command.
218
+ #
219
+ # ==== Parameters
220
+ # klass<Class>:: Thor subclass to register
221
+ # command<String>:: Subcommand name to use
222
+ # usage<String>:: Short usage for the subcommand
223
+ # description<String>:: Description for the subcommand
224
+ #
225
+ # source://thor//lib/thor.rb#37
226
+ def register(klass, subcommand_name, usage, description, options = T.unsafe(nil)); end
227
+
228
+ # Stop parsing of options as soon as an unknown option or a regular
229
+ # argument is encountered. All remaining arguments are passed to the command.
230
+ # This is useful if you have a command that can receive arbitrary additional
231
+ # options, and where those additional options should not be handled by
232
+ # Thor.
233
+ #
234
+ # ==== Example
235
+ #
236
+ # To better understand how this is useful, let's consider a command that calls
237
+ # an external command. A user may want to pass arbitrary options and
238
+ # arguments to that command. The command itself also accepts some options,
239
+ # which should be handled by Thor.
240
+ #
241
+ # class_option "verbose", :type => :boolean
242
+ # stop_on_unknown_option! :exec
243
+ # check_unknown_options! :except => :exec
244
+ #
245
+ # desc "exec", "Run a shell command"
246
+ # def exec(*args)
247
+ # puts "diagnostic output" if options[:verbose]
248
+ # Kernel.exec(*args)
249
+ # end
250
+ #
251
+ # Here +exec+ can be called with +--verbose+ to get diagnostic output,
252
+ # e.g.:
253
+ #
254
+ # $ thor exec --verbose echo foo
255
+ # diagnostic output
256
+ # foo
257
+ #
258
+ # But if +--verbose+ is given after +echo+, it is passed to +echo+ instead:
259
+ #
260
+ # $ thor exec echo --verbose foo
261
+ # --verbose foo
262
+ #
263
+ # ==== Parameters
264
+ # Symbol ...:: A list of commands that should be affected.
265
+ #
266
+ # source://thor//lib/thor.rb#325
267
+ def stop_on_unknown_option!(*command_names); end
268
+
269
+ # @return [Boolean]
270
+ #
271
+ # source://thor//lib/thor.rb#329
272
+ def stop_on_unknown_option?(command); end
273
+
274
+ # source://thor//lib/thor.rb#234
275
+ def subcommand(subcommand, subcommand_class); end
276
+
277
+ # source://thor//lib/thor.rb#230
278
+ def subcommand_classes; end
279
+
280
+ # source://thor//lib/thor.rb#225
281
+ def subcommands; end
282
+
283
+ # source://thor//lib/thor.rb#234
284
+ def subtask(subcommand, subcommand_class); end
285
+
286
+ # source://thor//lib/thor.rb#225
287
+ def subtasks; end
288
+
289
+ # Prints help information for the given command.
290
+ #
291
+ # ==== Parameters
292
+ # shell<Thor::Shell>
293
+ # command_name<String>
294
+ #
295
+ # source://thor//lib/thor.rb#172
296
+ def task_help(shell, command_name); end
297
+
298
+ protected
299
+
300
+ # The banner for this class. You can customize it if you are invoking the
301
+ # thor class by another ways which is not the Thor::Runner. It receives
302
+ # the command that is going to be invoked and a boolean which indicates if
303
+ # the namespace should be displayed as arguments.
304
+ #
305
+ # source://thor//lib/thor.rb#400
306
+ def banner(command, namespace = T.unsafe(nil), subcommand = T.unsafe(nil)); end
307
+
308
+ # source://thor//lib/thor.rb#406
309
+ def baseclass; end
310
+
311
+ # source://thor//lib/thor.rb#414
312
+ def create_command(meth); end
313
+
314
+ # source://thor//lib/thor.rb#414
315
+ def create_task(meth); end
316
+
317
+ # help command has the required check disabled by default.
318
+ #
319
+ # source://thor//lib/thor.rb#354
320
+ def disable_required_check; end
321
+
322
+ # The method responsible for dispatching given the args.
323
+ #
324
+ # @yield [instance]
325
+ #
326
+ # source://thor//lib/thor.rb#359
327
+ def dispatch(meth, given_args, given_opts, config); end
328
+
329
+ # source://thor//lib/thor.rb#410
330
+ def dynamic_command_class; end
331
+
332
+ # this is the logic that takes the command name passed in by the user
333
+ # and determines whether it is an unambiguous substrings of a command or
334
+ # alias name.
335
+ #
336
+ # source://thor//lib/thor.rb#476
337
+ def find_command_possibilities(meth); end
338
+
339
+ # this is the logic that takes the command name passed in by the user
340
+ # and determines whether it is an unambiguous substrings of a command or
341
+ # alias name.
342
+ #
343
+ # source://thor//lib/thor.rb#476
344
+ def find_task_possibilities(meth); end
345
+
346
+ # source://thor//lib/thor.rb#436
347
+ def initialize_added; end
348
+
349
+ # receives a (possibly nil) command name and returns a name that is in
350
+ # the commands hash. In addition to normalizing aliases, this logic
351
+ # will determine if a shortened command is an unambiguous substring of
352
+ # a command or alias.
353
+ #
354
+ # +normalize_command_name+ also converts names like +animal-prison+
355
+ # into +animal_prison+.
356
+ #
357
+ # @raise [AmbiguousTaskError]
358
+ #
359
+ # source://thor//lib/thor.rb#455
360
+ def normalize_command_name(meth); end
361
+
362
+ # receives a (possibly nil) command name and returns a name that is in
363
+ # the commands hash. In addition to normalizing aliases, this logic
364
+ # will determine if a shortened command is an unambiguous substring of
365
+ # a command or alias.
366
+ #
367
+ # +normalize_command_name+ also converts names like +animal-prison+
368
+ # into +animal_prison+.
369
+ #
370
+ # @raise [AmbiguousTaskError]
371
+ #
372
+ # source://thor//lib/thor.rb#455
373
+ def normalize_task_name(meth); end
374
+
375
+ # Retrieve the command name from given args.
376
+ #
377
+ # source://thor//lib/thor.rb#442
378
+ def retrieve_command_name(args); end
379
+
380
+ # Retrieve the command name from given args.
381
+ #
382
+ # source://thor//lib/thor.rb#442
383
+ def retrieve_task_name(args); end
384
+
385
+ # source://thor//lib/thor.rb#349
386
+ def stop_on_unknown_option; end
387
+
388
+ # source://thor//lib/thor.rb#491
389
+ def subcommand_help(cmd); end
390
+
391
+ # source://thor//lib/thor.rb#491
392
+ def subtask_help(cmd); end
393
+ end
394
+ end
395
+
396
+ # source://thor//lib/thor/actions/empty_directory.rb#2
397
+ module Thor::Actions
398
+ mixes_in_class_methods ::Thor::Actions::ClassMethods
399
+
400
+ # Extends initializer to add more configuration options.
401
+ #
402
+ # ==== Configuration
403
+ # behavior<Symbol>:: The actions default behavior. Can be :invoke or :revoke.
404
+ # It also accepts :force, :skip and :pretend to set the behavior
405
+ # and the respective option.
406
+ #
407
+ # destination_root<String>:: The root directory needed for some actions.
408
+ #
409
+ # source://thor//lib/thor/actions.rb#72
410
+ def initialize(args = T.unsafe(nil), options = T.unsafe(nil), config = T.unsafe(nil)); end
411
+
412
+ # Wraps an action object and call it accordingly to the thor class behavior.
413
+ #
414
+ # source://thor//lib/thor/actions.rb#89
415
+ def action(instance); end
416
+
417
+ # Create a new file relative to the destination root with the given data,
418
+ # which is the return value of a block or a data string.
419
+ #
420
+ # ==== Parameters
421
+ # destination<String>:: the relative path to the destination root.
422
+ # data<String|NilClass>:: the data to append to the file.
423
+ # config<Hash>:: give :verbose => false to not log the status.
424
+ #
425
+ # ==== Examples
426
+ #
427
+ # create_file "lib/fun_party.rb" do
428
+ # hostname = ask("What is the virtual hostname I should use?")
429
+ # "vhost.name = #{hostname}"
430
+ # end
431
+ #
432
+ # create_file "config/apache.conf", "your apache config"
433
+ #
434
+ # source://thor//lib/thor/actions/create_file.rb#22
435
+ def add_file(destination, *args, &block); end
436
+
437
+ # Create a new file relative to the destination root from the given source.
438
+ #
439
+ # ==== Parameters
440
+ # destination<String>:: the relative path to the destination root.
441
+ # source<String|NilClass>:: the relative path to the source root.
442
+ # config<Hash>:: give :verbose => false to not log the status.
443
+ # :: give :symbolic => false for hard link.
444
+ #
445
+ # ==== Examples
446
+ #
447
+ # create_link "config/apache.conf", "/etc/apache.conf"
448
+ #
449
+ # source://thor//lib/thor/actions/create_link.rb#17
450
+ def add_link(destination, *args); end
451
+
452
+ # Append text to a file. Since it depends on insert_into_file, it's reversible.
453
+ #
454
+ # ==== Parameters
455
+ # path<String>:: path of the file to be changed
456
+ # data<String>:: the data to append to the file, can be also given as a block.
457
+ # config<Hash>:: give :verbose => false to not log the status.
458
+ #
459
+ # ==== Example
460
+ #
461
+ # append_to_file 'config/environments/test.rb', 'config.gem "rspec"'
462
+ #
463
+ # append_to_file 'config/environments/test.rb' do
464
+ # 'config.gem "rspec"'
465
+ # end
466
+ #
467
+ # source://thor//lib/thor/actions/file_manipulation.rb#195
468
+ def append_file(path, *args, &block); end
469
+
470
+ # Append text to a file. Since it depends on insert_into_file, it's reversible.
471
+ #
472
+ # ==== Parameters
473
+ # path<String>:: path of the file to be changed
474
+ # data<String>:: the data to append to the file, can be also given as a block.
475
+ # config<Hash>:: give :verbose => false to not log the status.
476
+ #
477
+ # ==== Example
478
+ #
479
+ # append_to_file 'config/environments/test.rb', 'config.gem "rspec"'
480
+ #
481
+ # append_to_file 'config/environments/test.rb' do
482
+ # 'config.gem "rspec"'
483
+ # end
484
+ #
485
+ # source://thor//lib/thor/actions/file_manipulation.rb#195
486
+ def append_to_file(path, *args, &block); end
487
+
488
+ # Loads an external file and execute it in the instance binding.
489
+ #
490
+ # ==== Parameters
491
+ # path<String>:: The path to the file to execute. Can be a web address or
492
+ # a relative path from the source root.
493
+ #
494
+ # ==== Examples
495
+ #
496
+ # apply "http://gist.github.com/103208"
497
+ #
498
+ # apply "recipes/jquery.rb"
499
+ #
500
+ # source://thor//lib/thor/actions.rb#216
501
+ def apply(path, config = T.unsafe(nil)); end
502
+
503
+ # Returns the value of attribute behavior.
504
+ #
505
+ # source://thor//lib/thor/actions.rb#10
506
+ def behavior; end
507
+
508
+ # Sets the attribute behavior
509
+ #
510
+ # @param value the value to set the attribute behavior to.
511
+ #
512
+ # source://thor//lib/thor/actions.rb#10
513
+ def behavior=(_arg0); end
514
+
515
+ # Changes the mode of the given file or directory.
516
+ #
517
+ # ==== Parameters
518
+ # mode<Integer>:: the file mode
519
+ # path<String>:: the name of the file to change mode
520
+ # config<Hash>:: give :verbose => false to not log the status.
521
+ #
522
+ # ==== Example
523
+ #
524
+ # chmod "script/server", 0755
525
+ #
526
+ # source://thor//lib/thor/actions/file_manipulation.rb#148
527
+ def chmod(path, mode, config = T.unsafe(nil)); end
528
+
529
+ # Comment all lines matching a given regex. It will leave the space
530
+ # which existed before the beginning of the line in tact and will insert
531
+ # a single space after the comment hash.
532
+ #
533
+ # ==== Parameters
534
+ # path<String>:: path of the file to be changed
535
+ # flag<Regexp|String>:: the regexp or string used to decide which lines to comment
536
+ # config<Hash>:: give :verbose => false to not log the status.
537
+ #
538
+ # ==== Example
539
+ #
540
+ # comment_lines 'config/initializers/session_store.rb', /cookie_store/
541
+ #
542
+ # source://thor//lib/thor/actions/file_manipulation.rb#312
543
+ def comment_lines(path, flag, *args); end
544
+
545
+ # ==== Examples
546
+ #
547
+ # copy_file "README", "doc/README"
548
+ #
549
+ # copy_file "doc/README"
550
+ #
551
+ # source://thor//lib/thor/actions/file_manipulation.rb#21
552
+ def copy_file(source, *args, &block); end
553
+
554
+ # Create a new file relative to the destination root with the given data,
555
+ # which is the return value of a block or a data string.
556
+ #
557
+ # ==== Parameters
558
+ # destination<String>:: the relative path to the destination root.
559
+ # data<String|NilClass>:: the data to append to the file.
560
+ # config<Hash>:: give :verbose => false to not log the status.
561
+ #
562
+ # ==== Examples
563
+ #
564
+ # create_file "lib/fun_party.rb" do
565
+ # hostname = ask("What is the virtual hostname I should use?")
566
+ # "vhost.name = #{hostname}"
567
+ # end
568
+ #
569
+ # create_file "config/apache.conf", "your apache config"
570
+ #
571
+ # source://thor//lib/thor/actions/create_file.rb#22
572
+ def create_file(destination, *args, &block); end
573
+
574
+ # Create a new file relative to the destination root from the given source.
575
+ #
576
+ # ==== Parameters
577
+ # destination<String>:: the relative path to the destination root.
578
+ # source<String|NilClass>:: the relative path to the source root.
579
+ # config<Hash>:: give :verbose => false to not log the status.
580
+ # :: give :symbolic => false for hard link.
581
+ #
582
+ # ==== Examples
583
+ #
584
+ # create_link "config/apache.conf", "/etc/apache.conf"
585
+ #
586
+ # source://thor//lib/thor/actions/create_link.rb#17
587
+ def create_link(destination, *args); end
588
+
589
+ # Returns the root for this thor class (also aliased as destination root).
590
+ #
591
+ # source://thor//lib/thor/actions.rb#99
592
+ def destination_root; end
593
+
594
+ # Sets the root for this thor class. Relatives path are added to the
595
+ # directory where the script was invoked and expanded.
596
+ #
597
+ # source://thor//lib/thor/actions.rb#106
598
+ def destination_root=(root); end
599
+
600
+ # Copies recursively the files from source directory to root directory.
601
+ # If any of the files finishes with .tt, it's considered to be a template
602
+ # and is placed in the destination without the extension .tt. If any
603
+ # empty directory is found, it's copied and all .empty_directory files are
604
+ # ignored. If any file name is wrapped within % signs, the text within
605
+ # the % signs will be executed as a method and replaced with the returned
606
+ # value. Let's suppose a doc directory with the following files:
607
+ #
608
+ # doc/
609
+ # components/.empty_directory
610
+ # README
611
+ # rdoc.rb.tt
612
+ # %app_name%.rb
613
+ #
614
+ # When invoked as:
615
+ #
616
+ # directory "doc"
617
+ #
618
+ # It will create a doc directory in the destination with the following
619
+ # files (assuming that the `app_name` method returns the value "blog"):
620
+ #
621
+ # doc/
622
+ # components/
623
+ # README
624
+ # rdoc.rb
625
+ # blog.rb
626
+ #
627
+ # <b>Encoded path note:</b> Since Thor internals use Object#respond_to? to check if it can
628
+ # expand %something%, this `something` should be a public method in the class calling
629
+ # #directory. If a method is private, Thor stack raises PrivateMethodEncodedError.
630
+ #
631
+ # ==== Parameters
632
+ # source<String>:: the relative path to the source root.
633
+ # destination<String>:: the relative path to the destination root.
634
+ # config<Hash>:: give :verbose => false to not log the status.
635
+ # If :recursive => false, does not look for paths recursively.
636
+ # If :mode => :preserve, preserve the file mode from the source.
637
+ # If :exclude_pattern => /regexp/, prevents copying files that match that regexp.
638
+ #
639
+ # ==== Examples
640
+ #
641
+ # directory "doc"
642
+ # directory "doc", "docs", :recursive => false
643
+ #
644
+ # source://thor//lib/thor/actions/directory.rb#49
645
+ def directory(source, *args, &block); end
646
+
647
+ # Creates an empty directory.
648
+ #
649
+ # ==== Parameters
650
+ # destination<String>:: the relative path to the destination root.
651
+ # config<Hash>:: give :verbose => false to not log the status.
652
+ #
653
+ # ==== Examples
654
+ #
655
+ # empty_directory "doc"
656
+ #
657
+ # source://thor//lib/thor/actions/empty_directory.rb#13
658
+ def empty_directory(destination, config = T.unsafe(nil)); end
659
+
660
+ # Receives a file or directory and search for it in the source paths.
661
+ #
662
+ # @raise [Error]
663
+ #
664
+ # source://thor//lib/thor/actions.rb#133
665
+ def find_in_source_paths(file); end
666
+
667
+ # Gets the content at the given address and places it at the given relative
668
+ # destination. If a block is given instead of destination, the content of
669
+ # the url is yielded and used as location.
670
+ #
671
+ # +get+ relies on open-uri, so passing application user input would provide
672
+ # a command injection attack vector.
673
+ #
674
+ # ==== Parameters
675
+ # source<String>:: the address of the given content.
676
+ # destination<String>:: the relative path to the destination root.
677
+ # config<Hash>:: give :verbose => false to not log the status.
678
+ #
679
+ # ==== Examples
680
+ #
681
+ # get "http://gist.github.com/103208", "doc/README"
682
+ #
683
+ # get "http://gist.github.com/103208" do |content|
684
+ # content.split("\n").first
685
+ # end
686
+ #
687
+ # source://thor//lib/thor/actions/file_manipulation.rb#79
688
+ def get(source, *args, &block); end
689
+
690
+ # Run a regular expression replacement on a file.
691
+ #
692
+ # ==== Parameters
693
+ # path<String>:: path of the file to be changed
694
+ # flag<Regexp|String>:: the regexp or string to be replaced
695
+ # replacement<String>:: the replacement, can be also given as a block
696
+ # config<Hash>:: give :verbose => false to not log the status, and
697
+ # :force => true, to force the replacement regardles of runner behavior.
698
+ #
699
+ # ==== Example
700
+ #
701
+ # gsub_file 'app/controllers/application_controller.rb', /#\s*(filter_parameter_logging :password)/, '\1'
702
+ #
703
+ # gsub_file 'README', /rake/, :green do |match|
704
+ # match << " no more. Use thor!"
705
+ # end
706
+ #
707
+ # source://thor//lib/thor/actions/file_manipulation.rb#265
708
+ def gsub_file(path, flag, *args, &block); end
709
+
710
+ # Goes to the root and execute the given block.
711
+ #
712
+ # source://thor//lib/thor/actions.rb#200
713
+ def in_root; end
714
+
715
+ # Injects text right after the class definition. Since it depends on
716
+ # insert_into_file, it's reversible.
717
+ #
718
+ # ==== Parameters
719
+ # path<String>:: path of the file to be changed
720
+ # klass<String|Class>:: the class to be manipulated
721
+ # data<String>:: the data to append to the class, can be also given as a block.
722
+ # config<Hash>:: give :verbose => false to not log the status.
723
+ #
724
+ # ==== Examples
725
+ #
726
+ # inject_into_class "app/controllers/application_controller.rb", "ApplicationController", " filter_parameter :password\n"
727
+ #
728
+ # inject_into_class "app/controllers/application_controller.rb", "ApplicationController" do
729
+ # " filter_parameter :password\n"
730
+ # end
731
+ #
732
+ # source://thor//lib/thor/actions/file_manipulation.rb#219
733
+ def inject_into_class(path, klass, *args, &block); end
734
+
735
+ # source://thor//lib/thor/actions/inject_into_file.rb#26
736
+ def inject_into_file(destination, *args, &block); end
737
+
738
+ # Injects text right after the module definition. Since it depends on
739
+ # insert_into_file, it's reversible.
740
+ #
741
+ # ==== Parameters
742
+ # path<String>:: path of the file to be changed
743
+ # module_name<String|Class>:: the module to be manipulated
744
+ # data<String>:: the data to append to the class, can be also given as a block.
745
+ # config<Hash>:: give :verbose => false to not log the status.
746
+ #
747
+ # ==== Examples
748
+ #
749
+ # inject_into_module "app/helpers/application_helper.rb", "ApplicationHelper", " def help; 'help'; end\n"
750
+ #
751
+ # inject_into_module "app/helpers/application_helper.rb", "ApplicationHelper" do
752
+ # " def help; 'help'; end\n"
753
+ # end
754
+ #
755
+ # source://thor//lib/thor/actions/file_manipulation.rb#242
756
+ def inject_into_module(path, module_name, *args, &block); end
757
+
758
+ # source://thor//lib/thor/actions/inject_into_file.rb#26
759
+ def insert_into_file(destination, *args, &block); end
760
+
761
+ # Do something in the root or on a provided subfolder. If a relative path
762
+ # is given it's referenced from the current root. The full path is yielded
763
+ # to the block you provide. The path is set back to the previous path when
764
+ # the method exits.
765
+ #
766
+ # Returns the value yielded by the block.
767
+ #
768
+ # ==== Parameters
769
+ # dir<String>:: the directory to move to.
770
+ # config<Hash>:: give :verbose => true to log and use padding.
771
+ #
772
+ # source://thor//lib/thor/actions.rb#170
773
+ def inside(dir = T.unsafe(nil), config = T.unsafe(nil), &block); end
774
+
775
+ # Links the file from the relative source to the relative destination. If
776
+ # the destination is not given it's assumed to be equal to the source.
777
+ #
778
+ # ==== Parameters
779
+ # source<String>:: the relative path to the source root.
780
+ # destination<String>:: the relative path to the destination root.
781
+ # config<Hash>:: give :verbose => false to not log the status.
782
+ #
783
+ # ==== Examples
784
+ #
785
+ # link_file "README", "doc/README"
786
+ #
787
+ # link_file "doc/README"
788
+ #
789
+ # source://thor//lib/thor/actions/file_manipulation.rb#51
790
+ def link_file(source, *args); end
791
+
792
+ # Prepend text to a file. Since it depends on insert_into_file, it's reversible.
793
+ #
794
+ # ==== Parameters
795
+ # path<String>:: path of the file to be changed
796
+ # data<String>:: the data to prepend to the file, can be also given as a block.
797
+ # config<Hash>:: give :verbose => false to not log the status.
798
+ #
799
+ # ==== Example
800
+ #
801
+ # prepend_to_file 'config/environments/test.rb', 'config.gem "rspec"'
802
+ #
803
+ # prepend_to_file 'config/environments/test.rb' do
804
+ # 'config.gem "rspec"'
805
+ # end
806
+ #
807
+ # source://thor//lib/thor/actions/file_manipulation.rb#173
808
+ def prepend_file(path, *args, &block); end
809
+
810
+ # Prepend text to a file. Since it depends on insert_into_file, it's reversible.
811
+ #
812
+ # ==== Parameters
813
+ # path<String>:: path of the file to be changed
814
+ # data<String>:: the data to prepend to the file, can be also given as a block.
815
+ # config<Hash>:: give :verbose => false to not log the status.
816
+ #
817
+ # ==== Example
818
+ #
819
+ # prepend_to_file 'config/environments/test.rb', 'config.gem "rspec"'
820
+ #
821
+ # prepend_to_file 'config/environments/test.rb' do
822
+ # 'config.gem "rspec"'
823
+ # end
824
+ #
825
+ # source://thor//lib/thor/actions/file_manipulation.rb#173
826
+ def prepend_to_file(path, *args, &block); end
827
+
828
+ # Returns the given path relative to the absolute root (ie, root where
829
+ # the script started).
830
+ #
831
+ # source://thor//lib/thor/actions.rb#114
832
+ def relative_to_original_destination_root(path, remove_dot = T.unsafe(nil)); end
833
+
834
+ # Removes a file at the given location.
835
+ #
836
+ # ==== Parameters
837
+ # path<String>:: path of the file to be changed
838
+ # config<Hash>:: give :verbose => false to not log the status.
839
+ #
840
+ # ==== Example
841
+ #
842
+ # remove_file 'README'
843
+ # remove_file 'app/controllers/application_controller.rb'
844
+ #
845
+ # source://thor//lib/thor/actions/file_manipulation.rb#329
846
+ def remove_dir(path, config = T.unsafe(nil)); end
847
+
848
+ # Removes a file at the given location.
849
+ #
850
+ # ==== Parameters
851
+ # path<String>:: path of the file to be changed
852
+ # config<Hash>:: give :verbose => false to not log the status.
853
+ #
854
+ # ==== Example
855
+ #
856
+ # remove_file 'README'
857
+ # remove_file 'app/controllers/application_controller.rb'
858
+ #
859
+ # source://thor//lib/thor/actions/file_manipulation.rb#329
860
+ def remove_file(path, config = T.unsafe(nil)); end
861
+
862
+ # Executes a command returning the contents of the command.
863
+ #
864
+ # ==== Parameters
865
+ # command<String>:: the command to be executed.
866
+ # config<Hash>:: give :verbose => false to not log the status, :capture => true to hide to output. Specify :with
867
+ # to append an executable to command execution.
868
+ #
869
+ # ==== Example
870
+ #
871
+ # inside('vendor') do
872
+ # run('ln -s ~/edge rails')
873
+ # end
874
+ #
875
+ # source://thor//lib/thor/actions.rb#248
876
+ def run(command, config = T.unsafe(nil)); end
877
+
878
+ # Executes a ruby script (taking into account WIN32 platform quirks).
879
+ #
880
+ # ==== Parameters
881
+ # command<String>:: the command to be executed.
882
+ # config<Hash>:: give :verbose => false to not log the status.
883
+ #
884
+ # source://thor//lib/thor/actions.rb#285
885
+ def run_ruby_script(command, config = T.unsafe(nil)); end
886
+
887
+ # Holds source paths in instance so they can be manipulated.
888
+ #
889
+ # source://thor//lib/thor/actions.rb#127
890
+ def source_paths; end
891
+
892
+ # Gets an ERB template at the relative source, executes it and makes a copy
893
+ # at the relative destination. If the destination is not given it's assumed
894
+ # to be equal to the source removing .tt from the filename.
895
+ #
896
+ # ==== Parameters
897
+ # source<String>:: the relative path to the source root.
898
+ # destination<String>:: the relative path to the destination root.
899
+ # config<Hash>:: give :verbose => false to not log the status.
900
+ #
901
+ # ==== Examples
902
+ #
903
+ # template "README", "doc/README"
904
+ #
905
+ # template "doc/README"
906
+ #
907
+ # source://thor//lib/thor/actions/file_manipulation.rb#115
908
+ def template(source, *args, &block); end
909
+
910
+ # Run a thor command. A hash of options can be given and it's converted to
911
+ # switches.
912
+ #
913
+ # ==== Parameters
914
+ # command<String>:: the command to be invoked
915
+ # args<Array>:: arguments to the command
916
+ # config<Hash>:: give :verbose => false to not log the status, :capture => true to hide to output.
917
+ # Other options are given as parameter to Thor.
918
+ #
919
+ #
920
+ # ==== Examples
921
+ #
922
+ # thor :install, "http://gist.github.com/103208"
923
+ # #=> thor install http://gist.github.com/103208
924
+ #
925
+ # thor :list, :all => true, :substring => 'rails'
926
+ # #=> thor list --all --substring=rails
927
+ #
928
+ # source://thor//lib/thor/actions.rb#308
929
+ def thor(command, *args); end
930
+
931
+ # Uncomment all lines matching a given regex. It will leave the space
932
+ # which existed before the comment hash in tact but will remove any spacing
933
+ # between the comment hash and the beginning of the line.
934
+ #
935
+ # ==== Parameters
936
+ # path<String>:: path of the file to be changed
937
+ # flag<Regexp|String>:: the regexp or string used to decide which lines to uncomment
938
+ # config<Hash>:: give :verbose => false to not log the status.
939
+ #
940
+ # ==== Example
941
+ #
942
+ # uncomment_lines 'config/initializers/session_store.rb', /active_record/
943
+ #
944
+ # source://thor//lib/thor/actions/file_manipulation.rb#293
945
+ def uncomment_lines(path, flag, *args); end
946
+
947
+ protected
948
+
949
+ # source://thor//lib/thor/actions.rb#329
950
+ def _cleanup_options_and_set(options, key); end
951
+
952
+ # Allow current root to be shared between invocations.
953
+ #
954
+ # source://thor//lib/thor/actions.rb#325
955
+ def _shared_configuration; end
956
+
957
+ private
958
+
959
+ # source://thor//lib/thor/actions/file_manipulation.rb#350
960
+ def capture(*args); end
961
+
962
+ # source://thor//lib/thor/actions/file_manipulation.rb#346
963
+ def concat(string); end
964
+
965
+ # Returns the value of attribute output_buffer.
966
+ #
967
+ # source://thor//lib/thor/actions/file_manipulation.rb#341
968
+ def output_buffer; end
969
+
970
+ # Sets the attribute output_buffer
971
+ #
972
+ # @param value the value to set the attribute output_buffer to.
973
+ #
974
+ # source://thor//lib/thor/actions/file_manipulation.rb#341
975
+ def output_buffer=(_arg0); end
976
+
977
+ # source://thor//lib/thor/actions/file_manipulation.rb#354
978
+ def with_output_buffer(buf = T.unsafe(nil)); end
979
+
980
+ class << self
981
+ # source://thor//lib/thor/actions.rb#12
982
+ def included(base); end
983
+ end
984
+ end
985
+
986
+ # Thor::Actions#capture depends on what kind of buffer is used in ERB.
987
+ # Thus CapturableERB fixes ERB to use String buffer.
988
+ #
989
+ # source://thor//lib/thor/actions/file_manipulation.rb#366
990
+ class Thor::Actions::CapturableERB < ::ERB
991
+ # source://thor//lib/thor/actions/file_manipulation.rb#367
992
+ def set_eoutvar(compiler, eoutvar = T.unsafe(nil)); end
993
+ end
994
+
995
+ # source://thor//lib/thor/actions.rb#17
996
+ module Thor::Actions::ClassMethods
997
+ # Add runtime options that help actions execution.
998
+ #
999
+ # source://thor//lib/thor/actions.rb#48
1000
+ def add_runtime_options!; end
1001
+
1002
+ # Hold source paths for one Thor instance. source_paths_for_search is the
1003
+ # method responsible to gather source_paths from this current class,
1004
+ # inherited paths and the source root.
1005
+ #
1006
+ # source://thor//lib/thor/actions.rb#22
1007
+ def source_paths; end
1008
+
1009
+ # Returns the source paths in the following order:
1010
+ #
1011
+ # 1) This class source paths
1012
+ # 2) Source root
1013
+ # 3) Parents source paths
1014
+ #
1015
+ # source://thor//lib/thor/actions.rb#38
1016
+ def source_paths_for_search; end
1017
+
1018
+ # Stores and return the source root for this class
1019
+ #
1020
+ # source://thor//lib/thor/actions.rb#27
1021
+ def source_root(path = T.unsafe(nil)); end
1022
+ end
1023
+
1024
+ # CreateFile is a subset of Template, which instead of rendering a file with
1025
+ # ERB, it gets the content from the user.
1026
+ #
1027
+ # source://thor//lib/thor/actions/create_file.rb#32
1028
+ class Thor::Actions::CreateFile < ::Thor::Actions::EmptyDirectory
1029
+ # @return [CreateFile] a new instance of CreateFile
1030
+ #
1031
+ # source://thor//lib/thor/actions/create_file.rb#35
1032
+ def initialize(base, destination, data, config = T.unsafe(nil)); end
1033
+
1034
+ # source://thor//lib/thor/actions/create_file.rb#33
1035
+ def data; end
1036
+
1037
+ # Checks if the content of the file at the destination is identical to the rendered result.
1038
+ #
1039
+ # ==== Returns
1040
+ # Boolean:: true if it is identical, false otherwise.
1041
+ #
1042
+ # @return [Boolean]
1043
+ #
1044
+ # source://thor//lib/thor/actions/create_file.rb#45
1045
+ def identical?; end
1046
+
1047
+ # source://thor//lib/thor/actions/create_file.rb#59
1048
+ def invoke!; end
1049
+
1050
+ # Holds the content to be added to the file.
1051
+ #
1052
+ # source://thor//lib/thor/actions/create_file.rb#51
1053
+ def render; end
1054
+
1055
+ protected
1056
+
1057
+ # Shows the file collision menu to the user and gets the result.
1058
+ #
1059
+ # @return [Boolean]
1060
+ #
1061
+ # source://thor//lib/thor/actions/create_file.rb#99
1062
+ def force_on_collision?; end
1063
+
1064
+ # If force is true, run the action, otherwise check if it's not being
1065
+ # skipped. If both are false, show the file_collision menu, if the menu
1066
+ # returns true, force it, otherwise skip.
1067
+ #
1068
+ # source://thor//lib/thor/actions/create_file.rb#85
1069
+ def force_or_skip_or_conflict(force, skip, &block); end
1070
+
1071
+ # Now on conflict we check if the file is identical or not.
1072
+ #
1073
+ # source://thor//lib/thor/actions/create_file.rb#72
1074
+ def on_conflict_behavior(&block); end
1075
+ end
1076
+
1077
+ # CreateLink is a subset of CreateFile, which instead of taking a block of
1078
+ # data, just takes a source string from the user.
1079
+ #
1080
+ # source://thor//lib/thor/actions/create_link.rb#27
1081
+ class Thor::Actions::CreateLink < ::Thor::Actions::CreateFile
1082
+ # source://thor//lib/thor/actions/create_link.rb#28
1083
+ def data; end
1084
+
1085
+ # @return [Boolean]
1086
+ #
1087
+ # source://thor//lib/thor/actions/create_link.rb#56
1088
+ def exists?; end
1089
+
1090
+ # Checks if the content of the file at the destination is identical to the rendered result.
1091
+ #
1092
+ # ==== Returns
1093
+ # Boolean:: true if it is identical, false otherwise.
1094
+ #
1095
+ # @return [Boolean]
1096
+ #
1097
+ # source://thor//lib/thor/actions/create_link.rb#35
1098
+ def identical?; end
1099
+
1100
+ # source://thor//lib/thor/actions/create_link.rb#40
1101
+ def invoke!; end
1102
+ end
1103
+
1104
+ # source://thor//lib/thor/actions/directory.rb#55
1105
+ class Thor::Actions::Directory < ::Thor::Actions::EmptyDirectory
1106
+ # @return [Directory] a new instance of Directory
1107
+ #
1108
+ # source://thor//lib/thor/actions/directory.rb#58
1109
+ def initialize(base, source, destination = T.unsafe(nil), config = T.unsafe(nil), &block); end
1110
+
1111
+ # source://thor//lib/thor/actions/directory.rb#64
1112
+ def invoke!; end
1113
+
1114
+ # source://thor//lib/thor/actions/directory.rb#69
1115
+ def revoke!; end
1116
+
1117
+ # Returns the value of attribute source.
1118
+ #
1119
+ # source://thor//lib/thor/actions/directory.rb#56
1120
+ def source; end
1121
+
1122
+ protected
1123
+
1124
+ # source://thor//lib/thor/actions/directory.rb#75
1125
+ def execute!; end
1126
+
1127
+ # source://thor//lib/thor/actions/directory.rb#99
1128
+ def file_level_lookup(previous_lookup); end
1129
+
1130
+ # source://thor//lib/thor/actions/directory.rb#103
1131
+ def files(lookup); end
1132
+ end
1133
+
1134
+ # source://thor//lib/thor/actions/empty_directory.rb#23
1135
+ class Thor::Actions::EmptyDirectory
1136
+ # Initializes given the source and destination.
1137
+ #
1138
+ # ==== Parameters
1139
+ # base<Thor::Base>:: A Thor::Base instance
1140
+ # source<String>:: Relative path to the source of this file
1141
+ # destination<String>:: Relative path to the destination of this file
1142
+ # config<Hash>:: give :verbose => false to not log the status.
1143
+ #
1144
+ # @return [EmptyDirectory] a new instance of EmptyDirectory
1145
+ #
1146
+ # source://thor//lib/thor/actions/empty_directory.rb#34
1147
+ def initialize(base, destination, config = T.unsafe(nil)); end
1148
+
1149
+ # source://thor//lib/thor/actions/empty_directory.rb#24
1150
+ def base; end
1151
+
1152
+ # source://thor//lib/thor/actions/empty_directory.rb#24
1153
+ def config; end
1154
+
1155
+ # source://thor//lib/thor/actions/empty_directory.rb#24
1156
+ def destination; end
1157
+
1158
+ # Checks if the destination file already exists.
1159
+ #
1160
+ # ==== Returns
1161
+ # Boolean:: true if the file exists, false otherwise.
1162
+ #
1163
+ # @return [Boolean]
1164
+ #
1165
+ # source://thor//lib/thor/actions/empty_directory.rb#45
1166
+ def exists?; end
1167
+
1168
+ # source://thor//lib/thor/actions/empty_directory.rb#24
1169
+ def given_destination; end
1170
+
1171
+ # source://thor//lib/thor/actions/empty_directory.rb#49
1172
+ def invoke!; end
1173
+
1174
+ # source://thor//lib/thor/actions/empty_directory.rb#24
1175
+ def relative_destination; end
1176
+
1177
+ # source://thor//lib/thor/actions/empty_directory.rb#56
1178
+ def revoke!; end
1179
+
1180
+ protected
1181
+
1182
+ # Filenames in the encoded form are converted. If you have a file:
1183
+ #
1184
+ # %file_name%.rb
1185
+ #
1186
+ # It calls #file_name from the base and replaces %-string with the
1187
+ # return value (should be String) of #file_name:
1188
+ #
1189
+ # user.rb
1190
+ #
1191
+ # The method referenced can be either public or private.
1192
+ #
1193
+ # source://thor//lib/thor/actions/empty_directory.rb#103
1194
+ def convert_encoded_instructions(filename); end
1195
+
1196
+ # Sets the absolute destination value from a relative destination value.
1197
+ # It also stores the given and relative destination. Let's suppose our
1198
+ # script is being executed on "dest", it sets the destination root to
1199
+ # "dest". The destination, given_destination and relative_destination
1200
+ # are related in the following way:
1201
+ #
1202
+ # inside "bar" do
1203
+ # empty_directory "baz"
1204
+ # end
1205
+ #
1206
+ # destination #=> dest/bar/baz
1207
+ # relative_destination #=> bar/baz
1208
+ # given_destination #=> baz
1209
+ #
1210
+ # source://thor//lib/thor/actions/empty_directory.rb#85
1211
+ def destination=(destination); end
1212
+
1213
+ # Receives a hash of options and just execute the block if some
1214
+ # conditions are met.
1215
+ #
1216
+ # source://thor//lib/thor/actions/empty_directory.rb#113
1217
+ def invoke_with_conflict_check(&block); end
1218
+
1219
+ # What to do when the destination file already exists.
1220
+ #
1221
+ # source://thor//lib/thor/actions/empty_directory.rb#132
1222
+ def on_conflict_behavior; end
1223
+
1224
+ # source://thor//lib/thor/actions/empty_directory.rb#126
1225
+ def on_file_clash_behavior; end
1226
+
1227
+ # Shortcut for pretend.
1228
+ #
1229
+ # @return [Boolean]
1230
+ #
1231
+ # source://thor//lib/thor/actions/empty_directory.rb#67
1232
+ def pretend?; end
1233
+
1234
+ # Shortcut to say_status shell method.
1235
+ #
1236
+ # source://thor//lib/thor/actions/empty_directory.rb#138
1237
+ def say_status(status, color); end
1238
+ end
1239
+
1240
+ # source://thor//lib/thor/actions/inject_into_file.rb#36
1241
+ class Thor::Actions::InjectIntoFile < ::Thor::Actions::EmptyDirectory
1242
+ # @return [InjectIntoFile] a new instance of InjectIntoFile
1243
+ #
1244
+ # source://thor//lib/thor/actions/inject_into_file.rb#39
1245
+ def initialize(base, destination, data, config); end
1246
+
1247
+ # Returns the value of attribute behavior.
1248
+ #
1249
+ # source://thor//lib/thor/actions/inject_into_file.rb#37
1250
+ def behavior; end
1251
+
1252
+ # Returns the value of attribute flag.
1253
+ #
1254
+ # source://thor//lib/thor/actions/inject_into_file.rb#37
1255
+ def flag; end
1256
+
1257
+ # source://thor//lib/thor/actions/inject_into_file.rb#52
1258
+ def invoke!; end
1259
+
1260
+ # Returns the value of attribute replacement.
1261
+ #
1262
+ # source://thor//lib/thor/actions/inject_into_file.rb#37
1263
+ def replacement; end
1264
+
1265
+ # source://thor//lib/thor/actions/inject_into_file.rb#72
1266
+ def revoke!; end
1267
+
1268
+ protected
1269
+
1270
+ # Adds the content to the file.
1271
+ #
1272
+ # source://thor//lib/thor/actions/inject_into_file.rb#108
1273
+ def replace!(regexp, string, force); end
1274
+
1275
+ # source://thor//lib/thor/actions/inject_into_file.rb#88
1276
+ def say_status(behavior, warning: T.unsafe(nil), color: T.unsafe(nil)); end
1277
+ end
1278
+
1279
+ # Injects the given content into a file. Different from gsub_file, this
1280
+ # method is reversible.
1281
+ #
1282
+ # ==== Parameters
1283
+ # destination<String>:: Relative path to the destination root
1284
+ # data<String>:: Data to add to the file. Can be given as a block.
1285
+ # config<Hash>:: give :verbose => false to not log the status and the flag
1286
+ # for injection (:after or :before) or :force => true for
1287
+ # insert two or more times the same content.
1288
+ #
1289
+ # ==== Examples
1290
+ #
1291
+ # insert_into_file "config/environment.rb", "config.gem :thor", :after => "Rails::Initializer.run do |config|\n"
1292
+ #
1293
+ # insert_into_file "config/environment.rb", :after => "Rails::Initializer.run do |config|\n" do
1294
+ # gems = ask "Which gems would you like to add?"
1295
+ # gems.split(" ").map{ |gem| " config.gem :#{gem}" }.join("\n")
1296
+ # end
1297
+ #
1298
+ # source://thor//lib/thor/actions/inject_into_file.rb#24
1299
+ Thor::Actions::WARNINGS = T.let(T.unsafe(nil), Hash)
1300
+
1301
+ # source://thor//lib/thor/error.rb#60
1302
+ class Thor::AmbiguousCommandError < ::Thor::Error; end
1303
+
1304
+ # source://thor//lib/thor/error.rb#62
1305
+ Thor::AmbiguousTaskError = Thor::AmbiguousCommandError
1306
+
1307
+ # source://thor//lib/thor/parser/argument.rb#2
1308
+ class Thor::Argument
1309
+ # @raise [ArgumentError]
1310
+ # @return [Argument] a new instance of Argument
1311
+ #
1312
+ # source://thor//lib/thor/parser/argument.rb#8
1313
+ def initialize(name, options = T.unsafe(nil)); end
1314
+
1315
+ # Returns the value of attribute banner.
1316
+ #
1317
+ # source://thor//lib/thor/parser/argument.rb#5
1318
+ def banner; end
1319
+
1320
+ # Returns the value of attribute default.
1321
+ #
1322
+ # source://thor//lib/thor/parser/argument.rb#5
1323
+ def default; end
1324
+
1325
+ # Returns the value of attribute description.
1326
+ #
1327
+ # source://thor//lib/thor/parser/argument.rb#5
1328
+ def description; end
1329
+
1330
+ # Returns the value of attribute enum.
1331
+ #
1332
+ # source://thor//lib/thor/parser/argument.rb#5
1333
+ def enum; end
1334
+
1335
+ # Returns the value of attribute name.
1336
+ #
1337
+ # source://thor//lib/thor/parser/argument.rb#5
1338
+ def human_name; end
1339
+
1340
+ # Returns the value of attribute name.
1341
+ #
1342
+ # source://thor//lib/thor/parser/argument.rb#5
1343
+ def name; end
1344
+
1345
+ # Returns the value of attribute required.
1346
+ #
1347
+ # source://thor//lib/thor/parser/argument.rb#5
1348
+ def required; end
1349
+
1350
+ # @return [Boolean]
1351
+ #
1352
+ # source://thor//lib/thor/parser/argument.rb#31
1353
+ def required?; end
1354
+
1355
+ # @return [Boolean]
1356
+ #
1357
+ # source://thor//lib/thor/parser/argument.rb#35
1358
+ def show_default?; end
1359
+
1360
+ # Returns the value of attribute type.
1361
+ #
1362
+ # source://thor//lib/thor/parser/argument.rb#5
1363
+ def type; end
1364
+
1365
+ # source://thor//lib/thor/parser/argument.rb#27
1366
+ def usage; end
1367
+
1368
+ protected
1369
+
1370
+ # source://thor//lib/thor/parser/argument.rb#55
1371
+ def default_banner; end
1372
+
1373
+ # @return [Boolean]
1374
+ #
1375
+ # source://thor//lib/thor/parser/argument.rb#51
1376
+ def valid_type?(type); end
1377
+
1378
+ # @raise [ArgumentError]
1379
+ #
1380
+ # source://thor//lib/thor/parser/argument.rb#46
1381
+ def validate!; end
1382
+ end
1383
+
1384
+ # source://thor//lib/thor/parser/argument.rb#3
1385
+ Thor::Argument::VALID_TYPES = T.let(T.unsafe(nil), Array)
1386
+
1387
+ # source://thor//lib/thor/parser/arguments.rb#2
1388
+ class Thor::Arguments
1389
+ # Takes an array of Thor::Argument objects.
1390
+ #
1391
+ # @return [Arguments] a new instance of Arguments
1392
+ #
1393
+ # source://thor//lib/thor/parser/arguments.rb#26
1394
+ def initialize(arguments = T.unsafe(nil)); end
1395
+
1396
+ # source://thor//lib/thor/parser/arguments.rb#44
1397
+ def parse(args); end
1398
+
1399
+ # source://thor//lib/thor/parser/arguments.rb#57
1400
+ def remaining; end
1401
+
1402
+ private
1403
+
1404
+ # Raises an error if @non_assigned_required array is not empty.
1405
+ #
1406
+ # @raise [RequiredArgumentMissingError]
1407
+ #
1408
+ # source://thor//lib/thor/parser/arguments.rb#170
1409
+ def check_requirement!; end
1410
+
1411
+ # @return [Boolean]
1412
+ #
1413
+ # source://thor//lib/thor/parser/arguments.rb#88
1414
+ def current_is_value?; end
1415
+
1416
+ # @return [Boolean]
1417
+ #
1418
+ # source://thor//lib/thor/parser/arguments.rb#68
1419
+ def last?; end
1420
+
1421
+ # @return [Boolean]
1422
+ #
1423
+ # source://thor//lib/thor/parser/arguments.rb#63
1424
+ def no_or_skip?(arg); end
1425
+
1426
+ # Runs through the argument array getting all strings until no string is
1427
+ # found or a switch is found.
1428
+ #
1429
+ # ["a", "b", "c"]
1430
+ #
1431
+ # And returns it as an array:
1432
+ #
1433
+ # ["a", "b", "c"]
1434
+ #
1435
+ # source://thor//lib/thor/parser/arguments.rb#122
1436
+ def parse_array(name); end
1437
+
1438
+ # Runs through the argument array getting strings that contains ":" and
1439
+ # mark it as a hash:
1440
+ #
1441
+ # [ "name:string", "age:integer" ]
1442
+ #
1443
+ # Becomes:
1444
+ #
1445
+ # { "name" => "string", "age" => "integer" }
1446
+ #
1447
+ # source://thor//lib/thor/parser/arguments.rb#101
1448
+ def parse_hash(name); end
1449
+
1450
+ # Check if the peek is numeric format and return a Float or Integer.
1451
+ # Check if the peek is included in enum if enum is provided.
1452
+ # Otherwise raises an error.
1453
+ #
1454
+ # source://thor//lib/thor/parser/arguments.rb#133
1455
+ def parse_numeric(name); end
1456
+
1457
+ # Parse string:
1458
+ # for --string-arg, just return the current value in the pile
1459
+ # for --no-string-arg, nil
1460
+ # Check if the peek is included in enum if enum is provided. Otherwise raises an error.
1461
+ #
1462
+ # source://thor//lib/thor/parser/arguments.rb#154
1463
+ def parse_string(name); end
1464
+
1465
+ # source://thor//lib/thor/parser/arguments.rb#72
1466
+ def peek; end
1467
+
1468
+ # source://thor//lib/thor/parser/arguments.rb#76
1469
+ def shift; end
1470
+
1471
+ # source://thor//lib/thor/parser/arguments.rb#80
1472
+ def unshift(arg); end
1473
+
1474
+ class << self
1475
+ # source://thor//lib/thor/parser/arguments.rb#19
1476
+ def parse(*args); end
1477
+
1478
+ # Receives an array of args and returns two arrays, one with arguments
1479
+ # and one with switches.
1480
+ #
1481
+ # source://thor//lib/thor/parser/arguments.rb#8
1482
+ def split(args); end
1483
+ end
1484
+ end
1485
+
1486
+ # source://thor//lib/thor/parser/arguments.rb#3
1487
+ Thor::Arguments::NUMERIC = T.let(T.unsafe(nil), Regexp)
1488
+
1489
+ # source://thor//lib/thor/shell.rb#4
1490
+ module Thor::Base
1491
+ include ::Thor::Invocation
1492
+ include ::Thor::Shell
1493
+
1494
+ mixes_in_class_methods ::Thor::Base::ClassMethods
1495
+ mixes_in_class_methods ::Thor::Invocation::ClassMethods
1496
+
1497
+ # It receives arguments in an Array and two hashes, one for options and
1498
+ # other for configuration.
1499
+ #
1500
+ # Notice that it does not check if all required arguments were supplied.
1501
+ # It should be done by the parser.
1502
+ #
1503
+ # ==== Parameters
1504
+ # args<Array[Object]>:: An array of objects. The objects are applied to their
1505
+ # respective accessors declared with <tt>argument</tt>.
1506
+ #
1507
+ # options<Hash>:: An options hash that will be available as self.options.
1508
+ # The hash given is converted to a hash with indifferent
1509
+ # access, magic predicates (options.skip?) and then frozen.
1510
+ #
1511
+ # config<Hash>:: Configuration for this Thor class.
1512
+ #
1513
+ # source://thor//lib/thor/base.rb#53
1514
+ def initialize(args = T.unsafe(nil), local_options = T.unsafe(nil), config = T.unsafe(nil)); end
1515
+
1516
+ # Returns the value of attribute args.
1517
+ #
1518
+ # source://thor//lib/thor/base.rb#35
1519
+ def args; end
1520
+
1521
+ # Sets the attribute args
1522
+ #
1523
+ # @param value the value to set the attribute args to.
1524
+ #
1525
+ # source://thor//lib/thor/base.rb#35
1526
+ def args=(_arg0); end
1527
+
1528
+ # Returns the value of attribute options.
1529
+ #
1530
+ # source://thor//lib/thor/base.rb#35
1531
+ def options; end
1532
+
1533
+ # Sets the attribute options
1534
+ #
1535
+ # @param value the value to set the attribute options to.
1536
+ #
1537
+ # source://thor//lib/thor/base.rb#35
1538
+ def options=(_arg0); end
1539
+
1540
+ # Returns the value of attribute parent_options.
1541
+ #
1542
+ # source://thor//lib/thor/base.rb#35
1543
+ def parent_options; end
1544
+
1545
+ # Sets the attribute parent_options
1546
+ #
1547
+ # @param value the value to set the attribute parent_options to.
1548
+ #
1549
+ # source://thor//lib/thor/base.rb#35
1550
+ def parent_options=(_arg0); end
1551
+
1552
+ class << self
1553
+ # source://thor//lib/thor/base.rb#100
1554
+ def included(base); end
1555
+
1556
+ # Whenever a class inherits from Thor or Thor::Group, we should track the
1557
+ # class and the file on Thor::Base. This is the method responsible for it.
1558
+ #
1559
+ # source://thor//lib/thor/base.rb#128
1560
+ def register_klass_file(klass); end
1561
+
1562
+ # Returns the shell used in all Thor classes. If you are in a Unix platform
1563
+ # it will use a colored log, otherwise it will use a basic one without color.
1564
+ #
1565
+ # source://thor//lib/thor/shell.rb#11
1566
+ def shell; end
1567
+
1568
+ # Sets the attribute shell
1569
+ #
1570
+ # @param value the value to set the attribute shell to.
1571
+ #
1572
+ # source://thor//lib/thor/shell.rb#6
1573
+ def shell=(_arg0); end
1574
+
1575
+ # Returns the files where the subclasses are kept.
1576
+ #
1577
+ # ==== Returns
1578
+ # Hash[path<String> => Class]
1579
+ #
1580
+ # source://thor//lib/thor/base.rb#121
1581
+ def subclass_files; end
1582
+
1583
+ # Returns the classes that inherits from Thor or Thor::Group.
1584
+ #
1585
+ # ==== Returns
1586
+ # Array[Class]
1587
+ #
1588
+ # source://thor//lib/thor/base.rb#112
1589
+ def subclasses; end
1590
+ end
1591
+ end
1592
+
1593
+ # source://thor//lib/thor/base.rb#137
1594
+ module Thor::Base::ClassMethods
1595
+ # Returns the commands for this Thor class and all subclasses.
1596
+ #
1597
+ # ==== Returns
1598
+ # Hash:: An ordered hash with commands names as keys and Thor::Command
1599
+ # objects as values.
1600
+ #
1601
+ # source://thor//lib/thor/base.rb#383
1602
+ def all_commands; end
1603
+
1604
+ # Returns the commands for this Thor class and all subclasses.
1605
+ #
1606
+ # ==== Returns
1607
+ # Hash:: An ordered hash with commands names as keys and Thor::Command
1608
+ # objects as values.
1609
+ #
1610
+ # source://thor//lib/thor/base.rb#383
1611
+ def all_tasks; end
1612
+
1613
+ # If you want to use defaults that don't match the type of an option,
1614
+ # either specify `check_default_type: false` or call `allow_incompatible_default_type!`
1615
+ #
1616
+ # source://thor//lib/thor/base.rb#173
1617
+ def allow_incompatible_default_type!; end
1618
+
1619
+ # Adds an argument to the class and creates an attr_accessor for it.
1620
+ #
1621
+ # Arguments are different from options in several aspects. The first one
1622
+ # is how they are parsed from the command line, arguments are retrieved
1623
+ # from position:
1624
+ #
1625
+ # thor command NAME
1626
+ #
1627
+ # Instead of:
1628
+ #
1629
+ # thor command --name=NAME
1630
+ #
1631
+ # Besides, arguments are used inside your code as an accessor (self.argument),
1632
+ # while options are all kept in a hash (self.options).
1633
+ #
1634
+ # Finally, arguments cannot have type :default or :boolean but can be
1635
+ # optional (supplying :optional => :true or :required => false), although
1636
+ # you cannot have a required argument after a non-required argument. If you
1637
+ # try it, an error is raised.
1638
+ #
1639
+ # ==== Parameters
1640
+ # name<Symbol>:: The name of the argument.
1641
+ # options<Hash>:: Described below.
1642
+ #
1643
+ # ==== Options
1644
+ # :desc - Description for the argument.
1645
+ # :required - If the argument is required or not.
1646
+ # :optional - If the argument is optional or not.
1647
+ # :type - The type of the argument, can be :string, :hash, :array, :numeric.
1648
+ # :default - Default value for this argument. It cannot be required and have default values.
1649
+ # :banner - String to show on usage notes.
1650
+ #
1651
+ # ==== Errors
1652
+ # ArgumentError:: Raised if you supply a required argument after a non required one.
1653
+ #
1654
+ # source://thor//lib/thor/base.rb#245
1655
+ def argument(name, options = T.unsafe(nil)); end
1656
+
1657
+ # Returns this class arguments, looking up in the ancestors chain.
1658
+ #
1659
+ # ==== Returns
1660
+ # Array[Thor::Argument]
1661
+ #
1662
+ # source://thor//lib/thor/base.rb#277
1663
+ def arguments; end
1664
+
1665
+ # source://thor//lib/thor/base.rb#146
1666
+ def attr_accessor(*_arg0); end
1667
+
1668
+ # source://thor//lib/thor/base.rb#138
1669
+ def attr_reader(*_arg0); end
1670
+
1671
+ # source://thor//lib/thor/base.rb#142
1672
+ def attr_writer(*_arg0); end
1673
+
1674
+ # source://thor//lib/thor/base.rb#177
1675
+ def check_default_type; end
1676
+
1677
+ # If you want to raise an error when the default value of an option does not match
1678
+ # the type call check_default_type!
1679
+ # This will be the default; for compatibility a deprecation warning is issued if necessary.
1680
+ #
1681
+ # source://thor//lib/thor/base.rb#167
1682
+ def check_default_type!; end
1683
+
1684
+ # source://thor//lib/thor/base.rb#156
1685
+ def check_unknown_options; end
1686
+
1687
+ # If you want to raise an error for unknown options, call check_unknown_options!
1688
+ # This is disabled by default to allow dynamic invocations.
1689
+ #
1690
+ # source://thor//lib/thor/base.rb#152
1691
+ def check_unknown_options!; end
1692
+
1693
+ # @return [Boolean]
1694
+ #
1695
+ # source://thor//lib/thor/base.rb#160
1696
+ def check_unknown_options?(config); end
1697
+
1698
+ # Adds an option to the set of class options
1699
+ #
1700
+ # ==== Parameters
1701
+ # name<Symbol>:: The name of the argument.
1702
+ # options<Hash>:: Described below.
1703
+ #
1704
+ # ==== Options
1705
+ # :desc:: -- Description for the argument.
1706
+ # :required:: -- If the argument is required or not.
1707
+ # :default:: -- Default value for this argument.
1708
+ # :group:: -- The group for this options. Use by class options to output options in different levels.
1709
+ # :aliases:: -- Aliases for this option. <b>Note:</b> Thor follows a convention of one-dash-one-letter options. Thus aliases like "-something" wouldn't be parsed; use either "\--something" or "-s" instead.
1710
+ # :type:: -- The type of the argument, can be :string, :hash, :array, :numeric or :boolean.
1711
+ # :banner:: -- String to show on usage notes.
1712
+ # :hide:: -- If you want to hide this option from the help.
1713
+ #
1714
+ # source://thor//lib/thor/base.rb#312
1715
+ def class_option(name, options = T.unsafe(nil)); end
1716
+
1717
+ # Adds a bunch of options to the set of class options.
1718
+ #
1719
+ # class_options :foo => false, :bar => :required, :baz => :string
1720
+ #
1721
+ # If you prefer more detailed declaration, check class_option.
1722
+ #
1723
+ # ==== Parameters
1724
+ # Hash[Symbol => Object]
1725
+ #
1726
+ # source://thor//lib/thor/base.rb#290
1727
+ def class_options(options = T.unsafe(nil)); end
1728
+
1729
+ # Returns the commands for this Thor class.
1730
+ #
1731
+ # ==== Returns
1732
+ # Hash:: An ordered hash with commands names as keys and Thor::Command
1733
+ # objects as values.
1734
+ #
1735
+ # source://thor//lib/thor/base.rb#372
1736
+ def commands; end
1737
+
1738
+ # If true, option set will not suspend the execution of the command when
1739
+ # a required option is not provided.
1740
+ #
1741
+ # @return [Boolean]
1742
+ #
1743
+ # source://thor//lib/thor/base.rb#191
1744
+ def disable_required_check?(command_name); end
1745
+
1746
+ # A flag that makes the process exit with status 1 if any error happens.
1747
+ #
1748
+ # @return [Boolean]
1749
+ #
1750
+ # source://thor//lib/thor/base.rb#529
1751
+ def exit_on_failure?; end
1752
+
1753
+ # Defines the group. This is used when thor list is invoked so you can specify
1754
+ # that only commands from a pre-defined group will be shown. Defaults to standard.
1755
+ #
1756
+ # ==== Parameters
1757
+ # name<String|Symbol>
1758
+ #
1759
+ # source://thor//lib/thor/base.rb#358
1760
+ def group(name = T.unsafe(nil)); end
1761
+
1762
+ # @raise [InvocationError]
1763
+ #
1764
+ # source://thor//lib/thor/base.rb#519
1765
+ def handle_argument_error(command, error, args, arity); end
1766
+
1767
+ # @raise [UndefinedCommandError]
1768
+ #
1769
+ # source://thor//lib/thor/base.rb#514
1770
+ def handle_no_command_error(command, has_namespace = T.unsafe(nil)); end
1771
+
1772
+ # @raise [UndefinedCommandError]
1773
+ #
1774
+ # source://thor//lib/thor/base.rb#514
1775
+ def handle_no_task_error(command, has_namespace = T.unsafe(nil)); end
1776
+
1777
+ # Sets the namespace for the Thor or Thor::Group class. By default the
1778
+ # namespace is retrieved from the class name. If your Thor class is named
1779
+ # Scripts::MyScript, the help method, for example, will be called as:
1780
+ #
1781
+ # thor scripts:my_script -h
1782
+ #
1783
+ # If you change the namespace:
1784
+ #
1785
+ # namespace :my_scripts
1786
+ #
1787
+ # You change how your commands are invoked:
1788
+ #
1789
+ # thor my_scripts -h
1790
+ #
1791
+ # Finally, if you change your namespace to default:
1792
+ #
1793
+ # namespace :default
1794
+ #
1795
+ # Your commands can be invoked with a shortcut. Instead of:
1796
+ #
1797
+ # thor :my_command
1798
+ #
1799
+ # source://thor//lib/thor/base.rb#467
1800
+ def namespace(name = T.unsafe(nil)); end
1801
+
1802
+ # All methods defined inside the given block are not added as commands.
1803
+ #
1804
+ # So you can do:
1805
+ #
1806
+ # class MyScript < Thor
1807
+ # no_commands do
1808
+ # def this_is_not_a_command
1809
+ # end
1810
+ # end
1811
+ # end
1812
+ #
1813
+ # You can also add the method and remove it from the command list:
1814
+ #
1815
+ # class MyScript < Thor
1816
+ # def this_is_not_a_command
1817
+ # end
1818
+ # remove_command :this_is_not_a_command
1819
+ # end
1820
+ #
1821
+ # source://thor//lib/thor/base.rb#431
1822
+ def no_commands(&block); end
1823
+
1824
+ # @return [Boolean]
1825
+ #
1826
+ # source://thor//lib/thor/base.rb#441
1827
+ def no_commands?; end
1828
+
1829
+ # source://thor//lib/thor/base.rb#437
1830
+ def no_commands_context; end
1831
+
1832
+ # All methods defined inside the given block are not added as commands.
1833
+ #
1834
+ # So you can do:
1835
+ #
1836
+ # class MyScript < Thor
1837
+ # no_commands do
1838
+ # def this_is_not_a_command
1839
+ # end
1840
+ # end
1841
+ # end
1842
+ #
1843
+ # You can also add the method and remove it from the command list:
1844
+ #
1845
+ # class MyScript < Thor
1846
+ # def this_is_not_a_command
1847
+ # end
1848
+ # remove_command :this_is_not_a_command
1849
+ # end
1850
+ #
1851
+ # source://thor//lib/thor/base.rb#431
1852
+ def no_tasks(&block); end
1853
+
1854
+ # Allows to use private methods from parent in child classes as commands.
1855
+ #
1856
+ # ==== Parameters
1857
+ # names<Array>:: Method names to be used as commands
1858
+ #
1859
+ # ==== Examples
1860
+ #
1861
+ # public_command :foo
1862
+ # public_command :foo, :bar, :baz
1863
+ #
1864
+ # source://thor//lib/thor/base.rb#507
1865
+ def public_command(*names); end
1866
+
1867
+ # Allows to use private methods from parent in child classes as commands.
1868
+ #
1869
+ # ==== Parameters
1870
+ # names<Array>:: Method names to be used as commands
1871
+ #
1872
+ # ==== Examples
1873
+ #
1874
+ # public_command :foo
1875
+ # public_command :foo, :bar, :baz
1876
+ #
1877
+ # source://thor//lib/thor/base.rb#507
1878
+ def public_task(*names); end
1879
+
1880
+ # Removes a previous defined argument. If :undefine is given, undefine
1881
+ # accessors as well.
1882
+ #
1883
+ # ==== Parameters
1884
+ # names<Array>:: Arguments to be removed
1885
+ #
1886
+ # ==== Examples
1887
+ #
1888
+ # remove_argument :foo
1889
+ # remove_argument :foo, :bar, :baz, :undefine => true
1890
+ #
1891
+ # source://thor//lib/thor/base.rb#327
1892
+ def remove_argument(*names); end
1893
+
1894
+ # Removes a previous defined class option.
1895
+ #
1896
+ # ==== Parameters
1897
+ # names<Array>:: Class options to be removed
1898
+ #
1899
+ # ==== Examples
1900
+ #
1901
+ # remove_class_option :foo
1902
+ # remove_class_option :foo, :bar, :baz
1903
+ #
1904
+ # source://thor//lib/thor/base.rb#346
1905
+ def remove_class_option(*names); end
1906
+
1907
+ # Removes a given command from this Thor class. This is usually done if you
1908
+ # are inheriting from another class and don't want it to be available
1909
+ # anymore.
1910
+ #
1911
+ # By default it only remove the mapping to the command. But you can supply
1912
+ # :undefine => true to undefine the method from the class as well.
1913
+ #
1914
+ # ==== Parameters
1915
+ # name<Symbol|String>:: The name of the command to be removed
1916
+ # options<Hash>:: You can give :undefine => true if you want commands the method
1917
+ # to be undefined from the class as well.
1918
+ #
1919
+ # source://thor//lib/thor/base.rb#401
1920
+ def remove_command(*names); end
1921
+
1922
+ # Removes a given command from this Thor class. This is usually done if you
1923
+ # are inheriting from another class and don't want it to be available
1924
+ # anymore.
1925
+ #
1926
+ # By default it only remove the mapping to the command. But you can supply
1927
+ # :undefine => true to undefine the method from the class as well.
1928
+ #
1929
+ # ==== Parameters
1930
+ # name<Symbol|String>:: The name of the command to be removed
1931
+ # options<Hash>:: You can give :undefine => true if you want commands the method
1932
+ # to be undefined from the class as well.
1933
+ #
1934
+ # source://thor//lib/thor/base.rb#401
1935
+ def remove_task(*names); end
1936
+
1937
+ # Parses the command and options from the given args, instantiate the class
1938
+ # and invoke the command. This method is used when the arguments must be parsed
1939
+ # from an array. If you are inside Ruby and want to use a Thor class, you
1940
+ # can simply initialize it:
1941
+ #
1942
+ # script = MyScript.new(args, options, config)
1943
+ # script.invoke(:command, first_arg, second_arg, third_arg)
1944
+ #
1945
+ # source://thor//lib/thor/base.rb#483
1946
+ def start(given_args = T.unsafe(nil), config = T.unsafe(nil)); end
1947
+
1948
+ # If true, option parsing is suspended as soon as an unknown option or a
1949
+ # regular argument is encountered. All remaining arguments are passed to
1950
+ # the command as regular arguments.
1951
+ #
1952
+ # @return [Boolean]
1953
+ #
1954
+ # source://thor//lib/thor/base.rb#185
1955
+ def stop_on_unknown_option?(command_name); end
1956
+
1957
+ # source://thor//lib/thor/base.rb#202
1958
+ def strict_args_position; end
1959
+
1960
+ # If you want only strict string args (useful when cascading thor classes),
1961
+ # call strict_args_position! This is disabled by default to allow dynamic
1962
+ # invocations.
1963
+ #
1964
+ # source://thor//lib/thor/base.rb#198
1965
+ def strict_args_position!; end
1966
+
1967
+ # @return [Boolean]
1968
+ #
1969
+ # source://thor//lib/thor/base.rb#206
1970
+ def strict_args_position?(config); end
1971
+
1972
+ # Returns the commands for this Thor class.
1973
+ #
1974
+ # ==== Returns
1975
+ # Hash:: An ordered hash with commands names as keys and Thor::Command
1976
+ # objects as values.
1977
+ #
1978
+ # source://thor//lib/thor/base.rb#372
1979
+ def tasks; end
1980
+
1981
+ protected
1982
+
1983
+ # SIGNATURE: Sets the baseclass. This is where the superclass lookup
1984
+ # finishes.
1985
+ #
1986
+ # source://thor//lib/thor/base.rb#679
1987
+ def baseclass; end
1988
+
1989
+ # The basename of the program invoking the thor class.
1990
+ #
1991
+ # source://thor//lib/thor/base.rb#673
1992
+ def basename; end
1993
+
1994
+ # Build an option and adds it to the given scope.
1995
+ #
1996
+ # ==== Parameters
1997
+ # name<Symbol>:: The name of the argument.
1998
+ # options<Hash>:: Described in both class_option and method_option.
1999
+ # scope<Hash>:: Options hash that is being built up
2000
+ #
2001
+ # source://thor//lib/thor/base.rb#590
2002
+ def build_option(name, options, scope); end
2003
+
2004
+ # Receives a hash of options, parse them and add to the scope. This is a
2005
+ # fast way to set a bunch of options:
2006
+ #
2007
+ # build_options :foo => true, :bar => :required, :baz => :string
2008
+ #
2009
+ # ==== Parameters
2010
+ # Hash[Symbol => Object]
2011
+ #
2012
+ # source://thor//lib/thor/base.rb#601
2013
+ def build_options(options, scope); end
2014
+
2015
+ # Prints the class options per group. If an option does not belong to
2016
+ # any group, it's printed as Class option.
2017
+ #
2018
+ # source://thor//lib/thor/base.rb#539
2019
+ def class_options_help(shell, groups = T.unsafe(nil)); end
2020
+
2021
+ # SIGNATURE: Creates a new command if valid_command? is true. This method is
2022
+ # called when a new method is added to the class.
2023
+ #
2024
+ # source://thor//lib/thor/base.rb#684
2025
+ def create_command(meth); end
2026
+
2027
+ # SIGNATURE: Creates a new command if valid_command? is true. This method is
2028
+ # called when a new method is added to the class.
2029
+ #
2030
+ # source://thor//lib/thor/base.rb#684
2031
+ def create_task(meth); end
2032
+
2033
+ # SIGNATURE: The hook invoked by start.
2034
+ #
2035
+ # @raise [NotImplementedError]
2036
+ #
2037
+ # source://thor//lib/thor/base.rb#694
2038
+ def dispatch(command, given_args, given_opts, config); end
2039
+
2040
+ # Finds a command with the given name. If the command belongs to the current
2041
+ # class, just return it, otherwise dup it and add the fresh copy to the
2042
+ # current command hash.
2043
+ #
2044
+ # source://thor//lib/thor/base.rb#610
2045
+ def find_and_refresh_command(name); end
2046
+
2047
+ # Finds a command with the given name. If the command belongs to the current
2048
+ # class, just return it, otherwise dup it and add the fresh copy to the
2049
+ # current command hash.
2050
+ #
2051
+ # source://thor//lib/thor/base.rb#610
2052
+ def find_and_refresh_task(name); end
2053
+
2054
+ # Retrieves a value from superclass. If it reaches the baseclass,
2055
+ # returns default.
2056
+ #
2057
+ # source://thor//lib/thor/base.rb#651
2058
+ def from_superclass(method, default = T.unsafe(nil)); end
2059
+
2060
+ # Everytime someone inherits from a Thor class, register the klass
2061
+ # and file into baseclass.
2062
+ #
2063
+ # source://thor//lib/thor/base.rb#623
2064
+ def inherited(klass); end
2065
+
2066
+ # SIGNATURE: Defines behavior when the initialize method is added to the
2067
+ # class.
2068
+ #
2069
+ # source://thor//lib/thor/base.rb#690
2070
+ def initialize_added; end
2071
+
2072
+ # Raises an error if the word given is a Thor reserved word.
2073
+ #
2074
+ # @return [Boolean]
2075
+ #
2076
+ # source://thor//lib/thor/base.rb#579
2077
+ def is_thor_reserved_word?(word, type); end
2078
+
2079
+ # Fire this callback whenever a method is added. Added methods are
2080
+ # tracked as commands by invoking the create_command method.
2081
+ #
2082
+ # source://thor//lib/thor/base.rb#631
2083
+ def method_added(meth); end
2084
+
2085
+ # Receives a set of options and print them.
2086
+ #
2087
+ # source://thor//lib/thor/base.rb#557
2088
+ def print_options(shell, options, group_name = T.unsafe(nil)); end
2089
+ end
2090
+
2091
+ # source://thor//lib/thor/command.rb#2
2092
+ class Thor::Command < ::Struct
2093
+ # @return [Command] a new instance of Command
2094
+ #
2095
+ # source://thor//lib/thor/command.rb#5
2096
+ def initialize(name, description, long_description, usage, options = T.unsafe(nil)); end
2097
+
2098
+ # Returns the formatted usage by injecting given required arguments
2099
+ # and required options into the given usage.
2100
+ #
2101
+ # source://thor//lib/thor/command.rb#41
2102
+ def formatted_usage(klass, namespace = T.unsafe(nil), subcommand = T.unsafe(nil)); end
2103
+
2104
+ # @return [Boolean]
2105
+ #
2106
+ # source://thor//lib/thor/command.rb#14
2107
+ def hidden?; end
2108
+
2109
+ # By default, a command invokes a method in the thor class. You can change this
2110
+ # implementation to create custom commands.
2111
+ #
2112
+ # source://thor//lib/thor/command.rb#20
2113
+ def run(instance, args = T.unsafe(nil)); end
2114
+
2115
+ protected
2116
+
2117
+ # @return [Boolean]
2118
+ #
2119
+ # source://thor//lib/thor/command.rb#105
2120
+ def handle_argument_error?(instance, error, caller); end
2121
+
2122
+ # @return [Boolean]
2123
+ #
2124
+ # source://thor//lib/thor/command.rb#112
2125
+ def handle_no_method_error?(instance, error, caller); end
2126
+
2127
+ # @return [Boolean]
2128
+ #
2129
+ # source://thor//lib/thor/command.rb#95
2130
+ def local_method?(instance, name); end
2131
+
2132
+ # @return [Boolean]
2133
+ #
2134
+ # source://thor//lib/thor/command.rb#78
2135
+ def not_debugging?(instance); end
2136
+
2137
+ # @return [Boolean]
2138
+ #
2139
+ # source://thor//lib/thor/command.rb#91
2140
+ def private_method?(instance); end
2141
+
2142
+ # Given a target, checks if this class name is a public method.
2143
+ #
2144
+ # @return [Boolean]
2145
+ #
2146
+ # source://thor//lib/thor/command.rb#87
2147
+ def public_method?(instance); end
2148
+
2149
+ # Add usage with required arguments
2150
+ #
2151
+ # source://thor//lib/thor/command.rb#68
2152
+ def required_arguments_for(klass, usage); end
2153
+
2154
+ # source://thor//lib/thor/command.rb#82
2155
+ def required_options; end
2156
+
2157
+ # source://thor//lib/thor/command.rb#100
2158
+ def sans_backtrace(backtrace, caller); end
2159
+
2160
+ private
2161
+
2162
+ # source://thor//lib/thor/command.rb#9
2163
+ def initialize_copy(other); end
2164
+ end
2165
+
2166
+ # source://thor//lib/thor/command.rb#3
2167
+ Thor::Command::FILE_REGEXP = T.let(T.unsafe(nil), Regexp)
2168
+
2169
+ # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#2
2170
+ module Thor::CoreExt; end
2171
+
2172
+ # A hash with indifferent access and magic predicates.
2173
+ #
2174
+ # hash = Thor::CoreExt::HashWithIndifferentAccess.new 'foo' => 'bar', 'baz' => 'bee', 'force' => true
2175
+ #
2176
+ # hash[:foo] #=> 'bar'
2177
+ # hash['foo'] #=> 'bar'
2178
+ # hash.foo? #=> true
2179
+ #
2180
+ # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#11
2181
+ class Thor::CoreExt::HashWithIndifferentAccess < ::Hash
2182
+ # @return [HashWithIndifferentAccess] a new instance of HashWithIndifferentAccess
2183
+ #
2184
+ # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#12
2185
+ def initialize(hash = T.unsafe(nil)); end
2186
+
2187
+ # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#19
2188
+ def [](key); end
2189
+
2190
+ # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#23
2191
+ def []=(key, value); end
2192
+
2193
+ # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#27
2194
+ def delete(key); end
2195
+
2196
+ # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#31
2197
+ def except(*keys); end
2198
+
2199
+ # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#37
2200
+ def fetch(key, *args); end
2201
+
2202
+ # @return [Boolean]
2203
+ #
2204
+ # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#41
2205
+ def key?(key); end
2206
+
2207
+ # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#49
2208
+ def merge(other); end
2209
+
2210
+ # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#53
2211
+ def merge!(other); end
2212
+
2213
+ # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#68
2214
+ def replace(other_hash); end
2215
+
2216
+ # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#60
2217
+ def reverse_merge(other); end
2218
+
2219
+ # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#64
2220
+ def reverse_merge!(other_hash); end
2221
+
2222
+ # Convert to a Hash with String keys.
2223
+ #
2224
+ # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#73
2225
+ def to_hash; end
2226
+
2227
+ # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#45
2228
+ def values_at(*indices); end
2229
+
2230
+ protected
2231
+
2232
+ # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#79
2233
+ def convert_key(key); end
2234
+
2235
+ # Magic predicates. For instance:
2236
+ #
2237
+ # options.force? # => !!options['force']
2238
+ # options.shebang # => "/usr/lib/local/ruby"
2239
+ # options.test_framework?(:rspec) # => options[:test_framework] == :rspec
2240
+ #
2241
+ # source://thor//lib/thor/core_ext/hash_with_indifferent_access.rb#89
2242
+ def method_missing(method, *args); end
2243
+ end
2244
+
2245
+ # source://thor//lib/thor/error.rb#2
2246
+ Thor::Correctable = DidYouMean::Correctable
2247
+
2248
+ # A dynamic command that handles method missing scenarios.
2249
+ #
2250
+ # source://thor//lib/thor/command.rb#128
2251
+ class Thor::DynamicCommand < ::Thor::Command
2252
+ # @return [DynamicCommand] a new instance of DynamicCommand
2253
+ #
2254
+ # source://thor//lib/thor/command.rb#129
2255
+ def initialize(name, options = T.unsafe(nil)); end
2256
+
2257
+ # source://thor//lib/thor/command.rb#133
2258
+ def run(instance, args = T.unsafe(nil)); end
2259
+ end
2260
+
2261
+ # source://thor//lib/thor/command.rb#141
2262
+ Thor::DynamicTask = Thor::DynamicCommand
2263
+
2264
+ # Thor::Error is raised when it's caused by wrong usage of thor classes. Those
2265
+ # errors have their backtrace suppressed and are nicely shown to the user.
2266
+ #
2267
+ # Errors that are caused by the developer, like declaring a method which
2268
+ # overwrites a thor keyword, SHOULD NOT raise a Thor::Error. This way, we
2269
+ # ensure that developer errors are shown with full backtrace.
2270
+ #
2271
+ # source://thor//lib/thor/error.rb#23
2272
+ class Thor::Error < ::StandardError; end
2273
+
2274
+ # Thor has a special class called Thor::Group. The main difference to Thor class
2275
+ # is that it invokes all commands at once. It also include some methods that allows
2276
+ # invocations to be done at the class method, which are not available to Thor
2277
+ # commands.
2278
+ #
2279
+ # source://thor//lib/thor/group.rb#7
2280
+ class Thor::Group
2281
+ include ::Thor::Base
2282
+ include ::Thor::Invocation
2283
+ include ::Thor::Shell
2284
+ extend ::Thor::Base::ClassMethods
2285
+ extend ::Thor::Invocation::ClassMethods
2286
+
2287
+ protected
2288
+
2289
+ # Shortcut to invoke with padding and block handling. Use internally by
2290
+ # invoke and invoke_from_option class methods.
2291
+ #
2292
+ # source://thor//lib/thor/group.rb#265
2293
+ def _invoke_for_class_method(klass, command = T.unsafe(nil), *args, &block); end
2294
+
2295
+ class << self
2296
+ # Overwrite class options help to allow invoked generators options to be
2297
+ # shown recursively when invoking a generator.
2298
+ #
2299
+ # source://thor//lib/thor/group.rb#161
2300
+ def class_options_help(shell, groups = T.unsafe(nil)); end
2301
+
2302
+ # The description for this Thor::Group. If none is provided, but a source root
2303
+ # exists, tries to find the USAGE one folder above it, otherwise searches
2304
+ # in the superclass.
2305
+ #
2306
+ # ==== Parameters
2307
+ # description<String>:: The description for this Thor::Group.
2308
+ #
2309
+ # source://thor//lib/thor/group.rb#16
2310
+ def desc(description = T.unsafe(nil)); end
2311
+
2312
+ # Get invocations array and merge options from invocations. Those
2313
+ # options are added to group_options hash. Options that already exists
2314
+ # in base_options are not added twice.
2315
+ #
2316
+ # source://thor//lib/thor/group.rb#172
2317
+ def get_options_from_invocations(group_options, base_options); end
2318
+
2319
+ # @raise [error]
2320
+ #
2321
+ # source://thor//lib/thor/group.rb#207
2322
+ def handle_argument_error(command, error, _args, arity); end
2323
+
2324
+ # Prints help information.
2325
+ #
2326
+ # ==== Options
2327
+ # short:: When true, shows only usage.
2328
+ #
2329
+ # source://thor//lib/thor/group.rb#29
2330
+ def help(shell); end
2331
+
2332
+ # Stores invocation blocks used on invoke_from_option.
2333
+ #
2334
+ # source://thor//lib/thor/group.rb#45
2335
+ def invocation_blocks; end
2336
+
2337
+ # Stores invocations for this class merging with superclass values.
2338
+ #
2339
+ # source://thor//lib/thor/group.rb#39
2340
+ def invocations; end
2341
+
2342
+ # Invoke the given namespace or class given. It adds an instance
2343
+ # method that will invoke the klass and command. You can give a block to
2344
+ # configure how it will be invoked.
2345
+ #
2346
+ # The namespace/class given will have its options showed on the help
2347
+ # usage. Check invoke_from_option for more information.
2348
+ #
2349
+ # source://thor//lib/thor/group.rb#56
2350
+ def invoke(*names, &block); end
2351
+
2352
+ # Invoke a thor class based on the value supplied by the user to the
2353
+ # given option named "name". A class option must be created before this
2354
+ # method is invoked for each name given.
2355
+ #
2356
+ # ==== Examples
2357
+ #
2358
+ # class GemGenerator < Thor::Group
2359
+ # class_option :test_framework, :type => :string
2360
+ # invoke_from_option :test_framework
2361
+ # end
2362
+ #
2363
+ # ==== Boolean options
2364
+ #
2365
+ # In some cases, you want to invoke a thor class if some option is true or
2366
+ # false. This is automatically handled by invoke_from_option. Then the
2367
+ # option name is used to invoke the generator.
2368
+ #
2369
+ # ==== Preparing for invocation
2370
+ #
2371
+ # In some cases you want to customize how a specified hook is going to be
2372
+ # invoked. You can do that by overwriting the class method
2373
+ # prepare_for_invocation. The class method must necessarily return a klass
2374
+ # and an optional command.
2375
+ #
2376
+ # ==== Custom invocations
2377
+ #
2378
+ # You can also supply a block to customize how the option is going to be
2379
+ # invoked. The block receives two parameters, an instance of the current
2380
+ # class and the klass to be invoked.
2381
+ #
2382
+ # source://thor//lib/thor/group.rb#110
2383
+ def invoke_from_option(*names, &block); end
2384
+
2385
+ # Returns commands ready to be printed.
2386
+ #
2387
+ # source://thor//lib/thor/group.rb#199
2388
+ def printable_commands(*_arg0); end
2389
+
2390
+ # Returns commands ready to be printed.
2391
+ #
2392
+ # source://thor//lib/thor/group.rb#199
2393
+ def printable_tasks(*_arg0); end
2394
+
2395
+ # Remove a previously added invocation.
2396
+ #
2397
+ # ==== Examples
2398
+ #
2399
+ # remove_invocation :test_framework
2400
+ #
2401
+ # source://thor//lib/thor/group.rb#149
2402
+ def remove_invocation(*names); end
2403
+
2404
+ protected
2405
+
2406
+ # The banner for this class. You can customize it if you are invoking the
2407
+ # thor class by another ways which is not the Thor::Runner.
2408
+ #
2409
+ # source://thor//lib/thor/group.rb#238
2410
+ def banner; end
2411
+
2412
+ # source://thor//lib/thor/group.rb#248
2413
+ def baseclass; end
2414
+
2415
+ # source://thor//lib/thor/group.rb#252
2416
+ def create_command(meth); end
2417
+
2418
+ # source://thor//lib/thor/group.rb#252
2419
+ def create_task(meth); end
2420
+
2421
+ # The method responsible for dispatching given the args.
2422
+ #
2423
+ # @yield [instance]
2424
+ #
2425
+ # source://thor//lib/thor/group.rb#217
2426
+ def dispatch(command, given_args, given_opts, config); end
2427
+
2428
+ # Represents the whole class as a command.
2429
+ #
2430
+ # source://thor//lib/thor/group.rb#243
2431
+ def self_command; end
2432
+
2433
+ # Represents the whole class as a command.
2434
+ #
2435
+ # source://thor//lib/thor/group.rb#243
2436
+ def self_task; end
2437
+ end
2438
+ end
2439
+
2440
+ # Shortcuts for help.
2441
+ #
2442
+ # source://thor//lib/thor/base.rb#17
2443
+ Thor::HELP_MAPPINGS = T.let(T.unsafe(nil), Array)
2444
+
2445
+ # A command that is hidden in help messages but still invocable.
2446
+ #
2447
+ # source://thor//lib/thor/command.rb#120
2448
+ class Thor::HiddenCommand < ::Thor::Command
2449
+ # @return [Boolean]
2450
+ #
2451
+ # source://thor//lib/thor/command.rb#121
2452
+ def hidden?; end
2453
+ end
2454
+
2455
+ # source://thor//lib/thor/command.rb#125
2456
+ Thor::HiddenTask = Thor::HiddenCommand
2457
+
2458
+ # source://thor//lib/thor/invocation.rb#2
2459
+ module Thor::Invocation
2460
+ mixes_in_class_methods ::Thor::Invocation::ClassMethods
2461
+
2462
+ # Make initializer aware of invocations and the initialization args.
2463
+ #
2464
+ # source://thor//lib/thor/invocation.rb#23
2465
+ def initialize(args = T.unsafe(nil), options = T.unsafe(nil), config = T.unsafe(nil), &block); end
2466
+
2467
+ # Make the current command chain accessible with in a Thor-(sub)command
2468
+ #
2469
+ # source://thor//lib/thor/invocation.rb#30
2470
+ def current_command_chain; end
2471
+
2472
+ # Receives a name and invokes it. The name can be a string (either "command" or
2473
+ # "namespace:command"), a Thor::Command, a Class or a Thor instance. If the
2474
+ # command cannot be guessed by name, it can also be supplied as second argument.
2475
+ #
2476
+ # You can also supply the arguments, options and configuration values for
2477
+ # the command to be invoked, if none is given, the same values used to
2478
+ # initialize the invoker are used to initialize the invoked.
2479
+ #
2480
+ # When no name is given, it will invoke the default command of the current class.
2481
+ #
2482
+ # ==== Examples
2483
+ #
2484
+ # class A < Thor
2485
+ # def foo
2486
+ # invoke :bar
2487
+ # invoke "b:hello", ["Erik"]
2488
+ # end
2489
+ #
2490
+ # def bar
2491
+ # invoke "b:hello", ["Erik"]
2492
+ # end
2493
+ # end
2494
+ #
2495
+ # class B < Thor
2496
+ # def hello(name)
2497
+ # puts "hello #{name}"
2498
+ # end
2499
+ # end
2500
+ #
2501
+ # You can notice that the method "foo" above invokes two commands: "bar",
2502
+ # which belongs to the same class and "hello" which belongs to the class B.
2503
+ #
2504
+ # By using an invocation system you ensure that a command is invoked only once.
2505
+ # In the example above, invoking "foo" will invoke "b:hello" just once, even
2506
+ # if it's invoked later by "bar" method.
2507
+ #
2508
+ # When class A invokes class B, all arguments used on A initialization are
2509
+ # supplied to B. This allows lazy parse of options. Let's suppose you have
2510
+ # some rspec commands:
2511
+ #
2512
+ # class Rspec < Thor::Group
2513
+ # class_option :mock_framework, :type => :string, :default => :rr
2514
+ #
2515
+ # def invoke_mock_framework
2516
+ # invoke "rspec:#{options[:mock_framework]}"
2517
+ # end
2518
+ # end
2519
+ #
2520
+ # As you noticed, it invokes the given mock framework, which might have its
2521
+ # own options:
2522
+ #
2523
+ # class Rspec::RR < Thor::Group
2524
+ # class_option :style, :type => :string, :default => :mock
2525
+ # end
2526
+ #
2527
+ # Since it's not rspec concern to parse mock framework options, when RR
2528
+ # is invoked all options are parsed again, so RR can extract only the options
2529
+ # that it's going to use.
2530
+ #
2531
+ # If you want Rspec::RR to be initialized with its own set of options, you
2532
+ # have to do that explicitly:
2533
+ #
2534
+ # invoke "rspec:rr", [], :style => :foo
2535
+ #
2536
+ # Besides giving an instance, you can also give a class to invoke:
2537
+ #
2538
+ # invoke Rspec::RR, [], :style => :foo
2539
+ #
2540
+ # source://thor//lib/thor/invocation.rb#102
2541
+ def invoke(name = T.unsafe(nil), *args); end
2542
+
2543
+ # Invoke all commands for the current instance.
2544
+ #
2545
+ # source://thor//lib/thor/invocation.rb#133
2546
+ def invoke_all; end
2547
+
2548
+ # Invoke the given command if the given args.
2549
+ #
2550
+ # source://thor//lib/thor/invocation.rb#122
2551
+ def invoke_command(command, *args); end
2552
+
2553
+ # Invoke the given command if the given args.
2554
+ #
2555
+ # source://thor//lib/thor/invocation.rb#122
2556
+ def invoke_task(command, *args); end
2557
+
2558
+ # Invokes using shell padding.
2559
+ #
2560
+ # source://thor//lib/thor/invocation.rb#138
2561
+ def invoke_with_padding(*args); end
2562
+
2563
+ protected
2564
+
2565
+ # Initialize klass using values stored in the @_initializer.
2566
+ #
2567
+ # source://thor//lib/thor/invocation.rb#166
2568
+ def _parse_initialization_options(args, opts, config); end
2569
+
2570
+ # This method simply retrieves the class and command to be invoked.
2571
+ # If the name is nil or the given name is a command in the current class,
2572
+ # use the given name and return self as class. Otherwise, call
2573
+ # prepare_for_invocation in the current class.
2574
+ #
2575
+ # source://thor//lib/thor/invocation.rb#153
2576
+ def _retrieve_class_and_command(name, sent_command = T.unsafe(nil)); end
2577
+
2578
+ # This method simply retrieves the class and command to be invoked.
2579
+ # If the name is nil or the given name is a command in the current class,
2580
+ # use the given name and return self as class. Otherwise, call
2581
+ # prepare_for_invocation in the current class.
2582
+ #
2583
+ # source://thor//lib/thor/invocation.rb#153
2584
+ def _retrieve_class_and_task(name, sent_command = T.unsafe(nil)); end
2585
+
2586
+ # Configuration values that are shared between invocations.
2587
+ #
2588
+ # source://thor//lib/thor/invocation.rb#145
2589
+ def _shared_configuration; end
2590
+
2591
+ class << self
2592
+ # source://thor//lib/thor/invocation.rb#3
2593
+ def included(base); end
2594
+ end
2595
+ end
2596
+
2597
+ # source://thor//lib/thor/invocation.rb#8
2598
+ module Thor::Invocation::ClassMethods
2599
+ # This method is responsible for receiving a name and find the proper
2600
+ # class and command for it. The key is an optional parameter which is
2601
+ # available only in class methods invocations (i.e. in Thor::Group).
2602
+ #
2603
+ # source://thor//lib/thor/invocation.rb#12
2604
+ def prepare_for_invocation(key, name); end
2605
+ end
2606
+
2607
+ # Raised when a command was found, but not invoked properly.
2608
+ #
2609
+ # source://thor//lib/thor/error.rb#65
2610
+ class Thor::InvocationError < ::Thor::Error; end
2611
+
2612
+ # source://thor//lib/thor/line_editor/basic.rb#2
2613
+ module Thor::LineEditor
2614
+ class << self
2615
+ # source://thor//lib/thor/line_editor.rb#10
2616
+ def best_available; end
2617
+
2618
+ # source://thor//lib/thor/line_editor.rb#6
2619
+ def readline(prompt, options = T.unsafe(nil)); end
2620
+ end
2621
+ end
2622
+
2623
+ # source://thor//lib/thor/line_editor/basic.rb#3
2624
+ class Thor::LineEditor::Basic
2625
+ # @return [Basic] a new instance of Basic
2626
+ #
2627
+ # source://thor//lib/thor/line_editor/basic.rb#10
2628
+ def initialize(prompt, options); end
2629
+
2630
+ # Returns the value of attribute options.
2631
+ #
2632
+ # source://thor//lib/thor/line_editor/basic.rb#4
2633
+ def options; end
2634
+
2635
+ # Returns the value of attribute prompt.
2636
+ #
2637
+ # source://thor//lib/thor/line_editor/basic.rb#4
2638
+ def prompt; end
2639
+
2640
+ # source://thor//lib/thor/line_editor/basic.rb#15
2641
+ def readline; end
2642
+
2643
+ private
2644
+
2645
+ # @return [Boolean]
2646
+ #
2647
+ # source://thor//lib/thor/line_editor/basic.rb#32
2648
+ def echo?; end
2649
+
2650
+ # source://thor//lib/thor/line_editor/basic.rb#22
2651
+ def get_input; end
2652
+
2653
+ class << self
2654
+ # @return [Boolean]
2655
+ #
2656
+ # source://thor//lib/thor/line_editor/basic.rb#6
2657
+ def available?; end
2658
+ end
2659
+ end
2660
+
2661
+ # source://thor//lib/thor/line_editor/readline.rb#3
2662
+ class Thor::LineEditor::Readline < ::Thor::LineEditor::Basic
2663
+ # source://thor//lib/thor/line_editor/readline.rb#13
2664
+ def readline; end
2665
+
2666
+ private
2667
+
2668
+ # @return [Boolean]
2669
+ #
2670
+ # source://thor//lib/thor/line_editor/readline.rb#28
2671
+ def add_to_history?; end
2672
+
2673
+ # source://thor//lib/thor/line_editor/readline.rb#42
2674
+ def completion_options; end
2675
+
2676
+ # source://thor//lib/thor/line_editor/readline.rb#32
2677
+ def completion_proc; end
2678
+
2679
+ # @return [Boolean]
2680
+ #
2681
+ # source://thor//lib/thor/line_editor/readline.rb#46
2682
+ def use_path_completion?; end
2683
+
2684
+ class << self
2685
+ # @return [Boolean]
2686
+ #
2687
+ # source://thor//lib/thor/line_editor/readline.rb#4
2688
+ def available?; end
2689
+ end
2690
+ end
2691
+
2692
+ # source://thor//lib/thor/line_editor/readline.rb#50
2693
+ class Thor::LineEditor::Readline::PathCompletion
2694
+ # @return [PathCompletion] a new instance of PathCompletion
2695
+ #
2696
+ # source://thor//lib/thor/line_editor/readline.rb#54
2697
+ def initialize(text); end
2698
+
2699
+ # source://thor//lib/thor/line_editor/readline.rb#58
2700
+ def matches; end
2701
+
2702
+ private
2703
+
2704
+ # source://thor//lib/thor/line_editor/readline.rb#68
2705
+ def absolute_matches; end
2706
+
2707
+ # source://thor//lib/thor/line_editor/readline.rb#82
2708
+ def base_path; end
2709
+
2710
+ # source://thor//lib/thor/line_editor/readline.rb#78
2711
+ def glob_pattern; end
2712
+
2713
+ # source://thor//lib/thor/line_editor/readline.rb#64
2714
+ def relative_matches; end
2715
+
2716
+ # Returns the value of attribute text.
2717
+ #
2718
+ # source://thor//lib/thor/line_editor/readline.rb#51
2719
+ def text; end
2720
+ end
2721
+
2722
+ # source://thor//lib/thor/error.rb#101
2723
+ class Thor::MalformattedArgumentError < ::Thor::InvocationError; end
2724
+
2725
+ # source://thor//lib/thor/nested_context.rb#2
2726
+ class Thor::NestedContext
2727
+ # @return [NestedContext] a new instance of NestedContext
2728
+ #
2729
+ # source://thor//lib/thor/nested_context.rb#3
2730
+ def initialize; end
2731
+
2732
+ # source://thor//lib/thor/nested_context.rb#7
2733
+ def enter; end
2734
+
2735
+ # @return [Boolean]
2736
+ #
2737
+ # source://thor//lib/thor/nested_context.rb#15
2738
+ def entered?; end
2739
+
2740
+ private
2741
+
2742
+ # source://thor//lib/thor/nested_context.rb#25
2743
+ def pop; end
2744
+
2745
+ # source://thor//lib/thor/nested_context.rb#21
2746
+ def push; end
2747
+ end
2748
+
2749
+ # source://thor//lib/thor/error.rb#8
2750
+ class Thor::NoKwargSpellChecker < ::DidYouMean::SpellChecker
2751
+ # source://thor//lib/thor/error.rb#9
2752
+ def initialize(dictionary); end
2753
+ end
2754
+
2755
+ # source://thor//lib/thor/parser/option.rb#2
2756
+ class Thor::Option < ::Thor::Argument
2757
+ # @return [Option] a new instance of Option
2758
+ #
2759
+ # source://thor//lib/thor/parser/option.rb#7
2760
+ def initialize(name, options = T.unsafe(nil)); end
2761
+
2762
+ # Returns the value of attribute aliases.
2763
+ #
2764
+ # source://thor//lib/thor/parser/option.rb#3
2765
+ def aliases; end
2766
+
2767
+ # source://thor//lib/thor/parser/option.rb#105
2768
+ def array?; end
2769
+
2770
+ # source://thor//lib/thor/parser/option.rb#105
2771
+ def boolean?; end
2772
+
2773
+ # Returns the value of attribute group.
2774
+ #
2775
+ # source://thor//lib/thor/parser/option.rb#3
2776
+ def group; end
2777
+
2778
+ # source://thor//lib/thor/parser/option.rb#105
2779
+ def hash?; end
2780
+
2781
+ # Returns the value of attribute hide.
2782
+ #
2783
+ # source://thor//lib/thor/parser/option.rb#3
2784
+ def hide; end
2785
+
2786
+ # source://thor//lib/thor/parser/option.rb#79
2787
+ def human_name; end
2788
+
2789
+ # Returns the value of attribute lazy_default.
2790
+ #
2791
+ # source://thor//lib/thor/parser/option.rb#3
2792
+ def lazy_default; end
2793
+
2794
+ # source://thor//lib/thor/parser/option.rb#105
2795
+ def numeric?; end
2796
+
2797
+ # Returns the value of attribute repeatable.
2798
+ #
2799
+ # source://thor//lib/thor/parser/option.rb#3
2800
+ def repeatable; end
2801
+
2802
+ # source://thor//lib/thor/parser/option.rb#105
2803
+ def string?; end
2804
+
2805
+ # source://thor//lib/thor/parser/option.rb#75
2806
+ def switch_name; end
2807
+
2808
+ # source://thor//lib/thor/parser/option.rb#83
2809
+ def usage(padding = T.unsafe(nil)); end
2810
+
2811
+ protected
2812
+
2813
+ # source://thor//lib/thor/parser/option.rb#155
2814
+ def dasherize(str); end
2815
+
2816
+ # @return [Boolean]
2817
+ #
2818
+ # source://thor//lib/thor/parser/option.rb#147
2819
+ def dasherized?; end
2820
+
2821
+ # source://thor//lib/thor/parser/option.rb#151
2822
+ def undasherize(str); end
2823
+
2824
+ # @raise [ArgumentError]
2825
+ #
2826
+ # source://thor//lib/thor/parser/option.rb#113
2827
+ def validate!; end
2828
+
2829
+ # source://thor//lib/thor/parser/option.rb#118
2830
+ def validate_default_type!; end
2831
+
2832
+ class << self
2833
+ # This parse quick options given as method_options. It makes several
2834
+ # assumptions, but you can be more specific using the option method.
2835
+ #
2836
+ # parse :foo => "bar"
2837
+ # #=> Option foo with default value bar
2838
+ #
2839
+ # parse [:foo, :baz] => "bar"
2840
+ # #=> Option foo with default value bar and alias :baz
2841
+ #
2842
+ # parse :foo => :required
2843
+ # #=> Required option foo without default value
2844
+ #
2845
+ # parse :foo => 2
2846
+ # #=> Option foo with default value 2 and type numeric
2847
+ #
2848
+ # parse :foo => :numeric
2849
+ # #=> Option foo without default value and type numeric
2850
+ #
2851
+ # parse :foo => true
2852
+ # #=> Option foo with default value true and type boolean
2853
+ #
2854
+ # The valid types are :boolean, :numeric, :hash, :array and :string. If none
2855
+ # is given a default type is assumed. This default type accepts arguments as
2856
+ # string (--foo=value) or booleans (just --foo).
2857
+ #
2858
+ # By default all options are optional, unless :required is given.
2859
+ #
2860
+ # source://thor//lib/thor/parser/option.rb#45
2861
+ def parse(key, value); end
2862
+ end
2863
+ end
2864
+
2865
+ # source://thor//lib/thor/parser/option.rb#5
2866
+ Thor::Option::VALID_TYPES = T.let(T.unsafe(nil), Array)
2867
+
2868
+ # source://thor//lib/thor/parser/options.rb#2
2869
+ class Thor::Options < ::Thor::Arguments
2870
+ # Takes a hash of Thor::Option and a hash with defaults.
2871
+ #
2872
+ # If +stop_on_unknown+ is true, #parse will stop as soon as it encounters
2873
+ # an unknown option or a regular argument.
2874
+ #
2875
+ # @return [Options] a new instance of Options
2876
+ #
2877
+ # source://thor//lib/thor/parser/options.rb#32
2878
+ def initialize(hash_options = T.unsafe(nil), defaults = T.unsafe(nil), stop_on_unknown = T.unsafe(nil), disable_required_check = T.unsafe(nil)); end
2879
+
2880
+ # @raise [UnknownArgumentError]
2881
+ #
2882
+ # source://thor//lib/thor/parser/options.rb#141
2883
+ def check_unknown!; end
2884
+
2885
+ # source://thor//lib/thor/parser/options.rb#88
2886
+ def parse(args); end
2887
+
2888
+ # source://thor//lib/thor/parser/options.rb#64
2889
+ def peek; end
2890
+
2891
+ # source://thor//lib/thor/parser/options.rb#60
2892
+ def remaining; end
2893
+
2894
+ # source://thor//lib/thor/parser/options.rb#78
2895
+ def shift; end
2896
+
2897
+ # source://thor//lib/thor/parser/options.rb#83
2898
+ def unshift(arg, is_value: T.unsafe(nil)); end
2899
+
2900
+ protected
2901
+
2902
+ # source://thor//lib/thor/parser/options.rb#151
2903
+ def assign_result!(option, result); end
2904
+
2905
+ # Check if the current value in peek is a registered switch.
2906
+ #
2907
+ # Two booleans are returned. The first is true if the current value
2908
+ # starts with a hyphen; the second is true if it is a registered switch.
2909
+ #
2910
+ # @return [Boolean]
2911
+ #
2912
+ # source://thor//lib/thor/parser/options.rb#165
2913
+ def current_is_switch?; end
2914
+
2915
+ # @return [Boolean]
2916
+ #
2917
+ # source://thor//lib/thor/parser/options.rb#177
2918
+ def current_is_switch_formatted?; end
2919
+
2920
+ # @return [Boolean]
2921
+ #
2922
+ # source://thor//lib/thor/parser/options.rb#187
2923
+ def current_is_value?; end
2924
+
2925
+ # Check if the given argument is actually a shortcut.
2926
+ #
2927
+ # source://thor//lib/thor/parser/options.rb#206
2928
+ def normalize_switch(arg); end
2929
+
2930
+ # Parse boolean values which can be given as --foo=true, --foo or --no-foo.
2931
+ #
2932
+ # source://thor//lib/thor/parser/options.rb#217
2933
+ def parse_boolean(switch); end
2934
+
2935
+ # Parse the value at the peek analyzing if it requires an input or not.
2936
+ #
2937
+ # source://thor//lib/thor/parser/options.rb#235
2938
+ def parse_peek(switch, option); end
2939
+
2940
+ # @return [Boolean]
2941
+ #
2942
+ # source://thor//lib/thor/parser/options.rb#210
2943
+ def parsing_options?; end
2944
+
2945
+ # @return [Boolean]
2946
+ #
2947
+ # source://thor//lib/thor/parser/options.rb#192
2948
+ def switch?(arg); end
2949
+
2950
+ # source://thor//lib/thor/parser/options.rb#196
2951
+ def switch_option(arg); end
2952
+
2953
+ class << self
2954
+ # Receives a hash and makes it switches.
2955
+ #
2956
+ # source://thor//lib/thor/parser/options.rb#11
2957
+ def to_switches(options); end
2958
+ end
2959
+ end
2960
+
2961
+ # source://thor//lib/thor/parser/options.rb#5
2962
+ Thor::Options::EQ_RE = T.let(T.unsafe(nil), Regexp)
2963
+
2964
+ # source://thor//lib/thor/parser/options.rb#3
2965
+ Thor::Options::LONG_RE = T.let(T.unsafe(nil), Regexp)
2966
+
2967
+ # source://thor//lib/thor/parser/options.rb#8
2968
+ Thor::Options::OPTS_END = T.let(T.unsafe(nil), String)
2969
+
2970
+ # source://thor//lib/thor/parser/options.rb#7
2971
+ Thor::Options::SHORT_NUM = T.let(T.unsafe(nil), Regexp)
2972
+
2973
+ # source://thor//lib/thor/parser/options.rb#4
2974
+ Thor::Options::SHORT_RE = T.let(T.unsafe(nil), Regexp)
2975
+
2976
+ # Allow either -x -v or -xv style for single char args
2977
+ #
2978
+ # source://thor//lib/thor/parser/options.rb#6
2979
+ Thor::Options::SHORT_SQ_RE = T.let(T.unsafe(nil), Regexp)
2980
+
2981
+ # Adds a compatibility layer to your Thor classes which allows you to use
2982
+ # rake package tasks. For example, to use rspec rake tasks, one can do:
2983
+ #
2984
+ # require 'thor/rake_compat'
2985
+ # require 'rspec/core/rake_task'
2986
+ #
2987
+ # class Default < Thor
2988
+ # include Thor::RakeCompat
2989
+ #
2990
+ # RSpec::Core::RakeTask.new(:spec) do |t|
2991
+ # t.spec_opts = ['--options', './.rspec']
2992
+ # t.spec_files = FileList['spec/**/*_spec.rb']
2993
+ # end
2994
+ # end
2995
+ #
2996
+ # source://thor//lib/thor/rake_compat.rb#20
2997
+ module Thor::RakeCompat
2998
+ include ::FileUtils::StreamUtils_
2999
+ include ::FileUtils
3000
+ include ::Rake::FileUtilsExt
3001
+ include ::Rake::DSL
3002
+
3003
+ class << self
3004
+ # @private
3005
+ #
3006
+ # source://thor//lib/thor/rake_compat.rb#27
3007
+ def included(base); end
3008
+
3009
+ # source://thor//lib/thor/rake_compat.rb#23
3010
+ def rake_classes; end
3011
+ end
3012
+ end
3013
+
3014
+ # source://thor//lib/thor/error.rb#98
3015
+ class Thor::RequiredArgumentMissingError < ::Thor::InvocationError; end
3016
+
3017
+ # source://thor//lib/thor/util.rb#4
3018
+ module Thor::Sandbox; end
3019
+
3020
+ # source://thor//lib/thor/shell.rb#23
3021
+ module Thor::Shell
3022
+ # Add shell to initialize config values.
3023
+ #
3024
+ # ==== Configuration
3025
+ # shell<Object>:: An instance of the shell to be used.
3026
+ #
3027
+ # ==== Examples
3028
+ #
3029
+ # class MyScript < Thor
3030
+ # argument :first, :type => :numeric
3031
+ # end
3032
+ #
3033
+ # MyScript.new [1.0], { :foo => :bar }, :shell => Thor::Shell::Basic.new
3034
+ #
3035
+ # source://thor//lib/thor/shell.rb#44
3036
+ def initialize(args = T.unsafe(nil), options = T.unsafe(nil), config = T.unsafe(nil)); end
3037
+
3038
+ # source://thor//lib/thor/shell.rb#59
3039
+ def ask(*args, &block); end
3040
+
3041
+ # source://thor//lib/thor/shell.rb#59
3042
+ def error(*args, &block); end
3043
+
3044
+ # source://thor//lib/thor/shell.rb#59
3045
+ def file_collision(*args, &block); end
3046
+
3047
+ # source://thor//lib/thor/shell.rb#59
3048
+ def no?(*args, &block); end
3049
+
3050
+ # source://thor//lib/thor/shell.rb#59
3051
+ def print_in_columns(*args, &block); end
3052
+
3053
+ # source://thor//lib/thor/shell.rb#59
3054
+ def print_table(*args, &block); end
3055
+
3056
+ # source://thor//lib/thor/shell.rb#59
3057
+ def print_wrapped(*args, &block); end
3058
+
3059
+ # source://thor//lib/thor/shell.rb#59
3060
+ def say(*args, &block); end
3061
+
3062
+ # source://thor//lib/thor/shell.rb#59
3063
+ def say_error(*args, &block); end
3064
+
3065
+ # source://thor//lib/thor/shell.rb#59
3066
+ def say_status(*args, &block); end
3067
+
3068
+ # source://thor//lib/thor/shell.rb#59
3069
+ def set_color(*args, &block); end
3070
+
3071
+ # Holds the shell for the given Thor instance. If no shell is given,
3072
+ # it gets a default shell from Thor::Base.shell.
3073
+ #
3074
+ # source://thor//lib/thor/shell.rb#52
3075
+ def shell; end
3076
+
3077
+ # Sets the attribute shell
3078
+ #
3079
+ # @param value the value to set the attribute shell to.
3080
+ #
3081
+ # source://thor//lib/thor/shell.rb#25
3082
+ def shell=(_arg0); end
3083
+
3084
+ # source://thor//lib/thor/shell.rb#59
3085
+ def terminal_width(*args, &block); end
3086
+
3087
+ # Yields the given block with padding.
3088
+ #
3089
+ # source://thor//lib/thor/shell.rb#66
3090
+ def with_padding; end
3091
+
3092
+ # source://thor//lib/thor/shell.rb#59
3093
+ def yes?(*args, &block); end
3094
+
3095
+ protected
3096
+
3097
+ # Allow shell to be shared between invocations.
3098
+ #
3099
+ # source://thor//lib/thor/shell.rb#77
3100
+ def _shared_configuration; end
3101
+ end
3102
+
3103
+ # source://thor//lib/thor/shell/basic.rb#3
3104
+ class Thor::Shell::Basic
3105
+ # Initialize base, mute and padding to nil.
3106
+ #
3107
+ # @return [Basic] a new instance of Basic
3108
+ #
3109
+ # source://thor//lib/thor/shell/basic.rb#11
3110
+ def initialize; end
3111
+
3112
+ # Asks something to the user and receives a response.
3113
+ #
3114
+ # If a default value is specified it will be presented to the user
3115
+ # and allows them to select that value with an empty response. This
3116
+ # option is ignored when limited answers are supplied.
3117
+ #
3118
+ # If asked to limit the correct responses, you can pass in an
3119
+ # array of acceptable answers. If one of those is not supplied,
3120
+ # they will be shown a message stating that one of those answers
3121
+ # must be given and re-asked the question.
3122
+ #
3123
+ # If asking for sensitive information, the :echo option can be set
3124
+ # to false to mask user input from $stdin.
3125
+ #
3126
+ # If the required input is a path, then set the path option to
3127
+ # true. This will enable tab completion for file paths relative
3128
+ # to the current working directory on systems that support
3129
+ # Readline.
3130
+ #
3131
+ # ==== Example
3132
+ # ask("What is your name?")
3133
+ #
3134
+ # ask("What is the planet furthest from the sun?", :default => "Pluto")
3135
+ #
3136
+ # ask("What is your favorite Neopolitan flavor?", :limited_to => ["strawberry", "chocolate", "vanilla"])
3137
+ #
3138
+ # ask("What is your password?", :echo => false)
3139
+ #
3140
+ # ask("Where should the file be saved?", :path => true)
3141
+ #
3142
+ # source://thor//lib/thor/shell/basic.rb#78
3143
+ def ask(statement, *args); end
3144
+
3145
+ # Returns the value of attribute base.
3146
+ #
3147
+ # source://thor//lib/thor/shell/basic.rb#6
3148
+ def base; end
3149
+
3150
+ # Sets the attribute base
3151
+ #
3152
+ # @param value the value to set the attribute base to.
3153
+ #
3154
+ # source://thor//lib/thor/shell/basic.rb#6
3155
+ def base=(_arg0); end
3156
+
3157
+ # Called if something goes wrong during the execution. This is used by Thor
3158
+ # internally and should not be used inside your scripts. If something went
3159
+ # wrong, you can always raise an exception. If you raise a Thor::Error, it
3160
+ # will be rescued and wrapped in the method below.
3161
+ #
3162
+ # source://thor//lib/thor/shell/basic.rb#342
3163
+ def error(statement); end
3164
+
3165
+ # Deals with file collision and returns true if the file should be
3166
+ # overwritten and false otherwise. If a block is given, it uses the block
3167
+ # response as the content for the diff.
3168
+ #
3169
+ # ==== Parameters
3170
+ # destination<String>:: the destination file to solve conflicts
3171
+ # block<Proc>:: an optional block that returns the value to be used in diff and merge
3172
+ #
3173
+ # source://thor//lib/thor/shell/basic.rb#285
3174
+ def file_collision(destination); end
3175
+
3176
+ # Sets the output padding while executing a block and resets it.
3177
+ #
3178
+ # source://thor//lib/thor/shell/basic.rb#41
3179
+ def indent(count = T.unsafe(nil)); end
3180
+
3181
+ # Mute everything that's inside given block
3182
+ #
3183
+ # source://thor//lib/thor/shell/basic.rb#20
3184
+ def mute; end
3185
+
3186
+ # Check if base is muted
3187
+ #
3188
+ # @return [Boolean]
3189
+ #
3190
+ # source://thor//lib/thor/shell/basic.rb#29
3191
+ def mute?; end
3192
+
3193
+ # Make a question the to user and returns true if the user replies "n" or
3194
+ # "no".
3195
+ #
3196
+ # @return [Boolean]
3197
+ #
3198
+ # source://thor//lib/thor/shell/basic.rb#154
3199
+ def no?(statement, color = T.unsafe(nil)); end
3200
+
3201
+ # Returns the value of attribute padding.
3202
+ #
3203
+ # source://thor//lib/thor/shell/basic.rb#7
3204
+ def padding; end
3205
+
3206
+ # Sets the output padding, not allowing less than zero values.
3207
+ #
3208
+ # source://thor//lib/thor/shell/basic.rb#35
3209
+ def padding=(value); end
3210
+
3211
+ # Prints values in columns
3212
+ #
3213
+ # ==== Parameters
3214
+ # Array[String, String, ...]
3215
+ #
3216
+ # source://thor//lib/thor/shell/basic.rb#163
3217
+ def print_in_columns(array); end
3218
+
3219
+ # Prints a table.
3220
+ #
3221
+ # ==== Parameters
3222
+ # Array[Array[String, String, ...]]
3223
+ #
3224
+ # ==== Options
3225
+ # indent<Integer>:: Indent the first column by indent value.
3226
+ # colwidth<Integer>:: Force the first column to colwidth spaces wide.
3227
+ #
3228
+ # source://thor//lib/thor/shell/basic.rb#185
3229
+ def print_table(array, options = T.unsafe(nil)); end
3230
+
3231
+ # Prints a long string, word-wrapping the text to the current width of the
3232
+ # terminal display. Ideal for printing heredocs.
3233
+ #
3234
+ # ==== Parameters
3235
+ # String
3236
+ #
3237
+ # ==== Options
3238
+ # indent<Integer>:: Indent each line of the printed paragraph by indent value.
3239
+ #
3240
+ # source://thor//lib/thor/shell/basic.rb#247
3241
+ def print_wrapped(message, options = T.unsafe(nil)); end
3242
+
3243
+ # Say (print) something to the user. If the sentence ends with a whitespace
3244
+ # or tab character, a new line is not appended (print + flush). Otherwise
3245
+ # are passed straight to puts (behavior got from Highline).
3246
+ #
3247
+ # ==== Example
3248
+ # say("I know you knew that.")
3249
+ #
3250
+ # source://thor//lib/thor/shell/basic.rb#96
3251
+ def say(message = T.unsafe(nil), color = T.unsafe(nil), force_new_line = T.unsafe(nil)); end
3252
+
3253
+ # Say (print) an error to the user. If the sentence ends with a whitespace
3254
+ # or tab character, a new line is not appended (print + flush). Otherwise
3255
+ # are passed straight to puts (behavior got from Highline).
3256
+ #
3257
+ # ==== Example
3258
+ # say_error("error: something went wrong")
3259
+ #
3260
+ # source://thor//lib/thor/shell/basic.rb#113
3261
+ def say_error(message = T.unsafe(nil), color = T.unsafe(nil), force_new_line = T.unsafe(nil)); end
3262
+
3263
+ # Say a status with the given color and appends the message. Since this
3264
+ # method is used frequently by actions, it allows nil or false to be given
3265
+ # in log_status, avoiding the message from being shown. If a Symbol is
3266
+ # given in log_status, it's used as the color.
3267
+ #
3268
+ # source://thor//lib/thor/shell/basic.rb#128
3269
+ def say_status(status, message, log_status = T.unsafe(nil)); end
3270
+
3271
+ # Apply color to the given string with optional bold. Disabled in the
3272
+ # Thor::Shell::Basic class.
3273
+ #
3274
+ # source://thor//lib/thor/shell/basic.rb#349
3275
+ def set_color(string, *_arg1); end
3276
+
3277
+ # source://thor//lib/thor/shell/basic.rb#326
3278
+ def terminal_width; end
3279
+
3280
+ # Make a question the to user and returns true if the user replies "y" or
3281
+ # "yes".
3282
+ #
3283
+ # @return [Boolean]
3284
+ #
3285
+ # source://thor//lib/thor/shell/basic.rb#147
3286
+ def yes?(statement, color = T.unsafe(nil)); end
3287
+
3288
+ protected
3289
+
3290
+ # source://thor//lib/thor/shell/basic.rb#486
3291
+ def answer_match(possibilities, answer, case_insensitive); end
3292
+
3293
+ # source://thor//lib/thor/shell/basic.rb#443
3294
+ def as_unicode; end
3295
+
3296
+ # source://thor//lib/thor/shell/basic.rb#473
3297
+ def ask_filtered(statement, color, options); end
3298
+
3299
+ # source://thor//lib/thor/shell/basic.rb#456
3300
+ def ask_simply(statement, color, options); end
3301
+
3302
+ # @return [Boolean]
3303
+ #
3304
+ # source://thor//lib/thor/shell/basic.rb#360
3305
+ def can_display_colors?; end
3306
+
3307
+ # Calculate the dynamic width of the terminal
3308
+ #
3309
+ # source://thor//lib/thor/shell/basic.rb#415
3310
+ def dynamic_width; end
3311
+
3312
+ # source://thor//lib/thor/shell/basic.rb#419
3313
+ def dynamic_width_stty; end
3314
+
3315
+ # source://thor//lib/thor/shell/basic.rb#423
3316
+ def dynamic_width_tput; end
3317
+
3318
+ # source://thor//lib/thor/shell/basic.rb#387
3319
+ def file_collision_help; end
3320
+
3321
+ # source://thor//lib/thor/shell/basic.rb#507
3322
+ def git_merge_tool; end
3323
+
3324
+ # @return [Boolean]
3325
+ #
3326
+ # source://thor//lib/thor/shell/basic.rb#377
3327
+ def is?(value); end
3328
+
3329
+ # source://thor//lib/thor/shell/basic.rb#364
3330
+ def lookup_color(color); end
3331
+
3332
+ # source://thor//lib/thor/shell/basic.rb#494
3333
+ def merge(destination, content); end
3334
+
3335
+ # source://thor//lib/thor/shell/basic.rb#503
3336
+ def merge_tool; end
3337
+
3338
+ # source://thor//lib/thor/shell/basic.rb#355
3339
+ def prepare_message(message, *color); end
3340
+
3341
+ # @return [Boolean]
3342
+ #
3343
+ # source://thor//lib/thor/shell/basic.rb#410
3344
+ def quiet?; end
3345
+
3346
+ # source://thor//lib/thor/shell/basic.rb#399
3347
+ def show_diff(destination, content); end
3348
+
3349
+ # source://thor//lib/thor/shell/basic.rb#373
3350
+ def stderr; end
3351
+
3352
+ # source://thor//lib/thor/shell/basic.rb#369
3353
+ def stdout; end
3354
+
3355
+ # source://thor//lib/thor/shell/basic.rb#431
3356
+ def truncate(string, width); end
3357
+
3358
+ # @return [Boolean]
3359
+ #
3360
+ # source://thor//lib/thor/shell/basic.rb#427
3361
+ def unix?; end
3362
+ end
3363
+
3364
+ # source://thor//lib/thor/shell/basic.rb#4
3365
+ Thor::Shell::Basic::DEFAULT_TERMINAL_WIDTH = T.let(T.unsafe(nil), Integer)
3366
+
3367
+ # Inherit from Thor::Shell::Basic and add set_color behavior. Check
3368
+ # Thor::Shell::Basic to see all available methods.
3369
+ #
3370
+ # source://thor//lib/thor/shell/color.rb#8
3371
+ class Thor::Shell::Color < ::Thor::Shell::Basic
3372
+ # Set color by using a string or one of the defined constants. If a third
3373
+ # option is set to true, it also adds bold to the string. This is based
3374
+ # on Highline implementation and it automatically appends CLEAR to the end
3375
+ # of the returned String.
3376
+ #
3377
+ # Pass foreground, background and bold options to this method as
3378
+ # symbols.
3379
+ #
3380
+ # Example:
3381
+ #
3382
+ # set_color "Hi!", :red, :on_white, :bold
3383
+ #
3384
+ # The available colors are:
3385
+ #
3386
+ # :bold
3387
+ # :black
3388
+ # :red
3389
+ # :green
3390
+ # :yellow
3391
+ # :blue
3392
+ # :magenta
3393
+ # :cyan
3394
+ # :white
3395
+ # :on_black
3396
+ # :on_red
3397
+ # :on_green
3398
+ # :on_yellow
3399
+ # :on_blue
3400
+ # :on_magenta
3401
+ # :on_cyan
3402
+ # :on_white
3403
+ #
3404
+ # source://thor//lib/thor/shell/color.rb#79
3405
+ def set_color(string, *colors); end
3406
+
3407
+ protected
3408
+
3409
+ # @return [Boolean]
3410
+ #
3411
+ # source://thor//lib/thor/shell/color.rb#107
3412
+ def are_colors_disabled?; end
3413
+
3414
+ # @return [Boolean]
3415
+ #
3416
+ # source://thor//lib/thor/shell/color.rb#103
3417
+ def are_colors_supported?; end
3418
+
3419
+ # @return [Boolean]
3420
+ #
3421
+ # source://thor//lib/thor/shell/color.rb#99
3422
+ def can_display_colors?; end
3423
+
3424
+ # Check if Diff::LCS is loaded. If it is, use it to create pretty output
3425
+ # for diff.
3426
+ #
3427
+ # @return [Boolean]
3428
+ #
3429
+ # source://thor//lib/thor/shell/color.rb#144
3430
+ def diff_lcs_loaded?; end
3431
+
3432
+ # source://thor//lib/thor/shell/color.rb#127
3433
+ def output_diff_line(diff); end
3434
+
3435
+ # Overwrite show_diff to show diff with colors if Diff::LCS is
3436
+ # available.
3437
+ #
3438
+ # source://thor//lib/thor/shell/color.rb#114
3439
+ def show_diff(destination, content); end
3440
+ end
3441
+
3442
+ # Set the terminal's foreground ANSI color to black.
3443
+ #
3444
+ # source://thor//lib/thor/shell/color.rb#15
3445
+ Thor::Shell::Color::BLACK = T.let(T.unsafe(nil), String)
3446
+
3447
+ # Set the terminal's foreground ANSI color to blue.
3448
+ #
3449
+ # source://thor//lib/thor/shell/color.rb#23
3450
+ Thor::Shell::Color::BLUE = T.let(T.unsafe(nil), String)
3451
+
3452
+ # The start of an ANSI bold sequence.
3453
+ #
3454
+ # source://thor//lib/thor/shell/color.rb#12
3455
+ Thor::Shell::Color::BOLD = T.let(T.unsafe(nil), String)
3456
+
3457
+ # Embed in a String to clear all previous ANSI sequences.
3458
+ #
3459
+ # source://thor//lib/thor/shell/color.rb#10
3460
+ Thor::Shell::Color::CLEAR = T.let(T.unsafe(nil), String)
3461
+
3462
+ # Set the terminal's foreground ANSI color to cyan.
3463
+ #
3464
+ # source://thor//lib/thor/shell/color.rb#27
3465
+ Thor::Shell::Color::CYAN = T.let(T.unsafe(nil), String)
3466
+
3467
+ # Set the terminal's foreground ANSI color to green.
3468
+ #
3469
+ # source://thor//lib/thor/shell/color.rb#19
3470
+ Thor::Shell::Color::GREEN = T.let(T.unsafe(nil), String)
3471
+
3472
+ # Set the terminal's foreground ANSI color to magenta.
3473
+ #
3474
+ # source://thor//lib/thor/shell/color.rb#25
3475
+ Thor::Shell::Color::MAGENTA = T.let(T.unsafe(nil), String)
3476
+
3477
+ # Set the terminal's background ANSI color to black.
3478
+ #
3479
+ # source://thor//lib/thor/shell/color.rb#32
3480
+ Thor::Shell::Color::ON_BLACK = T.let(T.unsafe(nil), String)
3481
+
3482
+ # Set the terminal's background ANSI color to blue.
3483
+ #
3484
+ # source://thor//lib/thor/shell/color.rb#40
3485
+ Thor::Shell::Color::ON_BLUE = T.let(T.unsafe(nil), String)
3486
+
3487
+ # Set the terminal's background ANSI color to cyan.
3488
+ #
3489
+ # source://thor//lib/thor/shell/color.rb#44
3490
+ Thor::Shell::Color::ON_CYAN = T.let(T.unsafe(nil), String)
3491
+
3492
+ # Set the terminal's background ANSI color to green.
3493
+ #
3494
+ # source://thor//lib/thor/shell/color.rb#36
3495
+ Thor::Shell::Color::ON_GREEN = T.let(T.unsafe(nil), String)
3496
+
3497
+ # Set the terminal's background ANSI color to magenta.
3498
+ #
3499
+ # source://thor//lib/thor/shell/color.rb#42
3500
+ Thor::Shell::Color::ON_MAGENTA = T.let(T.unsafe(nil), String)
3501
+
3502
+ # Set the terminal's background ANSI color to red.
3503
+ #
3504
+ # source://thor//lib/thor/shell/color.rb#34
3505
+ Thor::Shell::Color::ON_RED = T.let(T.unsafe(nil), String)
3506
+
3507
+ # Set the terminal's background ANSI color to white.
3508
+ #
3509
+ # source://thor//lib/thor/shell/color.rb#46
3510
+ Thor::Shell::Color::ON_WHITE = T.let(T.unsafe(nil), String)
3511
+
3512
+ # Set the terminal's background ANSI color to yellow.
3513
+ #
3514
+ # source://thor//lib/thor/shell/color.rb#38
3515
+ Thor::Shell::Color::ON_YELLOW = T.let(T.unsafe(nil), String)
3516
+
3517
+ # Set the terminal's foreground ANSI color to red.
3518
+ #
3519
+ # source://thor//lib/thor/shell/color.rb#17
3520
+ Thor::Shell::Color::RED = T.let(T.unsafe(nil), String)
3521
+
3522
+ # Set the terminal's foreground ANSI color to white.
3523
+ #
3524
+ # source://thor//lib/thor/shell/color.rb#29
3525
+ Thor::Shell::Color::WHITE = T.let(T.unsafe(nil), String)
3526
+
3527
+ # Set the terminal's foreground ANSI color to yellow.
3528
+ #
3529
+ # source://thor//lib/thor/shell/color.rb#21
3530
+ Thor::Shell::Color::YELLOW = T.let(T.unsafe(nil), String)
3531
+
3532
+ # Inherit from Thor::Shell::Basic and add set_color behavior. Check
3533
+ # Thor::Shell::Basic to see all available methods.
3534
+ #
3535
+ # source://thor//lib/thor/shell/html.rb#8
3536
+ class Thor::Shell::HTML < ::Thor::Shell::Basic
3537
+ # Ask something to the user and receives a response.
3538
+ #
3539
+ # ==== Example
3540
+ # ask("What is your name?")
3541
+ #
3542
+ # TODO: Implement #ask for Thor::Shell::HTML
3543
+ #
3544
+ # @raise [NotImplementedError]
3545
+ #
3546
+ # source://thor//lib/thor/shell/html.rb#70
3547
+ def ask(statement, color = T.unsafe(nil)); end
3548
+
3549
+ # Set color by using a string or one of the defined constants. If a third
3550
+ # option is set to true, it also adds bold to the string. This is based
3551
+ # on Highline implementation and it automatically appends CLEAR to the end
3552
+ # of the returned String.
3553
+ #
3554
+ # source://thor//lib/thor/shell/html.rb#51
3555
+ def set_color(string, *colors); end
3556
+
3557
+ protected
3558
+
3559
+ # @return [Boolean]
3560
+ #
3561
+ # source://thor//lib/thor/shell/html.rb#76
3562
+ def can_display_colors?; end
3563
+
3564
+ # Check if Diff::LCS is loaded. If it is, use it to create pretty output
3565
+ # for diff.
3566
+ #
3567
+ # @return [Boolean]
3568
+ #
3569
+ # source://thor//lib/thor/shell/html.rb#113
3570
+ def diff_lcs_loaded?; end
3571
+
3572
+ # source://thor//lib/thor/shell/html.rb#96
3573
+ def output_diff_line(diff); end
3574
+
3575
+ # Overwrite show_diff to show diff with colors if Diff::LCS is
3576
+ # available.
3577
+ #
3578
+ # source://thor//lib/thor/shell/html.rb#83
3579
+ def show_diff(destination, content); end
3580
+ end
3581
+
3582
+ # Set the terminal's foreground HTML color to black.
3583
+ #
3584
+ # source://thor//lib/thor/shell/html.rb#13
3585
+ Thor::Shell::HTML::BLACK = T.let(T.unsafe(nil), String)
3586
+
3587
+ # Set the terminal's foreground HTML color to blue.
3588
+ #
3589
+ # source://thor//lib/thor/shell/html.rb#21
3590
+ Thor::Shell::HTML::BLUE = T.let(T.unsafe(nil), String)
3591
+
3592
+ # The start of an HTML bold sequence.
3593
+ #
3594
+ # source://thor//lib/thor/shell/html.rb#10
3595
+ Thor::Shell::HTML::BOLD = T.let(T.unsafe(nil), String)
3596
+
3597
+ # Set the terminal's foreground HTML color to cyan.
3598
+ #
3599
+ # source://thor//lib/thor/shell/html.rb#25
3600
+ Thor::Shell::HTML::CYAN = T.let(T.unsafe(nil), String)
3601
+
3602
+ # Set the terminal's foreground HTML color to green.
3603
+ #
3604
+ # source://thor//lib/thor/shell/html.rb#17
3605
+ Thor::Shell::HTML::GREEN = T.let(T.unsafe(nil), String)
3606
+
3607
+ # Set the terminal's foreground HTML color to magenta.
3608
+ #
3609
+ # source://thor//lib/thor/shell/html.rb#23
3610
+ Thor::Shell::HTML::MAGENTA = T.let(T.unsafe(nil), String)
3611
+
3612
+ # Set the terminal's background HTML color to black.
3613
+ #
3614
+ # source://thor//lib/thor/shell/html.rb#30
3615
+ Thor::Shell::HTML::ON_BLACK = T.let(T.unsafe(nil), String)
3616
+
3617
+ # Set the terminal's background HTML color to blue.
3618
+ #
3619
+ # source://thor//lib/thor/shell/html.rb#38
3620
+ Thor::Shell::HTML::ON_BLUE = T.let(T.unsafe(nil), String)
3621
+
3622
+ # Set the terminal's background HTML color to cyan.
3623
+ #
3624
+ # source://thor//lib/thor/shell/html.rb#42
3625
+ Thor::Shell::HTML::ON_CYAN = T.let(T.unsafe(nil), String)
3626
+
3627
+ # Set the terminal's background HTML color to green.
3628
+ #
3629
+ # source://thor//lib/thor/shell/html.rb#34
3630
+ Thor::Shell::HTML::ON_GREEN = T.let(T.unsafe(nil), String)
3631
+
3632
+ # Set the terminal's background HTML color to magenta.
3633
+ #
3634
+ # source://thor//lib/thor/shell/html.rb#40
3635
+ Thor::Shell::HTML::ON_MAGENTA = T.let(T.unsafe(nil), String)
3636
+
3637
+ # Set the terminal's background HTML color to red.
3638
+ #
3639
+ # source://thor//lib/thor/shell/html.rb#32
3640
+ Thor::Shell::HTML::ON_RED = T.let(T.unsafe(nil), String)
3641
+
3642
+ # Set the terminal's background HTML color to white.
3643
+ #
3644
+ # source://thor//lib/thor/shell/html.rb#44
3645
+ Thor::Shell::HTML::ON_WHITE = T.let(T.unsafe(nil), String)
3646
+
3647
+ # Set the terminal's background HTML color to yellow.
3648
+ #
3649
+ # source://thor//lib/thor/shell/html.rb#36
3650
+ Thor::Shell::HTML::ON_YELLOW = T.let(T.unsafe(nil), String)
3651
+
3652
+ # Set the terminal's foreground HTML color to red.
3653
+ #
3654
+ # source://thor//lib/thor/shell/html.rb#15
3655
+ Thor::Shell::HTML::RED = T.let(T.unsafe(nil), String)
3656
+
3657
+ # Set the terminal's foreground HTML color to white.
3658
+ #
3659
+ # source://thor//lib/thor/shell/html.rb#27
3660
+ Thor::Shell::HTML::WHITE = T.let(T.unsafe(nil), String)
3661
+
3662
+ # Set the terminal's foreground HTML color to yellow.
3663
+ #
3664
+ # source://thor//lib/thor/shell/html.rb#19
3665
+ Thor::Shell::HTML::YELLOW = T.let(T.unsafe(nil), String)
3666
+
3667
+ # source://thor//lib/thor/shell.rb#24
3668
+ Thor::Shell::SHELL_DELEGATED_METHODS = T.let(T.unsafe(nil), Array)
3669
+
3670
+ # source://thor//lib/thor/base.rb#23
3671
+ Thor::TEMPLATE_EXTNAME = T.let(T.unsafe(nil), String)
3672
+
3673
+ # Thor methods that should not be overwritten by the user.
3674
+ #
3675
+ # source://thor//lib/thor/base.rb#20
3676
+ Thor::THOR_RESERVED_WORDS = T.let(T.unsafe(nil), Array)
3677
+
3678
+ # source://thor//lib/thor/command.rb#117
3679
+ Thor::Task = Thor::Command
3680
+
3681
+ # Raised when a command was not found.
3682
+ #
3683
+ # source://thor//lib/thor/error.rb#27
3684
+ class Thor::UndefinedCommandError < ::Thor::Error
3685
+ include ::DidYouMean::Correctable
3686
+
3687
+ # @return [UndefinedCommandError] a new instance of UndefinedCommandError
3688
+ #
3689
+ # source://thor//lib/thor/error.rb#46
3690
+ def initialize(command, all_commands, namespace); end
3691
+
3692
+ # Returns the value of attribute all_commands.
3693
+ #
3694
+ # source://thor//lib/thor/error.rb#44
3695
+ def all_commands; end
3696
+
3697
+ # Returns the value of attribute command.
3698
+ #
3699
+ # source://thor//lib/thor/error.rb#44
3700
+ def command; end
3701
+ end
3702
+
3703
+ # source://thor//lib/thor/error.rb#28
3704
+ class Thor::UndefinedCommandError::SpellChecker
3705
+ # @return [SpellChecker] a new instance of SpellChecker
3706
+ #
3707
+ # source://thor//lib/thor/error.rb#31
3708
+ def initialize(error); end
3709
+
3710
+ # source://thor//lib/thor/error.rb#35
3711
+ def corrections; end
3712
+
3713
+ # Returns the value of attribute error.
3714
+ #
3715
+ # source://thor//lib/thor/error.rb#29
3716
+ def error; end
3717
+
3718
+ # source://thor//lib/thor/error.rb#39
3719
+ def spell_checker; end
3720
+ end
3721
+
3722
+ # source://thor//lib/thor/error.rb#58
3723
+ Thor::UndefinedTaskError = Thor::UndefinedCommandError
3724
+
3725
+ # source://thor//lib/thor/error.rb#68
3726
+ class Thor::UnknownArgumentError < ::Thor::Error
3727
+ include ::DidYouMean::Correctable
3728
+
3729
+ # @return [UnknownArgumentError] a new instance of UnknownArgumentError
3730
+ #
3731
+ # source://thor//lib/thor/error.rb#88
3732
+ def initialize(switches, unknown); end
3733
+
3734
+ # Returns the value of attribute switches.
3735
+ #
3736
+ # source://thor//lib/thor/error.rb#86
3737
+ def switches; end
3738
+
3739
+ # Returns the value of attribute unknown.
3740
+ #
3741
+ # source://thor//lib/thor/error.rb#86
3742
+ def unknown; end
3743
+ end
3744
+
3745
+ # source://thor//lib/thor/error.rb#69
3746
+ class Thor::UnknownArgumentError::SpellChecker
3747
+ # @return [SpellChecker] a new instance of SpellChecker
3748
+ #
3749
+ # source://thor//lib/thor/error.rb#72
3750
+ def initialize(error); end
3751
+
3752
+ # source://thor//lib/thor/error.rb#76
3753
+ def corrections; end
3754
+
3755
+ # Returns the value of attribute error.
3756
+ #
3757
+ # source://thor//lib/thor/error.rb#70
3758
+ def error; end
3759
+
3760
+ # source://thor//lib/thor/error.rb#81
3761
+ def spell_checker; end
3762
+ end
3763
+
3764
+ # This module holds several utilities:
3765
+ #
3766
+ # 1) Methods to convert thor namespaces to constants and vice-versa.
3767
+ #
3768
+ # Thor::Util.namespace_from_thor_class(Foo::Bar::Baz) #=> "foo:bar:baz"
3769
+ #
3770
+ # 2) Loading thor files and sandboxing:
3771
+ #
3772
+ # Thor::Util.load_thorfile("~/.thor/foo")
3773
+ #
3774
+ # source://thor//lib/thor/util.rb#17
3775
+ module Thor::Util
3776
+ class << self
3777
+ # Receives a string and convert it to camel case. camel_case returns CamelCase.
3778
+ #
3779
+ # ==== Parameters
3780
+ # String
3781
+ #
3782
+ # ==== Returns
3783
+ # String
3784
+ #
3785
+ # source://thor//lib/thor/util.rb#104
3786
+ def camel_case(str); end
3787
+
3788
+ # Returns a string that has had any glob characters escaped.
3789
+ # The glob characters are `* ? { } [ ]`.
3790
+ #
3791
+ # ==== Examples
3792
+ #
3793
+ # Thor::Util.escape_globs('[apps]') # => '\[apps\]'
3794
+ #
3795
+ # ==== Parameters
3796
+ # String
3797
+ #
3798
+ # ==== Returns
3799
+ # String
3800
+ #
3801
+ # source://thor//lib/thor/util.rb#263
3802
+ def escape_globs(path); end
3803
+
3804
+ # Returns a string that has had any HTML characters escaped.
3805
+ #
3806
+ # ==== Examples
3807
+ #
3808
+ # Thor::Util.escape_html('<div>') # => "&lt;div&gt;"
3809
+ #
3810
+ # ==== Parameters
3811
+ # String
3812
+ #
3813
+ # ==== Returns
3814
+ # String
3815
+ #
3816
+ # source://thor//lib/thor/util.rb#279
3817
+ def escape_html(string); end
3818
+
3819
+ # Receives a namespace and search for it in the Thor::Base subclasses.
3820
+ #
3821
+ # ==== Parameters
3822
+ # namespace<String>:: The namespace to search for.
3823
+ #
3824
+ # source://thor//lib/thor/util.rb#24
3825
+ def find_by_namespace(namespace); end
3826
+
3827
+ # Receives a namespace and tries to retrieve a Thor or Thor::Group class
3828
+ # from it. It first searches for a class using the all the given namespace,
3829
+ # if it's not found, removes the highest entry and searches for the class
3830
+ # again. If found, returns the highest entry as the class name.
3831
+ #
3832
+ # ==== Examples
3833
+ #
3834
+ # class Foo::Bar < Thor
3835
+ # def baz
3836
+ # end
3837
+ # end
3838
+ #
3839
+ # class Baz::Foo < Thor::Group
3840
+ # end
3841
+ #
3842
+ # Thor::Util.namespace_to_thor_class("foo:bar") #=> Foo::Bar, nil # will invoke default command
3843
+ # Thor::Util.namespace_to_thor_class("baz:foo") #=> Baz::Foo, nil
3844
+ # Thor::Util.namespace_to_thor_class("foo:bar:baz") #=> Foo::Bar, "baz"
3845
+ #
3846
+ # ==== Parameters
3847
+ # namespace<String>
3848
+ #
3849
+ # source://thor//lib/thor/util.rb#131
3850
+ def find_class_and_command_by_namespace(namespace, fallback = T.unsafe(nil)); end
3851
+
3852
+ # Receives a namespace and tries to retrieve a Thor or Thor::Group class
3853
+ # from it. It first searches for a class using the all the given namespace,
3854
+ # if it's not found, removes the highest entry and searches for the class
3855
+ # again. If found, returns the highest entry as the class name.
3856
+ #
3857
+ # ==== Examples
3858
+ #
3859
+ # class Foo::Bar < Thor
3860
+ # def baz
3861
+ # end
3862
+ # end
3863
+ #
3864
+ # class Baz::Foo < Thor::Group
3865
+ # end
3866
+ #
3867
+ # Thor::Util.namespace_to_thor_class("foo:bar") #=> Foo::Bar, nil # will invoke default command
3868
+ # Thor::Util.namespace_to_thor_class("baz:foo") #=> Baz::Foo, nil
3869
+ # Thor::Util.namespace_to_thor_class("foo:bar:baz") #=> Foo::Bar, "baz"
3870
+ #
3871
+ # ==== Parameters
3872
+ # namespace<String>
3873
+ #
3874
+ # source://thor//lib/thor/util.rb#131
3875
+ def find_class_and_task_by_namespace(namespace, fallback = T.unsafe(nil)); end
3876
+
3877
+ # Where to look for Thor files.
3878
+ #
3879
+ # source://thor//lib/thor/util.rb#212
3880
+ def globs_for(path); end
3881
+
3882
+ # Receives a path and load the thor file in the path. The file is evaluated
3883
+ # inside the sandbox to avoid namespacing conflicts.
3884
+ #
3885
+ # source://thor//lib/thor/util.rb#152
3886
+ def load_thorfile(path, content = T.unsafe(nil), debug = T.unsafe(nil)); end
3887
+
3888
+ # Receives a constant and converts it to a Thor namespace. Since Thor
3889
+ # commands can be added to a sandbox, this method is also responsible for
3890
+ # removing the sandbox namespace.
3891
+ #
3892
+ # This method should not be used in general because it's used to deal with
3893
+ # older versions of Thor. On current versions, if you need to get the
3894
+ # namespace from a class, just call namespace on it.
3895
+ #
3896
+ # ==== Parameters
3897
+ # constant<Object>:: The constant to be converted to the thor path.
3898
+ #
3899
+ # ==== Returns
3900
+ # String:: If we receive Foo::Bar::Baz it returns "foo:bar:baz"
3901
+ #
3902
+ # source://thor//lib/thor/util.rb#43
3903
+ def namespace_from_thor_class(constant); end
3904
+
3905
+ # Given the contents, evaluate it inside the sandbox and returns the
3906
+ # namespaces defined in the sandbox.
3907
+ #
3908
+ # ==== Parameters
3909
+ # contents<String>
3910
+ #
3911
+ # ==== Returns
3912
+ # Array[Object]
3913
+ #
3914
+ # source://thor//lib/thor/util.rb#58
3915
+ def namespaces_in_content(contents, file = T.unsafe(nil)); end
3916
+
3917
+ # Return the path to the ruby interpreter taking into account multiple
3918
+ # installations and windows extensions.
3919
+ #
3920
+ # source://thor//lib/thor/util.rb#220
3921
+ def ruby_command; end
3922
+
3923
+ # Receives a string and convert it to snake case. SnakeCase returns snake_case.
3924
+ #
3925
+ # ==== Parameters
3926
+ # String
3927
+ #
3928
+ # ==== Returns
3929
+ # String
3930
+ #
3931
+ # source://thor//lib/thor/util.rb#90
3932
+ def snake_case(str); end
3933
+
3934
+ # Returns the thor classes declared inside the given class.
3935
+ #
3936
+ # source://thor//lib/thor/util.rb#74
3937
+ def thor_classes_in(klass); end
3938
+
3939
+ # Returns the root where thor files are located, depending on the OS.
3940
+ #
3941
+ # source://thor//lib/thor/util.rb#191
3942
+ def thor_root; end
3943
+
3944
+ # Returns the files in the thor root. On Windows thor_root will be something
3945
+ # like this:
3946
+ #
3947
+ # C:\Documents and Settings\james\.thor
3948
+ #
3949
+ # If we don't #gsub the \ character, Dir.glob will fail.
3950
+ #
3951
+ # source://thor//lib/thor/util.rb#202
3952
+ def thor_root_glob; end
3953
+
3954
+ # source://thor//lib/thor/util.rb#167
3955
+ def user_home; end
3956
+ end
3957
+ end