rbs_rails 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -58,6 +58,30 @@ module Rails
58
58
  end
59
59
  end
60
60
 
61
+ module Rails
62
+ module AppLoader
63
+ RUBY: untyped
64
+
65
+ EXECUTABLES: ::Array[untyped]
66
+
67
+ BUNDLER_WARNING: ::String
68
+
69
+ def exec_app: () -> (nil | untyped)
70
+
71
+ def find_executable: () -> untyped
72
+ end
73
+ end
74
+
75
+ module Rails
76
+ class AppUpdater
77
+ def self.invoke_from_app_generator: (untyped method) -> untyped
78
+
79
+ def self.app_generator: () -> untyped
80
+
81
+ def self.generator_options: () -> untyped
82
+ end
83
+ end
84
+
61
85
  module Rails
62
86
  class Application
63
87
  module Bootstrap
@@ -208,14 +232,6 @@ module Rails
208
232
  end
209
233
  end
210
234
 
211
- class Rails::ApplicationController < ActionController::Base
212
- def require_local!: () -> untyped
213
-
214
- def local_request?: () -> untyped
215
-
216
- def disable_content_security_policy_nonce!: () -> untyped
217
- end
218
-
219
235
  module Rails
220
236
  class Application
221
237
  class DefaultMiddlewareStack
@@ -271,6 +287,32 @@ module Rails
271
287
  end
272
288
  end
273
289
 
290
+ module Rails
291
+ class Application
292
+ class RoutesReloader
293
+ attr_reader route_sets: untyped
294
+
295
+ attr_reader paths: untyped
296
+
297
+ attr_accessor eager_load: untyped
298
+
299
+ def initialize: () -> untyped
300
+
301
+ def reload!: () -> untyped
302
+
303
+ def updater: () -> untyped
304
+
305
+ def clear!: () -> untyped
306
+
307
+ def load_paths: () -> untyped
308
+
309
+ def finalize!: () -> untyped
310
+
311
+ def revert: () -> untyped
312
+ end
313
+ end
314
+ end
315
+
274
316
  module Rails
275
317
  # An Engine with the responsibility of coordinating the whole boot process.
276
318
  #
@@ -353,6 +395,8 @@ module Rails
353
395
 
354
396
  attr_accessor sandbox: untyped
355
397
 
398
+ alias sandbox? sandbox
399
+
356
400
  attr_reader reloaders: untyped
357
401
 
358
402
  attr_reader reloader: untyped
@@ -532,6 +576,8 @@ module Rails
532
576
  # Eager loads the application code.
533
577
  def eager_load!: () -> untyped
534
578
 
579
+ alias build_middleware_stack app
580
+
535
581
  def run_tasks_blocks: (untyped app) -> untyped
536
582
 
537
583
  def run_generators_blocks: (untyped app) -> untyped
@@ -567,54 +613,12 @@ module Rails
567
613
  end
568
614
  end
569
615
 
570
- module Rails
571
- class Application
572
- class RoutesReloader
573
- attr_reader route_sets: untyped
574
-
575
- attr_reader paths: untyped
576
-
577
- attr_accessor eager_load: untyped
578
-
579
- def initialize: () -> untyped
580
-
581
- def reload!: () -> untyped
582
-
583
- def updater: () -> untyped
584
-
585
- def clear!: () -> untyped
586
-
587
- def load_paths: () -> untyped
588
-
589
- def finalize!: () -> untyped
590
-
591
- def revert: () -> untyped
592
- end
593
- end
594
- end
595
-
596
- module Rails
597
- module AppLoader
598
- RUBY: untyped
599
-
600
- EXECUTABLES: ::Array[untyped]
601
-
602
- BUNDLER_WARNING: ::String
603
-
604
- def exec_app: () -> (nil | untyped)
605
-
606
- def find_executable: () -> untyped
607
- end
608
- end
609
-
610
- module Rails
611
- class AppUpdater
612
- def self.invoke_from_app_generator: (untyped method) -> untyped
616
+ class Rails::ApplicationController < ActionController::Base
617
+ def require_local!: () -> untyped
613
618
 
614
- def self.app_generator: () -> untyped
619
+ def local_request?: () -> untyped
615
620
 
616
- def self.generator_options: () -> untyped
617
- end
621
+ def disable_content_security_policy_nonce!: () -> untyped
618
622
  end
619
623
 
620
624
  module Rails
@@ -651,32 +655,6 @@ module Rails
651
655
  end
652
656
  end
653
657
 
