sorbet-rails 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +13 -1
- data/.travis.yml +2 -2
- data/Gemfile +1 -1
- data/README.md +79 -3
- data/lib/sorbet-rails.rb +5 -1
- data/lib/sorbet-rails/activerecord.rbi +27 -0
- data/lib/sorbet-rails/custom_finder_methods.rb +11 -0
- data/lib/sorbet-rails/helper_rbi_formatter.rb +33 -0
- data/lib/sorbet-rails/model_plugins/active_record_assoc.rb +91 -0
- data/lib/sorbet-rails/model_plugins/active_record_attribute.rb +111 -0
- data/lib/sorbet-rails/model_plugins/active_record_enum.rb +43 -0
- data/lib/sorbet-rails/model_plugins/active_record_finder_methods.rb +80 -0
- data/lib/sorbet-rails/model_plugins/active_record_named_scope.rb +28 -0
- data/lib/sorbet-rails/model_plugins/active_record_querying.rb +42 -0
- data/lib/sorbet-rails/model_plugins/active_relation_where_not.rb +28 -0
- data/lib/sorbet-rails/model_plugins/base.rb +33 -0
- data/lib/sorbet-rails/model_plugins/custom_finder_methods.rb +54 -0
- data/lib/sorbet-rails/model_plugins/enumerable_collections.rb +49 -0
- data/lib/sorbet-rails/model_plugins/plugins.rb +45 -0
- data/lib/sorbet-rails/model_rbi_formatter.rb +108 -362
- data/lib/sorbet-rails/model_utils.rb +45 -0
- data/lib/sorbet-rails/railtie.rb +1 -0
- data/lib/sorbet-rails/routes_rbi_formatter.rb +12 -3
- data/lib/sorbet-rails/tasks/rails_rbi.rake +36 -15
- data/lib/sorbet-rails/utils.rb +4 -0
- data/sorbet-rails.gemspec +4 -2
- data/spec/helper_rbi_formatter_spec.rb +13 -0
- data/spec/model_plugins_spec.rb +31 -0
- data/spec/model_rbi_formatter_spec.rb +5 -5
- data/spec/rake_rails_rbi_helpers_spec.rb +14 -0
- data/spec/routes_rbi_formatter_spec.rb +3 -3
- data/spec/sorbet_spec.rb +12 -16
- data/spec/support/rails_shared/app/controllers/application_controller.rb +1 -1
- data/spec/support/rails_shared/app/helpers/bar_helper.rb +2 -0
- data/spec/support/rails_shared/app/helpers/baz_helper.rb +2 -0
- data/spec/support/rails_shared/app/helpers/foo_helper.rb +2 -0
- data/spec/support/rails_shared/app/models/concerns/mythical.rb +10 -0
- data/spec/support/rails_shared/app/models/wand.rb +1 -0
- data/spec/support/rails_shared/config/initializers/sorbet_rails.rb +3 -0
- data/spec/support/rails_shared/lib/mythical_rbi_plugin.rb +16 -0
- data/spec/support/rails_shared/sorbet_test_cases.rb +5 -2
- data/spec/support/rails_shared/typed-override.yaml +2 -0
- data/spec/support/rails_symlinks/app/helpers +1 -0
- data/spec/support/rails_symlinks/config/initializers/sorbet_rails.rb +1 -0
- data/spec/support/rails_symlinks/lib/mythical_rbi_plugin.rb +1 -0
- data/spec/support/rails_symlinks/typed-override.yaml +1 -0
- data/spec/support/v4.2/Gemfile.lock +5 -0
- data/spec/support/v4.2/app/helpers +1 -0
- data/spec/support/v4.2/config/initializers/sorbet_rails.rb +1 -0
- data/spec/support/v4.2/config/routes.rb +0 -1
- data/spec/support/v4.2/lib/mythical_rbi_plugin.rb +1 -0
- data/spec/support/v4.2/sorbet/rbi/sorbet-typed/lib/activerecord/all/activerecord.rbi +1 -1
- data/spec/support/v4.2/sorbet/rbi/sorbet-typed/lib/activesupport/all/activesupport.rbi +1 -1
- data/spec/support/v4.2/typed-override.yaml +1 -0
- data/spec/support/v5.0/Gemfile.lock +5 -0
- data/spec/support/v5.0/app/helpers +1 -0
- data/spec/support/v5.0/config/initializers/sorbet_rails.rb +1 -0
- data/spec/support/v5.0/config/routes.rb +0 -1
- data/spec/support/v5.0/lib/mythical_rbi_plugin.rb +1 -0
- data/spec/support/v5.0/sorbet/rbi/sorbet-typed/lib/activerecord/all/activerecord.rbi +1 -1
- data/spec/support/v5.0/sorbet/rbi/sorbet-typed/lib/activesupport/all/activesupport.rbi +1 -1
- data/spec/support/v5.0/typed-override.yaml +1 -0
- data/spec/support/v5.1/Gemfile.lock +5 -0
- data/spec/support/v5.1/app/helpers +1 -0
- data/spec/support/v5.1/config/initializers/sorbet_rails.rb +1 -0
- data/spec/support/v5.1/lib/mythical_rbi_plugin.rb +1 -0
- data/spec/support/v5.1/sorbet/rbi/sorbet-typed/lib/activerecord/all/activerecord.rbi +1 -1
- data/spec/support/v5.1/sorbet/rbi/sorbet-typed/lib/activesupport/all/activesupport.rbi +1 -1
- data/spec/support/v5.1/typed-override.yaml +1 -0
- data/spec/support/v5.2-no-sorbet/Gemfile +0 -2
- data/spec/support/v5.2-no-sorbet/Gemfile.lock +7 -5
- data/spec/support/v5.2-no-sorbet/app/helpers +1 -0
- data/spec/support/v5.2-no-sorbet/config/initializers/sorbet_rails.rb +1 -0
- data/spec/support/v5.2-no-sorbet/lib/mythical_rbi_plugin.rb +1 -0
- data/spec/support/v5.2-no-sorbet/sorbet_test_cases.rb +1 -0
- data/spec/support/v5.2-no-sorbet/typed-override.yaml +1 -0
- data/spec/support/v5.2/Gemfile +0 -2
- data/spec/support/v5.2/Gemfile.lock +7 -5
- data/spec/support/v5.2/app/helpers +1 -0
- data/spec/support/v5.2/config/initializers/sorbet_rails.rb +1 -0
- data/spec/support/v5.2/lib/mythical_rbi_plugin.rb +1 -0
- data/spec/support/v5.2/sorbet/rbi/sorbet-typed/lib/activerecord/all/activerecord.rbi +1 -1
- data/spec/support/v5.2/sorbet/rbi/sorbet-typed/lib/activesupport/all/activesupport.rbi +1 -1
- data/spec/support/v5.2/typed-override.yaml +1 -0
- data/spec/support/v6.0/Gemfile +1 -3
- data/spec/support/v6.0/Gemfile.lock +61 -59
- data/spec/support/v6.0/app/helpers +1 -0
- data/spec/support/v6.0/config/initializers/sorbet_rails.rb +1 -0
- data/spec/support/v6.0/config/routes.rb +0 -1
- data/spec/support/v6.0/lib/mythical_rbi_plugin.rb +1 -0
- data/spec/support/v6.0/sorbet/rbi/sorbet-typed/lib/activerecord/all/activerecord.rbi +1 -1
- data/spec/support/v6.0/sorbet/rbi/sorbet-typed/lib/activesupport/all/activesupport.rbi +1 -1
- data/spec/support/v6.0/typed-override.yaml +1 -0
- data/spec/test_data/v4.2/expected_helpers.rbi +17 -0
- data/spec/test_data/v4.2/expected_potion.rbi +259 -28
- data/spec/test_data/v4.2/expected_spell_book.rbi +278 -37
- data/spec/test_data/v4.2/expected_srb_tc_output.txt +1 -99
- data/spec/test_data/v4.2/expected_wand.rbi +345 -96
- data/spec/test_data/v4.2/expected_wizard.rbi +322 -76
- data/spec/test_data/v4.2/expected_wizard_wo_spellbook.rbi +322 -76
- data/spec/test_data/v5.0/expected_helpers.rbi +17 -0
- data/spec/test_data/v5.0/expected_internal_metadata.rbi +273 -37
- data/spec/test_data/v5.0/expected_potion.rbi +259 -28
- data/spec/test_data/v5.0/expected_schema_migration.rbi +264 -28
- data/spec/test_data/v5.0/expected_spell_book.rbi +278 -37
- data/spec/test_data/v5.0/expected_srb_tc_output.txt +1 -81
- data/spec/test_data/v5.0/expected_wand.rbi +341 -92
- data/spec/test_data/v5.0/expected_wizard.rbi +318 -72
- data/spec/test_data/v5.0/expected_wizard_wo_spellbook.rbi +318 -72
- data/spec/test_data/v5.1/expected_helpers.rbi +17 -0
- data/spec/test_data/v5.1/expected_internal_metadata.rbi +273 -37
- data/spec/test_data/v5.1/expected_potion.rbi +259 -28
- data/spec/test_data/v5.1/expected_schema_migration.rbi +264 -28
- data/spec/test_data/v5.1/expected_spell_book.rbi +278 -37
- data/spec/test_data/v5.1/expected_srb_tc_output.txt +1 -81
- data/spec/test_data/v5.1/expected_wand.rbi +341 -92
- data/spec/test_data/v5.1/expected_wizard.rbi +318 -72
- data/spec/test_data/v5.1/expected_wizard_wo_spellbook.rbi +318 -72
- data/spec/test_data/v5.2-no-sorbet/expected_attachment.rbi +265 -29
- data/spec/test_data/v5.2-no-sorbet/expected_blob.rbi +271 -35
- data/spec/test_data/v5.2-no-sorbet/expected_helpers.rbi +17 -0
- data/spec/test_data/v5.2-no-sorbet/expected_internal_metadata.rbi +273 -37
- data/spec/test_data/v5.2-no-sorbet/expected_potion.rbi +259 -28
- data/spec/test_data/v5.2-no-sorbet/expected_schema_migration.rbi +264 -28
- data/spec/test_data/v5.2-no-sorbet/expected_spell_book.rbi +278 -37
- data/spec/test_data/v5.2-no-sorbet/expected_srb_tc_output.txt +1 -81
- data/spec/test_data/v5.2-no-sorbet/expected_wand.rbi +351 -102
- data/spec/test_data/v5.2-no-sorbet/expected_wizard.rbi +318 -72
- data/spec/test_data/v5.2-no-sorbet/expected_wizard_wo_spellbook.rbi +318 -72
- data/spec/test_data/v5.2/expected_attachment.rbi +265 -29
- data/spec/test_data/v5.2/expected_blob.rbi +271 -35
- data/spec/test_data/v5.2/expected_helpers.rbi +17 -0
- data/spec/test_data/v5.2/expected_internal_metadata.rbi +273 -37
- data/spec/test_data/v5.2/expected_potion.rbi +259 -28
- data/spec/test_data/v5.2/expected_schema_migration.rbi +264 -28
- data/spec/test_data/v5.2/expected_spell_book.rbi +278 -37
- data/spec/test_data/v5.2/expected_srb_tc_output.txt +1 -81
- data/spec/test_data/v5.2/expected_wand.rbi +351 -102
- data/spec/test_data/v5.2/expected_wizard.rbi +318 -72
- data/spec/test_data/v5.2/expected_wizard_wo_spellbook.rbi +318 -72
- data/spec/test_data/v6.0/expected_attachment.rbi +265 -29
- data/spec/test_data/v6.0/expected_blob.rbi +271 -35
- data/spec/test_data/v6.0/expected_helpers.rbi +17 -0
- data/spec/test_data/v6.0/expected_internal_metadata.rbi +273 -37
- data/spec/test_data/v6.0/expected_potion.rbi +259 -28
- data/spec/test_data/v6.0/expected_schema_migration.rbi +264 -28
- data/spec/test_data/v6.0/expected_spell_book.rbi +278 -37
- data/spec/test_data/v6.0/expected_srb_tc_output.txt +1 -81
- data/spec/test_data/v6.0/expected_wand.rbi +351 -102
- data/spec/test_data/v6.0/expected_wizard.rbi +318 -72
- data/spec/test_data/v6.0/expected_wizard_wo_spellbook.rbi +318 -72
- metadata +120 -37
- data/lib/sorbet-rails/rbi/activerecord.rbi +0 -207
- data/spec/support/v4.2/app/helpers/application_helper.rb +0 -3
- data/spec/support/v4.2/sorbet/rbi/gems/sorbet-runtime.rbi +0 -647
- data/spec/support/v4.2/sorbet/rbi/hidden-definitions/errors.txt +0 -11998
- data/spec/support/v4.2/sorbet/rbi/hidden-definitions/hidden.rbi +0 -27774
- data/spec/support/v5.0/sorbet/rbi/gems/sorbet-runtime.rbi +0 -647
- data/spec/support/v5.0/sorbet/rbi/hidden-definitions/errors.txt +0 -10523
- data/spec/support/v5.0/sorbet/rbi/hidden-definitions/hidden.rbi +0 -24969
- data/spec/support/v5.1/sorbet/rbi/gems/sorbet-runtime.rbi +0 -647
- data/spec/support/v5.1/sorbet/rbi/hidden-definitions/errors.txt +0 -10226
- data/spec/support/v5.1/sorbet/rbi/hidden-definitions/hidden.rbi +0 -24635
- data/spec/support/v5.2/.ruby-version +0 -1
- data/spec/support/v5.2/sorbet/rbi/gems/sorbet-runtime.rbi +0 -644
- data/spec/support/v5.2/sorbet/rbi/hidden-definitions/errors.txt +0 -10046
- data/spec/support/v5.2/sorbet/rbi/hidden-definitions/hidden.rbi +0 -24424
- data/spec/support/v6.0/sorbet/rbi/gems/sorbet-runtime.rbi +0 -647
- data/spec/support/v6.0/sorbet/rbi/hidden-definitions/errors.txt +0 -12074
- data/spec/support/v6.0/sorbet/rbi/hidden-definitions/hidden.rbi +0 -28231
@@ -1,51 +1,47 @@
|
|
1
1
|
# This is an autogenerated file for dynamic methods in ActiveRecord::SchemaMigration
|
2
|
-
# Please rerun rake rails_rbi:models to regenerate.
|
3
|
-
# typed: strong
|
4
|
-
|
5
|
-
class ActiveRecord::SchemaMigration::ActiveRecord_Relation < ActiveRecord::Relation
|
6
|
-
include ActiveRecord::SchemaMigration::ModelRelationShared
|
7
|
-
extend T::Generic
|
8
|
-
Elem = type_member(fixed: ActiveRecord::SchemaMigration)
|
9
|
-
end
|
10
|
-
|
11
|
-
class ActiveRecord::SchemaMigration::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
|
12
|
-
include ActiveRecord::SchemaMigration::ModelRelationShared
|
13
|
-
extend T::Generic
|
14
|
-
Elem = type_member(fixed: ActiveRecord::SchemaMigration)
|
15
|
-
end
|
2
|
+
# Please rerun rake rails_rbi:models[ActiveRecord::SchemaMigration] to regenerate.
|
16
3
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
include ActiveRecord::SchemaMigration::InstanceMethods
|
22
|
-
Elem = type_template(fixed: ActiveRecord::SchemaMigration)
|
4
|
+
# typed: strong
|
5
|
+
module ActiveRecord::SchemaMigration::ActiveRelation_WhereNot
|
6
|
+
sig { params(opts: T.untyped, rest: T.untyped).returns(T.self_type) }
|
7
|
+
def not(opts, *rest); end
|
23
8
|
end
|
24
9
|
|
25
|
-
module ActiveRecord::SchemaMigration::
|
10
|
+
module ActiveRecord::SchemaMigration::GeneratedAttributeMethods
|
26
11
|
extend T::Sig
|
27
12
|
|
28
13
|
sig { returns(String) }
|
29
|
-
def version
|
14
|
+
def version; end
|
30
15
|
|
31
16
|
sig { params(value: String).void }
|
32
17
|
def version=(value); end
|
33
18
|
|
34
|
-
sig {
|
35
|
-
def version
|
36
|
-
|
19
|
+
sig { returns(T::Boolean) }
|
20
|
+
def version?; end
|
37
21
|
end
|
38
22
|
|
39
|
-
|
40
|
-
|
23
|
+
module ActiveRecord::SchemaMigration::CustomFinderMethods
|
24
|
+
sig { params(limit: Integer).returns(T::Array[ActiveRecord::SchemaMigration]) }
|
25
|
+
def first_n(limit); end
|
26
|
+
|
27
|
+
sig { params(limit: Integer).returns(T::Array[ActiveRecord::SchemaMigration]) }
|
28
|
+
def last_n(limit); end
|
29
|
+
|
30
|
+
sig { params(args: T::Array[T.any(Integer, String)]).returns(T::Array[ActiveRecord::SchemaMigration]) }
|
31
|
+
def find_n(*args); end
|
32
|
+
|
33
|
+
sig { params(id: Integer).returns(T.nilable(ActiveRecord::SchemaMigration)) }
|
34
|
+
def find_by_id(id); end
|
41
35
|
|
36
|
+
sig { params(id: Integer).returns(ActiveRecord::SchemaMigration) }
|
37
|
+
def find_by_id!(id); end
|
42
38
|
end
|
43
39
|
|
44
40
|
module ActiveRecord::SchemaMigration::ModelRelationShared
|
45
41
|
extend T::Sig
|
46
42
|
|
47
43
|
sig { returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
|
48
|
-
def all
|
44
|
+
def all; end
|
49
45
|
|
50
46
|
sig { params(block: T.nilable(T.proc.void)).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
|
51
47
|
def unscoped(&block); end
|
@@ -130,5 +126,245 @@ module ActiveRecord::SchemaMigration::ModelRelationShared
|
|
130
126
|
|
131
127
|
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
|
132
128
|
def except(*args, &block); end
|
129
|
+
end
|
130
|
+
|
131
|
+
class ActiveRecord::SchemaMigration::ActiveRecord_Relation < ActiveRecord::Relation
|
132
|
+
include ActiveRecord::SchemaMigration::ActiveRelation_WhereNot
|
133
|
+
include SorbetRails::CustomFinderMethods
|
134
|
+
include ActiveRecord::SchemaMigration::CustomFinderMethods
|
135
|
+
include Enumerable
|
136
|
+
include ActiveRecord::SchemaMigration::ModelRelationShared
|
137
|
+
extend T::Sig
|
138
|
+
extend T::Generic
|
139
|
+
Elem = type_member(fixed: ActiveRecord::SchemaMigration)
|
140
|
+
|
141
|
+
sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration) }
|
142
|
+
def find(*args); end
|
133
143
|
|
144
|
+
sig { params(args: T.untyped).returns(T.nilable(ActiveRecord::SchemaMigration)) }
|
145
|
+
def find_by(*args); end
|
146
|
+
|
147
|
+
sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration) }
|
148
|
+
def find_by!(*args); end
|
149
|
+
|
150
|
+
sig { returns(T.nilable(ActiveRecord::SchemaMigration)) }
|
151
|
+
def first; end
|
152
|
+
|
153
|
+
sig { returns(ActiveRecord::SchemaMigration) }
|
154
|
+
def first!; end
|
155
|
+
|
156
|
+
sig { returns(T.nilable(ActiveRecord::SchemaMigration)) }
|
157
|
+
def second; end
|
158
|
+
|
159
|
+
sig { returns(ActiveRecord::SchemaMigration) }
|
160
|
+
def second!; end
|
161
|
+
|
162
|
+
sig { returns(T.nilable(ActiveRecord::SchemaMigration)) }
|
163
|
+
def third; end
|
164
|
+
|
165
|
+
sig { returns(ActiveRecord::SchemaMigration) }
|
166
|
+
def third!; end
|
167
|
+
|
168
|
+
sig { returns(T.nilable(ActiveRecord::SchemaMigration)) }
|
169
|
+
def third_to_last; end
|
170
|
+
|
171
|
+
sig { returns(ActiveRecord::SchemaMigration) }
|
172
|
+
def third_to_last!; end
|
173
|
+
|
174
|
+
sig { returns(T.nilable(ActiveRecord::SchemaMigration)) }
|
175
|
+
def second_to_last; end
|
176
|
+
|
177
|
+
sig { returns(ActiveRecord::SchemaMigration) }
|
178
|
+
def second_to_last!; end
|
179
|
+
|
180
|
+
sig { returns(T.nilable(ActiveRecord::SchemaMigration)) }
|
181
|
+
def last; end
|
182
|
+
|
183
|
+
sig { returns(ActiveRecord::SchemaMigration) }
|
184
|
+
def last!; end
|
185
|
+
|
186
|
+
sig { params(conditions: T.untyped).returns(T::Boolean) }
|
187
|
+
def exists?(conditions = nil); end
|
188
|
+
|
189
|
+
sig { params(args: T.untyped).returns(T::Boolean) }
|
190
|
+
def any?(*args); end
|
191
|
+
|
192
|
+
sig { params(args: T.untyped).returns(T::Boolean) }
|
193
|
+
def many?(*args); end
|
194
|
+
|
195
|
+
sig { params(args: T.untyped).returns(T::Boolean) }
|
196
|
+
def none?(*args); end
|
197
|
+
|
198
|
+
sig { params(args: T.untyped).returns(T::Boolean) }
|
199
|
+
def one?(*args); end
|
200
|
+
|
201
|
+
sig { implementation.params(block: T.proc.params(e: ActiveRecord::SchemaMigration).void).void }
|
202
|
+
def each(&block); end
|
203
|
+
|
204
|
+
sig { params(level: T.nilable(Integer)).returns(T::Array[ActiveRecord::SchemaMigration]) }
|
205
|
+
def flatten(level); end
|
206
|
+
|
207
|
+
sig { returns(T::Array[ActiveRecord::SchemaMigration]) }
|
208
|
+
def to_a; end
|
209
|
+
end
|
210
|
+
|
211
|
+
class ActiveRecord::SchemaMigration::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
|
212
|
+
include ActiveRecord::SchemaMigration::ActiveRelation_WhereNot
|
213
|
+
include SorbetRails::CustomFinderMethods
|
214
|
+
include ActiveRecord::SchemaMigration::CustomFinderMethods
|
215
|
+
include Enumerable
|
216
|
+
include ActiveRecord::SchemaMigration::ModelRelationShared
|
217
|
+
extend T::Sig
|
218
|
+
extend T::Generic
|
219
|
+
Elem = type_member(fixed: ActiveRecord::SchemaMigration)
|
220
|
+
|
221
|
+
sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration) }
|
222
|
+
def find(*args); end
|
223
|
+
|
224
|
+
sig { params(args: T.untyped).returns(T.nilable(ActiveRecord::SchemaMigration)) }
|
225
|
+
def find_by(*args); end
|
226
|
+
|
227
|
+
sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration) }
|
228
|
+
def find_by!(*args); end
|
229
|
+
|
230
|
+
sig { returns(T.nilable(ActiveRecord::SchemaMigration)) }
|
231
|
+
def first; end
|
232
|
+
|
233
|
+
sig { returns(ActiveRecord::SchemaMigration) }
|
234
|
+
def first!; end
|
235
|
+
|
236
|
+
sig { returns(T.nilable(ActiveRecord::SchemaMigration)) }
|
237
|
+
def second; end
|
238
|
+
|
239
|
+
sig { returns(ActiveRecord::SchemaMigration) }
|
240
|
+
def second!; end
|
241
|
+
|
242
|
+
sig { returns(T.nilable(ActiveRecord::SchemaMigration)) }
|
243
|
+
def third; end
|
244
|
+
|
245
|
+
sig { returns(ActiveRecord::SchemaMigration) }
|
246
|
+
def third!; end
|
247
|
+
|
248
|
+
sig { returns(T.nilable(ActiveRecord::SchemaMigration)) }
|
249
|
+
def third_to_last; end
|
250
|
+
|
251
|
+
sig { returns(ActiveRecord::SchemaMigration) }
|
252
|
+
def third_to_last!; end
|
253
|
+
|
254
|
+
sig { returns(T.nilable(ActiveRecord::SchemaMigration)) }
|
255
|
+
def second_to_last; end
|
256
|
+
|
257
|
+
sig { returns(ActiveRecord::SchemaMigration) }
|
258
|
+
def second_to_last!; end
|
259
|
+
|
260
|
+
sig { returns(T.nilable(ActiveRecord::SchemaMigration)) }
|
261
|
+
def last; end
|
262
|
+
|
263
|
+
sig { returns(ActiveRecord::SchemaMigration) }
|
264
|
+
def last!; end
|
265
|
+
|
266
|
+
sig { params(conditions: T.untyped).returns(T::Boolean) }
|
267
|
+
def exists?(conditions = nil); end
|
268
|
+
|
269
|
+
sig { params(args: T.untyped).returns(T::Boolean) }
|
270
|
+
def any?(*args); end
|
271
|
+
|
272
|
+
sig { params(args: T.untyped).returns(T::Boolean) }
|
273
|
+
def many?(*args); end
|
274
|
+
|
275
|
+
sig { params(args: T.untyped).returns(T::Boolean) }
|
276
|
+
def none?(*args); end
|
277
|
+
|
278
|
+
sig { params(args: T.untyped).returns(T::Boolean) }
|
279
|
+
def one?(*args); end
|
280
|
+
|
281
|
+
sig { implementation.params(block: T.proc.params(e: ActiveRecord::SchemaMigration).void).void }
|
282
|
+
def each(&block); end
|
283
|
+
|
284
|
+
sig { params(level: T.nilable(Integer)).returns(T::Array[ActiveRecord::SchemaMigration]) }
|
285
|
+
def flatten(level); end
|
286
|
+
|
287
|
+
sig { returns(T::Array[ActiveRecord::SchemaMigration]) }
|
288
|
+
def to_a; end
|
289
|
+
|
290
|
+
sig { params(records: T.any(ActiveRecord::SchemaMigration, T::Array[ActiveRecord::SchemaMigration])).returns(T.self_type) }
|
291
|
+
def <<(*records); end
|
292
|
+
|
293
|
+
sig { params(records: T.any(ActiveRecord::SchemaMigration, T::Array[ActiveRecord::SchemaMigration])).returns(T.self_type) }
|
294
|
+
def append(*records); end
|
295
|
+
|
296
|
+
sig { params(records: T.any(ActiveRecord::SchemaMigration, T::Array[ActiveRecord::SchemaMigration])).returns(T.self_type) }
|
297
|
+
def push(*records); end
|
298
|
+
|
299
|
+
sig { params(records: T.any(ActiveRecord::SchemaMigration, T::Array[ActiveRecord::SchemaMigration])).returns(T.self_type) }
|
300
|
+
def concat(*records); end
|
301
|
+
end
|
302
|
+
|
303
|
+
class ActiveRecord::SchemaMigration < ActiveRecord::Base
|
304
|
+
include ActiveRecord::SchemaMigration::GeneratedAttributeMethods
|
305
|
+
extend SorbetRails::CustomFinderMethods
|
306
|
+
extend ActiveRecord::SchemaMigration::CustomFinderMethods
|
307
|
+
extend T::Sig
|
308
|
+
extend T::Generic
|
309
|
+
extend ActiveRecord::SchemaMigration::ModelRelationShared
|
310
|
+
|
311
|
+
sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration) }
|
312
|
+
def self.find(*args); end
|
313
|
+
|
314
|
+
sig { params(args: T.untyped).returns(T.nilable(ActiveRecord::SchemaMigration)) }
|
315
|
+
def self.find_by(*args); end
|
316
|
+
|
317
|
+
sig { params(args: T.untyped).returns(ActiveRecord::SchemaMigration) }
|
318
|
+
def self.find_by!(*args); end
|
319
|
+
|
320
|
+
sig { returns(T.nilable(ActiveRecord::SchemaMigration)) }
|
321
|
+
def self.first; end
|
322
|
+
|
323
|
+
sig { returns(ActiveRecord::SchemaMigration) }
|
324
|
+
def self.first!; end
|
325
|
+
|
326
|
+
sig { returns(T.nilable(ActiveRecord::SchemaMigration)) }
|
327
|
+
def self.second; end
|
328
|
+
|
329
|
+
sig { returns(ActiveRecord::SchemaMigration) }
|
330
|
+
def self.second!; end
|
331
|
+
|
332
|
+
sig { returns(T.nilable(ActiveRecord::SchemaMigration)) }
|
333
|
+
def self.third; end
|
334
|
+
|
335
|
+
sig { returns(ActiveRecord::SchemaMigration) }
|
336
|
+
def self.third!; end
|
337
|
+
|
338
|
+
sig { returns(T.nilable(ActiveRecord::SchemaMigration)) }
|
339
|
+
def self.third_to_last; end
|
340
|
+
|
341
|
+
sig { returns(ActiveRecord::SchemaMigration) }
|
342
|
+
def self.third_to_last!; end
|
343
|
+
|
344
|
+
sig { returns(T.nilable(ActiveRecord::SchemaMigration)) }
|
345
|
+
def self.second_to_last; end
|
346
|
+
|
347
|
+
sig { returns(ActiveRecord::SchemaMigration) }
|
348
|
+
def self.second_to_last!; end
|
349
|
+
|
350
|
+
sig { returns(T.nilable(ActiveRecord::SchemaMigration)) }
|
351
|
+
def self.last; end
|
352
|
+
|
353
|
+
sig { returns(ActiveRecord::SchemaMigration) }
|
354
|
+
def self.last!; end
|
355
|
+
|
356
|
+
sig { params(conditions: T.untyped).returns(T::Boolean) }
|
357
|
+
def self.exists?(conditions = nil); end
|
358
|
+
|
359
|
+
sig { params(args: T.untyped).returns(T::Boolean) }
|
360
|
+
def self.any?(*args); end
|
361
|
+
|
362
|
+
sig { params(args: T.untyped).returns(T::Boolean) }
|
363
|
+
def self.many?(*args); end
|
364
|
+
|
365
|
+
sig { params(args: T.untyped).returns(T::Boolean) }
|
366
|
+
def self.none?(*args); end
|
367
|
+
|
368
|
+
sig { params(args: T.untyped).returns(T::Boolean) }
|
369
|
+
def self.one?(*args); end
|
134
370
|
end
|
@@ -1,82 +1,82 @@
|
|
1
1
|
# This is an autogenerated file for dynamic methods in SpellBook
|
2
|
-
# Please rerun rake rails_rbi:models to regenerate.
|
3
|
-
# typed: strong
|
2
|
+
# Please rerun rake rails_rbi:models[SpellBook] to regenerate.
|
4
3
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
end
|
10
|
-
|
11
|
-
class SpellBook::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
|
12
|
-
include SpellBook::ModelRelationShared
|
13
|
-
extend T::Generic
|
14
|
-
Elem = type_member(fixed: SpellBook)
|
15
|
-
end
|
16
|
-
|
17
|
-
class SpellBook < ApplicationRecord
|
18
|
-
extend T::Sig
|
19
|
-
extend T::Generic
|
20
|
-
extend SpellBook::ModelRelationShared
|
21
|
-
include SpellBook::InstanceMethods
|
22
|
-
Elem = type_template(fixed: SpellBook)
|
4
|
+
# typed: strong
|
5
|
+
module SpellBook::ActiveRelation_WhereNot
|
6
|
+
sig { params(opts: T.untyped, rest: T.untyped).returns(T.self_type) }
|
7
|
+
def not(opts, *rest); end
|
23
8
|
end
|
24
9
|
|
25
|
-
module SpellBook::
|
10
|
+
module SpellBook::GeneratedAttributeMethods
|
26
11
|
extend T::Sig
|
27
12
|
|
28
13
|
sig { returns(Integer) }
|
29
|
-
def id
|
14
|
+
def id; end
|
30
15
|
|
31
16
|
sig { params(value: Integer).void }
|
32
17
|
def id=(value); end
|
33
18
|
|
34
|
-
sig {
|
35
|
-
def id
|
19
|
+
sig { returns(T::Boolean) }
|
20
|
+
def id?; end
|
36
21
|
|
37
22
|
sig { returns(T.nilable(String)) }
|
38
|
-
def name
|
23
|
+
def name; end
|
39
24
|
|
40
25
|
sig { params(value: T.nilable(String)).void }
|
41
26
|
def name=(value); end
|
42
27
|
|
43
|
-
sig {
|
44
|
-
def name
|
28
|
+
sig { returns(T::Boolean) }
|
29
|
+
def name?; end
|
45
30
|
|
46
31
|
sig { returns(T.nilable(Integer)) }
|
47
|
-
def wizard_id
|
32
|
+
def wizard_id; end
|
48
33
|
|
49
34
|
sig { params(value: T.nilable(Integer)).void }
|
50
35
|
def wizard_id=(value); end
|
51
36
|
|
52
|
-
sig {
|
53
|
-
def wizard_id
|
54
|
-
|
37
|
+
sig { returns(T::Boolean) }
|
38
|
+
def wizard_id?; end
|
55
39
|
end
|
56
40
|
|
57
|
-
|
41
|
+
module SpellBook::GeneratedAssociationMethods
|
58
42
|
extend T::Sig
|
59
43
|
|
60
44
|
sig { returns(T.nilable(::Wizard)) }
|
61
|
-
def wizard
|
45
|
+
def wizard; end
|
62
46
|
|
63
47
|
sig { params(value: T.nilable(::Wizard)).void }
|
64
48
|
def wizard=(value); end
|
49
|
+
end
|
50
|
+
|
51
|
+
module SpellBook::CustomFinderMethods
|
52
|
+
sig { params(limit: Integer).returns(T::Array[SpellBook]) }
|
53
|
+
def first_n(limit); end
|
54
|
+
|
55
|
+
sig { params(limit: Integer).returns(T::Array[SpellBook]) }
|
56
|
+
def last_n(limit); end
|
57
|
+
|
58
|
+
sig { params(args: T::Array[T.any(Integer, String)]).returns(T::Array[SpellBook]) }
|
59
|
+
def find_n(*args); end
|
65
60
|
|
61
|
+
sig { params(id: Integer).returns(T.nilable(SpellBook)) }
|
62
|
+
def find_by_id(id); end
|
63
|
+
|
64
|
+
sig { params(id: Integer).returns(SpellBook) }
|
65
|
+
def find_by_id!(id); end
|
66
66
|
end
|
67
67
|
|
68
68
|
module SpellBook::ModelRelationShared
|
69
69
|
extend T::Sig
|
70
70
|
|
71
|
+
sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_Relation) }
|
72
|
+
def recent(*args); end
|
73
|
+
|
71
74
|
sig { returns(SpellBook::ActiveRecord_Relation) }
|
72
|
-
def all
|
75
|
+
def all; end
|
73
76
|
|
74
77
|
sig { params(block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_Relation) }
|
75
78
|
def unscoped(&block); end
|
76
79
|
|
77
|
-
sig { params(args: T.untyped).returns(SpellBook::ActiveRecord_Relation) }
|
78
|
-
def recent(*args); end
|
79
|
-
|
80
80
|
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_Relation) }
|
81
81
|
def select(*args, &block); end
|
82
82
|
|
@@ -157,5 +157,246 @@ module SpellBook::ModelRelationShared
|
|
157
157
|
|
158
158
|
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(SpellBook::ActiveRecord_Relation) }
|
159
159
|
def except(*args, &block); end
|
160
|
+
end
|
161
|
+
|
162
|
+
class SpellBook::ActiveRecord_Relation < ActiveRecord::Relation
|
163
|
+
include SpellBook::ActiveRelation_WhereNot
|
164
|
+
include SorbetRails::CustomFinderMethods
|
165
|
+
include SpellBook::CustomFinderMethods
|
166
|
+
include Enumerable
|
167
|
+
include SpellBook::ModelRelationShared
|
168
|
+
extend T::Sig
|
169
|
+
extend T::Generic
|
170
|
+
Elem = type_member(fixed: SpellBook)
|
171
|
+
|
172
|
+
sig { params(args: T.untyped).returns(SpellBook) }
|
173
|
+
def find(*args); end
|
174
|
+
|
175
|
+
sig { params(args: T.untyped).returns(T.nilable(SpellBook)) }
|
176
|
+
def find_by(*args); end
|
177
|
+
|
178
|
+
sig { params(args: T.untyped).returns(SpellBook) }
|
179
|
+
def find_by!(*args); end
|
180
|
+
|
181
|
+
sig { returns(T.nilable(SpellBook)) }
|
182
|
+
def first; end
|
183
|
+
|
184
|
+
sig { returns(SpellBook) }
|
185
|
+
def first!; end
|
186
|
+
|
187
|
+
sig { returns(T.nilable(SpellBook)) }
|
188
|
+
def second; end
|
189
|
+
|
190
|
+
sig { returns(SpellBook) }
|
191
|
+
def second!; end
|
192
|
+
|
193
|
+
sig { returns(T.nilable(SpellBook)) }
|
194
|
+
def third; end
|
195
|
+
|
196
|
+
sig { returns(SpellBook) }
|
197
|
+
def third!; end
|
198
|
+
|
199
|
+
sig { returns(T.nilable(SpellBook)) }
|
200
|
+
def third_to_last; end
|
201
|
+
|
202
|
+
sig { returns(SpellBook) }
|
203
|
+
def third_to_last!; end
|
204
|
+
|
205
|
+
sig { returns(T.nilable(SpellBook)) }
|
206
|
+
def second_to_last; end
|
207
|
+
|
208
|
+
sig { returns(SpellBook) }
|
209
|
+
def second_to_last!; end
|
210
|
+
|
211
|
+
sig { returns(T.nilable(SpellBook)) }
|
212
|
+
def last; end
|
213
|
+
|
214
|
+
sig { returns(SpellBook) }
|
215
|
+
def last!; end
|
216
|
+
|
217
|
+
sig { params(conditions: T.untyped).returns(T::Boolean) }
|
218
|
+
def exists?(conditions = nil); end
|
219
|
+
|
220
|
+
sig { params(args: T.untyped).returns(T::Boolean) }
|
221
|
+
def any?(*args); end
|
222
|
+
|
223
|
+
sig { params(args: T.untyped).returns(T::Boolean) }
|
224
|
+
def many?(*args); end
|
225
|
+
|
226
|
+
sig { params(args: T.untyped).returns(T::Boolean) }
|
227
|
+
def none?(*args); end
|
228
|
+
|
229
|
+
sig { params(args: T.untyped).returns(T::Boolean) }
|
230
|
+
def one?(*args); end
|
231
|
+
|
232
|
+
sig { implementation.params(block: T.proc.params(e: SpellBook).void).void }
|
233
|
+
def each(&block); end
|
234
|
+
|
235
|
+
sig { params(level: T.nilable(Integer)).returns(T::Array[SpellBook]) }
|
236
|
+
def flatten(level); end
|
237
|
+
|
238
|
+
sig { returns(T::Array[SpellBook]) }
|
239
|
+
def to_a; end
|
240
|
+
end
|
241
|
+
|
242
|
+
class SpellBook::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
|
243
|
+
include SpellBook::ActiveRelation_WhereNot
|
244
|
+
include SorbetRails::CustomFinderMethods
|
245
|
+
include SpellBook::CustomFinderMethods
|
246
|
+
include Enumerable
|
247
|
+
include SpellBook::ModelRelationShared
|
248
|
+
extend T::Sig
|
249
|
+
extend T::Generic
|
250
|
+
Elem = type_member(fixed: SpellBook)
|
251
|
+
|
252
|
+
sig { params(args: T.untyped).returns(SpellBook) }
|
253
|
+
def find(*args); end
|
254
|
+
|
255
|
+
sig { params(args: T.untyped).returns(T.nilable(SpellBook)) }
|
256
|
+
def find_by(*args); end
|
257
|
+
|
258
|
+
sig { params(args: T.untyped).returns(SpellBook) }
|
259
|
+
def find_by!(*args); end
|
260
|
+
|
261
|
+
sig { returns(T.nilable(SpellBook)) }
|
262
|
+
def first; end
|
263
|
+
|
264
|
+
sig { returns(SpellBook) }
|
265
|
+
def first!; end
|
266
|
+
|
267
|
+
sig { returns(T.nilable(SpellBook)) }
|
268
|
+
def second; end
|
269
|
+
|
270
|
+
sig { returns(SpellBook) }
|
271
|
+
def second!; end
|
272
|
+
|
273
|
+
sig { returns(T.nilable(SpellBook)) }
|
274
|
+
def third; end
|
275
|
+
|
276
|
+
sig { returns(SpellBook) }
|
277
|
+
def third!; end
|
278
|
+
|
279
|
+
sig { returns(T.nilable(SpellBook)) }
|
280
|
+
def third_to_last; end
|
281
|
+
|
282
|
+
sig { returns(SpellBook) }
|
283
|
+
def third_to_last!; end
|
284
|
+
|
285
|
+
sig { returns(T.nilable(SpellBook)) }
|
286
|
+
def second_to_last; end
|
287
|
+
|
288
|
+
sig { returns(SpellBook) }
|
289
|
+
def second_to_last!; end
|
290
|
+
|
291
|
+
sig { returns(T.nilable(SpellBook)) }
|
292
|
+
def last; end
|
293
|
+
|
294
|
+
sig { returns(SpellBook) }
|
295
|
+
def last!; end
|
296
|
+
|
297
|
+
sig { params(conditions: T.untyped).returns(T::Boolean) }
|
298
|
+
def exists?(conditions = nil); end
|
299
|
+
|
300
|
+
sig { params(args: T.untyped).returns(T::Boolean) }
|
301
|
+
def any?(*args); end
|
302
|
+
|
303
|
+
sig { params(args: T.untyped).returns(T::Boolean) }
|
304
|
+
def many?(*args); end
|
305
|
+
|
306
|
+
sig { params(args: T.untyped).returns(T::Boolean) }
|
307
|
+
def none?(*args); end
|
308
|
+
|
309
|
+
sig { params(args: T.untyped).returns(T::Boolean) }
|
310
|
+
def one?(*args); end
|
311
|
+
|
312
|
+
sig { implementation.params(block: T.proc.params(e: SpellBook).void).void }
|
313
|
+
def each(&block); end
|
314
|
+
|
315
|
+
sig { params(level: T.nilable(Integer)).returns(T::Array[SpellBook]) }
|
316
|
+
def flatten(level); end
|
317
|
+
|
318
|
+
sig { returns(T::Array[SpellBook]) }
|
319
|
+
def to_a; end
|
160
320
|
|
321
|
+
sig { params(records: T.any(SpellBook, T::Array[SpellBook])).returns(T.self_type) }
|
322
|
+
def <<(*records); end
|
323
|
+
|
324
|
+
sig { params(records: T.any(SpellBook, T::Array[SpellBook])).returns(T.self_type) }
|
325
|
+
def append(*records); end
|
326
|
+
|
327
|
+
sig { params(records: T.any(SpellBook, T::Array[SpellBook])).returns(T.self_type) }
|
328
|
+
def push(*records); end
|
329
|
+
|
330
|
+
sig { params(records: T.any(SpellBook, T::Array[SpellBook])).returns(T.self_type) }
|
331
|
+
def concat(*records); end
|
332
|
+
end
|
333
|
+
|
334
|
+
class SpellBook < ApplicationRecord
|
335
|
+
include SpellBook::GeneratedAttributeMethods
|
336
|
+
include SpellBook::GeneratedAssociationMethods
|
337
|
+
extend SorbetRails::CustomFinderMethods
|
338
|
+
extend SpellBook::CustomFinderMethods
|
339
|
+
extend T::Sig
|
340
|
+
extend T::Generic
|
341
|
+
extend SpellBook::ModelRelationShared
|
342
|
+
|
343
|
+
sig { params(args: T.untyped).returns(SpellBook) }
|
344
|
+
def self.find(*args); end
|
345
|
+
|
346
|
+
sig { params(args: T.untyped).returns(T.nilable(SpellBook)) }
|
347
|
+
def self.find_by(*args); end
|
348
|
+
|
349
|
+
sig { params(args: T.untyped).returns(SpellBook) }
|
350
|
+
def self.find_by!(*args); end
|
351
|
+
|
352
|
+
sig { returns(T.nilable(SpellBook)) }
|
353
|
+
def self.first; end
|
354
|
+
|
355
|
+
sig { returns(SpellBook) }
|
356
|
+
def self.first!; end
|
357
|
+
|
358
|
+
sig { returns(T.nilable(SpellBook)) }
|
359
|
+
def self.second; end
|
360
|
+
|
361
|
+
sig { returns(SpellBook) }
|
362
|
+
def self.second!; end
|
363
|
+
|
364
|
+
sig { returns(T.nilable(SpellBook)) }
|
365
|
+
def self.third; end
|
366
|
+
|
367
|
+
sig { returns(SpellBook) }
|
368
|
+
def self.third!; end
|
369
|
+
|
370
|
+
sig { returns(T.nilable(SpellBook)) }
|
371
|
+
def self.third_to_last; end
|
372
|
+
|
373
|
+
sig { returns(SpellBook) }
|
374
|
+
def self.third_to_last!; end
|
375
|
+
|
376
|
+
sig { returns(T.nilable(SpellBook)) }
|
377
|
+
def self.second_to_last; end
|
378
|
+
|
379
|
+
sig { returns(SpellBook) }
|
380
|
+
def self.second_to_last!; end
|
381
|
+
|
382
|
+
sig { returns(T.nilable(SpellBook)) }
|
383
|
+
def self.last; end
|
384
|
+
|
385
|
+
sig { returns(SpellBook) }
|
386
|
+
def self.last!; end
|
387
|
+
|
388
|
+
sig { params(conditions: T.untyped).returns(T::Boolean) }
|
389
|
+
def self.exists?(conditions = nil); end
|
390
|
+
|
391
|
+
sig { params(args: T.untyped).returns(T::Boolean) }
|
392
|
+
def self.any?(*args); end
|
393
|
+
|
394
|
+
sig { params(args: T.untyped).returns(T::Boolean) }
|
395
|
+
def self.many?(*args); end
|
396
|
+
|
397
|
+
sig { params(args: T.untyped).returns(T::Boolean) }
|
398
|
+
def self.none?(*args); end
|
399
|
+
|
400
|
+
sig { params(args: T.untyped).returns(T::Boolean) }
|
401
|
+
def self.one?(*args); end
|
161
402
|
end
|