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.
- checksums.yaml +4 -4
- data/.travis.yml +2 -0
- data/README.md +3 -3
- data/lib/bundled_rbi/typed_enum.rbi +7 -0
- data/lib/sorbet-rails.rb +0 -2
- data/lib/sorbet-rails/active_record_rbi_formatter.rb +301 -0
- data/lib/sorbet-rails/config.rb +0 -1
- data/lib/sorbet-rails/dependent_gem_rbis/activerecord.rbi +11 -0
- data/lib/sorbet-rails/deprecation.rb +5 -0
- data/lib/sorbet-rails/gem_plugins/active_flag_plugin.rb +0 -1
- data/lib/sorbet-rails/gem_plugins/paperclip_plugin.rb +0 -1
- data/lib/sorbet-rails/model_plugins/active_record_assoc.rb +36 -8
- data/lib/sorbet-rails/model_plugins/active_record_attribute.rb +20 -9
- data/lib/sorbet-rails/model_plugins/active_record_enum.rb +0 -1
- data/lib/sorbet-rails/model_plugins/active_record_named_scope.rb +15 -6
- data/lib/sorbet-rails/model_plugins/active_record_querying.rb +34 -3
- data/lib/sorbet-rails/model_plugins/active_storage_methods.rb +1 -1
- data/lib/sorbet-rails/model_plugins/base.rb +10 -0
- data/lib/sorbet-rails/model_plugins/enumerable_collections.rb +0 -50
- data/lib/sorbet-rails/model_plugins/plugins.rb +0 -3
- data/lib/sorbet-rails/model_rbi_formatter.rb +6 -10
- data/lib/sorbet-rails/model_utils.rb +83 -36
- data/lib/sorbet-rails/rails_mixins/generated_url_helpers.rb +2 -3
- data/lib/sorbet-rails/railtie.rb +0 -2
- data/lib/sorbet-rails/tasks/rails_rbi.rake +32 -24
- data/sorbet-rails.gemspec +2 -2
- data/spec/active_record_rbi_formatter_spec.rb +24 -0
- data/spec/generators/rails-template.rb +90 -6
- data/spec/generators/sorbet_test_cases.rb +204 -122
- data/spec/model_rbi_formatter_spec.rb +1 -1
- data/spec/rails_helper.rb +14 -1
- data/spec/rake_rails_rbi_active_record_spec.rb +21 -0
- data/spec/rake_rails_rbi_models_spec.rb +7 -0
- data/spec/sorbet_spec.rb +12 -1
- data/spec/support/v5.0/Gemfile.lock +8 -8
- data/spec/support/v5.0/app/models/headmaster.rb +8 -0
- data/spec/support/v5.0/app/models/school.rb +2 -0
- data/spec/support/v5.0/app/models/spell.rb +5 -0
- data/spec/support/v5.0/app/models/spell_book.rb +5 -0
- data/spec/support/v5.0/app/models/subject.rb +5 -0
- data/spec/support/v5.0/app/models/wizard.rb +6 -1
- data/spec/support/v5.0/db/migrate/20190620000010_add_subject.rb +8 -0
- data/spec/support/v5.0/db/migrate/20190620000011_add_subjects_wizards.rb +8 -0
- data/spec/support/v5.0/db/migrate/20190620000012_add_spell.rb +8 -0
- data/spec/support/v5.0/db/migrate/20190620000013_add_spells_spell_books.rb +8 -0
- data/spec/support/v5.0/db/migrate/20190620000014_create_headmasters.rb +9 -0
- data/spec/support/v5.0/db/schema.rb +28 -1
- data/spec/support/v5.0/lib/mythical_rbi_plugin.rb +1 -1
- data/spec/support/v5.0/sorbet_test_cases.rb +204 -122
- data/spec/support/v5.1/Gemfile.lock +8 -8
- data/spec/support/v5.1/app/models/headmaster.rb +8 -0
- data/spec/support/v5.1/app/models/school.rb +2 -0
- data/spec/support/v5.1/app/models/spell.rb +5 -0
- data/spec/support/v5.1/app/models/spell_book.rb +5 -0
- data/spec/support/v5.1/app/models/subject.rb +5 -0
- data/spec/support/v5.1/app/models/wizard.rb +6 -1
- data/spec/support/v5.1/db/migrate/20190620000010_add_subject.rb +8 -0
- data/spec/support/v5.1/db/migrate/20190620000011_add_subjects_wizards.rb +8 -0
- data/spec/support/v5.1/db/migrate/20190620000012_add_spell.rb +8 -0
- data/spec/support/v5.1/db/migrate/20190620000013_add_spells_spell_books.rb +8 -0
- data/spec/support/v5.1/db/migrate/20190620000014_create_headmasters.rb +9 -0
- data/spec/support/v5.1/db/schema.rb +28 -1
- data/spec/support/v5.1/lib/mythical_rbi_plugin.rb +1 -1
- data/spec/support/v5.1/sorbet_test_cases.rb +204 -122
- data/spec/support/v5.2/Gemfile +1 -1
- data/spec/support/v5.2/Gemfile.lock +9 -9
- data/spec/support/v5.2/app/models/headmaster.rb +8 -0
- data/spec/support/v5.2/app/models/school.rb +2 -0
- data/spec/support/v5.2/app/models/spell.rb +5 -0
- data/spec/support/v5.2/app/models/spell_book.rb +5 -0
- data/spec/support/v5.2/app/models/subject.rb +5 -0
- data/spec/support/v5.2/app/models/wizard.rb +5 -0
- data/spec/support/v5.2/config/puma.rb +3 -0
- data/spec/support/v5.2/db/migrate/20190620000010_add_subject.rb +8 -0
- data/spec/support/v5.2/db/migrate/20190620000011_add_subjects_wizards.rb +8 -0
- data/spec/support/v5.2/db/migrate/20190620000012_add_spell.rb +8 -0
- data/spec/support/v5.2/db/migrate/20190620000013_add_spells_spell_books.rb +8 -0
- data/spec/support/v5.2/db/migrate/20190620000014_create_headmasters.rb +9 -0
- data/spec/support/v5.2/db/schema.rb +28 -1
- data/spec/support/v5.2/lib/mythical_rbi_plugin.rb +1 -1
- data/spec/support/v5.2/sorbet_test_cases.rb +204 -122
- data/spec/support/v6.0/Gemfile.lock +8 -8
- data/spec/support/v6.0/app/models/headmaster.rb +8 -0
- data/spec/support/v6.0/app/models/school.rb +2 -0
- data/spec/support/v6.0/app/models/spell.rb +5 -0
- data/spec/support/v6.0/app/models/spell_book.rb +5 -0
- data/spec/support/v6.0/app/models/subject.rb +5 -0
- data/spec/support/v6.0/app/models/wizard.rb +6 -1
- data/spec/support/v6.0/db/migrate/20190620000010_add_subject.rb +8 -0
- data/spec/support/v6.0/db/migrate/20190620000011_add_subjects_wizards.rb +8 -0
- data/spec/support/v6.0/db/migrate/20190620000012_add_spell.rb +8 -0
- data/spec/support/v6.0/db/migrate/20190620000013_add_spells_spell_books.rb +8 -0
- data/spec/support/v6.0/db/migrate/20190620000014_create_headmasters.rb +9 -0
- data/spec/support/v6.0/db/schema.rb +28 -1
- data/spec/support/v6.0/lib/mythical_rbi_plugin.rb +1 -1
- data/spec/support/v6.0/sorbet_test_cases.rb +204 -122
- data/spec/test_data/v5.0/expected_active_record_base.rbi +113 -0
- data/spec/test_data/v5.0/expected_active_record_relation.rbi +199 -0
- data/spec/test_data/v5.0/expected_habtm_subjects.rbi +660 -0
- data/spec/test_data/v5.0/expected_habtm_wizards.rbi +660 -0
- data/spec/test_data/v5.0/expected_headmaster.rbi +304 -0
- data/spec/test_data/v5.0/expected_internal_metadata.rbi +38 -401
- data/spec/test_data/v5.0/expected_potion.rbi +38 -401
- data/spec/test_data/v5.0/expected_robe.rbi +38 -403
- data/spec/test_data/v5.0/expected_schema_migration.rbi +38 -401
- data/spec/test_data/v5.0/expected_school.rbi +47 -401
- data/spec/test_data/v5.0/expected_spell.rbi +292 -0
- data/spec/test_data/v5.0/expected_spell/habtm_spell_books.rbi +295 -0
- data/spec/test_data/v5.0/expected_spell_book.rbi +86 -432
- data/spec/test_data/v5.0/expected_spell_book/habtm_spell_books.rbi +637 -0
- data/spec/test_data/v5.0/expected_spell_book/habtm_spells.rbi +295 -0
- data/spec/test_data/v5.0/expected_squib.rbi +122 -477
- data/spec/test_data/v5.0/expected_subject.rbi +292 -0
- data/spec/test_data/v5.0/expected_subject/habtm_wizards.rbi +295 -0
- data/spec/test_data/v5.0/expected_wand.rbi +75 -442
- data/spec/test_data/v5.0/expected_wizard.rbi +144 -498
- data/spec/test_data/v5.0/expected_wizard/habtm_subjects.rbi +295 -0
- data/spec/test_data/v5.0/expected_wizard_wo_spellbook.rbi +138 -498
- data/spec/test_data/v5.1/expected_active_record_base.rbi +113 -0
- data/spec/test_data/v5.1/expected_active_record_relation.rbi +178 -0
- data/spec/test_data/v5.1/expected_habtm_subjects.rbi +672 -0
- data/spec/test_data/v5.1/expected_habtm_wizards.rbi +672 -0
- data/spec/test_data/v5.1/expected_headmaster.rbi +310 -0
- data/spec/test_data/v5.1/expected_internal_metadata.rbi +38 -407
- data/spec/test_data/v5.1/expected_potion.rbi +38 -407
- data/spec/test_data/v5.1/expected_robe.rbi +38 -409
- data/spec/test_data/v5.1/expected_schema_migration.rbi +38 -407
- data/spec/test_data/v5.1/expected_school.rbi +47 -407
- data/spec/test_data/v5.1/expected_spell.rbi +298 -0
- data/spec/test_data/v5.1/expected_spell/habtm_spell_books.rbi +301 -0
- data/spec/test_data/v5.1/expected_spell_book.rbi +86 -438
- data/spec/test_data/v5.1/expected_spell_book/habtm_spell_books.rbi +649 -0
- data/spec/test_data/v5.1/expected_spell_book/habtm_spells.rbi +301 -0
- data/spec/test_data/v5.1/expected_squib.rbi +123 -484
- data/spec/test_data/v5.1/expected_subject.rbi +298 -0
- data/spec/test_data/v5.1/expected_subject/habtm_wizards.rbi +301 -0
- data/spec/test_data/v5.1/expected_wand.rbi +75 -448
- data/spec/test_data/v5.1/expected_wizard.rbi +145 -505
- data/spec/test_data/v5.1/expected_wizard/habtm_subjects.rbi +301 -0
- data/spec/test_data/v5.1/expected_wizard_wo_spellbook.rbi +139 -505
- data/spec/test_data/v5.2/expected_active_record_base.rbi +113 -0
- data/spec/test_data/v5.2/expected_active_record_relation.rbi +175 -0
- data/spec/test_data/v5.2/expected_attachment.rbi +38 -407
- data/spec/test_data/v5.2/expected_blob.rbi +60 -426
- data/spec/test_data/v5.2/expected_habtm_subjects.rbi +672 -0
- data/spec/test_data/v5.2/expected_habtm_wizards.rbi +672 -0
- data/spec/test_data/v5.2/expected_headmaster.rbi +310 -0
- data/spec/test_data/v5.2/expected_internal_metadata.rbi +38 -407
- data/spec/test_data/v5.2/expected_potion.rbi +38 -407
- data/spec/test_data/v5.2/expected_robe.rbi +38 -409
- data/spec/test_data/v5.2/expected_schema_migration.rbi +38 -407
- data/spec/test_data/v5.2/expected_school.rbi +47 -407
- data/spec/test_data/v5.2/expected_spell.rbi +298 -0
- data/spec/test_data/v5.2/expected_spell/habtm_spell_books.rbi +301 -0
- data/spec/test_data/v5.2/expected_spell_book.rbi +86 -438
- data/spec/test_data/v5.2/expected_spell_book/habtm_spell_books.rbi +649 -0
- data/spec/test_data/v5.2/expected_spell_book/habtm_spells.rbi +301 -0
- data/spec/test_data/v5.2/expected_squib.rbi +133 -488
- data/spec/test_data/v5.2/expected_subject.rbi +298 -0
- data/spec/test_data/v5.2/expected_subject/habtm_wizards.rbi +301 -0
- data/spec/test_data/v5.2/expected_wand.rbi +75 -448
- data/spec/test_data/v5.2/expected_wizard.rbi +155 -509
- data/spec/test_data/v5.2/expected_wizard/habtm_subjects.rbi +301 -0
- data/spec/test_data/v5.2/expected_wizard_wo_spellbook.rbi +149 -509
- data/spec/test_data/v6.0/expected_active_record_base.rbi +113 -0
- data/spec/test_data/v6.0/expected_active_record_relation.rbi +175 -0
- data/spec/test_data/v6.0/expected_attachment.rbi +38 -431
- data/spec/test_data/v6.0/expected_blob.rbi +60 -450
- data/spec/test_data/v6.0/expected_habtm_subjects.rbi +720 -0
- data/spec/test_data/v6.0/expected_habtm_wizards.rbi +720 -0
- data/spec/test_data/v6.0/expected_headmaster.rbi +334 -0
- data/spec/test_data/v6.0/expected_internal_metadata.rbi +38 -431
- data/spec/test_data/v6.0/expected_potion.rbi +38 -431
- data/spec/test_data/v6.0/expected_robe.rbi +38 -433
- data/spec/test_data/v6.0/expected_routes.rbi +14 -7
- data/spec/test_data/v6.0/expected_schema_migration.rbi +38 -431
- data/spec/test_data/v6.0/expected_school.rbi +47 -431
- data/spec/test_data/v6.0/expected_spell.rbi +322 -0
- data/spec/test_data/v6.0/expected_spell/habtm_spell_books.rbi +325 -0
- data/spec/test_data/v6.0/expected_spell_book.rbi +98 -474
- data/spec/test_data/v6.0/expected_spell_book/habtm_spell_books.rbi +697 -0
- data/spec/test_data/v6.0/expected_spell_book/habtm_spells.rbi +325 -0
- data/spec/test_data/v6.0/expected_squib.rbi +162 -541
- data/spec/test_data/v6.0/expected_subject.rbi +322 -0
- data/spec/test_data/v6.0/expected_subject/habtm_wizards.rbi +325 -0
- data/spec/test_data/v6.0/expected_wand.rbi +91 -488
- data/spec/test_data/v6.0/expected_wizard.rbi +184 -562
- data/spec/test_data/v6.0/expected_wizard/habtm_subjects.rbi +325 -0
- data/spec/test_data/v6.0/expected_wizard_wo_spellbook.rbi +178 -562
- metadata +170 -24
- data/lib/bundled_rbi/active_record_base.rbi +0 -83
- data/lib/bundled_rbi/active_record_relation.rbi +0 -122
- data/lib/bundled_rbi/parameters.rbi +0 -28
- data/lib/sorbet-rails/custom_types/boolean_string.rb +0 -32
- data/lib/sorbet-rails/custom_types/integer_string.rb +0 -35
- data/lib/sorbet-rails/model_plugins/active_record_finder_methods.rb +0 -131
- data/lib/sorbet-rails/rails_mixins/custom_params_methods.rb +0 -46
- data/spec/boolean_string_spec.rb +0 -59
- data/spec/custom_params_methods_spec.rb +0 -138
- data/spec/integer_string_spec.rb +0 -46
- data/spec/support/v5.0/typed-override.yaml +0 -2
- data/spec/support/v5.1/typed-override.yaml +0 -2
- data/spec/support/v5.2/typed-override.yaml +0 -2
- data/spec/support/v6.0/typed-override.yaml +0 -2
@@ -3,8 +3,6 @@
|
|
3
3
|
|
4
4
|
# typed: strong
|
5
5
|
module Wand::EnumInstanceMethods
|
6
|
-
extend T::Sig
|
7
|
-
|
8
6
|
sig { returns(T::Boolean) }
|
9
7
|
def phoenix_feather?; end
|
10
8
|
|
@@ -36,8 +34,6 @@ module Wand::ActiveRelation_WhereNot
|
|
36
34
|
end
|
37
35
|
|
38
36
|
module Wand::GeneratedAttributeMethods
|
39
|
-
extend T::Sig
|
40
|
-
|
41
37
|
sig { returns(T::Boolean) }
|
42
38
|
def broken; end
|
43
39
|
|
@@ -176,17 +172,15 @@ end
|
|
176
172
|
|
177
173
|
class Wand::CoreType < T::Enum
|
178
174
|
enums do
|
179
|
-
PhoenixFeather = new(
|
180
|
-
DragonHeartstring = new(
|
181
|
-
UnicornTailHair = new(
|
182
|
-
BasiliskHorn = new(
|
175
|
+
PhoenixFeather = new(%q{phoenix_feather})
|
176
|
+
DragonHeartstring = new(%q{dragon_heartstring})
|
177
|
+
UnicornTailHair = new(%q{unicorn_tail_hair})
|
178
|
+
BasiliskHorn = new(%q{basilisk_horn})
|
183
179
|
end
|
184
180
|
|
185
181
|
end
|
186
182
|
|
187
183
|
module Wand::GeneratedAssociationMethods
|
188
|
-
extend T::Sig
|
189
|
-
|
190
184
|
sig { returns(::Wizard) }
|
191
185
|
def wizard; end
|
192
186
|
|
@@ -216,8 +210,7 @@ class Wand < ApplicationRecord
|
|
216
210
|
include Wand::GeneratedAttributeMethods
|
217
211
|
include Wand::GeneratedAssociationMethods
|
218
212
|
extend Wand::CustomFinderMethods
|
219
|
-
extend
|
220
|
-
extend T::Generic
|
213
|
+
extend Wand::QueryMethodsReturningRelation
|
221
214
|
RelationType = T.type_alias { T.any(Wand::ActiveRecord_Relation, Wand::ActiveRecord_Associations_CollectionProxy, Wand::ActiveRecord_AssociationRelation) }
|
222
215
|
|
223
216
|
sig { returns(T::Hash[T.any(String, Symbol), Integer]) }
|
@@ -235,141 +228,85 @@ class Wand < ApplicationRecord
|
|
235
228
|
sig { params(args: T.untyped).returns(Wand::ActiveRecord_Relation) }
|
236
229
|
def self.unicorn_tail_hair(*args); end
|
237
230
|
|
238
|
-
sig { returns(Wand::
|
239
|
-
def
|
240
|
-
|
241
|
-
sig { params(block: T.nilable(T.proc.void)).returns(Wand::ActiveRecord_Relation) }
|
242
|
-
def self.unscoped(&block); end
|
243
|
-
|
244
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_Relation) }
|
245
|
-
def self.select(*args); end
|
246
|
-
|
247
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_Relation) }
|
248
|
-
def self.order(*args); end
|
249
|
-
|
250
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_Relation) }
|
251
|
-
def self.reorder(*args); end
|
252
|
-
|
253
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_Relation) }
|
254
|
-
def self.group(*args); end
|
255
|
-
|
256
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_Relation) }
|
257
|
-
def self.limit(*args); end
|
258
|
-
|
259
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_Relation) }
|
260
|
-
def self.offset(*args); end
|
261
|
-
|
262
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_Relation) }
|
263
|
-
def self.joins(*args); end
|
264
|
-
|
265
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_Relation) }
|
266
|
-
def self.left_joins(*args); end
|
267
|
-
|
268
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_Relation) }
|
269
|
-
def self.left_outer_joins(*args); end
|
270
|
-
|
271
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_Relation) }
|
272
|
-
def self.where(*args); end
|
273
|
-
|
274
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_Relation) }
|
275
|
-
def self.rewhere(*args); end
|
276
|
-
|
277
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_Relation) }
|
278
|
-
def self.preload(*args); end
|
279
|
-
|
280
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_Relation) }
|
281
|
-
def self.eager_load(*args); end
|
282
|
-
|
283
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_Relation) }
|
284
|
-
def self.includes(*args); end
|
285
|
-
|
286
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_Relation) }
|
287
|
-
def self.from(*args); end
|
288
|
-
|
289
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_Relation) }
|
290
|
-
def self.lock(*args); end
|
291
|
-
|
292
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_Relation) }
|
293
|
-
def self.readonly(*args); end
|
294
|
-
|
295
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_Relation) }
|
296
|
-
def self.or(*args); end
|
297
|
-
|
298
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_Relation) }
|
299
|
-
def self.having(*args); end
|
231
|
+
sig { returns(T.nilable(Wand::CoreType)) }
|
232
|
+
def typed_core_type; end
|
300
233
|
|
301
|
-
sig { params(
|
302
|
-
def
|
234
|
+
sig { params(value: T.nilable(Wand::CoreType)).void }
|
235
|
+
def typed_core_type=(value); end
|
303
236
|
|
304
|
-
sig {
|
305
|
-
def self.
|
237
|
+
sig { returns(T::Array[Wand]) }
|
238
|
+
def self.mythicals; end
|
239
|
+
end
|
306
240
|
|
307
|
-
|
308
|
-
|
241
|
+
class Wand::ActiveRecord_Relation < ActiveRecord::Relation
|
242
|
+
include Wand::ActiveRelation_WhereNot
|
243
|
+
include Wand::CustomFinderMethods
|
244
|
+
include Wand::QueryMethodsReturningRelation
|
245
|
+
Elem = type_member(fixed: Wand)
|
309
246
|
|
310
247
|
sig { params(args: T.untyped).returns(Wand::ActiveRecord_Relation) }
|
311
|
-
def
|
248
|
+
def basilisk_horn(*args); end
|
312
249
|
|
313
250
|
sig { params(args: T.untyped).returns(Wand::ActiveRecord_Relation) }
|
314
|
-
def
|
251
|
+
def dragon_heartstring(*args); end
|
315
252
|
|
316
253
|
sig { params(args: T.untyped).returns(Wand::ActiveRecord_Relation) }
|
317
|
-
def
|
254
|
+
def phoenix_feather(*args); end
|
318
255
|
|
319
256
|
sig { params(args: T.untyped).returns(Wand::ActiveRecord_Relation) }
|
320
|
-
def
|
321
|
-
|
322
|
-
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wand::ActiveRecord_Relation) }
|
323
|
-
def self.extending(*args, &block); end
|
324
|
-
|
325
|
-
sig { returns(T.nilable(Wand::CoreType)) }
|
326
|
-
def typed_core_type; end
|
327
|
-
|
328
|
-
sig { params(value: T.nilable(Wand::CoreType)).void }
|
329
|
-
def typed_core_type=(value); end
|
330
|
-
|
331
|
-
sig { params(conditions: T.untyped).returns(T::Boolean) }
|
332
|
-
def self.exists?(conditions = nil); end
|
333
|
-
|
334
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
335
|
-
def self.any?(*args); end
|
257
|
+
def unicorn_tail_hair(*args); end
|
258
|
+
end
|
336
259
|
|
337
|
-
|
338
|
-
|
260
|
+
class Wand::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
|
261
|
+
include Wand::ActiveRelation_WhereNot
|
262
|
+
include Wand::CustomFinderMethods
|
263
|
+
include Wand::QueryMethodsReturningAssociationRelation
|
264
|
+
Elem = type_member(fixed: Wand)
|
339
265
|
|
340
|
-
sig { params(args: T.untyped).returns(
|
341
|
-
def
|
266
|
+
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
267
|
+
def basilisk_horn(*args); end
|
342
268
|
|
343
|
-
sig { params(args: T.untyped).returns(
|
344
|
-
def
|
269
|
+
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
270
|
+
def dragon_heartstring(*args); end
|
345
271
|
|
346
|
-
sig { params(args: T.untyped).returns(
|
347
|
-
def
|
272
|
+
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
273
|
+
def phoenix_feather(*args); end
|
348
274
|
|
349
|
-
sig { returns(
|
350
|
-
def
|
275
|
+
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
276
|
+
def unicorn_tail_hair(*args); end
|
351
277
|
end
|
352
278
|
|
353
|
-
class Wand::
|
354
|
-
include Wand::ActiveRelation_WhereNot
|
279
|
+
class Wand::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
|
355
280
|
include Wand::CustomFinderMethods
|
356
|
-
include
|
357
|
-
extend T::Sig
|
358
|
-
extend T::Generic
|
281
|
+
include Wand::QueryMethodsReturningAssociationRelation
|
359
282
|
Elem = type_member(fixed: Wand)
|
360
283
|
|
361
|
-
sig { params(args: T.untyped).returns(Wand::
|
284
|
+
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
362
285
|
def basilisk_horn(*args); end
|
363
286
|
|
364
|
-
sig { params(args: T.untyped).returns(Wand::
|
287
|
+
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
365
288
|
def dragon_heartstring(*args); end
|
366
289
|
|
367
|
-
sig { params(args: T.untyped).returns(Wand::
|
290
|
+
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
368
291
|
def phoenix_feather(*args); end
|
369
292
|
|
370
|
-
sig { params(args: T.untyped).returns(Wand::
|
293
|
+
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
371
294
|
def unicorn_tail_hair(*args); end
|
372
295
|
|
296
|
+
sig { params(records: T.any(Wand, T::Array[Wand])).returns(T.self_type) }
|
297
|
+
def <<(*records); end
|
298
|
+
|
299
|
+
sig { params(records: T.any(Wand, T::Array[Wand])).returns(T.self_type) }
|
300
|
+
def append(*records); end
|
301
|
+
|
302
|
+
sig { params(records: T.any(Wand, T::Array[Wand])).returns(T.self_type) }
|
303
|
+
def push(*records); end
|
304
|
+
|
305
|
+
sig { params(records: T.any(Wand, T::Array[Wand])).returns(T.self_type) }
|
306
|
+
def concat(*records); end
|
307
|
+
end
|
308
|
+
|
309
|
+
module Wand::QueryMethodsReturningRelation
|
373
310
|
sig { returns(Wand::ActiveRecord_Relation) }
|
374
311
|
def all; end
|
375
312
|
|
@@ -457,245 +394,24 @@ class Wand::ActiveRecord_Relation < ActiveRecord::Relation
|
|
457
394
|
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wand::ActiveRecord_Relation) }
|
458
395
|
def extending(*args, &block); end
|
459
396
|
|
460
|
-
sig { params(conditions: T.untyped).returns(T::Boolean) }
|
461
|
-
def exists?(conditions = nil); end
|
462
|
-
|
463
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
464
|
-
def any?(*args); end
|
465
|
-
|
466
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
467
|
-
def many?(*args); end
|
468
|
-
|
469
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
470
|
-
def none?(*args); end
|
471
|
-
|
472
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
473
|
-
def one?(*args); end
|
474
|
-
|
475
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
476
|
-
def empty?(*args); end
|
477
|
-
end
|
478
|
-
|
479
|
-
class Wand::ActiveRecord_AssociationRelation < ActiveRecord::AssociationRelation
|
480
|
-
include Wand::ActiveRelation_WhereNot
|
481
|
-
include Wand::CustomFinderMethods
|
482
|
-
include Enumerable
|
483
|
-
extend T::Sig
|
484
|
-
extend T::Generic
|
485
|
-
Elem = type_member(fixed: Wand)
|
486
|
-
|
487
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
488
|
-
def basilisk_horn(*args); end
|
489
|
-
|
490
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
491
|
-
def dragon_heartstring(*args); end
|
492
|
-
|
493
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
494
|
-
def phoenix_feather(*args); end
|
495
|
-
|
496
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
497
|
-
def unicorn_tail_hair(*args); end
|
498
|
-
|
499
|
-
sig { returns(Wand::ActiveRecord_AssociationRelation) }
|
500
|
-
def all; end
|
501
|
-
|
502
|
-
sig { params(block: T.nilable(T.proc.void)).returns(Wand::ActiveRecord_AssociationRelation) }
|
503
|
-
def unscoped(&block); end
|
504
|
-
|
505
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
506
|
-
def select(*args); end
|
507
|
-
|
508
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
509
|
-
def order(*args); end
|
510
|
-
|
511
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
512
|
-
def reorder(*args); end
|
513
|
-
|
514
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
515
|
-
def group(*args); end
|
516
|
-
|
517
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
518
|
-
def limit(*args); end
|
519
|
-
|
520
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
521
|
-
def offset(*args); end
|
522
|
-
|
523
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
524
|
-
def joins(*args); end
|
525
|
-
|
526
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
527
|
-
def left_joins(*args); end
|
528
|
-
|
529
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
530
|
-
def left_outer_joins(*args); end
|
531
|
-
|
532
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
533
|
-
def where(*args); end
|
534
|
-
|
535
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
536
|
-
def rewhere(*args); end
|
537
|
-
|
538
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
539
|
-
def preload(*args); end
|
540
|
-
|
541
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
542
|
-
def eager_load(*args); end
|
543
|
-
|
544
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
545
|
-
def includes(*args); end
|
546
|
-
|
547
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
548
|
-
def from(*args); end
|
549
|
-
|
550
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
551
|
-
def lock(*args); end
|
552
|
-
|
553
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
554
|
-
def readonly(*args); end
|
555
|
-
|
556
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
557
|
-
def or(*args); end
|
558
|
-
|
559
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
560
|
-
def having(*args); end
|
561
|
-
|
562
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
563
|
-
def create_with(*args); end
|
564
|
-
|
565
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
566
|
-
def distinct(*args); end
|
567
|
-
|
568
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
569
|
-
def references(*args); end
|
570
|
-
|
571
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
572
|
-
def none(*args); end
|
573
|
-
|
574
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
575
|
-
def unscope(*args); end
|
576
|
-
|
577
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
578
|
-
def merge(*args); end
|
579
|
-
|
580
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
581
|
-
def except(*args); end
|
582
|
-
|
583
|
-
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wand::ActiveRecord_AssociationRelation) }
|
584
|
-
def extending(*args, &block); end
|
585
|
-
|
586
|
-
sig { params(args: T.untyped).returns(Wand) }
|
587
|
-
def find(*args); end
|
588
|
-
|
589
|
-
sig { params(args: T.untyped).returns(T.nilable(Wand)) }
|
590
|
-
def find_by(*args); end
|
591
|
-
|
592
|
-
sig { params(args: T.untyped).returns(Wand) }
|
593
|
-
def find_by!(*args); end
|
594
|
-
|
595
|
-
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Wand).void)).returns(Wand) }
|
596
|
-
def find_or_initialize_by(attributes, &block); end
|
597
|
-
|
598
|
-
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Wand).void)).returns(Wand) }
|
599
|
-
def find_or_create_by(attributes, &block); end
|
600
|
-
|
601
|
-
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Wand).void)).returns(Wand) }
|
602
|
-
def find_or_create_by!(attributes, &block); end
|
603
|
-
|
604
|
-
sig { returns(T.nilable(Wand)) }
|
605
|
-
def first; end
|
606
|
-
|
607
|
-
sig { returns(Wand) }
|
608
|
-
def first!; end
|
609
|
-
|
610
|
-
sig { returns(T.nilable(Wand)) }
|
611
|
-
def second; end
|
612
|
-
|
613
|
-
sig { returns(Wand) }
|
614
|
-
def second!; end
|
615
|
-
|
616
|
-
sig { returns(T.nilable(Wand)) }
|
617
|
-
def third; end
|
618
|
-
|
619
|
-
sig { returns(Wand) }
|
620
|
-
def third!; end
|
621
|
-
|
622
|
-
sig { returns(T.nilable(Wand)) }
|
623
|
-
def third_to_last; end
|
624
|
-
|
625
|
-
sig { returns(Wand) }
|
626
|
-
def third_to_last!; end
|
627
|
-
|
628
|
-
sig { returns(T.nilable(Wand)) }
|
629
|
-
def second_to_last; end
|
630
|
-
|
631
|
-
sig { returns(Wand) }
|
632
|
-
def second_to_last!; end
|
633
|
-
|
634
|
-
sig { returns(T.nilable(Wand)) }
|
635
|
-
def last; end
|
636
|
-
|
637
|
-
sig { returns(Wand) }
|
638
|
-
def last!; end
|
639
|
-
|
640
|
-
sig { params(conditions: T.untyped).returns(T::Boolean) }
|
641
|
-
def exists?(conditions = nil); end
|
642
|
-
|
643
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
644
|
-
def any?(*args); end
|
645
|
-
|
646
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
647
|
-
def many?(*args); end
|
648
|
-
|
649
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
650
|
-
def none?(*args); end
|
651
|
-
|
652
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
653
|
-
def one?(*args); end
|
654
|
-
|
655
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
656
|
-
def empty?(*args); end
|
657
|
-
|
658
|
-
sig { override.params(block: T.proc.params(e: Wand).void).returns(T::Array[Wand]) }
|
659
|
-
def each(&block); end
|
660
|
-
|
661
|
-
sig { params(level: T.nilable(Integer)).returns(T::Array[Wand]) }
|
662
|
-
def flatten(level); end
|
663
|
-
|
664
|
-
sig { returns(T::Array[Wand]) }
|
665
|
-
def to_a; end
|
666
|
-
|
667
397
|
sig do
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
398
|
+
params(
|
399
|
+
of: T.nilable(Integer),
|
400
|
+
start: T.nilable(Integer),
|
401
|
+
finish: T.nilable(Integer),
|
402
|
+
load: T.nilable(T::Boolean),
|
403
|
+
error_on_ignore: T.nilable(T::Boolean),
|
404
|
+
block: T.nilable(T.proc.params(e: Wand::ActiveRecord_Relation).void)
|
405
|
+
).returns(ActiveRecord::Batches::BatchEnumerator)
|
672
406
|
end
|
673
|
-
def
|
407
|
+
def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
|
674
408
|
end
|
675
409
|
|
676
|
-
|
677
|
-
include Wand::CustomFinderMethods
|
678
|
-
include Enumerable
|
679
|
-
extend T::Sig
|
680
|
-
extend T::Generic
|
681
|
-
Elem = type_member(fixed: Wand)
|
682
|
-
|
683
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
684
|
-
def basilisk_horn(*args); end
|
685
|
-
|
686
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
687
|
-
def dragon_heartstring(*args); end
|
688
|
-
|
689
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
690
|
-
def phoenix_feather(*args); end
|
691
|
-
|
692
|
-
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
693
|
-
def unicorn_tail_hair(*args); end
|
694
|
-
|
410
|
+
module Wand::QueryMethodsReturningAssociationRelation
|
695
411
|
sig { returns(Wand::ActiveRecord_AssociationRelation) }
|
696
412
|
def all; end
|
697
413
|
|
698
|
-
sig { params(block: T.nilable(T.proc.void)).returns(Wand::
|
414
|
+
sig { params(block: T.nilable(T.proc.void)).returns(Wand::ActiveRecord_Relation) }
|
699
415
|
def unscoped(&block); end
|
700
416
|
|
701
417
|
sig { params(args: T.untyped).returns(Wand::ActiveRecord_AssociationRelation) }
|
@@ -779,104 +495,15 @@ class Wand::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associatio
|
|
779
495
|
sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(Wand::ActiveRecord_AssociationRelation) }
|
780
496
|
def extending(*args, &block); end
|
781
497
|
|
782
|
-
sig { params(args: T.untyped).returns(Wand) }
|
783
|
-
def find(*args); end
|
784
|
-
|
785
|
-
sig { params(args: T.untyped).returns(T.nilable(Wand)) }
|
786
|
-
def find_by(*args); end
|
787
|
-
|
788
|
-
sig { params(args: T.untyped).returns(Wand) }
|
789
|
-
def find_by!(*args); end
|
790
|
-
|
791
|
-
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Wand).void)).returns(Wand) }
|
792
|
-
def find_or_initialize_by(attributes, &block); end
|
793
|
-
|
794
|
-
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Wand).void)).returns(Wand) }
|
795
|
-
def find_or_create_by(attributes, &block); end
|
796
|
-
|
797
|
-
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: Wand).void)).returns(Wand) }
|
798
|
-
def find_or_create_by!(attributes, &block); end
|
799
|
-
|
800
|
-
sig { returns(T.nilable(Wand)) }
|
801
|
-
def first; end
|
802
|
-
|
803
|
-
sig { returns(Wand) }
|
804
|
-
def first!; end
|
805
|
-
|
806
|
-
sig { returns(T.nilable(Wand)) }
|
807
|
-
def second; end
|
808
|
-
|
809
|
-
sig { returns(Wand) }
|
810
|
-
def second!; end
|
811
|
-
|
812
|
-
sig { returns(T.nilable(Wand)) }
|
813
|
-
def third; end
|
814
|
-
|
815
|
-
sig { returns(Wand) }
|
816
|
-
def third!; end
|
817
|
-
|
818
|
-
sig { returns(T.nilable(Wand)) }
|
819
|
-
def third_to_last; end
|
820
|
-
|
821
|
-
sig { returns(Wand) }
|
822
|
-
def third_to_last!; end
|
823
|
-
|
824
|
-
sig { returns(T.nilable(Wand)) }
|
825
|
-
def second_to_last; end
|
826
|
-
|
827
|
-
sig { returns(Wand) }
|
828
|
-
def second_to_last!; end
|
829
|
-
|
830
|
-
sig { returns(T.nilable(Wand)) }
|
831
|
-
def last; end
|
832
|
-
|
833
|
-
sig { returns(Wand) }
|
834
|
-
def last!; end
|
835
|
-
|
836
|
-
sig { params(conditions: T.untyped).returns(T::Boolean) }
|
837
|
-
def exists?(conditions = nil); end
|
838
|
-
|
839
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
840
|
-
def any?(*args); end
|
841
|
-
|
842
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
843
|
-
def many?(*args); end
|
844
|
-
|
845
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
846
|
-
def none?(*args); end
|
847
|
-
|
848
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
849
|
-
def one?(*args); end
|
850
|
-
|
851
|
-
sig { params(args: T.untyped).returns(T::Boolean) }
|
852
|
-
def empty?(*args); end
|
853
|
-
|
854
|
-
sig { override.params(block: T.proc.params(e: Wand).void).returns(T::Array[Wand]) }
|
855
|
-
def each(&block); end
|
856
|
-
|
857
|
-
sig { params(level: T.nilable(Integer)).returns(T::Array[Wand]) }
|
858
|
-
def flatten(level); end
|
859
|
-
|
860
|
-
sig { returns(T::Array[Wand]) }
|
861
|
-
def to_a; end
|
862
|
-
|
863
498
|
sig do
|
864
|
-
|
865
|
-
|
866
|
-
|
867
|
-
|
499
|
+
params(
|
500
|
+
of: T.nilable(Integer),
|
501
|
+
start: T.nilable(Integer),
|
502
|
+
finish: T.nilable(Integer),
|
503
|
+
load: T.nilable(T::Boolean),
|
504
|
+
error_on_ignore: T.nilable(T::Boolean),
|
505
|
+
block: T.nilable(T.proc.params(e: Wand::ActiveRecord_AssociationRelation).void)
|
506
|
+
).returns(ActiveRecord::Batches::BatchEnumerator)
|
868
507
|
end
|
869
|
-
def
|
870
|
-
|
871
|
-
sig { params(records: T.any(Wand, T::Array[Wand])).returns(T.self_type) }
|
872
|
-
def <<(*records); end
|
873
|
-
|
874
|
-
sig { params(records: T.any(Wand, T::Array[Wand])).returns(T.self_type) }
|
875
|
-
def append(*records); end
|
876
|
-
|
877
|
-
sig { params(records: T.any(Wand, T::Array[Wand])).returns(T.self_type) }
|
878
|
-
def push(*records); end
|
879
|
-
|
880
|
-
sig { params(records: T.any(Wand, T::Array[Wand])).returns(T.self_type) }
|
881
|
-
def concat(*records); end
|
508
|
+
def in_batches(of: 1000, start: nil, finish: nil, load: false, error_on_ignore: nil, &block); end
|
882
509
|
end
|