654
- class CodeStatisticsCalculator
655
- # nodoc:
656
- attr_reader lines: untyped
657
-
658
- # nodoc:
659
- attr_reader code_lines: untyped
660
-
661
- # nodoc:
662
- attr_reader classes: untyped
663
-
664
- # nodoc:
665
- attr_reader methods: untyped
666
-
667
- PATTERNS: ::Hash[untyped, untyped]
668
-
669
- def initialize: (?::Integer lines, ?::Integer code_lines, ?::Integer classes, ?::Integer methods) -> untyped
670
-
671
- def add: (untyped code_statistics_calculator) -> untyped
672
-
673
- def add_by_file_path: (untyped file_path) -> untyped
674
-
675
- def add_by_io: (untyped io, untyped file_type) -> untyped
676
-
677
- def file_type: (untyped file_path) -> untyped
678
- end
679
-
680
658
  class CodeStatistics
681
659
  # nodoc:
682
660
  TEST_TYPES: ::Array[untyped]
@@ -708,6 +686,32 @@ class CodeStatistics
708
686
  def print_code_test_stats: () -> untyped
709
687
  end
710
688
 
689
+ class CodeStatisticsCalculator
690
+ # nodoc:
691
+ attr_reader lines: untyped
692
+
693
+ # nodoc:
694
+ attr_reader code_lines: untyped
695
+
696
+ # nodoc:
697
+ attr_reader classes: untyped
698
+
699
+ # nodoc:
700
+ attr_reader methods: untyped
701
+
702
+ PATTERNS: ::Hash[untyped, untyped]
703
+
704
+ def initialize: (?::Integer lines, ?::Integer code_lines, ?::Integer classes, ?::Integer methods) -> untyped
705
+
706
+ def add: (untyped code_statistics_calculator) -> untyped
707
+
708
+ def add_by_file_path: (untyped file_path) -> untyped
709
+
710
+ def add_by_io: (untyped io, untyped file_type) -> untyped
711
+
712
+ def file_type: (untyped file_path) -> untyped
713
+ end
714
+
711
715
  module Rails
712
716
  module Command
713
717
  extend ::Rails::Command::Behavior::ClassMethods
@@ -861,6 +865,16 @@ module Rails
861
865
  end
862
866
  end
863
867
 
868
+ module Rails
869
+ module Command
870
+ module Spellchecker
871
+ def self.suggest: (untyped word, from: untyped from) -> untyped
872
+
873
+ def self.levenshtein_distance: (untyped str1, untyped str2) -> untyped
874
+ end
875
+ end
876
+ end
877
+
864
878
  module Rails
865
879
  module Command
866
880
  extend ActiveSupport::Autoload
@@ -936,6 +950,8 @@ module Rails
936
950
 
937
951
  def environment: () -> untyped
938
952
 
953
+ alias environment? environment
954
+
939
955
  def set_environment!: () -> untyped
940
956
 
941
957
  def start: () -> untyped
@@ -990,6 +1006,18 @@ module Rails
990
1006
  end
991
1007
  end
992
1008
 
1009
+ module Rails
1010
+ module Command
1011
+ module Db
1012
+ module System
1013
+ class ChangeCommand < Base
1014
+ def perform: () -> untyped
1015
+ end
1016
+ end
1017
+ end
1018
+ end
1019
+ end
1020
+
993
1021
  module Rails
994
1022
  class DBConsole
995
1023
  def self.start: (*untyped args) -> untyped
@@ -1019,18 +1047,6 @@ module Rails
1019
1047
  end
1020
1048
  end
1021
1049
 
1022
- module Rails
1023
- module Command
1024
- module Db
1025
- module System
1026
- class ChangeCommand < Base
1027
- def perform: () -> untyped
1028
- end
1029
- end
1030
- end
1031
- end
1032
- end
1033
-
1034
1050
  module Rails
1035
1051
  module Command
1036
1052
  class DestroyCommand < Base
@@ -1133,16 +1149,6 @@ module Rails
1133
1149
  end
1134
1150
  end
1135
1151
 
1136
- module Rails
1137
- module Command
1138
- module Spellchecker
1139
- def self.suggest: (untyped word, from: untyped from) -> untyped
1140
-
1141
- def self.levenshtein_distance: (untyped str1, untyped str2) -> untyped
1142
- end
1143
- end
1144
- end
1145
-
1146
1152
  module Rails
1147
1153
  module Command
1148
1154
  class PluginCommand < Base
@@ -1353,6 +1359,8 @@ module Rails
1353
1359
 
1354
1360
  def insert_before: (*untyped args) { () -> untyped } -> untyped
1355
1361
 
1362
+ alias insert insert_before
1363
+
1356
1364
  def insert_after: (*untyped args) { () -> untyped } -> untyped
1357
1365
 
1358
1366
  def swap: (*untyped args) { () -> untyped } -> untyped
@@ -1509,6 +1517,16 @@ module Rails
1509
1517
  end
1510
1518
  end
1511
1519
 
1520
+ module Rails
1521
+ class Engine
1522
+ class Updater
1523
+ def self.generator: () -> untyped
1524
+
1525
+ def self.run: (untyped action) -> untyped
1526
+ end
1527
+ end
1528
+ end
1529
+
1512
1530
  module Rails
