sorbet-rails 0.7.31 → 0.7.34

Sign up to get free protection for your applications and to get access to all the features.
Files changed (223) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci-master.yml +1 -1
  3. data/.github/workflows/ci.yml +1 -1
  4. data/.github/workflows/publish-gem.yml +9 -19
  5. data/CONTRIBUTING.md +1 -0
  6. data/Gemfile +4 -0
  7. data/README.md +14 -3
  8. data/Rakefile +27 -1
  9. data/lib/sorbet-rails/active_record_rbi_formatter.rb +4 -4
  10. data/lib/sorbet-rails/model_plugins/active_record_querying.rb +27 -0
  11. data/lib/sorbet-rails/model_rbi_formatter.rb +3 -3
  12. data/lib/sorbet-rails/rails_mixins/active_record_overrides.rb +1 -1
  13. data/lib/sorbet-rails/rails_mixins/custom_finder_methods.rb +8 -0
  14. data/lib/sorbet-rails/tasks/rails_rbi.rake +15 -0
  15. data/sorbet-rails.gemspec +2 -2
  16. data/spec/bin/run_all_specs.sh +1 -0
  17. data/spec/custom_finder_methods_spec.rb +23 -0
  18. data/spec/generators/rails-template.rb +2 -7
  19. data/spec/rails_helper.rb +2 -0
  20. data/spec/rake_rails_rbi_models_spec.rb +1 -1
  21. data/spec/support/v5.2/Gemfile.lock +76 -67
  22. data/spec/support/v5.2/sorbet_test_cases.rb +8 -0
  23. data/spec/support/v6.0/Gemfile.lock +93 -85
  24. data/spec/support/v6.0/sorbet_test_cases.rb +8 -0
  25. data/spec/support/v6.1/Gemfile +1 -1
  26. data/spec/support/v6.1/Gemfile.lock +115 -108
  27. data/spec/support/v6.1/sorbet_test_cases.rb +11 -0
  28. data/spec/support/v7.0/.gitattributes +7 -0
  29. data/spec/support/v7.0/.gitignore +35 -0
  30. data/spec/support/v7.0/Gemfile +48 -0
  31. data/spec/support/v7.0/Gemfile.lock +218 -0
  32. data/spec/support/v7.0/README.md +24 -0
  33. data/spec/support/v7.0/Rakefile +6 -0
  34. data/spec/support/v7.0/app/assets/images/.keep +0 -0
  35. data/spec/support/v7.0/app/assets/stylesheets/application.css +1 -0
  36. data/spec/support/v7.0/app/controllers/application_controller.rb +3 -0
  37. data/spec/support/v7.0/app/controllers/concerns/.keep +0 -0
  38. data/spec/support/v7.0/app/helpers/application_helper.rb +3 -0
  39. data/spec/support/v7.0/app/helpers/bar_helper.rb +3 -0
  40. data/spec/support/v7.0/app/helpers/baz_helper.rb +3 -0
  41. data/spec/support/v7.0/app/helpers/foo_helper.rb +3 -0
  42. data/spec/support/v7.0/app/jobs/application_job.rb +8 -0
  43. data/spec/support/v7.0/app/jobs/award_house_point_hourglasses.rb +12 -0
  44. data/spec/support/v7.0/app/mailers/application_mailer.rb +5 -0
  45. data/spec/support/v7.0/app/mailers/daily_prophet_mailer.rb +9 -0
  46. data/spec/support/v7.0/app/mailers/hogwarts_acceptance_mailer.rb +29 -0
  47. data/spec/support/v7.0/app/models/application_record.rb +4 -0
  48. data/spec/support/v7.0/app/models/concerns/.keep +0 -0
  49. data/spec/support/v7.0/app/models/concerns/mythical.rb +11 -0
  50. data/spec/support/v7.0/app/models/headmaster.rb +8 -0
  51. data/spec/support/v7.0/app/models/potion.rb +6 -0
  52. data/spec/support/v7.0/app/models/robe.rb +4 -0
  53. data/spec/support/v7.0/app/models/school.rb +5 -0
  54. data/spec/support/v7.0/app/models/spell.rb +5 -0
  55. data/spec/support/v7.0/app/models/spell_book.rb +18 -0
  56. data/spec/support/v7.0/app/models/squib.rb +6 -0
  57. data/spec/support/v7.0/app/models/subject.rb +5 -0
  58. data/spec/support/v7.0/app/models/wand.rb +19 -0
  59. data/spec/support/v7.0/app/models/wizard.rb +65 -0
  60. data/spec/support/v7.0/app/views/layouts/application.html.erb +15 -0
  61. data/spec/support/v7.0/app/views/layouts/mailer.html.erb +13 -0
  62. data/spec/support/v7.0/app/views/layouts/mailer.text.erb +1 -0
  63. data/spec/support/v7.0/bin/bundle +114 -0
  64. data/spec/support/v7.0/bin/rails +4 -0
  65. data/spec/support/v7.0/bin/rake +4 -0
  66. data/spec/support/v7.0/bin/setup +33 -0
  67. data/spec/support/v7.0/config/application.rb +38 -0
  68. data/spec/support/v7.0/config/boot.rb +4 -0
  69. data/spec/support/v7.0/config/database.yml +25 -0
  70. data/spec/support/v7.0/config/environment.rb +6 -0
  71. data/spec/support/v7.0/config/environments/development.rb +69 -0
  72. data/spec/support/v7.0/config/environments/production.rb +83 -0
  73. data/spec/support/v7.0/config/environments/test.rb +61 -0
  74. data/spec/support/v7.0/config/initializers/content_security_policy.rb +26 -0
  75. data/spec/support/v7.0/config/initializers/filter_parameter_logging.rb +9 -0
  76. data/spec/support/v7.0/config/initializers/inflections.rb +17 -0
  77. data/spec/support/v7.0/config/initializers/permissions_policy.rb +12 -0
  78. data/spec/support/v7.0/config/initializers/sorbet_rails.rb +3 -0
  79. data/spec/support/v7.0/config/locales/en.yml +33 -0
  80. data/spec/support/v7.0/config/puma.rb +44 -0
  81. data/spec/support/v7.0/config/routes.rb +8 -0
  82. data/spec/support/v7.0/config/storage.yml +34 -0
  83. data/spec/support/v7.0/config.ru +6 -0
  84. data/spec/support/v7.0/db/migrate/20190620000001_create_wizards.rb +14 -0
  85. data/spec/support/v7.0/db/migrate/20190620000002_create_wands.rb +12 -0
  86. data/spec/support/v7.0/db/migrate/20190620000003_create_spell_books.rb +10 -0
  87. data/spec/support/v7.0/db/migrate/20190620000004_add_more_column_types_to_wands.rb +14 -0
  88. data/spec/support/v7.0/db/migrate/20190620000005_add_broom_to_wizard.rb +6 -0
  89. data/spec/support/v7.0/db/migrate/20190620000006_add_more_enums_to_wizard.rb +9 -0
  90. data/spec/support/v7.0/db/migrate/20190620000007_add_type_to_wizard.rb +6 -0
  91. data/spec/support/v7.0/db/migrate/20190620000008_add_robe_to_wizard.rb +8 -0
  92. data/spec/support/v7.0/db/migrate/20190620000009_add_school.rb +10 -0
  93. data/spec/support/v7.0/db/migrate/20190620000010_add_subject.rb +8 -0
  94. data/spec/support/v7.0/db/migrate/20190620000011_add_subjects_wizards.rb +8 -0
  95. data/spec/support/v7.0/db/migrate/20190620000012_add_spell.rb +8 -0
  96. data/spec/support/v7.0/db/migrate/20190620000013_add_spells_spell_books.rb +8 -0
  97. data/spec/support/v7.0/db/migrate/20190620000014_create_headmasters.rb +9 -0
  98. data/spec/support/v7.0/db/migrate/20190620000015_add_serialized_to_wizards.rb +9 -0
  99. data/spec/support/v7.0/db/schema.rb +98 -0
  100. data/spec/support/v7.0/db/seeds.rb +8 -0
  101. data/spec/support/v7.0/lib/assets/.keep +0 -0
  102. data/spec/support/v7.0/lib/mythical_rbi_plugin.rb +16 -0
  103. data/spec/support/v7.0/lib/tasks/.keep +0 -0
  104. data/spec/support/v7.0/log/.keep +0 -0
  105. data/spec/support/v7.0/sorbet_test_cases.rb +439 -0
  106. data/spec/support/v7.0/storage/.keep +0 -0
  107. data/spec/support/v7.0/tmp/.keep +0 -0
  108. data/spec/support/v7.0/tmp/pids/.keep +0 -0
  109. data/spec/support/v7.0/tmp/storage/.keep +0 -0
  110. data/spec/support/v7.0/vendor/.keep +0 -0
  111. data/spec/test_data/v5.2/expected_active_record_base.rbi +6 -0
  112. data/spec/test_data/v5.2/expected_active_record_relation.rbi +8 -2
  113. data/spec/test_data/v5.2/expected_attachment.rbi +3 -3
  114. data/spec/test_data/v5.2/expected_blob.rbi +3 -3
  115. data/spec/test_data/v5.2/expected_habtm_subjects.rbi +3 -3
  116. data/spec/test_data/v5.2/expected_habtm_wizards.rbi +3 -3
  117. data/spec/test_data/v5.2/expected_headmaster.rbi +3 -3
  118. data/spec/test_data/v5.2/expected_internal_metadata.rbi +3 -3
  119. data/spec/test_data/v5.2/expected_potion.rbi +3 -3
  120. data/spec/test_data/v5.2/expected_robe.rbi +3 -3
  121. data/spec/test_data/v5.2/expected_schema_migration.rbi +3 -3
  122. data/spec/test_data/v5.2/expected_school.rbi +3 -3
  123. data/spec/test_data/v5.2/expected_spell/habtm_spell_books.rbi +3 -3
  124. data/spec/test_data/v5.2/expected_spell.rbi +3 -3
  125. data/spec/test_data/v5.2/expected_spell_book/habtm_spell_books.rbi +3 -3
  126. data/spec/test_data/v5.2/expected_spell_book/habtm_spells.rbi +3 -3
  127. data/spec/test_data/v5.2/expected_spell_book.rbi +3 -3
  128. data/spec/test_data/v5.2/expected_squib.rbi +3 -3
  129. data/spec/test_data/v5.2/expected_subject/habtm_wizards.rbi +3 -3
  130. data/spec/test_data/v5.2/expected_subject.rbi +3 -3
  131. data/spec/test_data/v5.2/expected_wand.rbi +3 -3
  132. data/spec/test_data/v5.2/expected_wizard/habtm_subjects.rbi +3 -3
  133. data/spec/test_data/v5.2/expected_wizard.rbi +3 -3
  134. data/spec/test_data/v5.2/expected_wizard_wo_spellbook.rbi +3 -3
  135. data/spec/test_data/v6.0/expected_active_record_base.rbi +6 -0
  136. data/spec/test_data/v6.0/expected_active_record_relation.rbi +8 -2
  137. data/spec/test_data/v6.0/expected_attachment.rbi +3 -3
  138. data/spec/test_data/v6.0/expected_blob.rbi +3 -3
  139. data/spec/test_data/v6.0/expected_habtm_subjects.rbi +3 -3
  140. data/spec/test_data/v6.0/expected_habtm_wizards.rbi +3 -3
  141. data/spec/test_data/v6.0/expected_headmaster.rbi +3 -3
  142. data/spec/test_data/v6.0/expected_internal_metadata.rbi +3 -3
  143. data/spec/test_data/v6.0/expected_potion.rbi +3 -3
  144. data/spec/test_data/v6.0/expected_robe.rbi +3 -3
  145. data/spec/test_data/v6.0/expected_schema_migration.rbi +3 -3
  146. data/spec/test_data/v6.0/expected_school.rbi +3 -3
  147. data/spec/test_data/v6.0/expected_spell/habtm_spell_books.rbi +3 -3
  148. data/spec/test_data/v6.0/expected_spell.rbi +3 -3
  149. data/spec/test_data/v6.0/expected_spell_book/habtm_spell_books.rbi +3 -3
  150. data/spec/test_data/v6.0/expected_spell_book/habtm_spells.rbi +3 -3
  151. data/spec/test_data/v6.0/expected_spell_book.rbi +3 -3
  152. data/spec/test_data/v6.0/expected_squib.rbi +3 -3
  153. data/spec/test_data/v6.0/expected_subject/habtm_wizards.rbi +3 -3
  154. data/spec/test_data/v6.0/expected_subject.rbi +3 -3
  155. data/spec/test_data/v6.0/expected_wand.rbi +3 -3
  156. data/spec/test_data/v6.0/expected_wizard/habtm_subjects.rbi +3 -3
  157. data/spec/test_data/v6.0/expected_wizard.rbi +3 -3
  158. data/spec/test_data/v6.0/expected_wizard_wo_spellbook.rbi +3 -3
  159. data/spec/test_data/v6.1/expected_active_record_base.rbi +6 -0
  160. data/spec/test_data/v6.1/expected_active_record_relation.rbi +8 -2
  161. data/spec/test_data/v6.1/expected_attachment.rbi +9 -3
  162. data/spec/test_data/v6.1/expected_blob.rbi +9 -3
  163. data/spec/test_data/v6.1/expected_habtm_subjects.rbi +3 -3
  164. data/spec/test_data/v6.1/expected_habtm_wizards.rbi +3 -3
  165. data/spec/test_data/v6.1/expected_headmaster.rbi +9 -3
  166. data/spec/test_data/v6.1/expected_internal_metadata.rbi +9 -3
  167. data/spec/test_data/v6.1/expected_potion.rbi +9 -3
  168. data/spec/test_data/v6.1/expected_record.rbi +9 -3
  169. data/spec/test_data/v6.1/expected_robe.rbi +9 -3
  170. data/spec/test_data/v6.1/expected_schema_migration.rbi +9 -3
  171. data/spec/test_data/v6.1/expected_school.rbi +9 -3
  172. data/spec/test_data/v6.1/expected_spell/habtm_spell_books.rbi +9 -3
  173. data/spec/test_data/v6.1/expected_spell.rbi +9 -3
  174. data/spec/test_data/v6.1/expected_spell_book/habtm_spell_books.rbi +3 -3
  175. data/spec/test_data/v6.1/expected_spell_book/habtm_spells.rbi +9 -3
  176. data/spec/test_data/v6.1/expected_spell_book.rbi +9 -3
  177. data/spec/test_data/v6.1/expected_squib.rbi +9 -3
  178. data/spec/test_data/v6.1/expected_subject/habtm_wizards.rbi +9 -3
  179. data/spec/test_data/v6.1/expected_subject.rbi +9 -3
  180. data/spec/test_data/v6.1/expected_variant_record.rbi +9 -3
  181. data/spec/test_data/v6.1/expected_wand.rbi +9 -3
  182. data/spec/test_data/v6.1/expected_wizard/habtm_subjects.rbi +9 -3
  183. data/spec/test_data/v6.1/expected_wizard.rbi +9 -3
  184. data/spec/test_data/v6.1/expected_wizard_wo_spellbook.rbi +9 -3
  185. data/spec/test_data/v7.0/expected_active_record_base.rbi +119 -0
  186. data/spec/test_data/v7.0/expected_active_record_relation.rbi +180 -0
  187. data/spec/test_data/v7.0/expected_application_job.rbi +20 -0
  188. data/spec/test_data/v7.0/expected_application_mailer.rbi +5 -0
  189. data/spec/test_data/v7.0/expected_attachment.rbi +358 -0
  190. data/spec/test_data/v7.0/expected_award_house_point_hourglasses.rbi +20 -0
  191. data/spec/test_data/v7.0/expected_blob.rbi +394 -0
  192. data/spec/test_data/v7.0/expected_custom_application_job.rbi +21 -0
  193. data/spec/test_data/v7.0/expected_custom_application_mailer.rbi +6 -0
  194. data/spec/test_data/v7.0/expected_custom_award_house_point_hourglasses.rbi +21 -0
  195. data/spec/test_data/v7.0/expected_custom_daily_prophet_mailer.rbi +8 -0
  196. data/spec/test_data/v7.0/expected_custom_hogwarts_acceptance_mailer.rbi +21 -0
  197. data/spec/test_data/v7.0/expected_daily_prophet_mailer.rbi +7 -0
  198. data/spec/test_data/v7.0/expected_headmaster.rbi +376 -0
  199. data/spec/test_data/v7.0/expected_helpers.rbi +27 -0
  200. data/spec/test_data/v7.0/expected_helpers_with_application_and_devise_helpers.rbi +34 -0
  201. data/spec/test_data/v7.0/expected_hogwarts_acceptance_mailer.rbi +20 -0
  202. data/spec/test_data/v7.0/expected_internal_metadata.rbi +346 -0
  203. data/spec/test_data/v7.0/expected_no_routes.rbi +4 -0
  204. data/spec/test_data/v7.0/expected_potion.rbi +328 -0
  205. data/spec/test_data/v7.0/expected_record.rbi +307 -0
  206. data/spec/test_data/v7.0/expected_robe.rbi +349 -0
  207. data/spec/test_data/v7.0/expected_routes.rbi +182 -0
  208. data/spec/test_data/v7.0/expected_schema_migration.rbi +319 -0
  209. data/spec/test_data/v7.0/expected_school.rbi +349 -0
  210. data/spec/test_data/v7.0/expected_spell/habtm_spell_books.rbi +367 -0
  211. data/spec/test_data/v7.0/expected_spell.rbi +340 -0
  212. data/spec/test_data/v7.0/expected_spell_book/habtm_spells.rbi +367 -0
  213. data/spec/test_data/v7.0/expected_spell_book.rbi +499 -0
  214. data/spec/test_data/v7.0/expected_squib.rbi +1204 -0
  215. data/spec/test_data/v7.0/expected_srb_tc_output.txt +1 -0
  216. data/spec/test_data/v7.0/expected_subject/habtm_wizards.rbi +367 -0
  217. data/spec/test_data/v7.0/expected_subject.rbi +340 -0
  218. data/spec/test_data/v7.0/expected_variant_record.rbi +382 -0
  219. data/spec/test_data/v7.0/expected_wand.rbi +611 -0
  220. data/spec/test_data/v7.0/expected_wizard/habtm_subjects.rbi +367 -0
  221. data/spec/test_data/v7.0/expected_wizard.rbi +1280 -0
  222. data/spec/test_data/v7.0/expected_wizard_wo_spellbook.rbi +1274 -0
  223. metadata +245 -3
