sorbet-rails 0.6.2 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (204) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +2 -0
  3. data/README.md +3 -3
  4. data/lib/bundled_rbi/typed_enum.rbi +7 -0
  5. data/lib/sorbet-rails.rb +0 -2
  6. data/lib/sorbet-rails/active_record_rbi_formatter.rb +301 -0
  7. data/lib/sorbet-rails/config.rb +0 -1
  8. data/lib/sorbet-rails/dependent_gem_rbis/activerecord.rbi +11 -0
  9. data/lib/sorbet-rails/deprecation.rb +5 -0
  10. data/lib/sorbet-rails/gem_plugins/active_flag_plugin.rb +0 -1
  11. data/lib/sorbet-rails/gem_plugins/paperclip_plugin.rb +0 -1
  12. data/lib/sorbet-rails/model_plugins/active_record_assoc.rb +36 -8
  13. data/lib/sorbet-rails/model_plugins/active_record_attribute.rb +20 -9
  14. data/lib/sorbet-rails/model_plugins/active_record_enum.rb +0 -1
  15. data/lib/sorbet-rails/model_plugins/active_record_named_scope.rb +15 -6
  16. data/lib/sorbet-rails/model_plugins/active_record_querying.rb +34 -3
  17. data/lib/sorbet-rails/model_plugins/active_storage_methods.rb +1 -1
  18. data/lib/sorbet-rails/model_plugins/base.rb +10 -0
  19. data/lib/sorbet-rails/model_plugins/enumerable_collections.rb +0 -50
  20. data/lib/sorbet-rails/model_plugins/plugins.rb +0 -3
  21. data/lib/sorbet-rails/model_rbi_formatter.rb +6 -10
  22. data/lib/sorbet-rails/model_utils.rb +83 -36
  23. data/lib/sorbet-rails/rails_mixins/generated_url_helpers.rb +2 -3
  24. data/lib/sorbet-rails/railtie.rb +0 -2
  25. data/lib/sorbet-rails/tasks/rails_rbi.rake +32 -24
  26. data/sorbet-rails.gemspec +2 -2
  27. data/spec/active_record_rbi_formatter_spec.rb +24 -0
  28. data/spec/generators/rails-template.rb +90 -6
  29. data/spec/generators/sorbet_test_cases.rb +204 -122
  30. data/spec/model_rbi_formatter_spec.rb +1 -1
  31. data/spec/rails_helper.rb +14 -1
  32. data/spec/rake_rails_rbi_active_record_spec.rb +21 -0
  33. data/spec/rake_rails_rbi_models_spec.rb +7 -0
  34. data/spec/sorbet_spec.rb +12 -1
  35. data/spec/support/v5.0/Gemfile.lock +8 -8
  36. data/spec/support/v5.0/app/models/headmaster.rb +8 -0
  37. data/spec/support/v5.0/app/models/school.rb +2 -0
  38. data/spec/support/v5.0/app/models/spell.rb +5 -0
  39. data/spec/support/v5.0/app/models/spell_book.rb +5 -0
  40. data/spec/support/v5.0/app/models/subject.rb +5 -0
  41. data/spec/support/v5.0/app/models/wizard.rb +6 -1
  42. data/spec/support/v5.0/db/migrate/20190620000010_add_subject.rb +8 -0
  43. data/spec/support/v5.0/db/migrate/20190620000011_add_subjects_wizards.rb +8 -0
  44. data/spec/support/v5.0/db/migrate/20190620000012_add_spell.rb +8 -0
  45. data/spec/support/v5.0/db/migrate/20190620000013_add_spells_spell_books.rb +8 -0
  46. data/spec/support/v5.0/db/migrate/20190620000014_create_headmasters.rb +9 -0
  47. data/spec/support/v5.0/db/schema.rb +28 -1
  48. data/spec/support/v5.0/lib/mythical_rbi_plugin.rb +1 -1
  49. data/spec/support/v5.0/sorbet_test_cases.rb +204 -122
  50. data/spec/support/v5.1/Gemfile.lock +8 -8
  51. data/spec/support/v5.1/app/models/headmaster.rb +8 -0
  52. data/spec/support/v5.1/app/models/school.rb +2 -0
  53. data/spec/support/v5.1/app/models/spell.rb +5 -0
  54. data/spec/support/v5.1/app/models/spell_book.rb +5 -0
  55. data/spec/support/v5.1/app/models/subject.rb +5 -0
  56. data/spec/support/v5.1/app/models/wizard.rb +6 -1
  57. data/spec/support/v5.1/db/migrate/20190620000010_add_subject.rb +8 -0
  58. data/spec/support/v5.1/db/migrate/20190620000011_add_subjects_wizards.rb +8 -0
  59. data/spec/support/v5.1/db/migrate/20190620000012_add_spell.rb +8 -0
  60. data/spec/support/v5.1/db/migrate/20190620000013_add_spells_spell_books.rb +8 -0
  61. data/spec/support/v5.1/db/migrate/20190620000014_create_headmasters.rb +9 -0
  62. data/spec/support/v5.1/db/schema.rb +28 -1
  63. data/spec/support/v5.1/lib/mythical_rbi_plugin.rb +1 -1
  64. data/spec/support/v5.1/sorbet_test_cases.rb +204 -122
  65. data/spec/support/v5.2/Gemfile +1 -1
  66. data/spec/support/v5.2/Gemfile.lock +9 -9
  67. data/spec/support/v5.2/app/models/headmaster.rb +8 -0
  68. data/spec/support/v5.2/app/models/school.rb +2 -0
  69. data/spec/support/v5.2/app/models/spell.rb +5 -0
  70. data/spec/support/v5.2/app/models/spell_book.rb +5 -0
  71. data/spec/support/v5.2/app/models/subject.rb +5 -0
  72. data/spec/support/v5.2/app/models/wizard.rb +5 -0
  73. data/spec/support/v5.2/config/puma.rb +3 -0
  74. data/spec/support/v5.2/db/migrate/20190620000010_add_subject.rb +8 -0
  75. data/spec/support/v5.2/db/migrate/20190620000011_add_subjects_wizards.rb +8 -0
  76. data/spec/support/v5.2/db/migrate/20190620000012_add_spell.rb +8 -0
  77. data/spec/support/v5.2/db/migrate/20190620000013_add_spells_spell_books.rb +8 -0
  78. data/spec/support/v5.2/db/migrate/20190620000014_create_headmasters.rb +9 -0
  79. data/spec/support/v5.2/db/schema.rb +28 -1
  80. data/spec/support/v5.2/lib/mythical_rbi_plugin.rb +1 -1
  81. data/spec/support/v5.2/sorbet_test_cases.rb +204 -122
  82. data/spec/support/v6.0/Gemfile.lock +8 -8
  83. data/spec/support/v6.0/app/models/headmaster.rb +8 -0
  84. data/spec/support/v6.0/app/models/school.rb +2 -0
  85. data/spec/support/v6.0/app/models/spell.rb +5 -0
  86. data/spec/support/v6.0/app/models/spell_book.rb +5 -0
  87. data/spec/support/v6.0/app/models/subject.rb +5 -0
  88. data/spec/support/v6.0/app/models/wizard.rb +6 -1
  89. data/spec/support/v6.0/db/migrate/20190620000010_add_subject.rb +8 -0
  90. data/spec/support/v6.0/db/migrate/20190620000011_add_subjects_wizards.rb +8 -0
  91. data/spec/support/v6.0/db/migrate/20190620000012_add_spell.rb +8 -0
  92. data/spec/support/v6.0/db/migrate/20190620000013_add_spells_spell_books.rb +8 -0
  93. data/spec/support/v6.0/db/migrate/20190620000014_create_headmasters.rb +9 -0
  94. data/spec/support/v6.0/db/schema.rb +28 -1
  95. data/spec/support/v6.0/lib/mythical_rbi_plugin.rb +1 -1
  96. data/spec/support/v6.0/sorbet_test_cases.rb +204 -122
  97. data/spec/test_data/v5.0/expected_active_record_base.rbi +113 -0
  98. data/spec/test_data/v5.0/expected_active_record_relation.rbi +199 -0
  99. data/spec/test_data/v5.0/expected_habtm_subjects.rbi +660 -0
  100. data/spec/test_data/v5.0/expected_habtm_wizards.rbi +660 -0
  101. data/spec/test_data/v5.0/expected_headmaster.rbi +304 -0
  102. data/spec/test_data/v5.0/expected_internal_metadata.rbi +38 -401
  103. data/spec/test_data/v5.0/expected_potion.rbi +38 -401
  104. data/spec/test_data/v5.0/expected_robe.rbi +38 -403
  105. data/spec/test_data/v5.0/expected_schema_migration.rbi +38 -401
  106. data/spec/test_data/v5.0/expected_school.rbi +47 -401
  107. data/spec/test_data/v5.0/expected_spell.rbi +292 -0
  108. data/spec/test_data/v5.0/expected_spell/habtm_spell_books.rbi +295 -0
  109. data/spec/test_data/v5.0/expected_spell_book.rbi +86 -432
  110. data/spec/test_data/v5.0/expected_spell_book/habtm_spell_books.rbi +637 -0
  111. data/spec/test_data/v5.0/expected_spell_book/habtm_spells.rbi +295 -0
  112. data/spec/test_data/v5.0/expected_squib.rbi +122 -477
  113. data/spec/test_data/v5.0/expected_subject.rbi +292 -0
  114. data/spec/test_data/v5.0/expected_subject/habtm_wizards.rbi +295 -0
  115. data/spec/test_data/v5.0/expected_wand.rbi +75 -442
  116. data/spec/test_data/v5.0/expected_wizard.rbi +144 -498
  117. data/spec/test_data/v5.0/expected_wizard/habtm_subjects.rbi +295 -0
  118. data/spec/test_data/v5.0/expected_wizard_wo_spellbook.rbi +138 -498
  119. data/spec/test_data/v5.1/expected_active_record_base.rbi +113 -0
  120. data/spec/test_data/v5.1/expected_active_record_relation.rbi +178 -0
  121. data/spec/test_data/v5.1/expected_habtm_subjects.rbi +672 -0
  122. data/spec/test_data/v5.1/expected_habtm_wizards.rbi +672 -0
  123. data/spec/test_data/v5.1/expected_headmaster.rbi +310 -0
  124. data/spec/test_data/v5.1/expected_internal_metadata.rbi +38 -407
  125. data/spec/test_data/v5.1/expected_potion.rbi +38 -407
  126. data/spec/test_data/v5.1/expected_robe.rbi +38 -409
  127. data/spec/test_data/v5.1/expected_schema_migration.rbi +38 -407
  128. data/spec/test_data/v5.1/expected_school.rbi +47 -407
  129. data/spec/test_data/v5.1/expected_spell.rbi +298 -0
  130. data/spec/test_data/v5.1/expected_spell/habtm_spell_books.rbi +301 -0
  131. data/spec/test_data/v5.1/expected_spell_book.rbi +86 -438
  132. data/spec/test_data/v5.1/expected_spell_book/habtm_spell_books.rbi +649 -0
  133. data/spec/test_data/v5.1/expected_spell_book/habtm_spells.rbi +301 -0
  134. data/spec/test_data/v5.1/expected_squib.rbi +123 -484
  135. data/spec/test_data/v5.1/expected_subject.rbi +298 -0
  136. data/spec/test_data/v5.1/expected_subject/habtm_wizards.rbi +301 -0
  137. data/spec/test_data/v5.1/expected_wand.rbi +75 -448
  138. data/spec/test_data/v5.1/expected_wizard.rbi +145 -505
  139. data/spec/test_data/v5.1/expected_wizard/habtm_subjects.rbi +301 -0
  140. data/spec/test_data/v5.1/expected_wizard_wo_spellbook.rbi +139 -505
  141. data/spec/test_data/v5.2/expected_active_record_base.rbi +113 -0
  142. data/spec/test_data/v5.2/expected_active_record_relation.rbi +175 -0
  143. data/spec/test_data/v5.2/expected_attachment.rbi +38 -407
  144. data/spec/test_data/v5.2/expected_blob.rbi +60 -426
  145. data/spec/test_data/v5.2/expected_habtm_subjects.rbi +672 -0
  146. data/spec/test_data/v5.2/expected_habtm_wizards.rbi +672 -0
  147. data/spec/test_data/v5.2/expected_headmaster.rbi +310 -0
  148. data/spec/test_data/v5.2/expected_internal_metadata.rbi +38 -407
  149. data/spec/test_data/v5.2/expected_potion.rbi +38 -407
  150. data/spec/test_data/v5.2/expected_robe.rbi +38 -409
  151. data/spec/test_data/v5.2/expected_schema_migration.rbi +38 -407
  152. data/spec/test_data/v5.2/expected_school.rbi +47 -407
  153. data/spec/test_data/v5.2/expected_spell.rbi +298 -0
  154. data/spec/test_data/v5.2/expected_spell/habtm_spell_books.rbi +301 -0
  155. data/spec/test_data/v5.2/expected_spell_book.rbi +86 -438
  156. data/spec/test_data/v5.2/expected_spell_book/habtm_spell_books.rbi +649 -0
  157. data/spec/test_data/v5.2/expected_spell_book/habtm_spells.rbi +301 -0
  158. data/spec/test_data/v5.2/expected_squib.rbi +133 -488
  159. data/spec/test_data/v5.2/expected_subject.rbi +298 -0
  160. data/spec/test_data/v5.2/expected_subject/habtm_wizards.rbi +301 -0
  161. data/spec/test_data/v5.2/expected_wand.rbi +75 -448
  162. data/spec/test_data/v5.2/expected_wizard.rbi +155 -509
  163. data/spec/test_data/v5.2/expected_wizard/habtm_subjects.rbi +301 -0
  164. data/spec/test_data/v5.2/expected_wizard_wo_spellbook.rbi +149 -509
  165. data/spec/test_data/v6.0/expected_active_record_base.rbi +113 -0
  166. data/spec/test_data/v6.0/expected_active_record_relation.rbi +175 -0
  167. data/spec/test_data/v6.0/expected_attachment.rbi +38 -431
  168. data/spec/test_data/v6.0/expected_blob.rbi +60 -450
  169. data/spec/test_data/v6.0/expected_habtm_subjects.rbi +720 -0
  170. data/spec/test_data/v6.0/expected_habtm_wizards.rbi +720 -0
  171. data/spec/test_data/v6.0/expected_headmaster.rbi +334 -0
  172. data/spec/test_data/v6.0/expected_internal_metadata.rbi +38 -431
  173. data/spec/test_data/v6.0/expected_potion.rbi +38 -431
  174. data/spec/test_data/v6.0/expected_robe.rbi +38 -433
  175. data/spec/test_data/v6.0/expected_routes.rbi +14 -7
  176. data/spec/test_data/v6.0/expected_schema_migration.rbi +38 -431
  177. data/spec/test_data/v6.0/expected_school.rbi +47 -431
  178. data/spec/test_data/v6.0/expected_spell.rbi +322 -0
  179. data/spec/test_data/v6.0/expected_spell/habtm_spell_books.rbi +325 -0
  180. data/spec/test_data/v6.0/expected_spell_book.rbi +98 -474
  181. data/spec/test_data/v6.0/expected_spell_book/habtm_spell_books.rbi +697 -0
  182. data/spec/test_data/v6.0/expected_spell_book/habtm_spells.rbi +325 -0
  183. data/spec/test_data/v6.0/expected_squib.rbi +162 -541
  184. data/spec/test_data/v6.0/expected_subject.rbi +322 -0
  185. data/spec/test_data/v6.0/expected_subject/habtm_wizards.rbi +325 -0
  186. data/spec/test_data/v6.0/expected_wand.rbi +91 -488
  187. data/spec/test_data/v6.0/expected_wizard.rbi +184 -562
  188. data/spec/test_data/v6.0/expected_wizard/habtm_subjects.rbi +325 -0
  189. data/spec/test_data/v6.0/expected_wizard_wo_spellbook.rbi +178 -562
  190. metadata +170 -24
  191. data/lib/bundled_rbi/active_record_base.rbi +0 -83
  192. data/lib/bundled_rbi/active_record_relation.rbi +0 -122
  193. data/lib/bundled_rbi/parameters.rbi +0 -28
  194. data/lib/sorbet-rails/custom_types/boolean_string.rb +0 -32
  195. data/lib/sorbet-rails/custom_types/integer_string.rb +0 -35
  196. data/lib/sorbet-rails/model_plugins/active_record_finder_methods.rb +0 -131
  197. data/lib/sorbet-rails/rails_mixins/custom_params_methods.rb +0 -46
  198. data/spec/boolean_string_spec.rb +0 -59
  199. data/spec/custom_params_methods_spec.rb +0 -138
  200. data/spec/integer_string_spec.rb +0 -46
  201. data/spec/support/v5.0/typed-override.yaml +0 -2
  202. data/spec/support/v5.1/typed-override.yaml +0 -2
  203. data/spec/support/v5.2/typed-override.yaml +0 -2
  204. data/spec/support/v6.0/typed-override.yaml +0 -2
