sorbet-rails 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (431) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +5 -2
  3. data/.travis.yml +7 -1
  4. data/CONTRIBUTING.md +3 -1
  5. data/Gemfile +11 -0
  6. data/README.md +0 -2
  7. data/{rbi → lib/sorbet-rails/rbi}/activerecord.rbi +118 -86
  8. data/lib/sorbet-rails/tasks/rails_rbi.rake +15 -6
  9. data/lib/sorbet-rails/utils.rb +11 -0
  10. data/sorbet-rails.gemspec +1 -1
  11. data/spec/bin/run_all_specs.sh +3 -2
  12. data/spec/bin/run_spec.sh +33 -26
  13. data/spec/model_rbi_formatter_spec.rb +0 -15
  14. data/spec/rails_helper.rb +12 -7
  15. data/spec/rake_rails_rbi_models_spec.rb +22 -5
  16. data/spec/rake_rails_rbi_routes_spec.rb +0 -1
  17. data/spec/sorbet_spec.rb +80 -0
  18. data/spec/support/rails_shared/config/routes.rb +1 -0
  19. data/spec/support/rails_shared/sorbet_test_cases.rb +120 -0
  20. data/spec/support/rails_symlinks/sorbet_test_cases.rb +1 -0
  21. data/spec/support/v4.2/Gemfile +13 -0
  22. data/spec/support/v4.2/Gemfile.lock +138 -0
  23. data/spec/support/v4.2/app/controllers/application_controller.rb +1 -0
  24. data/spec/support/v4.2/app/helpers/application_helper.rb +1 -0
  25. data/spec/support/v4.2/config/application.rb +1 -0
  26. data/spec/support/v4.2/config/boot.rb +1 -0
  27. data/spec/support/v4.2/config/environment.rb +1 -0
  28. data/spec/support/v4.2/config/environments/development.rb +1 -0
  29. data/spec/support/v4.2/config/environments/production.rb +1 -0
  30. data/spec/support/v4.2/config/environments/test.rb +1 -0
  31. data/spec/support/v4.2/config/initializers/backtrace_silencers.rb +1 -0
  32. data/spec/support/v4.2/config/initializers/cookies_serializer.rb +1 -0
  33. data/spec/support/v4.2/config/initializers/filter_parameter_logging.rb +1 -0
  34. data/spec/support/v4.2/config/initializers/inflections.rb +1 -0
  35. data/spec/support/v4.2/config/initializers/mime_types.rb +1 -0
  36. data/spec/support/v4.2/config/initializers/session_store.rb +1 -0
  37. data/spec/support/v4.2/config/initializers/to_time_preserves_timezone.rb +1 -0
  38. data/spec/support/v4.2/config/initializers/wrap_parameters.rb +1 -0
  39. data/spec/support/v4.2/config/routes.rb +1 -0
  40. data/spec/support/v4.2/db/migrate/20190620001234_create_wizards.rb +1 -0
  41. data/spec/support/v4.2/db/migrate/20190620003037_create_wands.rb +1 -0
  42. data/spec/support/v4.2/db/migrate/20190620003739_create_spell_books.rb +1 -0
  43. data/spec/support/v4.2/db/migrate/20190622000000_add_more_column_types_to_wands.rb +1 -0
  44. data/spec/support/v4.2/db/schema.rb +1 -0
  45. data/spec/support/v4.2/db/seeds.rb +1 -0
  46. data/spec/support/v4.2/sorbet/config +2 -0
  47. data/spec/support/v4.2/sorbet/rbi/gems/actionmailer.rbi +267 -0
  48. data/spec/support/v4.2/sorbet/rbi/gems/actionpack.rbi +2885 -0
  49. data/spec/support/v4.2/sorbet/rbi/gems/actionview.rbi +978 -0
  50. data/spec/support/v4.2/sorbet/rbi/gems/activejob.rbi +19 -0
  51. data/spec/support/v4.2/sorbet/rbi/gems/activemodel.rbi +335 -0
  52. data/spec/support/v4.2/sorbet/rbi/gems/activerecord.rbi +3382 -0
  53. data/spec/support/v4.2/sorbet/rbi/gems/activesupport.rbi +1892 -0
  54. data/spec/support/v4.2/sorbet/rbi/gems/arel.rbi +1109 -0
  55. data/spec/support/v4.2/sorbet/rbi/gems/binding_of_caller.rbi +22 -0
  56. data/spec/support/v4.2/sorbet/rbi/gems/byebug.rbi +1039 -0
  57. data/spec/support/v4.2/sorbet/rbi/gems/concurrent-ruby.rbi +218 -0
  58. data/spec/support/v4.2/sorbet/rbi/gems/crass.rbi +92 -0
  59. data/spec/support/v4.2/sorbet/rbi/gems/debug_inspector.rbi +18 -0
  60. data/spec/support/v4.2/sorbet/rbi/gems/erubis.rbi +265 -0
  61. data/spec/support/v4.2/sorbet/rbi/gems/globalid.rbi +98 -0
  62. data/spec/support/v4.2/sorbet/rbi/gems/i18n.rbi +186 -0
  63. data/spec/support/v4.2/sorbet/rbi/gems/jbuilder.rbi +99 -0
  64. data/spec/support/v4.2/sorbet/rbi/gems/loofah.rbi +129 -0
  65. data/spec/support/v4.2/sorbet/rbi/gems/mail.rbi +1091 -0
  66. data/spec/support/v4.2/sorbet/rbi/gems/mini_mime.rbi +45 -0
  67. data/spec/support/v4.2/sorbet/rbi/gems/minitest.rbi +276 -0
  68. data/spec/support/v4.2/sorbet/rbi/gems/nokogiri.rbi +1010 -0
  69. data/spec/support/v4.2/sorbet/rbi/gems/rack-test.rbi +145 -0
  70. data/spec/support/v4.2/sorbet/rbi/gems/rack.rbi +490 -0
  71. data/spec/support/v4.2/sorbet/rbi/gems/rails-deprecated_sanitizer.rbi +13 -0
  72. data/spec/support/v4.2/sorbet/rbi/gems/rails-dom-testing.rbi +76 -0
  73. data/spec/support/v4.2/sorbet/rbi/gems/rails-html-sanitizer.rbi +90 -0
  74. data/spec/support/v4.2/sorbet/rbi/gems/railties.rbi +623 -0
  75. data/spec/support/v4.2/sorbet/rbi/gems/rdoc.rbi +1053 -0
  76. data/spec/support/v4.2/sorbet/rbi/gems/sdoc.rbi +73 -0
  77. data/spec/support/v4.2/sorbet/rbi/gems/sorbet-runtime.rbi +647 -0
  78. data/spec/support/v4.2/sorbet/rbi/gems/sqlite3.rbi +345 -0
  79. data/spec/support/v4.2/sorbet/rbi/gems/thor.rbi +401 -0
  80. data/spec/support/v4.2/sorbet/rbi/gems/thread_safe.rbi +81 -0
  81. data/spec/support/v4.2/sorbet/rbi/gems/tzinfo.rbi +407 -0
  82. data/spec/support/v4.2/sorbet/rbi/gems/web-console.rbi +136 -0
  83. data/spec/support/v4.2/sorbet/rbi/hidden-definitions/errors.txt +11998 -0
  84. data/spec/support/v4.2/sorbet/rbi/hidden-definitions/hidden.rbi +27774 -0
  85. data/spec/support/v4.2/sorbet/rbi/sorbet-typed/lib/actionmailer/all/actionmailer.rbi +13 -0
  86. data/spec/support/v4.2/sorbet/rbi/sorbet-typed/lib/actionpack/all/actionpack.rbi +13 -0
  87. data/spec/support/v4.2/sorbet/rbi/sorbet-typed/lib/activerecord/all/activerecord.rbi +51 -0
  88. data/spec/support/v4.2/sorbet/rbi/sorbet-typed/lib/activesupport/all/activesupport.rbi +107 -0
  89. data/spec/support/v4.2/sorbet/rbi/sorbet-typed/lib/bundler/all/bundler.rbi +8547 -0
  90. data/spec/support/v4.2/sorbet/rbi/sorbet-typed/lib/railties/all/railties.rbi +22 -0
  91. data/spec/support/v4.2/sorbet/rbi/sorbet-typed/lib/ruby/all/open3.rbi +111 -0
  92. data/spec/support/v4.2/sorbet/rbi/sorbet-typed/lib/ruby/all/resolv.rbi +543 -0
  93. data/spec/support/v4.2/sorbet/rbi/todo.rbi +8 -0
  94. data/spec/support/v4.2/sorbet_test_cases.rb +1 -0
  95. data/spec/support/v4.2/test/test_helper.rb +1 -0
  96. data/spec/support/v5.0/Gemfile +13 -0
  97. data/spec/support/v5.0/Gemfile.lock +130 -0
  98. data/spec/support/v5.0/app/channels/application_cable/channel.rb +1 -0
  99. data/spec/support/v5.0/app/channels/application_cable/connection.rb +1 -0
  100. data/spec/support/v5.0/app/jobs/application_job.rb +1 -0
  101. data/spec/support/v5.0/app/mailers/application_mailer.rb +1 -0
  102. data/spec/support/v5.0/config/application.rb +1 -0
  103. data/spec/support/v5.0/config/boot.rb +1 -0
  104. data/spec/support/v5.0/config/environment.rb +1 -0
  105. data/spec/support/v5.0/config/environments/development.rb +1 -0
  106. data/spec/support/v5.0/config/environments/production.rb +1 -0
  107. data/spec/support/v5.0/config/environments/test.rb +1 -0
  108. data/spec/support/v5.0/config/initializers/application_controller_renderer.rb +1 -0
  109. data/spec/support/v5.0/config/initializers/backtrace_silencers.rb +1 -0
  110. data/spec/support/v5.0/config/initializers/cors.rb +1 -0
  111. data/spec/support/v5.0/config/initializers/filter_parameter_logging.rb +1 -0
  112. data/spec/support/v5.0/config/initializers/inflections.rb +1 -0
  113. data/spec/support/v5.0/config/initializers/mime_types.rb +1 -0
  114. data/spec/support/v5.0/config/initializers/new_framework_defaults.rb +1 -0
  115. data/spec/support/v5.0/config/initializers/wrap_parameters.rb +1 -0
  116. data/spec/support/v5.0/config/puma.rb +1 -0
  117. data/spec/support/v5.0/config/routes.rb +1 -0
  118. data/spec/support/v5.0/db/schema.rb +1 -0
  119. data/spec/support/v5.0/db/seeds.rb +1 -0
  120. data/spec/support/v5.0/rails_symlinks/config/routes.rb +1 -0
  121. data/spec/support/v5.0/sorbet/config +2 -0
  122. data/spec/support/v5.0/sorbet/rbi/gems/actioncable.rbi +309 -0
  123. data/spec/support/v5.0/sorbet/rbi/gems/actionmailer.rbi +379 -0
  124. data/spec/support/v5.0/sorbet/rbi/gems/actionpack.rbi +3150 -0
  125. data/spec/support/v5.0/sorbet/rbi/gems/actionview.rbi +1093 -0
  126. data/spec/support/v5.0/sorbet/rbi/gems/activejob.rbi +252 -0
  127. data/spec/support/v5.0/sorbet/rbi/gems/activemodel.rbi +562 -0
  128. data/spec/support/v5.0/sorbet/rbi/gems/activerecord.rbi +4060 -0
  129. data/spec/support/v5.0/sorbet/rbi/gems/activesupport.rbi +2078 -0
  130. data/spec/support/v5.0/sorbet/rbi/gems/arel.rbi +1222 -0
  131. data/spec/support/v5.0/sorbet/rbi/gems/byebug.rbi +1039 -0
  132. data/spec/support/v5.0/sorbet/rbi/gems/concurrent-ruby.rbi +1587 -0
  133. data/spec/support/v5.0/sorbet/rbi/gems/crass.rbi +92 -0
  134. data/spec/support/v5.0/sorbet/rbi/gems/erubis.rbi +265 -0
  135. data/spec/support/v5.0/sorbet/rbi/gems/globalid.rbi +98 -0
  136. data/spec/support/v5.0/sorbet/rbi/gems/i18n.rbi +191 -0
  137. data/spec/support/v5.0/sorbet/rbi/gems/loofah.rbi +129 -0
  138. data/spec/support/v5.0/sorbet/rbi/gems/mail.rbi +1091 -0
  139. data/spec/support/v5.0/sorbet/rbi/gems/method_source.rbi +63 -0
  140. data/spec/support/v5.0/sorbet/rbi/gems/mini_mime.rbi +45 -0
  141. data/spec/support/v5.0/sorbet/rbi/gems/minitest.rbi +276 -0
  142. data/spec/support/v5.0/sorbet/rbi/gems/nokogiri.rbi +1010 -0
  143. data/spec/support/v5.0/sorbet/rbi/gems/puma.rbi +570 -0
  144. data/spec/support/v5.0/sorbet/rbi/gems/rack-test.rbi +145 -0
  145. data/spec/support/v5.0/sorbet/rbi/gems/rack.rbi +534 -0
  146. data/spec/support/v5.0/sorbet/rbi/gems/rails-dom-testing.rbi +67 -0
  147. data/spec/support/v5.0/sorbet/rbi/gems/rails-html-sanitizer.rbi +90 -0
  148. data/spec/support/v5.0/sorbet/rbi/gems/railties.rbi +682 -0
  149. data/spec/support/v5.0/sorbet/rbi/gems/rake.rbi +255 -0
  150. data/spec/support/v5.0/sorbet/rbi/gems/sorbet-runtime.rbi +647 -0
  151. data/spec/support/v5.0/sorbet/rbi/gems/sqlite3.rbi +345 -0
  152. data/spec/support/v5.0/sorbet/rbi/gems/thor.rbi +401 -0
  153. data/spec/support/v5.0/sorbet/rbi/gems/thread_safe.rbi +81 -0
  154. data/spec/support/v5.0/sorbet/rbi/gems/tzinfo.rbi +407 -0
  155. data/spec/support/v5.0/sorbet/rbi/hidden-definitions/errors.txt +10523 -0
  156. data/spec/support/v5.0/sorbet/rbi/hidden-definitions/hidden.rbi +24969 -0
  157. data/spec/support/v5.0/sorbet/rbi/sorbet-typed/lib/actionmailer/all/actionmailer.rbi +13 -0
  158. data/spec/support/v5.0/sorbet/rbi/sorbet-typed/lib/actionpack/all/actionpack.rbi +13 -0
  159. data/spec/support/v5.0/sorbet/rbi/sorbet-typed/lib/activerecord/all/activerecord.rbi +51 -0
  160. data/spec/support/v5.0/sorbet/rbi/sorbet-typed/lib/activesupport/all/activesupport.rbi +107 -0
  161. data/spec/support/v5.0/sorbet/rbi/sorbet-typed/lib/bundler/all/bundler.rbi +8547 -0
  162. data/spec/support/v5.0/sorbet/rbi/sorbet-typed/lib/railties/all/railties.rbi +22 -0
  163. data/spec/support/v5.0/sorbet/rbi/sorbet-typed/lib/ruby/all/open3.rbi +111 -0
  164. data/spec/support/v5.0/sorbet/rbi/sorbet-typed/lib/ruby/all/resolv.rbi +543 -0
  165. data/spec/support/v5.0/sorbet/rbi/todo.rbi +10 -0
  166. data/spec/support/v5.0/sorbet_test_cases.rb +1 -0
  167. data/spec/support/v5.0/test/test_helper.rb +1 -0
  168. data/spec/support/v5.1/Gemfile +13 -0
  169. data/spec/support/v5.1/Gemfile.lock +15 -20
  170. data/spec/support/v5.1/app/channels/application_cable/channel.rb +1 -0
  171. data/spec/support/v5.1/app/channels/application_cable/connection.rb +1 -0
  172. data/spec/support/v5.1/app/jobs/application_job.rb +1 -0
  173. data/spec/support/v5.1/app/mailers/application_mailer.rb +1 -0
  174. data/spec/support/v5.1/bin/rails +0 -5
  175. data/spec/support/v5.1/bin/rake +0 -5
  176. data/spec/support/v5.1/config/application.rb +1 -0
  177. data/spec/support/v5.1/config/boot.rb +1 -0
  178. data/spec/support/v5.1/config/environment.rb +1 -0
  179. data/spec/support/v5.1/config/environments/development.rb +2 -1
  180. data/spec/support/v5.1/config/environments/production.rb +1 -0
  181. data/spec/support/v5.1/config/environments/test.rb +1 -0
  182. data/spec/support/v5.1/config/initializers/application_controller_renderer.rb +1 -0
  183. data/spec/support/v5.1/config/initializers/backtrace_silencers.rb +1 -0
  184. data/spec/support/v5.1/config/initializers/cors.rb +1 -0
  185. data/spec/support/v5.1/config/initializers/filter_parameter_logging.rb +1 -0
  186. data/spec/support/v5.1/config/initializers/inflections.rb +1 -0
  187. data/spec/support/v5.1/config/initializers/mime_types.rb +1 -0
  188. data/spec/support/v5.1/config/initializers/wrap_parameters.rb +1 -0
  189. data/spec/support/v5.1/config/puma.rb +1 -0
  190. data/spec/support/v5.1/config/spring.rb +1 -0
  191. data/spec/support/v5.1/db/schema.rb +1 -0
  192. data/spec/support/v5.1/db/seeds.rb +1 -0
  193. data/spec/support/v5.1/sorbet/config +2 -0
  194. data/spec/support/v5.1/sorbet/rbi/gems/actioncable.rbi +309 -0
  195. data/spec/support/v5.1/sorbet/rbi/gems/actionmailer.rbi +429 -0
  196. data/spec/support/v5.1/sorbet/rbi/gems/actionpack.rbi +3171 -0
  197. data/spec/support/v5.1/sorbet/rbi/gems/actionview.rbi +1115 -0
  198. data/spec/support/v5.1/sorbet/rbi/gems/activejob.rbi +273 -0
  199. data/spec/support/v5.1/sorbet/rbi/gems/activemodel.rbi +547 -0
  200. data/spec/support/v5.1/sorbet/rbi/gems/activerecord.rbi +4093 -0
  201. data/spec/support/v5.1/sorbet/rbi/gems/activesupport.rbi +2180 -0
  202. data/spec/support/v5.1/sorbet/rbi/gems/arel.rbi +1220 -0
  203. data/spec/support/v5.1/sorbet/rbi/gems/byebug.rbi +1039 -0
  204. data/spec/support/v5.1/sorbet/rbi/gems/concurrent-ruby.rbi +1587 -0
  205. data/spec/support/v5.1/sorbet/rbi/gems/crass.rbi +92 -0
  206. data/spec/support/v5.1/sorbet/rbi/gems/erubi.rbi +26 -0
  207. data/spec/support/v5.1/sorbet/rbi/gems/globalid.rbi +98 -0
  208. data/spec/support/v5.1/sorbet/rbi/gems/i18n.rbi +191 -0
  209. data/spec/support/v5.1/sorbet/rbi/gems/loofah.rbi +129 -0
  210. data/spec/support/v5.1/sorbet/rbi/gems/mail.rbi +1091 -0
  211. data/spec/support/v5.1/sorbet/rbi/gems/method_source.rbi +63 -0
  212. data/spec/support/v5.1/sorbet/rbi/gems/mini_mime.rbi +45 -0
  213. data/spec/support/v5.1/sorbet/rbi/gems/minitest.rbi +276 -0
  214. data/spec/support/v5.1/sorbet/rbi/gems/nokogiri.rbi +1010 -0
  215. data/spec/support/v5.1/sorbet/rbi/gems/puma.rbi +570 -0
  216. data/spec/support/v5.1/sorbet/rbi/gems/rack-test.rbi +161 -0
  217. data/spec/support/v5.1/sorbet/rbi/gems/rack.rbi +534 -0
  218. data/spec/support/v5.1/sorbet/rbi/gems/rails-dom-testing.rbi +67 -0
  219. data/spec/support/v5.1/sorbet/rbi/gems/rails-html-sanitizer.rbi +90 -0
  220. data/spec/support/v5.1/sorbet/rbi/gems/railties.rbi +707 -0
  221. data/spec/support/v5.1/sorbet/rbi/gems/rake.rbi +255 -0
  222. data/spec/support/v5.1/sorbet/rbi/gems/sorbet-runtime.rbi +647 -0
  223. data/spec/support/v5.1/sorbet/rbi/gems/sqlite3.rbi +345 -0
  224. data/spec/support/v5.1/sorbet/rbi/gems/thor.rbi +450 -0
  225. data/spec/support/v5.1/sorbet/rbi/gems/thread_safe.rbi +81 -0
  226. data/spec/support/v5.1/sorbet/rbi/gems/tzinfo.rbi +407 -0
  227. data/spec/support/v5.1/sorbet/rbi/hidden-definitions/errors.txt +10226 -0
  228. data/spec/support/v5.1/sorbet/rbi/hidden-definitions/hidden.rbi +24635 -0
  229. data/spec/support/v5.1/sorbet/rbi/sorbet-typed/lib/actionmailer/all/actionmailer.rbi +13 -0
  230. data/spec/support/v5.1/sorbet/rbi/sorbet-typed/lib/actionpack/all/actionpack.rbi +13 -0
  231. data/spec/support/v5.1/sorbet/rbi/sorbet-typed/lib/activerecord/all/activerecord.rbi +51 -0
  232. data/spec/support/v5.1/sorbet/rbi/sorbet-typed/lib/activesupport/all/activesupport.rbi +107 -0
  233. data/spec/support/v5.1/sorbet/rbi/sorbet-typed/lib/bundler/all/bundler.rbi +8547 -0
  234. data/spec/support/v5.1/sorbet/rbi/sorbet-typed/lib/railties/all/railties.rbi +22 -0
  235. data/spec/support/v5.1/sorbet/rbi/sorbet-typed/lib/ruby/all/open3.rbi +111 -0
  236. data/spec/support/v5.1/sorbet/rbi/sorbet-typed/lib/ruby/all/resolv.rbi +543 -0
  237. data/spec/support/v5.1/sorbet/rbi/todo.rbi +11 -0
  238. data/spec/support/v5.1/sorbet_test_cases.rb +1 -0
  239. data/spec/support/v5.1/test/test_helper.rb +1 -0
  240. data/spec/support/v5.2/Gemfile +12 -0
  241. data/spec/support/v5.2/Gemfile.lock +12 -0
  242. data/spec/support/v5.2/app/channels/application_cable/channel.rb +1 -0
  243. data/spec/support/v5.2/app/channels/application_cable/connection.rb +1 -0
  244. data/spec/support/v5.2/app/jobs/application_job.rb +1 -0
  245. data/spec/support/v5.2/app/mailers/application_mailer.rb +1 -0
  246. data/spec/support/v5.2/bin/rails +0 -5
  247. data/spec/support/v5.2/bin/rake +0 -5
  248. data/spec/support/v5.2/config/application.rb +1 -0
  249. data/spec/support/v5.2/config/boot.rb +1 -0
  250. data/spec/support/v5.2/config/environment.rb +1 -0
  251. data/spec/support/v5.2/config/environments/development.rb +1 -0
  252. data/spec/support/v5.2/config/environments/production.rb +1 -0
  253. data/spec/support/v5.2/config/environments/test.rb +1 -0
  254. data/spec/support/v5.2/config/initializers/application_controller_renderer.rb +1 -0
  255. data/spec/support/v5.2/config/initializers/backtrace_silencers.rb +1 -0
  256. data/spec/support/v5.2/config/initializers/cors.rb +1 -0
  257. data/spec/support/v5.2/config/initializers/filter_parameter_logging.rb +1 -0
  258. data/spec/support/v5.2/config/initializers/inflections.rb +1 -0
  259. data/spec/support/v5.2/config/initializers/mime_types.rb +1 -0
  260. data/spec/support/v5.2/config/initializers/wrap_parameters.rb +1 -0
  261. data/spec/support/v5.2/config/puma.rb +1 -0
  262. data/spec/support/v5.2/config/spring.rb +1 -0
  263. data/spec/support/v5.2/db/schema.rb +1 -0
  264. data/spec/support/v5.2/db/seeds.rb +1 -0
  265. data/spec/support/v5.2/sorbet/rbi/gems/sorbet-runtime.rbi +644 -0
  266. data/spec/support/v5.2/sorbet/rbi/hidden-definitions/errors.txt +12 -6
  267. data/spec/support/v5.2/sorbet/rbi/hidden-definitions/hidden.rbi +57 -19
  268. data/spec/support/v5.2/sorbet_test_cases.rb +1 -0
  269. data/spec/support/v5.2/test/test_helper.rb +1 -0
  270. data/spec/support/v5.2-no-sorbet/Gemfile +57 -0
  271. data/spec/support/v5.2-no-sorbet/Gemfile.lock +140 -0
  272. data/spec/support/v5.2-no-sorbet/README.md +24 -0
  273. data/spec/support/v5.2-no-sorbet/Rakefile +6 -0
  274. data/spec/support/v5.2-no-sorbet/app/channels/application_cable/channel.rb +5 -0
  275. data/spec/support/v5.2-no-sorbet/app/channels/application_cable/connection.rb +5 -0
  276. data/spec/support/v5.2-no-sorbet/app/controllers +1 -0
  277. data/spec/support/v5.2-no-sorbet/app/jobs/application_job.rb +3 -0
  278. data/spec/support/v5.2-no-sorbet/app/mailers/application_mailer.rb +5 -0
  279. data/spec/support/v5.2-no-sorbet/app/models +1 -0
  280. data/spec/support/v5.2-no-sorbet/app/views/layouts/mailer.html.erb +13 -0
  281. data/spec/support/v5.2-no-sorbet/app/views/layouts/mailer.text.erb +1 -0
  282. data/spec/support/v5.2-no-sorbet/bin/bundle +3 -0
  283. data/spec/support/v5.2-no-sorbet/bin/rails +4 -0
  284. data/spec/support/v5.2-no-sorbet/bin/rake +4 -0
  285. data/spec/support/v5.2-no-sorbet/bin/setup +33 -0
  286. data/spec/support/v5.2-no-sorbet/bin/spring +17 -0
  287. data/spec/support/v5.2-no-sorbet/bin/update +28 -0
  288. data/spec/support/v5.2-no-sorbet/config/application.rb +36 -0
  289. data/spec/support/v5.2-no-sorbet/config/boot.rb +4 -0
  290. data/spec/support/v5.2-no-sorbet/config/cable.yml +10 -0
  291. data/spec/support/v5.2-no-sorbet/config/credentials.yml.enc +1 -0
  292. data/spec/support/v5.2-no-sorbet/config/database.yml +25 -0
  293. data/spec/support/v5.2-no-sorbet/config/environment.rb +6 -0
  294. data/spec/support/v5.2-no-sorbet/config/environments/development.rb +55 -0
  295. data/spec/support/v5.2-no-sorbet/config/environments/production.rb +86 -0
  296. data/spec/support/v5.2-no-sorbet/config/environments/test.rb +47 -0
  297. data/spec/support/v5.2-no-sorbet/config/initializers/application_controller_renderer.rb +9 -0
  298. data/spec/support/v5.2-no-sorbet/config/initializers/backtrace_silencers.rb +8 -0
  299. data/spec/support/v5.2-no-sorbet/config/initializers/cors.rb +17 -0
  300. data/spec/support/v5.2-no-sorbet/config/initializers/filter_parameter_logging.rb +5 -0
  301. data/spec/support/v5.2-no-sorbet/config/initializers/inflections.rb +17 -0
  302. data/spec/support/v5.2-no-sorbet/config/initializers/mime_types.rb +5 -0
  303. data/spec/support/v5.2-no-sorbet/config/initializers/wrap_parameters.rb +15 -0
  304. data/spec/support/v5.2-no-sorbet/config/locales/en.yml +33 -0
  305. data/spec/support/v5.2-no-sorbet/config/puma.rb +35 -0
  306. data/spec/support/v5.2-no-sorbet/config/routes.rb +1 -0
  307. data/spec/support/v5.2-no-sorbet/config/spring.rb +7 -0
  308. data/spec/support/v5.2-no-sorbet/config/storage.yml +34 -0
  309. data/spec/support/v5.2-no-sorbet/config.ru +5 -0
  310. data/spec/support/v5.2-no-sorbet/db/migrate +1 -0
  311. data/spec/support/v5.2-no-sorbet/db/schema.rb +48 -0
  312. data/spec/support/v5.2-no-sorbet/db/seeds.rb +8 -0
  313. data/spec/support/v5.2-no-sorbet/lib/tasks/.keep +0 -0
  314. data/spec/support/v5.2-no-sorbet/log/.keep +0 -0
  315. data/spec/support/v5.2-no-sorbet/public/robots.txt +1 -0
  316. data/spec/support/v5.2-no-sorbet/storage/.keep +0 -0
  317. data/spec/support/v5.2-no-sorbet/test/controllers/.keep +0 -0
  318. data/spec/support/v5.2-no-sorbet/test/fixtures/.keep +0 -0
  319. data/spec/support/v5.2-no-sorbet/test/fixtures/files/.keep +0 -0
  320. data/spec/support/v5.2-no-sorbet/test/integration/.keep +0 -0
  321. data/spec/support/v5.2-no-sorbet/test/mailers/.keep +0 -0
  322. data/spec/support/v5.2-no-sorbet/test/models/.keep +0 -0
  323. data/spec/support/v5.2-no-sorbet/test/test_helper.rb +11 -0
  324. data/spec/support/v5.2-no-sorbet/tmp/.keep +0 -0
  325. data/spec/support/v5.2-no-sorbet/vendor/.keep +0 -0
  326. data/spec/support/v6.0/Gemfile +12 -0
  327. data/spec/support/v6.0/Gemfile.lock +157 -0
  328. data/spec/support/v6.0/app/channels/application_cable/channel.rb +1 -0
  329. data/spec/support/v6.0/app/channels/application_cable/connection.rb +1 -0
  330. data/spec/support/v6.0/app/jobs/application_job.rb +1 -0
  331. data/spec/support/v6.0/app/mailers/application_mailer.rb +1 -0
  332. data/spec/support/v6.0/config/application.rb +1 -0
  333. data/spec/support/v6.0/config/boot.rb +1 -0
  334. data/spec/support/v6.0/config/environment.rb +1 -0
  335. data/spec/support/v6.0/config/environments/development.rb +1 -0
  336. data/spec/support/v6.0/config/environments/production.rb +1 -0
  337. data/spec/support/v6.0/config/environments/test.rb +1 -0
  338. data/spec/support/v6.0/config/initializers/application_controller_renderer.rb +1 -0
  339. data/spec/support/v6.0/config/initializers/backtrace_silencers.rb +1 -0
  340. data/spec/support/v6.0/config/initializers/cors.rb +1 -0
  341. data/spec/support/v6.0/config/initializers/filter_parameter_logging.rb +1 -0
  342. data/spec/support/v6.0/config/initializers/inflections.rb +1 -0
  343. data/spec/support/v6.0/config/initializers/mime_types.rb +1 -0
  344. data/spec/support/v6.0/config/initializers/wrap_parameters.rb +1 -0
  345. data/spec/support/v6.0/config/puma.rb +1 -0
  346. data/spec/support/v6.0/config/routes.rb +1 -0
  347. data/spec/support/v6.0/db/schema.rb +1 -0
  348. data/spec/support/v6.0/db/seeds.rb +1 -0
  349. data/spec/support/v6.0/sorbet/config +2 -0
  350. data/spec/support/v6.0/sorbet/rbi/gems/actioncable.rbi +245 -0
  351. data/spec/support/v6.0/sorbet/rbi/gems/actionmailbox.rbi +56 -0
  352. data/spec/support/v6.0/sorbet/rbi/gems/actionmailer.rbi +69 -0
  353. data/spec/support/v6.0/sorbet/rbi/gems/actionpack.rbi +2401 -0
  354. data/spec/support/v6.0/sorbet/rbi/gems/actiontext.rbi +32 -0
  355. data/spec/support/v6.0/sorbet/rbi/gems/actionview.rbi +1033 -0
  356. data/spec/support/v6.0/sorbet/rbi/gems/activejob.rbi +362 -0
  357. data/spec/support/v6.0/sorbet/rbi/gems/activemodel.rbi +750 -0
  358. data/spec/support/v6.0/sorbet/rbi/gems/activerecord.rbi +5552 -0
  359. data/spec/support/v6.0/sorbet/rbi/gems/activestorage.rbi +217 -0
  360. data/spec/support/v6.0/sorbet/rbi/gems/activesupport.rbi +2430 -0
  361. data/spec/support/v6.0/sorbet/rbi/gems/byebug.rbi +1039 -0
  362. data/spec/support/v6.0/sorbet/rbi/gems/concurrent-ruby.rbi +1587 -0
  363. data/spec/support/v6.0/sorbet/rbi/gems/crass.rbi +92 -0
  364. data/spec/support/v6.0/sorbet/rbi/gems/erubi.rbi +26 -0
  365. data/spec/support/v6.0/sorbet/rbi/gems/globalid.rbi +98 -0
  366. data/spec/support/v6.0/sorbet/rbi/gems/i18n.rbi +191 -0
  367. data/spec/support/v6.0/sorbet/rbi/gems/loofah.rbi +129 -0
  368. data/spec/support/v6.0/sorbet/rbi/gems/mail.rbi +1542 -0
  369. data/spec/support/v6.0/sorbet/rbi/gems/marcel.rbi +12 -0
  370. data/spec/support/v6.0/sorbet/rbi/gems/method_source.rbi +63 -0
  371. data/spec/support/v6.0/sorbet/rbi/gems/mini_mime.rbi +45 -0
  372. data/spec/support/v6.0/sorbet/rbi/gems/minitest.rbi +276 -0
  373. data/spec/support/v6.0/sorbet/rbi/gems/nokogiri.rbi +1010 -0
  374. data/spec/support/v6.0/sorbet/rbi/gems/puma.rbi +570 -0
  375. data/spec/support/v6.0/sorbet/rbi/gems/rack-test.rbi +161 -0
  376. data/spec/support/v6.0/sorbet/rbi/gems/rack.rbi +522 -0
  377. data/spec/support/v6.0/sorbet/rbi/gems/rails-dom-testing.rbi +67 -0
  378. data/spec/support/v6.0/sorbet/rbi/gems/rails-html-sanitizer.rbi +90 -0
  379. data/spec/support/v6.0/sorbet/rbi/gems/railties.rbi +760 -0
  380. data/spec/support/v6.0/sorbet/rbi/gems/rake.rbi +254 -0
  381. data/spec/support/v6.0/sorbet/rbi/gems/sorbet-runtime.rbi +647 -0
  382. data/spec/support/v6.0/sorbet/rbi/gems/sqlite3.rbi +353 -0
  383. data/spec/support/v6.0/sorbet/rbi/gems/thor.rbi +450 -0
  384. data/spec/support/v6.0/sorbet/rbi/gems/thread_safe.rbi +81 -0
  385. data/spec/support/v6.0/sorbet/rbi/gems/tzinfo.rbi +407 -0
  386. data/spec/support/v6.0/sorbet/rbi/gems/zeitwerk.rbi +119 -0
  387. data/spec/support/v6.0/sorbet/rbi/hidden-definitions/errors.txt +12074 -0
  388. data/spec/support/v6.0/sorbet/rbi/hidden-definitions/hidden.rbi +28231 -0
  389. data/spec/support/v6.0/sorbet/rbi/sorbet-typed/lib/actionmailer/all/actionmailer.rbi +13 -0
  390. data/spec/support/v6.0/sorbet/rbi/sorbet-typed/lib/actionpack/all/actionpack.rbi +13 -0
  391. data/spec/support/v6.0/sorbet/rbi/sorbet-typed/lib/activerecord/all/activerecord.rbi +51 -0
  392. data/spec/support/v6.0/sorbet/rbi/sorbet-typed/lib/activesupport/all/activesupport.rbi +107 -0
  393. data/spec/support/v6.0/sorbet/rbi/sorbet-typed/lib/bundler/all/bundler.rbi +8547 -0
  394. data/spec/support/v6.0/sorbet/rbi/sorbet-typed/lib/railties/all/railties.rbi +22 -0
  395. data/spec/support/v6.0/sorbet/rbi/sorbet-typed/lib/ruby/all/open3.rbi +111 -0
  396. data/spec/support/v6.0/sorbet/rbi/sorbet-typed/lib/ruby/all/resolv.rbi +543 -0
  397. data/spec/support/v6.0/sorbet/rbi/todo.rbi +11 -0
  398. data/spec/support/v6.0/sorbet_test_cases.rb +1 -0
  399. data/spec/support/v6.0/test/channels/application_cable/connection_test.rb +1 -0
  400. data/spec/support/v6.0/test/test_helper.rb +1 -0
  401. data/spec/test_data/v4.2/expected_srb_tc_output.txt +178 -0
  402. data/spec/test_data/v5.0/expected_internal_metadata.rbi +155 -0
  403. data/spec/test_data/v5.0/expected_schema_migration.rbi +128 -0
  404. data/spec/test_data/v5.0/expected_srb_tc_output.txt +178 -0
  405. data/spec/test_data/v5.1/expected_internal_metadata.rbi +161 -0
  406. data/spec/test_data/v5.1/expected_schema_migration.rbi +134 -0
  407. data/spec/test_data/v5.1/expected_srb_tc_output.txt +160 -0
  408. data/spec/test_data/v5.2/expected_attachment.rbi +137 -0
  409. data/spec/test_data/v5.2/expected_blob.rbi +149 -0
  410. data/spec/test_data/v5.2/expected_internal_metadata.rbi +161 -0
  411. data/spec/test_data/v5.2/expected_schema_migration.rbi +134 -0
  412. data/spec/test_data/v5.2/expected_srb_tc_output.txt +160 -0
  413. data/spec/test_data/v5.2-no-sorbet/expected_attachment.rbi +137 -0
  414. data/spec/test_data/v5.2-no-sorbet/expected_blob.rbi +149 -0
  415. data/spec/test_data/v5.2-no-sorbet/expected_internal_metadata.rbi +161 -0
  416. data/spec/test_data/v5.2-no-sorbet/expected_no_routes.rbi +11 -0
  417. data/spec/test_data/v5.2-no-sorbet/expected_potion.rbi +128 -0
  418. data/spec/test_data/v5.2-no-sorbet/expected_routes.rbi +43 -0
  419. data/spec/test_data/v5.2-no-sorbet/expected_schema_migration.rbi +134 -0
  420. data/spec/test_data/v5.2-no-sorbet/expected_spell_book.rbi +161 -0
  421. data/spec/test_data/v5.2-no-sorbet/expected_srb_tc_output.txt +160 -0
  422. data/spec/test_data/v5.2-no-sorbet/expected_wand.rbi +311 -0
  423. data/spec/test_data/v5.2-no-sorbet/expected_wizard.rbi +254 -0
  424. data/spec/test_data/v5.2-no-sorbet/expected_wizard_wo_spellbook.rbi +254 -0
  425. data/spec/test_data/v6.0/expected_attachment.rbi +149 -0
  426. data/spec/test_data/v6.0/expected_blob.rbi +161 -0
  427. data/spec/test_data/v6.0/expected_internal_metadata.rbi +173 -0
  428. data/spec/test_data/v6.0/expected_schema_migration.rbi +146 -0
  429. data/spec/test_data/v6.0/expected_srb_tc_output.txt +160 -0
  430. data/spec/utils_spec.rb +24 -0
  431. metadata +573 -2
