vigiles 0.1.0.pre.beta3 → 0.1.0.pre.beta5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +10 -1
  3. data/lib/vigiles/archive/extras.rb +4 -3
  4. data/lib/vigiles/archive/metadata.rb +3 -2
  5. data/lib/vigiles/archive/request.rb +18 -4
  6. data/lib/vigiles/archive.rb +15 -3
  7. data/lib/vigiles/constants.rb +7 -0
  8. data/lib/vigiles/middleware/record_conversation.rb +6 -22
  9. data/lib/vigiles/spec.rb +1 -1
  10. data/lib/vigiles/utilities/uri.rb +18 -0
  11. data/lib/vigiles/version.rb +2 -2
  12. data/lib/vigiles.rb +5 -1
  13. data/sorbet/rbi/gems/{activemodel@7.0.5.rbi → actioncable@7.1.3.3.rbi} +2 -2
  14. data/sorbet/rbi/gems/actionmailbox@7.1.3.3.rbi +8 -0
  15. data/sorbet/rbi/gems/{activerecord@7.0.5.rbi → actionmailer@7.1.3.3.rbi} +2 -2
  16. data/sorbet/rbi/gems/actionpack@7.1.3.3.rbi +20046 -0
  17. data/sorbet/rbi/gems/actiontext@7.1.3.3.rbi +8 -0
  18. data/sorbet/rbi/gems/actionview@7.1.3.3.rbi +15953 -0
  19. data/sorbet/rbi/gems/activejob@7.1.3.3.rbi +8 -0
  20. data/sorbet/rbi/gems/activemodel@7.1.3.3.rbi +6657 -0
  21. data/sorbet/rbi/gems/activerecord@7.1.3.3.rbi +41520 -0
  22. data/sorbet/rbi/gems/activestorage@7.1.3.3.rbi +8 -0
  23. data/sorbet/rbi/gems/activesupport@7.1.3.3.rbi +20570 -0
  24. data/sorbet/rbi/gems/base64@0.2.0.rbi +508 -0
  25. data/sorbet/rbi/gems/bigdecimal@3.1.8.rbi +77 -0
  26. data/sorbet/rbi/gems/builder@3.2.4.rbi +8 -0
  27. data/sorbet/rbi/gems/connection_pool@2.4.1.rbi +8 -0
  28. data/sorbet/rbi/gems/crass@1.0.6.rbi +622 -0
  29. data/sorbet/rbi/gems/date@3.3.4.rbi +74 -0
  30. data/sorbet/rbi/gems/drb@2.2.1.rbi +1346 -0
  31. data/sorbet/rbi/gems/globalid@1.2.1.rbi +8 -0
  32. data/sorbet/rbi/gems/i18n@1.14.5.rbi +2358 -0
  33. data/sorbet/rbi/gems/io-console@0.7.2.rbi +8 -0
  34. data/sorbet/rbi/gems/loofah@2.22.0.rbi +1080 -0
  35. data/sorbet/rbi/gems/{i18n@1.14.1.rbi → mail@2.8.1.rbi} +2 -2
  36. data/sorbet/rbi/gems/marcel@1.0.4.rbi +8 -0
  37. data/sorbet/rbi/gems/mini_mime@1.1.5.rbi +8 -0
  38. data/sorbet/rbi/gems/mutex_m@0.2.0.rbi +93 -0
  39. data/sorbet/rbi/gems/net-imap@0.4.11.rbi +8 -0
  40. data/sorbet/rbi/gems/net-pop@0.1.2.rbi +8 -0
  41. data/sorbet/rbi/gems/net-protocol@0.2.2.rbi +291 -0
  42. data/sorbet/rbi/gems/net-smtp@0.5.0.rbi +8 -0
  43. data/sorbet/rbi/gems/nio4r@2.7.3.rbi +8 -0
  44. data/sorbet/rbi/gems/nokogiri@1.16.5.rbi +7310 -0
  45. data/sorbet/rbi/gems/psych@5.1.2.rbi +1768 -0
  46. data/sorbet/rbi/gems/rack-session@2.0.0.rbi +729 -0
  47. data/sorbet/rbi/gems/rack-test@2.1.0.rbi +749 -0
  48. data/sorbet/rbi/gems/rack@3.0.11.rbi +5195 -0
  49. data/sorbet/rbi/gems/rackup@2.1.0.rbi +406 -0
  50. data/sorbet/rbi/gems/rails-dom-testing@2.2.0.rbi +691 -0
  51. data/sorbet/rbi/gems/rails-html-sanitizer@1.6.0.rbi +721 -0
  52. data/sorbet/rbi/gems/rails@7.1.3.3.rbi +8 -0
  53. data/sorbet/rbi/gems/railties@7.1.3.3.rbi +2167 -0
  54. data/sorbet/rbi/gems/rdoc@6.6.3.1.rbi +12715 -0
  55. data/sorbet/rbi/gems/reline@0.5.7.rbi +8 -0
  56. data/sorbet/rbi/gems/stringio@3.1.0.rbi +8 -0
  57. data/sorbet/rbi/gems/timeout@0.4.1.rbi +148 -0
  58. data/sorbet/rbi/gems/webrick@1.8.1.rbi +2606 -0
  59. data/sorbet/rbi/gems/websocket-driver@0.7.6.rbi +8 -0
  60. data/sorbet/rbi/gems/websocket-extensions@0.1.5.rbi +8 -0
  61. data/sorbet/rbi/gems/zeitwerk@2.6.13.rbi +1003 -0
  62. data/vigiles.gemspec +1 -1
  63. metadata +54 -7
  64. data/sorbet/rbi/gems/activesupport@7.0.5.rbi +0 -14