1513
1531
  # <tt>Rails::Engine</tt> allows you to wrap a specific Rails application or subset of
1514
1532
  # functionality and share it with other applications or within a larger packaged application.
@@ -1852,6 +1870,10 @@ module Rails
1852
1870
 
1853
1871
  attr_accessor isolated: untyped
1854
1872
 
1873
+ alias self.isolated? self.isolated
1874
+
1875
+ alias self.engine_name self.railtie_name
1876
+
1855
1877
  def self.inherited: (untyped base) -> untyped
1856
1878
 
1857
1879
  def self.find_root: (untyped from) -> untyped
@@ -1943,16 +1965,6 @@ module Rails
1943
1965
  end
1944
1966
  end
1945
1967
 
1946
- module Rails
1947
- class Engine
1948
- class Updater
1949
- def self.generator: () -> untyped
1950
-
1951
- def self.run: (untyped action) -> untyped
1952
- end
1953
- end
1954
- end
1955
-
1956
1968
  module Rails
1957
1969
  # Returns the version of the currently loaded Rails as a <tt>Gem::Version</tt>
1958
1970
  def self.gem_version: () -> Gem::Version
@@ -1987,6 +1999,8 @@ module Rails
1987
1999
 
1988
2000
  def existing_migration: () -> untyped
1989
2001
 
2002
+ alias exists? existing_migration
2003
+
1990
2004
  def on_conflict_behavior: () { () -> untyped } -> untyped
1991
2005
 
1992
2006
  def say_status: (untyped status, untyped color, ?untyped message) -> untyped
@@ -2042,6 +2056,8 @@ module Rails
2042
2056
  # end
2043
2057
  def environment: (?untyped? data, ?::Hash[untyped, untyped] options) { () -> untyped } -> untyped
2044
2058
 
2059
+ alias application environment
2060
+
2045
2061
  # Run a command in git.
2046
2062
  #
2047
2063
  # git :init
@@ -2261,8 +2277,8 @@ module Rails
2261
2277
 
2262
2278
  def skip_action_text?: () -> untyped
2263
2279
 
2264
- # Note: It inherits unnamed class, but omitted
2265
2280
  class GemfileEntry
2281
+ # Note: It inherits unnamed class, but omitted
2266
2282
  def initialize: (untyped name, untyped version, untyped comment, ?::Hash[untyped, untyped] options, ?bool commented_out) -> untyped
2267
2283
 
2268
2284
  def self.github: (untyped name, untyped github, ?untyped? branch, ?untyped? comment) -> untyped
@@ -2337,8 +2353,12 @@ module Rails
2337
2353
 
2338
2354
  def defined_app_const_base: () -> untyped
2339
2355
 
2356
+ alias defined_app_const_base? defined_app_const_base
2357
+
2340
2358
  def app_const_base: () -> untyped
2341
2359
 
2360
+ alias camelized app_const_base
2361
+
2342
2362
  def app_const: () -> untyped
2343
2363
 
2344
2364
  def valid_const?: () -> untyped
@@ -2606,20 +2626,6 @@ module Erb
2606
2626
  end
2607
2627
  end
2608
2628
 
2609
- module Erb
2610
- module Generators
2611
- class Base < Rails::Generators::NamedBase
2612
- def formats: () -> ::Array[untyped]
2613
-
2614
- def format: () -> :html
2615
-
2616
- def handler: () -> :erb
2617
-
2618
- def filename_with_extensions: (untyped name, ?untyped file_format) -> untyped
2619
- end
2620
- end
2621
- end
2622
-
2623
2629
  module Erb
2624
2630
  module Generators
2625
2631
  class ScaffoldGenerator < Base
@@ -2637,11 +2643,25 @@ module Erb
2637
2643
  end
2638
2644
  end
2639
2645
 
2640
- module Rails
2646
+ module Erb
2641
2647
  module Generators
2642
- class GeneratedAttribute
2643
- # :nodoc:
2644
- INDEX_OPTIONS: ::Array[untyped]
2648
+ class Base < Rails::Generators::NamedBase
2649
+ def formats: () -> ::Array[untyped]
2650
+
2651
+ def format: () -> :html
2652
+
2653
+ def handler: () -> :erb
2654
+
2655
+ def filename_with_extensions: (untyped name, ?untyped file_format) -> untyped
2656
+ end
2657
+ end
2658
+ end
2659
+
2660
+ module Rails
2661
+ module Generators
2662
+ class GeneratedAttribute
2663
+ # :nodoc:
2664
+ INDEX_OPTIONS: ::Array[untyped]
2645
2665
 
2646
2666
  UNIQ_INDEX_OPTIONS: ::Array[untyped]
2647
2667
 
@@ -3280,6 +3300,8 @@ module Rails
3280
3300
 
3281
3301
  module Generators
3282
3302
  class PluginGenerator < AppBase
3303
+ alias plugin_path app_path
3304
+
3283
3305
  def initialize: (*untyped args) -> untyped