@@ -1,177 +1,187 @@
1
1
  PATH
2
2
  remote: ../../..
3
3
  specs:
4
- sorbet-rails (0.7.4)
4
+ sorbet-rails (0.7.32)
5
5
  method_source (>= 0.9.2)
6
6
  parlour (>= 4.0.1)
7
7
  parser (>= 2.7)
8
8
  sorbet-coerce (>= 0.2.6)
9
- sorbet-runtime (>= 0.5)
9
+ sorbet-runtime (>= 0.5.9892)
10
10
 
11
11
  GEM
12
12
  remote: https://rubygems.org/
13
13
  specs:
14
- actioncable (6.0.3.2)
15
- actionpack (= 6.0.3.2)
14
+ actioncable (6.1.5)
15
+ actionpack (= 6.1.5)
16
+ activesupport (= 6.1.5)
16
17
  nio4r (~> 2.0)
17
18
  websocket-driver (>= 0.6.1)
18
- actionmailbox (6.0.3.2)
19
- actionpack (= 6.0.3.2)
20
- activejob (= 6.0.3.2)
21
- activerecord (= 6.0.3.2)
22
- activestorage (= 6.0.3.2)
23
- activesupport (= 6.0.3.2)
19
+ actionmailbox (6.1.5)
20
+ actionpack (= 6.1.5)
21
+ activejob (= 6.1.5)
22
+ activerecord (= 6.1.5)
23
+ activestorage (= 6.1.5)
24
+ activesupport (= 6.1.5)
24
25
  mail (>= 2.7.1)
