sorbet-rails 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (404) hide show
  1. checksums.yaml +4 -4
  2. data/.codecov.yml +4 -0
  3. data/.github/ISSUE_TEMPLATE/bug.md +26 -0
  4. data/.gitignore +5 -0
  5. data/.travis.yml +26 -7
  6. data/CONTRIBUTING.md +135 -0
  7. data/Gemfile +29 -11
  8. data/README.md +40 -7
  9. data/lib/sorbet-rails/custom_finder_methods.rb +1 -1
  10. data/lib/sorbet-rails/model_rbi_formatter.rb +72 -41
  11. data/lib/sorbet-rails/routes_rbi_formatter.rb +6 -14
  12. data/lib/sorbet-rails/tasks/rails_rbi.rake +13 -6
  13. data/rbi/activerecord.rbi +32 -7
  14. data/sorbet-rails.gemspec +2 -4
  15. data/spec/bin/install.sh +11 -0
  16. data/spec/bin/run_all_specs.sh +9 -5
  17. data/spec/bin/run_spec.sh +33 -0
  18. data/spec/bin/{reset_test_data.sh → update_test_data.sh} +2 -1
  19. data/spec/custom_finder_methods_spec.rb +75 -0
  20. data/spec/model_rbi_formatter_spec.rb +8 -6
  21. data/spec/rails_helper.rb +32 -5
  22. data/spec/rake_helper.rb +47 -0
  23. data/spec/rake_rails_rbi_models_spec.rb +64 -0
  24. data/spec/rake_rails_rbi_routes_spec.rb +15 -0
  25. data/spec/support/rails_shared/app/models/wizard.rb +4 -4
  26. data/spec/support/rails_shared/db/migrate/20190620001234_create_wizards.rb +1 -1
  27. data/spec/support/rails_shared/db/migrate/20190620003037_create_wands.rb +1 -1
  28. data/spec/support/rails_shared/db/migrate/20190620003739_create_spell_books.rb +1 -1
  29. data/spec/support/rails_shared/db/migrate/20190622000000_add_more_column_types_to_wands.rb +5 -3
  30. data/spec/support/rails_symlinks/app/controllers +1 -0
  31. data/spec/support/rails_symlinks/app/models +1 -0
  32. data/spec/support/rails_symlinks/config/routes.rb +5 -0
  33. data/spec/support/rails_symlinks/db/migrate +1 -0
  34. data/spec/support/v4.2/.gitignore +17 -0
  35. data/spec/support/v4.2/Gemfile +31 -0
  36. data/spec/support/v4.2/README.rdoc +28 -0
  37. data/spec/support/v4.2/Rakefile +6 -0
  38. data/spec/support/{5.1.7/lib/tasks → v4.2/app/assets/images}/.keep +0 -0
  39. data/spec/support/v4.2/app/assets/stylesheets/application.css +15 -0
  40. data/spec/support/v4.2/app/controllers/application_controller.rb +5 -0
  41. data/spec/support/{5.1.7/log → v4.2/app/controllers/concerns}/.keep +0 -0
  42. data/spec/support/v4.2/app/helpers/application_helper.rb +2 -0
  43. data/spec/support/{5.1.7/test/controllers → v4.2/app/mailers}/.keep +0 -0
  44. data/spec/support/v4.2/app/models +1 -0
  45. data/spec/support/v4.2/app/views/layouts/application.html.erb +13 -0
  46. data/spec/support/{5.1.7 → v4.2}/bin/bundle +0 -0
  47. data/spec/support/v4.2/bin/rails +4 -0
  48. data/spec/support/v4.2/bin/rake +4 -0
  49. data/spec/support/v4.2/bin/setup +29 -0
  50. data/spec/support/v4.2/config.ru +4 -0
  51. data/spec/support/v4.2/config/application.rb +35 -0
  52. data/spec/support/v4.2/config/boot.rb +3 -0
  53. data/spec/support/v4.2/config/database.yml +25 -0
  54. data/spec/support/v4.2/config/environment.rb +5 -0
  55. data/spec/support/v4.2/config/environments/development.rb +28 -0
  56. data/spec/support/v4.2/config/environments/production.rb +67 -0
  57. data/spec/support/v4.2/config/environments/test.rb +42 -0
  58. data/spec/support/{5.1.7 → v4.2}/config/initializers/backtrace_silencers.rb +0 -0
  59. data/spec/support/v4.2/config/initializers/cookies_serializer.rb +3 -0
  60. data/spec/support/{5.1.7 → v4.2}/config/initializers/filter_parameter_logging.rb +0 -0
  61. data/spec/support/{5.1.7 → v4.2}/config/initializers/inflections.rb +0 -0
  62. data/spec/support/{5.1.7 → v4.2}/config/initializers/mime_types.rb +0 -0
  63. data/spec/support/v4.2/config/initializers/session_store.rb +3 -0
  64. data/spec/support/v4.2/config/initializers/to_time_preserves_timezone.rb +10 -0
  65. data/spec/support/v4.2/config/initializers/wrap_parameters.rb +14 -0
  66. data/spec/support/v4.2/config/locales/en.yml +23 -0
  67. data/spec/support/v4.2/config/routes.rb +5 -0
  68. data/spec/support/v4.2/config/secrets.yml +22 -0
  69. data/spec/support/v4.2/db/migrate/20190620001234_create_wizards.rb +12 -0
  70. data/spec/support/v4.2/db/migrate/20190620003037_create_wands.rb +11 -0
  71. data/spec/support/v4.2/db/migrate/20190620003739_create_spell_books.rb +8 -0
  72. data/spec/support/v4.2/db/migrate/20190622000000_add_more_column_types_to_wands.rb +10 -0
  73. data/spec/support/v4.2/db/schema.rb +44 -0
  74. data/spec/support/v4.2/db/seeds.rb +7 -0
  75. data/spec/support/{5.1.7/test/fixtures → v4.2/lib/assets}/.keep +0 -0
  76. data/spec/support/{5.1.7/test/fixtures/files → v4.2/lib/tasks}/.keep +0 -0
  77. data/spec/support/{5.1.7/test/integration → v4.2/log}/.keep +0 -0
  78. data/spec/support/v4.2/public/404.html +67 -0
  79. data/spec/support/v4.2/public/422.html +67 -0
  80. data/spec/support/v4.2/public/500.html +66 -0
  81. data/spec/support/{5.1.7/test/mailers/.keep → v4.2/public/favicon.ico} +0 -0
  82. data/spec/support/v4.2/public/robots.txt +5 -0
  83. data/spec/support/{5.1.7/test/models → v4.2/test/controllers}/.keep +0 -0
  84. data/spec/support/{5.1.7/tmp → v4.2/test/fixtures}/.keep +0 -0
  85. data/spec/support/{5.1.7/vendor → v4.2/test/helpers}/.keep +0 -0
  86. data/spec/support/{5.2.3/lib/tasks → v4.2/test/integration}/.keep +0 -0
  87. data/spec/support/{5.2.3/log → v4.2/test/mailers}/.keep +0 -0
  88. data/spec/support/{5.2.3/storage → v4.2/test/models}/.keep +0 -0
  89. data/spec/support/{5.1.7 → v4.2}/test/test_helper.rb +0 -0
  90. data/spec/support/{5.2.3/test/controllers → v4.2/vendor/assets/stylesheets}/.keep +0 -0
  91. data/spec/support/v5.0/.gitignore +21 -0
  92. data/spec/support/v5.0/Gemfile +37 -0
  93. data/spec/support/{5.1.7 → v5.0}/README.md +0 -0
  94. data/spec/support/{5.1.7 → v5.0}/Rakefile +0 -0
  95. data/spec/support/{5.1.7 → v5.0}/app/channels/application_cable/channel.rb +0 -0
  96. data/spec/support/{5.1.7 → v5.0}/app/channels/application_cable/connection.rb +0 -0
  97. data/spec/support/v5.0/app/controllers +1 -0
  98. data/spec/support/{5.1.7 → v5.0}/app/jobs/application_job.rb +0 -0
  99. data/spec/support/{5.1.7 → v5.0}/app/mailers/application_mailer.rb +0 -0
  100. data/spec/support/v5.0/app/models +1 -0
  101. data/spec/support/{5.1.7 → v5.0}/app/views/layouts/mailer.html.erb +0 -0
  102. data/spec/support/{5.1.7 → v5.0}/app/views/layouts/mailer.text.erb +0 -0
  103. data/spec/support/v5.0/bin/bundle +3 -0
  104. data/spec/support/v5.0/bin/rails +4 -0
  105. data/spec/support/v5.0/bin/rake +4 -0
  106. data/spec/support/v5.0/bin/setup +34 -0
  107. data/spec/support/{5.1.7 → v5.0}/bin/update +0 -0
  108. data/spec/support/{5.1.7 → v5.0}/config.ru +0 -0
  109. data/spec/support/v5.0/config/application.rb +30 -0
  110. data/spec/support/{5.1.7 → v5.0}/config/boot.rb +0 -0
  111. data/spec/support/v5.0/config/cable.yml +9 -0
  112. data/spec/support/v5.0/config/database.yml +25 -0
  113. data/spec/support/{5.1.7 → v5.0}/config/environment.rb +0 -0
  114. data/spec/support/v5.0/config/environments/development.rb +47 -0
  115. data/spec/support/v5.0/config/environments/production.rb +78 -0
  116. data/spec/support/v5.0/config/environments/test.rb +42 -0
  117. data/spec/support/{5.1.7 → v5.0}/config/initializers/application_controller_renderer.rb +0 -0
  118. data/spec/support/{5.2.3 → v5.0}/config/initializers/backtrace_silencers.rb +0 -0
  119. data/spec/support/{5.1.7 → v5.0}/config/initializers/cors.rb +0 -0
  120. data/spec/support/{5.2.3 → v5.0}/config/initializers/filter_parameter_logging.rb +0 -0
  121. data/spec/support/{5.2.3 → v5.0}/config/initializers/inflections.rb +0 -0
  122. data/spec/support/{5.2.3 → v5.0}/config/initializers/mime_types.rb +0 -0
  123. data/spec/support/v5.0/config/initializers/new_framework_defaults.rb +18 -0
  124. data/spec/support/{5.1.7 → v5.0}/config/initializers/wrap_parameters.rb +0 -0
  125. data/spec/support/v5.0/config/locales/en.yml +23 -0
  126. data/spec/support/v5.0/config/puma.rb +47 -0
  127. data/spec/support/v5.0/config/routes.rb +5 -0
  128. data/spec/support/v5.0/config/secrets.yml +22 -0
  129. data/spec/support/v5.0/db/migrate +1 -0
  130. data/spec/support/v5.0/db/schema.rb +45 -0
  131. data/spec/support/{5.1.7 → v5.0}/db/seeds.rb +0 -0
  132. data/spec/support/{5.2.3/test/fixtures → v5.0/lib/tasks}/.keep +0 -0
  133. data/spec/support/{5.2.3/test/fixtures/files → v5.0/log}/.keep +0 -0
  134. data/spec/support/v5.0/public/robots.txt +5 -0
  135. data/spec/support/v5.0/rails_symlinks/app/controllers +1 -0
  136. data/spec/support/v5.0/rails_symlinks/app/models +1 -0
  137. data/spec/support/v5.0/rails_symlinks/config/routes.rb +5 -0
  138. data/spec/support/v5.0/rails_symlinks/db/migrate +1 -0
  139. data/spec/support/{5.2.3/test/integration → v5.0/test/controllers}/.keep +0 -0
  140. data/spec/support/{5.2.3/test/mailers → v5.0/test/fixtures}/.keep +0 -0
  141. data/spec/support/{5.2.3/test/models → v5.0/test/fixtures/files}/.keep +0 -0
  142. data/spec/support/{5.2.3/tmp → v5.0/test/integration}/.keep +0 -0
  143. data/spec/support/{5.2.3/vendor → v5.0/test/mailers}/.keep +0 -0
  144. data/spec/support/v5.0/test/models/.keep +0 -0
  145. data/spec/support/v5.0/test/test_helper.rb +10 -0
  146. data/spec/support/v5.0/tmp/.keep +0 -0
  147. data/spec/support/{5.1.7 → v5.1}/Gemfile +6 -6
  148. data/spec/support/{5.2.3 → v5.1}/README.md +0 -0
  149. data/spec/support/{5.2.3 → v5.1}/Rakefile +0 -0
  150. data/spec/support/{5.2.3 → v5.1}/app/channels/application_cable/channel.rb +0 -0
  151. data/spec/support/{5.2.3 → v5.1}/app/channels/application_cable/connection.rb +0 -0
  152. data/spec/support/v5.1/app/controllers +1 -0
  153. data/spec/support/{5.2.3 → v5.1}/app/jobs/application_job.rb +0 -0
  154. data/spec/support/{5.2.3 → v5.1}/app/mailers/application_mailer.rb +0 -0
  155. data/spec/support/v5.1/app/models +1 -0
  156. data/spec/support/{5.2.3 → v5.1}/app/views/layouts/mailer.html.erb +0 -0
  157. data/spec/support/{5.2.3 → v5.1}/app/views/layouts/mailer.text.erb +0 -0
  158. data/spec/support/v5.1/bin/bundle +3 -0
  159. data/spec/support/{5.1.7 → v5.1}/bin/rails +0 -0
  160. data/spec/support/{5.1.7 → v5.1}/bin/rake +0 -0
  161. data/spec/support/{5.1.7 → v5.1}/bin/setup +0 -0
  162. data/spec/support/{5.1.7 → v5.1}/bin/spring +0 -0
  163. data/spec/support/v5.1/bin/update +29 -0
  164. data/spec/support/{5.2.3 → v5.1}/config.ru +0 -0
  165. data/spec/support/{5.1.7 → v5.1}/config/application.rb +0 -0
  166. data/spec/support/{5.2.3 → v5.1}/config/boot.rb +0 -0
  167. data/spec/support/{5.1.7 → v5.1}/config/cable.yml +0 -0
  168. data/spec/support/{5.1.7 → v5.1}/config/database.yml +0 -0
  169. data/spec/support/{5.2.3 → v5.1}/config/environment.rb +0 -0
  170. data/spec/support/{5.1.7 → v5.1}/config/environments/development.rb +0 -0
  171. data/spec/support/{5.1.7 → v5.1}/config/environments/production.rb +0 -0
  172. data/spec/support/{5.1.7 → v5.1}/config/environments/test.rb +0 -0
  173. data/spec/support/{5.2.3 → v5.1}/config/initializers/application_controller_renderer.rb +0 -0
  174. data/spec/support/v5.1/config/initializers/backtrace_silencers.rb +7 -0
  175. data/spec/support/{5.2.3 → v5.1}/config/initializers/cors.rb +0 -0
  176. data/spec/support/v5.1/config/initializers/filter_parameter_logging.rb +4 -0
  177. data/spec/support/v5.1/config/initializers/inflections.rb +16 -0
  178. data/spec/support/v5.1/config/initializers/mime_types.rb +4 -0
  179. data/spec/support/{5.2.3 → v5.1}/config/initializers/wrap_parameters.rb +0 -0
  180. data/spec/support/{5.1.7 → v5.1}/config/locales/en.yml +0 -0
  181. data/spec/support/{5.1.7 → v5.1}/config/puma.rb +0 -0
  182. data/spec/support/v5.1/config/routes.rb +1 -0
  183. data/spec/support/{5.1.7 → v5.1}/config/secrets.yml +0 -0
  184. data/spec/support/{5.1.7 → v5.1}/config/spring.rb +0 -0
  185. data/spec/support/v5.1/db/migrate +1 -0
  186. data/spec/support/{5.1.7 → v5.1}/db/schema.rb +0 -0
  187. data/spec/support/{5.2.3 → v5.1}/db/seeds.rb +0 -0
  188. data/spec/support/v5.1/lib/tasks/.keep +0 -0
  189. data/spec/support/v5.1/log/.keep +0 -0
  190. data/spec/support/{5.1.7 → v5.1}/public/robots.txt +0 -0
  191. data/spec/support/v5.1/test/controllers/.keep +0 -0
  192. data/spec/support/v5.1/test/fixtures/.keep +0 -0
  193. data/spec/support/v5.1/test/fixtures/files/.keep +0 -0
  194. data/spec/support/v5.1/test/integration/.keep +0 -0
  195. data/spec/support/v5.1/test/mailers/.keep +0 -0
  196. data/spec/support/v5.1/test/models/.keep +0 -0
  197. data/spec/support/v5.1/test/test_helper.rb +10 -0
  198. data/spec/support/v5.1/tmp/.keep +0 -0
  199. data/spec/support/v5.1/vendor/.keep +0 -0
  200. data/spec/support/{5.2.3 → v5.2}/Gemfile +4 -15
  201. data/spec/support/v5.2/README.md +24 -0
  202. data/spec/support/v5.2/Rakefile +6 -0
  203. data/spec/support/v5.2/app/channels/application_cable/channel.rb +4 -0
  204. data/spec/support/v5.2/app/channels/application_cable/connection.rb +4 -0
  205. data/spec/support/v5.2/app/controllers +1 -0
  206. data/spec/support/v5.2/app/jobs/application_job.rb +2 -0
  207. data/spec/support/v5.2/app/mailers/application_mailer.rb +4 -0
  208. data/spec/support/v5.2/app/models +1 -0
  209. data/spec/support/v5.2/app/views/layouts/mailer.html.erb +13 -0
  210. data/spec/support/v5.2/app/views/layouts/mailer.text.erb +1 -0
  211. data/spec/support/{5.2.3 → v5.2}/bin/bundle +0 -0
  212. data/spec/support/{5.2.3 → v5.2}/bin/rails +0 -0
  213. data/spec/support/{5.2.3 → v5.2}/bin/rake +0 -0
  214. data/spec/support/{5.2.3 → v5.2}/bin/setup +0 -0
  215. data/spec/support/{5.2.3 → v5.2}/bin/spring +0 -0
  216. data/spec/support/{5.2.3 → v5.2}/bin/update +0 -0
  217. data/spec/support/v5.2/config.ru +5 -0
  218. data/spec/support/{5.2.3 → v5.2}/config/application.rb +0 -0
  219. data/spec/support/v5.2/config/boot.rb +3 -0
  220. data/spec/support/{5.2.3 → v5.2}/config/cable.yml +0 -0
  221. data/spec/support/{5.2.3 → v5.2}/config/credentials.yml.enc +0 -0
  222. data/spec/support/{5.2.3 → v5.2}/config/database.yml +0 -0
  223. data/spec/support/v5.2/config/environment.rb +5 -0
  224. data/spec/support/{5.2.3 → v5.2}/config/environments/development.rb +1 -1
  225. data/spec/support/{5.2.3 → v5.2}/config/environments/production.rb +0 -0
  226. data/spec/support/{5.2.3 → v5.2}/config/environments/test.rb +0 -0
  227. data/spec/support/v5.2/config/initializers/application_controller_renderer.rb +8 -0
  228. data/spec/support/v5.2/config/initializers/backtrace_silencers.rb +7 -0
  229. data/spec/support/v5.2/config/initializers/cors.rb +16 -0
  230. data/spec/support/v5.2/config/initializers/filter_parameter_logging.rb +4 -0
  231. data/spec/support/v5.2/config/initializers/inflections.rb +16 -0
  232. data/spec/support/v5.2/config/initializers/mime_types.rb +4 -0
  233. data/spec/support/v5.2/config/initializers/wrap_parameters.rb +14 -0
  234. data/spec/support/{5.2.3 → v5.2}/config/locales/en.yml +0 -0
  235. data/spec/support/{5.2.3 → v5.2}/config/puma.rb +0 -0
  236. data/spec/support/v5.2/config/routes.rb +1 -0
  237. data/spec/support/{5.2.3 → v5.2}/config/spring.rb +0 -0
  238. data/spec/support/{5.2.3 → v5.2}/config/storage.yml +0 -0
  239. data/spec/support/v5.2/db/migrate +1 -0
  240. data/spec/support/{5.2.3 → v5.2}/db/schema.rb +4 -4
  241. data/spec/support/v5.2/db/seeds.rb +7 -0
  242. data/spec/support/v5.2/lib/tasks/.keep +0 -0
  243. data/spec/support/v5.2/log/.keep +0 -0
  244. data/spec/support/{5.2.3 → v5.2}/public/robots.txt +0 -0
  245. data/spec/support/v5.2/sorbet/.keep +0 -0
  246. data/spec/support/v5.2/sorbet/config +2 -0
  247. data/spec/support/v5.2/sorbet/rbi/gems/actioncable.rbi +309 -0
  248. data/spec/support/v5.2/sorbet/rbi/gems/actionmailer.rbi +439 -0
  249. data/spec/support/v5.2/sorbet/rbi/gems/actionpack.rbi +3245 -0
  250. data/spec/support/v5.2/sorbet/rbi/gems/actionview.rbi +1129 -0
  251. data/spec/support/v5.2/sorbet/rbi/gems/activejob.rbi +281 -0
  252. data/spec/support/v5.2/sorbet/rbi/gems/activemodel.rbi +740 -0
  253. data/spec/support/v5.2/sorbet/rbi/gems/activerecord.rbi +3996 -0
  254. data/spec/support/v5.2/sorbet/rbi/gems/activestorage.rbi +173 -0
  255. data/spec/support/v5.2/sorbet/rbi/gems/activesupport.rbi +2309 -0
  256. data/spec/support/v5.2/sorbet/rbi/gems/arel.rbi +1248 -0
  257. data/spec/support/v5.2/sorbet/rbi/gems/byebug.rbi +1039 -0
  258. data/spec/support/v5.2/sorbet/rbi/gems/concurrent-ruby.rbi +1583 -0
  259. data/spec/support/v5.2/sorbet/rbi/gems/crass.rbi +92 -0
  260. data/spec/support/v5.2/sorbet/rbi/gems/erubi.rbi +26 -0
  261. data/spec/support/v5.2/sorbet/rbi/gems/globalid.rbi +98 -0
  262. data/spec/support/v5.2/sorbet/rbi/gems/i18n.rbi +191 -0
  263. data/spec/support/v5.2/sorbet/rbi/gems/loofah.rbi +129 -0
  264. data/spec/support/v5.2/sorbet/rbi/gems/mail.rbi +1091 -0
  265. data/spec/support/v5.2/sorbet/rbi/gems/marcel.rbi +12 -0
  266. data/spec/support/v5.2/sorbet/rbi/gems/method_source.rbi +63 -0
  267. data/spec/support/v5.2/sorbet/rbi/gems/mini_mime.rbi +45 -0
  268. data/spec/support/v5.2/sorbet/rbi/gems/minitest.rbi +276 -0
  269. data/spec/support/v5.2/sorbet/rbi/gems/nokogiri.rbi +1006 -0
  270. data/spec/support/v5.2/sorbet/rbi/gems/puma.rbi +570 -0
  271. data/spec/support/v5.2/sorbet/rbi/gems/rack-test.rbi +161 -0
  272. data/spec/support/v5.2/sorbet/rbi/gems/rack.rbi +534 -0
  273. data/spec/support/v5.2/sorbet/rbi/gems/rails-dom-testing.rbi +67 -0
  274. data/spec/support/v5.2/sorbet/rbi/gems/rails-html-sanitizer.rbi +90 -0
  275. data/spec/support/v5.2/sorbet/rbi/gems/railties.rbi +722 -0
  276. data/spec/support/v5.2/sorbet/rbi/gems/rake.rbi +251 -0
  277. data/spec/support/v5.2/sorbet/rbi/gems/sqlite3.rbi +353 -0
  278. data/spec/support/v5.2/sorbet/rbi/gems/thor.rbi +449 -0
  279. data/spec/support/v5.2/sorbet/rbi/gems/thread_safe.rbi +81 -0
  280. data/spec/support/v5.2/sorbet/rbi/gems/tzinfo.rbi +407 -0
  281. data/spec/support/v5.2/sorbet/rbi/hidden-definitions/errors.txt +10040 -0
  282. data/spec/support/v5.2/sorbet/rbi/hidden-definitions/hidden.rbi +24386 -0
  283. data/spec/support/v5.2/sorbet/rbi/sorbet-typed/lib/actionmailer/all/actionmailer.rbi +13 -0
  284. data/spec/support/v5.2/sorbet/rbi/sorbet-typed/lib/actionpack/all/actionpack.rbi +13 -0
  285. data/spec/support/v5.2/sorbet/rbi/sorbet-typed/lib/activerecord/all/activerecord.rbi +51 -0
  286. data/spec/support/v5.2/sorbet/rbi/sorbet-typed/lib/activerecord/~>5.2/activerecord.rbi +10 -0
  287. data/spec/support/v5.2/sorbet/rbi/sorbet-typed/lib/activesupport/all/activesupport.rbi +107 -0
  288. data/spec/support/v5.2/sorbet/rbi/sorbet-typed/lib/bundler/all/bundler.rbi +8547 -0
  289. data/spec/support/v5.2/sorbet/rbi/sorbet-typed/lib/railties/all/railties.rbi +22 -0
  290. data/spec/support/v5.2/sorbet/rbi/sorbet-typed/lib/ruby/all/open3.rbi +111 -0
  291. data/spec/support/v5.2/sorbet/rbi/sorbet-typed/lib/ruby/all/resolv.rbi +543 -0
  292. data/spec/support/v5.2/sorbet/rbi/todo.rbi +11 -0
  293. data/spec/support/v5.2/storage/.keep +0 -0
  294. data/spec/support/v5.2/test/controllers/.keep +0 -0
  295. data/spec/support/v5.2/test/fixtures/.keep +0 -0
  296. data/spec/support/v5.2/test/fixtures/files/.keep +0 -0
  297. data/spec/support/v5.2/test/integration/.keep +0 -0
  298. data/spec/support/v5.2/test/mailers/.keep +0 -0
  299. data/spec/support/v5.2/test/models/.keep +0 -0
  300. data/spec/support/{5.2.3 → v5.2}/test/test_helper.rb +0 -0
  301. data/spec/support/v5.2/tmp/.keep +0 -0
  302. data/spec/support/v5.2/vendor/.keep +0 -0
  303. data/spec/support/v6.0/.gitignore +26 -0
  304. data/spec/support/v6.0/Gemfile +35 -0
  305. data/spec/support/v6.0/README.md +24 -0
  306. data/spec/support/v6.0/Rakefile +6 -0
  307. data/spec/support/v6.0/app/channels/application_cable/channel.rb +4 -0
  308. data/spec/support/v6.0/app/channels/application_cable/connection.rb +4 -0
  309. data/spec/support/v6.0/app/controllers +1 -0
  310. data/spec/support/v6.0/app/jobs/application_job.rb +7 -0
  311. data/spec/support/v6.0/app/mailers/application_mailer.rb +4 -0
  312. data/spec/support/v6.0/app/models +1 -0
  313. data/spec/support/v6.0/app/views/layouts/mailer.html.erb +13 -0
  314. data/spec/support/v6.0/app/views/layouts/mailer.text.erb +1 -0
  315. data/spec/support/v6.0/bin/bundle +105 -0
  316. data/spec/support/v6.0/bin/rails +4 -0
  317. data/spec/support/v6.0/bin/rake +4 -0
  318. data/spec/support/v6.0/bin/setup +33 -0
  319. data/spec/support/v6.0/config.ru +5 -0
  320. data/spec/support/v6.0/config/application.rb +37 -0
  321. data/spec/support/v6.0/config/boot.rb +3 -0
  322. data/spec/support/v6.0/config/cable.yml +10 -0
  323. data/spec/support/v6.0/config/credentials.yml.enc +1 -0
  324. data/spec/support/v6.0/config/database.yml +25 -0
  325. data/spec/support/v6.0/config/environment.rb +5 -0
  326. data/spec/support/v6.0/config/environments/development.rb +52 -0
  327. data/spec/support/v6.0/config/environments/production.rb +105 -0
  328. data/spec/support/v6.0/config/environments/test.rb +48 -0
  329. data/spec/support/v6.0/config/initializers/application_controller_renderer.rb +8 -0
  330. data/spec/support/v6.0/config/initializers/backtrace_silencers.rb +7 -0
  331. data/spec/support/v6.0/config/initializers/cors.rb +16 -0
  332. data/spec/support/v6.0/config/initializers/filter_parameter_logging.rb +4 -0
  333. data/spec/support/v6.0/config/initializers/inflections.rb +16 -0
  334. data/spec/support/v6.0/config/initializers/mime_types.rb +4 -0
  335. data/spec/support/v6.0/config/initializers/wrap_parameters.rb +14 -0
  336. data/spec/support/v6.0/config/locales/en.yml +33 -0
  337. data/spec/support/v6.0/config/puma.rb +35 -0
  338. data/spec/support/v6.0/config/routes.rb +5 -0
  339. data/spec/support/v6.0/config/storage.yml +34 -0
  340. data/spec/support/v6.0/db/migrate +1 -0
  341. data/spec/support/v6.0/db/schema.rb +47 -0
  342. data/spec/support/v6.0/db/seeds.rb +7 -0
  343. data/spec/support/v6.0/lib/tasks/.keep +0 -0
  344. data/spec/support/v6.0/log/.keep +0 -0
  345. data/spec/support/v6.0/public/robots.txt +1 -0
  346. data/spec/support/v6.0/storage/.keep +0 -0
  347. data/spec/support/v6.0/test/channels/application_cable/connection_test.rb +11 -0
  348. data/spec/support/v6.0/test/controllers/.keep +0 -0
  349. data/spec/support/v6.0/test/fixtures/.keep +0 -0
  350. data/spec/support/v6.0/test/fixtures/files/.keep +0 -0
  351. data/spec/support/v6.0/test/integration/.keep +0 -0
  352. data/spec/support/v6.0/test/mailers/.keep +0 -0
  353. data/spec/support/v6.0/test/models/.keep +0 -0
  354. data/spec/support/v6.0/test/test_helper.rb +13 -0
  355. data/spec/support/v6.0/tmp/.keep +0 -0
  356. data/spec/support/v6.0/vendor/.keep +0 -0
  357. data/spec/test_data/{5.2.3 → v4.2}/expected_no_routes.rbi +1 -1
  358. data/spec/test_data/v4.2/expected_potion.rbi +113 -0
  359. data/spec/test_data/{5.1.7 → v4.2}/expected_routes.rbi +0 -0
  360. data/spec/test_data/v4.2/expected_spell_book.rbi +146 -0
  361. data/spec/test_data/v4.2/expected_wand.rbi +278 -0
  362. data/spec/test_data/v4.2/expected_wizard.rbi +239 -0
  363. data/spec/test_data/v4.2/expected_wizard_wo_spellbook.rbi +239 -0
  364. data/spec/test_data/{5.1.7 → v5.0}/expected_no_routes.rbi +1 -1
  365. data/spec/test_data/{5.2.3 → v5.0}/expected_potion.rbi +58 -62
  366. data/spec/test_data/v5.0/expected_routes.rbi +13 -0
  367. data/spec/test_data/v5.0/expected_spell_book.rbi +155 -0
  368. data/spec/test_data/{5.1.7 → v5.0}/expected_wand.rbi +125 -72
  369. data/spec/test_data/v5.0/expected_wizard.rbi +248 -0
  370. data/spec/test_data/v5.0/expected_wizard_wo_spellbook.rbi +248 -0
  371. data/spec/test_data/v5.1/expected_no_routes.rbi +11 -0
  372. data/spec/test_data/{5.1.7 → v5.1}/expected_potion.rbi +62 -60
  373. data/spec/test_data/v5.1/expected_routes.rbi +13 -0
  374. data/spec/test_data/v5.1/expected_spell_book.rbi +161 -0
  375. data/spec/test_data/v5.1/expected_wand.rbi +293 -0
  376. data/spec/test_data/v5.1/expected_wizard.rbi +254 -0
  377. data/spec/test_data/v5.1/expected_wizard_wo_spellbook.rbi +254 -0
  378. data/spec/test_data/v5.2/expected_no_routes.rbi +11 -0
  379. data/spec/test_data/v5.2/expected_potion.rbi +128 -0
  380. data/spec/test_data/{5.2.3 → v5.2}/expected_routes.rbi +0 -0
  381. data/spec/test_data/v5.2/expected_spell_book.rbi +161 -0
  382. data/spec/test_data/{5.2.3 → v5.2}/expected_wand.rbi +135 -70
  383. data/spec/test_data/v5.2/expected_wizard.rbi +254 -0
  384. data/spec/test_data/v5.2/expected_wizard_wo_spellbook.rbi +254 -0
  385. data/spec/test_data/v6.0/expected_no_routes.rbi +11 -0
  386. data/spec/test_data/v6.0/expected_potion.rbi +140 -0
  387. data/spec/test_data/v6.0/expected_routes.rbi +91 -0
  388. data/spec/test_data/v6.0/expected_spell_book.rbi +173 -0
  389. data/spec/test_data/v6.0/expected_wand.rbi +335 -0
  390. data/spec/test_data/v6.0/expected_wizard.rbi +278 -0
  391. data/spec/test_data/v6.0/expected_wizard_wo_spellbook.rbi +278 -0
  392. metadata +752 -281
  393. data/spec/support/5.1.7/app/controllers +0 -1
  394. data/spec/support/5.1.7/app/models +0 -1
  395. data/spec/support/5.1.7/config/routes.rb +0 -1
  396. data/spec/support/5.1.7/db/migrate +0 -1
  397. data/spec/support/5.2.3/app/controllers +0 -1
  398. data/spec/support/5.2.3/app/models +0 -1
  399. data/spec/support/5.2.3/config/routes.rb +0 -1
  400. data/spec/support/5.2.3/db/migrate +0 -1
  401. data/spec/test_data/5.1.7/expected_wizard.rbi +0 -207
  402. data/spec/test_data/5.1.7/expected_wizard_wo_spellbook.rbi +0 -207
  403. data/spec/test_data/5.2.3/expected_wizard.rbi +0 -207
  404. data/spec/test_data/5.2.3/expected_wizard_wo_spellbook.rbi +0 -207