3284
3306
 
3285
3307
  def create_root_files: () -> untyped
@@ -3346,6 +3368,8 @@ module Rails
3346
3368
 
3347
3369
  def application_definition: () -> untyped
3348
3370
 
3371
+ alias store_application_definition! application_definition
3372
+
3349
3373
  def get_builder_class: () -> untyped
3350
3374
 
3351
3375
  def rakefile_test_tasks: () -> ::String
@@ -3392,6 +3416,14 @@ module Rails
3392
3416
  end
3393
3417
  end
3394
3418
 
3419
+ module Rails
3420
+ module Generators
3421
+ class ScaffoldGenerator < ResourceGenerator
3422
+ def handle_skip: () -> untyped
3423
+ end
3424
+ end
3425
+ end
3426
+
3395
3427
  module Rails
3396
3428
  module Generators
3397
3429
  class ScaffoldControllerGenerator < NamedBase
@@ -3407,14 +3439,6 @@ module Rails
3407
3439
  end
3408
3440
  end
3409
3441
 
3410
- module Rails
3411
- module Generators
3412
- class ScaffoldGenerator < ResourceGenerator
3413
- def handle_skip: () -> untyped
3414
- end
3415
- end
3416
- end
3417
-
3418
3442
  module Rails
3419
3443
  module Generators
3420
3444
  class SystemTestGenerator < NamedBase
@@ -3430,83 +3454,6 @@ module Rails
3430
3454
  end
3431
3455
  end
3432
3456
 
3433
- module Rails
3434
- module Generators
3435
- include Rails::Command::Behavior
3436
-
3437
- DEFAULT_ALIASES: ::Hash[untyped, untyped]
3438
-
3439
- DEFAULT_OPTIONS: ::Hash[untyped, untyped]
3440
-
3441
- def self.configure!: (untyped config) -> untyped
3442
-
3443
- def self.templates_path: () -> untyped
3444
-
3445
- def self.aliases: () -> untyped
3446
-
3447
- def self.options: () -> untyped
3448
-
3449
- # Hold configured generators fallbacks. If a plugin developer wants a
3450
- # generator group to fallback to another group in case of missing generators,
3451
- # they can add a fallback.
3452
- #
3453
- # For example, shoulda is considered a test_framework and is an extension
3454
- # of test_unit. However, most part of shoulda generators are similar to
3455
- # test_unit ones.
3456
- #
3457
- # Shoulda then can tell generators to search for test_unit generators when
3458
- # some of them are not available by adding a fallback:
3459
- #
3460
- # Rails::Generators.fallbacks[:shoulda] = :test_unit
3461
- def self.fallbacks: () -> untyped
3462
-
3463
- # Configure generators for API only applications. It basically hides
3464
- # everything that is usually browser related, such as assets and session
3465
- # migration generators, and completely disable helpers and assets
3466
- # so generators such as scaffold won't create them.
3467
- def self.api_only!: () -> untyped
3468
-
3469
- # Remove the color from output.
3470
- def self.no_color!: () -> untyped
3471
-
3472
- # Returns an array of generator namespaces that are hidden.
3473
- # Generator namespaces may be hidden for a variety of reasons.
3474
- # Some are aliased such as "rails:migration" and can be
3475
- # invoked with the shorter "migration", others are private to other generators
3476
- # such as "css:scaffold".
3477
- def self.hidden_namespaces: () -> untyped
3478
-
3479
- def self.hide_namespaces: (*untyped namespaces) -> untyped
3480
-
3481
- # Show help message with available generators.
3482
- def self.help: (?::String command) -> untyped
3483
-
3484
- def self.public_namespaces: () -> untyped
3485
-
3486
- def self.print_generators: () -> untyped
3487
-
3488
- def self.sorted_groups: () -> untyped
3489
-
3490
- def self.find_by_namespace: (untyped name, ?untyped? base, ?untyped? context) -> untyped
3491
-
3492
- # Receives a namespace, arguments and the behavior to invoke the generator.
3493
- # It's used as the default entry point for generate, destroy and update
3494
- # commands.
3495
- def self.invoke: (untyped namespace, ?untyped args, ?::Hash[untyped, untyped] config) -> untyped
3496
-
3497
- def self.print_list: (untyped base, untyped namespaces) -> untyped
3498
-
3499
- # Try fallbacks for the given base.
3500
- def self.invoke_fallbacks_for: (untyped name, untyped base) -> (nil | untyped)
3501
-
3502
- def self.command_type: () -> untyped
3503
-
3504
- def self.lookup_paths: () -> untyped
3505
-
3506
- def self.file_lookup_paths: () -> untyped
3507
- end
3508
- end
3509
-
3510
3457
  module Rails
3511
3458
  module Generators
3512
3459
  module ResourceHelpers
@@ -3571,6 +3518,130 @@ module Rails
3571
3518
  end
3572
3519
  end