25
- actionmailer (6.0.3.2)
26
- actionpack (= 6.0.3.2)
27
- actionview (= 6.0.3.2)
28
- activejob (= 6.0.3.2)
26
+ actionmailer (6.1.5)
27
+ actionpack (= 6.1.5)
28
+ actionview (= 6.1.5)
29
+ activejob (= 6.1.5)
30
+ activesupport (= 6.1.5)
29
31
  mail (~> 2.5, >= 2.5.4)
30
32
  rails-dom-testing (~> 2.0)
31
- actionpack (6.0.3.2)
32
- actionview (= 6.0.3.2)
33
- activesupport (= 6.0.3.2)
34
- rack (~> 2.0, >= 2.0.8)
33
+ actionpack (6.1.5)
34
+ actionview (= 6.1.5)
35
+ activesupport (= 6.1.5)
36
+ rack (~> 2.0, >= 2.0.9)
35
37
  rack-test (>= 0.6.3)
36
38
  rails-dom-testing (~> 2.0)
37
39
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
38
- actiontext (6.0.3.2)
39
- actionpack (= 6.0.3.2)
40
- activerecord (= 6.0.3.2)
41
- activestorage (= 6.0.3.2)
42
- activesupport (= 6.0.3.2)
40
+ actiontext (6.1.5)
41
+ actionpack (= 6.1.5)
42
+ activerecord (= 6.1.5)
43
+ activestorage (= 6.1.5)
44
+ activesupport (= 6.1.5)
43
45
  nokogiri (>= 1.8.5)