@@ -21,13 +21,6 @@ module GeneratedUrlHelpers
21
21
  sig { params(args: T.untyped, kwargs: T.untyped).returns(String) }
22
22
  def test_index_url(*args, **kwargs); end
23
23
 
24
- # Sigs for route /rails/action_mailbox/mandrill/inbound_emails(.:format)
25
- sig { params(args: T.untyped, kwargs: T.untyped).returns(String) }
26
- def rails_mandrill_inbound_emails_path(*args, **kwargs); end
27
-
28
- sig { params(args: T.untyped, kwargs: T.untyped).returns(String) }
29
- def rails_mandrill_inbound_emails_url(*args, **kwargs); end
30
-
31
24
  # Sigs for route /rails/action_mailbox/postmark/inbound_emails(.:format)
32
25
  sig { params(args: T.untyped, kwargs: T.untyped).returns(String) }
33
26
  def rails_postmark_inbound_emails_path(*args, **kwargs); end
@@ -49,6 +42,20 @@ module GeneratedUrlHelpers
49
42
  sig { params(args: T.untyped, kwargs: T.untyped).returns(String) }
50
43
  def rails_sendgrid_inbound_emails_url(*args, **kwargs); end
51
44
 
45
+ # Sigs for route /rails/action_mailbox/mandrill/inbound_emails(.:format)
46
+ sig { params(args: T.untyped, kwargs: T.untyped).returns(String) }
47
+ def rails_mandrill_inbound_health_check_path(*args, **kwargs); end
48
+
49
+ sig { params(args: T.untyped, kwargs: T.untyped).returns(String) }
50
+ def rails_mandrill_inbound_health_check_url(*args, **kwargs); end
51
+
52
+ # Sigs for route /rails/action_mailbox/mandrill/inbound_emails(.:format)
53
+ sig { params(args: T.untyped, kwargs: T.untyped).returns(String) }
54
+ def rails_mandrill_inbound_emails_path(*args, **kwargs); end
55
+
56
+ sig { params(args: T.untyped, kwargs: T.untyped).returns(String) }
57
+ def rails_mandrill_inbound_emails_url(*args, **kwargs); end
58
+
52
59
  # Sigs for route /rails/action_mailbox/mailgun/inbound_emails/mime(.:format)