3573
3520
 
3521
+ module TestUnit
3522
+ module Generators
3523
+ class ControllerGenerator < Base
3524
+ def create_test_files: () -> untyped
3525
+ end
3526
+ end
3527
+ end
3528
+
3529
+ module TestUnit
3530
+ module Generators
3531
+ class GeneratorGenerator < Base
3532
+ def create_generator_files: () -> untyped
3533
+
3534
+ def generator_path: () -> untyped
3535
+ end
3536
+ end
3537
+ end
3538
+
3539
+ module TestUnit
3540
+ module Generators
3541
+ class HelperGenerator < Base
3542
+ end
3543
+ end
3544
+ end
3545
+
3546
+ module TestUnit
3547
+ module Generators
3548
+ class IntegrationGenerator < Base
3549
+ def create_test_files: () -> untyped
3550
+
3551
+ def file_name: () -> untyped
3552
+ end
3553
+ end
3554
+ end
3555
+
3556
+ module TestUnit
3557
+ module Generators
3558
+ class JobGenerator < Base
3559
+ def create_test_file: () -> untyped
3560
+
3561
+ def file_name: () -> untyped
3562
+ end
3563
+ end
3564
+ end
3565
+
3566
+ module TestUnit
3567
+ module Generators
3568
+ class MailerGenerator < Base
3569
+ def check_class_collision: () -> untyped
3570
+
3571
+ def create_test_files: () -> untyped
3572
+
3573
+ def create_preview_files: () -> untyped
3574
+
3575
+ def file_name: () -> untyped
3576
+ end
3577
+ end
3578
+ end
3579
+
3580
+ module TestUnit
3581
+ module Generators
3582
+ class ModelGenerator < Base
3583
+ # :nodoc:
3584
+ # :nodoc:
3585
+ # :nodoc:
3586
+ RESERVED_YAML_KEYWORDS: ::Array[untyped]
3587
+
3588
+ def create_test_file: () -> untyped
3589
+
3590
+ def create_fixture_file: () -> untyped
3591
+
3592
+ def yaml_key_value: (untyped key, untyped value) -> untyped
3593
+ end
3594
+ end
3595
+ end
3596
+
3597
+ module TestUnit
3598
+ module Generators
3599
+ class PluginGenerator < Base
3600
+ def create_test_files: () -> untyped
3601
+ end
3602
+ end
3603
+ end
3604
+
3605
+ module TestUnit
3606
+ module Generators
3607
+ class ScaffoldGenerator < Base
3608
+ # :nodoc:
3609
+ # :nodoc:
3610
+ # :nodoc:
3611
+ include Rails::Generators::ResourceHelpers
3612
+
3613
+ def create_test_files: () -> untyped
3614
+
3615
+ def fixture_name: () -> untyped
3616
+
3617
+ def attributes_string: () -> untyped
3618
+
3619
+ def attributes_hash: () -> (::Hash[untyped, untyped] | untyped)
3620
+
3621
+ def boolean?: (untyped name) -> untyped
3622
+
3623
+ def virtual?: (untyped name) -> untyped
3624
+ end
3625
+ end
3626
+ end
3627
+
3628
+ module TestUnit
3629
+ module Generators
3630
+ class SystemGenerator < Base
3631
+ def create_test_files: () -> untyped
3632
+
3633
+ def file_name: () -> untyped
3634
+ end
3635
+ end
3636
+ end
3637
+
3638
+ module TestUnit
3639
+ module Generators
3640
+ class Base < Rails::Generators::NamedBase
3641
+ end
3642
+ end
3643
+ end
3644
+
3574
3645
  module Rails
3575
3646
  module Generators
3576
3647
  module Testing
@@ -3595,12 +3666,16 @@ module Rails
3595
3666
  # end
3596
3667
  def assert_file: (untyped relative, *untyped contents) { (untyped) -> untyped } -> untyped
3597
3668
 
3669
+ alias assert_directory assert_file
3670
+
3598
3671
  # Asserts a given file does not exist. You need to supply an absolute path or a
3599
3672
  # path relative to the configured destination:
3600
3673
  #
3601
3674
  # assert_no_file "config/random.rb"
3602
3675
  def assert_no_file: (untyped relative) -> untyped
3603
3676
 
3677
+ alias assert_no_directory assert_no_file
3678
+
3604
3679
  # Asserts a given migration exists. You need to supply an absolute path or a
3605
3680
  # path relative to the configured destination:
3606
3681
  #
@@ -3641,6 +3716,8 @@ module Rails
3641
3716
  # end
3642
3717
  def assert_instance_method: (untyped method, untyped content) { (untyped) -> untyped } -> untyped
3643
3718
 
3719
+ alias assert_method assert_instance_method
3720
+
3644
3721
  # Asserts the given attribute type gets translated to a field type
3645
3722
  # properly:
3646
3723
  #