44
- actionview (6.0.3.2)
45
- activesupport (= 6.0.3.2)
46
+ actionview (6.1.5)
47
+ activesupport (= 6.1.5)
46
48
  builder (~> 3.1)
47
49
  erubi (~> 1.4)
48
50
  rails-dom-testing (~> 2.0)
49
51
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
50
- activejob (6.0.3.2)
51
- activesupport (= 6.0.3.2)
52
+ activejob (6.1.5)
53
+ activesupport (= 6.1.5)
52
54
  globalid (>= 0.3.6)
53
- activemodel (6.0.3.2)
54
- activesupport (= 6.0.3.2)
55
- activerecord (6.0.3.2)
56
- activemodel (= 6.0.3.2)
57
- activesupport (= 6.0.3.2)
58
- activestorage (6.0.3.2)
59
- actionpack (= 6.0.3.2)
60
- activejob (= 6.0.3.2)
61
- activerecord (= 6.0.3.2)
62
- marcel (~> 0.3.1)
63
- activesupport (6.0.3.2)
55
+ activemodel (6.1.5)
56
+ activesupport (= 6.1.5)
57
+ activerecord (6.1.5)
58
+ activemodel (= 6.1.5)
59
+ activesupport (= 6.1.5)
60
+ activestorage (6.1.5)
61
+ actionpack (= 6.1.5)
62
+ activejob (= 6.1.5)
63
+ activerecord (= 6.1.5)
64
+ activesupport (= 6.1.5)
65
+ marcel (~> 1.0)
66
+ mini_mime (>= 1.1.0)
67
+ activesupport (6.1.5)
64
68
  concurrent-ruby (~> 1.0, >= 1.0.2)
65
- i18n (>= 0.7, < 2)
66
- minitest (~> 5.1)
67
- tzinfo (~> 1.1)
68
- zeitwerk (~> 2.2, >= 2.2.2)
69
+ i18n (>= 1.6, < 2)
70
+ minitest (>= 5.1)
71
+ tzinfo (~> 2.0)
72
+ zeitwerk (~> 2.3)
69
73
  ast (2.4.2)
70
74
  bindex (0.8.1)
71
75
  builder (3.2.4)
72
76
  byebug (11.1.3)
73
77
  commander (4.6.0)
74
78
  highline (~> 2.0.0)
75
- concurrent-ruby (1.1.6)
79
+ concurrent-ruby (1.1.10)
76
80
  crass (1.0.6)
77
- erubi (1.9.0)
78
- globalid (0.4.2)
79
- activesupport (>= 4.2.0)
81
+ erubi (1.10.0)
82
+ globalid (1.0.0)
83
+ activesupport (>= 5.0)
80
84
  highline (2.0.3)
81
- i18n (1.8.3)
85
+ i18n (1.10.0)
82
86
  concurrent-ruby (~> 1.0)
83
- jbuilder (2.10.0)
87
+ jbuilder (2.11.5)
88
+ actionview (>= 5.0.0)
84
89
  activesupport (>= 5.0.0)