53
60
  sig { params(args: T.untyped, kwargs: T.untyped).returns(String) }
54
61
  def rails_mailgun_inbound_emails_path(*args, **kwargs); end
@@ -8,8 +8,6 @@ module ActiveRecord::SchemaMigration::ActiveRelation_WhereNot
8
8
  end
9
9
 
10
10
  module ActiveRecord::SchemaMigration::GeneratedAttributeMethods
11
- extend T::Sig
12
-
13
11
  sig { returns(String) }
14
12
  def version; end
15
13
 
@@ -40,136 +38,11 @@ end
40
38
  class ActiveRecord::SchemaMigration < ActiveRecord::Base
41
39
  include ActiveRecord::SchemaMigration::GeneratedAttributeMethods
42
40
  extend ActiveRecord::SchemaMigration::CustomFinderMethods
43
- extend T::Sig
44
- extend T::Generic
41
+ extend ActiveRecord::SchemaMigration::QueryMethodsReturningRelation
45
42
  RelationType = T.type_alias { T.any(ActiveRecord::SchemaMigration::ActiveRecord_Relation, ActiveRecord::SchemaMigration::ActiveRecord_Associations_CollectionProxy, ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
46
-
47
- sig { returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
48
- def self.all; end
49
-
50
- sig { params(block: T.nilable(T.proc.void)).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
51
- def self.unscoped(&block); end
52
-
53
- sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
54
- def self.select(*args); end
55
-
56
- sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
57
- def self.reselect(*args); end
58
-
59
- sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
60
- def self.order(*args); end
61
-
62
- sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
63
- def self.reorder(*args); end
64
-
65
- sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
66
- def self.group(*args); end
67
-
68
- sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
69
- def self.limit(*args); end
70
-
71
- sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
72
- def self.offset(*args); end
73
-
74
- sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
75
- def self.joins(*args); end
76
-
77
- sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
78
- def self.left_joins(*args); end
79
-
80
- sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
81
- def self.left_outer_joins(*args); end
82
-
83
- sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
84
- def self.where(*args); end
85
-
86
- sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
87
- def self.rewhere(*args); end
88
-
89
- sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
90
- def self.preload(*args); end
91
-
92
- sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
93
- def self.extract_associated(*args); end
94
-
95
- sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
96
- def self.eager_load(*args); end
97
-
98
- sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
99
- def self.includes(*args); end
100
-
101
- sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
102
- def self.from(*args); end
103
-
104
- sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
105
- def self.lock(*args); end
106
-
107
- sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
108
- def self.readonly(*args); end
109
-
110
- sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
111
- def self.or(*args); end
112
-
113
- sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
114
- def self.having(*args); end
115
-
116
- sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
117
- def self.create_with(*args); end
118
-
119
- sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
120
- def self.distinct(*args); end
121
-
122
- sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
123
- def self.references(*args); end
124
-
125
- sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
126
- def self.none(*args); end
127
-
128
- sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
129
- def self.unscope(*args); end
130
-
131
- sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
132
- def self.optimizer_hints(*args); end
133
-
134
- sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
135
- def self.merge(*args); end
136
-
137
- sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
138
- def self.except(*args); end
139
-
140
- sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
141
- def self.only(*args); end
142
-
143
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
144
- def self.extending(*args, &block); end
145
-
146
- sig { params(conditions: T.untyped).returns(T::Boolean) }
147
- def self.exists?(conditions = nil); end
148
-
149
- sig { params(args: T.untyped).returns(T::Boolean) }
150
- def self.any?(*args); end
151
-
152
- sig { params(args: T.untyped).returns(T::Boolean) }
153
- def self.many?(*args); end
154
-
155
- sig { params(args: T.untyped).returns(T::Boolean) }
156
- def self.none?(*args); end
157
-
158
- sig { params(args: T.untyped).returns(T::Boolean) }
159
- def self.one?(*args); end
160
-
161
- sig { params(args: T.untyped).returns(T::Boolean) }
162
- def self.empty?(*args); end
163
43
  end
164
44
 
165
- class ActiveRecord::SchemaMigration::ActiveRecord_Relation < ActiveRecord::Relation
166
- include ActiveRecord::SchemaMigration::ActiveRelation_WhereNot
167
- include ActiveRecord::SchemaMigration::CustomFinderMethods
168
- include Enumerable
169
- extend T::Sig
170
- extend T::Generic
171
- Elem = type_member(fixed: ActiveRecord::SchemaMigration)
172
-
45
+ module ActiveRecord::SchemaMigration::QueryMethodsReturningRelation
173
46
  sig { returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
174
47
  def all; end
175
48
 
@@ -269,37 +142,24 @@ class ActiveRecord::SchemaMigration::ActiveRecord_Relation < ActiveRecord::Relat
269
142
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
270
143
  def extending(*args, &block); end
271
144
 
272
- sig { params(conditions: T.untyped).returns(T::Boolean) }
273
- def exists?(conditions = nil); end
274
-
275
- sig { params(args: T.untyped).returns(T::Boolean) }
276
- def any?(*args); end
277
-
278
- sig { params(args: T.untyped).returns(T::Boolean) }
279
- def many?(*args); end
280
-
281
- sig { params(args: T.untyped).returns(T::Boolean) }
282
- def none?(*args); end
283
-
284
- sig { params(args: T.untyped).returns(T::Boolean) }
285
- def one?(*args); end
286
-
287
- sig { params(args: T.untyped).returns(T::Boolean) }
288
- def empty?(*args); end
145
+ sig do
146
+ params(
147
+ of: T.nilable(Integer),
148
+ start: T.nilable(Integer),
149
+ finish: T.nilable(Integer),
150
+ load: T.nilable(T::Boolean),
151
+ error_on_ignore: T.nilable(T::Boolean),
152
+ block: T.nilable(T.proc.params(e: ActiveRecord::SchemaMigration::ActiveRecord_Relation).void)
153
+ ).returns(ActiveRecord::Batches::BatchEnumerator)
154
+ end
155
+ def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
289
156
  end
290
157
 
291
- class ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
292
- include ActiveRecord::SchemaMigration::ActiveRelation_WhereNot
293
- include ActiveRecord::SchemaMigration::CustomFinderMethods
294
- include Enumerable
295
- extend T::Sig
296
- extend T::Generic
297
- Elem = type_member(fixed: ActiveRecord::SchemaMigration)
298
-
158
+ module ActiveRecord::SchemaMigration::QueryMethodsReturningAssociationRelation
299
159
  sig { returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
300
160
  def all; end
301
161
 
302
- sig { params(block: T.nilable(T.proc.void)).returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
162
+ sig { params(block: T.nilable(T.proc.void)).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
303
163
  def unscoped(&block); end
304
164
 
305
165
  sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
@@ -395,290 +255,37 @@ class ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation < ActiveRe
395
255
  sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
396
256
  def extending(*args, &block); end
397
257
 
398
- sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration) }
399
- def find(*args); end
400
-
401
- sig { params(args: T.untyped).returns(T.nilable(ActiveRecord::SchemaMigration)) }
402
- def find_by(*args); end
403
-
404
- sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration) }
405
- def find_by!(*args); end
406
-
407
- sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: ActiveRecord::SchemaMigration).void)).returns(ActiveRecord::SchemaMigration) }
408
- def find_or_initialize_by(attributes, &block); end
409
-
410
- sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: ActiveRecord::SchemaMigration).void)).returns(ActiveRecord::SchemaMigration) }
411
- def find_or_create_by(attributes, &block); end
412
-
413
- sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: ActiveRecord::SchemaMigration).void)).returns(ActiveRecord::SchemaMigration) }
414
- def find_or_create_by!(attributes, &block); end
415
-
416
- sig { returns(T.nilable(ActiveRecord::SchemaMigration)) }
417
- def first; end
418
-
419
- sig { returns(ActiveRecord::SchemaMigration) }
420
- def first!; end
421
-
422
- sig { returns(T.nilable(ActiveRecord::SchemaMigration)) }
423
- def second; end
424
-
425
- sig { returns(ActiveRecord::SchemaMigration) }
426
- def second!; end
427
-
428
- sig { returns(T.nilable(ActiveRecord::SchemaMigration)) }
429
- def third; end
430
-
431
- sig { returns(ActiveRecord::SchemaMigration) }
432
- def third!; end
433
-
434
- sig { returns(T.nilable(ActiveRecord::SchemaMigration)) }
435
- def third_to_last; end
436
-
437
- sig { returns(ActiveRecord::SchemaMigration) }
438
- def third_to_last!; end
439
-
440
- sig { returns(T.nilable(ActiveRecord::SchemaMigration)) }
441
- def second_to_last; end
442
-
443
- sig { returns(ActiveRecord::SchemaMigration) }
444
- def second_to_last!; end
445
-
446
- sig { returns(T.nilable(ActiveRecord::SchemaMigration)) }
447
- def last; end
448
-
449
- sig { returns(ActiveRecord::SchemaMigration) }
450
- def last!; end
451
-
452
- sig { params(conditions: T.untyped).returns(T::Boolean) }
453
- def exists?(conditions = nil); end
454
-
455
- sig { params(args: T.untyped).returns(T::Boolean) }
456
- def any?(*args); end
457
-
458
- sig { params(args: T.untyped).returns(T::Boolean) }
459
- def many?(*args); end
460
-
461
- sig { params(args: T.untyped).returns(T::Boolean) }
462
- def none?(*args); end
463
-
464
- sig { params(args: T.untyped).returns(T::Boolean) }
465
- def one?(*args); end
466
-
467
- sig { params(args: T.untyped).returns(T::Boolean) }
468
- def empty?(*args); end
469
-
470
- sig { override.params(block: T.proc.params(e: ActiveRecord::SchemaMigration).void).returns(T::Array[ActiveRecord::SchemaMigration]) }
471
- def each(&block); end
472
-
473
- sig { params(level: T.nilable(Integer)).returns(T::Array[ActiveRecord::SchemaMigration]) }
474
- def flatten(level); end
475
-
476
- sig { returns(T::Array[ActiveRecord::SchemaMigration]) }
477
- def to_a; end
478
-
479
258
  sig do