@@ -0,0 +1,18 @@
1
+ # Be sure to restart your server when you modify this file.
2
+ #
3
+ # This file contains migration options to ease your Rails 5.0 upgrade.
4
+ #
5
+ # Read the Guide for Upgrading Ruby on Rails for more info on each option.
6
+
7
+ # Make Ruby 2.4 preserve the timezone of the receiver when calling `to_time`.
8
+ # Previous versions had false.
9
+ ActiveSupport.to_time_preserves_timezone = true
10
+
11
+ # Require `belongs_to` associations by default. Previous versions had false.
12
+ Rails.application.config.active_record.belongs_to_required_by_default = true
13
+
14
+ # Do not halt callback chains when a callback returns false. Previous versions had true.
15
+ ActiveSupport.halt_callback_chains_on_return_false = false
16
+
17
+ # Configure SSL options to enable HSTS with subdomains. Previous versions had false.
18
+ Rails.application.config.ssl_options = { hsts: { subdomains: true } }
@@ -0,0 +1,23 @@
1
+ # Files in the config/locales directory are used for internationalization
2
+ # and are automatically loaded by Rails. If you want to use locales other
3
+ # than English, add the necessary files in this directory.
4
+ #
5
+ # To use the locales, use `I18n.t`:
6
+ #
7
+ # I18n.t 'hello'
8
+ #
9
+ # In views, this is aliased to just `t`:
10
+ #
11
+ # <%= t('hello') %>
12
+ #
13
+ # To use a different locale, set it with `I18n.locale`:
14
+ #
15
+ # I18n.locale = :es
16
+ #
17
+ # This would use the information in config/locales/es.yml.
18
+ #
19
+ # To learn more, please read the Rails Internationalization guide
20
+ # available at http://guides.rubyonrails.org/i18n.html.
21
+
22
+ en:
23
+ hello: "Hello world"
@@ -0,0 +1,47 @@
1
+ # Puma can serve each request in a thread from an internal thread pool.
2
+ # The `threads` method setting takes two numbers a minimum and maximum.
3
+ # Any libraries that use thread pools should be configured to match
4
+ # the maximum value specified for Puma. Default is set to 5 threads for minimum
5
+ # and maximum, this matches the default thread size of Active Record.
6
+ #
7
+ threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }.to_i
8
+ threads threads_count, threads_count
9
+
10
+ # Specifies the `port` that Puma will listen on to receive requests, default is 3000.
11
+ #
12
+ port ENV.fetch("PORT") { 3000 }
13
+
14
+ # Specifies the `environment` that Puma will run in.
15
+ #
16
+ environment ENV.fetch("RAILS_ENV") { "development" }
17
+
18
+ # Specifies the number of `workers` to boot in clustered mode.
19
+ # Workers are forked webserver processes. If using threads and workers together
20
+ # the concurrency of the application would be max `threads` * `workers`.
21
+ # Workers do not work on JRuby or Windows (both of which do not support
22
+ # processes).
23
+ #
24
+ # workers ENV.fetch("WEB_CONCURRENCY") { 2 }
25
+
26
+ # Use the `preload_app!` method when specifying a `workers` number.
27
+ # This directive tells Puma to first boot the application and load code
28
+ # before forking the application. This takes advantage of Copy On Write
29
+ # process behavior so workers use less memory. If you use this option
30
+ # you need to make sure to reconnect any threads in the `on_worker_boot`
31
+ # block.
32
+ #
33
+ # preload_app!
34
+
35
+ # The code in the `on_worker_boot` will be called if you are using
36
+ # clustered mode by specifying a number of `workers`. After each worker
37
+ # process is booted this block will be run, if you are using `preload_app!`
38
+ # option you will want to use this block to reconnect to any threads
39
+ # or connections that may have been created at application boot, Ruby
40
+ # cannot share connections between processes.
41
+ #
42
+ # on_worker_boot do
43
+ # ActiveRecord::Base.establish_connection if defined?(ActiveRecord)
44
+ # end
45
+
46
+ # Allow puma to be restarted by `rails restart` command.
47
+ plugin :tmp_restart
@@ -0,0 +1,5 @@
1
+ Rails.application.routes.draw do
2
+ # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
3
+
4
+ get 'test/index' => 'test#index'
5
+ end
@@ -0,0 +1,22 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Your secret key is used for verifying the integrity of signed cookies.
4
+ # If you change this key, all old signed cookies will become invalid!
5
+
6
+ # Make sure the secret is at least 30 characters and all random,
7
+ # no regular words or you'll be exposed to dictionary attacks.
8
+ # You can use `rails secret` to generate a secure secret key.
9
+
10
+ # Make sure the secrets in this file are kept private
11
+ # if you're sharing your code publicly.
12
+
13
+ development:
14
+ secret_key_base: feccd1e9fc2a9c1a5f907148e3d66db9f82dde17e63e24a79e7e9862c6357e2e7895e7e7940f1ca429153106c7fa84262f50e5aaf4a3c04d44de0a675436013f
15
+
16
+ test:
17
+ secret_key_base: db1c87b24ee4a592a473e7f4c1e5e2d2d23729f083c51eacaa483a3f8314fc1af4ecb2651addd5b9fe00dbe118d3f02d2567b2f8be2a9f458ecd34b5e69d4db7
18
+
19
+ # Do not keep production secrets in the repository,
20
+ # instead read values from the environment.
21
+ production:
22
+ secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
@@ -0,0 +1 @@
1
+ spec/support/v5.0/db/../../rails_shared/db/migrate
@@ -0,0 +1,45 @@
1
+ # This file is auto-generated from the current state of the database. Instead
2
+ # of editing this file, please use the migrations feature of Active Record to
3
+ # incrementally modify your database, and then regenerate this schema definition.
4
+ #
5
+ # Note that this schema.rb definition is the authoritative source for your
6
+ # database schema. If you need to create the application database on another
7
+ # system, you should be using db:schema:load, not running all the migrations
8
+ # from scratch. The latter is a flawed and unsustainable approach (the more migrations
9
+ # you'll amass, the slower it'll run and the greater likelihood for issues).
10
+ #
11
+ # It's strongly recommended that you check this file into your version control system.
12
+
13
+ ActiveRecord::Schema.define(version: 20190622000000) do
14
+
15
+ create_table "spell_books", force: :cascade do |t|
16
+ t.string "name"
17
+ t.integer "wizard_id"
18
+ t.index ["wizard_id"], name: "index_spell_books_on_wizard_id"
19
+ end
20
+
21
+ create_table "wands", force: :cascade do |t|
22
+ t.integer "wizard_id", null: false
23
+ t.string "wood_type"
24
+ t.integer "core_type"
25
+ t.datetime "created_at", null: false
26
+ t.datetime "updated_at", null: false
27
+ t.float "flexibility", default: 0.5, null: false
28
+ t.decimal "hardness", precision: 10, scale: 10, default: "5.0", null: false
29
+ t.decimal "reflectance", precision: 10, default: 0, null: false
30
+ t.boolean "broken", default: false, null: false
31
+ t.date "chosen_at_date"
32
+ t.time "chosen_at_time"
33
+ t.index ["wizard_id"], name: "index_wands_on_wizard_id"
34
+ end
35
+
36
+ create_table "wizards", force: :cascade do |t|
37
+ t.string "name"
38
+ t.integer "house"
39
+ t.string "parent_email"
40
+ t.text "notes"
41
+ t.datetime "created_at", null: false
42
+ t.datetime "updated_at", null: false
43
+ end
44
+
45
+ end
File without changes
@@ -0,0 +1,5 @@
1
+ # See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file
2
+ #
3
+ # To ban all spiders from the entire site uncomment the next two lines:
4
+ # User-agent: *
5
+ # Disallow: /
@@ -0,0 +1 @@
1
+ spec/support/v5.0/rails_symlinks/app/../../rails_shared/app/controllers
@@ -0,0 +1 @@
1
+ spec/support/v5.0/rails_symlinks/app/../../rails_shared/app/models
@@ -0,0 +1,5 @@
1
+ Rails.application.routes.draw do
2
+ # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
3
+
4
+ get 'test/index' => 'test#index'
5
+ end
@@ -0,0 +1 @@
1
+ spec/support/v5.0/rails_symlinks/db/../../rails_shared/db/migrate
File without changes
@@ -0,0 +1,10 @@
1
+ ENV['RAILS_ENV'] ||= 'test'
2
+ require File.expand_path('../../config/environment', __FILE__)
3
+ require 'rails/test_help'
4
+
5
+ class ActiveSupport::TestCase
6
+ # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
7
+ fixtures :all
8
+
9
+ # Add more helper methods to be used by all tests here...
10
+ end
File without changes
@@ -9,7 +9,7 @@ end
9
9
  # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