85
- loofah (2.6.0)
90
+ loofah (2.16.0)
86
91
  crass (~> 1.0.2)
87
92
  nokogiri (>= 1.5.9)
88
93
  mail (2.7.1)
89
94
  mini_mime (>= 0.1.1)
90
- marcel (0.3.3)
91
- mimemagic (~> 0.3.2)
95
+ marcel (1.0.2)
92
96
  method_source (1.0.0)
93
- mimemagic (0.3.5)
94
- mini_mime (1.0.2)
95
- mini_portile2 (2.5.0)
96
- minitest (5.14.1)
97
- nio4r (2.5.2)
98
- nokogiri (1.11.1)
99
- mini_portile2 (~> 2.5.0)
97
+ mini_mime (1.1.2)
98
+ mini_portile2 (2.8.0)
99
+ minitest (5.15.0)
100
+ nio4r (2.5.8)
101
+ nokogiri (1.13.4)
102
+ mini_portile2 (~> 2.8.0)
100
103
  racc (~> 1.4)
101
- nokogiri (1.11.1-x86_64-darwin)
104
+ nokogiri (1.13.4-x86_64-darwin)
102
105
  racc (~> 1.4)
103
- parlour (6.0.0)
106
+ parlour (7.0.0)
104
107
  commander (~> 4.5)
105
108
  parser
106
109
  rainbow (~> 3.0)
107
110
  sorbet-runtime (>= 0.5)
108
- parser (3.0.1.1)
111
+ parser (3.1.2.0)
109
112
  ast (~> 2.4.1)
110
113
  polyfill (1.9.0)
111
- puma (4.3.5)
114
+ puma (5.6.4)
112
115
  nio4r (~> 2.0)
113
- racc (1.5.2)
116
+ racc (1.6.0)
114
117
  rack (2.2.3)
115
118
  rack-test (1.1.0)
116
119
  rack (>= 1.0, < 3)
117
- rails (6.0.3.2)
118
- actioncable (= 6.0.3.2)
119
- actionmailbox (= 6.0.3.2)
120
- actionmailer (= 6.0.3.2)
121
- actionpack (= 6.0.3.2)
122
- actiontext (= 6.0.3.2)
123
- actionview (= 6.0.3.2)
124
- activejob (= 6.0.3.2)
125
- activemodel (= 6.0.3.2)
126
- activerecord (= 6.0.3.2)
127
- activestorage (= 6.0.3.2)
128
- activesupport (= 6.0.3.2)
129
- bundler (>= 1.3.0)
130
- railties (= 6.0.3.2)
120
+ rails (6.1.5)
121
+ actioncable (= 6.1.5)
122
+ actionmailbox (= 6.1.5)
123
+ actionmailer (= 6.1.5)
124
+ actionpack (= 6.1.5)
125
+ actiontext (= 6.1.5)
126
+ actionview (= 6.1.5)
127
+ activejob (= 6.1.5)
128
+ activemodel (= 6.1.5)
129
+ activerecord (= 6.1.5)
130
+ activestorage (= 6.1.5)
131
+ activesupport (= 6.1.5)
132
+ bundler (>= 1.15.0)
133
+ railties (= 6.1.5)
131
134
  sprockets-rails (>= 2.0.0)
132
135
  rails-dom-testing (2.0.3)
133
136
  activesupport (>= 4.2.0)
134
137
  nokogiri (>= 1.6)
135
- rails-html-sanitizer (1.3.0)
138
+ rails-html-sanitizer (1.4.2)
136
139
  loofah (~> 2.3)
137
- railties (6.0.3.2)
138
- actionpack (= 6.0.3.2)
139
- activesupport (= 6.0.3.2)
140
+ railties (6.1.5)
141
+ actionpack (= 6.1.5)
142
+ activesupport (= 6.1.5)
140
143
  method_source
141
- rake (>= 0.8.7)
142
- thor (>= 0.20.3, < 2.0)
143
- rainbow (3.0.0)
144
- rake (13.0.1)
144
+ rake (>= 12.2)
145
+ thor (~> 1.0)
146
+ rainbow (3.1.1)
147
+ rake (13.0.6)
145
148
  safe_type (1.1.1)
146
- sorbet (0.5.5815)
147
- sorbet-static (= 0.5.5815)
148
- sorbet-coerce (0.4.0)
149
+ sorbet (0.5.9892)
150
+ sorbet-static (= 0.5.9892)
151
+ sorbet-coerce (0.5.0)
149
152
  polyfill (~> 1.8)
150
153
  safe_type (~> 1.1, >= 1.1.1)
151
154
  sorbet-runtime (>= 0.4.4704)
152
- sorbet-runtime (0.5.5815)
153
- sorbet-static (0.5.5815-universal-darwin-19)
154
- sprockets (4.0.2)
155
+ sorbet-runtime (0.5.9892)
156
+ sorbet-static (0.5.9892-universal-darwin-14)
157
+ sorbet-static (0.5.9892-universal-darwin-15)
158
+ sorbet-static (0.5.9892-universal-darwin-16)
159
+ sorbet-static (0.5.9892-universal-darwin-17)
160
+ sorbet-static (0.5.9892-universal-darwin-18)
161
+ sorbet-static (0.5.9892-universal-darwin-19)
162
+ sorbet-static (0.5.9892-universal-darwin-20)
163
+ sorbet-static (0.5.9892-universal-darwin-21)
164
+ sorbet-static (0.5.9892-x86_64-linux)
165
+ sprockets (4.0.3)
155
166
  concurrent-ruby (~> 1.0)
156
167
  rack (> 1, < 3)
157
- sprockets-rails (3.2.1)
158
- actionpack (>= 4.0)
159
- activesupport (>= 4.0)
168
+ sprockets-rails (3.4.2)
169
+ actionpack (>= 5.2)
170
+ activesupport (>= 5.2)
160
171
  sprockets (>= 3.0.0)
161
172
  sqlite3 (1.4.2)
162
- thor (1.0.1)
163
- thread_safe (0.3.6)
164
- tzinfo (1.2.7)
165
- thread_safe (~> 0.1)
166
- web-console (4.0.4)
173
+ thor (1.2.1)
174
+ tzinfo (2.0.4)
175
+ concurrent-ruby (~> 1.0)
176
+ web-console (4.2.0)
167
177
  actionview (>= 6.0.0)
