packwerk 3.3.0 → 3.3.1

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 (64) hide show
  1. checksums.yaml +4 -4
  2. data/lib/packwerk/const_node_inspector.rb +6 -6
  3. data/lib/packwerk/version.rb +1 -1
  4. metadata +5 -65
  5. data/sorbet/config +0 -6
  6. data/sorbet/rbi/gems/actionpack@7.0.8.7.rbi +0 -19338
  7. data/sorbet/rbi/gems/actionview@7.0.8.7.rbi +0 -15492
  8. data/sorbet/rbi/gems/activesupport@7.0.8.7.rbi +0 -18283
  9. data/sorbet/rbi/gems/ast@2.4.2.rbi +0 -584
  10. data/sorbet/rbi/gems/better_html@2.1.1.rbi +0 -529
  11. data/sorbet/rbi/gems/builder@3.3.0.rbi +0 -8
  12. data/sorbet/rbi/gems/byebug@11.1.3.rbi +0 -36
  13. data/sorbet/rbi/gems/concurrent-ruby@1.3.5.rbi +0 -11656
  14. data/sorbet/rbi/gems/constant_resolver@0.3.0.rbi +0 -99
  15. data/sorbet/rbi/gems/crass@1.0.6.rbi +0 -622
  16. data/sorbet/rbi/gems/erubi@1.13.1.rbi +0 -154
  17. data/sorbet/rbi/gems/i18n@1.14.7.rbi +0 -2358
  18. data/sorbet/rbi/gems/json@2.7.2.rbi +0 -1561
  19. data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +0 -14237
  20. data/sorbet/rbi/gems/loofah@2.24.0.rbi +0 -1104
  21. data/sorbet/rbi/gems/m@1.6.0.rbi +0 -257
  22. data/sorbet/rbi/gems/method_source@1.1.0.rbi +0 -303
  23. data/sorbet/rbi/gems/minitest-focus@1.3.1.rbi +0 -98
  24. data/sorbet/rbi/gems/minitest@5.25.4.rbi +0 -2229
  25. data/sorbet/rbi/gems/mocha@2.5.0.rbi +0 -3961
  26. data/sorbet/rbi/gems/netrc@0.11.0.rbi +0 -158
  27. data/sorbet/rbi/gems/nokogiri@1.18.4.rbi +0 -8204
  28. data/sorbet/rbi/gems/parallel@1.25.1.rbi +0 -286
  29. data/sorbet/rbi/gems/parser@3.3.3.0.rbi +0 -7320
  30. data/sorbet/rbi/gems/prism@1.9.0.rbi +0 -43359
  31. data/sorbet/rbi/gems/racc@1.8.1.rbi +0 -161
  32. data/sorbet/rbi/gems/rack-test@2.2.0.rbi +0 -736
  33. data/sorbet/rbi/gems/rack@2.2.13.rbi +0 -5633
  34. data/sorbet/rbi/gems/rails-dom-testing@2.2.0.rbi +0 -754
  35. data/sorbet/rbi/gems/rails-html-sanitizer@1.6.2.rbi +0 -764
  36. data/sorbet/rbi/gems/railties@7.0.8.7.rbi +0 -3517
  37. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +0 -402
  38. data/sorbet/rbi/gems/rake@13.0.6.rbi +0 -3039
  39. data/sorbet/rbi/gems/rbi@0.1.12.rbi +0 -3071
  40. data/sorbet/rbi/gems/regexp_parser@2.9.2.rbi +0 -3771
  41. data/sorbet/rbi/gems/rexml@3.3.9.rbi +0 -4857
  42. data/sorbet/rbi/gems/rubocop-ast@1.31.3.rbi +0 -7089
  43. data/sorbet/rbi/gems/rubocop-performance@1.14.3.rbi +0 -2967
  44. data/sorbet/rbi/gems/rubocop-shopify@2.9.0.rbi +0 -8
  45. data/sorbet/rbi/gems/rubocop-sorbet@0.6.11.rbi +0 -975
  46. data/sorbet/rbi/gems/rubocop@1.64.1.rbi +0 -58089
  47. data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +0 -1317
  48. data/sorbet/rbi/gems/ruby2_keywords@0.0.5.rbi +0 -8
  49. data/sorbet/rbi/gems/smart_properties@1.17.0.rbi +0 -474
  50. data/sorbet/rbi/gems/spoom@1.3.2.rbi +0 -4420
  51. data/sorbet/rbi/gems/spring@4.0.0.rbi +0 -411
  52. data/sorbet/rbi/gems/tapioca@0.13.3.rbi +0 -3524
  53. data/sorbet/rbi/gems/thor@1.3.1.rbi +0 -4351
  54. data/sorbet/rbi/gems/tzinfo@2.0.6.rbi +0 -5917
  55. data/sorbet/rbi/gems/unicode-display_width@2.5.0.rbi +0 -65
  56. data/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi +0 -428
  57. data/sorbet/rbi/gems/yard@0.9.36.rbi +0 -18333
  58. data/sorbet/rbi/gems/zeitwerk@2.6.4.rbi +0 -934
  59. data/sorbet/rbi/shims/minitest/test.rb +0 -8
  60. data/sorbet/rbi/shims/packwerk/reference.rbi +0 -26
  61. data/sorbet/rbi/shims/packwerk/unresolved_reference.rbi +0 -26
  62. data/sorbet/rbi/shims/parser.rbi +0 -13
  63. data/sorbet/rbi/shims/psych.rbi +0 -5
  64. data/sorbet/tapioca/require.rb +0 -25