@@ -0,0 +1,173 @@
1
+ # This is an autogenerated file for dynamic methods in ActiveRecord::InternalMetadata
2
+ # Please rerun rake rails_rbi:models to regenerate.
3
+ # typed: strong
4
+
5
+ class ActiveRecord::InternalMetadata::ActiveRecord_Relation < ActiveRecord::Relation
6
+ include ActiveRecord::InternalMetadata::ModelRelationShared
7
+ extend T::Generic
8
+ Elem = type_member(fixed: ActiveRecord::InternalMetadata)
9
+ end
10
+
11
+ class ActiveRecord::InternalMetadata::ActiveRecord_Associations_CollectionProxy < ActiveRecord::Associations::CollectionProxy
12
+ include ActiveRecord::InternalMetadata::ModelRelationShared
13
+ extend T::Generic
14
+ Elem = type_member(fixed: ActiveRecord::InternalMetadata)
15
+ end
16
+
17
+ class ActiveRecord::InternalMetadata < ActiveRecord::Base
18
+ extend T::Sig
19
+ extend T::Generic
20
+ extend ActiveRecord::InternalMetadata::ModelRelationShared
21
+ include ActiveRecord::InternalMetadata::InstanceMethods
22
+ Elem = type_template(fixed: ActiveRecord::InternalMetadata)
23
+ end
24
+
25
+ module ActiveRecord::InternalMetadata::InstanceMethods
26
+ extend T::Sig
27
+
28
+ sig { returns(DateTime) }
29
+ def created_at(); end
30
+
31
+ sig { params(value: DateTime).void }
32
+ def created_at=(value); end
33
+
34
+ sig { params(args: T.untyped).returns(T::Boolean) }
35
+ def created_at?(*args); end
36
+
37
+ sig { returns(String) }
38
+ def key(); end
39
+
40
+ sig { params(value: String).void }
41
+ def key=(value); end
42
+
43
+ sig { params(args: T.untyped).returns(T::Boolean) }
44
+ def key?(*args); end
45
+
46
+ sig { returns(DateTime) }
47
+ def updated_at(); end
48
+
49
+ sig { params(value: DateTime).void }
50
+ def updated_at=(value); end
51
+
52
+ sig { params(args: T.untyped).returns(T::Boolean) }
53
+ def updated_at?(*args); end
54
+
55
+ sig { returns(T.nilable(String)) }
56
+ def value(); end
57
+
58
+ sig { params(value: T.nilable(String)).void }
59
+ def value=(value); end
60
+
61
+ sig { params(args: T.untyped).returns(T::Boolean) }
62
+ def value?(*args); end
63
+
64
+ end
65
+
66
+ class ActiveRecord::InternalMetadata
67
+ extend T::Sig
68
+
69
+ end
70
+
71
+ module ActiveRecord::InternalMetadata::ModelRelationShared
72
+ extend T::Sig
73
+
74
+ sig { returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
75
+ def all(); end
76
+
77
+ sig { params(block: T.nilable(T.proc.void)).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
78
+ def unscoped(&block); end
79
+
80
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
81
+ def select(*args, &block); end
82
+
83
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
84
+ def reselect(*args, &block); end
85
+
86
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
87
+ def order(*args, &block); end
88
+
89
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
90
+ def reorder(*args, &block); end
91
+
92
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
93
+ def group(*args, &block); end
94
+
95
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
96
+ def limit(*args, &block); end
97
+
98
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
99
+ def offset(*args, &block); end
100
+
101
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
102
+ def joins(*args, &block); end
103
+
104
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
105
+ def left_joins(*args, &block); end
106
+
107
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
108
+ def left_outer_joins(*args, &block); end
109
+
110
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
111
+ def where(*args, &block); end
112
+
113
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
114
+ def rewhere(*args, &block); end
115
+
116
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
117
+ def preload(*args, &block); end
118
+
119
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
120
+ def extract_associated(*args, &block); end
121
+
122
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
123
+ def eager_load(*args, &block); end
124
+
125
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
126
+ def includes(*args, &block); end
127
+
128
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
129
+ def from(*args, &block); end
130
+
131
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
132
+ def lock(*args, &block); end
133
+
134
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
135
+ def readonly(*args, &block); end
136
+
137
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
138
+ def extending(*args, &block); end
139
+
140
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
141
+ def or(*args, &block); end
142
+
143
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
144
+ def having(*args, &block); end
145
+
146
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
147
+ def create_with(*args, &block); end
148
+
149
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
150
+ def distinct(*args, &block); end
151
+
152
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
153
+ def references(*args, &block); end
154
+
155
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
156
+ def none(*args, &block); end
157
+
158
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
159
+ def unscope(*args, &block); end
160
+
161
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
162
+ def optimizer_hints(*args, &block); end
163
+
164
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
165
+ def merge(*args, &block); end
166
+
167
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
168
+ def except(*args, &block); end
169
+
170
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::InternalMetadata::ActiveRecord_Relation) }
171
+ def only(*args, &block); end
172
+
173
+ end
@@ -0,0 +1,146 @@
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
16
+
17
+ class ActiveRecord::SchemaMigration < ActiveRecord::Base
18
+ extend T::Sig
19
+ extend T::Generic
20
+ extend ActiveRecord::SchemaMigration::ModelRelationShared
21
+ include ActiveRecord::SchemaMigration::InstanceMethods
22
+ Elem = type_template(fixed: ActiveRecord::SchemaMigration)
23
+ end
24
+
25
+ module ActiveRecord::SchemaMigration::InstanceMethods
26
+ extend T::Sig
27
+
28
+ sig { returns(String) }
29
+ def version(); end
30
+
31
+ sig { params(value: String).void }
32
+ def version=(value); end
33
+
34
+ sig { params(args: T.untyped).returns(T::Boolean) }
35
+ def version?(*args); end
36
+
37
+ end
38
+
39
+ class ActiveRecord::SchemaMigration
40
+ extend T::Sig
41
+
42
+ end
43
+
44
+ module ActiveRecord::SchemaMigration::ModelRelationShared
45
+ extend T::Sig
46
+
47
+ sig { returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
48
+ def all(); end
49
+
50
+ sig { params(block: T.nilable(T.proc.void)).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
51
+ def unscoped(&block); end
52
+
53
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
54
+ def select(*args, &block); end
55
+
56
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
57
+ def reselect(*args, &block); end
58
+
59
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
60
+ def order(*args, &block); end
61
+
62
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
63
+ def reorder(*args, &block); end
64
+
65
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
66
+ def group(*args, &block); end
67
+
68
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
69
+ def limit(*args, &block); end
70
+
71
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
72
+ def offset(*args, &block); end
73
+
74
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
75
+ def joins(*args, &block); end
76
+
77
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
78
+ def left_joins(*args, &block); end
79
+
80
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
81
+ def left_outer_joins(*args, &block); end
82
+
83
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
84
+ def where(*args, &block); end
85
+
86
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
87
+ def rewhere(*args, &block); end
88
+
89
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
90
+ def preload(*args, &block); end
91
+
92
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
93
+ def extract_associated(*args, &block); end
94
+
95
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
96
+ def eager_load(*args, &block); end
97
+
98
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
99
+ def includes(*args, &block); end
100
+
101
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
102
+ def from(*args, &block); end
103
+
104
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
105
+ def lock(*args, &block); end
106
+
107
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
108
+ def readonly(*args, &block); end
109
+
110
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
111
+ def extending(*args, &block); end
112
+
113
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
114
+ def or(*args, &block); end
115
+
116
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
117
+ def having(*args, &block); end
118
+
119
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
120
+ def create_with(*args, &block); end
121
+
122
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
123
+ def distinct(*args, &block); end
124
+
125
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
126
+ def references(*args, &block); end
127
+
128
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
129
+ def none(*args, &block); end
130
+
131
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
132
+ def unscope(*args, &block); end
133
+
134
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
135
+ def optimizer_hints(*args, &block); end
136
+
137
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
138
+ def merge(*args, &block); end
139
+
140
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
141
+ def except(*args, &block); end
142
+
143
+ sig { params(args: T.untyped, block: T.nilable(T.proc.void)).returns(ActiveRecord::SchemaMigration::ActiveRecord_Relation) }
144
+ def only(*args, &block); end
145
+
146
+ end
@@ -0,0 +1,160 @@
1
+ sorbet_test_cases.rb:14: Argument does not have asserted type `ActiveRecord::Associations::CollectionProxy` https://srb.help/7007
2
+ 14 |T.assert_type!(wizard.spell_books, ActiveRecord::Associations::CollectionProxy)
3
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4
+ Got SpellBook::ActiveRecord_Associations_CollectionProxy originating from:
5
+ sorbet_test_cases.rb:14:
6
+ 14 |T.assert_type!(wizard.spell_books, ActiveRecord::Associations::CollectionProxy)
7
+ ^^^^^^^^^^^^^^^^^^
8
+
9
+ sorbet_test_cases.rb:15: Revealed type: `SpellBook::ActiveRecord_Associations_CollectionProxy` https://srb.help/7014
10
+ 15 |T.reveal_type(wizard.spell_books) # SpellBook::CollectionProxy
11
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12
+ From:
13
+ sorbet_test_cases.rb:15:
14
+ 15 |T.reveal_type(wizard.spell_books) # SpellBook::CollectionProxy
15
+ ^^^^^^^^^^^^^^^^^^
16
+
17
+ sorbet_test_cases.rb:19: Argument does not have asserted type `ActiveRecord::Relation` https://srb.help/7007
18
+ 19 |T.assert_type!(Wizard.all, ActiveRecord::Relation)
19
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
20
+ Got Wizard::ActiveRecord_Relation originating from:
21
+ sorbet_test_cases.rb:19:
22
+ 19 |T.assert_type!(Wizard.all, ActiveRecord::Relation)
23
+ ^^^^^^^^^^
24
+
25
+ sorbet_test_cases.rb:20: Revealed type: `Wizard::ActiveRecord_Relation` https://srb.help/7014
26
+ 20 |T.reveal_type(Wizard.all) # Wizard::ActiveRecord_Relation
27
+ ^^^^^^^^^^^^^^^^^^^^^^^^^
28
+ From:
29
+ sorbet_test_cases.rb:20:
30
+ 20 |T.reveal_type(Wizard.all) # Wizard::ActiveRecord_Relation
31
+ ^^^^^^^^^^
32
+
33
+ sorbet_test_cases.rb:23: Argument does not have asserted type `ActiveRecord::Relation` https://srb.help/7007
34
+ 23 |T.assert_type!(Wizard.recent, ActiveRecord::Relation)
35
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
36
+ Got Wizard::ActiveRecord_Relation originating from:
37
+ sorbet_test_cases.rb:23:
38
+ 23 |T.assert_type!(Wizard.recent, ActiveRecord::Relation)
39
+ ^^^^^^^^^^^^^
40
+
41
+ sorbet_test_cases.rb:24: Revealed type: `Wizard::ActiveRecord_Relation` https://srb.help/7014
42
+ 24 |T.reveal_type(Wizard.recent)
43
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
44
+ From:
45
+ sorbet_test_cases.rb:24:
46
+ 24 |T.reveal_type(Wizard.recent)
47
+ ^^^^^^^^^^^^^
48
+
49
+ sorbet_test_cases.rb:27: Argument does not have asserted type `ActiveRecord::Relation` https://srb.help/7007
50
+ 27 |T.assert_type!(Wizard.Gryffindor, ActiveRecord::Relation)
51
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
52
+ Got Wizard::ActiveRecord_Relation originating from:
53
+ sorbet_test_cases.rb:27:
54
+ 27 |T.assert_type!(Wizard.Gryffindor, ActiveRecord::Relation)
55
+ ^^^^^^^^^^^^^^^^^
56
+
57
+ sorbet_test_cases.rb:28: Revealed type: `Wizard::ActiveRecord_Relation` https://srb.help/7014
58
+ 28 |T.reveal_type(Wizard.Gryffindor)
59
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
60
+ From:
61
+ sorbet_test_cases.rb:28:
62
+ 28 |T.reveal_type(Wizard.Gryffindor)
63
+ ^^^^^^^^^^^^^^^^^
64
+
65
+ sorbet_test_cases.rb:31: Argument does not have asserted type `ActiveRecord::Relation` https://srb.help/7007
66
+ 31 |T.assert_type!(Wizard.Gryffindor.recent, ActiveRecord::Relation)
67
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
68
+ Got Wizard::ActiveRecord_Relation originating from:
69
+ sorbet_test_cases.rb:31:
70
+ 31 |T.assert_type!(Wizard.Gryffindor.recent, ActiveRecord::Relation)
71
+ ^^^^^^^^^^^^^^^^^^^^^^^^
72
+
73
+ sorbet_test_cases.rb:32: Revealed type: `Wizard::ActiveRecord_Relation` https://srb.help/7014
74
+ 32 |T.reveal_type(Wizard.Gryffindor.recent)
75
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
76
+ From:
77
+ sorbet_test_cases.rb:32:
78
+ 32 |T.reveal_type(Wizard.Gryffindor.recent)
79
+ ^^^^^^^^^^^^^^^^^^^^^^^^
80
+
81
+ sorbet_test_cases.rb:33: Argument does not have asserted type `ActiveRecord::Relation` https://srb.help/7007
82
+ 33 |T.assert_type!(Wizard.Gryffindor.recent.unscoped, ActiveRecord::Relation)
83
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
84
+ Got Wizard::ActiveRecord_Relation originating from:
85
+ sorbet_test_cases.rb:33:
86
+ 33 |T.assert_type!(Wizard.Gryffindor.recent.unscoped, ActiveRecord::Relation)
87
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
88
+
89
+ sorbet_test_cases.rb:34: Revealed type: `Wizard::ActiveRecord_Relation` https://srb.help/7014
90
+ 34 |T.reveal_type(Wizard.Gryffindor.recent.unscoped)
91
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
92
+ From:
93
+ sorbet_test_cases.rb:34:
94
+ 34 |T.reveal_type(Wizard.Gryffindor.recent.unscoped)
95
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
96
+
97
+ sorbet_test_cases.rb:37: Argument does not have asserted type `ActiveRecord::Relation` https://srb.help/7007
98
+ 37 |T.assert_type!(Wizard.where(id: 1), ActiveRecord::Relation)
99
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
100
+ Got Wizard::ActiveRecord_Relation originating from:
101
+ sorbet_test_cases.rb:37:
102
+ 37 |T.assert_type!(Wizard.where(id: 1), ActiveRecord::Relation)
103
+ ^^^^^^^^^^^^^^^^^^^
104
+
105
+ sorbet_test_cases.rb:38: Revealed type: `Wizard::ActiveRecord_Relation` https://srb.help/7014
106
+ 38 |T.reveal_type(Wizard.where(id: 1)) # Wizard::Relation
107
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
108
+ From:
109
+ sorbet_test_cases.rb:38:
110
+ 38 |T.reveal_type(Wizard.where(id: 1)) # Wizard::Relation
111
+ ^^^^^^^^^^^^^^^^^^^
112
+
113
+ sorbet_test_cases.rb:39: Argument does not have asserted type `ActiveRecord::Relation` https://srb.help/7007
114
+ 39 |T.assert_type!(Wizard.preload(:spell_books), ActiveRecord::Relation)
115
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
116
+ Got Wizard::ActiveRecord_Relation originating from:
117
+ sorbet_test_cases.rb:39:
118
+ 39 |T.assert_type!(Wizard.preload(:spell_books), ActiveRecord::Relation)
119
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
120
+
121
+ sorbet_test_cases.rb:40: Revealed type: `Wizard::ActiveRecord_Relation` https://srb.help/7014
122
+ 40 |T.reveal_type(Wizard.preload(:spell_books)) # Wizard::Relation
123
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
124
+ From:
125
+ sorbet_test_cases.rb:40:
126
+ 40 |T.reveal_type(Wizard.preload(:spell_books)) # Wizard::Relation
127
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
128
+
129
+ sorbet_test_cases.rb:41: Argument does not have asserted type `ActiveRecord::Relation` https://srb.help/7007
130
+ 41 |T.assert_type!(Wizard.eager_load(:spell_books), ActiveRecord::Relation)
131
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
132
+ Got Wizard::ActiveRecord_Relation originating from:
133
+ sorbet_test_cases.rb:41:
134
+ 41 |T.assert_type!(Wizard.eager_load(:spell_books), ActiveRecord::Relation)
135
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
136
+
137
+ sorbet_test_cases.rb:42: Revealed type: `Wizard::ActiveRecord_Relation` https://srb.help/7014
138
+ 42 |T.reveal_type(Wizard.eager_load(:spell_books)) # Wizard::Relation
139
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
140
+ From:
141
+ sorbet_test_cases.rb:42:
142
+ 42 |T.reveal_type(Wizard.eager_load(:spell_books)) # Wizard::Relation
143
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
144
+
145
+ sorbet_test_cases.rb:43: Argument does not have asserted type `ActiveRecord::Relation` https://srb.help/7007
146
+ 43 |T.assert_type!(Wizard.order(:id), ActiveRecord::Relation)
147
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
148
+ Got Wizard::ActiveRecord_Relation originating from:
149
+ sorbet_test_cases.rb:43:
150
+ 43 |T.assert_type!(Wizard.order(:id), ActiveRecord::Relation)
151
+ ^^^^^^^^^^^^^^^^^
152
+
153
+ sorbet_test_cases.rb:44: Revealed type: `Wizard::ActiveRecord_Relation` https://srb.help/7014
154
+ 44 |T.reveal_type(Wizard.order(:id)) # Wizard::Relation
155
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
156
+ From:
157
+ sorbet_test_cases.rb:44:
158
+ 44 |T.reveal_type(Wizard.order(:id)) # Wizard::Relation
159
+ ^^^^^^^^^^^^^^^^^
160
+ Errors: 20
@@ -0,0 +1,24 @@
1
+ require 'rails_helper'
2
+ require 'sorbet-rails/utils'
3
+
4
+ RSpec.describe SorbetRails::Utils do
5
+ it 'loads all the models in the app' do
6
+ expected_models = [
7
+ Potion,
8
+ SpellBook,
9
+ Wand,
10
+ Wizard,
11
+ ]
12
+
13
+ if Object.const_defined?('ActiveStorage')
14
+ expected_models += [
15
+ ActiveStorage::Attachment,
16
+ ActiveStorage::Blob,
17
+ ]
18
+ end
19
+
20
+ SorbetRails::Utils.rails_eager_load_all!
21
+ all_models = ActiveRecord::Base.descendants
22
+ expect((expected_models - all_models)).to eql([])
23
+ end
24
+ end