10
10
  gem 'rails', '~> 5.1.7'
11
11
  # Use sqlite3 as the database for Active Record
12
- gem 'sqlite3'
12
+ gem 'sqlite3', '~> 1.3.6'
13
13
  # Use Puma as the app server
14
14
  gem 'puma', '~> 3.7'
15
15
  # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
@@ -31,11 +31,11 @@ group :development, :test do
31
31
  end
32
32
 
33
33
  group :development do
34
- gem 'listen', '>= 3.0.5', '< 3.2'
35
- # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
36
- gem 'spring'
37
- gem 'spring-watcher-listen', '~> 2.0.0'
34
+ # gem 'listen', '>= 3.0.5', '< 3.2'
35
+ # # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
36
+ # gem 'spring'
37
+ # gem 'spring-watcher-listen', '~> 2.0.0'
38
38
  end
39
39
 
40
40
  # Windows does not include zoneinfo files, so bundle the tzinfo-data gem
41
- gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
41
+ # gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
File without changes
File without changes
@@ -0,0 +1 @@
1
+ spec/support/v5.1/app/../../rails_shared/app/controllers
@@ -0,0 +1 @@
1
+ spec/support/v5.1/app/../../rails_shared/app/models
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3
+ load Gem.bin_path('bundler', 'bundle')
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env ruby
2
+ require 'pathname'
3
+ require 'fileutils'
4
+ include FileUtils
5
+
6
+ # path to your application root.
7
+ APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
8
+
9
+ def system!(*args)
10
+ system(*args) || abort("\n== Command #{args} failed ==")
11
+ end
12
+
13
+ chdir APP_ROOT do
14
+ # This script is a way to update your development environment automatically.
15
+ # Add necessary update steps to this file.
16
+
17
+ puts '== Installing dependencies =='
18
+ system! 'gem install bundler --conservative'
19
+ system('bundle check') || system!('bundle install')
20
+
21
+ puts "\n== Updating database =="
22
+ system! 'bin/rails db:migrate'
23
+
24
+ puts "\n== Removing old logs and tempfiles =="
25
+ system! 'bin/rails log:clear tmp:clear'
26
+
27
+ puts "\n== Restarting application server =="
28
+ system! 'bin/rails restart'
29
+ end
File without changes
@@ -0,0 +1,7 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
4
+ # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
5
+
6
+ # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
7
+ # Rails.backtrace_cleaner.remove_silencers!
@@ -0,0 +1,4 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Configure sensitive parameters which will be filtered from the log file.
4
+ Rails.application.config.filter_parameters += [:password]
@@ -0,0 +1,16 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new inflection rules using the following format. Inflections
4
+ # are locale specific, and you may define rules for as many different
5
+ # locales as you wish. All of these examples are active by default:
6
+ # ActiveSupport::Inflector.inflections(:en) do |inflect|
7
+ # inflect.plural /^(ox)$/i, '\1en'
8
+ # inflect.singular /^(ox)en/i, '\1'
9
+ # inflect.irregular 'person', 'people'
10
+ # inflect.uncountable %w( fish sheep )
11
+ # end
12
+
13
+ # These inflection rules are supported but not enabled by default:
14
+ # ActiveSupport::Inflector.inflections(:en) do |inflect|
15
+ # inflect.acronym 'RESTful'
16
+ # end
@@ -0,0 +1,4 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new mime types for use in respond_to blocks:
4
+ # Mime::Type.register "text/richtext", :rtf
@@ -0,0 +1 @@
1
+ spec/support/v5.1/config/../../rails_shared/config/routes.rb
@@ -0,0 +1 @@
1
+ spec/support/v5.1/db/../../rails_shared/db/migrate
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,10 @@
1
+ ENV['RAILS_ENV'] ||= 'test'
2
+ require File.expand_path('../../config/environment', __FILE__)
3
+ require 'rails/test_help'
4
+
5
+ class ActiveSupport::TestCase
6
+ # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
7
+ fixtures :all
8
+
9
+ # Add more helper methods to be used by all tests here...
10
+ end