@@ -3733,142 +3810,85 @@ module Rails
3733
3810
  end
3734
3811
  end
3735
3812
 
3736
- module TestUnit
3813
+ module Rails
3737
3814
  module Generators
3738
- class ControllerGenerator < Base
3739
- def create_test_files: () -> untyped
3740
- end
3741
- end
3742
- end
3815
+ include Rails::Command::Behavior
3743
3816
 
3744
- module TestUnit
3745
- module Generators
3746
- class GeneratorGenerator < Base
3747
- def create_generator_files: () -> untyped
3817
+ DEFAULT_ALIASES: ::Hash[untyped, untyped]
3748
3818
 
3749
- def generator_path: () -> untyped
3750
- end
3751
- end
3752
- end
3819
+ DEFAULT_OPTIONS: ::Hash[untyped, untyped]
3753
3820
 
3754
- module TestUnit
3755
- module Generators
3756
- class HelperGenerator < Base
3757
- end
3758
- end
3759
- end
3760
-
3761
- module TestUnit
3762
- module Generators
3763
- class IntegrationGenerator < Base
3764
- def create_test_files: () -> untyped
3765
-
3766
- def file_name: () -> untyped
3767
- end
3768
- end
3769
- end
3770
-
3771
- module TestUnit
3772
- module Generators
3773
- class JobGenerator < Base
3774
- def create_test_file: () -> untyped
3821
+ def self.configure!: (untyped config) -> untyped
3775
3822
 
3776
- def file_name: () -> untyped
3777
- end
3778
- end
3779
- end
3823
+ def self.templates_path: () -> untyped
3780
3824
 
3781
- module TestUnit
3782
- module Generators
3783
- class MailerGenerator < Base
3784
- def check_class_collision: () -> untyped
3825
+ def self.aliases: () -> untyped
3785
3826
 
3786
- def create_test_files: () -> untyped
3827
+ def self.options: () -> untyped
3787
3828
 
3788
- def create_preview_files: () -> untyped
3829
+ # Hold configured generators fallbacks. If a plugin developer wants a
3830
+ # generator group to fallback to another group in case of missing generators,
3831
+ # they can add a fallback.
3832
+ #
3833
+ # For example, shoulda is considered a test_framework and is an extension
3834
+ # of test_unit. However, most part of shoulda generators are similar to
3835
+ # test_unit ones.
3836
+ #
3837
+ # Shoulda then can tell generators to search for test_unit generators when
3838
+ # some of them are not available by adding a fallback:
3839
+ #
3840
+ # Rails::Generators.fallbacks[:shoulda] = :test_unit
3841
+ def self.fallbacks: () -> untyped
3789
3842
 
3790
- def file_name: () -> untyped
3791
- end
3792
- end
3793
- end
3843
+ # Configure generators for API only applications. It basically hides
3844
+ # everything that is usually browser related, such as assets and session
3845
+ # migration generators, and completely disable helpers and assets
3846
+ # so generators such as scaffold won't create them.
3847
+ def self.api_only!: () -> untyped
3794
3848
 
3795
- module TestUnit
3796
- module Generators
3797
- class ModelGenerator < Base
3798
- # :nodoc:
3799
- # :nodoc:
3800
- # :nodoc:
3801
- RESERVED_YAML_KEYWORDS: ::Array[untyped]
3849
+ # Remove the color from output.
3850
+ def self.no_color!: () -> untyped
3802
3851
 
3803
- def create_test_file: () -> untyped
3852
+ # Returns an array of generator namespaces that are hidden.
3853
+ # Generator namespaces may be hidden for a variety of reasons.
3854
+ # Some are aliased such as "rails:migration" and can be
3855
+ # invoked with the shorter "migration", others are private to other generators
3856
+ # such as "css:scaffold".
3857
+ def self.hidden_namespaces: () -> untyped
3804
3858
 
3805
- def create_fixture_file: () -> untyped
3859
+ def self.hide_namespaces: (*untyped namespaces) -> untyped
3806
3860
 
3807
- def yaml_key_value: (untyped key, untyped value) -> untyped
3808
- end
3809
- end
3810
- end
3861
+ alias self.hide_namespace self.hide_namespaces
3811
3862
 
3812
- module TestUnit
3813
- module Generators
3814
- class PluginGenerator < Base
3815
- def create_test_files: () -> untyped
3816
- end
3817
- end
3818
- end
3863
+ # Show help message with available generators.
3864
+ def self.help: (?::String command) -> untyped
3819
3865
 
3820
- module TestUnit
3821
- module Generators
3822
- class Base < Rails::Generators::NamedBase
3823
- end
3824
- end
3825
- end
3866
+ def self.public_namespaces: () -> untyped
3826
3867
 
3827
- module TestUnit
3828
- module Generators
3829
- class ScaffoldGenerator < Base
3830
- # :nodoc:
3831
- # :nodoc:
3832
- # :nodoc:
3833
- include Rails::Generators::ResourceHelpers
3868
+ def self.print_generators: () -> untyped
3834
3869
 