480
- type_parameters(:U).params(
481
- blk: T.proc.params(arg0: Elem).returns(T.type_parameter(:U)),
482
- )
483
- .returns(T::Array[T.type_parameter(:U)])
259
+ params(
260
+ of: T.nilable(Integer),
261
+ start: T.nilable(Integer),
262
+ finish: T.nilable(Integer),
263
+ load: T.nilable(T::Boolean),
264
+ error_on_ignore: T.nilable(T::Boolean),
265
+ block: T.nilable(T.proc.params(e: ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation).void)
266
+ ).returns(ActiveRecord::Batches::BatchEnumerator)
484
267
  end
485
- def map(&blk); end
268
+ def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
486
269
  end
487
270
 
488
- class ActiveRecord::SchemaMigration::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
271
+ class ActiveRecord::SchemaMigration::ActiveRecord_Relation < ActiveRecord::Relation
272
+ include ActiveRecord::SchemaMigration::ActiveRelation_WhereNot
489
273
  include ActiveRecord::SchemaMigration::CustomFinderMethods
490
- include Enumerable
491
- extend T::Sig
492
- extend T::Generic
274
+ include ActiveRecord::SchemaMigration::QueryMethodsReturningRelation
493
275
  Elem = type_member(fixed: ActiveRecord::SchemaMigration)