@@ -0,0 +1,2167 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `railties` gem.
5
+ # Please instead update this file by running `bin/tapioca gem railties`.
6
+
7
+ # :include: railties/README.rdoc
8
+ #
9
+ # source://railties//lib/rails/deprecator.rb#3
10
+ module Rails
11
+ class << self
12
+ # source://railties//lib/rails/deprecator.rb#4
13
+ def deprecator; end
14
+ end
15
+ end
16
+
17
+ # source://railties//lib/rails/command.rb#11
18
+ module Rails::Command
19
+ include ::Rails::Command::Behavior
20
+ extend ::ActiveSupport::Autoload
21
+ extend ::Rails::Command::Behavior::ClassMethods
22
+
23
+ class << self
24
+ # source://railties//lib/rails/command.rb#116
25
+ def application_root; end
26
+
27
+ # source://railties//lib/rails/command.rb#57
28
+ def environment; end
29
+
30
+ # Rails finds namespaces similar to Thor, it only adds one rule:
31
+ #
32
+ # Command names must end with "_command.rb". This is required because Rails
33
+ # looks in load paths and loads the command just before it's going to be used.
34
+ #
35
+ # find_by_namespace :webrat, :integration
36
+ #
37
+ # Will search for the following commands:
38
+ #
39
+ # "webrat", "webrat:integration", "rails:webrat", "rails:webrat:integration"
40
+ #
41
+ # source://railties//lib/rails/command.rb#96
42
+ def find_by_namespace(namespace, command_name = T.unsafe(nil)); end
43
+
44
+ # source://railties//lib/rails/command.rb#53
45
+ def hidden_commands; end
46
+
47
+ # Receives a namespace, arguments, and the behavior to invoke the command.
48
+ #
49
+ # source://railties//lib/rails/command.rb#62
50
+ def invoke(full_namespace, args = T.unsafe(nil), **config); end
51
+
52
+ # source://railties//lib/rails/command.rb#120
53
+ def printing_commands; end
54
+
55
+ # Returns the root of the \Rails engine or app running the command.
56
+ #
57
+ # source://railties//lib/rails/command.rb#108
58
+ def root; end
59
+
60
+ private
61
+
62
+ # source://railties//lib/rails/command.rb#159
63
+ def command_type; end
64
+
65
+ # source://railties//lib/rails/command.rb#167
66
+ def file_lookup_paths; end
67
+
68
+ # source://railties//lib/rails/command.rb#154
69
+ def invoke_rake(task, args, config); end
70
+
71
+ # source://railties//lib/rails/command.rb#163
72
+ def lookup_paths; end
73
+
74
+ # @return [Boolean]
75
+ #
76
+ # source://railties//lib/rails/command.rb#127
77
+ def rails_new_with_no_path?(args); end
78
+
79
+ # source://railties//lib/rails/command.rb#131
80
+ def split_namespace(namespace); end
81
+
82
+ # source://railties//lib/rails/command.rb#146
83
+ def with_argv(argv); end
84
+ end
85
+ end
86
+
87
+ # source://railties//lib/rails/command/actions.rb#5
88
+ module Rails::Command::Actions
89
+ # source://railties//lib/rails/command/actions.rb#18
90
+ def boot_application!; end
91
+
92
+ # source://railties//lib/rails/command/actions.rb#23
93
+ def load_environment_config!; end
94
+
95
+ # source://railties//lib/rails/command/actions.rb#46
96
+ def load_generators; end
97
+
98
+ # source://railties//lib/rails/command/actions.rb#42
99
+ def load_tasks; end
100
+
101
+ # source://railties//lib/rails/command/actions.rb#13
102
+ def require_application!; end
103
+
104
+ # Change to the application's path if there is no <tt>config.ru</tt> file in current directory.
105
+ # This allows us to run <tt>rails server</tt> from other directories, but still get
106
+ # the main <tt>config.ru</tt> and properly set the <tt>tmp</tt> directory.
107
+ #
108
+ # source://railties//lib/rails/command/actions.rb#9
109
+ def set_application_directory!; end
110
+ end
111
+
112
+ # source://railties//lib/rails/command/base.rb#14
113
+ class Rails::Command::Base < ::Thor
114
+ include ::Rails::Command::Actions
115
+
116
+ # source://thor/1.3.0/lib/thor/base.rb#155
117
+ def current_subcommand; end
118
+
119
+ # source://railties//lib/rails/command/base.rb#172
120
+ def executable(*_arg0, **_arg1, &_arg2); end
121
+
122
+ # source://railties//lib/rails/command/base.rb#175
123
+ def invoke_command(command, *_arg1); end
124
+
125
+ class << self
126
+ # source://railties//lib/rails/command/base.rb#86
127
+ def banner(command = T.unsafe(nil), *_arg1); end
128
+
129
+ # Sets the base_name taking into account the current class namespace.
130
+ #
131
+ # Rails::Command::TestCommand.base_name # => 'rails'
132
+ #
133
+ # source://railties//lib/rails/command/base.rb#106
134
+ def base_name; end
135
+
136
+ # source://railties//lib/rails/command/base.rb#20
137
+ def bin; end
138
+
139
+ # source://railties//lib/rails/command/base.rb#20
140
+ def bin=(value); end
141
+
142
+ # source://railties//lib/rails/command/base.rb#20
143
+ def bin?; end
144
+
145
+ # source://railties//lib/rails/command/base.rb#122
146
+ def class_usage; end
147
+
148
+ # Return command name without namespaces.
149
+ #
150
+ # Rails::Command::TestCommand.command_name # => 'test'
151
+ #
152
+ # source://railties//lib/rails/command/base.rb#115
153
+ def command_name; end
154
+
155
+ # Default file root to place extra files a command might need, placed
156
+ # one folder above the command file.
157
+ #
158
+ # For a Rails::Command::TestCommand placed in <tt>rails/command/test_command.rb</tt>
159
+ # would return <tt>rails/test</tt>.
160
+ #
161
+ # source://railties//lib/rails/command/base.rb#139
162
+ def default_command_root; end
163
+
164
+ # Tries to get the description from a USAGE file one folder above the command
165
+ # root.
166
+ #
167
+ # source://railties//lib/rails/command/base.rb#34
168
+ def desc(usage = T.unsafe(nil), description = T.unsafe(nil), options = T.unsafe(nil)); end
169
+
170
+ # Returns true when the app is a \Rails engine.
171
+ #
172
+ # @return [Boolean]
173
+ #
174
+ # source://railties//lib/rails/command/base.rb#28
175
+ def engine?; end
176
+
177
+ # source://railties//lib/rails/command/base.rb#82
178
+ def executable(command_name = T.unsafe(nil)); end
179
+
180
+ # @return [Boolean]
181
+ #
182
+ # source://railties//lib/rails/command/base.rb#23
183
+ def exit_on_failure?; end
184
+
185
+ # Override Thor's class-level help to also show the USAGE.
186
+ #
187
+ # source://railties//lib/rails/command/base.rb#98
188
+ def help(shell, *_arg1); end
189
+
190
+ # Convenience method to hide this command from the available ones when
191
+ # running rails command.
192
+ #
193
+ # source://railties//lib/rails/command/base.rb#55
194
+ def hide_command!; end
195
+
196
+ # source://railties//lib/rails/command/base.rb#59
197
+ def inherited(base); end
198
+
199
+ # Convenience method to get the namespace from the class name. It's the
200
+ # same as Thor default except that the Command at the end of the class
201
+ # is removed.
202
+ #
203
+ # source://railties//lib/rails/command/base.rb#45
204
+ def namespace(name = T.unsafe(nil)); end
205
+
206
+ # source://railties//lib/rails/command/base.rb#67
207
+ def perform(command, args, config); end
208
+
209
+ # source://railties//lib/rails/command/base.rb#76
210
+ def printing_commands; end
211
+
212
+ # Path to lookup a USAGE description in a file.
213
+ #
214
+ # source://railties//lib/rails/command/base.rb#129
215
+ def usage_path; end
216
+
217
+ private
218
+
219
+ # Allow the command method to be called perform.
220
+ #
221
+ # source://railties//lib/rails/command/base.rb#146
222
+ def create_command(meth); end
223
+
224
+ # source://railties//lib/rails/command/base.rb#159
225
+ def namespaced_name(name); end
226
+
227
+ # source://railties//lib/rails/command/base.rb#164
228
+ def resolve_path(path); end
229
+ end
230
+ end
231
+
232
+ # source://railties//lib/rails/command/base.rb#15
233
+ class Rails::Command::Base::Error < ::Thor::Error; end
234
+
235
+ # source://railties//lib/rails/command/behavior.rb#7
236
+ module Rails::Command::Behavior
237
+ extend ::ActiveSupport::Concern
238
+
239
+ mixes_in_class_methods ::Rails::Command::Behavior::ClassMethods
240
+ end
241
+
242
+ # source://railties//lib/rails/command/behavior.rb#0
243
+ module Rails::Command::Behavior::ClassMethods
244
+ # source://railties//lib/rails/command/behavior.rb#12
245
+ def no_color!; end
246
+
247
+ # source://railties//lib/rails/command/behavior.rb#17
248
+ def subclasses; end
249
+
250
+ private
251
+
252
+ # source://railties//lib/rails/command/behavior.rb#36
253
+ def lookup(namespaces); end
254
+
255
+ # source://railties//lib/rails/command/behavior.rb#56
256
+ def lookup!; end
257
+
258
+ # source://railties//lib/rails/command/behavior.rb#70
259
+ def namespaces_to_paths(namespaces); end
260
+
261
+ # source://railties//lib/rails/command/behavior.rb#23
262
+ def print_list(base, namespaces); end
263
+ end
264
+
265
+ # source://railties//lib/rails/command.rb#17
266
+ class Rails::Command::CorrectableNameError < ::StandardError
267
+ include ::DidYouMean::Correctable
268
+
269
+ # @return [CorrectableNameError] a new instance of CorrectableNameError
270
+ #
271
+ # source://railties//lib/rails/command.rb#20
272
+ def initialize(message, name, alternatives); end
273
+
274
+ # source://railties//lib/rails/command.rb#35
275
+ def corrections; end
276
+
277
+ # Returns the value of attribute name.
278
+ #
279
+ # source://railties//lib/rails/command.rb#18
280
+ def name; end
281
+ end
282
+
283
+ # source://railties//lib/rails/command.rb#49
284
+ Rails::Command::HELP_MAPPINGS = T.let(T.unsafe(nil), Set)
285
+
286
+ # source://railties//lib/rails/command.rb#41
287
+ class Rails::Command::UnrecognizedCommandError < ::Rails::Command::CorrectableNameError
288
+ # @return [UnrecognizedCommandError] a new instance of UnrecognizedCommandError
289
+ #
290
+ # source://railties//lib/rails/command.rb#42
291
+ def initialize(name); end
292
+ end
293
+
294
+ # source://railties//lib/rails/command.rb#50
295
+ Rails::Command::VERSION_MAPPINGS = T.let(T.unsafe(nil), Set)
296
+
297
+ # source://railties//lib/rails/generators.rb#14
298
+ module Rails::Generators
299
+ include ::Rails::Command::Behavior
300
+ extend ::Rails::Command::Behavior::ClassMethods
301
+
302
+ # source://railties//lib/rails/generators.rb#27
303
+ def namespace; end
304
+
305
+ # source://railties//lib/rails/generators.rb#27
306
+ def namespace=(val); end
307
+
308
+ class << self
309
+ # source://railties//lib/rails/generators.rb#274
310
+ def add_generated_file(file); end
311
+
312
+ # source://railties//lib/rails/generators.rb#88
313
+ def after_generate_callbacks; end
314
+
315
+ # source://railties//lib/rails/generators.rb#80
316
+ def aliases; end
317
+
318
+ # Configure generators for API only applications. It basically hides
319
+ # everything that is usually browser related, such as assets and session
320
+ # migration generators, and completely disable helpers and assets
321
+ # so generators such as scaffold won't create them.
322
+ #
323
+ # source://railties//lib/rails/generators.rb#112
324
+ def api_only!; end
325
+
326
+ # source://railties//lib/rails/generators.rb#64
327
+ def configure!(config); end
328
+
329
+ # Hold configured generators fallbacks. If a plugin developer wants a
330
+ # generator group to fall back to another group in case of missing generators,
331
+ # they can add a fallback.
332
+ #
333
+ # For example, shoulda is considered a test_framework and is an extension
334
+ # of test_unit. However, most part of shoulda generators are similar to
335
+ # test_unit ones.
336
+ #
337
+ # Shoulda then can tell generators to search for test_unit generators when
338
+ # some of them are not available by adding a fallback:
339
+ #
340
+ # Rails::Generators.fallbacks[:shoulda] = :test_unit
341
+ #
342
+ # source://railties//lib/rails/generators.rb#104
343
+ def fallbacks; end
344
+
345
+ # Rails finds namespaces similar to Thor, it only adds one rule:
346
+ #
347
+ # Generators names must end with "_generator.rb". This is required because Rails
348
+ # looks in load paths and loads the generator just before it's going to be used.
349
+ #
350
+ # find_by_namespace :webrat, :rails, :integration
351
+ #
352
+ # Will search for the following generators:
353
+ #
354
+ # "rails:webrat", "webrat:integration", "webrat"
355
+ #
356
+ # Notice that "rails:generators:webrat" could be loaded as well, what
357
+ # Rails looks for is the first and last parts of the namespace.
358
+ #
359
+ # source://railties//lib/rails/generators.rb#230
360
+ def find_by_namespace(name, base = T.unsafe(nil), context = T.unsafe(nil)); end
361
+
362
+ # Show help message with available generators.
363
+ #
364
+ # source://railties//lib/rails/generators.rb#165
365
+ def help(command = T.unsafe(nil)); end
366
+
367
+ # Returns an array of generator namespaces that are hidden.
368
+ # Generator namespaces may be hidden for a variety of reasons.
369
+ # Some are aliased such as "rails:migration" and can be
370
+ # invoked with the shorter "migration".
371
+ #
372
+ # source://railties//lib/rails/generators.rb#130
373
+ def hidden_namespaces; end
374
+
375
+ # source://railties//lib/rails/generators.rb#159
376
+ def hide_namespace(*namespaces); end
377
+
378
+ # source://railties//lib/rails/generators.rb#159
379
+ def hide_namespaces(*namespaces); end
380
+
381
+ # Receives a namespace, arguments, and the behavior to invoke the generator.
382
+ # It's used as the default entry point for generate, destroy, and update
383
+ # commands.
384
+ #
385
+ # source://railties//lib/rails/generators.rb#257
386
+ def invoke(namespace, args = T.unsafe(nil), config = T.unsafe(nil)); end
387
+
388
+ # source://railties//lib/rails/generators.rb#27
389
+ def namespace; end
390
+
391
+ # source://railties//lib/rails/generators.rb#27
392
+ def namespace=(val); end
393
+
394
+ # source://railties//lib/rails/generators.rb#84
395
+ def options; end
396
+
397
+ # source://railties//lib/rails/generators.rb#187
398
+ def print_generators; end
399
+
400
+ # source://railties//lib/rails/generators.rb#182
401
+ def public_namespaces; end
402
+
403
+ # source://railties//lib/rails/generators.rb#191
404
+ def sorted_groups; end
405
+
406
+ # source://railties//lib/rails/generators.rb#76
407
+ def templates_path; end
408
+
409
+ private
410
+
411
+ # source://railties//lib/rails/generators.rb#301
412
+ def command_type; end
413
+
414
+ # source://railties//lib/rails/generators.rb#309
415
+ def file_lookup_paths; end
416
+
417
+ # Try fallbacks for the given base.
418
+ #
419
+ # source://railties//lib/rails/generators.rb#286
420
+ def invoke_fallbacks_for(name, base); end
421
+
422
+ # source://railties//lib/rails/generators.rb#305
423
+ def lookup_paths; end
424
+
425
+ # source://railties//lib/rails/generators.rb#280
426
+ def print_list(base, namespaces); end
427
+
428
+ # source://railties//lib/rails/generators.rb#313
429
+ def run_after_generate_callback; end
430
+ end
431
+ end
432
+
433
+ # source://railties//lib/rails/generators/actions.rb#9
434
+ module Rails::Generators::Actions
435
+ # source://railties//lib/rails/generators/actions.rb#10
436
+ def initialize(*_arg0); end
437
+
438
+ # Add the given source to +Gemfile+
439
+ #
440
+ # If block is given, gem entries in block are wrapped into the source group.
441
+ #
442
+ # add_source "http://gems.github.com/"
443
+ #
444
+ # add_source "http://gems.github.com/" do
445
+ # gem "rspec-rails"
446
+ # end
447
+ #
448
+ # source://railties//lib/rails/generators/actions.rb#151
449
+ def add_source(source, options = T.unsafe(nil), &block); end
450
+
451
+ # Adds configuration code to a \Rails runtime environment.
452
+ #
453
+ # By default, adds code inside the +Application+ class in
454
+ # +config/application.rb+ so that it applies to all environments.
455
+ #
456
+ # environment %(config.asset_host = "cdn.provider.com")
457
+ #
458
+ # Results in:
459
+ #
460
+ # # config/application.rb
461
+ # class Application < Rails::Application
462
+ # config.asset_host = "cdn.provider.com"
463
+ # # ...
464
+ # end
465
+ #
466
+ # If the +:env+ option is specified, the code will be added to the
467
+ # corresponding file in +config/environments+ instead.
468
+ #
469
+ # environment %(config.asset_host = "localhost:3000"), env: "development"
470
+ #
471
+ # Results in:
472
+ #
473
+ # # config/environments/development.rb
474
+ # Rails.application.configure do
475
+ # config.asset_host = "localhost:3000"
476
+ # # ...
477
+ # end
478
+ #
479
+ # +:env+ can also be an array. In which case, the code is added to each
480
+ # corresponding file in +config/environments+.
481
+ #
482
+ # The code can also be specified as the return value of the block:
483
+ #
484
+ # environment do
485
+ # %(config.asset_host = "cdn.provider.com")
486
+ # end
487
+ #
488
+ # environment(nil, env: "development") do
489
+ # %(config.asset_host = "localhost:3000")
490
+ # end
491
+ #
492
+ # source://railties//lib/rails/generators/actions.rb#206
493
+ def application(data = T.unsafe(nil), options = T.unsafe(nil)); end
494
+
495
+ # Adds configuration code to a \Rails runtime environment.
496
+ #
497
+ # By default, adds code inside the +Application+ class in
498
+ # +config/application.rb+ so that it applies to all environments.
499
+ #
500
+ # environment %(config.asset_host = "cdn.provider.com")
501
+ #
502
+ # Results in:
503
+ #
504
+ # # config/application.rb
505
+ # class Application < Rails::Application
506
+ # config.asset_host = "cdn.provider.com"
507
+ # # ...
508
+ # end
509
+ #
510
+ # If the +:env+ option is specified, the code will be added to the
511
+ # corresponding file in +config/environments+ instead.
512
+ #
513
+ # environment %(config.asset_host = "localhost:3000"), env: "development"
514
+ #
515
+ # Results in:
516
+ #
517
+ # # config/environments/development.rb
518
+ # Rails.application.configure do
519
+ # config.asset_host = "localhost:3000"
520
+ # # ...
521
+ # end
522
+ #
523
+ # +:env+ can also be an array. In which case, the code is added to each
524
+ # corresponding file in +config/environments+.
525
+ #
526
+ # The code can also be specified as the return value of the block:
527
+ #
528
+ # environment do
529
+ # %(config.asset_host = "cdn.provider.com")
530
+ # end
531
+ #
532
+ # environment(nil, env: "development") do
533
+ # %(config.asset_host = "localhost:3000")
534
+ # end
535
+ #
536
+ # source://railties//lib/rails/generators/actions.rb#206
537
+ def environment(data = T.unsafe(nil), options = T.unsafe(nil)); end
538
+
539
+ # Adds a +gem+ declaration to the +Gemfile+ for the specified gem.
540
+ #
541
+ # gem "rspec", group: :test
542
+ # gem "technoweenie-restful-authentication", lib: "restful-authentication", source: "http://gems.github.com/"
543
+ # gem "rails", "3.0", git: "https://github.com/rails/rails"
544
+ # gem "RedCloth", ">= 4.1.0", "< 4.2.0"
545
+ # gem "rspec", comment: "Put this comment above the gem declaration"
546
+ #
547
+ # Note that this method only adds the gem to the +Gemfile+; it does not
548
+ # install the gem.
549
+ #
550
+ # ==== Options
551
+ #
552
+ # [+:version+]
553
+ # The version constraints for the gem, specified as a string or an
554
+ # array of strings:
555
+ #
556
+ # gem "my_gem", version: "~> 1.1"
557
+ # gem "my_gem", version: [">= 1.1", "< 2.0"]
558
+ #
559
+ # Alternatively, can be specified as one or more arguments following the
560
+ # gem name:
561
+ #
562
+ # gem "my_gem", ">= 1.1", "< 2.0"
563
+ #
564
+ # [+:comment+]
565
+ # Outputs a comment above the +gem+ declaration in the +Gemfile+.
566
+ #
567
+ # gem "my_gem", comment: "First line.\nSecond line."
568
+ #
569
+ # Outputs:
570
+ #
571
+ # # First line.
572
+ # # Second line.
573
+ # gem "my_gem"
574
+ #
575
+ # [+:group+]
576
+ # The gem group in the +Gemfile+ that the gem belongs to.
577
+ #
578
+ # [+:git+]
579
+ # The URL of the git repository for the gem.
580
+ #
581
+ # Any additional options passed to this method will be appended to the
582
+ # +gem+ declaration in the +Gemfile+. For example:
583
+ #
584
+ # gem "my_gem", comment: "Edge my_gem", git: "https://example.com/my_gem.git", branch: "master"
585
+ #
586
+ # Outputs:
587
+ #
588
+ # # Edge my_gem
589
+ # gem "my_gem", git: "https://example.com/my_gem.git", branch: "master"
590
+ #
591
+ # source://railties//lib/rails/generators/actions.rb#67
592
+ def gem(*args); end
593
+
594
+ # Wraps gem entries inside a group.
595
+ #
596
+ # gem_group :development, :test do
597
+ # gem "rspec-rails"
598
+ # end
599
+ #
600
+ # source://railties//lib/rails/generators/actions.rb#111
601
+ def gem_group(*names, &block); end
602
+
603
+ # Runs another generator.
604
+ #
605
+ # generate "scaffold", "Post title:string body:text"
606
+ # generate "scaffold", "Post", "title:string", "body:text"
607
+ #
608
+ # The first argument is the generator name, and the remaining arguments
609
+ # are joined together and passed to the generator.
610
+ #
611
+ # source://railties//lib/rails/generators/actions.rb#332
612
+ def generate(what, *args); end
613
+
614
+ # Runs one or more git commands.
615
+ #
616
+ # git :init
617
+ # # => runs `git init`
618
+ #
619
+ # git add: "this.file that.rb"
620
+ # # => runs `git add this.file that.rb`
621
+ #
622
+ # git commit: "-m 'First commit'"
623
+ # # => runs `git commit -m 'First commit'`
624
+ #
625
+ # git add: "good.rb", rm: "bad.cxx"
626
+ # # => runs `git add good.rb; git rm bad.cxx`
627
+ #
628
+ # source://railties//lib/rails/generators/actions.rb#237
629
+ def git(commands = T.unsafe(nil)); end
630
+
631
+ # source://railties//lib/rails/generators/actions.rb#125
632
+ def github(repo, options = T.unsafe(nil), &block); end
633
+
634
+ # Creates an initializer file in +config/initializers/+. The code can be
635
+ # specified as an argument or as the return value of the block.
636
+ #
637
+ # initializer "api.rb", <<~RUBY
638
+ # API_KEY = "123456"
639
+ # RUBY
640
+ #
641
+ # initializer "api.rb" do
642
+ # %(API_KEY = "123456")
643
+ # end
644
+ #
645
+ # source://railties//lib/rails/generators/actions.rb#319
646
+ def initializer(filename, data = T.unsafe(nil)); end
647
+
648
+ # Creates a file in +lib/+. The contents can be specified as an argument
649
+ # or as the return value of the block.
650
+ #
651
+ # lib "foreign.rb", <<~RUBY
652
+ # # Foreign code is fun
653
+ # RUBY
654
+ #
655
+ # lib "foreign.rb" do
656
+ # "# Foreign code is fun"
657
+ # end
658
+ #
659
+ # source://railties//lib/rails/generators/actions.rb#275
660
+ def lib(filename, data = T.unsafe(nil)); end
661
+
662
+ # Runs the specified \Rails command.
663
+ #
664
+ # rails_command "db:migrate"
665
+ # rails_command "db:migrate", env: "production"
666
+ # rails_command "db:migrate", abort_on_failure: true
667
+ # rails_command "stats", capture: true
668
+ # rails_command "gems:install", sudo: true
669
+ #
670
+ # ==== Options
671
+ #
672
+ # [+:env+]
673
+ # The \Rails environment in which to run the command. Defaults to
674
+ # <tt>ENV["RAILS_ENV"] || "development"</tt>.
675
+ #
676
+ # [+:abort_on_failure+]
677
+ # Whether to halt the generator if the command exits with a non-success
678
+ # exit status.
679
+ #
680
+ # [+:capture+]
681
+ # Whether to capture and return the output of the command.
682
+ #
683
+ # [+:sudo+]
684
+ # Whether to run the command using +sudo+.
685
+ #
686
+ # source://railties//lib/rails/generators/actions.rb#391
687
+ def rails_command(command, options = T.unsafe(nil)); end
688
+
689
+ # Runs the specified Rake task.
690
+ #
691
+ # rake "db:migrate"
692
+ # rake "db:migrate", env: "production"
693
+ # rake "db:migrate", abort_on_failure: true
694
+ # rake "stats", capture: true
695
+ # rake "gems:install", sudo: true
696
+ #
697
+ # ==== Options
698
+ #
699
+ # [+:env+]
700
+ # The \Rails environment in which to run the task. Defaults to
701
+ # <tt>ENV["RAILS_ENV"] || "development"</tt>.
702
+ #
703
+ # [+:abort_on_failure+]
704
+ # Whether to halt the generator if the task exits with a non-success
705
+ # exit status.
706
+ #
707
+ # [+:capture+]
708
+ # Whether to capture and return the output of the task.
709
+ #
710
+ # [+:sudo+]
711
+ # Whether to run the task using +sudo+.
712
+ #
713
+ # source://railties//lib/rails/generators/actions.rb#364
714
+ def rake(command, options = T.unsafe(nil)); end
715
+
716
+ # Creates a Rake tasks file in +lib/tasks/+. The code can be specified as
717
+ # an argument or as the return value of the block.
718
+ #
719
+ # rakefile "bootstrap.rake", <<~RUBY
720
+ # task :bootstrap do
721
+ # puts "Boots! Boots! Boots!"
722
+ # end
723
+ # RUBY
724
+ #
725
+ # rakefile "bootstrap.rake" do
726
+ # project = ask("What is the UNIX name of your project?")
727
+ #
728
+ # <<~RUBY
729
+ # namespace :#{project} do
730
+ # task :bootstrap do
731
+ # puts "Boots! Boots! Boots!"
732
+ # end
733
+ # end
734
+ # RUBY
735
+ # end
736
+ #
737
+ # source://railties//lib/rails/generators/actions.rb#302
738
+ def rakefile(filename, data = T.unsafe(nil)); end
739
+
740
+ # Reads the given file at the source root and prints it in the console.
741
+ #
742
+ # readme "README"
743
+ #
744
+ # source://railties//lib/rails/generators/actions.rb#442
745
+ def readme(path); end
746
+
747
+ # Make an entry in \Rails routing file <tt>config/routes.rb</tt>
748
+ #
749
+ # route "root 'welcome#index'"
750
+ # route "root 'admin#index'", namespace: :admin
751
+ #
752
+ # source://railties//lib/rails/generators/actions.rb#409
753
+ def route(routing_code, namespace: T.unsafe(nil)); end
754
+
755
+ # Creates a file in +vendor/+. The contents can be specified as an
756
+ # argument or as the return value of the block.
757
+ #
758
+ # vendor "foreign.rb", <<~RUBY
759
+ # # Foreign code is fun
760
+ # RUBY
761
+ #
762
+ # vendor "foreign.rb" do
763
+ # "# Foreign code is fun"
764
+ # end
765
+ #
766
+ # source://railties//lib/rails/generators/actions.rb#258
767
+ def vendor(filename, data = T.unsafe(nil)); end
768
+
769
+ private
770
+
771
+ # Append string to a file with a newline if necessary
772
+ #
773
+ # source://railties//lib/rails/generators/actions.rb#507
774
+ def append_file_with_newline(path, str, options = T.unsafe(nil)); end
775
+
776
+ # Runs the supplied command using either "rake ..." or "rails ..."
777
+ # based on the executor parameter provided.
778
+ #
779
+ # source://railties//lib/rails/generators/actions.rb#461
780
+ def execute_command(executor, command, options = T.unsafe(nil)); end
781
+
782
+ # Indent the +Gemfile+ to the depth of @indentation
783
+ #
784
+ # source://railties//lib/rails/generators/actions.rb#494
785
+ def indentation; end
786
+
787
+ # Define log for backwards compatibility. If just one argument is sent,
788
+ # invoke say, otherwise invoke say_status. Differently from say and
789
+ # similarly to say_status, this method respects the quiet? option given.
790
+ #
791
+ # source://railties//lib/rails/generators/actions.rb#450
792
+ def log(*args); end
793
+
794
+ # source://railties//lib/rails/generators/actions.rb#513
795
+ def match_file(path, pattern); end
796
+
797
+ # Returns optimized string with indentation
798
+ #
799
+ # source://railties//lib/rails/generators/actions.rb#487
800
+ def optimize_indentation(value, amount = T.unsafe(nil)); end
801
+
802
+ # Always returns value in double quotes.
803
+ #
804
+ # source://railties//lib/rails/generators/actions.rb#475
805
+ def quote(value); end
806
+
807
+ # Returns optimized string with indentation
808
+ #
809
+ # source://railties//lib/rails/generators/actions.rb#487
810
+ def rebase_indentation(value, amount = T.unsafe(nil)); end
811
+
812
+ # source://railties//lib/rails/generators/actions.rb#517
813
+ def route_namespace_pattern(namespace); end
814
+
815
+ # Manage +Gemfile+ indentation for a DSL action block
816
+ #
817
+ # source://railties//lib/rails/generators/actions.rb#499
818
+ def with_indentation(&block); end
819
+ end
820
+
821
+ # source://railties//lib/rails/generators/actions/create_migration.rb#9
822
+ class Rails::Generators::Actions::CreateMigration < ::Thor::Actions::CreateFile
823
+ # source://railties//lib/rails/generators/actions/create_migration.rb#41
824
+ def existing_migration; end
825
+
826
+ # source://railties//lib/rails/generators/actions/create_migration.rb#41
827
+ def exists?; end
828
+
829
+ # @return [Boolean]
830
+ #
831
+ # source://railties//lib/rails/generators/actions/create_migration.rb#18
832
+ def identical?; end
833
+
834
+ # source://railties//lib/rails/generators/actions/create_migration.rb#22
835
+ def invoke!; end
836
+
837
+ # source://railties//lib/rails/generators/actions/create_migration.rb#10
838
+ def migration_dir; end
839
+
840
+ # source://railties//lib/rails/generators/actions/create_migration.rb#14
841
+ def migration_file_name; end
842
+
843
+ # source://railties//lib/rails/generators/actions/create_migration.rb#37
844
+ def relative_existing_migration; end
845
+
846
+ # source://railties//lib/rails/generators/actions/create_migration.rb#29
847
+ def revoke!; end
848
+
849
+ private
850
+
851
+ # source://railties//lib/rails/generators/actions/create_migration.rb#48
852
+ def on_conflict_behavior; end
853
+
854
+ # source://railties//lib/rails/generators/actions/create_migration.rb#69
855
+ def say_status(status, color, message = T.unsafe(nil)); end
856
+ end
857
+
858
+ # ActiveModel is a class to be implemented by each ORM to allow \Rails to
859
+ # generate customized controller code.
860
+ #
861
+ # The API has the same methods as ActiveRecord, but each method returns a
862
+ # string that matches the ORM API.
863
+ #
864
+ # For example:
865
+ #
866
+ # ActiveRecord::Generators::ActiveModel.find(Foo, "params[:id]")
867
+ # # => "Foo.find(params[:id])"
868
+ #
869
+ # DataMapper::Generators::ActiveModel.find(Foo, "params[:id]")
870
+ # # => "Foo.get(params[:id])"
871
+ #
872
+ # On initialization, the ActiveModel accepts the instance name that will
873
+ # receive the calls:
874
+ #
875
+ # builder = ActiveRecord::Generators::ActiveModel.new "@foo"
876
+ # builder.save # => "@foo.save"
877
+ #
878
+ # The only exception in ActiveModel for ActiveRecord is the use of self.build
879
+ # instead of self.new.
880
+ #
881
+ # source://railties//lib/rails/generators/active_model.rb#28
882
+ class Rails::Generators::ActiveModel
883
+ # @return [ActiveModel] a new instance of ActiveModel
884
+ #
885
+ # source://railties//lib/rails/generators/active_model.rb#31
886
+ def initialize(name); end
887
+
888
+ # Used for:
889
+ #
890
+ # * DELETE +destroy+
891
+ #
892
+ # source://railties//lib/rails/generators/active_model.rb#89
893
+ def destroy; end
894
+
895
+ # Used for:
896
+ #
897
+ # * POST +create+
898
+ # * PATCH / PUT +update+
899
+ #
900
+ # source://railties//lib/rails/generators/active_model.rb#82
901
+ def errors; end
902
+
903
+ # Returns the value of attribute name.
904
+ #
905
+ # source://railties//lib/rails/generators/active_model.rb#29
906
+ def name; end
907
+
908
+ # Used for:
909
+ #
910
+ # * POST +create+
911
+ #
912
+ # source://railties//lib/rails/generators/active_model.rb#67
913
+ def save; end
914
+
915
+ # Used for:
916
+ #
917
+ # * PATCH / PUT +update+
918
+ #
919
+ # source://railties//lib/rails/generators/active_model.rb#74
920
+ def update(params = T.unsafe(nil)); end
921
+
922
+ class << self
923
+ # Used for:
924
+ #
925
+ # * GET +index+
926
+ #
927
+ # source://railties//lib/rails/generators/active_model.rb#38
928
+ def all(klass); end
929
+
930
+ # Used for:
931
+ #
932
+ # * GET +new+
933
+ # * POST +create+
934
+ #
935
+ # source://railties//lib/rails/generators/active_model.rb#56
936
+ def build(klass, params = T.unsafe(nil)); end
937
+
938
+ # Used for:
939
+ #
940
+ # * GET +show+
941
+ # * GET +edit+
942
+ # * PATCH / PUT +update+
943
+ # * DELETE +destroy+
944
+ #
945
+ # source://railties//lib/rails/generators/active_model.rb#48
946
+ def find(klass, params = T.unsafe(nil)); end
947
+ end
948
+ end
949
+
950
+ # source://railties//lib/rails/generators/app_name.rb#5
951
+ module Rails::Generators::AppName
952
+ private
953
+
954
+ # source://railties//lib/rails/generators/app_name.rb#22
955
+ def app_const; end
956
+
957
+ # source://railties//lib/rails/generators/app_name.rb#17
958
+ def app_const_base; end
959
+
960
+ # source://railties//lib/rails/generators/app_name.rb#9
961
+ def app_name; end
962
+
963
+ # source://railties//lib/rails/generators/app_name.rb#17
964
+ def camelized; end
965
+
966
+ # source://railties//lib/rails/generators/app_name.rb#13
967
+ def original_app_name; end
968
+
969
+ # @return [Boolean]
970
+ #
971
+ # source://railties//lib/rails/generators/app_name.rb#26
972
+ def valid_const?; end
973
+ end
974
+
975
+ # source://railties//lib/rails/generators/app_name.rb#6
976
+ Rails::Generators::AppName::RESERVED_NAMES = T.let(T.unsafe(nil), Array)
977
+
978
+ # source://railties//lib/rails/generators/base.rb#17
979
+ class Rails::Generators::Base < ::Thor::Group
980
+ include ::Thor::Actions
981
+ include ::Rails::Generators::Actions
982
+ extend ::Thor::Actions::ClassMethods
983
+
984
+ private
985
+
986
+ # Check whether the given class names are already taken by user
987
+ # application or Ruby on Rails.
988
+ #
989
+ # source://railties//lib/rails/generators/base.rb#264
990
+ def class_collisions(*class_names); end
991
+
992
+ # Takes in an array of nested modules and extracts the last module
993
+ #
994
+ # source://railties//lib/rails/generators/base.rb#287
995
+ def extract_last_module(nesting); end
996
+
997
+ # source://railties//lib/rails/generators/base.rb#302
998
+ def indent(content, multiplier = T.unsafe(nil)); end
999
+
1000
+ # Wrap block with namespace of current application
1001
+ # if namespace exists and is not skipped
1002
+ #
1003
+ # source://railties//lib/rails/generators/base.rb#296
1004
+ def module_namespacing(&block); end
1005
+
1006
+ # source://railties//lib/rails/generators/base.rb#312
1007
+ def namespace; end
1008
+
1009
+ # source://railties//lib/rails/generators/base.rb#320
1010
+ def namespace_dirs; end
1011
+
1012
+ # @return [Boolean]
1013
+ #
1014
+ # source://railties//lib/rails/generators/base.rb#316
1015
+ def namespaced?; end
1016
+
1017
+ # source://railties//lib/rails/generators/base.rb#324
1018
+ def namespaced_path; end
1019
+
1020
+ # source://railties//lib/rails/generators/base.rb#307
1021
+ def wrap_with_namespace(content); end
1022
+
1023
+ class << self
1024
+ # Small macro to add ruby as an option to the generator with proper
1025
+ # default value plus an instance helper method called shebang.
1026
+ #
1027
+ # source://railties//lib/rails/generators/base.rb#396
1028
+ def add_shebang_option!; end
1029
+
1030
+ # Use \Rails default banner.
1031
+ #
1032
+ # source://railties//lib/rails/generators/base.rb#329
1033
+ def banner; end
1034
+
1035
+ # Sets the base_name taking into account the current class namespace.
1036
+ #
1037
+ # source://railties//lib/rails/generators/base.rb#334
1038
+ def base_name; end
1039
+
1040
+ # Returns the base root for a common set of generators. This is used to dynamically
1041
+ # guess the default source root.
1042
+ #
1043
+ # source://railties//lib/rails/generators/base.rb#236
1044
+ def base_root; end
1045
+
1046
+ # Make class option aware of Rails::Generators.options and Rails::Generators.aliases.
1047
+ #
1048
+ # source://railties//lib/rails/generators/base.rb#217
1049
+ def class_option(name, options = T.unsafe(nil)); end
1050
+
1051
+ # Returns default aliases for the option name given doing a lookup in
1052
+ # Rails::Generators.aliases.
1053
+ #
1054
+ # source://railties//lib/rails/generators/base.rb#357
1055
+ def default_aliases_for_option(name, options); end
1056
+
1057
+ # Returns default for the option name given doing a lookup in config.
1058
+ #
1059
+ # source://railties//lib/rails/generators/base.rb#362
1060
+ def default_for_option(config, name, options, default); end
1061
+
1062
+ # source://railties//lib/rails/generators/base.rb#422
1063
+ def default_generator_root; end
1064
+
1065
+ # Returns the default source root for a given generator. This is used internally
1066
+ # by \Rails to set its generators source root. If you want to customize your source
1067
+ # root, you should use source_root.
1068
+ #
1069
+ # source://railties//lib/rails/generators/base.rb#227
1070
+ def default_source_root; end
1071
+
1072
+ # Returns the default value for the option name given doing a lookup in
1073
+ # Rails::Generators.options.
1074
+ #
1075
+ # source://railties//lib/rails/generators/base.rb#351
1076
+ def default_value_for_option(name, options); end
1077
+
1078
+ # Tries to get the description from a USAGE file one folder above the source
1079
+ # root otherwise uses a default description.
1080
+ #
1081
+ # source://railties//lib/rails/generators/base.rb#41
1082
+ def desc(description = T.unsafe(nil)); end
1083
+
1084
+ # @return [Boolean]
1085
+ #
1086
+ # source://railties//lib/rails/generators/base.rb#29
1087
+ def exit_on_failure?; end
1088
+
1089
+ # Removes the namespaces and get the generator name. For example,
1090
+ # Rails::Generators::ModelGenerator will return "model" as generator name.
1091
+ #
1092
+ # source://railties//lib/rails/generators/base.rb#342
1093
+ def generator_name; end
1094
+
1095
+ # Convenience method to hide this generator from the available ones when
1096
+ # running rails generator command.
1097
+ #
1098
+ # source://railties//lib/rails/generators/base.rb#61
1099
+ def hide!; end
1100
+
1101
+ # Invoke a generator based on the value supplied by the user to the
1102
+ # given option named "name". A class option is created when this method
1103
+ # is invoked and you can set a hash to customize it.
1104
+ #
1105
+ # ==== Examples
1106
+ #
1107
+ # module Rails::Generators
1108
+ # class ControllerGenerator < Base
1109
+ # hook_for :test_framework, aliases: "-t"
1110
+ # end
1111
+ # end
1112
+ #
1113
+ # The example above will create a test framework option and will invoke
1114
+ # a generator based on the user supplied value.
1115
+ #
1116
+ # For example, if the user invoke the controller generator as:
1117
+ #
1118
+ # $ bin/rails generate controller Account --test-framework=test_unit
1119
+ #
1120
+ # The controller generator will then try to invoke the following generators:
1121
+ #
1122
+ # "rails:test_unit", "test_unit:controller", "test_unit"
1123
+ #
1124
+ # Notice that "rails:generators:test_unit" could be loaded as well, what
1125
+ # \Rails looks for is the first and last parts of the namespace. This is what
1126
+ # allows any test framework to hook into \Rails as long as it provides any
1127
+ # of the hooks above.
1128
+ #
1129
+ # ==== Options
1130
+ #
1131
+ # The first and last part used to find the generator to be invoked are
1132
+ # guessed based on class invokes hook_for, as noticed in the example above.
1133
+ # This can be customized with two options: +:in+ and +:as+.
1134
+ #
1135
+ # Let's suppose you are creating a generator that needs to invoke the
1136
+ # controller generator from test unit. Your first attempt is:
1137
+ #
1138
+ # class AwesomeGenerator < Rails::Generators::Base
1139
+ # hook_for :test_framework
1140
+ # end
1141
+ #
1142
+ # The lookup in this case for test_unit as input is:
1143
+ #
1144
+ # "test_unit:awesome", "test_unit"
1145
+ #
1146
+ # Which is not the desired lookup. You can change it by providing the
1147
+ # +:as+ option:
1148
+ #
1149
+ # class AwesomeGenerator < Rails::Generators::Base
1150
+ # hook_for :test_framework, as: :controller
1151
+ # end
1152
+ #
1153
+ # And now it will look up at:
1154
+ #
1155
+ # "test_unit:controller", "test_unit"
1156
+ #
1157
+ # Similarly, if you want it to also look up in the rails namespace, you
1158
+ # just need to provide the +:in+ value:
1159
+ #
1160
+ # class AwesomeGenerator < Rails::Generators::Base
1161
+ # hook_for :test_framework, in: :rails, as: :controller
1162
+ # end
1163
+ #
1164
+ # And the lookup is exactly the same as previously:
1165
+ #
1166
+ # "rails:test_unit", "test_unit:controller", "test_unit"
1167
+ #
1168
+ # ==== Switches
1169
+ #
1170
+ # All hooks come with switches for user interface. If you do not want
1171
+ # to use any test framework, you can do:
1172
+ #
1173
+ # $ bin/rails generate controller Account --skip-test-framework
1174
+ #
1175
+ # Or similarly:
1176
+ #
1177
+ # $ bin/rails generate controller Account --no-test-framework
1178
+ #
1179
+ # ==== Boolean hooks
1180
+ #
1181
+ # In some cases, you may want to provide a boolean hook. For example, webrat
1182
+ # developers might want to have webrat available on controller generator.
1183
+ # This can be achieved as:
1184
+ #
1185
+ # Rails::Generators::ControllerGenerator.hook_for :webrat, type: :boolean
1186
+ #
1187
+ # Then, if you want webrat to be invoked, just supply:
1188
+ #
1189
+ # $ bin/rails generate controller Account --webrat
1190
+ #
1191
+ # The hooks lookup is similar as above:
1192
+ #
1193
+ # "rails:generators:webrat", "webrat:generators:controller", "webrat"
1194
+ #
1195
+ # ==== Custom invocations
1196
+ #
1197
+ # You can also supply a block to hook_for to customize how the hook is
1198
+ # going to be invoked. The block receives two arguments, an instance
1199
+ # of the current class and the class to be invoked.
1200
+ #
1201
+ # For example, in the resource generator, the controller should be invoked
1202
+ # with a pluralized class name. But by default it is invoked with the same
1203
+ # name as the resource generator, which is singular. To change this, we
1204
+ # can give a block to customize how the controller can be invoked.
1205
+ #
1206
+ # hook_for :resource_controller do |instance, controller|
1207
+ # instance.invoke controller, [ instance.name.pluralize ]
1208
+ # end
1209
+ #
1210
+ # source://railties//lib/rails/generators/base.rb#174
1211
+ def hook_for(*names, &block); end
1212
+
1213
+ # Keep hooks configuration that are used on prepare_for_invocation.
1214
+ #
1215
+ # source://railties//lib/rails/generators/base.rb#375
1216
+ def hooks; end
1217
+
1218
+ # Cache source root and add lib/generators/base/generator/templates to
1219
+ # source paths.
1220
+ #
1221
+ # source://railties//lib/rails/generators/base.rb#242
1222
+ def inherited(base); end
1223
+
1224
+ # Convenience method to get the namespace from the class name. It's the
1225
+ # same as Thor default except that the Generator at the end of the class
1226
+ # is removed.
1227
+ #
1228
+ # source://railties//lib/rails/generators/base.rb#54
1229
+ def namespace(name = T.unsafe(nil)); end
1230
+
1231
+ # Prepare class invocation to search on Rails namespace if a previous
1232
+ # added hook is being used.
1233
+ #
1234
+ # source://railties//lib/rails/generators/base.rb#381
1235
+ def prepare_for_invocation(name, value); end
1236
+
1237
+ # Remove a previously added hook.
1238
+ #
1239
+ # remove_hook_for :orm
1240
+ #
1241
+ # source://railties//lib/rails/generators/base.rb#207
1242
+ def remove_hook_for(*names); end
1243
+
1244
+ # Returns the source root for this generator using default_source_root as default.
1245
+ #
1246
+ # source://railties//lib/rails/generators/base.rb#34
1247
+ def source_root(path = T.unsafe(nil)); end
1248
+
1249
+ # source://railties//lib/rails/generators/base.rb#414
1250
+ def usage_path; end
1251
+ end
1252
+ end
1253
+
1254
+ # source://railties//lib/rails/generators.rb#29
1255
+ Rails::Generators::DEFAULT_ALIASES = T.let(T.unsafe(nil), Hash)
1256
+
1257
+ # source://railties//lib/rails/generators.rb#46
1258
+ Rails::Generators::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash)
1259
+
1260
+ # source://railties//lib/rails/generators/database.rb#5
1261
+ module Rails::Generators::Database
1262
+ # source://railties//lib/rails/generators/database.rb#9
1263
+ def initialize(*_arg0); end
1264
+
1265
+ # source://railties//lib/rails/generators/database.rb#62
1266
+ def build_package_for_database(database = T.unsafe(nil)); end
1267
+
1268
+ # source://railties//lib/rails/generators/database.rb#50
1269
+ def convert_database_option_for_jruby; end
1270
+
1271
+ # source://railties//lib/rails/generators/database.rb#70
1272
+ def deploy_package_for_database(database = T.unsafe(nil)); end
1273
+
1274
+ # source://railties//lib/rails/generators/database.rb#30
1275
+ def docker_for_database_build(database = T.unsafe(nil)); end
1276
+
1277
+ # source://railties//lib/rails/generators/database.rb#40
1278
+ def docker_for_database_deploy(database = T.unsafe(nil)); end
1279
+
1280
+ # source://railties//lib/rails/generators/database.rb#14
1281
+ def gem_for_database(database = T.unsafe(nil)); end
1282
+
1283
+ private
1284
+
1285
+ # source://railties//lib/rails/generators/database.rb#80
1286
+ def mysql_socket; end
1287
+ end
1288
+
1289
+ # source://railties//lib/rails/generators/database.rb#7
1290
+ Rails::Generators::Database::DATABASES = T.let(T.unsafe(nil), Array)
1291
+
1292
+ # source://railties//lib/rails/generators/database.rb#6
1293
+ Rails::Generators::Database::JDBC_DATABASES = T.let(T.unsafe(nil), Array)
1294
+
1295
+ # source://railties//lib/rails/generators/base.rb#14
1296
+ class Rails::Generators::Error < ::Thor::Error; end
1297
+
1298
+ # source://railties//lib/rails/generators/generated_attribute.rb#7
1299
+ class Rails::Generators::GeneratedAttribute
1300
+ # @return [GeneratedAttribute] a new instance of GeneratedAttribute
1301
+ #
1302
+ # source://railties//lib/rails/generators/generated_attribute.rb#109
1303
+ def initialize(name, type = T.unsafe(nil), index_type = T.unsafe(nil), attr_options = T.unsafe(nil)); end
1304
+
1305
+ # @return [Boolean]
1306
+ #
1307
+ # source://railties//lib/rails/generators/generated_attribute.rb#211
1308
+ def attachment?; end
1309
+
1310
+ # @return [Boolean]
1311
+ #
1312
+ # source://railties//lib/rails/generators/generated_attribute.rb#215
1313
+ def attachments?; end
1314
+
1315
+ # Returns the value of attribute attr_options.
1316
+ #
1317
+ # source://railties//lib/rails/generators/generated_attribute.rb#31
1318
+ def attr_options; end
1319
+
1320
+ # source://railties//lib/rails/generators/generated_attribute.rb#171
1321
+ def column_name; end
1322
+
1323
+ # source://railties//lib/rails/generators/generated_attribute.rb#133
1324
+ def default; end
1325
+
1326
+ # source://railties//lib/rails/generators/generated_attribute.rb#117
1327
+ def field_type; end
1328
+
1329
+ # @return [Boolean]
1330
+ #
1331
+ # source://railties//lib/rails/generators/generated_attribute.rb#175
1332
+ def foreign_key?; end
1333
+
1334
+ # @return [Boolean]
1335
+ #
1336
+ # source://railties//lib/rails/generators/generated_attribute.rb#191
1337
+ def has_index?; end
1338
+
1339
+ # @return [Boolean]
1340
+ #
1341
+ # source://railties//lib/rails/generators/generated_attribute.rb#195
1342
+ def has_uniq_index?; end
1343
+
1344
+ # source://railties//lib/rails/generators/generated_attribute.rb#159
1345
+ def human_name; end
1346
+
1347
+ # source://railties//lib/rails/generators/generated_attribute.rb#163
1348
+ def index_name; end
1349
+
1350
+ # Sets the attribute index_name
1351
+ #
1352
+ # @param value the value to set the attribute index_name to.
1353
+ #
1354
+ # source://railties//lib/rails/generators/generated_attribute.rb#32
1355
+ def index_name=(_arg0); end
1356
+
1357
+ # source://railties//lib/rails/generators/generated_attribute.rb#227
1358
+ def inject_index_options; end
1359
+
1360
+ # source://railties//lib/rails/generators/generated_attribute.rb#223
1361
+ def inject_options; end
1362
+
1363
+ # Returns the value of attribute name.
1364
+ #
1365
+ # source://railties//lib/rails/generators/generated_attribute.rb#30
1366
+ def name; end
1367
+
1368
+ # Sets the attribute name
1369
+ #
1370
+ # @param value the value to set the attribute name to.
1371
+ #
1372
+ # source://railties//lib/rails/generators/generated_attribute.rb#30
1373
+ def name=(_arg0); end
1374
+
1375
+ # source://railties//lib/rails/generators/generated_attribute.rb#231
1376
+ def options_for_migration; end
1377
+
1378
+ # @return [Boolean]
1379
+ #
1380
+ # source://railties//lib/rails/generators/generated_attribute.rb#199
1381
+ def password_digest?; end
1382
+
1383
+ # source://railties//lib/rails/generators/generated_attribute.rb#151
1384
+ def plural_name; end
1385
+
1386
+ # @return [Boolean]
1387
+ #
1388
+ # source://railties//lib/rails/generators/generated_attribute.rb#183
1389
+ def polymorphic?; end
1390
+
1391
+ # @return [Boolean]
1392
+ #
1393
+ # source://railties//lib/rails/generators/generated_attribute.rb#179
1394
+ def reference?; end
1395
+
1396
+ # @return [Boolean]
1397
+ #
1398
+ # source://railties//lib/rails/generators/generated_attribute.rb#187
1399
+ def required?; end
1400
+
1401
+ # @return [Boolean]
1402
+ #
1403
+ # source://railties//lib/rails/generators/generated_attribute.rb#207
1404
+ def rich_text?; end
1405
+
1406
+ # source://railties//lib/rails/generators/generated_attribute.rb#155
1407
+ def singular_name; end
1408
+
1409
+ # @return [Boolean]
1410
+ #
1411
+ # source://railties//lib/rails/generators/generated_attribute.rb#203
1412
+ def token?; end
1413
+
1414
+ # Returns the value of attribute type.
1415
+ #
1416
+ # source://railties//lib/rails/generators/generated_attribute.rb#30
1417
+ def type; end
1418
+
1419
+ # Sets the attribute type
1420
+ #
1421
+ # @param value the value to set the attribute type to.
1422
+ #
1423
+ # source://railties//lib/rails/generators/generated_attribute.rb#30
1424
+ def type=(_arg0); end
1425
+
1426
+ # @return [Boolean]
1427
+ #
1428
+ # source://railties//lib/rails/generators/generated_attribute.rb#219
1429
+ def virtual?; end
1430
+
1431
+ class << self
1432
+ # @return [Boolean]
1433
+ #
1434
+ # source://railties//lib/rails/generators/generated_attribute.rb#67
1435
+ def dangerous_name?(name); end
1436
+
1437
+ # source://railties//lib/rails/generators/generated_attribute.rb#35
1438
+ def parse(column_definition); end
1439
+
1440
+ # @return [Boolean]
1441
+ #
1442
+ # source://railties//lib/rails/generators/generated_attribute.rb#82
1443
+ def reference?(type); end
1444
+
1445
+ # @return [Boolean]
1446
+ #
1447
+ # source://railties//lib/rails/generators/generated_attribute.rb#78
1448
+ def valid_index_type?(index_type); end
1449
+
1450
+ # @return [Boolean]
1451
+ #
1452
+ # source://railties//lib/rails/generators/generated_attribute.rb#72
1453
+ def valid_type?(type); end
1454
+
1455
+ private
1456
+
1457
+ # parse possible attribute options like :limit for string/text/binary/integer, :precision/:scale for decimals or :polymorphic for references/belongs_to
1458
+ # when declaring options curly brackets should be used
1459
+ #
1460
+ # source://railties//lib/rails/generators/generated_attribute.rb#89
1461
+ def parse_type_and_options(type); end
1462
+ end
1463
+ end
1464
+
1465
+ # source://railties//lib/rails/generators/generated_attribute.rb#10
1466
+ Rails::Generators::GeneratedAttribute::DEFAULT_TYPES = T.let(T.unsafe(nil), Array)
1467
+
1468
+ # source://railties//lib/rails/generators/generated_attribute.rb#8
1469
+ Rails::Generators::GeneratedAttribute::INDEX_OPTIONS = T.let(T.unsafe(nil), Array)
1470
+
1471
+ # source://railties//lib/rails/generators/generated_attribute.rb#9
1472
+ Rails::Generators::GeneratedAttribute::UNIQ_INDEX_OPTIONS = T.let(T.unsafe(nil), Array)
1473
+
1474
+ # Holds common methods for migrations. It assumes that migrations have the
1475
+ # [0-9]*_name format and can be used by other frameworks (like Sequel)
1476
+ # just by implementing the next migration version method.
1477
+ #
1478
+ # source://railties//lib/rails/generators/migration.rb#11
1479
+ module Rails::Generators::Migration
1480
+ extend ::ActiveSupport::Concern
1481
+
1482
+ mixes_in_class_methods ::Rails::Generators::Migration::ClassMethods
1483
+
1484
+ # source://railties//lib/rails/generators/migration.rb#35
1485
+ def create_migration(destination, data, config = T.unsafe(nil), &block); end
1486
+
1487
+ # Returns the value of attribute migration_class_name.
1488
+ #
1489
+ # source://railties//lib/rails/generators/migration.rb#13
1490
+ def migration_class_name; end
1491
+
1492
+ # Returns the value of attribute migration_file_name.
1493
+ #
1494
+ # source://railties//lib/rails/generators/migration.rb#13
1495
+ def migration_file_name; end
1496
+
1497
+ # Returns the value of attribute migration_number.
1498
+ #
1499
+ # source://railties//lib/rails/generators/migration.rb#13
1500
+ def migration_number; end
1501
+
1502
+ # Creates a migration template at the given destination. The difference
1503
+ # to the default template method is that the migration version is appended
1504
+ # to the destination file name.
1505
+ #
1506
+ # The migration version, migration file name, migration class name are
1507
+ # available as instance variables in the template to be rendered.
1508
+ #
1509
+ # migration_template "migration.rb", "db/migrate/add_foo_to_bar.rb"
1510
+ #
1511
+ # source://railties//lib/rails/generators/migration.rb#56
1512
+ def migration_template(source, destination, config = T.unsafe(nil)); end
1513
+
1514
+ # source://railties//lib/rails/generators/migration.rb#39
1515
+ def set_migration_assigns!(destination); end
1516
+ end
1517
+
1518
+ # source://railties//lib/rails/generators/migration.rb#15
1519
+ module Rails::Generators::Migration::ClassMethods
1520
+ # source://railties//lib/rails/generators/migration.rb#24
1521
+ def current_migration_number(dirname); end
1522
+
1523
+ # @return [Boolean]
1524
+ #
1525
+ # source://railties//lib/rails/generators/migration.rb#20
1526
+ def migration_exists?(dirname, file_name); end
1527
+
1528
+ # source://railties//lib/rails/generators/migration.rb#16
1529
+ def migration_lookup_at(dirname); end
1530
+
1531
+ # @raise [NotImplementedError]
1532
+ #
1533
+ # source://railties//lib/rails/generators/migration.rb#30
1534
+ def next_migration_number(dirname); end
1535
+ end
1536
+
1537
+ # source://railties//lib/rails/generators/model_helpers.rb#7
1538
+ module Rails::Generators::ModelHelpers
1539
+ # source://railties//lib/rails/generators/model_helpers.rb#26
1540
+ def initialize(args, *_options); end
1541
+
1542
+ # source://railties//lib/rails/generators/model_helpers.rb#19
1543
+ def skip_warn; end
1544
+
1545
+ # source://railties//lib/rails/generators/model_helpers.rb#19
1546
+ def skip_warn=(val); end
1547
+
1548
+ private
1549
+
1550
+ # @return [Boolean]
1551
+ #
1552
+ # source://railties//lib/rails/generators/model_helpers.rb#56
1553
+ def inflection_impossible?(name); end
1554
+
1555
+ # @return [Boolean]
1556
+ #
1557
+ # source://railties//lib/rails/generators/model_helpers.rb#52
1558
+ def irregular_model_name?(name); end
1559
+
1560
+ # @return [Boolean]
1561
+ #
1562
+ # source://railties//lib/rails/generators/model_helpers.rb#48
1563
+ def plural_model_name?(name); end
1564
+
1565
+ class << self
1566
+ # source://railties//lib/rails/generators/model_helpers.rb#21
1567
+ def included(base); end
1568
+
1569
+ # source://railties//lib/rails/generators/model_helpers.rb#19
1570
+ def skip_warn; end
1571
+
1572
+ # source://railties//lib/rails/generators/model_helpers.rb#19
1573
+ def skip_warn=(val); end
1574
+ end
1575
+ end
1576
+
1577
+ # source://railties//lib/rails/generators/model_helpers.rb#14
1578
+ Rails::Generators::ModelHelpers::INFLECTION_IMPOSSIBLE_ERROR_MESSAGE = T.let(T.unsafe(nil), String)
1579
+
1580
+ # source://railties//lib/rails/generators/model_helpers.rb#10
1581
+ Rails::Generators::ModelHelpers::IRREGULAR_MODEL_NAME_WARN_MESSAGE = T.let(T.unsafe(nil), String)
1582
+
1583
+ # source://railties//lib/rails/generators/model_helpers.rb#8
1584
+ Rails::Generators::ModelHelpers::PLURAL_MODEL_NAME_WARN_MESSAGE = T.let(T.unsafe(nil), String)
1585
+
1586
+ # source://railties//lib/rails/generators/named_base.rb#8
1587
+ class Rails::Generators::NamedBase < ::Rails::Generators::Base
1588
+ # @return [NamedBase] a new instance of NamedBase
1589
+ #
1590
+ # source://railties//lib/rails/generators/named_base.rb#11
1591
+ def initialize(args, *options); end
1592
+
1593
+ # Returns the value of attribute file_name.
1594
+ #
1595
+ # source://thor/1.3.0/lib/thor/base.rb#155
1596
+ def file_name; end
1597
+
1598
+ # source://railties//lib/rails/generators/named_base.rb#29
1599
+ def js_template(source, destination); end
1600
+
1601
+ # source://thor/1.3.0/lib/thor/base.rb#163
1602
+ def name; end
1603
+
1604
+ # source://thor/1.3.0/lib/thor/base.rb#163
1605
+ def name=(_arg0); end
1606
+
1607
+ # source://railties//lib/rails/generators/named_base.rb#23
1608
+ def template(source, *args, &block); end
1609
+
1610
+ private
1611
+
1612
+ # Tries to retrieve the application name or simply return application.
1613
+ #
1614
+ # source://railties//lib/rails/generators/named_base.rb#138
1615
+ def application_name; end
1616
+
1617
+ # source://railties//lib/rails/generators/named_base.rb#175
1618
+ def assign_names!(name); end
1619
+
1620
+ # source://railties//lib/rails/generators/named_base.rb#188
1621
+ def attributes_names; end
1622
+
1623
+ # source://railties//lib/rails/generators/named_base.rb#70
1624
+ def class_name; end
1625
+
1626
+ # source://railties//lib/rails/generators/named_base.rb#58
1627
+ def class_path; end
1628
+
1629
+ # source://railties//lib/rails/generators/named_base.rb#105
1630
+ def edit_helper(*_arg0, **_arg1, &_arg2); end
1631
+
1632
+ # source://railties//lib/rails/generators/named_base.rb#54
1633
+ def file_path; end
1634
+
1635
+ # source://railties//lib/rails/generators/named_base.rb#125
1636
+ def fixture_file_name; end
1637
+
1638
+ # source://railties//lib/rails/generators/named_base.rb#74
1639
+ def human_name; end
1640
+
1641
+ # source://railties//lib/rails/generators/named_base.rb#82
1642
+ def i18n_scope; end
1643
+
1644
+ # source://railties//lib/rails/generators/named_base.rb#97
1645
+ def index_helper(type: T.unsafe(nil)); end
1646
+
1647
+ # source://railties//lib/rails/generators/named_base.rb#43
1648
+ def inside_template; end
1649
+
1650
+ # @return [Boolean]
1651
+ #
1652
+ # source://railties//lib/rails/generators/named_base.rb#50
1653
+ def inside_template?; end
1654
+
1655
+ # source://railties//lib/rails/generators/named_base.rb#150
1656
+ def model_resource_name(base_name = T.unsafe(nil), prefix: T.unsafe(nil)); end
1657
+
1658
+ # @return [Boolean]
1659
+ #
1660
+ # source://railties//lib/rails/generators/named_base.rb#200
1661
+ def mountable_engine?; end
1662
+
1663
+ # source://railties//lib/rails/generators/named_base.rb#66
1664
+ def namespaced_class_path; end
1665
+
1666
+ # source://railties//lib/rails/generators/named_base.rb#109
1667
+ def new_helper(type: T.unsafe(nil)); end
1668
+
1669
+ # Convert attributes array into GeneratedAttribute objects.
1670
+ #
1671
+ # source://railties//lib/rails/generators/named_base.rb#182
1672
+ def parse_attributes!; end
1673
+
1674
+ # source://railties//lib/rails/generators/named_base.rb#121
1675
+ def plural_file_name; end
1676
+
1677
+ # source://railties//lib/rails/generators/named_base.rb#78
1678
+ def plural_name; end
1679
+
1680
+ # source://railties//lib/rails/generators/named_base.rb#167
1681
+ def plural_route_name; end
1682
+
1683
+ # source://railties//lib/rails/generators/named_base.rb#117
1684
+ def plural_table_name; end
1685
+
1686
+ # @return [Boolean]
1687
+ #
1688
+ # source://railties//lib/rails/generators/named_base.rb#196
1689
+ def pluralize_table_names?; end
1690
+
1691
+ # source://railties//lib/rails/generators/named_base.rb#146
1692
+ def redirect_resource_name; end
1693
+
1694
+ # source://railties//lib/rails/generators/named_base.rb#62
1695
+ def regular_class_path; end
1696
+
1697
+ # source://railties//lib/rails/generators/named_base.rb#129
1698
+ def route_url; end
1699
+
1700
+ # source://railties//lib/rails/generators/named_base.rb#101
1701
+ def show_helper(arg = T.unsafe(nil), type: T.unsafe(nil)); end
1702
+
1703
+ # FIXME: We are avoiding to use alias because a bug on thor that make
1704
+ # this method public and add it to the task list.
1705
+ #
1706
+ # source://railties//lib/rails/generators/named_base.rb#39
1707
+ def singular_name; end
1708
+
1709
+ # source://railties//lib/rails/generators/named_base.rb#159
1710
+ def singular_route_name; end
1711
+
1712
+ # source://railties//lib/rails/generators/named_base.rb#113
1713
+ def singular_table_name; end
1714
+
1715
+ # source://railties//lib/rails/generators/named_base.rb#86
1716
+ def table_name; end
1717
+
1718
+ # @return [Boolean]
1719
+ #
1720
+ # source://railties//lib/rails/generators/named_base.rb#93
1721
+ def uncountable?; end
1722
+
1723
+ # source://railties//lib/rails/generators/named_base.rb#133
1724
+ def url_helper_prefix; end
1725
+
1726
+ class << self
1727
+ # Add a class collisions name to be checked on class initialization. You
1728
+ # can supply a hash with a +:prefix+ or +:suffix+ to be tested.
1729
+ #
1730
+ # ==== Examples
1731
+ #
1732
+ # check_class_collision suffix: "Decorator"
1733
+ #
1734
+ # If the generator is invoked with class name Admin, it will check for
1735
+ # the presence of "AdminDecorator".
1736
+ #
1737
+ # source://railties//lib/rails/generators/named_base.rb#214
1738
+ def check_class_collision(options = T.unsafe(nil)); end
1739
+ end
1740
+ end
1741
+
1742
+ # Deal with controller names on scaffold and add some helpers to deal with
1743
+ # ActiveModel.
1744
+ #
1745
+ # source://railties//lib/rails/generators/resource_helpers.rb#10
1746
+ module Rails::Generators::ResourceHelpers
1747
+ include ::Rails::Generators::ModelHelpers
1748
+
1749
+ # Set controller variables on initialization.
1750
+ #
1751
+ # source://railties//lib/rails/generators/resource_helpers.rb#17
1752
+ def initialize(*args); end
1753
+
1754
+ private
1755
+
1756
+ # source://railties//lib/rails/generators/resource_helpers.rb#39
1757
+ def assign_controller_names!(name); end
1758
+
1759
+ # source://railties//lib/rails/generators/resource_helpers.rb#50
1760
+ def controller_class_name; end
1761
+
1762
+ # source://railties//lib/rails/generators/resource_helpers.rb#31
1763
+ def controller_class_path; end
1764
+
1765
+ # Returns the value of attribute controller_file_name.
1766
+ #
1767
+ # source://railties//lib/rails/generators/resource_helpers.rb#29
1768
+ def controller_file_name; end
1769
+
1770
+ # source://railties//lib/rails/generators/resource_helpers.rb#46
1771
+ def controller_file_path; end
1772
+
1773
+ # source://railties//lib/rails/generators/resource_helpers.rb#54
1774
+ def controller_i18n_scope; end
1775
+
1776
+ # Returns the value of attribute controller_name.
1777
+ #
1778
+ # source://railties//lib/rails/generators/resource_helpers.rb#29
1779
+ def controller_name; end
1780
+
1781
+ # Loads the ORM::Generators::ActiveModel class. This class is responsible
1782
+ # to tell scaffold entities how to generate a specific method for the
1783
+ # ORM. Check Rails::Generators::ActiveModel for more information.
1784
+ #
1785
+ # source://railties//lib/rails/generators/resource_helpers.rb#61
1786
+ def orm_class; end
1787
+
1788
+ # Initialize ORM::Generators::ActiveModel to access instance methods.
1789
+ #
1790
+ # source://railties//lib/rails/generators/resource_helpers.rb#77
1791
+ def orm_instance(name = T.unsafe(nil)); end
1792
+
1793
+ class << self
1794
+ # source://railties//lib/rails/generators/resource_helpers.rb#11
1795
+ def included(base); end
1796
+ end
1797
+ end
1798
+
1799
+ # This class provides a TestCase for testing generators. To set up, you need
1800
+ # just to configure the destination and set which generator is being tested:
1801
+ #
1802
+ # class AppGeneratorTest < Rails::Generators::TestCase
1803
+ # tests AppGenerator
1804
+ # destination File.expand_path("../tmp", __dir__)
1805
+ # end
1806
+ #
1807
+ # If you want to ensure your destination root is clean before running each test,
1808
+ # you can set a setup callback:
1809
+ #
1810
+ # class AppGeneratorTest < Rails::Generators::TestCase
1811
+ # tests AppGenerator
1812
+ # destination File.expand_path("../tmp", __dir__)
1813
+ # setup :prepare_destination
1814
+ # end
1815
+ #
1816
+ # source://railties//lib/rails/generators/test_case.rb#30
1817
+ class Rails::Generators::TestCase < ::ActiveSupport::TestCase
1818
+ include ::ActiveSupport::Testing::Stream
1819
+ include ::Rails::Generators::Testing::Behavior
1820
+ include ::Rails::Generators::Testing::SetupAndTeardown
1821
+ include ::Rails::Generators::Testing::Assertions
1822
+ include ::FileUtils::StreamUtils_
1823
+ include ::FileUtils
1824
+ extend ::Rails::Generators::Testing::Behavior::ClassMethods
1825
+
1826
+ # source://railties//lib/rails/generators/testing/behavior.rb#21
1827
+ def current_path; end
1828
+
1829
+ # source://railties//lib/rails/generators/testing/behavior.rb#21
1830
+ def current_path=(_arg0); end
1831
+
1832
+ # source://railties//lib/rails/generators/testing/behavior.rb#21
1833
+ def current_path?; end
1834
+
1835
+ # source://railties//lib/rails/generators/testing/behavior.rb#22
1836
+ def default_arguments; end
1837
+
1838
+ # source://railties//lib/rails/generators/testing/behavior.rb#22
1839
+ def default_arguments=(_arg0); end
1840
+
1841
+ # source://railties//lib/rails/generators/testing/behavior.rb#22
1842
+ def default_arguments?; end
1843
+
1844
+ # source://railties//lib/rails/generators/testing/behavior.rb#23
1845
+ def destination_root; end
1846
+
1847
+ # source://railties//lib/rails/generators/testing/behavior.rb#23
1848
+ def destination_root=(_arg0); end
1849
+
1850
+ # source://railties//lib/rails/generators/testing/behavior.rb#23
1851
+ def destination_root?; end
1852
+
1853
+ # source://railties//lib/rails/generators/testing/behavior.rb#24
1854
+ def generator_class; end
1855
+
1856
+ # source://railties//lib/rails/generators/testing/behavior.rb#24
1857
+ def generator_class=(_arg0); end
1858
+
1859
+ # source://railties//lib/rails/generators/testing/behavior.rb#24
1860
+ def generator_class?; end
1861
+
1862
+ class << self
1863
+ # source://railties//lib/rails/generators/testing/behavior.rb#21
1864
+ def current_path; end
1865
+
1866
+ # source://railties//lib/rails/generators/testing/behavior.rb#21
1867
+ def current_path=(value); end
1868
+
1869
+ # source://railties//lib/rails/generators/testing/behavior.rb#21
1870
+ def current_path?; end
1871
+
1872
+ # source://railties//lib/rails/generators/testing/behavior.rb#22
1873
+ def default_arguments; end
1874
+
1875
+ # source://railties//lib/rails/generators/testing/behavior.rb#22
1876
+ def default_arguments=(value); end
1877
+
1878
+ # source://railties//lib/rails/generators/testing/behavior.rb#22
1879
+ def default_arguments?; end
1880
+
1881
+ # source://railties//lib/rails/generators/testing/behavior.rb#23
1882
+ def destination_root; end
1883
+
1884
+ # source://railties//lib/rails/generators/testing/behavior.rb#23
1885
+ def destination_root=(value); end
1886
+
1887
+ # source://railties//lib/rails/generators/testing/behavior.rb#23
1888
+ def destination_root?; end
1889
+
1890
+ # source://railties//lib/rails/generators/testing/behavior.rb#24
1891
+ def generator_class; end
1892
+
1893
+ # source://railties//lib/rails/generators/testing/behavior.rb#24
1894
+ def generator_class=(value); end
1895
+
1896
+ # source://railties//lib/rails/generators/testing/behavior.rb#24
1897
+ def generator_class?; end
1898
+ end
1899
+ end
1900
+
1901
+ # source://railties//lib/rails/generators/testing/behavior.rb#13
1902
+ module Rails::Generators::Testing
1903
+ include ::ActiveSupport::Deprecation::DeprecatedConstantAccessor
1904
+ end
1905
+
1906
+ # source://railties//lib/rails/generators/testing/assertions.rb#6
1907
+ module Rails::Generators::Testing::Assertions
1908
+ # Asserts the given class method exists in the given content. This method does not detect
1909
+ # class methods inside (class << self), only class methods which starts with "self.".
1910
+ # When a block is given, it yields the content of the method.
1911
+ #
1912
+ # assert_migration "db/migrate/create_products.rb" do |migration|
1913
+ # assert_class_method :up, migration do |up|
1914
+ # assert_match(/create_table/, up)
1915
+ # end
1916
+ # end
1917
+ #
1918
+ # source://railties//lib/rails/generators/testing/assertions.rb#88
1919
+ def assert_class_method(method, content, &block); end
1920
+
1921
+ # Asserts a given file exists. You need to supply an absolute path or a path relative
1922
+ # to the configured destination:
1923
+ #
1924
+ # assert_file "config/environment.rb"
1925
+ #
1926
+ # You can also give extra arguments. If the argument is a regexp, it will check if the
1927
+ # regular expression matches the given file content. If it's a string, it compares the
1928
+ # file with the given string:
1929
+ #
1930
+ # assert_file "config/environment.rb", /initialize/
1931
+ #
1932
+ # Finally, when a block is given, it yields the file content:
1933
+ #
1934
+ # assert_file "app/controllers/products_controller.rb" do |controller|
1935
+ # assert_instance_method :index, controller do |index|
1936
+ # assert_match(/Product\.all/, index)
1937
+ # end
1938
+ # end
1939
+ #
1940
+ # source://railties//lib/rails/generators/testing/assertions.rb#25
1941
+ def assert_directory(relative, *contents); end
1942
+
1943
+ # Asserts the given attribute type gets a proper default value:
1944
+ #
1945
+ # assert_field_default_value :string, "MyString"
1946
+ #
1947
+ # source://railties//lib/rails/generators/testing/assertions.rb#117
1948
+ def assert_field_default_value(attribute_type, value); end
1949
+
1950
+ # Asserts the given attribute type gets translated to a field type
1951
+ # properly:
1952
+ #
1953
+ # assert_field_type :date, :date_select
1954
+ #
1955
+ # source://railties//lib/rails/generators/testing/assertions.rb#110
1956
+ def assert_field_type(attribute_type, field_type); end
1957
+
1958
+ # Asserts a given file exists. You need to supply an absolute path or a path relative
1959
+ # to the configured destination:
1960
+ #
1961
+ # assert_file "config/environment.rb"
1962
+ #
1963
+ # You can also give extra arguments. If the argument is a regexp, it will check if the
1964
+ # regular expression matches the given file content. If it's a string, it compares the
1965
+ # file with the given string:
1966
+ #
1967
+ # assert_file "config/environment.rb", /initialize/
1968
+ #
1969
+ # Finally, when a block is given, it yields the file content:
1970
+ #
1971
+ # assert_file "app/controllers/products_controller.rb" do |controller|
1972
+ # assert_instance_method :index, controller do |index|
1973
+ # assert_match(/Product\.all/, index)
1974
+ # end
1975
+ # end
1976
+ #
1977
+ # source://railties//lib/rails/generators/testing/assertions.rb#25
1978
+ def assert_file(relative, *contents); end
1979
+
1980
+ # Asserts the given method exists in the given content. When a block is given,
1981
+ # it yields the content of the method.
1982
+ #
1983
+ # assert_file "app/controllers/products_controller.rb" do |controller|
1984
+ # assert_instance_method :index, controller do |index|
1985
+ # assert_match(/Product\.all/, index)
1986
+ # end
1987
+ # end
1988
+ #
1989
+ # source://railties//lib/rails/generators/testing/assertions.rb#100
1990
+ def assert_instance_method(method, content); end
1991
+
1992
+ # Asserts the given method exists in the given content. When a block is given,
1993
+ # it yields the content of the method.
1994
+ #
1995
+ # assert_file "app/controllers/products_controller.rb" do |controller|
1996
+ # assert_instance_method :index, controller do |index|
1997
+ # assert_match(/Product\.all/, index)
1998
+ # end
1999
+ # end
2000
+ #
2001
+ # source://railties//lib/rails/generators/testing/assertions.rb#100
2002
+ def assert_method(method, content); end
2003
+
2004
+ # Asserts a given migration exists. You need to supply an absolute path or a
2005
+ # path relative to the configured destination:
2006
+ #
2007
+ # assert_migration "db/migrate/create_products.rb"
2008
+ #
2009
+ # This method manipulates the given path and tries to find any migration which
2010
+ # matches the migration name. For example, the call above is converted to:
2011
+ #
2012
+ # assert_file "db/migrate/003_create_products.rb"
2013
+ #
2014
+ # Consequently, assert_migration accepts the same arguments has assert_file.
2015
+ #
2016
+ # source://railties//lib/rails/generators/testing/assertions.rb#64
2017
+ def assert_migration(relative, *contents, &block); end
2018
+
2019
+ # Asserts a given file does not exist. You need to supply an absolute path or a
2020
+ # path relative to the configured destination:
2021
+ #
2022
+ # assert_no_file "config/random.rb"
2023
+ #
2024
+ # source://railties//lib/rails/generators/testing/assertions.rb#47
2025
+ def assert_no_directory(relative); end
2026
+
2027
+ # Asserts a given file does not exist. You need to supply an absolute path or a
2028
+ # path relative to the configured destination:
2029
+ #
2030
+ # assert_no_file "config/random.rb"
2031
+ #
2032
+ # source://railties//lib/rails/generators/testing/assertions.rb#47
2033
+ def assert_no_file(relative); end
2034
+
2035
+ # Asserts a given migration does not exist. You need to supply an absolute path or a
2036
+ # path relative to the configured destination:
2037
+ #
2038
+ # assert_no_migration "db/migrate/create_products.rb"
2039
+ #
2040
+ # source://railties//lib/rails/generators/testing/assertions.rb#74
2041
+ def assert_no_migration(relative); end
2042
+ end
2043
+
2044
+ # source://railties//lib/rails/generators/testing/behavior.rb#14
2045
+ module Rails::Generators::Testing::Behavior
2046
+ include ::ActiveSupport::Testing::Stream
2047
+ extend ::ActiveSupport::Concern
2048
+ include GeneratedInstanceMethods
2049
+
2050
+ mixes_in_class_methods GeneratedClassMethods
2051
+ mixes_in_class_methods ::Rails::Generators::Testing::Behavior::ClassMethods
2052
+
2053
+ # Create a Rails::Generators::GeneratedAttribute by supplying the
2054
+ # attribute type and, optionally, the attribute name:
2055
+ #
2056
+ # create_generated_attribute(:string, "name")
2057
+ #
2058
+ # source://railties//lib/rails/generators/testing/behavior.rb#85
2059
+ def create_generated_attribute(attribute_type, name = T.unsafe(nil), index = T.unsafe(nil)); end
2060
+
2061
+ # Instantiate the generator.
2062
+ #
2063
+ # source://railties//lib/rails/generators/testing/behavior.rb#77
2064
+ def generator(args = T.unsafe(nil), options = T.unsafe(nil), config = T.unsafe(nil)); end
2065
+
2066
+ # Runs the generator configured for this class. The first argument is an array like
2067
+ # command line arguments:
2068
+ #
2069
+ # class AppGeneratorTest < Rails::Generators::TestCase
2070
+ # tests AppGenerator
2071
+ # destination File.expand_path("../tmp", __dir__)
2072
+ # setup :prepare_destination
2073
+ #
2074
+ # test "database.yml is not created when skipping Active Record" do
2075
+ # run_generator %w(myapp --skip-active-record)
2076
+ # assert_no_file "config/database.yml"
2077
+ # end
2078
+ # end
2079
+ #
2080
+ # You can provide a configuration hash as second argument. This method returns the output
2081
+ # printed by the generator.
2082
+ #
2083
+ # source://railties//lib/rails/generators/testing/behavior.rb#67
2084
+ def run_generator(args = T.unsafe(nil), config = T.unsafe(nil)); end
2085
+
2086
+ private
2087
+
2088
+ # @return [Boolean]
2089
+ #
2090
+ # source://railties//lib/rails/generators/testing/behavior.rb#90
2091
+ def destination_root_is_set?; end
2092
+
2093
+ # source://railties//lib/rails/generators/testing/behavior.rb#94
2094
+ def ensure_current_path; end
2095
+
2096
+ # source://railties//lib/rails/generators/testing/behavior.rb#104
2097
+ def migration_file_name(relative); end
2098
+
2099
+ # Clears all files and directories in destination.
2100
+ #
2101
+ # source://railties//lib/rails/generators/testing/behavior.rb#99
2102
+ def prepare_destination; end
2103
+
2104
+ module GeneratedClassMethods
2105
+ def current_path; end
2106
+ def current_path=(value); end
2107
+ def current_path?; end
2108
+ def default_arguments; end
2109
+ def default_arguments=(value); end
2110
+ def default_arguments?; end
2111
+ def destination_root; end
2112
+ def destination_root=(value); end
2113
+ def destination_root?; end
2114
+ def generator_class; end
2115
+ def generator_class=(value); end
2116
+ def generator_class?; end
2117
+ end
2118
+
2119
+ module GeneratedInstanceMethods
2120
+ def current_path; end
2121
+ def current_path=(value); end
2122
+ def current_path?; end
2123
+ def default_arguments; end
2124
+ def default_arguments=(value); end
2125
+ def default_arguments?; end
2126
+ def destination_root; end
2127
+ def destination_root=(value); end
2128
+ def destination_root?; end
2129
+ def generator_class; end
2130
+ def generator_class=(value); end
2131
+ def generator_class?; end
2132
+ end
2133
+ end
2134
+
2135
+ # source://railties//lib/rails/generators/testing/behavior.rb#27
2136
+ module Rails::Generators::Testing::Behavior::ClassMethods
2137
+ # Sets default arguments on generator invocation. This can be overwritten when
2138
+ # invoking it.
2139
+ #
2140
+ # arguments %w(app_name --skip-active-record)
2141
+ #
2142
+ # source://railties//lib/rails/generators/testing/behavior.rb#39
2143
+ def arguments(array); end
2144
+
2145
+ # Sets the destination of generator files:
2146
+ #
2147
+ # destination File.expand_path("../tmp", __dir__)
2148
+ #
2149
+ # source://railties//lib/rails/generators/testing/behavior.rb#46
2150
+ def destination(path); end
2151
+
2152
+ # Sets which generator should be tested:
2153
+ #
2154
+ # tests AppGenerator
2155
+ #
2156
+ # source://railties//lib/rails/generators/testing/behavior.rb#31
2157
+ def tests(klass); end
2158
+ end
2159
+
2160
+ # source://railties//lib/rails/generators/testing/setup_and_teardown.rb#6
2161
+ module Rails::Generators::Testing::SetupAndTeardown
2162
+ # source://railties//lib/rails/generators/testing/setup_and_teardown.rb#7
2163
+ def setup; end
2164
+
2165
+ # source://railties//lib/rails/generators/testing/setup_and_teardown.rb#13
2166
+ def teardown; end
2167
+ end