168
178
  activemodel (>= 6.0.0)
169
179
  bindex (>= 0.4.0)
170
180
  railties (>= 6.0.0)
171
- websocket-driver (0.7.3)
181
+ websocket-driver (0.7.5)
172
182
  websocket-extensions (>= 0.1.0)
173
183
  websocket-extensions (0.1.5)
174
- zeitwerk (2.3.1)
184
+ zeitwerk (2.5.4)
175
185
 
176
186
  PLATFORMS
177
187
  ruby
@@ -180,17 +190,14 @@ PLATFORMS
180
190
  DEPENDENCIES
181
191
  byebug
182
192
  jbuilder (~> 2.7)
183
- puma (~> 4.1)
184
- rails (~> 6.0.3)
193
+ puma (~> 5.0)
194
+ rails (~> 6.1.4)
185
195
  sorbet
186
196
  sorbet-rails!
187
197
  sorbet-runtime
188
198
  sqlite3 (~> 1.4)
189
199
  tzinfo-data
190
- web-console (>= 3.3.0)
191
-
192
- RUBY VERSION
193
- ruby 2.5.5p157
200
+ web-console (>= 4.1.0)
194
201
 
195
202
  BUNDLED WITH
196
- 2.2.0
203
+ 2.2.32
@@ -32,6 +32,8 @@ T.assert_type!(wizard.spell_book_ids, T::Array[Integer])
32
32
  # Finder methods -- Model
33
33
  T.assert_type!(Wizard.exists?(name: 'Test'), T::Boolean)
34
34
  T.assert_type!(Wizard.find(wizard.id), Wizard)
35
+ T.assert_type!(Wizard.take, T.nilable(Wizard))
36
+ T.assert_type!(Wizard.take!, Wizard)
35
37
  T.assert_type!(Wizard.first!, Wizard)
36
38
  T.assert_type!(Wizard.first, T.nilable(Wizard))
37
39
  T.assert_type!(Wizard.second!, Wizard)
@@ -86,10 +88,13 @@ T.assert_type!(Wizard.eager_load(:spell_books), Wizard::ActiveRecord_Relation)
86
88
  T.assert_type!(Wizard.order(:id), Wizard::ActiveRecord_Relation)
87
89
  T.assert_type!(Wizard.select { |r| r.id == 1 }, T::Array[Wizard])
88
90
  T.assert_type!(Wizard.select_columns(:id, :name), Wizard::ActiveRecord_Relation)
91
+ T.assert_type!(Wizard.where_missing(:wand), Wizard::ActiveRecord_Relation)
89
92
 
90
93
  # Finder methods -- ActiveRecord::Relation
91
94
  T.assert_type!(Wizard.all.exists?(name: 'Harry Potter'), T::Boolean)
92
95
  T.assert_type!(Wizard.all.find(wizard.id), Wizard)
96
+ T.assert_type!(Wizard.all.take, T.nilable(Wizard))
97
+ T.assert_type!(Wizard.all.take!, Wizard)
93
98
  T.assert_type!(Wizard.all.first!, Wizard)
94
99
  T.assert_type!(Wizard.all.first, T.nilable(Wizard))
95
100
  T.assert_type!(Wizard.all.second!, Wizard)