276
+ end
494
277
 
495
- sig { returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
496
- def all; end
497
-
498
- sig { params(block: T.nilable(T.proc.void)).returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
499
- def unscoped(&block); end
500
-
501
- sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
502
- def select(*args); end
503
-
504
- sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
505
- def reselect(*args); end
506
-
507
- sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
508
- def order(*args); end
509
-
510
- sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
511
- def reorder(*args); end
512
-
513
- sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
514
- def group(*args); end
515
-
516
- sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
517
- def limit(*args); end
518
-
519
- sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
520
- def offset(*args); end
521
-
522
- sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
523
- def joins(*args); end
524
-
525
- sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
526
- def left_joins(*args); end
527
-
528
- sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
529
- def left_outer_joins(*args); end
530
-
531
- sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
532
- def where(*args); end
533
-
534
- sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
535
- def rewhere(*args); end
536
-
537
- sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
538
- def preload(*args); end
539
-
540
- sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
541
- def extract_associated(*args); end
542
-
543
- sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
544
- def eager_load(*args); end
545
-
546
- sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
547
- def includes(*args); end
548
-
549
- sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
550
- def from(*args); end
551
-
552
- sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
553
- def lock(*args); end
554
-
555
- sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
556
- def readonly(*args); end
557
-
558
- sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
559
- def or(*args); end
560
-
561
- sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
562
- def having(*args); end
563
-
564
- sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
565
- def create_with(*args); end
566
-
567
- sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
568
- def distinct(*args); end
569
-
570
- sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
571
- def references(*args); end
572
-
573
- sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
574
- def none(*args); end
575
-
576
- sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
577
- def unscope(*args); end
578
-
579
- sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
580
- def optimizer_hints(*args); end
581
-
582
- sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
583
- def merge(*args); end
584
-
585
- sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
586
- def except(*args); end
587
-
588
- sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
589
- def only(*args); end
590
-
591
- sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation) }
592
- def extending(*args, &block); end
593
-
594
- sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration) }
595
- def find(*args); end
596
-
597
- sig { params(args: T.untyped).returns(T.nilable(ActiveRecord::SchemaMigration)) }
598
- def find_by(*args); end
599
-
600
- sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration) }
601
- def find_by!(*args); end
602
-
603
- sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: ActiveRecord::SchemaMigration).void)).returns(ActiveRecord::SchemaMigration) }
604
- def find_or_initialize_by(attributes, &block); end
605
-
606
- sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: ActiveRecord::SchemaMigration).void)).returns(ActiveRecord::SchemaMigration) }
607
- def find_or_create_by(attributes, &block); end
608
-
609
- sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: ActiveRecord::SchemaMigration).void)).returns(ActiveRecord::SchemaMigration) }
610
- def find_or_create_by!(attributes, &block); end
611
-
612
- sig { returns(T.nilable(ActiveRecord::SchemaMigration)) }
613
- def first; end
614
-
615
- sig { returns(ActiveRecord::SchemaMigration) }
616
- def first!; end
617
-
618
- sig { returns(T.nilable(ActiveRecord::SchemaMigration)) }
619
- def second; end
620
-
621
- sig { returns(ActiveRecord::SchemaMigration) }
622
- def second!; end
623
-
624
- sig { returns(T.nilable(ActiveRecord::SchemaMigration)) }
625
- def third; end
626
-
627
- sig { returns(ActiveRecord::SchemaMigration) }
628
- def third!; end
629
-
630
- sig { returns(T.nilable(ActiveRecord::SchemaMigration)) }
631
- def third_to_last; end
632
-
633
- sig { returns(ActiveRecord::SchemaMigration) }
634
- def third_to_last!; end
635
-
636
- sig { returns(T.nilable(ActiveRecord::SchemaMigration)) }
637
- def second_to_last; end
638
-
639
- sig { returns(ActiveRecord::SchemaMigration) }
640
- def second_to_last!; end
641
-
642
- sig { returns(T.nilable(ActiveRecord::SchemaMigration)) }
643
- def last; end
644
-
645
- sig { returns(ActiveRecord::SchemaMigration) }
646
- def last!; end
647
-
648
- sig { params(conditions: T.untyped).returns(T::Boolean) }
649
- def exists?(conditions = nil); end
650
-
651
- sig { params(args: T.untyped).returns(T::Boolean) }
652
- def any?(*args); end
653
-
654
- sig { params(args: T.untyped).returns(T::Boolean) }
655
- def many?(*args); end
656
-
657
- sig { params(args: T.untyped).returns(T::Boolean) }
658
- def none?(*args); end
659
-
660
- sig { params(args: T.untyped).returns(T::Boolean) }
661
- def one?(*args); end
662
-
663
- sig { params(args: T.untyped).returns(T::Boolean) }
664
- def empty?(*args); end
665
-
666
- sig { override.params(block: T.proc.params(e: ActiveRecord::SchemaMigration).void).returns(T::Array[ActiveRecord::SchemaMigration]) }
667
- def each(&block); end
668
-
669
- sig { params(level: T.nilable(Integer)).returns(T::Array[ActiveRecord::SchemaMigration]) }
670
- def flatten(level); end
671
-
672
- sig { returns(T::Array[ActiveRecord::SchemaMigration]) }
673
- def to_a; end
278
+ class ActiveRecord::SchemaMigration::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
279
+ include ActiveRecord::SchemaMigration::ActiveRelation_WhereNot
280
+ include ActiveRecord::SchemaMigration::CustomFinderMethods
281
+ include ActiveRecord::SchemaMigration::QueryMethodsReturningAssociationRelation
282
+ Elem = type_member(fixed: ActiveRecord::SchemaMigration)
283
+ end
674
284
 
675
- sig do
676
- type_parameters(:U).params(
677
- blk: T.proc.params(arg0: Elem).returns(T.type_parameter(:U)),
678
- )
679
- .returns(T::Array[T.type_parameter(:U)])
680
- end
681
- def map(&blk); end
285
+ class ActiveRecord::SchemaMigration::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
286
+ include ActiveRecord::SchemaMigration::CustomFinderMethods
287
+ include ActiveRecord::SchemaMigration::QueryMethodsReturningAssociationRelation
288
+ Elem = type_member(fixed: ActiveRecord::SchemaMigration)
682
289
 
683
290
  sig { params(records: T.any(ActiveRecord::SchemaMigration, T::Array[ActiveRecord::SchemaMigration])).returns(T.self_type) }
684
291
  def <<(*records); end