3835
- def create_test_files: () -> untyped
3870
+ def self.sorted_groups: () -> untyped
3836
3871
 
3837
- def fixture_name: () -> untyped
3872
+ def self.find_by_namespace: (untyped name, ?untyped? base, ?untyped? context) -> untyped
3838
3873
 
3839
- def attributes_string: () -> untyped
3874
+ # Receives a namespace, arguments and the behavior to invoke the generator.
3875
+ # It's used as the default entry point for generate, destroy and update
3876
+ # commands.
3877
+ def self.invoke: (untyped namespace, ?untyped args, ?::Hash[untyped, untyped] config) -> untyped
3840
3878
 
3841
- def attributes_hash: () -> (::Hash[untyped, untyped] | untyped)
3879
+ def self.print_list: (untyped base, untyped namespaces) -> untyped
3842
3880
 
3843
- def boolean?: (untyped name) -> untyped
3881
+ # Try fallbacks for the given base.
3882
+ def self.invoke_fallbacks_for: (untyped name, untyped base) -> (nil | untyped)
3844
3883
 
3845
- def virtual?: (untyped name) -> untyped
3846
- end
3847
- end
3848
- end
3884
+ def self.command_type: () -> untyped
3849
3885
 
3850
- module TestUnit
3851
- module Generators
3852
- class SystemGenerator < Base
3853
- def create_test_files: () -> untyped
3886
+ def self.lookup_paths: () -> untyped
3854
3887
 
3855
- def file_name: () -> untyped
3856
- end
3888
+ def self.file_lookup_paths: () -> untyped
3857
3889
  end
3858
3890
  end
3859
3891
 
3860
- class Rails::InfoController < Rails::ApplicationController
3861
- def index: () -> untyped
3862
-
3863
- def properties: () -> untyped
3864
-
3865
- def routes: () -> untyped
3866
-
3867
- def match_route: () { (untyped) -> untyped } -> untyped
3868
-
3869
- def with_leading_slash: (untyped path) -> untyped
3870
- end
3871
-
3872
3892
  module Rails
3873
3893
  # This module helps build the runtime properties that are displayed in
3874
3894
  # Rails::InfoController responses. These include the active Rails version,
@@ -3883,10 +3903,24 @@ module Rails
3883
3903
 
3884
3904
  def self.to_s: () -> untyped
3885
3905
 
3906
+ alias self.inspect self.to_s
3907
+
3886
3908
  def self.to_html: () -> untyped
3887
3909
  end
3888
3910
  end
3889
3911
 
3912
+ class Rails::InfoController < Rails::ApplicationController
3913
+ def index: () -> untyped
3914
+
3915
+ def properties: () -> untyped
3916
+
3917
+ def routes: () -> untyped
3918
+
3919
+ def match_route: () { (untyped) -> untyped } -> untyped
3920
+
3921
+ def with_leading_slash: (untyped path) -> untyped
3922
+ end
3923
+
3890
3924
  module Rails
3891
3925
  module Initializable
3892
3926
  def self.included: (untyped base) -> untyped
@@ -3914,6 +3948,8 @@ module Rails
3914
3948
  class Collection[T] < Array[T]
3915
3949
  include TSort
3916
3950
 
3951
+ alias tsort_each_node each
3952
+
3917
3953
  def tsort_each_child: (untyped initializer) { () -> untyped } -> untyped
3918
3954
 
3919
3955
  def +: (untyped other) -> Collection[untyped]
@@ -4047,6 +4083,8 @@ module Rails
4047
4083
 
4048
4084
  def <<: (untyped path) -> untyped
4049
4085
 
4086
+ alias push <<
4087
+
4050
4088
  def concat: (untyped paths) -> untyped
4051
4089
 
4052
4090
  def unshift: (*untyped paths) -> untyped
@@ -4063,6 +4101,8 @@ module Rails
4063
4101
 
4064
4102
  def existent_directories: () -> untyped
4065
4103
 
4104
+ alias to_a expanded
4105
+
4066
4106
  def files_in: (untyped path) -> untyped
4067
4107
  end
4068
4108
  end
@@ -4353,66 +4393,6 @@ module Rails
4353
4393
  end
4354
4394
  end
4355
4395
 