@@ -1,3517 +0,0 @@
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
- # source://railties//lib/rails/initializable.rb#5
8
- module Rails
9
- extend ::ActiveSupport::Autoload
10
- extend ::ActiveSupport::Benchmarkable
11
-
12
- class << self
13
- # Returns the value of attribute app_class.
14
- #
15
- # source://railties//lib/rails.rb#38
16
- def app_class; end
17
-
18
- # Sets the attribute app_class
19
- #
20
- # @param value the value to set the attribute app_class to.
21
- #
22
- # source://railties//lib/rails.rb#38
23
- def app_class=(_arg0); end
24
-
25
- # source://railties//lib/rails.rb#39
26
- def application; end
27
-
28
- # Sets the attribute application
29
- #
30
- # @param value the value to set the attribute application to.
31
- #
32
- # source://railties//lib/rails.rb#37
33
- def application=(_arg0); end
34
-
35
- # source://railties//lib/rails.rb#123
36
- def autoloaders; end
37
-
38
- # source://railties//lib/rails.rb#50
39
- def backtrace_cleaner; end
40
-
41
- # Returns the value of attribute cache.
42
- #
43
- # source://railties//lib/rails.rb#38
44
- def cache; end
45
-
46
- # Sets the attribute cache
47
- #
48
- # @param value the value to set the attribute cache to.
49
- #
50
- # source://railties//lib/rails.rb#38
51
- def cache=(_arg0); end
52
-
53
- # The Configuration instance used to configure the Rails environment
54
- #
55
- # source://railties//lib/rails.rb#46
56
- def configuration; end
57
-
58
- # Returns the current Rails environment.
59
- #
60
- # Rails.env # => "development"
61
- # Rails.env.development? # => true
62
- # Rails.env.production? # => false
63
- #
64
- # source://railties//lib/rails.rb#72
65
- def env; end
66
-
67
- # Sets the Rails environment.
68
- #
69
- # Rails.env = "staging" # => "staging"
70
- #
71
- # source://railties//lib/rails.rb#79
72
- def env=(environment); end
73
-
74
- # Returns the ActiveSupport::ErrorReporter of the current Rails project,
75
- # otherwise it returns +nil+ if there is no project.
76
- #
77
- # Rails.error.handle(IOError) do
78
- # # ...
79
- # end
80
- # Rails.error.report(error)
81
- #
82
- # source://railties//lib/rails.rb#90
83
- def error; end
84
-
85
- # Returns the currently loaded version of Rails as a <tt>Gem::Version</tt>.
86
- #
87
- # source://railties//lib/rails/gem_version.rb#5
88
- def gem_version; end
89
-
90
- # Returns all Rails groups for loading based on:
91
- #
92
- # * The Rails environment;
93
- # * The environment variable RAILS_GROUPS;
94
- # * The optional envs given as argument and the hash with group dependencies;
95
- #
96
- # Rails.groups assets: [:development, :test]
97
- # # => [:default, "development", :assets] for Rails.env == "development"
98
- # # => [:default, "production"] for Rails.env == "production"
99
- #
100
- # source://railties//lib/rails.rb#103
101
- def groups(*groups); end
102
-
103
- # source://railties//lib/rails.rb#43
104
- def initialize!(*_arg0, **_arg1, &_arg2); end
105
-
106
- # source://railties//lib/rails.rb#43
107
- def initialized?(*_arg0, **_arg1, &_arg2); end
108
-
109
- # Returns the value of attribute logger.
110
- #
111
- # source://railties//lib/rails.rb#38
112
- def logger; end
113
-
114
- # Sets the attribute logger
115
- #
116
- # @param value the value to set the attribute logger to.
117
- #
118
- # source://railties//lib/rails.rb#38
119
- def logger=(_arg0); end
120
-
121
- # Returns a Pathname object of the public folder of the current
122
- # Rails project, otherwise it returns +nil+ if there is no project:
123
- #
124
- # Rails.public_path
125
- # # => #<Pathname:/Users/someuser/some/path/project/public>
126
- #
127
- # source://railties//lib/rails.rb#119
128
- def public_path; end
129
-
130
- # Returns a Pathname object of the current Rails project,
131
- # otherwise it returns +nil+ if there is no project:
132
- #
133
- # Rails.root
134
- # # => #<Pathname:/Users/someuser/some/path/project>
135
- #
136
- # source://railties//lib/rails.rb#63
137
- def root; end
138
-
139
- # Returns the currently loaded version of Rails as a string.
140
- #
141
- # source://railties//lib/rails/version.rb#7
142
- def version; end
143
- end
144
- end
145
-
146
- # An Engine with the responsibility of coordinating the whole boot process.
147
- #
148
- # == Initialization
149
- #
150
- # Rails::Application is responsible for executing all railties and engines
151
- # initializers. It also executes some bootstrap initializers (check
152
- # Rails::Application::Bootstrap) and finishing initializers, after all the others
153
- # are executed (check Rails::Application::Finisher).
154
- #
155
- # == \Configuration
156
- #
157
- # Besides providing the same configuration as Rails::Engine and Rails::Railtie,
158
- # the application object has several specific configurations, for example
159
- # +cache_classes+, +consider_all_requests_local+, +filter_parameters+,
160
- # +logger+, and so forth.
161
- #
162
- # Check Rails::Application::Configuration to see them all.
163
- #
164
- # == Routes
165
- #
166
- # The application object is also responsible for holding the routes and reloading routes
167
- # whenever the files change in development.
168
- #
169
- # == Middlewares
170
- #
171
- # The Application is also responsible for building the middleware stack.
172
- #
173
- # == Booting process
174
- #
175
- # The application is also responsible for setting up and executing the booting
176
- # process. From the moment you require <tt>config/application.rb</tt> in your app,
177
- # the booting process goes like this:
178
- #
179
- # 1. <tt>require "config/boot.rb"</tt> to set up load paths.
180
- # 2. +require+ railties and engines.
181
- # 3. Define +Rails.application+ as <tt>class MyApp::Application < Rails::Application</tt>.
182
- # 4. Run +config.before_configuration+ callbacks.
183
- # 5. Load <tt>config/environments/ENV.rb</tt>.
184
- # 6. Run +config.before_initialize+ callbacks.
185
- # 7. Run <tt>Railtie#initializer</tt> defined by railties, engines, and application.
186
- # One by one, each engine sets up its load paths and routes, and runs its <tt>config/initializers/*</tt> files.
187
- # 8. Custom <tt>Railtie#initializers</tt> added by railties, engines, and applications are executed.
188
- # 9. Build the middleware stack and run +to_prepare+ callbacks.
189
- # 10. Run +config.before_eager_load+ and +eager_load!+ if +eager_load+ is +true+.
190
- # 11. Run +config.after_initialize+ callbacks.
191
- #
192
- # source://railties//lib/rails/application.rb#61
193
- class Rails::Application < ::Rails::Engine
194
- # @return [Application] a new instance of Application
195
- #
196
- # source://railties//lib/rails/application.rb#106
197
- def initialize(initial_variable_values = T.unsafe(nil), &block); end
198
-
199
- # Returns the value of attribute assets.
200
- #
201
- # source://railties//lib/rails/application.rb#97
202
- def assets; end
203
-
204
- # Sets the attribute assets
205
- #
206
- # @param value the value to set the attribute assets to.
207
- #
208
- # source://railties//lib/rails/application.rb#97
209
- def assets=(_arg0); end
210
-
211
- # Returns the value of attribute autoloaders.
212
- #
213
- # source://railties//lib/rails/application.rb#99
214
- def autoloaders; end
215
-
216
- # source://railties//lib/rails/engine.rb#511
217
- def build_middleware_stack; end
218
-
219
- # source://railties//lib/rails/application.rb#383
220
- def config; end
221
-
222
- # Sets the attribute config
223
- #
224
- # @param value the value to set the attribute config to.
225
- #
226
- # source://railties//lib/rails/application.rb#387
227
- def config=(_arg0); end
228
-
229
- # Convenience for loading config/foo.yml for the current Rails env.
230
- #
231
- # Examples:
232
- #
233
- # # config/exception_notification.yml:
234
- # production:
235
- # url: http://127.0.0.1:8080
236
- # namespace: my_app_production
237
- #
238
- # development:
239
- # url: http://localhost:3001
240
- # namespace: my_app_development
241
- #
242
- # # config/environments/production.rb
243
- # Rails.application.configure do
244
- # config.middleware.use ExceptionNotifier, config_for(:exception_notification)
245
- # end
246
- #
247
- # # You can also store configurations in a shared section which will be
248
- # # merged with the environment configuration
249
- #
250
- # # config/example.yml
251
- # shared:
252
- # foo:
253
- # bar:
254
- # baz: 1
255
- #
256
- # development:
257
- # foo:
258
- # bar:
259
- # qux: 2
260
- #
261
- # # development environment
262
- # Rails.application.config_for(:example)[:foo][:bar]
263
- # # => { baz: 1, qux: 2 }
264
- #
265
- # source://railties//lib/rails/application.rb#221
266
- def config_for(name, env: T.unsafe(nil)); end
267
-
268
- # Sends any console called in the instance of a new application up
269
- # to the +console+ method defined in Rails::Railtie.
270
- #
271
- # source://railties//lib/rails/application.rb#303
272
- def console(&blk); end
273
-
274
- # Returns an ActiveSupport::EncryptedConfiguration instance for the
275
- # credentials file specified by +config.credentials.content_path+.
276
- #
277
- # By default, +config.credentials.content_path+ will point to either
278
- # <tt>config/credentials/#{environment}.yml.enc</tt> for the current
279
- # environment (for example, +config/credentials/production.yml.enc+ for the
280
- # +production+ environment), or +config/credentials.yml.enc+ if that file
281
- # does not exist.
282
- #
283
- # The encryption key is taken from either <tt>ENV["RAILS_MASTER_KEY"]</tt>,
284
- # or from the file specified by +config.credentials.key_path+. By default,
285
- # +config.credentials.key_path+ will point to either
286
- # <tt>config/credentials/#{environment}.key</tt> for the current
287
- # environment, or +config/master.key+ if that file does not exist.
288
- #
289
- # source://railties//lib/rails/application.rb#439
290
- def credentials; end
291
-
292
- # Sets the attribute credentials
293
- #
294
- # @param value the value to set the attribute credentials to.
295
- #
296
- # source://railties//lib/rails/application.rb#403
297
- def credentials=(_arg0); end
298
-
299
- # source://railties//lib/rails/application.rb#101
300
- def default_url_options(*_arg0, **_arg1, &_arg2); end
301
-
302
- # source://railties//lib/rails/application.rb#101
303
- def default_url_options=(arg); end
304
-
305
- # Eager loads the application code.
306
- #
307
- # source://railties//lib/rails/application.rb#492
308
- def eager_load!; end
309
-
310
- # Returns an ActiveSupport::EncryptedConfiguration instance for an encrypted
311
- # file. By default, the encryption key is taken from either
312
- # <tt>ENV["RAILS_MASTER_KEY"]</tt>, or from the +config/master.key+ file.
313
- #
314
- # my_config = Rails.application.encrypted("config/my_config.enc")
315
- #
316
- # my_config.read
317
- # # => "foo:\n bar: 123\n"
318
- #
319
- # my_config.foo.bar
320
- # # => 123
321
- #
322
- # Encrypted files can be edited with the <tt>bin/rails encrypted:edit</tt>
323
- # command. (See the output of <tt>bin/rails encrypted:edit --help</tt> for
324
- # more information.)
325
- #
326
- # source://railties//lib/rails/application.rb#458
327
- def encrypted(path, key_path: T.unsafe(nil), env_key: T.unsafe(nil)); end
328
-
329
- # Stores some of the Rails initial environment parameters which
330
- # will be used by middlewares and engines to configure themselves.
331
- #
332
- # source://railties//lib/rails/application.rb#250
333
- def env_config; end
334
-
335
- # Returns the value of attribute executor.
336
- #
337
- # source://railties//lib/rails/application.rb#99
338
- def executor; end
339
-
340
- # Sends any generators called in the instance of a new application up
341
- # to the +generators+ method defined in Rails::Railtie.
342
- #
343
- # source://railties//lib/rails/application.rb#309
344
- def generators(&blk); end
345
-
346
- # source://railties//lib/rails/application.rb#471
347
- def helpers_paths; end
348
-
349
- # Initialize the application passing the given group. By default, the
350
- # group is :default
351
- #
352
- # source://railties//lib/rails/application.rb#370
353
- def initialize!(group = T.unsafe(nil)); end
354
-
355
- # Returns true if the application is initialized.
356
- #
357
- # @return [Boolean]
358
- #
359
- # source://railties//lib/rails/application.rb#129
360
- def initialized?; end
361
-
362
- # Sends the initializers to the +initializer+ method defined in the
363
- # Rails::Initializable module. Each Rails::Application class has its own
364
- # set of initializers, as defined by the Initializable module.
365
- #
366
- # source://railties//lib/rails/application.rb#291
367
- def initializer(name, opts = T.unsafe(nil), &block); end
368
-
369
- # source://railties//lib/rails/application.rb#377
370
- def initializers; end
371
-
372
- # Sends the +isolate_namespace+ method up to the class method.
373
- #
374
- # source://railties//lib/rails/application.rb#320
375
- def isolate_namespace(mod); end
376
-
377
- # Returns the application's KeyGenerator
378
- #
379
- # source://railties//lib/rails/application.rb#153
380
- def key_generator; end
381
-
382
- # Returns a message verifier object.
383
- #
384
- # This verifier can be used to generate and verify signed messages in the application.
385
- #
386
- # It is recommended not to use the same verifier for different things, so you can get different
387
- # verifiers passing the +verifier_name+ argument.
388
- #
389
- # ==== Parameters
390
- #
391
- # * +verifier_name+ - the name of the message verifier.
392
- #
393
- # ==== Examples
394
- #
395
- # message = Rails.application.message_verifier('sensitive_data').generate('my sensible data')
396
- # Rails.application.message_verifier('sensitive_data').verify(message)
397
- # # => 'my sensible data'
398
- #
399
- # See the ActiveSupport::MessageVerifier documentation for more information.
400
- #
401
- # source://railties//lib/rails/application.rb#179
402
- def message_verifier(verifier_name); end
403
-
404
- # Return an array of railties respecting the order they're loaded
405
- # and the order specified by the +railties_order+ config.
406
- #
407
- # While running initializers we need engines in reverse order here when
408
- # copying migrations from railties ; we need them in the order given by
409
- # +railties_order+.
410
- #
411
- # source://railties//lib/rails/application.rb#487
412
- def migration_railties; end
413
-
414
- # If you try to define a set of Rake tasks on the instance, these will get
415
- # passed up to the Rake tasks defined on the application's class.
416
- #
417
- # source://railties//lib/rails/application.rb#284
418
- def rake_tasks(&block); end
419
-
420
- # Reload application routes regardless if they changed or not.
421
- #
422
- # source://railties//lib/rails/application.rb#148
423
- def reload_routes!; end
424
-
425
- # Returns the value of attribute reloader.
426
- #
427
- # source://railties//lib/rails/application.rb#99
428
- def reloader; end
429
-
430
- # Returns the value of attribute reloaders.
431
- #
432
- # source://railties//lib/rails/application.rb#99
433
- def reloaders; end
434
-
435
- # source://railties//lib/rails/application.rb#346
436
- def require_environment!; end
437
-
438
- # source://railties//lib/rails/application.rb#351
439
- def routes_reloader; end
440
-
441
- # source://railties//lib/rails/application.rb#133
442
- def run_load_hooks!; end
443
-
444
- # Sends any runner called in the instance of a new application up
445
- # to the +runner+ method defined in Rails::Railtie.
446
- #
447
- # source://railties//lib/rails/application.rb#297
448
- def runner(&blk); end
449
-
450
- # Returns the value of attribute sandbox.
451
- #
452
- # source://railties//lib/rails/application.rb#97
453
- def sandbox; end
454
-
455
- # Sets the attribute sandbox
456
- #
457
- # @param value the value to set the attribute sandbox to.
458
- #
459
- # source://railties//lib/rails/application.rb#97
460
- def sandbox=(_arg0); end
461
-
462
- # Returns the value of attribute sandbox.
463
- #
464
- # source://railties//lib/rails/application.rb#97
465
- def sandbox?; end
466
-
467
- # The secret_key_base is used as the input secret to the application's key generator, which in turn
468
- # is used to create all ActiveSupport::MessageVerifier and ActiveSupport::MessageEncryptor instances,
469
- # including the ones that sign and encrypt cookies.
470
- #
471
- # In development and test, this is randomly generated and stored in a
472
- # temporary file in <tt>tmp/development_secret.txt</tt>.
473
- #
474
- # In all other environments, we look for it first in <tt>ENV["SECRET_KEY_BASE"]</tt>,
475
- # then +credentials.secret_key_base+, and finally +secrets.secret_key_base+. For most applications,
476
- # the correct place to store it is in the encrypted credentials file.
477
- #
478
- # source://railties//lib/rails/application.rb#415
479
- def secret_key_base; end
480
-
481
- # source://railties//lib/rails/application.rb#389
482
- def secrets; end
483
-
484
- # Sets the attribute secrets
485
- #
486
- # @param value the value to set the attribute secrets to.
487
- #
488
- # source://railties//lib/rails/application.rb#403
489
- def secrets=(_arg0); end
490
-
491
- # Sends any server called in the instance of a new application up
492
- # to the +server+ method defined in Rails::Railtie.
493
- #
494
- # source://railties//lib/rails/application.rb#315
495
- def server(&blk); end
496
-
497
- # source://railties//lib/rails/application.rb#467
498
- def to_app; end
499
-
500
- # Returns an array of file paths appended with a hash of
501
- # directories-extensions suitable for ActiveSupport::FileUpdateChecker
502
- # API.
503
- #
504
- # source://railties//lib/rails/application.rb#358
505
- def watchable_args; end
506
-
507
- protected
508
-
509
- # source://railties//lib/rails/application.rb#565
510
- def default_middleware_stack; end
511
-
512
- # Returns the ordered railties for this application considering railties_order.
513
- #
514
- # source://railties//lib/rails/application.rb#531
515
- def ordered_railties; end
516
-
517
- # source://railties//lib/rails/application.rb#553
518
- def railties_initializers(current); end
519
-
520
- # source://railties//lib/rails/application.rb#520
521
- def run_console_blocks(app); end
522
-
523
- # source://railties//lib/rails/application.rb#510
524
- def run_generators_blocks(app); end
525
-
526
- # source://railties//lib/rails/application.rb#515
527
- def run_runner_blocks(app); end
528
-
529
- # source://railties//lib/rails/application.rb#525
530
- def run_server_blocks(app); end
531
-
532
- # source://railties//lib/rails/application.rb#499
533
- def run_tasks_blocks(app); end
534
-
535
- # source://railties//lib/rails/application.rb#570
536
- def validate_secret_key_base(secret_key_base); end
537
-
538
- private
539
-
540
- # source://railties//lib/rails/application.rb#604
541
- def build_middleware; end
542
-
543
- # source://railties//lib/rails/application.rb#597
544
- def build_request(env); end
545
-
546
- # source://railties//lib/rails/application.rb#608
547
- def coerce_same_site_protection(protection); end
548
-
549
- # source://railties//lib/rails/application.rb#581
550
- def generate_development_secret; end
551
-
552
- class << self
553
- # This method is called just after an application inherits from Rails::Application,
554
- # allowing the developer to load classes in lib and use them during application
555
- # configuration.
556
- #
557
- # class MyApplication < Rails::Application
558
- # require "my_backend" # in lib/my_backend
559
- # config.i18n.backend = MyBackend
560
- # end
561
- #
562
- # Notice this method takes into consideration the default root path. So if you
563
- # are changing config.root inside your application definition or having a custom
564
- # Rails application, you will need to add lib to $LOAD_PATH on your own in case
565
- # you need to load files in lib/ during the application configuration as well.
566
- #
567
- # source://railties//lib/rails/application.rb#339
568
- def add_lib_to_load_path!(root); end
569
-
570
- # source://railties//lib/rails/application.rb#81
571
- def create(initial_variable_values = T.unsafe(nil), &block); end
572
-
573
- # source://railties//lib/rails/application.rb#85
574
- def find_root(from); end
575
-
576
- # @private
577
- #
578
- # source://railties//lib/rails/application.rb#70
579
- def inherited(base); end
580
-
581
- # source://railties//lib/rails/application.rb#77
582
- def instance; end
583
-
584
- def new(*_arg0); end
585
- end
586
- end
587
-
588
- # source://railties//lib/rails/application/bootstrap.rb#11
589
- module Rails::Application::Bootstrap
590
- include ::Rails::Initializable
591
- extend ::Rails::Initializable::ClassMethods
592
- end
593
-
594
- # source://railties//lib/rails/application/configuration.rb#12
595
- class Rails::Application::Configuration < ::Rails::Engine::Configuration
596
- # @return [Configuration] a new instance of Configuration
597
- #
598
- # source://railties//lib/rails/application/configuration.rb#28
599
- def initialize(*_arg0); end
600
-
601
- # Returns the value of attribute add_autoload_paths_to_load_path.
602
- #
603
- # source://railties//lib/rails/application/configuration.rb#13
604
- def add_autoload_paths_to_load_path; end
605
-
606
- # Sets the attribute add_autoload_paths_to_load_path
607
- #
608
- # @param value the value to set the attribute add_autoload_paths_to_load_path to.
609
- #
610
- # source://railties//lib/rails/application/configuration.rb#13
611
- def add_autoload_paths_to_load_path=(_arg0); end
612
-
613
- # Returns the value of attribute allow_concurrency.
614
- #
615
- # source://railties//lib/rails/application/configuration.rb#13
616
- def allow_concurrency; end
617
-
618
- # Sets the attribute allow_concurrency
619
- #
620
- # @param value the value to set the attribute allow_concurrency to.
621
- #
622
- # source://railties//lib/rails/application/configuration.rb#13
623
- def allow_concurrency=(_arg0); end
624
-
625
- # source://railties//lib/rails/application/configuration.rb#414
626
- def annotations; end
627
-
628
- # Returns the value of attribute api_only.
629
- #
630
- # source://railties//lib/rails/application/configuration.rb#26
631
- def api_only; end
632
-
633
- # source://railties//lib/rails/application/configuration.rb#275
634
- def api_only=(value); end
635
-
636
- # Returns the value of attribute asset_host.
637
- #
638
- # source://railties//lib/rails/application/configuration.rb#13
639
- def asset_host; end
640
-
641
- # Sets the attribute asset_host
642
- #
643
- # @param value the value to set the attribute asset_host to.
644
- #
645
- # source://railties//lib/rails/application/configuration.rb#13
646
- def asset_host=(_arg0); end
647
-
648
- # Returns the value of attribute autoflush_log.
649
- #
650
- # source://railties//lib/rails/application/configuration.rb#13
651
- def autoflush_log; end
652
-
653
- # Sets the attribute autoflush_log
654
- #
655
- # @param value the value to set the attribute autoflush_log to.
656
- #
657
- # source://railties//lib/rails/application/configuration.rb#13
658
- def autoflush_log=(_arg0); end
659
-
660
- # Returns the value of attribute beginning_of_week.
661
- #
662
- # source://railties//lib/rails/application/configuration.rb#13
663
- def beginning_of_week; end
664
-
665
- # Sets the attribute beginning_of_week
666
- #
667
- # @param value the value to set the attribute beginning_of_week to.
668
- #
669
- # source://railties//lib/rails/application/configuration.rb#13
670
- def beginning_of_week=(_arg0); end
671
-
672
- # Returns the value of attribute cache_classes.
673
- #
674
- # source://railties//lib/rails/application/configuration.rb#13
675
- def cache_classes; end
676
-
677
- # Sets the attribute cache_classes
678
- #
679
- # @param value the value to set the attribute cache_classes to.
680
- #
681
- # source://railties//lib/rails/application/configuration.rb#13
682
- def cache_classes=(_arg0); end
683
-
684
- # Returns the value of attribute cache_store.
685
- #
686
- # source://railties//lib/rails/application/configuration.rb#13
687
- def cache_store; end
688
-
689
- # Sets the attribute cache_store
690
- #
691
- # @param value the value to set the attribute cache_store to.
692
- #
693
- # source://railties//lib/rails/application/configuration.rb#13
694
- def cache_store=(_arg0); end
695
-
696
- # source://railties//lib/rails/application/configuration.rb#360
697
- def colorize_logging; end
698
-
699
- # source://railties//lib/rails/application/configuration.rb#364
700
- def colorize_logging=(val); end
701
-
702
- # Returns the value of attribute consider_all_requests_local.
703
- #
704
- # source://railties//lib/rails/application/configuration.rb#13
705
- def consider_all_requests_local; end
706
-
707
- # Sets the attribute consider_all_requests_local
708
- #
709
- # @param value the value to set the attribute consider_all_requests_local to.
710
- #
711
- # source://railties//lib/rails/application/configuration.rb#13
712
- def consider_all_requests_local=(_arg0); end
713
-
714
- # Returns the value of attribute console.
715
- #
716
- # source://railties//lib/rails/application/configuration.rb#13
717
- def console; end
718
-
719
- # Sets the attribute console
720
- #
721
- # @param value the value to set the attribute console to.
722
- #
723
- # source://railties//lib/rails/application/configuration.rb#13
724
- def console=(_arg0); end
725
-
726
- # Configures the ActionDispatch::ContentSecurityPolicy.
727
- #
728
- # source://railties//lib/rails/application/configuration.rb#419
729
- def content_security_policy(&block); end
730
-
731
- # Returns the value of attribute content_security_policy_nonce_directives.
732
- #
733
- # source://railties//lib/rails/application/configuration.rb#13
734
- def content_security_policy_nonce_directives; end
735
-
736
- # Sets the attribute content_security_policy_nonce_directives
737
- #
738
- # @param value the value to set the attribute content_security_policy_nonce_directives to.
739
- #
740
- # source://railties//lib/rails/application/configuration.rb#13
741
- def content_security_policy_nonce_directives=(_arg0); end
742
-
743
- # Returns the value of attribute content_security_policy_nonce_generator.
744
- #
745
- # source://railties//lib/rails/application/configuration.rb#13
746
- def content_security_policy_nonce_generator; end
747
-
748
- # Sets the attribute content_security_policy_nonce_generator
749
- #
750
- # @param value the value to set the attribute content_security_policy_nonce_generator to.
751
- #
752
- # source://railties//lib/rails/application/configuration.rb#13
753
- def content_security_policy_nonce_generator=(_arg0); end
754
-
755
- # Returns the value of attribute content_security_policy_report_only.
756
- #
757
- # source://railties//lib/rails/application/configuration.rb#13
758
- def content_security_policy_report_only; end
759
-
760
- # Sets the attribute content_security_policy_report_only
761
- #
762
- # @param value the value to set the attribute content_security_policy_report_only to.
763
- #
764
- # source://railties//lib/rails/application/configuration.rb#13
765
- def content_security_policy_report_only=(_arg0); end
766
-
767
- # Returns the value of attribute credentials.
768
- #
769
- # source://railties//lib/rails/application/configuration.rb#13
770
- def credentials; end
771
-
772
- # Sets the attribute credentials
773
- #
774
- # @param value the value to set the attribute credentials to.
775
- #
776
- # source://railties//lib/rails/application/configuration.rb#13
777
- def credentials=(_arg0); end
778
-
779
- # Loads and returns the entire raw configuration of database from
780
- # values stored in <tt>config/database.yml</tt>.
781
- #
782
- # source://railties//lib/rails/application/configuration.rb#329
783
- def database_configuration; end
784
-
785
- # source://railties//lib/rails/application/configuration.rb#282
786
- def debug_exception_response_format; end
787
-
788
- # Sets the attribute debug_exception_response_format
789
- #
790
- # @param value the value to set the attribute debug_exception_response_format to.
791
- #
792
- # source://railties//lib/rails/application/configuration.rb#286
793
- def debug_exception_response_format=(_arg0); end
794
-
795
- # source://railties//lib/rails/application/configuration.rb#436
796
- def default_log_file; end
797
-
798
- # Returns the value of attribute disable_sandbox.
799
- #
800
- # source://railties//lib/rails/application/configuration.rb#13
801
- def disable_sandbox; end
802
-
803
- # Sets the attribute disable_sandbox
804
- #
805
- # @param value the value to set the attribute disable_sandbox to.
806
- #
807
- # source://railties//lib/rails/application/configuration.rb#13
808
- def disable_sandbox=(_arg0); end
809
-
810
- # Returns the value of attribute eager_load.
811
- #
812
- # source://railties//lib/rails/application/configuration.rb#13
813
- def eager_load; end
814
-
815
- # Sets the attribute eager_load
816
- #
817
- # @param value the value to set the attribute eager_load to.
818
- #
819
- # source://railties//lib/rails/application/configuration.rb#13
820
- def eager_load=(_arg0); end
821
-
822
- # Returns the value of attribute enable_dependency_loading.
823
- #
824
- # source://railties//lib/rails/application/configuration.rb#13
825
- def enable_dependency_loading; end
826
-
827
- # Sets the attribute enable_dependency_loading
828
- #
829
- # @param value the value to set the attribute enable_dependency_loading to.
830
- #
831
- # source://railties//lib/rails/application/configuration.rb#13
832
- def enable_dependency_loading=(_arg0); end
833
-
834
- # Returns the value of attribute encoding.
835
- #
836
- # source://railties//lib/rails/application/configuration.rb#26
837
- def encoding; end
838
-
839
- # source://railties//lib/rails/application/configuration.rb#267
840
- def encoding=(value); end
841
-
842
- # Returns the value of attribute exceptions_app.
843
- #
844
- # source://railties//lib/rails/application/configuration.rb#13
845
- def exceptions_app; end
846
-
847
- # Sets the attribute exceptions_app
848
- #
849
- # @param value the value to set the attribute exceptions_app to.
850
- #
851
- # source://railties//lib/rails/application/configuration.rb#13
852
- def exceptions_app=(_arg0); end
853
-
854
- # Returns the value of attribute file_watcher.
855
- #
856
- # source://railties//lib/rails/application/configuration.rb#13
857
- def file_watcher; end
858
-
859
- # Sets the attribute file_watcher
860
- #
861
- # @param value the value to set the attribute file_watcher to.
862
- #
863
- # source://railties//lib/rails/application/configuration.rb#13
864
- def file_watcher=(_arg0); end
865
-
866
- # Returns the value of attribute filter_parameters.
867
- #
868
- # source://railties//lib/rails/application/configuration.rb#13
869
- def filter_parameters; end
870
-
871
- # Sets the attribute filter_parameters
872
- #
873
- # @param value the value to set the attribute filter_parameters to.
874
- #
875
- # source://railties//lib/rails/application/configuration.rb#13
876
- def filter_parameters=(_arg0); end
877
-
878
- # Returns the value of attribute filter_redirect.
879
- #
880
- # source://railties//lib/rails/application/configuration.rb#13
881
- def filter_redirect; end
882
-
883
- # Sets the attribute filter_redirect
884
- #
885
- # @param value the value to set the attribute filter_redirect to.
886
- #
887
- # source://railties//lib/rails/application/configuration.rb#13
888
- def filter_redirect=(_arg0); end
889
-
890
- # Returns the value of attribute force_ssl.
891
- #
892
- # source://railties//lib/rails/application/configuration.rb#13
893
- def force_ssl; end
894
-
895
- # Sets the attribute force_ssl
896
- #
897
- # @param value the value to set the attribute force_ssl to.
898
- #
899
- # source://railties//lib/rails/application/configuration.rb#13
900
- def force_ssl=(_arg0); end
901
-
902
- # Returns the value of attribute helpers_paths.
903
- #
904
- # source://railties//lib/rails/application/configuration.rb#13
905
- def helpers_paths; end
906
-
907
- # Sets the attribute helpers_paths
908
- #
909
- # @param value the value to set the attribute helpers_paths to.
910
- #
911
- # source://railties//lib/rails/application/configuration.rb#13
912
- def helpers_paths=(_arg0); end
913
-
914
- # Returns the value of attribute host_authorization.
915
- #
916
- # source://railties//lib/rails/application/configuration.rb#13
917
- def host_authorization; end
918
-
919
- # Sets the attribute host_authorization
920
- #
921
- # @param value the value to set the attribute host_authorization to.
922
- #
923
- # source://railties//lib/rails/application/configuration.rb#13
924
- def host_authorization=(_arg0); end
925
-
926
- # Returns the value of attribute hosts.
927
- #
928
- # source://railties//lib/rails/application/configuration.rb#13
929
- def hosts; end
930
-
931
- # Sets the attribute hosts
932
- #
933
- # @param value the value to set the attribute hosts to.
934
- #
935
- # source://railties//lib/rails/application/configuration.rb#13
936
- def hosts=(_arg0); end
937
-
938
- # Load the database YAML without evaluating ERB. This allows us to
939
- # create the rake tasks for multiple databases without filling in the
940
- # configuration values or loading the environment. Do not use this
941
- # method.
942
- #
943
- # This uses a DummyERB custom compiler so YAML can ignore the ERB
944
- # tags and load the database.yml for the rake tasks.
945
- #
946
- # source://railties//lib/rails/application/configuration.rb#311
947
- def load_database_yaml; end
948
-
949
- # Loads default configuration values for a target version. This includes
950
- # defaults for versions prior to the target version. See the
951
- # {configuration guide}[https://guides.rubyonrails.org/configuring.html]
952
- # for the default values associated with a particular version.
953
- #
954
- # source://railties//lib/rails/application/configuration.rb#88
955
- def load_defaults(target_version); end
956
-
957
- # Returns the value of attribute loaded_config_version.
958
- #
959
- # source://railties//lib/rails/application/configuration.rb#26
960
- def loaded_config_version; end
961
-
962
- # Returns the value of attribute log_formatter.
963
- #
964
- # source://railties//lib/rails/application/configuration.rb#13
965
- def log_formatter; end
966
-
967
- # Sets the attribute log_formatter
968
- #
969
- # @param value the value to set the attribute log_formatter to.
970
- #
971
- # source://railties//lib/rails/application/configuration.rb#13
972
- def log_formatter=(_arg0); end
973
-
974
- # Returns the value of attribute log_level.
975
- #
976
- # source://railties//lib/rails/application/configuration.rb#13
977
- def log_level; end
978
-
979
- # Sets the attribute log_level
980
- #
981
- # @param value the value to set the attribute log_level to.
982
- #
983
- # source://railties//lib/rails/application/configuration.rb#13
984
- def log_level=(_arg0); end
985
-
986
- # Returns the value of attribute log_tags.
987
- #
988
- # source://railties//lib/rails/application/configuration.rb#13
989
- def log_tags; end
990
-
991
- # Sets the attribute log_tags
992
- #
993
- # @param value the value to set the attribute log_tags to.
994
- #
995
- # source://railties//lib/rails/application/configuration.rb#13
996
- def log_tags=(_arg0); end
997
-
998
- # Returns the value of attribute logger.
999
- #
1000
- # source://railties//lib/rails/application/configuration.rb#13
1001
- def logger; end
1002
-
1003
- # Sets the attribute logger
1004
- #
1005
- # @param value the value to set the attribute logger to.
1006
- #
1007
- # source://railties//lib/rails/application/configuration.rb#13
1008
- def logger=(_arg0); end
1009
-
1010
- # source://railties//lib/rails/application/configuration.rb#288
1011
- def paths; end
1012
-
1013
- # Configures the ActionDispatch::PermissionsPolicy.
1014
- #
1015
- # source://railties//lib/rails/application/configuration.rb#428
1016
- def permissions_policy(&block); end
1017
-
1018
- # Returns the value of attribute public_file_server.
1019
- #
1020
- # source://railties//lib/rails/application/configuration.rb#13
1021
- def public_file_server; end
1022
-
1023
- # Sets the attribute public_file_server
1024
- #
1025
- # @param value the value to set the attribute public_file_server to.
1026
- #
1027
- # source://railties//lib/rails/application/configuration.rb#13
1028
- def public_file_server=(_arg0); end
1029
-
1030
- # Returns the value of attribute railties_order.
1031
- #
1032
- # source://railties//lib/rails/application/configuration.rb#13
1033
- def railties_order; end
1034
-
1035
- # Sets the attribute railties_order
1036
- #
1037
- # @param value the value to set the attribute railties_order to.
1038
- #
1039
- # source://railties//lib/rails/application/configuration.rb#13
1040
- def railties_order=(_arg0); end
1041
-
1042
- # Returns the value of attribute rake_eager_load.
1043
- #
1044
- # source://railties//lib/rails/application/configuration.rb#13
1045
- def rake_eager_load; end
1046
-
1047
- # Sets the attribute rake_eager_load
1048
- #
1049
- # @param value the value to set the attribute rake_eager_load to.
1050
- #
1051
- # source://railties//lib/rails/application/configuration.rb#13
1052
- def rake_eager_load=(_arg0); end
1053
-
1054
- # Returns the value of attribute read_encrypted_secrets.
1055
- #
1056
- # source://railties//lib/rails/application/configuration.rb#13
1057
- def read_encrypted_secrets; end
1058
-
1059
- # Sets the attribute read_encrypted_secrets
1060
- #
1061
- # @param value the value to set the attribute read_encrypted_secrets to.
1062
- #
1063
- # source://railties//lib/rails/application/configuration.rb#13
1064
- def read_encrypted_secrets=(_arg0); end
1065
-
1066
- # Returns the value of attribute relative_url_root.
1067
- #
1068
- # source://railties//lib/rails/application/configuration.rb#13
1069
- def relative_url_root; end
1070
-
1071
- # Sets the attribute relative_url_root
1072
- #
1073
- # @param value the value to set the attribute relative_url_root to.
1074
- #
1075
- # source://railties//lib/rails/application/configuration.rb#13
1076
- def relative_url_root=(_arg0); end
1077
-
1078
- # Returns the value of attribute reload_classes_only_on_change.
1079
- #
1080
- # source://railties//lib/rails/application/configuration.rb#13
1081
- def reload_classes_only_on_change; end
1082
-
1083
- # Sets the attribute reload_classes_only_on_change
1084
- #
1085
- # @param value the value to set the attribute reload_classes_only_on_change to.
1086
- #
1087
- # source://railties//lib/rails/application/configuration.rb#13
1088
- def reload_classes_only_on_change=(_arg0); end
1089
-
1090
- # Returns the value of attribute require_master_key.
1091
- #
1092
- # source://railties//lib/rails/application/configuration.rb#13
1093
- def require_master_key; end
1094
-
1095
- # Sets the attribute require_master_key
1096
- #
1097
- # @param value the value to set the attribute require_master_key to.
1098
- #
1099
- # source://railties//lib/rails/application/configuration.rb#13
1100
- def require_master_key=(_arg0); end
1101
-
1102
- # Returns the value of attribute secret_key_base.
1103
- #
1104
- # source://railties//lib/rails/application/configuration.rb#13
1105
- def secret_key_base; end
1106
-
1107
- # Sets the attribute secret_key_base
1108
- #
1109
- # @param value the value to set the attribute secret_key_base to.
1110
- #
1111
- # source://railties//lib/rails/application/configuration.rb#13
1112
- def secret_key_base=(_arg0); end
1113
-
1114
- # Returns the value of attribute server_timing.
1115
- #
1116
- # source://railties//lib/rails/application/configuration.rb#13
1117
- def server_timing; end
1118
-
1119
- # Sets the attribute server_timing
1120
- #
1121
- # @param value the value to set the attribute server_timing to.
1122
- #
1123
- # source://railties//lib/rails/application/configuration.rb#13
1124
- def server_timing=(_arg0); end
1125
-
1126
- # Returns the value of attribute session_options.
1127
- #
1128
- # source://railties//lib/rails/application/configuration.rb#13
1129
- def session_options; end
1130
-
1131
- # Sets the attribute session_options
1132
- #
1133
- # @param value the value to set the attribute session_options to.
1134
- #
1135
- # source://railties//lib/rails/application/configuration.rb#13
1136
- def session_options=(_arg0); end
1137
-
1138
- # Specifies what class to use to store the session. Possible values
1139
- # are +:cookie_store+, +:mem_cache_store+, a custom store, or
1140
- # +:disabled+. +:disabled+ tells Rails not to deal with sessions.
1141
- #
1142
- # Additional options will be set as +session_options+:
1143
- #
1144
- # config.session_store :cookie_store, key: "_your_app_session"
1145
- # config.session_options # => {key: "_your_app_session"}
1146
- #
1147
- # If a custom store is specified as a symbol, it will be resolved to
1148
- # the +ActionDispatch::Session+ namespace:
1149
- #
1150
- # # use ActionDispatch::Session::MyCustomStore as the session store
1151
- # config.session_store :my_custom_store
1152
- #
1153
- # source://railties//lib/rails/application/configuration.rb#383
1154
- def session_store(new_session_store = T.unsafe(nil), **options); end
1155
-
1156
- # @return [Boolean]
1157
- #
1158
- # source://railties//lib/rails/application/configuration.rb#410
1159
- def session_store?; end
1160
-
1161
- # Returns the value of attribute ssl_options.
1162
- #
1163
- # source://railties//lib/rails/application/configuration.rb#13
1164
- def ssl_options; end
1165
-
1166
- # Sets the attribute ssl_options
1167
- #
1168
- # @param value the value to set the attribute ssl_options to.
1169
- #
1170
- # source://railties//lib/rails/application/configuration.rb#13
1171
- def ssl_options=(_arg0); end
1172
-
1173
- # Returns the value of attribute time_zone.
1174
- #
1175
- # source://railties//lib/rails/application/configuration.rb#13
1176
- def time_zone; end
1177
-
1178
- # Sets the attribute time_zone
1179
- #
1180
- # @param value the value to set the attribute time_zone to.
1181
- #
1182
- # source://railties//lib/rails/application/configuration.rb#13
1183
- def time_zone=(_arg0); end
1184
-
1185
- # Returns the value of attribute x.
1186
- #
1187
- # source://railties//lib/rails/application/configuration.rb#13
1188
- def x; end
1189
-
1190
- # Sets the attribute x
1191
- #
1192
- # @param value the value to set the attribute x to.
1193
- #
1194
- # source://railties//lib/rails/application/configuration.rb#13
1195
- def x=(_arg0); end
1196
-
1197
- private
1198
-
1199
- # @return [Boolean]
1200
- #
1201
- # source://railties//lib/rails/application/configuration.rb#485
1202
- def credentials_available_for_current_env?; end
1203
-
1204
- # source://railties//lib/rails/application/configuration.rb#469
1205
- def default_credentials_content_path; end
1206
-
1207
- # source://railties//lib/rails/application/configuration.rb#477
1208
- def default_credentials_key_path; end
1209
- end
1210
-
1211
- # source://railties//lib/rails/application/configuration.rb#448
1212
- class Rails::Application::Configuration::Custom
1213
- # @return [Custom] a new instance of Custom
1214
- #
1215
- # source://railties//lib/rails/application/configuration.rb#449
1216
- def initialize; end
1217
-
1218
- # source://railties//lib/rails/application/configuration.rb#453
1219
- def method_missing(method, *args); end
1220
-
1221
- private
1222
-
1223
- # @return [Boolean]
1224
- #
1225
- # source://railties//lib/rails/application/configuration.rb#463
1226
- def respond_to_missing?(symbol, *_arg1); end
1227
- end
1228
-
1229
- # source://railties//lib/rails/application/default_middleware_stack.rb#5
1230
- class Rails::Application::DefaultMiddlewareStack
1231
- # @return [DefaultMiddlewareStack] a new instance of DefaultMiddlewareStack
1232
- #
1233
- # source://railties//lib/rails/application/default_middleware_stack.rb#8
1234
- def initialize(app, config, paths); end
1235
-
1236
- # Returns the value of attribute app.
1237
- #
1238
- # source://railties//lib/rails/application/default_middleware_stack.rb#6
1239
- def app; end
1240
-
1241
- # source://railties//lib/rails/application/default_middleware_stack.rb#14
1242
- def build_stack; end
1243
-
1244
- # Returns the value of attribute config.
1245
- #
1246
- # source://railties//lib/rails/application/default_middleware_stack.rb#6
1247
- def config; end
1248
-
1249
- # Returns the value of attribute paths.
1250
- #
1251
- # source://railties//lib/rails/application/default_middleware_stack.rb#6
1252
- def paths; end
1253
-
1254
- private
1255
-
1256
- # source://railties//lib/rails/application/default_middleware_stack.rb#103
1257
- def load_rack_cache; end
1258
-
1259
- # source://railties//lib/rails/application/default_middleware_stack.rb#125
1260
- def show_exceptions_app; end
1261
- end
1262
-
1263
- # source://railties//lib/rails/application/finisher.rb#10
1264
- module Rails::Application::Finisher
1265
- include ::Rails::Initializable
1266
- extend ::Rails::Initializable::ClassMethods
1267
- end
1268
-
1269
- # source://railties//lib/rails/application/finisher.rb#104
1270
- module Rails::Application::Finisher::InterlockHook
1271
- class << self
1272
- # source://railties//lib/rails/application/finisher.rb#109
1273
- def complete(_state); end
1274
-
1275
- # source://railties//lib/rails/application/finisher.rb#105
1276
- def run; end
1277
- end
1278
- end
1279
-
1280
- # source://railties//lib/rails/application/finisher.rb#90
1281
- class Rails::Application::Finisher::MonitorHook
1282
- # @return [MonitorHook] a new instance of MonitorHook
1283
- #
1284
- # source://railties//lib/rails/application/finisher.rb#91
1285
- def initialize(monitor = T.unsafe(nil)); end
1286
-
1287
- # source://railties//lib/rails/application/finisher.rb#99
1288
- def complete(_state); end
1289
-
1290
- # source://railties//lib/rails/application/finisher.rb#95
1291
- def run; end
1292
- end
1293
-
1294
- # source://railties//lib/rails/application.rb#103
1295
- Rails::Application::INITIAL_VARIABLES = T.let(T.unsafe(nil), Array)
1296
-
1297
- # source://railties//lib/rails/application/routes_reloader.rb#7
1298
- class Rails::Application::RoutesReloader
1299
- include ::ActiveSupport::Callbacks
1300
- extend ::ActiveSupport::Callbacks::ClassMethods
1301
- extend ::ActiveSupport::DescendantsTracker
1302
-
1303
- # @return [RoutesReloader] a new instance of RoutesReloader
1304
- #
1305
- # source://railties//lib/rails/application/routes_reloader.rb#15
1306
- def initialize; end
1307
-
1308
- # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#68
1309
- def __callbacks; end
1310
-
1311
- # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#68
1312
- def __callbacks?; end
1313
-
1314
- # Returns the value of attribute eager_load.
1315
- #
1316
- # source://railties//lib/rails/application/routes_reloader.rb#11
1317
- def eager_load; end
1318
-
1319
- # Sets the attribute eager_load
1320
- #
1321
- # @param value the value to set the attribute eager_load to.
1322
- #
1323
- # source://railties//lib/rails/application/routes_reloader.rb#11
1324
- def eager_load=(_arg0); end
1325
-
1326
- # source://railties//lib/rails/application/routes_reloader.rb#13
1327
- def execute(*_arg0, **_arg1, &_arg2); end
1328
-
1329
- # source://railties//lib/rails/application/routes_reloader.rb#13
1330
- def execute_if_updated(*_arg0, **_arg1, &_arg2); end
1331
-
1332
- # Returns the value of attribute external_routes.
1333
- #
1334
- # source://railties//lib/rails/application/routes_reloader.rb#10
1335
- def external_routes; end
1336
-
1337
- # Returns the value of attribute paths.
1338
- #
1339
- # source://railties//lib/rails/application/routes_reloader.rb#10
1340
- def paths; end
1341
-
1342
- # source://railties//lib/rails/application/routes_reloader.rb#22
1343
- def reload!; end
1344
-
1345
- # Returns the value of attribute route_sets.
1346
- #
1347
- # source://railties//lib/rails/application/routes_reloader.rb#10
1348
- def route_sets; end
1349
-
1350
- # source://railties//lib/rails/application/routes_reloader.rb#12
1351
- def run_after_load_paths=(_arg0); end
1352
-
1353
- # source://railties//lib/rails/application/routes_reloader.rb#13
1354
- def updated?(*_arg0, **_arg1, &_arg2); end
1355
-
1356
- private
1357
-
1358
- # source://railties//lib/rails/application/routes_reloader.rb#42
1359
- def clear!; end
1360
-
1361
- # source://railties//lib/rails/application/routes_reloader.rb#58
1362
- def finalize!; end
1363
-
1364
- # source://railties//lib/rails/application/routes_reloader.rb#49
1365
- def load_paths; end
1366
-
1367
- # source://railties//lib/rails/application/routes_reloader.rb#62
1368
- def revert; end
1369
-
1370
- # source://railties//lib/rails/application/routes_reloader.rb#54
1371
- def run_after_load_paths; end
1372
-
1373
- # source://railties//lib/rails/application/routes_reloader.rb#32
1374
- def updater; end
1375
-
1376
- class << self
1377
- # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#68
1378
- def __callbacks; end
1379
-
1380
- # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#68
1381
- def __callbacks=(value); end
1382
-
1383
- # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#68
1384
- def __callbacks?; end
1385
- end
1386
- end
1387
-
1388
- # source://railties//lib/rails/application_controller.rb#3
1389
- class Rails::ApplicationController < ::ActionController::Base
1390
- private
1391
-
1392
- # source://actionview/7.0.8.7/lib/action_view/layouts.rb#328
1393
- def _layout(lookup_context, formats); end
1394
-
1395
- # source://railties//lib/rails/application_controller.rb#25
1396
- def disable_content_security_policy_nonce!; end
1397
-
1398
- # @return [Boolean]
1399
- #
1400
- # source://railties//lib/rails/application_controller.rb#21
1401
- def local_request?; end
1402
-
1403
- # source://railties//lib/rails/application_controller.rb#15
1404
- def require_local!; end
1405
-
1406
- class << self
1407
- # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#68
1408
- def __callbacks; end
1409
-
1410
- # source://actionview/7.0.8.7/lib/action_view/layouts.rb#209
1411
- def _layout; end
1412
-
1413
- # source://actionview/7.0.8.7/lib/action_view/layouts.rb#210
1414
- def _layout_conditions; end
1415
-
1416
- # source://actionpack/7.0.8.7/lib/action_controller/metal.rb#210
1417
- def middleware_stack; end
1418
- end
1419
- end
1420
-
1421
- # source://railties//lib/rails/autoloaders.rb#4
1422
- class Rails::Autoloaders
1423
- include ::Enumerable
1424
-
1425
- # @return [Autoloaders] a new instance of Autoloaders
1426
- #
1427
- # source://railties//lib/rails/autoloaders.rb#11
1428
- def initialize; end
1429
-
1430
- # @yield [main]
1431
- #
1432
- # source://railties//lib/rails/autoloaders.rb#31
1433
- def each; end
1434
-
1435
- # source://railties//lib/rails/autoloaders.rb#40
1436
- def log!; end
1437
-
1438
- # source://railties//lib/rails/autoloaders.rb#36
1439
- def logger=(logger); end
1440
-
1441
- # Returns the value of attribute main.
1442
- #
1443
- # source://railties//lib/rails/autoloaders.rb#9
1444
- def main; end
1445
-
1446
- # Returns the value of attribute once.
1447
- #
1448
- # source://railties//lib/rails/autoloaders.rb#9
1449
- def once; end
1450
-
1451
- # @return [Boolean]
1452
- #
1453
- # source://railties//lib/rails/autoloaders.rb#44
1454
- def zeitwerk_enabled?; end
1455
- end
1456
-
1457
- # source://railties//lib/rails/autoloaders/inflector.rb#7
1458
- module Rails::Autoloaders::Inflector
1459
- class << self
1460
- # source://railties//lib/rails/autoloaders/inflector.rb#12
1461
- def camelize(basename, _abspath); end
1462
-
1463
- # source://railties//lib/rails/autoloaders/inflector.rb#16
1464
- def inflect(overrides); end
1465
- end
1466
- end
1467
-
1468
- # source://railties//lib/rails/configuration.rb#9
1469
- module Rails::Configuration; end
1470
-
1471
- # source://railties//lib/rails/configuration.rb#104
1472
- class Rails::Configuration::Generators
1473
- # @return [Generators] a new instance of Generators
1474
- #
1475
- # source://railties//lib/rails/configuration.rb#108
1476
- def initialize; end
1477
-
1478
- # source://railties//lib/rails/configuration.rb#130
1479
- def after_generate(&block); end
1480
-
1481
- # Returns the value of attribute after_generate_callbacks.
1482
- #
1483
- # source://railties//lib/rails/configuration.rb#106
1484
- def after_generate_callbacks; end
1485
-
1486
- # Returns the value of attribute aliases.
1487
- #
1488
- # source://railties//lib/rails/configuration.rb#105
1489
- def aliases; end
1490
-
1491
- # Sets the attribute aliases
1492
- #
1493
- # @param value the value to set the attribute aliases to.
1494
- #
1495
- # source://railties//lib/rails/configuration.rb#105
1496
- def aliases=(_arg0); end
1497
-
1498
- # Returns the value of attribute api_only.
1499
- #
1500
- # source://railties//lib/rails/configuration.rb#105
1501
- def api_only; end
1502
-
1503
- # Sets the attribute api_only
1504
- #
1505
- # @param value the value to set the attribute api_only to.
1506
- #
1507
- # source://railties//lib/rails/configuration.rb#105
1508
- def api_only=(_arg0); end
1509
-
1510
- # Returns the value of attribute colorize_logging.
1511
- #
1512
- # source://railties//lib/rails/configuration.rb#105
1513
- def colorize_logging; end
1514
-
1515
- # Sets the attribute colorize_logging
1516
- #
1517
- # @param value the value to set the attribute colorize_logging to.
1518
- #
1519
- # source://railties//lib/rails/configuration.rb#105
1520
- def colorize_logging=(_arg0); end
1521
-
1522
- # Returns the value of attribute fallbacks.
1523
- #
1524
- # source://railties//lib/rails/configuration.rb#105
1525
- def fallbacks; end
1526
-
1527
- # Sets the attribute fallbacks
1528
- #
1529
- # @param value the value to set the attribute fallbacks to.
1530
- #
1531
- # source://railties//lib/rails/configuration.rb#105
1532
- def fallbacks=(_arg0); end
1533
-
1534
- # Returns the value of attribute hidden_namespaces.
1535
- #
1536
- # source://railties//lib/rails/configuration.rb#106
1537
- def hidden_namespaces; end
1538
-
1539
- # source://railties//lib/rails/configuration.rb#126
1540
- def hide_namespace(namespace); end
1541
-
1542
- # source://railties//lib/rails/configuration.rb#134
1543
- def method_missing(method, *args); end
1544
-
1545
- # Returns the value of attribute options.
1546
- #
1547
- # source://railties//lib/rails/configuration.rb#105
1548
- def options; end
1549
-
1550
- # Sets the attribute options
1551
- #
1552
- # @param value the value to set the attribute options to.
1553
- #
1554
- # source://railties//lib/rails/configuration.rb#105
1555
- def options=(_arg0); end
1556
-
1557
- # Returns the value of attribute templates.
1558
- #
1559
- # source://railties//lib/rails/configuration.rb#105
1560
- def templates; end
1561
-
1562
- # Sets the attribute templates
1563
- #
1564
- # @param value the value to set the attribute templates to.
1565
- #
1566
- # source://railties//lib/rails/configuration.rb#105
1567
- def templates=(_arg0); end
1568
-
1569
- private
1570
-
1571
- # source://railties//lib/rails/configuration.rb#119
1572
- def initialize_copy(source); end
1573
- end
1574
-
1575
- # MiddlewareStackProxy is a proxy for the Rails middleware stack that allows
1576
- # you to configure middlewares in your application. It works basically as a
1577
- # command recorder, saving each command to be applied after initialization
1578
- # over the default middleware stack, so you can add, swap, or remove any
1579
- # middleware in Rails.
1580
- #
1581
- # You can add your own middlewares by using the +config.middleware.use+ method:
1582
- #
1583
- # config.middleware.use Magical::Unicorns
1584
- #
1585
- # This will put the <tt>Magical::Unicorns</tt> middleware on the end of the stack.
1586
- # You can use +insert_before+ if you wish to add a middleware before another:
1587
- #
1588
- # config.middleware.insert_before Rack::Head, Magical::Unicorns
1589
- #
1590
- # There's also +insert_after+ which will insert a middleware after another:
1591
- #
1592
- # config.middleware.insert_after Rack::Head, Magical::Unicorns
1593
- #
1594
- # Middlewares can also be completely swapped out and replaced with others:
1595
- #
1596
- # config.middleware.swap ActionDispatch::Flash, Magical::Unicorns
1597
- #
1598
- # Middlewares can be moved from one place to another:
1599
- #
1600
- # config.middleware.move_before ActionDispatch::Flash, Magical::Unicorns
1601
- #
1602
- # This will move the <tt>Magical::Unicorns</tt> middleware before the
1603
- # <tt>ActionDispatch::Flash</tt>. You can also move it after:
1604
- #
1605
- # config.middleware.move_after ActionDispatch::Flash, Magical::Unicorns
1606
- #
1607
- # And finally they can also be removed from the stack completely:
1608
- #
1609
- # config.middleware.delete ActionDispatch::Flash
1610
- #
1611
- # source://railties//lib/rails/configuration.rb#46
1612
- class Rails::Configuration::MiddlewareStackProxy
1613
- # @return [MiddlewareStackProxy] a new instance of MiddlewareStackProxy
1614
- #
1615
- # source://railties//lib/rails/configuration.rb#47
1616
- def initialize(operations = T.unsafe(nil), delete_operations = T.unsafe(nil)); end
1617
-
1618
- # source://railties//lib/rails/configuration.rb#96
1619
- def +(other); end
1620
-
1621
- # source://railties//lib/rails/configuration.rb#70
1622
- def delete(*_arg0, **_arg1, &_arg2); end
1623
-
1624
- # source://railties//lib/rails/configuration.rb#52
1625
- def insert(*_arg0, **_arg1, &_arg2); end
1626
-
1627
- # source://railties//lib/rails/configuration.rb#58
1628
- def insert_after(*_arg0, **_arg1, &_arg2); end
1629
-
1630
- # source://railties//lib/rails/configuration.rb#52
1631
- def insert_before(*_arg0, **_arg1, &_arg2); end
1632
-
1633
- # source://railties//lib/rails/configuration.rb#88
1634
- def merge_into(other); end
1635
-
1636
- # source://railties//lib/rails/configuration.rb#74
1637
- def move(*_arg0, **_arg1, &_arg2); end
1638
-
1639
- # source://railties//lib/rails/configuration.rb#80
1640
- def move_after(*_arg0, **_arg1, &_arg2); end
1641
-
1642
- # source://railties//lib/rails/configuration.rb#74
1643
- def move_before(*_arg0, **_arg1, &_arg2); end
1644
-
1645
- # source://railties//lib/rails/configuration.rb#62
1646
- def swap(*_arg0, **_arg1, &_arg2); end
1647
-
1648
- # source://railties//lib/rails/configuration.rb#84
1649
- def unshift(*_arg0, **_arg1, &_arg2); end
1650
-
1651
- # source://railties//lib/rails/configuration.rb#66
1652
- def use(*_arg0, **_arg1, &_arg2); end
1653
-
1654
- protected
1655
-
1656
- # Returns the value of attribute delete_operations.
1657
- #
1658
- # source://railties//lib/rails/configuration.rb#101
1659
- def delete_operations; end
1660
-
1661
- # Returns the value of attribute operations.
1662
- #
1663
- # source://railties//lib/rails/configuration.rb#101
1664
- def operations; end
1665
- end
1666
-
1667
- # <tt>Rails::Engine</tt> allows you to wrap a specific Rails application or subset of
1668
- # functionality and share it with other applications or within a larger packaged application.
1669
- # Every Rails::Application is just an engine, which allows for simple
1670
- # feature and application sharing.
1671
- #
1672
- # Any <tt>Rails::Engine</tt> is also a Rails::Railtie, so the same
1673
- # methods (like <tt>rake_tasks</tt> and +generators+) and configuration
1674
- # options that are available in railties can also be used in engines.
1675
- #
1676
- # == Creating an Engine
1677
- #
1678
- # If you want a gem to behave as an engine, you have to specify an +Engine+
1679
- # for it somewhere inside your plugin's +lib+ folder (similar to how we
1680
- # specify a +Railtie+):
1681
- #
1682
- # # lib/my_engine.rb
1683
- # module MyEngine
1684
- # class Engine < Rails::Engine
1685
- # end
1686
- # end
1687
- #
1688
- # Then ensure that this file is loaded at the top of your <tt>config/application.rb</tt>
1689
- # (or in your +Gemfile+), and it will automatically load models, controllers, and helpers
1690
- # inside +app+, load routes at <tt>config/routes.rb</tt>, load locales at
1691
- # <tt>config/locales/**/*</tt>, and load tasks at <tt>lib/tasks/**/*</tt>.
1692
- #
1693
- # == Configuration
1694
- #
1695
- # Like railties, engines can access a config object which contains configuration shared by
1696
- # all railties and the application.
1697
- # Additionally, each engine can access <tt>autoload_paths</tt>, <tt>eager_load_paths</tt> and
1698
- # <tt>autoload_once_paths</tt> settings which are scoped to that engine.
1699
- #
1700
- # class MyEngine < Rails::Engine
1701
- # # Add a load path for this specific Engine
1702
- # config.autoload_paths << File.expand_path("lib/some/path", __dir__)
1703
- #
1704
- # initializer "my_engine.add_middleware" do |app|
1705
- # app.middleware.use MyEngine::Middleware
1706
- # end
1707
- # end
1708
- #
1709
- # == Generators
1710
- #
1711
- # You can set up generators for engines with <tt>config.generators</tt> method:
1712
- #
1713
- # class MyEngine < Rails::Engine
1714
- # config.generators do |g|
1715
- # g.orm :active_record
1716
- # g.template_engine :erb
1717
- # g.test_framework :test_unit
1718
- # end
1719
- # end
1720
- #
1721
- # You can also set generators for an application by using <tt>config.app_generators</tt>:
1722
- #
1723
- # class MyEngine < Rails::Engine
1724
- # # note that you can also pass block to app_generators in the same way you
1725
- # # can pass it to generators method
1726
- # config.app_generators.orm :datamapper
1727
- # end
1728
- #
1729
- # == Paths
1730
- #
1731
- # Applications and engines have flexible path configuration, meaning that you
1732
- # are not required to place your controllers at <tt>app/controllers</tt>, but
1733
- # in any place which you find convenient.
1734
- #
1735
- # For example, let's suppose you want to place your controllers in <tt>lib/controllers</tt>.
1736
- # You can set that as an option:
1737
- #
1738
- # class MyEngine < Rails::Engine
1739
- # paths["app/controllers"] = "lib/controllers"
1740
- # end
1741
- #
1742
- # You can also have your controllers loaded from both <tt>app/controllers</tt> and
1743
- # <tt>lib/controllers</tt>:
1744
- #
1745
- # class MyEngine < Rails::Engine
1746
- # paths["app/controllers"] << "lib/controllers"
1747
- # end
1748
- #
1749
- # The available paths in an engine are:
1750
- #
1751
- # class MyEngine < Rails::Engine
1752
- # paths["app"] # => ["app"]
1753
- # paths["app/controllers"] # => ["app/controllers"]
1754
- # paths["app/helpers"] # => ["app/helpers"]
1755
- # paths["app/models"] # => ["app/models"]
1756
- # paths["app/views"] # => ["app/views"]
1757
- # paths["lib"] # => ["lib"]
1758
- # paths["lib/tasks"] # => ["lib/tasks"]
1759
- # paths["config"] # => ["config"]
1760
- # paths["config/initializers"] # => ["config/initializers"]
1761
- # paths["config/locales"] # => ["config/locales"]
1762
- # paths["config/routes.rb"] # => ["config/routes.rb"]
1763
- # end
1764
- #
1765
- # The <tt>Application</tt> class adds a couple more paths to this set. And as in your
1766
- # <tt>Application</tt>, all folders under +app+ are automatically added to the load path.
1767
- # If you have an <tt>app/services</tt> folder for example, it will be added by default.
1768
- #
1769
- # == Endpoint
1770
- #
1771
- # An engine can also be a Rack application. It can be useful if you have a Rack application that
1772
- # you would like to provide with some of the +Engine+'s features.
1773
- #
1774
- # To do that, use the +endpoint+ method:
1775
- #
1776
- # module MyEngine
1777
- # class Engine < Rails::Engine
1778
- # endpoint MyRackApplication
1779
- # end
1780
- # end
1781
- #
1782
- # Now you can mount your engine in application's routes:
1783
- #
1784
- # Rails.application.routes.draw do
1785
- # mount MyEngine::Engine => "/engine"
1786
- # end
1787
- #
1788
- # == Middleware stack
1789
- #
1790
- # As an engine can now be a Rack endpoint, it can also have a middleware
1791
- # stack. The usage is exactly the same as in <tt>Application</tt>:
1792
- #
1793
- # module MyEngine
1794
- # class Engine < Rails::Engine
1795
- # middleware.use SomeMiddleware
1796
- # end
1797
- # end
1798
- #
1799
- # == Routes
1800
- #
1801
- # If you don't specify an endpoint, routes will be used as the default
1802
- # endpoint. You can use them just like you use an application's routes:
1803
- #
1804
- # # ENGINE/config/routes.rb
1805
- # MyEngine::Engine.routes.draw do
1806
- # get "/" => "posts#index"
1807
- # end
1808
- #
1809
- # == Mount priority
1810
- #
1811
- # Note that now there can be more than one router in your application, and it's better to avoid
1812
- # passing requests through many routers. Consider this situation:
1813
- #
1814
- # Rails.application.routes.draw do
1815
- # mount MyEngine::Engine => "/blog"
1816
- # get "/blog/omg" => "main#omg"
1817
- # end
1818
- #
1819
- # +MyEngine+ is mounted at <tt>/blog</tt>, and <tt>/blog/omg</tt> points to application's
1820
- # controller. In such a situation, requests to <tt>/blog/omg</tt> will go through +MyEngine+,
1821
- # and if there is no such route in +Engine+'s routes, it will be dispatched to <tt>main#omg</tt>.
1822
- # It's much better to swap that:
1823
- #
1824
- # Rails.application.routes.draw do
1825
- # get "/blog/omg" => "main#omg"
1826
- # mount MyEngine::Engine => "/blog"
1827
- # end
1828
- #
1829
- # Now, +Engine+ will get only requests that were not handled by +Application+.
1830
- #
1831
- # == Engine name
1832
- #
1833
- # There are some places where an Engine's name is used:
1834
- #
1835
- # * routes: when you mount an Engine with <tt>mount(MyEngine::Engine => '/my_engine')</tt>,
1836
- # it's used as default <tt>:as</tt> option
1837
- # * rake task for installing migrations <tt>my_engine:install:migrations</tt>
1838
- #
1839
- # Engine name is set by default based on class name. For <tt>MyEngine::Engine</tt> it will be
1840
- # <tt>my_engine_engine</tt>. You can change it manually using the <tt>engine_name</tt> method:
1841
- #
1842
- # module MyEngine
1843
- # class Engine < Rails::Engine
1844
- # engine_name "my_engine"
1845
- # end
1846
- # end
1847
- #
1848
- # == Isolated Engine
1849
- #
1850
- # Normally when you create controllers, helpers, and models inside an engine, they are treated
1851
- # as if they were created inside the application itself. This means that all helpers and
1852
- # named routes from the application will be available to your engine's controllers as well.
1853
- #
1854
- # However, sometimes you want to isolate your engine from the application, especially if your engine
1855
- # has its own router. To do that, you simply need to call +isolate_namespace+. This method requires
1856
- # you to pass a module where all your controllers, helpers, and models should be nested to:
1857
- #
1858
- # module MyEngine
1859
- # class Engine < Rails::Engine
1860
- # isolate_namespace MyEngine
1861
- # end
1862
- # end
1863
- #
1864
- # With such an engine, everything that is inside the +MyEngine+ module will be isolated from
1865
- # the application.
1866
- #
1867
- # Consider this controller:
1868
- #
1869
- # module MyEngine
1870
- # class FooController < ActionController::Base
1871
- # end
1872
- # end
1873
- #
1874
- # If the +MyEngine+ engine is marked as isolated, +FooController+ only has
1875
- # access to helpers from +MyEngine+, and <tt>url_helpers</tt> from
1876
- # <tt>MyEngine::Engine.routes</tt>.
1877
- #
1878
- # The next thing that changes in isolated engines is the behavior of routes.
1879
- # Normally, when you namespace your controllers, you also need to namespace
1880
- # the related routes. With an isolated engine, the engine's namespace is
1881
- # automatically applied, so you don't need to specify it explicitly in your
1882
- # routes:
1883
- #
1884
- # MyEngine::Engine.routes.draw do
1885
- # resources :articles
1886
- # end
1887
- #
1888
- # If +MyEngine+ is isolated, the routes above will point to
1889
- # <tt>MyEngine::ArticlesController</tt>. You also don't need to use longer
1890
- # URL helpers like +my_engine_articles_path+. Instead, you should simply use
1891
- # +articles_path+, like you would do with your main application.
1892
- #
1893
- # To make this behavior consistent with other parts of the framework,
1894
- # isolated engines also have an effect on ActiveModel::Naming. In a
1895
- # normal Rails app, when you use a namespaced model such as
1896
- # <tt>Namespace::Article</tt>, ActiveModel::Naming will generate
1897
- # names with the prefix "namespace". In an isolated engine, the prefix will
1898
- # be omitted in URL helpers and form fields, for convenience.
1899
- #
1900
- # polymorphic_url(MyEngine::Article.new)
1901
- # # => "articles_path" # not "my_engine_articles_path"
1902
- #
1903
- # form_for(MyEngine::Article.new) do
1904
- # text_field :title # => <input type="text" name="article[title]" id="article_title" />
1905
- # end
1906
- #
1907
- # Additionally, an isolated engine will set its own name according to its
1908
- # namespace, so <tt>MyEngine::Engine.engine_name</tt> will return
1909
- # "my_engine". It will also set +MyEngine.table_name_prefix+ to "my_engine_",
1910
- # meaning for example that <tt>MyEngine::Article</tt> will use the
1911
- # +my_engine_articles+ database table by default.
1912
- #
1913
- # == Using Engine's routes outside Engine
1914
- #
1915
- # Since you can now mount an engine inside application's routes, you do not have direct access to +Engine+'s
1916
- # <tt>url_helpers</tt> inside +Application+. When you mount an engine in an application's routes, a special helper is
1917
- # created to allow you to do that. Consider such a scenario:
1918
- #
1919
- # # config/routes.rb
1920
- # Rails.application.routes.draw do
1921
- # mount MyEngine::Engine => "/my_engine", as: "my_engine"
1922
- # get "/foo" => "foo#index"
1923
- # end
1924
- #
1925
- # Now, you can use the <tt>my_engine</tt> helper inside your application:
1926
- #
1927
- # class FooController < ApplicationController
1928
- # def index
1929
- # my_engine.root_url # => /my_engine/
1930
- # end
1931
- # end
1932
- #
1933
- # There is also a <tt>main_app</tt> helper that gives you access to application's routes inside Engine:
1934
- #
1935
- # module MyEngine
1936
- # class BarController
1937
- # def index
1938
- # main_app.foo_path # => /foo
1939
- # end
1940
- # end
1941
- # end
1942
- #
1943
- # Note that the <tt>:as</tt> option given to mount takes the <tt>engine_name</tt> as default, so most of the time
1944
- # you can simply omit it.
1945
- #
1946
- # Finally, if you want to generate a URL to an engine's route using
1947
- # <tt>polymorphic_url</tt>, you also need to pass the engine helper. Let's
1948
- # say that you want to create a form pointing to one of the engine's routes.
1949
- # All you need to do is pass the helper as the first element in array with
1950
- # attributes for URL:
1951
- #
1952
- # form_for([my_engine, @user])
1953
- #
1954
- # This code will use <tt>my_engine.user_path(@user)</tt> to generate the proper route.
1955
- #
1956
- # == Isolated engine's helpers
1957
- #
1958
- # Sometimes you may want to isolate engine, but use helpers that are defined for it.
1959
- # If you want to share just a few specific helpers you can add them to application's
1960
- # helpers in ApplicationController:
1961
- #
1962
- # class ApplicationController < ActionController::Base
1963
- # helper MyEngine::SharedEngineHelper
1964
- # end
1965
- #
1966
- # If you want to include all of the engine's helpers, you can use the #helper method on an engine's
1967
- # instance:
1968
- #
1969
- # class ApplicationController < ActionController::Base
1970
- # helper MyEngine::Engine.helpers
1971
- # end
1972
- #
1973
- # It will include all of the helpers from engine's directory. Take into account this does
1974
- # not include helpers defined in controllers with helper_method or other similar solutions,
1975
- # only helpers defined in the helpers directory will be included.
1976
- #
1977
- # == Migrations & seed data
1978
- #
1979
- # Engines can have their own migrations. The default path for migrations is exactly the same
1980
- # as in application: <tt>db/migrate</tt>
1981
- #
1982
- # To use engine's migrations in application you can use the rake task below, which copies them to
1983
- # application's dir:
1984
- #
1985
- # rake ENGINE_NAME:install:migrations
1986
- #
1987
- # Note that some of the migrations may be skipped if a migration with the same name already exists
1988
- # in application. In such a situation you must decide whether to leave that migration or rename the
1989
- # migration in the application and rerun copying migrations.
1990
- #
1991
- # If your engine has migrations, you may also want to prepare data for the database in
1992
- # the <tt>db/seeds.rb</tt> file. You can load that data using the <tt>load_seed</tt> method, e.g.
1993
- #
1994
- # MyEngine::Engine.load_seed
1995
- #
1996
- # == Loading priority
1997
- #
1998
- # In order to change engine's priority you can use +config.railties_order+ in the main application.
1999
- # It will affect the priority of loading views, helpers, assets, and all the other files
2000
- # related to engine or application.
2001
- #
2002
- # # load Blog::Engine with highest priority, followed by application and other railties
2003
- # config.railties_order = [Blog::Engine, :main_app, :all]
2004
- #
2005
- # source://railties//lib/rails/engine/railties.rb#4
2006
- class Rails::Engine < ::Rails::Railtie
2007
- include ::ActiveSupport::Callbacks
2008
- extend ::ActiveSupport::Callbacks::ClassMethods
2009
-
2010
- # @return [Engine] a new instance of Engine
2011
- #
2012
- # source://railties//lib/rails/engine.rb#432
2013
- def initialize; end
2014
-
2015
- # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#68
2016
- def __callbacks; end
2017
-
2018
- # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#68
2019
- def __callbacks?; end
2020
-
2021
- # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#940
2022
- def _load_seed_callbacks; end
2023
-
2024
- # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#928
2025
- def _run_load_seed_callbacks(&block); end
2026
-
2027
- # Returns the underlying Rack application for this engine.
2028
- #
2029
- # source://railties//lib/rails/engine.rb#511
2030
- def app; end
2031
-
2032
- # Define the Rack API for this engine.
2033
- #
2034
- # source://railties//lib/rails/engine.rb#528
2035
- def call(env); end
2036
-
2037
- # Define the configuration object for the engine.
2038
- #
2039
- # source://railties//lib/rails/engine.rb#547
2040
- def config; end
2041
-
2042
- # source://railties//lib/rails/engine.rb#484
2043
- def eager_load!; end
2044
-
2045
- # Returns the endpoint for this engine. If none is registered,
2046
- # defaults to an ActionDispatch::Routing::RouteSet.
2047
- #
2048
- # source://railties//lib/rails/engine.rb#523
2049
- def endpoint; end
2050
-
2051
- # source://railties//lib/rails/engine.rb#430
2052
- def engine_name(*_arg0, **_arg1, &_arg2); end
2053
-
2054
- # Defines additional Rack env configuration that is added on each call.
2055
- #
2056
- # source://railties//lib/rails/engine.rb#534
2057
- def env_config; end
2058
-
2059
- # Returns a module with all the helpers defined for the engine.
2060
- #
2061
- # source://railties//lib/rails/engine.rb#494
2062
- def helpers; end
2063
-
2064
- # Returns all registered helpers paths.
2065
- #
2066
- # source://railties//lib/rails/engine.rb#506
2067
- def helpers_paths; end
2068
-
2069
- # source://railties//lib/rails/engine.rb#430
2070
- def isolated?(*_arg0, **_arg1, &_arg2); end
2071
-
2072
- # Load console and invoke the registered hooks.
2073
- # Check Rails::Railtie.console for more info.
2074
- #
2075
- # source://railties//lib/rails/engine.rb#446
2076
- def load_console(app = T.unsafe(nil)); end
2077
-
2078
- # Load Rails generators and invoke the registered hooks.
2079
- # Check Rails::Railtie.generators for more info.
2080
- #
2081
- # source://railties//lib/rails/engine.rb#470
2082
- def load_generators(app = T.unsafe(nil)); end
2083
-
2084
- # Load Rails runner and invoke the registered hooks.
2085
- # Check Rails::Railtie.runner for more info.
2086
- #
2087
- # source://railties//lib/rails/engine.rb#455
2088
- def load_runner(app = T.unsafe(nil)); end
2089
-
2090
- # Load data from db/seeds.rb file. It can be used in to load engines'
2091
- # seeds, e.g.:
2092
- #
2093
- # Blog::Engine.load_seed
2094
- #
2095
- # source://railties//lib/rails/engine.rb#555
2096
- def load_seed; end
2097
-
2098
- # Invoke the server registered hooks.
2099
- # Check Rails::Railtie.server for more info.
2100
- #
2101
- # source://railties//lib/rails/engine.rb#479
2102
- def load_server(app = T.unsafe(nil)); end
2103
-
2104
- # Load Rake and railties tasks, and invoke the registered hooks.
2105
- # Check Rails::Railtie.rake_tasks for more info.
2106
- #
2107
- # source://railties//lib/rails/engine.rb#462
2108
- def load_tasks(app = T.unsafe(nil)); end
2109
-
2110
- # source://railties//lib/rails/engine.rb#429
2111
- def middleware(*_arg0, **_arg1, &_arg2); end
2112
-
2113
- # source://railties//lib/rails/engine.rb#429
2114
- def paths(*_arg0, **_arg1, &_arg2); end
2115
-
2116
- # source://railties//lib/rails/engine.rb#489
2117
- def railties; end
2118
-
2119
- # source://railties//lib/rails/engine.rb#429
2120
- def root(*_arg0, **_arg1, &_arg2); end
2121
-
2122
- # Defines the routes for this engine. If a block is given to
2123
- # routes, it is appended to the engine.
2124
- #
2125
- # source://railties//lib/rails/engine.rb#540
2126
- def routes(&block); end
2127
-
2128
- # @return [Boolean]
2129
- #
2130
- # source://railties//lib/rails/engine.rb#654
2131
- def routes?; end
2132
-
2133
- protected
2134
-
2135
- # source://railties//lib/rails/engine.rb#659
2136
- def run_tasks_blocks(*_arg0); end
2137
-
2138
- private
2139
-
2140
- # source://railties//lib/rails/engine.rb#691
2141
- def _all_autoload_once_paths; end
2142
-
2143
- # source://railties//lib/rails/engine.rb#695
2144
- def _all_autoload_paths; end
2145
-
2146
- # source://railties//lib/rails/engine.rb#704
2147
- def _all_load_paths(add_autoload_paths_to_load_path); end
2148
-
2149
- # source://railties//lib/rails/engine.rb#723
2150
- def build_middleware; end
2151
-
2152
- # source://railties//lib/rails/engine.rb#715
2153
- def build_request(env); end
2154
-
2155
- # source://railties//lib/rails/engine.rb#687
2156
- def default_middleware_stack; end
2157
-
2158
- # @return [Boolean]
2159
- #
2160
- # source://railties//lib/rails/engine.rb#671
2161
- def has_migrations?; end
2162
-
2163
- # source://railties//lib/rails/engine.rb#665
2164
- def load_config_initializer(initializer); end
2165
-
2166
- class << self
2167
- # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#68
2168
- def __callbacks; end
2169
-
2170
- # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#68
2171
- def __callbacks=(value); end
2172
-
2173
- # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#68
2174
- def __callbacks?; end
2175
-
2176
- # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#932
2177
- def _load_seed_callbacks; end
2178
-
2179
- # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#936
2180
- def _load_seed_callbacks=(value); end
2181
-
2182
- # Returns the value of attribute called_from.
2183
- #
2184
- # source://railties//lib/rails/engine.rb#353
2185
- def called_from; end
2186
-
2187
- # Sets the attribute called_from
2188
- #
2189
- # @param value the value to set the attribute called_from to.
2190
- #
2191
- # source://railties//lib/rails/engine.rb#353
2192
- def called_from=(_arg0); end
2193
-
2194
- # source://railties//lib/rails/engine.rb#358
2195
- def eager_load!(*_arg0, **_arg1, &_arg2); end
2196
-
2197
- # source://railties//lib/rails/engine.rb#378
2198
- def endpoint(endpoint = T.unsafe(nil)); end
2199
-
2200
- # source://railties//lib/rails/railtie.rb#176
2201
- def engine_name(name = T.unsafe(nil)); end
2202
-
2203
- # Finds engine with given path.
2204
- #
2205
- # source://railties//lib/rails/engine.rb#416
2206
- def find(path); end
2207
-
2208
- # source://railties//lib/rails/engine.rb#374
2209
- def find_root(from); end
2210
-
2211
- # source://railties//lib/rails/engine.rb#675
2212
- def find_root_with_flag(flag, root_path, default = T.unsafe(nil)); end
2213
-
2214
- # @private
2215
- #
2216
- # source://railties//lib/rails/engine.rb#360
2217
- def inherited(base); end
2218
-
2219
- # source://railties//lib/rails/engine.rb#384
2220
- def isolate_namespace(mod); end
2221
-
2222
- # Returns the value of attribute isolated.
2223
- #
2224
- # source://railties//lib/rails/engine.rb#353
2225
- def isolated; end
2226
-
2227
- # Sets the attribute isolated
2228
- #
2229
- # @param value the value to set the attribute isolated to.
2230
- #
2231
- # source://railties//lib/rails/engine.rb#353
2232
- def isolated=(_arg0); end
2233
-
2234
- # Returns the value of attribute isolated.
2235
- #
2236
- # source://railties//lib/rails/engine.rb#353
2237
- def isolated?; end
2238
- end
2239
- end
2240
-
2241
- # source://railties//lib/rails/engine/configuration.rb#7
2242
- class Rails::Engine::Configuration < ::Rails::Railtie::Configuration
2243
- # @return [Configuration] a new instance of Configuration
2244
- #
2245
- # source://railties//lib/rails/engine/configuration.rb#12
2246
- def initialize(root = T.unsafe(nil)); end
2247
-
2248
- # source://railties//lib/rails/engine/configuration.rb#83
2249
- def autoload_once_paths; end
2250
-
2251
- # Sets the attribute autoload_once_paths
2252
- #
2253
- # @param value the value to set the attribute autoload_once_paths to.
2254
- #
2255
- # source://railties//lib/rails/engine/configuration.rb#10
2256
- def autoload_once_paths=(_arg0); end
2257
-
2258
- # source://railties//lib/rails/engine/configuration.rb#87
2259
- def autoload_paths; end
2260
-
2261
- # Sets the attribute autoload_paths
2262
- #
2263
- # @param value the value to set the attribute autoload_paths to.
2264
- #
2265
- # source://railties//lib/rails/engine/configuration.rb#10
2266
- def autoload_paths=(_arg0); end
2267
-
2268
- # source://railties//lib/rails/engine/configuration.rb#79
2269
- def eager_load_paths; end
2270
-
2271
- # Sets the attribute eager_load_paths
2272
- #
2273
- # @param value the value to set the attribute eager_load_paths to.
2274
- #
2275
- # source://railties//lib/rails/engine/configuration.rb#10
2276
- def eager_load_paths=(_arg0); end
2277
-
2278
- # Holds generators configuration:
2279
- #
2280
- # config.generators do |g|
2281
- # g.orm :data_mapper, migration: true
2282
- # g.template_engine :haml
2283
- # g.test_framework :rspec
2284
- # end
2285
- #
2286
- # If you want to disable color in console, do:
2287
- #
2288
- # config.generators.colorize_logging = false
2289
- #
2290
- # @yield [@generators]
2291
- #
2292
- # source://railties//lib/rails/engine/configuration.rb#32
2293
- def generators; end
2294
-
2295
- # Returns the value of attribute javascript_path.
2296
- #
2297
- # source://railties//lib/rails/engine/configuration.rb#9
2298
- def javascript_path; end
2299
-
2300
- # Sets the attribute javascript_path
2301
- #
2302
- # @param value the value to set the attribute javascript_path to.
2303
- #
2304
- # source://railties//lib/rails/engine/configuration.rb#9
2305
- def javascript_path=(_arg0); end
2306
-
2307
- # Returns the value of attribute middleware.
2308
- #
2309
- # source://railties//lib/rails/engine/configuration.rb#9
2310
- def middleware; end
2311
-
2312
- # Sets the attribute middleware
2313
- #
2314
- # @param value the value to set the attribute middleware to.
2315
- #
2316
- # source://railties//lib/rails/engine/configuration.rb#9
2317
- def middleware=(_arg0); end
2318
-
2319
- # source://railties//lib/rails/engine/configuration.rb#38
2320
- def paths; end
2321
-
2322
- # Returns the value of attribute root.
2323
- #
2324
- # source://railties//lib/rails/engine/configuration.rb#8
2325
- def root; end
2326
-
2327
- # source://railties//lib/rails/engine/configuration.rb#75
2328
- def root=(value); end
2329
- end
2330
-
2331
- # source://railties//lib/rails/engine/railties.rb#5
2332
- class Rails::Engine::Railties
2333
- include ::Enumerable
2334
-
2335
- # @return [Railties] a new instance of Railties
2336
- #
2337
- # source://railties//lib/rails/engine/railties.rb#9
2338
- def initialize; end
2339
-
2340
- # source://railties//lib/rails/engine/railties.rb#18
2341
- def -(others); end
2342
-
2343
- # Returns the value of attribute _all.
2344
- #
2345
- # source://railties//lib/rails/engine/railties.rb#7
2346
- def _all; end
2347
-
2348
- # source://railties//lib/rails/engine/railties.rb#14
2349
- def each(*args, &block); end
2350
- end
2351
-
2352
- # This module helps build the runtime properties that are displayed in
2353
- # Rails::InfoController responses. These include the active Rails version,
2354
- # Ruby version, Rack version, and so on.
2355
- #
2356
- # source://railties//lib/rails/info.rb#9
2357
- module Rails::Info
2358
- # source://railties//lib/rails/info.rb#10
2359
- def properties; end
2360
-
2361
- # source://railties//lib/rails/info.rb#10
2362
- def properties=(val); end
2363
-
2364
- class << self
2365
- # source://railties//lib/rails/info.rb#31
2366
- def inspect; end
2367
-
2368
- # source://railties//lib/rails/info.rb#10
2369
- def properties; end
2370
-
2371
- # source://railties//lib/rails/info.rb#10
2372
- def properties=(val); end
2373
-
2374
- # source://railties//lib/rails/info.rb#25
2375
- def property(name, value = T.unsafe(nil)); end
2376
-
2377
- # source://railties//lib/rails/info.rb#43
2378
- def to_html; end
2379
-
2380
- # source://railties//lib/rails/info.rb#31
2381
- def to_s; end
2382
- end
2383
- end
2384
-
2385
- # source://railties//lib/rails/info_controller.rb#6
2386
- class Rails::InfoController < ::Rails::ApplicationController
2387
- # source://railties//lib/rails/info_controller.rb#12
2388
- def index; end
2389
-
2390
- # source://railties//lib/rails/info_controller.rb#16
2391
- def properties; end
2392
-
2393
- # source://railties//lib/rails/info_controller.rb#21
2394
- def routes; end
2395
-
2396
- private
2397
-
2398
- # source://actionview/7.0.8.7/lib/action_view/layouts.rb#328
2399
- def _layout(lookup_context, formats); end
2400
-
2401
- # source://railties//lib/rails/info_controller.rb#8
2402
- def _layout_from_proc; end
2403
-
2404
- # source://railties//lib/rails/info_controller.rb#36
2405
- def match_route; end
2406
-
2407
- # source://railties//lib/rails/info_controller.rb#40
2408
- def with_leading_slash(path); end
2409
-
2410
- class << self
2411
- # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#68
2412
- def __callbacks; end
2413
-
2414
- # source://actionview/7.0.8.7/lib/action_view/layouts.rb#209
2415
- def _layout; end
2416
-
2417
- # source://actionview/7.0.8.7/lib/action_view/layouts.rb#210
2418
- def _layout_conditions; end
2419
-
2420
- # source://actionpack/7.0.8.7/lib/action_controller/metal.rb#210
2421
- def middleware_stack; end
2422
- end
2423
- end
2424
-
2425
- # source://railties//lib/rails/initializable.rb#6
2426
- module Rails::Initializable
2427
- mixes_in_class_methods ::Rails::Initializable::ClassMethods
2428
-
2429
- # source://railties//lib/rails/initializable.rb#66
2430
- def initializers; end
2431
-
2432
- # source://railties//lib/rails/initializable.rb#58
2433
- def run_initializers(group = T.unsafe(nil), *args); end
2434
-
2435
- class << self
2436
- # source://railties//lib/rails/initializable.rb#7
2437
- def included(base); end
2438
- end
2439
- end
2440
-
2441
- # source://railties//lib/rails/initializable.rb#70
2442
- module Rails::Initializable::ClassMethods
2443
- # @raise [ArgumentError]
2444
- #
2445
- # source://railties//lib/rails/initializable.rb#88
2446
- def initializer(name, opts = T.unsafe(nil), &blk); end
2447
-
2448
- # source://railties//lib/rails/initializable.rb#71
2449
- def initializers; end
2450
-
2451
- # source://railties//lib/rails/initializable.rb#75
2452
- def initializers_chain; end
2453
-
2454
- # source://railties//lib/rails/initializable.rb#84
2455
- def initializers_for(binding); end
2456
- end
2457
-
2458
- # source://railties//lib/rails/initializable.rb#45
2459
- class Rails::Initializable::Collection < ::Array
2460
- include ::TSort
2461
-
2462
- # source://railties//lib/rails/initializable.rb#53
2463
- def +(other); end
2464
-
2465
- # source://railties//lib/rails/initializable.rb#49
2466
- def tsort_each_child(initializer, &block); end
2467
-
2468
- def tsort_each_node; end
2469
- end
2470
-
2471
- # source://railties//lib/rails/initializable.rb#11
2472
- class Rails::Initializable::Initializer
2473
- # @return [Initializer] a new instance of Initializer
2474
- #
2475
- # source://railties//lib/rails/initializable.rb#14
2476
- def initialize(name, context, options, &block); end
2477
-
2478
- # source://railties//lib/rails/initializable.rb#23
2479
- def after; end
2480
-
2481
- # source://railties//lib/rails/initializable.rb#19
2482
- def before; end
2483
-
2484
- # @return [Boolean]
2485
- #
2486
- # source://railties//lib/rails/initializable.rb#27
2487
- def belongs_to?(group); end
2488
-
2489
- # source://railties//lib/rails/initializable.rb#35
2490
- def bind(context); end
2491
-
2492
- # Returns the value of attribute block.
2493
- #
2494
- # source://railties//lib/rails/initializable.rb#12
2495
- def block; end
2496
-
2497
- # source://railties//lib/rails/initializable.rb#40
2498
- def context_class; end
2499
-
2500
- # Returns the value of attribute name.
2501
- #
2502
- # source://railties//lib/rails/initializable.rb#12
2503
- def name; end
2504
-
2505
- # source://railties//lib/rails/initializable.rb#31
2506
- def run(*args); end
2507
- end
2508
-
2509
- # source://railties//lib/rails/test_unit/line_filtering.rb#6
2510
- module Rails::LineFiltering
2511
- # source://railties//lib/rails/test_unit/line_filtering.rb#7
2512
- def run(reporter, options = T.unsafe(nil)); end
2513
- end
2514
-
2515
- # source://railties//lib/rails/mailers_controller.rb#5
2516
- class Rails::MailersController < ::Rails::ApplicationController
2517
- # source://railties//lib/rails/mailers_controller.rb#16
2518
- def index; end
2519
-
2520
- # source://railties//lib/rails/mailers_controller.rb#21
2521
- def preview; end
2522
-
2523
- private
2524
-
2525
- # source://actionview/7.0.8.7/lib/action_view/layouts.rb#328
2526
- def _layout(lookup_context, formats); end
2527
-
2528
- # source://railties//lib/rails/mailers_controller.rb#80
2529
- def find_part(format); end
2530
-
2531
- # source://railties//lib/rails/mailers_controller.rb#68
2532
- def find_preferred_part(*formats); end
2533
-
2534
- # source://railties//lib/rails/mailers_controller.rb#56
2535
- def find_preview; end
2536
-
2537
- # source://railties//lib/rails/mailers_controller.rb#92
2538
- def locale_query(locale); end
2539
-
2540
- # source://railties//lib/rails/mailers_controller.rb#88
2541
- def part_query(mime_type); end
2542
-
2543
- # source://railties//lib/rails/mailers_controller.rb#96
2544
- def set_locale(&block); end
2545
-
2546
- # @return [Boolean]
2547
- #
2548
- # source://railties//lib/rails/mailers_controller.rb#52
2549
- def show_previews?; end
2550
-
2551
- class << self
2552
- # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#68
2553
- def __callbacks; end
2554
-
2555
- # source://actionpack/7.0.8.7/lib/abstract_controller/helpers.rb#11
2556
- def _helper_methods; end
2557
-
2558
- # source://actionpack/7.0.8.7/lib/action_controller/metal.rb#210
2559
- def middleware_stack; end
2560
- end
2561
- end
2562
-
2563
- # source://railties//lib/rails/mailers_controller.rb#0
2564
- module Rails::MailersController::HelperMethods
2565
- include ::ActionController::Base::HelperMethods
2566
-
2567
- # source://railties//lib/rails/mailers_controller.rb#12
2568
- def locale_query(*args, **_arg1, &block); end
2569
-
2570
- # source://railties//lib/rails/mailers_controller.rb#12
2571
- def part_query(*args, **_arg1, &block); end
2572
- end
2573
-
2574
- # source://railties//lib/rails/paths.rb#6
2575
- module Rails::Paths; end
2576
-
2577
- # source://railties//lib/rails/paths.rb#111
2578
- class Rails::Paths::Path
2579
- include ::Enumerable
2580
-
2581
- # @return [Path] a new instance of Path
2582
- #
2583
- # source://railties//lib/rails/paths.rb#116
2584
- def initialize(root, current, paths, options = T.unsafe(nil)); end
2585
-
2586
- # source://railties//lib/rails/paths.rb#168
2587
- def <<(path); end
2588
-
2589
- # source://railties//lib/rails/paths.rb#129
2590
- def absolute_current; end
2591
-
2592
- # source://railties//lib/rails/paths.rb#150
2593
- def autoload!; end
2594
-
2595
- # source://railties//lib/rails/paths.rb#158
2596
- def autoload?; end
2597
-
2598
- # source://railties//lib/rails/paths.rb#150
2599
- def autoload_once!; end
2600
-
2601
- # source://railties//lib/rails/paths.rb#158
2602
- def autoload_once?; end
2603
-
2604
- # source://railties//lib/rails/paths.rb#133
2605
- def children; end
2606
-
2607
- # source://railties//lib/rails/paths.rb#173
2608
- def concat(paths); end
2609
-
2610
- # source://railties//lib/rails/paths.rb#164
2611
- def each(&block); end
2612
-
2613
- # source://railties//lib/rails/paths.rb#150
2614
- def eager_load!; end
2615
-
2616
- # source://railties//lib/rails/paths.rb#158
2617
- def eager_load?; end
2618
-
2619
- # Returns all expanded paths but only if they exist in the filesystem.
2620
- #
2621
- # source://railties//lib/rails/paths.rb#217
2622
- def existent; end
2623
-
2624
- # source://railties//lib/rails/paths.rb#228
2625
- def existent_directories; end
2626
-
2627
- # Expands all paths against the root and return all unique values.
2628
- #
2629
- # source://railties//lib/rails/paths.rb#198
2630
- def expanded; end
2631
-
2632
- # source://railties//lib/rails/paths.rb#193
2633
- def extensions; end
2634
-
2635
- # source://railties//lib/rails/paths.rb#140
2636
- def first; end
2637
-
2638
- # Returns the value of attribute glob.
2639
- #
2640
- # source://railties//lib/rails/paths.rb#114
2641
- def glob; end
2642
-
2643
- # Sets the attribute glob
2644
- #
2645
- # @param value the value to set the attribute glob to.
2646
- #
2647
- # source://railties//lib/rails/paths.rb#114
2648
- def glob=(_arg0); end
2649
-
2650
- # source://railties//lib/rails/paths.rb#144
2651
- def last; end
2652
-
2653
- # source://railties//lib/rails/paths.rb#150
2654
- def load_path!; end
2655
-
2656
- # source://railties//lib/rails/paths.rb#158
2657
- def load_path?; end
2658
-
2659
- # source://railties//lib/rails/paths.rb#185
2660
- def paths; end
2661
-
2662
- # source://railties//lib/rails/paths.rb#168
2663
- def push(path); end
2664
-
2665
- # source://railties//lib/rails/paths.rb#154
2666
- def skip_autoload!; end
2667
-
2668
- # source://railties//lib/rails/paths.rb#154
2669
- def skip_autoload_once!; end
2670
-
2671
- # source://railties//lib/rails/paths.rb#154
2672
- def skip_eager_load!; end
2673
-
2674
- # source://railties//lib/rails/paths.rb#154
2675
- def skip_load_path!; end
2676
-
2677
- # Expands all paths against the root and return all unique values.
2678
- #
2679
- # source://railties//lib/rails/paths.rb#198
2680
- def to_a; end
2681
-
2682
- # source://railties//lib/rails/paths.rb#181
2683
- def to_ary; end
2684
-
2685
- # source://railties//lib/rails/paths.rb#177
2686
- def unshift(*paths); end
2687
-
2688
- private
2689
-
2690
- # source://railties//lib/rails/paths.rb#235
2691
- def files_in(path); end
2692
- end
2693
-
2694
- # This object is an extended hash that behaves as root of the <tt>Rails::Paths</tt> system.
2695
- # It allows you to collect information about how you want to structure your application
2696
- # paths through a Hash-like API. It requires you to give a physical path on initialization.
2697
- #
2698
- # root = Root.new "/rails"
2699
- # root.add "app/controllers", eager_load: true
2700
- #
2701
- # The above command creates a new root object and adds "app/controllers" as a path.
2702
- # This means we can get a Rails::Paths::Path object back like below:
2703
- #
2704
- # path = root["app/controllers"]
2705
- # path.eager_load? # => true
2706
- # path.is_a?(Rails::Paths::Path) # => true
2707
- #
2708
- # The +Path+ object is simply an enumerable and allows you to easily add extra paths:
2709
- #
2710
- # path.is_a?(Enumerable) # => true
2711
- # path.to_ary.inspect # => ["app/controllers"]
2712
- #
2713
- # path << "lib/controllers"
2714
- # path.to_ary.inspect # => ["app/controllers", "lib/controllers"]
2715
- #
2716
- # Notice that when you add a path using +add+, the path object created already
2717
- # contains the path with the same path value given to +add+. In some situations,
2718
- # you may not want this behavior, so you can give <tt>:with</tt> as option.
2719
- #
2720
- # root.add "config/routes", with: "config/routes.rb"
2721
- # root["config/routes"].inspect # => ["config/routes.rb"]
2722
- #
2723
- # The +add+ method accepts the following options as arguments:
2724
- # eager_load, autoload, autoload_once, and glob.
2725
- #
2726
- # Finally, the +Path+ object also provides a few helpers:
2727
- #
2728
- # root = Root.new "/rails"
2729
- # root.add "app/controllers"
2730
- #
2731
- # root["app/controllers"].expanded # => ["/rails/app/controllers"]
2732
- # root["app/controllers"].existent # => ["/rails/app/controllers"]
2733
- #
2734
- # Check the <tt>Rails::Paths::Path</tt> documentation for more information.
2735
- #
2736
- # source://railties//lib/rails/paths.rb#48
2737
- class Rails::Paths::Root
2738
- # @return [Root] a new instance of Root
2739
- #
2740
- # source://railties//lib/rails/paths.rb#51
2741
- def initialize(path); end
2742
-
2743
- # source://railties//lib/rails/paths.rb#66
2744
- def [](path); end
2745
-
2746
- # source://railties//lib/rails/paths.rb#56
2747
- def []=(path, value); end
2748
-
2749
- # source://railties//lib/rails/paths.rb#61
2750
- def add(path, options = T.unsafe(nil)); end
2751
-
2752
- # source://railties//lib/rails/paths.rb#82
2753
- def all_paths; end
2754
-
2755
- # source://railties//lib/rails/paths.rb#86
2756
- def autoload_once; end
2757
-
2758
- # source://railties//lib/rails/paths.rb#94
2759
- def autoload_paths; end
2760
-
2761
- # source://railties//lib/rails/paths.rb#90
2762
- def eager_load; end
2763
-
2764
- # source://railties//lib/rails/paths.rb#74
2765
- def keys; end
2766
-
2767
- # source://railties//lib/rails/paths.rb#98
2768
- def load_paths; end
2769
-
2770
- # Returns the value of attribute path.
2771
- #
2772
- # source://railties//lib/rails/paths.rb#49
2773
- def path; end
2774
-
2775
- # Sets the attribute path
2776
- #
2777
- # @param value the value to set the attribute path to.
2778
- #
2779
- # source://railties//lib/rails/paths.rb#49
2780
- def path=(_arg0); end
2781
-
2782
- # source://railties//lib/rails/paths.rb#70
2783
- def values; end
2784
-
2785
- # source://railties//lib/rails/paths.rb#78
2786
- def values_at(*list); end
2787
-
2788
- private
2789
-
2790
- # source://railties//lib/rails/paths.rb#103
2791
- def filter_by(&block); end
2792
- end
2793
-
2794
- # source://railties//lib/rails/rack.rb#4
2795
- module Rails::Rack; end
2796
-
2797
- # Sets log tags, logs the request, calls the app, and flushes the logs.
2798
- #
2799
- # Log tags (+taggers+) can be an Array containing: methods that the +request+
2800
- # object responds to, objects that respond to +to_s+ or Proc objects that accept
2801
- # an instance of the +request+ object.
2802
- #
2803
- # source://railties//lib/rails/rack/logger.rb#15
2804
- class Rails::Rack::Logger < ::ActiveSupport::LogSubscriber
2805
- # @return [Logger] a new instance of Logger
2806
- #
2807
- # source://railties//lib/rails/rack/logger.rb#16
2808
- def initialize(app, taggers = T.unsafe(nil)); end
2809
-
2810
- # source://railties//lib/rails/rack/logger.rb#21
2811
- def call(env); end
2812
-
2813
- private
2814
-
2815
- # source://railties//lib/rails/rack/logger.rb#32
2816
- def call_app(request, env); end
2817
-
2818
- # source://railties//lib/rails/rack/logger.rb#59
2819
- def compute_tags(request); end
2820
-
2821
- # source://railties//lib/rails/rack/logger.rb#72
2822
- def logger; end
2823
-
2824
- # Started GET "/session/new" for 127.0.0.1 at 2012-09-26 14:51:42 -0700
2825
- #
2826
- # source://railties//lib/rails/rack/logger.rb#51
2827
- def started_request_message(request); end
2828
- end
2829
-
2830
- # <tt>Rails::Railtie</tt> is the core of the Rails framework and provides
2831
- # several hooks to extend Rails and/or modify the initialization process.
2832
- #
2833
- # Every major component of Rails (Action Mailer, Action Controller, Active
2834
- # Record, etc.) implements a railtie. Each of them is responsible for their
2835
- # own initialization. This makes Rails itself absent of any component hooks,
2836
- # allowing other components to be used in place of any of the Rails defaults.
2837
- #
2838
- # Developing a Rails extension does _not_ require implementing a railtie, but
2839
- # if you need to interact with the Rails framework during or after boot, then
2840
- # a railtie is needed.
2841
- #
2842
- # For example, an extension doing any of the following would need a railtie:
2843
- #
2844
- # * creating initializers
2845
- # * configuring a Rails framework for the application, like setting a generator
2846
- # * adding <tt>config.*</tt> keys to the environment
2847
- # * setting up a subscriber with ActiveSupport::Notifications
2848
- # * adding Rake tasks
2849
- #
2850
- # == Creating a Railtie
2851
- #
2852
- # To extend Rails using a railtie, create a subclass of <tt>Rails::Railtie</tt>.
2853
- # This class must be loaded during the Rails boot process, and is conventionally
2854
- # called <tt>MyNamespace::Railtie</tt>.
2855
- #
2856
- # The following example demonstrates an extension which can be used with or
2857
- # without Rails.
2858
- #
2859
- # # lib/my_gem/railtie.rb
2860
- # module MyGem
2861
- # class Railtie < Rails::Railtie
2862
- # end
2863
- # end
2864
- #
2865
- # # lib/my_gem.rb
2866
- # require "my_gem/railtie" if defined?(Rails::Railtie)
2867
- #
2868
- # == Initializers
2869
- #
2870
- # To add an initialization step to the Rails boot process from your railtie, just
2871
- # define the initialization code with the +initializer+ macro:
2872
- #
2873
- # class MyRailtie < Rails::Railtie
2874
- # initializer "my_railtie.configure_rails_initialization" do
2875
- # # some initialization behavior
2876
- # end
2877
- # end
2878
- #
2879
- # If specified, the block can also receive the application object, in case you
2880
- # need to access some application-specific configuration, like middleware:
2881
- #
2882
- # class MyRailtie < Rails::Railtie
2883
- # initializer "my_railtie.configure_rails_initialization" do |app|
2884
- # app.middleware.use MyRailtie::Middleware
2885
- # end
2886
- # end
2887
- #
2888
- # Finally, you can also pass <tt>:before</tt> and <tt>:after</tt> as options to
2889
- # +initializer+, in case you want to couple it with a specific step in the
2890
- # initialization process.
2891
- #
2892
- # == Configuration
2893
- #
2894
- # Railties can access a config object which contains configuration shared by all
2895
- # railties and the application:
2896
- #
2897
- # class MyRailtie < Rails::Railtie
2898
- # # Customize the ORM
2899
- # config.app_generators.orm :my_railtie_orm
2900
- #
2901
- # # Add a to_prepare block which is executed once in production
2902
- # # and before each request in development.
2903
- # config.to_prepare do
2904
- # MyRailtie.setup!
2905
- # end
2906
- # end
2907
- #
2908
- # == Loading Rake Tasks and Generators
2909
- #
2910
- # If your railtie has Rake tasks, you can tell Rails to load them through the method
2911
- # +rake_tasks+:
2912
- #
2913
- # class MyRailtie < Rails::Railtie
2914
- # rake_tasks do
2915
- # load "path/to/my_railtie.tasks"
2916
- # end
2917
- # end
2918
- #
2919
- # By default, Rails loads generators from your load path. However, if you want to place
2920
- # your generators at a different location, you can specify in your railtie a block which
2921
- # will load them during normal generators lookup:
2922
- #
2923
- # class MyRailtie < Rails::Railtie
2924
- # generators do
2925
- # require "path/to/my_railtie_generator"
2926
- # end
2927
- # end
2928
- #
2929
- # Since filenames on the load path are shared across gems, be sure that files you load
2930
- # through a railtie have unique names.
2931
- #
2932
- # == Run another program when the Rails server starts
2933
- #
2934
- # In development, it's very usual to have to run another process next to the Rails Server. In example
2935
- # you might want to start the Webpack or React server. Or maybe you need to run your job scheduler process
2936
- # like Sidekiq. This is usually done by opening a new shell and running the program from here.
2937
- #
2938
- # Rails allow you to specify a +server+ block which will get called when a Rails server starts.
2939
- # This way, your users don't need to remember to have to open a new shell and run another program, making
2940
- # this less confusing for everyone.
2941
- # It can be used like this:
2942
- #
2943
- # class MyRailtie < Rails::Railtie
2944
- # server do
2945
- # WebpackServer.start
2946
- # end
2947
- # end
2948
- #
2949
- # == Application and Engine
2950
- #
2951
- # An engine is nothing more than a railtie with some initializers already set. And since
2952
- # Rails::Application is an engine, the same configuration described here can be
2953
- # used in both.
2954
- #
2955
- # Be sure to look at the documentation of those specific classes for more information.
2956
- #
2957
- # source://railties//lib/rails/railtie.rb#136
2958
- class Rails::Railtie
2959
- include ::Rails::Initializable
2960
- extend ::ActiveSupport::DescendantsTracker
2961
- extend ::Rails::Initializable::ClassMethods
2962
-
2963
- # @return [Railtie] a new instance of Railtie
2964
- #
2965
- # source://railties//lib/rails/railtie.rb#246
2966
- def initialize; end
2967
-
2968
- # This is used to create the <tt>config</tt> object on Railties, an instance of
2969
- # Railtie::Configuration, that is used by Railties and Application to store
2970
- # related configuration.
2971
- #
2972
- # source://railties//lib/rails/railtie.rb#263
2973
- def config; end
2974
-
2975
- # source://railties//lib/rails/railtie.rb#256
2976
- def configure(&block); end
2977
-
2978
- # source://railties//lib/rails/railtie.rb#252
2979
- def inspect; end
2980
-
2981
- # source://railties//lib/rails/railtie.rb#244
2982
- def railtie_name(*_arg0, **_arg1, &_arg2); end
2983
-
2984
- # source://railties//lib/rails/railtie.rb#267
2985
- def railtie_namespace; end
2986
-
2987
- protected
2988
-
2989
- # source://railties//lib/rails/railtie.rb#272
2990
- def run_console_blocks(app); end
2991
-
2992
- # source://railties//lib/rails/railtie.rb#276
2993
- def run_generators_blocks(app); end
2994
-
2995
- # source://railties//lib/rails/railtie.rb#280
2996
- def run_runner_blocks(app); end
2997
-
2998
- # source://railties//lib/rails/railtie.rb#289
2999
- def run_server_blocks(app); end
3000
-
3001
- # source://railties//lib/rails/railtie.rb#284
3002
- def run_tasks_blocks(app); end
3003
-
3004
- private
3005
-
3006
- # run `&block` in every registered block in `#register_block_for`
3007
- #
3008
- # source://railties//lib/rails/railtie.rb#295
3009
- def each_registered_block(type, &block); end
3010
-
3011
- class << self
3012
- # source://railties//lib/rails/railtie.rb#194
3013
- def <=>(other); end
3014
-
3015
- # @return [Boolean]
3016
- #
3017
- # source://railties//lib/rails/railtie.rb#172
3018
- def abstract_railtie?; end
3019
-
3020
- # source://railties//lib/rails/railtie.rb#146
3021
- def config(*_arg0, **_arg1, &_arg2); end
3022
-
3023
- # Allows you to configure the railtie. This is the same method seen in
3024
- # Railtie::Configurable, but this module is no longer required for all
3025
- # subclasses of Railtie so we provide the class method here.
3026
- #
3027
- # source://railties//lib/rails/railtie.rb#190
3028
- def configure(&block); end
3029
-
3030
- # source://railties//lib/rails/railtie.rb#156
3031
- def console(&blk); end
3032
-
3033
- # source://railties//lib/rails/railtie.rb#164
3034
- def generators(&blk); end
3035
-
3036
- # @private
3037
- #
3038
- # source://railties//lib/rails/railtie.rb#198
3039
- def inherited(subclass); end
3040
-
3041
- # Since Rails::Railtie cannot be instantiated, any methods that call
3042
- # +instance+ are intended to be called only on subclasses of a Railtie.
3043
- #
3044
- # source://railties//lib/rails/railtie.rb#183
3045
- def instance; end
3046
-
3047
- # source://railties//lib/rails/railtie.rb#176
3048
- def railtie_name(name = T.unsafe(nil)); end
3049
-
3050
- # source://railties//lib/rails/railtie.rb#152
3051
- def rake_tasks(&blk); end
3052
-
3053
- # source://railties//lib/rails/railtie.rb#160
3054
- def runner(&blk); end
3055
-
3056
- # source://railties//lib/rails/railtie.rb#168
3057
- def server(&blk); end
3058
-
3059
- # source://railties//lib/rails/railtie.rb#148
3060
- def subclasses; end
3061
-
3062
- protected
3063
-
3064
- # source://railties//lib/rails/railtie.rb#206
3065
- def increment_load_index; end
3066
-
3067
- # Returns the value of attribute load_index.
3068
- #
3069
- # source://railties//lib/rails/railtie.rb#204
3070
- def load_index; end
3071
-
3072
- private
3073
-
3074
- # source://railties//lib/rails/railtie.rb#212
3075
- def generate_railtie_name(string); end
3076
-
3077
- # If the class method does not have a method, then send the method call
3078
- # to the Railtie instance.
3079
- #
3080
- # source://railties//lib/rails/railtie.rb#224
3081
- def method_missing(name, *args, **_arg2, &block); end
3082
-
3083
- def new(*_arg0); end
3084
-
3085
- # receives an instance variable identifier, set the variable value if is
3086
- # blank and append given block to value, which will be used later in
3087
- # `#each_registered_block(type, &block)`
3088
- #
3089
- # source://railties//lib/rails/railtie.rb#236
3090
- def register_block_for(type, &blk); end
3091
-
3092
- # @return [Boolean]
3093
- #
3094
- # source://railties//lib/rails/railtie.rb#216
3095
- def respond_to_missing?(name, _); end
3096
- end
3097
- end
3098
-
3099
- # source://railties//lib/rails/railtie.rb#142
3100
- Rails::Railtie::ABSTRACT_RAILTIES = T.let(T.unsafe(nil), Array)
3101
-
3102
- # source://railties//lib/rails/railtie/configuration.rb#7
3103
- class Rails::Railtie::Configuration
3104
- # @return [Configuration] a new instance of Configuration
3105
- #
3106
- # source://railties//lib/rails/railtie/configuration.rb#8
3107
- def initialize; end
3108
-
3109
- # Last configurable block to run. Called after frameworks initialize.
3110
- #
3111
- # source://railties//lib/rails/railtie/configuration.rb#70
3112
- def after_initialize(&block); end
3113
-
3114
- # This allows you to modify application's generators from Railties.
3115
- #
3116
- # Values set on app_generators will become defaults for application, unless
3117
- # application overwrites them.
3118
- #
3119
- # @yield [@@app_generators]
3120
- #
3121
- # source://railties//lib/rails/railtie/configuration.rb#47
3122
- def app_generators; end
3123
-
3124
- # This allows you to modify the application's middlewares from Engines.
3125
- #
3126
- # All operations you run on the app_middleware will be replayed on the
3127
- # application once it is defined and the default_middlewares are
3128
- # created
3129
- #
3130
- # source://railties//lib/rails/railtie/configuration.rb#39
3131
- def app_middleware; end
3132
-
3133
- # First configurable block to run. Called before any initializers are run.
3134
- #
3135
- # source://railties//lib/rails/railtie/configuration.rb#54
3136
- def before_configuration(&block); end
3137
-
3138
- # Third configurable block to run. Does not run if +config.eager_load+
3139
- # set to false.
3140
- #
3141
- # source://railties//lib/rails/railtie/configuration.rb#60
3142
- def before_eager_load(&block); end
3143
-
3144
- # Second configurable block to run. Called before frameworks initialize.
3145
- #
3146
- # source://railties//lib/rails/railtie/configuration.rb#65
3147
- def before_initialize(&block); end
3148
-
3149
- # All namespaces that are eager loaded
3150
- #
3151
- # source://railties//lib/rails/railtie/configuration.rb#18
3152
- def eager_load_namespaces; end
3153
-
3154
- # @return [Boolean]
3155
- #
3156
- # source://railties//lib/rails/railtie/configuration.rb#85
3157
- def respond_to?(name, include_private = T.unsafe(nil)); end
3158
-
3159
- # Defines generic callbacks to run before #after_initialize. Useful for
3160
- # Rails::Railtie subclasses.
3161
- #
3162
- # source://railties//lib/rails/railtie/configuration.rb#81
3163
- def to_prepare(&blk); end
3164
-
3165
- # Array of callbacks defined by #to_prepare.
3166
- #
3167
- # source://railties//lib/rails/railtie/configuration.rb#75
3168
- def to_prepare_blocks; end
3169
-
3170
- # Add directories that should be watched for change.
3171
- # The key of the hashes should be directories and the values should
3172
- # be an array of extensions to match in each directory.
3173
- #
3174
- # source://railties//lib/rails/railtie/configuration.rb#30
3175
- def watchable_dirs; end
3176
-
3177
- # Add files that should be watched for change.
3178
- #
3179
- # source://railties//lib/rails/railtie/configuration.rb#23
3180
- def watchable_files; end
3181
-
3182
- private
3183
-
3184
- # source://railties//lib/rails/railtie/configuration.rb#90
3185
- def method_missing(name, *args, &blk); end
3186
-
3187
- class << self
3188
- # Expose the eager_load_namespaces at "module" level for convenience.
3189
- #
3190
- # source://railties//lib/rails/railtie/configuration.rb#13
3191
- def eager_load_namespaces; end
3192
- end
3193
- end
3194
-
3195
- # Greatly inspired by Ara T. Howard's magnificent sekrets gem. 😘
3196
- #
3197
- # source://railties//lib/rails/secrets.rb#9
3198
- class Rails::Secrets
3199
- class << self
3200
- # source://railties//lib/rails/secrets.rb#46
3201
- def decrypt(data); end
3202
-
3203
- # source://railties//lib/rails/secrets.rb#42
3204
- def encrypt(data); end
3205
-
3206
- # source://railties//lib/rails/secrets.rb#38
3207
- def key; end
3208
-
3209
- # source://railties//lib/rails/secrets.rb#25
3210
- def parse(paths, env:); end
3211
-
3212
- # source://railties//lib/rails/secrets.rb#50
3213
- def read; end
3214
-
3215
- # source://railties//lib/rails/secrets.rb#59
3216
- def read_for_editing(&block); end
3217
-
3218
- # Sets the attribute root
3219
- #
3220
- # @param value the value to set the attribute root to.
3221
- #
3222
- # source://railties//lib/rails/secrets.rb#23
3223
- def root=(_arg0); end
3224
-
3225
- # source://railties//lib/rails/secrets.rb#54
3226
- def write(contents); end
3227
-
3228
- private
3229
-
3230
- # source://railties//lib/rails/secrets.rb#105
3231
- def encryptor; end
3232
-
3233
- # @raise [MissingKeyError]
3234
- #
3235
- # source://railties//lib/rails/secrets.rb#64
3236
- def handle_missing_key; end
3237
-
3238
- # source://railties//lib/rails/secrets.rb#74
3239
- def key_path; end
3240
-
3241
- # source://railties//lib/rails/secrets.rb#78
3242
- def path; end
3243
-
3244
- # source://railties//lib/rails/secrets.rb#82
3245
- def preprocess(path); end
3246
-
3247
- # source://railties//lib/rails/secrets.rb#68
3248
- def read_key_file; end
3249
-
3250
- # source://railties//lib/rails/secrets.rb#90
3251
- def writing(contents); end
3252
- end
3253
- end
3254
-
3255
- # source://railties//lib/rails/secrets.rb#10
3256
- class Rails::Secrets::MissingKeyError < ::RuntimeError
3257
- # @return [MissingKeyError] a new instance of MissingKeyError
3258
- #
3259
- # source://railties//lib/rails/secrets.rb#11
3260
- def initialize; end
3261
- end
3262
-
3263
- # Implements the logic behind <tt>Rails::Command::NotesCommand</tt>. See <tt>rails notes --help</tt> for usage information.
3264
- #
3265
- # Annotation objects are triplets <tt>:line</tt>, <tt>:tag</tt>, <tt>:text</tt> that
3266
- # represent the line where the annotation lives, its tag, and its text. Note
3267
- # the filename is not stored.
3268
- #
3269
- # Annotations are looked for in comments and modulus whitespace they have to
3270
- # start with the tag optionally followed by a colon. Everything up to the end
3271
- # of the line (or closing ERB comment tag) is considered to be their text.
3272
- #
3273
- # source://railties//lib/rails/source_annotation_extractor.rb#13
3274
- class Rails::SourceAnnotationExtractor
3275
- # @return [SourceAnnotationExtractor] a new instance of SourceAnnotationExtractor
3276
- #
3277
- # source://railties//lib/rails/source_annotation_extractor.rb#85
3278
- def initialize(tag); end
3279
-
3280
- # Prints the mapping from filenames to annotations in +results+ ordered by filename.
3281
- # The +options+ hash is passed to each annotation's +to_s+.
3282
- #
3283
- # source://railties//lib/rails/source_annotation_extractor.rb#137
3284
- def display(results, options = T.unsafe(nil)); end
3285
-
3286
- # If +file+ is the filename of a file that contains annotations this method returns
3287
- # a hash with a single entry that maps +file+ to an array of its annotations.
3288
- # Otherwise it returns an empty hash.
3289
- #
3290
- # source://railties//lib/rails/source_annotation_extractor.rb#125
3291
- def extract_annotations_from(file, pattern); end
3292
-
3293
- # Returns a hash that maps filenames under +dirs+ (recursively) to arrays
3294
- # with their annotations.
3295
- #
3296
- # source://railties//lib/rails/source_annotation_extractor.rb#91
3297
- def find(dirs); end
3298
-
3299
- # Returns a hash that maps filenames under +dir+ (recursively) to arrays
3300
- # with their annotations. Files with extensions registered in
3301
- # <tt>Rails::SourceAnnotationExtractor::Annotation.extensions</tt> are
3302
- # taken into account. Only files with annotations are included.
3303
- #
3304
- # source://railties//lib/rails/source_annotation_extractor.rb#99
3305
- def find_in(dir); end
3306
-
3307
- # Returns the value of attribute tag.
3308
- #
3309
- # source://railties//lib/rails/source_annotation_extractor.rb#83
3310
- def tag; end
3311
-
3312
- class << self
3313
- # Prints all annotations with tag +tag+ under the root directories +app+,
3314
- # +config+, +db+, +lib+, and +test+ (recursively).
3315
- #
3316
- # If +tag+ is <tt>nil</tt>, annotations with either default or registered tags are printed.
3317
- #
3318
- # Specific directories can be explicitly set using the <tt>:dirs</tt> key in +options+.
3319
- #
3320
- # Rails::SourceAnnotationExtractor.enumerate 'TODO|FIXME', dirs: %w(app lib), tag: true
3321
- #
3322
- # If +options+ has a <tt>:tag</tt> flag, it will be passed to each annotation's +to_s+.
3323
- #
3324
- # See SourceAnnotationExtractor#find_in for a list of file extensions that will be taken into account.
3325
- #
3326
- # This class method is the single entry point for the <tt>rails notes</tt> command.
3327
- #
3328
- # source://railties//lib/rails/source_annotation_extractor.rb#76
3329
- def enumerate(tag = T.unsafe(nil), options = T.unsafe(nil)); end
3330
- end
3331
- end
3332
-
3333
- # source://railties//lib/rails/source_annotation_extractor.rb#14
3334
- class Rails::SourceAnnotationExtractor::Annotation < ::Struct
3335
- # Returns a representation of the annotation that looks like this:
3336
- #
3337
- # [126] [TODO] This algorithm is simple and clearly correct, make it faster.
3338
- #
3339
- # If +options+ has a flag <tt>:tag</tt> the tag is shown as in the example above.
3340
- # Otherwise the string contains just line and text.
3341
- #
3342
- # source://railties//lib/rails/source_annotation_extractor.rb#55
3343
- def to_s(options = T.unsafe(nil)); end
3344
-
3345
- class << self
3346
- # source://railties//lib/rails/source_annotation_extractor.rb#15
3347
- def directories; end
3348
-
3349
- # source://railties//lib/rails/source_annotation_extractor.rb#35
3350
- def extensions; end
3351
-
3352
- # Registers additional directories to be included
3353
- # Rails::SourceAnnotationExtractor::Annotation.register_directories("spec", "another")
3354
- #
3355
- # source://railties//lib/rails/source_annotation_extractor.rb#21
3356
- def register_directories(*dirs); end
3357
-
3358
- # Registers new Annotations File Extensions
3359
- # Rails::SourceAnnotationExtractor::Annotation.register_extensions("css", "scss", "sass", "less", "js") { |tag| /\/\/\s*(#{tag}):?\s*(.*)$/ }
3360
- #
3361
- # source://railties//lib/rails/source_annotation_extractor.rb#41
3362
- def register_extensions(*exts, &block); end
3363
-
3364
- # Registers additional tags
3365
- # Rails::SourceAnnotationExtractor::Annotation.register_tags("TESTME", "DEPRECATEME")
3366
- #
3367
- # source://railties//lib/rails/source_annotation_extractor.rb#31
3368
- def register_tags(*additional_tags); end
3369
-
3370
- # source://railties//lib/rails/source_annotation_extractor.rb#25
3371
- def tags; end
3372
- end
3373
- end
3374
-
3375
- # source://railties//lib/rails/test_unit/runner.rb#10
3376
- module Rails::TestUnit; end
3377
-
3378
- # source://railties//lib/rails/test_unit/runner.rb#105
3379
- class Rails::TestUnit::CompositeFilter
3380
- # @return [CompositeFilter] a new instance of CompositeFilter
3381
- #
3382
- # source://railties//lib/rails/test_unit/runner.rb#108
3383
- def initialize(runnable, filter, patterns); end
3384
-
3385
- # minitest uses === to find matching filters.
3386
- #
3387
- # source://railties//lib/rails/test_unit/runner.rb#115
3388
- def ===(method); end
3389
-
3390
- # Returns the value of attribute named_filter.
3391
- #
3392
- # source://railties//lib/rails/test_unit/runner.rb#106
3393
- def named_filter; end
3394
-
3395
- private
3396
-
3397
- # source://railties//lib/rails/test_unit/runner.rb#130
3398
- def derive_line_filters(patterns); end
3399
-
3400
- # source://railties//lib/rails/test_unit/runner.rb#120
3401
- def derive_named_filter(filter); end
3402
- end
3403
-
3404
- # source://railties//lib/rails/test_unit/runner.rb#141
3405
- class Rails::TestUnit::Filter
3406
- # @return [Filter] a new instance of Filter
3407
- #
3408
- # source://railties//lib/rails/test_unit/runner.rb#142
3409
- def initialize(runnable, file, line); end
3410
-
3411
- # source://railties//lib/rails/test_unit/runner.rb#147
3412
- def ===(method); end
3413
-
3414
- private
3415
-
3416
- # source://railties//lib/rails/test_unit/runner.rb#159
3417
- def definition_for(method); end
3418
- end
3419
-
3420
- # source://railties//lib/rails/test_unit/runner.rb#11
3421
- class Rails::TestUnit::Runner
3422
- # source://railties//lib/rails/test_unit/runner.rb#12
3423
- def filters; end
3424
-
3425
- class << self
3426
- # source://railties//lib/rails/test_unit/runner.rb#15
3427
- def attach_before_load_options(opts); end
3428
-
3429
- # source://railties//lib/rails/test_unit/runner.rb#50
3430
- def compose_filter(runnable, filter); end
3431
-
3432
- # source://railties//lib/rails/test_unit/runner.rb#12
3433
- def filters; end
3434
-
3435
- # source://railties//lib/rails/test_unit/runner.rb#45
3436
- def load_tests(argv); end
3437
-
3438
- # source://railties//lib/rails/test_unit/runner.rb#20
3439
- def parse_options(argv); end
3440
-
3441
- # source://railties//lib/rails/test_unit/runner.rb#33
3442
- def rake_run(argv = T.unsafe(nil)); end
3443
-
3444
- # source://railties//lib/rails/test_unit/runner.rb#39
3445
- def run(argv = T.unsafe(nil)); end
3446
-
3447
- private
3448
-
3449
- # source://railties//lib/rails/test_unit/runner.rb#83
3450
- def default_test_exclude_glob; end
3451
-
3452
- # source://railties//lib/rails/test_unit/runner.rb#79
3453
- def default_test_glob; end
3454
-
3455
- # source://railties//lib/rails/test_unit/runner.rb#59
3456
- def extract_filters(argv); end
3457
-
3458
- # source://railties//lib/rails/test_unit/runner.rb#95
3459
- def list_tests(argv); end
3460
-
3461
- # @return [Boolean]
3462
- #
3463
- # source://railties//lib/rails/test_unit/runner.rb#91
3464
- def path_argument?(arg); end
3465
-
3466
- # @return [Boolean]
3467
- #
3468
- # source://railties//lib/rails/test_unit/runner.rb#87
3469
- def regexp_filter?(arg); end
3470
- end
3471
- end
3472
-
3473
- # source://railties//lib/rails/test_unit/railtie.rb#6
3474
- class Rails::TestUnitRailtie < ::Rails::Railtie; end
3475
-
3476
- # source://railties//lib/rails/gem_version.rb#9
3477
- module Rails::VERSION; end
3478
-
3479
- # source://railties//lib/rails/gem_version.rb#10
3480
- Rails::VERSION::MAJOR = T.let(T.unsafe(nil), Integer)
3481
-
3482
- # source://railties//lib/rails/gem_version.rb#11
3483
- Rails::VERSION::MINOR = T.let(T.unsafe(nil), Integer)
3484
-
3485
- # source://railties//lib/rails/gem_version.rb#13
3486
- Rails::VERSION::PRE = T.let(T.unsafe(nil), String)
3487
-
3488
- # source://railties//lib/rails/gem_version.rb#15
3489
- Rails::VERSION::STRING = T.let(T.unsafe(nil), String)
3490
-
3491
- # source://railties//lib/rails/gem_version.rb#12
3492
- Rails::VERSION::TINY = T.let(T.unsafe(nil), Integer)
3493
-
3494
- # source://railties//lib/rails/welcome_controller.rb#5
3495
- class Rails::WelcomeController < ::Rails::ApplicationController
3496
- # source://railties//lib/rails/welcome_controller.rb#9
3497
- def index; end
3498
-
3499
- private
3500
-
3501
- # source://actionview/7.0.8.7/lib/action_view/layouts.rb#328
3502
- def _layout(lookup_context, formats); end
3503
-
3504
- class << self
3505
- # source://activesupport/7.0.8.7/lib/active_support/callbacks.rb#68
3506
- def __callbacks; end
3507
-
3508
- # source://actionview/7.0.8.7/lib/action_view/layouts.rb#209
3509
- def _layout; end
3510
-
3511
- # source://actionview/7.0.8.7/lib/action_view/layouts.rb#210
3512
- def _layout_conditions; end
3513
-
3514
- # source://actionpack/7.0.8.7/lib/action_controller/metal.rb#210
3515
- def middleware_stack; end
3516
- end
3517
- end