@@ -150,6 +155,7 @@ T.assert_type!(Wizard.all.eager_load(:spell_books), Wizard::ActiveRecord_Relatio
150
155
  T.assert_type!(Wizard.all.order(:id), Wizard::ActiveRecord_Relation)
151
156
  T.assert_type!(Wizard.all.select { |r| r.id == 1 }, T::Array[Wizard])
152
157
  T.assert_type!(Wizard.all.select_columns(:id, :name), Wizard::ActiveRecord_Relation)
158
+ T.assert_type!(Wizard.all.where_missing(:wand), Wizard::ActiveRecord_Relation)
153
159
  # Enumerable methods
154
160
  Wizard.all.each { |w| T.assert_type!(w, Wizard) }
155
161
  Wizard.all.map { |w| T.assert_type!(w, Wizard) }
@@ -161,6 +167,8 @@ spell_book = wizard.spell_books.first!
161
167
  spell_books = wizard.spell_books
162
168
  T.assert_type!(spell_books.exists?(name: 'Fantastic Beasts'), T::Boolean)
163
169
  T.assert_type!(spell_books.find(spell_book.id), SpellBook)
170
+ T.assert_type!(spell_books.take, T.nilable(SpellBook))
171
+ T.assert_type!(spell_books.take!, SpellBook)
164
172
  T.assert_type!(spell_books.first!, SpellBook)
165
173
  T.assert_type!(spell_books.first, T.nilable(SpellBook))
166
174
  T.assert_type!(spell_books.second!, SpellBook)
@@ -220,6 +228,7 @@ T.assert_type!(spell_books.eager_load(:wizard), SpellBook::ActiveRecord_Associat
220
228
  T.assert_type!(spell_books.order(:id), SpellBook::ActiveRecord_AssociationRelation)
221
229
  T.assert_type!(spell_books.select { |r| r.id == 1 }, T::Array[SpellBook])
222
230
  T.assert_type!(spell_books.select_columns(:id, :name), SpellBook::ActiveRecord_AssociationRelation)
231
+ T.assert_type!(spell_books.where_missing(:wizard), SpellBook::ActiveRecord_AssociationRelation)
223
232
 
224
233
  # Enumerable methods
225
234
  spell_books.each { |s| T.assert_type!(s, SpellBook) }
@@ -240,6 +249,8 @@ T.assert_type!(spell_books.push([spell_book]), SpellBook::ActiveRecord_Associati
240
249
  spell_books_query = spell_books.where(wizard_id: wizard.id)
241
250
  T.assert_type!(spell_books_query.exists?(name: 'Fantastic Beasts'), T::Boolean)
242
251
  T.assert_type!(spell_books_query.find(spell_book.id), SpellBook)
252
+ T.assert_type!(spell_books_query.take, T.nilable(SpellBook))
253
+ T.assert_type!(spell_books_query.take!, SpellBook)
243
254
  T.assert_type!(spell_books_query.first!, SpellBook)
244
255
  T.assert_type!(spell_books_query.first, T.nilable(SpellBook))
245
256
  T.assert_type!(spell_books_query.second!, SpellBook)
@@ -0,0 +1,7 @@
1
+ # See https://git-scm.com/docs/gitattributes for more about git attribute files.
2
+
3
+ # Mark the database schema as having been generated.
4
+ db/schema.rb linguist-generated
5
+
6
+ # Mark any vendored files as having been vendored.
7
+ vendor/* linguist-vendored
@@ -0,0 +1,35 @@
1
+ # See https://help.github.com/articles/ignoring-files for more about ignoring files.
2
+ #
3
+ # If you find yourself ignoring temporary files generated by your text editor
4
+ # or operating system, you probably want to add a global ignore instead:
5
+ # git config --global core.excludesfile '~/.gitignore_global'
6
+
7
+ # Ignore bundler config.
8
+ /.bundle
9
+
10
+ # Ignore the default SQLite database.
11
+ /db/*.sqlite3
12
+ /db/*.sqlite3-*
13
+
14
+ # Ignore all logfiles and tempfiles.
15
+ /log/*
16
+ /tmp/*
17
+ !/log/.keep
18
+ !/tmp/.keep
19
+
20
+ # Ignore pidfiles, but keep the directory.
21
+ /tmp/pids/*
22
+ !/tmp/pids/
23
+ !/tmp/pids/.keep
24
+
25
+ # Ignore uploaded files in development.
26
+ /storage/*
27
+ !/storage/.keep
28
+ /tmp/storage/*
29
+ !/tmp/storage/
30
+ !/tmp/storage/.keep
31
+
32
+ /public/assets
33
+
34
+ # Ignore master key for decrypting credentials and more.
35
+ /config/master.key
@@ -0,0 +1,48 @@
1
+ source "https://rubygems.org"
2
+ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
3
+
4
+ ruby "3.0.1"
5
+
6
+ # Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
7
+ gem "rails", "~> 7.0.3"
8
+
9
+ # Use sqlite3 as the database for Active Record
10
+ gem "sqlite3", "~> 1.4"
11
+
12
+ # Use the Puma web server [https://github.com/puma/puma]
13
+ gem "puma", "~> 5.0"
14
+
15
+ # Build JSON APIs with ease [https://github.com/rails/jbuilder]
16
+ gem "jbuilder"
17
+
18
+ # Use Kredis to get higher-level data types in Redis [https://github.com/rails/kredis]
19
+ # gem "kredis"
20
+
21
+ # Use Active Model has_secure_password [https://guides.rubyonrails.org/active_model_basics.html#securepassword]
22
+ # gem "bcrypt", "~> 3.1.7"
23
+
24
+ # Windows does not include zoneinfo files, so bundle the tzinfo-data gem
25
+ gem "tzinfo-data", platforms: %i[ mingw mswin x64_mingw jruby ]
26
+
27
+ # Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images]
28
+ # gem "image_processing", "~> 1.2"
29
+
30
+ group :development, :test do
31
+ # See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem
32
+ gem "debug", platforms: %i[ mri mingw x64_mingw ]
33
+ end
34
+
35
+ group :development do
36
+ # Use console on exceptions pages [https://github.com/rails/web-console]
37
+ gem "web-console"
38
+
39
+ # Add speed badges [https://github.com/MiniProfiler/rack-mini-profiler]
40
+ # gem "rack-mini-profiler"
41
+
42
+ # Speed up commands on slow machines / big apps [https://github.com/rails/spring]
43
+ # gem "spring"
44
+ end
45
+
46
+ gem "sorbet-rails", path: "../../../."
47
+ gem "sorbet"
48
+ gem "sorbet-runtime"
@@ -0,0 +1,218 @@
1
+ PATH
2
+ remote: ../../..
3
+ specs:
4
+ sorbet-rails (0.7.33)
5
+ method_source (>= 0.9.2)
6
+ parlour (>= 4.0.1)
7
+ parser (>= 2.7)
8
+ sorbet-coerce (>= 0.2.6)
9
+ sorbet-runtime (>= 0.5.9892)
10
+
11
+ GEM
12
+ remote: https://rubygems.org/
13
+ specs:
14
+ actioncable (7.0.3)
15
+ actionpack (= 7.0.3)
16
+ activesupport (= 7.0.3)
17
+ nio4r (~> 2.0)
18
+ websocket-driver (>= 0.6.1)
19
+ actionmailbox (7.0.3)
20
+ actionpack (= 7.0.3)
21
+ activejob (= 7.0.3)
22
+ activerecord (= 7.0.3)
23
+ activestorage (= 7.0.3)
24
+ activesupport (= 7.0.3)
25
+ mail (>= 2.7.1)
26
+ net-imap
27
+ net-pop
28
+ net-smtp
29
+ actionmailer (7.0.3)
30
+ actionpack (= 7.0.3)
31
+ actionview (= 7.0.3)
32
+ activejob (= 7.0.3)
33
+ activesupport (= 7.0.3)
34
+ mail (~> 2.5, >= 2.5.4)
35
+ net-imap
36
+ net-pop
37
+ net-smtp
38
+ rails-dom-testing (~> 2.0)
39
+ actionpack (7.0.3)
40
+ actionview (= 7.0.3)
41
+ activesupport (= 7.0.3)
42
+ rack (~> 2.0, >= 2.2.0)
43
+ rack-test (>= 0.6.3)
44
+ rails-dom-testing (~> 2.0)
45
+ rails-html-sanitizer (~> 1.0, >= 1.2.0)
46
+ actiontext (7.0.3)
47
+ actionpack (= 7.0.3)
48
+ activerecord (= 7.0.3)
49
+ activestorage (= 7.0.3)
50
+ activesupport (= 7.0.3)
51
+ globalid (>= 0.6.0)
52
+ nokogiri (>= 1.8.5)
53
+ actionview (7.0.3)
54
+ activesupport (= 7.0.3)
55
+ builder (~> 3.1)
56
+ erubi (~> 1.4)
57
+ rails-dom-testing (~> 2.0)
58
+ rails-html-sanitizer (~> 1.1, >= 1.2.0)
59
+ activejob (7.0.3)
60
+ activesupport (= 7.0.3)
61
+ globalid (>= 0.3.6)
62
+ activemodel (7.0.3)
63
+ activesupport (= 7.0.3)
64
+ activerecord (7.0.3)
65
+ activemodel (= 7.0.3)
66
+ activesupport (= 7.0.3)
67
+ activestorage (7.0.3)
68
+ actionpack (= 7.0.3)
69
+ activejob (= 7.0.3)
70
+ activerecord (= 7.0.3)
71
+ activesupport (= 7.0.3)
72
+ marcel (~> 1.0)
73
+ mini_mime (>= 1.1.0)
74
+ activesupport (7.0.3)
75
+ concurrent-ruby (~> 1.0, >= 1.0.2)
76
+ i18n (>= 1.6, < 2)
77
+ minitest (>= 5.1)
78
+ tzinfo (~> 2.0)
79
+ ast (2.4.2)
80
+ bindex (0.8.1)
81
+ builder (3.2.4)
82
+ commander (4.6.0)
83
+ highline (~> 2.0.0)
84
+ concurrent-ruby (1.1.10)
85
+ crass (1.0.6)
86
+ debug (1.5.0)
87
+ irb (>= 1.3.6)
88
+ reline (>= 0.2.7)
89
+ digest (3.1.0)
90
+ erubi (1.10.0)
91
+ globalid (1.0.0)
92
+ activesupport (>= 5.0)
93
+ highline (2.0.3)
94
+ i18n (1.10.0)
95
+ concurrent-ruby (~> 1.0)
96
+ io-console (0.5.11)
97
+ irb (1.4.1)
98
+ reline (>= 0.3.0)
99
+ jbuilder (2.11.5)
100
+ actionview (>= 5.0.0)
101
+ activesupport (>= 5.0.0)
102
+ loofah (2.18.0)
103
+ crass (~> 1.0.2)
104
+ nokogiri (>= 1.5.9)
105
+ mail (2.7.1)
106
+ mini_mime (>= 0.1.1)
107
+ marcel (1.0.2)
108
+ method_source (1.0.0)
109
+ mini_mime (1.1.2)
110
+ minitest (5.16.1)
111
+ net-imap (0.2.3)
112
+ digest
113
+ net-protocol
114
+ strscan
115
+ net-pop (0.1.1)
116
+ digest
117
+ net-protocol
118
+ timeout
119
+ net-protocol (0.1.3)
120
+ timeout
121
+ net-smtp (0.3.1)
122
+ digest
123
+ net-protocol
124
+ timeout
125
+ nio4r (2.5.8)
126
+ nokogiri (1.13.6-x86_64-darwin)
127
+ racc (~> 1.4)
128
+ parlour (8.0.0)
129
+ commander (~> 4.5)
130
+ parser
131
+ rainbow (~> 3.0)
132
+ sorbet-runtime (>= 0.5)
133
+ parser (3.1.2.0)
134
+ ast (~> 2.4.1)
135
+ polyfill (1.9.0)
136
+ puma (5.6.4)
137
+ nio4r (~> 2.0)
138
+ racc (1.6.0)
139
+ rack (2.2.4)
140
+ rack-test (2.0.2)
141
+ rack (>= 1.3)
142
+ rails (7.0.3)
143
+ actioncable (= 7.0.3)
144
+ actionmailbox (= 7.0.3)
145
+ actionmailer (= 7.0.3)
146
+ actionpack (= 7.0.3)
147
+ actiontext (= 7.0.3)
148
+ actionview (= 7.0.3)
149
+ activejob (= 7.0.3)
150
+ activemodel (= 7.0.3)
151
+ activerecord (= 7.0.3)
152
+ activestorage (= 7.0.3)
153
+ activesupport (= 7.0.3)
154
+ bundler (>= 1.15.0)
155
+ railties (= 7.0.3)
156
+ rails-dom-testing (2.0.3)
157
+ activesupport (>= 4.2.0)
158
+ nokogiri (>= 1.6)
159
+ rails-html-sanitizer (1.4.3)
160
+ loofah (~> 2.3)
161
+ railties (7.0.3)
162
+ actionpack (= 7.0.3)
163
+ activesupport (= 7.0.3)
164
+ method_source
165
+ rake (>= 12.2)
166
+ thor (~> 1.0)
167
+ zeitwerk (~> 2.5)
168
+ rainbow (3.1.1)
169
+ rake (13.0.6)
170
+ reline (0.3.1)
171
+ io-console (~> 0.5)
172
+ safe_type (1.1.1)
173
+ sorbet (0.5.10139)
174
+ sorbet-static (= 0.5.10139)
175
+ sorbet-coerce (0.5.0)
176
+ polyfill (~> 1.8)
177
+ safe_type (~> 1.1, >= 1.1.1)
178
+ sorbet-runtime (>= 0.4.4704)
179
+ sorbet-runtime (0.5.10139)
180
+ sorbet-static (0.5.10139-universal-darwin-20)
181
+ sorbet-static (0.5.10139-universal-darwin-21)
182
+ sqlite3 (1.4.4)
183
+ strscan (3.0.3)
184
+ thor (1.2.1)
185
+ timeout (0.3.0)
186
+ tzinfo (2.0.4)
187
+ concurrent-ruby (~> 1.0)
188
+ web-console (4.2.0)
189
+ actionview (>= 6.0.0)
190
+ activemodel (>= 6.0.0)
191
+ bindex (>= 0.4.0)
192
+ railties (>= 6.0.0)
193
+ websocket-driver (0.7.5)
194
+ websocket-extensions (>= 0.1.0)
195
+ websocket-extensions (0.1.5)
196
+ zeitwerk (2.6.0)
197
+
198
+ PLATFORMS
199
+ x86_64-darwin-20
200
+ x86_64-darwin-21
201
+
202
+ DEPENDENCIES
203
+ debug
204
+ jbuilder
205
+ puma (~> 5.0)
206
+ rails (~> 7.0.3)
207
+ sorbet
208
+ sorbet-rails!
209
+ sorbet-runtime
210
+ sqlite3 (~> 1.4)
211
+ tzinfo-data
212
+ web-console
213
+
214
+ RUBY VERSION
215
+ ruby 3.0.1p64
216
+
217
+ BUNDLED WITH
218
+ 2.2.29