4356
- module Rails
4357
- extend ActiveSupport::Autoload
4358
-
4359
- attr_writer application: untyped
4360
-
4361
- attr_accessor app_class: untyped
4362
-
4363
- attr_accessor cache: untyped
4364
-
4365
- attr_accessor logger: untyped
4366
-
4367
- def self.application: () -> untyped
4368
-
4369
- # The Configuration instance used to configure the Rails environment
4370
- def self.configuration: () -> untyped
4371
-
4372
- def self.backtrace_cleaner: () -> untyped
4373
-
4374
- # Returns a Pathname object of the current Rails project,
4375
- # otherwise it returns +nil+ if there is no project:
4376
- #
4377
- # Rails.root
4378
- # # => #<Pathname:/Users/someuser/some/path/project>
4379
- def self.root: () -> untyped
4380
-
4381
- # Returns the current Rails environment.
4382
- #
4383
- # Rails.env # => "development"
4384
- # Rails.env.development? # => true
4385
- # Rails.env.production? # => false
4386
- def self.env: () -> untyped
4387
-
4388
- # Sets the Rails environment.
4389
- #
4390
- # Rails.env = "staging" # => "staging"
4391
- def self.env=: (untyped environment) -> untyped
4392
-
4393
- # Returns all Rails groups for loading based on:
4394
- #
4395
- # * The Rails environment;
4396
- # * The environment variable RAILS_GROUPS;
4397
- # * The optional envs given as argument and the hash with group dependencies;
4398
- #
4399
- # groups assets: [:development, :test]
4400
- #
4401
- # # Returns
4402
- # # => [:default, "development", :assets] for Rails.env == "development"
4403
- # # => [:default, "production"] for Rails.env == "production"
4404
- def self.groups: (*untyped groups) -> untyped
4405
-
4406
- # Returns a Pathname object of the public folder of the current
4407
- # Rails project, otherwise it returns +nil+ if there is no project:
4408
- #
4409
- # Rails.public_path
4410
- # # => #<Pathname:/Users/someuser/some/path/project/public>
4411
- def self.public_path: () -> untyped
4412
-
4413
- def self.autoloaders: () -> untyped
4414
- end
4415
-
4416
4396
  module Rails
4417
4397
  class Secrets
4418
4398
  # Greatly inspired by Ara T. Howard's magnificent sekrets gem. (trim non-ascii characters)
@@ -4464,8 +4444,8 @@ module Rails
4464
4444
  # start with the tag optionally followed by a colon. Everything up to the end
4465
4445
  # of the line (or closing ERB comment tag) is considered to be their text.
4466
4446
  class SourceAnnotationExtractor
4467
- # Note: It inherits unnamed class, but omitted
4468
4447
  class Annotation
4448
+ # Note: It inherits unnamed class, but omitted
4469
4449
  def self.directories: () -> untyped
4470
4450
 
4471
4451
  # Registers additional directories to be included
@@ -4636,6 +4616,66 @@ class Rails::WelcomeController < Rails::ApplicationController
4636
4616
  def index: () -> nil
4637
4617
  end
4638
4618
 
4619
+ module Rails
4620
+ extend ActiveSupport::Autoload
4621
+
4622
+ attr_writer application: untyped
4623
+
4624
+ attr_accessor app_class: untyped
4625
+
4626
+ attr_accessor cache: untyped
4627
+
4628
+ attr_accessor logger: untyped
4629
+
4630
+ def self.application: () -> untyped
4631
+
4632
+ # The Configuration instance used to configure the Rails environment
4633
+ def self.configuration: () -> untyped
4634
+
4635
+ def self.backtrace_cleaner: () -> untyped
4636
+
4637
+ # Returns a Pathname object of the current Rails project,
4638
+ # otherwise it returns +nil+ if there is no project:
4639
+ #
4640
+ # Rails.root
4641
+ # # => #<Pathname:/Users/someuser/some/path/project>
4642
+ def self.root: () -> untyped
4643
+
4644
+ # Returns the current Rails environment.
4645
+ #
4646
+ # Rails.env # => "development"
4647
+ # Rails.env.development? # => true
4648
+ # Rails.env.production? # => false
4649
+ def self.env: () -> untyped
4650
+
4651
+ # Sets the Rails environment.
4652
+ #
4653
+ # Rails.env = "staging" # => "staging"
4654
+ def self.env=: (untyped environment) -> untyped
4655
+
4656
+ # Returns all Rails groups for loading based on:
4657
+ #
4658
+ # * The Rails environment;
4659
+ # * The environment variable RAILS_GROUPS;
4660
+ # * The optional envs given as argument and the hash with group dependencies;
4661
+ #
4662
+ # groups assets: [:development, :test]
4663
+ #
4664
+ # # Returns
4665
+ # # => [:default, "development", :assets] for Rails.env == "development"
4666
+ # # => [:default, "production"] for Rails.env == "production"
4667
+ def self.groups: (*untyped groups) -> untyped
4668
+
4669
+ # Returns a Pathname object of the public folder of the current
4670
+ # Rails project, otherwise it returns +nil+ if there is no project:
4671
+ #
4672
+ # Rails.public_path
4673
+ # # => #<Pathname:/Users/someuser/some/path/project/public>
4674
+ def self.public_path: () -> untyped
4675
+
4676
+ def self.autoloaders: () -> untyped
4677
+ end
4678
+
4639
4679
  class Object
4640
4680
  include ActiveRecord::TestDatabases
4641
4681