sorbet-rails 0.7.4 → 0.7.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (357) hide show
  1. checksums.yaml +4 -4
  2. data/.github/dependabot.yml +7 -0
  3. data/.github/workflows/ci-master.yml +28 -0
  4. data/.github/workflows/ci.yml +26 -0
  5. data/.github/workflows/publish-gem.yml +21 -0
  6. data/CONTRIBUTING.md +1 -2
  7. data/Gemfile +7 -9
  8. data/README.md +7 -3
  9. data/Rakefile +13 -24
  10. data/lib/sorbet-rails/active_record_rbi_formatter.rb +12 -9
  11. data/lib/sorbet-rails/dependent_gem_rbis/activerecord.rbi +4 -0
  12. data/lib/sorbet-rails/dependent_gem_rbis/parlour.rbi +1 -1
  13. data/lib/sorbet-rails/gem_plugins/aasm_plugin.rb +50 -0
  14. data/lib/sorbet-rails/gem_plugins/money_rails_plugin.rb +76 -0
  15. data/lib/sorbet-rails/job_rbi_formatter.rb +1 -1
  16. data/lib/sorbet-rails/model_plugins/active_record_serialized_attribute.rb +3 -2
  17. data/lib/sorbet-rails/model_plugins/base.rb +8 -1
  18. data/lib/sorbet-rails/model_plugins/custom_finder_methods.rb +1 -1
  19. data/lib/sorbet-rails/model_plugins/plugins.rb +6 -0
  20. data/lib/sorbet-rails/railtie.rb +1 -1
  21. data/lib/sorbet-rails/routes_rbi_formatter.rb +8 -0
  22. data/lib/sorbet-rails/tasks/rails_rbi.rake +12 -8
  23. data/sorbet-rails.gemspec +2 -2
  24. data/spec/bin/run_all_specs.sh +3 -4
  25. data/spec/bin/run_spec.sh +4 -1
  26. data/spec/generators/rails-template.rb +3 -20
  27. data/spec/generators/sorbet_test_cases.rb +17 -4
  28. data/spec/rails_helper.rb +5 -5
  29. data/spec/rake_rails_rbi_models_spec.rb +11 -4
  30. data/spec/sorbet_spec.rb +2 -1
  31. data/spec/support/v5.2/Gemfile +1 -3
  32. data/spec/support/v5.2/Gemfile.lock +66 -71
  33. data/spec/support/v5.2/app/controllers/application_controller.rb +1 -1
  34. data/spec/support/v5.2/app/mailers/application_mailer.rb +1 -1
  35. data/spec/support/v5.2/app/mailers/daily_prophet_mailer.rb +1 -1
  36. data/spec/support/v5.2/app/mailers/hogwarts_acceptance_mailer.rb +1 -1
  37. data/spec/support/v5.2/app/models/spell_book.rb +1 -1
  38. data/spec/support/v5.2/app/models/wand.rb +1 -1
  39. data/spec/support/v5.2/app/models/wizard.rb +1 -1
  40. data/spec/support/v5.2/config/environments/development.rb +1 -1
  41. data/spec/support/v5.2/config/environments/production.rb +1 -1
  42. data/spec/support/v5.2/config/environments/test.rb +1 -1
  43. data/spec/support/v5.2/config/routes.rb +1 -1
  44. data/spec/support/v5.2/sorbet_test_cases.rb +17 -4
  45. data/spec/support/v6.0/Gemfile +1 -1
  46. data/spec/support/v6.0/Gemfile.lock +81 -85
  47. data/spec/support/v6.0/app/mailers/application_mailer.rb +1 -1
  48. data/spec/support/v6.0/config/environments/development.rb +1 -1
  49. data/spec/support/v6.0/config/environments/test.rb +1 -1
  50. data/spec/support/v6.0/config/initializers/cookies_serializer.rb +1 -1
  51. data/spec/support/v6.0/config/initializers/sorbet_rails.rb +1 -1
  52. data/spec/support/v6.0/config/routes.rb +1 -1
  53. data/spec/support/v6.0/sorbet_test_cases.rb +17 -4
  54. data/spec/support/{v5.1 → v6.1}/.gitignore +13 -2
  55. data/spec/support/{v5.1 → v6.1}/Gemfile +12 -15
  56. data/spec/support/{v5.1 → v6.1}/Gemfile.lock +87 -59
  57. data/spec/support/{v5.0 → v6.1}/README.md +0 -0
  58. data/spec/support/{v5.0 → v6.1}/Rakefile +0 -0
  59. data/spec/support/{v5.0 → v6.1}/app/assets/config/manifest.js +0 -0
  60. data/spec/support/{v5.0 → v6.1}/app/assets/images/.keep +0 -0
  61. data/spec/support/{v5.1 → v6.1}/app/assets/stylesheets/application.css +0 -0
  62. data/spec/support/{v5.0 → v6.1}/app/controllers/application_controller.rb +1 -2
  63. data/spec/support/{v5.0 → v6.1}/app/controllers/concerns/.keep +0 -0
  64. data/spec/support/{v5.0 → v6.1}/app/helpers/application_helper.rb +0 -0
  65. data/spec/support/{v5.0 → v6.1}/app/helpers/bar_helper.rb +0 -0
  66. data/spec/support/{v5.0 → v6.1}/app/helpers/baz_helper.rb +0 -0
  67. data/spec/support/{v5.0 → v6.1}/app/helpers/foo_helper.rb +0 -0
  68. data/spec/support/v6.1/app/jobs/application_job.rb +8 -0
  69. data/spec/support/{v5.0 → v6.1}/app/jobs/award_house_point_hourglasses.rb +0 -0
  70. data/spec/support/{v5.1 → v6.1}/app/mailers/application_mailer.rb +1 -1
  71. data/spec/support/{v5.0 → v6.1}/app/mailers/daily_prophet_mailer.rb +0 -0
  72. data/spec/support/{v5.0 → v6.1}/app/mailers/hogwarts_acceptance_mailer.rb +0 -0
  73. data/spec/support/{v5.0 → v6.1}/app/models/application_record.rb +0 -0
  74. data/spec/support/{v5.0 → v6.1}/app/models/concerns/.keep +0 -0
  75. data/spec/support/{v5.0 → v6.1}/app/models/concerns/mythical.rb +0 -0
  76. data/spec/support/{v5.1 → v6.1}/app/models/headmaster.rb +1 -1
  77. data/spec/support/{v5.1 → v6.1}/app/models/potion.rb +0 -0
  78. data/spec/support/{v5.1 → v6.1}/app/models/robe.rb +0 -0
  79. data/spec/support/{v5.0 → v6.1}/app/models/school.rb +1 -1
  80. data/spec/support/{v5.1 → v6.1}/app/models/spell.rb +0 -0
  81. data/spec/support/{v5.0 → v6.1}/app/models/spell_book.rb +0 -0
  82. data/spec/support/{v5.0 → v6.1}/app/models/squib.rb +0 -0
  83. data/spec/support/{v5.1 → v6.1}/app/models/subject.rb +0 -0
  84. data/spec/support/{v5.0 → v6.1}/app/models/wand.rb +0 -0
  85. data/spec/support/{v5.0 → v6.1}/app/models/wizard.rb +2 -1
  86. data/spec/support/{v5.1 → v6.1}/app/views/layouts/application.html.erb +2 -1
  87. data/spec/support/{v5.0 → v6.1}/app/views/layouts/mailer.html.erb +0 -0
  88. data/spec/support/{v5.0 → v6.1}/app/views/layouts/mailer.text.erb +0 -0
  89. data/spec/support/v6.1/bin/bundle +114 -0
  90. data/spec/support/{v5.0 → v6.1}/bin/rails +0 -0
  91. data/spec/support/{v5.0 → v6.1}/bin/rake +0 -0
  92. data/spec/support/{v5.1 → v6.1}/bin/setup +6 -11
  93. data/spec/support/{v5.1 → v6.1}/config/application.rb +8 -4
  94. data/spec/support/{v5.0 → v6.1}/config/boot.rb +0 -0
  95. data/spec/support/{v5.1 → v6.1}/config/database.yml +1 -1
  96. data/spec/support/{v5.0 → v6.1}/config/environment.rb +0 -0
  97. data/spec/support/{v5.1 → v6.1}/config/environments/development.rb +12 -4
  98. data/spec/support/{v5.1 → v6.1}/config/environments/production.rb +29 -7
  99. data/spec/support/{v5.1 → v6.1}/config/environments/test.rb +13 -7
  100. data/spec/support/{v5.0 → v6.1}/config/initializers/application_controller_renderer.rb +0 -0
  101. data/spec/support/{v5.0 → v6.1}/config/initializers/backtrace_silencers.rb +0 -0
  102. data/spec/support/v6.1/config/initializers/content_security_policy.rb +29 -0
  103. data/spec/support/{v5.1 → v6.1}/config/initializers/cookies_serializer.rb +1 -1
  104. data/spec/support/{v5.0 → v6.1}/config/initializers/filter_parameter_logging.rb +0 -0
  105. data/spec/support/{v5.0 → v6.1}/config/initializers/inflections.rb +0 -0
  106. data/spec/support/{v5.0 → v6.1}/config/initializers/mime_types.rb +0 -0
  107. data/spec/support/{v5.0 → v6.1}/config/initializers/sorbet_rails.rb +1 -1
  108. data/spec/support/{v5.0 → v6.1}/config/initializers/wrap_parameters.rb +0 -0
  109. data/spec/support/{v5.1 → v6.1}/config/locales/en.yml +1 -1
  110. data/spec/support/{v5.1 → v6.1}/config/puma.rb +8 -26
  111. data/spec/support/v6.1/config/routes.rb +5 -0
  112. data/spec/support/v6.1/config/storage.yml +34 -0
  113. data/spec/support/{v5.0 → v6.1}/config.ru +0 -0
  114. data/spec/support/{v5.1 → v6.1}/db/migrate/20190620000001_create_wizards.rb +2 -2
  115. data/spec/support/{v5.1 → v6.1}/db/migrate/20190620000002_create_wands.rb +2 -2
  116. data/spec/support/{v5.1 → v6.1}/db/migrate/20190620000003_create_spell_books.rb +2 -2
  117. data/spec/support/{v5.1 → v6.1}/db/migrate/20190620000004_add_more_column_types_to_wands.rb +2 -2
  118. data/spec/support/v6.1/db/migrate/20190620000005_add_broom_to_wizard.rb +6 -0
  119. data/spec/support/{v5.1 → v6.1}/db/migrate/20190620000006_add_more_enums_to_wizard.rb +2 -2
  120. data/spec/support/{v5.1 → v6.1}/db/migrate/20190620000007_add_type_to_wizard.rb +2 -2
  121. data/spec/support/{v5.1 → v6.1}/db/migrate/20190620000008_add_robe_to_wizard.rb +2 -2
  122. data/spec/support/{v5.1 → v6.1}/db/migrate/20190620000009_add_school.rb +2 -2
  123. data/spec/support/{v5.1 → v6.1}/db/migrate/20190620000010_add_subject.rb +2 -2
  124. data/spec/support/{v5.1 → v6.1}/db/migrate/20190620000011_add_subjects_wizards.rb +2 -2
  125. data/spec/support/{v5.1 → v6.1}/db/migrate/20190620000012_add_spell.rb +2 -2
  126. data/spec/support/{v5.1 → v6.1}/db/migrate/20190620000013_add_spells_spell_books.rb +2 -2
  127. data/spec/support/{v5.0 → v6.1}/db/migrate/20190620000014_create_headmasters.rb +2 -2
  128. data/spec/support/{v5.0 → v6.1}/db/migrate/20190620000015_add_serialized_to_wizards.rb +2 -2
  129. data/spec/support/{v5.1 → v6.1}/db/schema.rb +14 -11
  130. data/spec/support/{v5.0 → v6.1}/db/seeds.rb +0 -0
  131. data/spec/support/{v5.0 → v6.1}/lib/assets/.keep +0 -0
  132. data/spec/support/{v5.0 → v6.1}/lib/mythical_rbi_plugin.rb +0 -0
  133. data/spec/support/{v5.0 → v6.1}/lib/tasks/.keep +0 -0
  134. data/spec/support/{v5.0 → v6.1}/log/.keep +0 -0
  135. data/spec/support/{v5.0 → v6.1}/sorbet_test_cases.rb +17 -4
  136. data/spec/support/{v5.0/tmp → v6.1/storage}/.keep +0 -0
  137. data/spec/support/{v5.0/vendor/assets/stylesheets → v6.1/tmp}/.keep +0 -0
  138. data/spec/support/{v5.1/app/assets/images → v6.1/tmp/pids}/.keep +0 -0
  139. data/spec/support/{v5.1/app/controllers/concerns → v6.1/vendor}/.keep +0 -0
  140. data/spec/test_data/v5.2/expected_active_record_base.rbi +10 -10
  141. data/spec/test_data/v5.2/expected_active_record_relation.rbi +10 -10
  142. data/spec/test_data/v5.2/expected_attachment.rbi +1 -1
  143. data/spec/test_data/v5.2/expected_blob.rbi +1 -1
  144. data/spec/test_data/v5.2/expected_headmaster.rbi +1 -1
  145. data/spec/test_data/v5.2/expected_internal_metadata.rbi +1 -1
  146. data/spec/test_data/v5.2/expected_potion.rbi +1 -1
  147. data/spec/test_data/v5.2/expected_robe.rbi +1 -1
  148. data/spec/test_data/v5.2/expected_routes.rbi +8 -0
  149. data/spec/test_data/v5.2/expected_schema_migration.rbi +1 -1
  150. data/spec/test_data/v5.2/expected_school.rbi +1 -1
  151. data/spec/test_data/v5.2/expected_spell/habtm_spell_books.rbi +1 -1
  152. data/spec/test_data/v5.2/expected_spell.rbi +1 -1
  153. data/spec/test_data/v5.2/expected_spell_book/habtm_spells.rbi +1 -1
  154. data/spec/test_data/v5.2/expected_spell_book.rbi +1 -1
  155. data/spec/test_data/v5.2/expected_squib.rbi +3 -3
  156. data/spec/test_data/v5.2/expected_subject/habtm_wizards.rbi +1 -1
  157. data/spec/test_data/v5.2/expected_subject.rbi +1 -1
  158. data/spec/test_data/v5.2/expected_wand.rbi +1 -1
  159. data/spec/test_data/v5.2/expected_wizard/habtm_subjects.rbi +1 -1
  160. data/spec/test_data/v5.2/expected_wizard.rbi +3 -3
  161. data/spec/test_data/v5.2/expected_wizard_wo_spellbook.rbi +3 -3
  162. data/spec/test_data/v6.0/expected_active_record_base.rbi +10 -10
  163. data/spec/test_data/v6.0/expected_active_record_relation.rbi +10 -10
  164. data/spec/test_data/v6.0/expected_attachment.rbi +1 -1
  165. data/spec/test_data/v6.0/expected_blob.rbi +1 -1
  166. data/spec/test_data/v6.0/expected_headmaster.rbi +1 -1
  167. data/spec/test_data/v6.0/expected_internal_metadata.rbi +1 -1
  168. data/spec/test_data/v6.0/expected_potion.rbi +1 -1
  169. data/spec/test_data/v6.0/expected_robe.rbi +1 -1
  170. data/spec/test_data/v6.0/expected_routes.rbi +8 -0
  171. data/spec/test_data/v6.0/expected_schema_migration.rbi +1 -1
  172. data/spec/test_data/v6.0/expected_school.rbi +1 -1
  173. data/spec/test_data/v6.0/expected_spell/habtm_spell_books.rbi +1 -1
  174. data/spec/test_data/v6.0/expected_spell.rbi +1 -1
  175. data/spec/test_data/v6.0/expected_spell_book/habtm_spells.rbi +1 -1
  176. data/spec/test_data/v6.0/expected_spell_book.rbi +1 -1
  177. data/spec/test_data/v6.0/expected_squib.rbi +3 -3
  178. data/spec/test_data/v6.0/expected_subject/habtm_wizards.rbi +1 -1
  179. data/spec/test_data/v6.0/expected_subject.rbi +1 -1
  180. data/spec/test_data/v6.0/expected_wand.rbi +1 -1
  181. data/spec/test_data/v6.0/expected_wizard/habtm_subjects.rbi +1 -1
  182. data/spec/test_data/v6.0/expected_wizard.rbi +3 -3
  183. data/spec/test_data/v6.0/expected_wizard_wo_spellbook.rbi +3 -3
  184. data/spec/test_data/{v5.1 → v6.1}/expected_active_record_base.rbi +16 -16
  185. data/spec/test_data/{v5.1 → v6.1}/expected_active_record_relation.rbi +26 -29
  186. data/spec/test_data/{v5.0 → v6.1}/expected_application_job.rbi +0 -0
  187. data/spec/test_data/{v5.0 → v6.1}/expected_application_mailer.rbi +0 -0
  188. data/spec/test_data/v6.1/expected_attachment.rbi +328 -0
  189. data/spec/test_data/{v5.0 → v6.1}/expected_award_house_point_hourglasses.rbi +0 -0
  190. data/spec/test_data/v6.1/expected_blob.rbi +376 -0
  191. data/spec/test_data/{v5.0 → v6.1}/expected_custom_application_job.rbi +0 -0
  192. data/spec/test_data/{v5.0 → v6.1}/expected_custom_application_mailer.rbi +0 -0
  193. data/spec/test_data/{v5.0 → v6.1}/expected_custom_award_house_point_hourglasses.rbi +0 -0
  194. data/spec/test_data/{v5.0 → v6.1}/expected_custom_daily_prophet_mailer.rbi +0 -0
  195. data/spec/test_data/{v5.0 → v6.1}/expected_custom_hogwarts_acceptance_mailer.rbi +0 -0
  196. data/spec/test_data/{v5.0 → v6.1}/expected_daily_prophet_mailer.rbi +0 -0
  197. data/spec/test_data/{v5.1 → v6.1}/expected_habtm_subjects.rbi +48 -0
  198. data/spec/test_data/{v5.1 → v6.1}/expected_habtm_wizards.rbi +48 -0
  199. data/spec/test_data/{v5.1 → v6.1}/expected_headmaster.rbi +25 -1
  200. data/spec/test_data/{v5.0 → v6.1}/expected_helpers.rbi +0 -0
  201. data/spec/test_data/{v5.0 → v6.1}/expected_helpers_with_application_and_devise_helpers.rbi +0 -0
  202. data/spec/test_data/{v5.0 → v6.1}/expected_hogwarts_acceptance_mailer.rbi +0 -0
  203. data/spec/test_data/{v5.1 → v6.1}/expected_internal_metadata.rbi +25 -1
  204. data/spec/test_data/{v5.0 → v6.1}/expected_no_routes.rbi +0 -0
  205. data/spec/test_data/{v5.1 → v6.1}/expected_potion.rbi +25 -1
  206. data/spec/test_data/v6.1/expected_record.rbi +289 -0
  207. data/spec/test_data/{v5.1 → v6.1}/expected_robe.rbi +25 -1
  208. data/spec/test_data/v6.1/expected_routes.rbi +175 -0
  209. data/spec/test_data/{v5.1 → v6.1}/expected_schema_migration.rbi +25 -1
  210. data/spec/test_data/{v5.1 → v6.1}/expected_school.rbi +25 -1
  211. data/spec/test_data/{v5.1 → v6.1}/expected_spell/habtm_spell_books.rbi +25 -1
  212. data/spec/test_data/{v5.1 → v6.1}/expected_spell.rbi +25 -1
  213. data/spec/test_data/{v5.1 → v6.1}/expected_spell_book/habtm_spell_books.rbi +48 -0
  214. data/spec/test_data/{v5.1 → v6.1}/expected_spell_book/habtm_spells.rbi +25 -1
  215. data/spec/test_data/{v5.1 → v6.1}/expected_spell_book.rbi +61 -1
  216. data/spec/test_data/{v5.1 → v6.1}/expected_squib.rbi +497 -59
  217. data/spec/test_data/{v5.0 → v6.1}/expected_srb_tc_output.txt +0 -0
  218. data/spec/test_data/{v5.1 → v6.1}/expected_subject/habtm_wizards.rbi +25 -1
  219. data/spec/test_data/{v5.1 → v6.1}/expected_subject.rbi +25 -1
  220. data/spec/test_data/v6.1/expected_variant_record.rbi +364 -0
  221. data/spec/test_data/{v5.1 → v6.1}/expected_wand.rbi +91 -1
  222. data/spec/test_data/{v5.1 → v6.1}/expected_wizard/habtm_subjects.rbi +25 -1
  223. data/spec/test_data/{v5.1 → v6.1}/expected_wizard.rbi +497 -59
  224. data/spec/test_data/{v5.1 → v6.1}/expected_wizard_wo_spellbook.rbi +491 -53
  225. metadata +266 -501
  226. data/.travis.yml +0 -42
  227. data/lib/sorbet-rails/type_assert/actionpack.rbi +0 -4
  228. data/spec/support/v5.0/.gitignore +0 -21
  229. data/spec/support/v5.0/Gemfile +0 -37
  230. data/spec/support/v5.0/Gemfile.lock +0 -161
  231. data/spec/support/v5.0/app/assets/stylesheets/application.css +0 -15
  232. data/spec/support/v5.0/app/jobs/application_job.rb +0 -3
  233. data/spec/support/v5.0/app/mailers/application_mailer.rb +0 -5
  234. data/spec/support/v5.0/app/models/headmaster.rb +0 -8
  235. data/spec/support/v5.0/app/models/potion.rb +0 -6
  236. data/spec/support/v5.0/app/models/robe.rb +0 -4
  237. data/spec/support/v5.0/app/models/spell.rb +0 -5
  238. data/spec/support/v5.0/app/models/subject.rb +0 -5
  239. data/spec/support/v5.0/app/views/layouts/application.html.erb +0 -13
  240. data/spec/support/v5.0/bin/bundle +0 -3
  241. data/spec/support/v5.0/bin/setup +0 -34
  242. data/spec/support/v5.0/bin/update +0 -29
  243. data/spec/support/v5.0/config/application.rb +0 -27
  244. data/spec/support/v5.0/config/database.yml +0 -25
  245. data/spec/support/v5.0/config/environments/development.rb +0 -48
  246. data/spec/support/v5.0/config/environments/production.rb +0 -75
  247. data/spec/support/v5.0/config/environments/test.rb +0 -43
  248. data/spec/support/v5.0/config/initializers/cookies_serializer.rb +0 -6
  249. data/spec/support/v5.0/config/initializers/new_framework_defaults.rb +0 -27
  250. data/spec/support/v5.0/config/initializers/session_store.rb +0 -4
  251. data/spec/support/v5.0/config/locales/en.yml +0 -23
  252. data/spec/support/v5.0/config/puma.rb +0 -48
  253. data/spec/support/v5.0/config/routes.rb +0 -5
  254. data/spec/support/v5.0/db/migrate/20190620000001_create_wizards.rb +0 -14
  255. data/spec/support/v5.0/db/migrate/20190620000002_create_wands.rb +0 -12
  256. data/spec/support/v5.0/db/migrate/20190620000003_create_spell_books.rb +0 -10
  257. data/spec/support/v5.0/db/migrate/20190620000004_add_more_column_types_to_wands.rb +0 -17
  258. data/spec/support/v5.0/db/migrate/20190620000005_add_broom_to_wizard.rb +0 -6
  259. data/spec/support/v5.0/db/migrate/20190620000006_add_more_enums_to_wizard.rb +0 -9
  260. data/spec/support/v5.0/db/migrate/20190620000007_add_type_to_wizard.rb +0 -6
  261. data/spec/support/v5.0/db/migrate/20190620000008_add_robe_to_wizard.rb +0 -8
  262. data/spec/support/v5.0/db/migrate/20190620000009_add_school.rb +0 -10
  263. data/spec/support/v5.0/db/migrate/20190620000010_add_subject.rb +0 -8
  264. data/spec/support/v5.0/db/migrate/20190620000011_add_subjects_wizards.rb +0 -8
  265. data/spec/support/v5.0/db/migrate/20190620000012_add_spell.rb +0 -8
  266. data/spec/support/v5.0/db/migrate/20190620000013_add_spells_spell_books.rb +0 -8
  267. data/spec/support/v5.0/db/schema.rb +0 -96
  268. data/spec/support/v5.0/public/robots.txt +0 -5
  269. data/spec/support/v5.1/README.md +0 -24
  270. data/spec/support/v5.1/Rakefile +0 -6
  271. data/spec/support/v5.1/app/assets/config/manifest.js +0 -2
  272. data/spec/support/v5.1/app/controllers/application_controller.rb +0 -4
  273. data/spec/support/v5.1/app/helpers/application_helper.rb +0 -3
  274. data/spec/support/v5.1/app/helpers/bar_helper.rb +0 -3
  275. data/spec/support/v5.1/app/helpers/baz_helper.rb +0 -3
  276. data/spec/support/v5.1/app/helpers/foo_helper.rb +0 -3
  277. data/spec/support/v5.1/app/jobs/application_job.rb +0 -3
  278. data/spec/support/v5.1/app/jobs/award_house_point_hourglasses.rb +0 -12
  279. data/spec/support/v5.1/app/mailers/daily_prophet_mailer.rb +0 -9
  280. data/spec/support/v5.1/app/mailers/hogwarts_acceptance_mailer.rb +0 -29
  281. data/spec/support/v5.1/app/models/application_record.rb +0 -4
  282. data/spec/support/v5.1/app/models/concerns/.keep +0 -0
  283. data/spec/support/v5.1/app/models/concerns/mythical.rb +0 -11
  284. data/spec/support/v5.1/app/models/school.rb +0 -5
  285. data/spec/support/v5.1/app/models/spell_book.rb +0 -18
  286. data/spec/support/v5.1/app/models/squib.rb +0 -6
  287. data/spec/support/v5.1/app/models/wand.rb +0 -19
  288. data/spec/support/v5.1/app/models/wizard.rb +0 -65
  289. data/spec/support/v5.1/app/views/layouts/mailer.html.erb +0 -13
  290. data/spec/support/v5.1/app/views/layouts/mailer.text.erb +0 -1
  291. data/spec/support/v5.1/bin/bundle +0 -3
  292. data/spec/support/v5.1/bin/rails +0 -4
  293. data/spec/support/v5.1/bin/rake +0 -4
  294. data/spec/support/v5.1/bin/update +0 -29
  295. data/spec/support/v5.1/bin/yarn +0 -11
  296. data/spec/support/v5.1/config/boot.rb +0 -4
  297. data/spec/support/v5.1/config/environment.rb +0 -6
  298. data/spec/support/v5.1/config/initializers/application_controller_renderer.rb +0 -9
  299. data/spec/support/v5.1/config/initializers/backtrace_silencers.rb +0 -8
  300. data/spec/support/v5.1/config/initializers/filter_parameter_logging.rb +0 -5
  301. data/spec/support/v5.1/config/initializers/inflections.rb +0 -17
  302. data/spec/support/v5.1/config/initializers/mime_types.rb +0 -5
  303. data/spec/support/v5.1/config/initializers/sorbet_rails.rb +0 -3
  304. data/spec/support/v5.1/config/initializers/wrap_parameters.rb +0 -15
  305. data/spec/support/v5.1/config/routes.rb +0 -5
  306. data/spec/support/v5.1/config.ru +0 -5
  307. data/spec/support/v5.1/db/migrate/20190620000005_add_broom_to_wizard.rb +0 -6
  308. data/spec/support/v5.1/db/migrate/20190620000014_create_headmasters.rb +0 -9
  309. data/spec/support/v5.1/db/migrate/20190620000015_add_serialized_to_wizards.rb +0 -9
  310. data/spec/support/v5.1/db/seeds.rb +0 -8
  311. data/spec/support/v5.1/lib/assets/.keep +0 -0
  312. data/spec/support/v5.1/lib/mythical_rbi_plugin.rb +0 -16
  313. data/spec/support/v5.1/lib/tasks/.keep +0 -0
  314. data/spec/support/v5.1/log/.keep +0 -0
  315. data/spec/support/v5.1/package.json +0 -5
  316. data/spec/support/v5.1/public/robots.txt +0 -1
  317. data/spec/support/v5.1/sorbet_test_cases.rb +0 -409
  318. data/spec/support/v5.1/tmp/.keep +0 -0
  319. data/spec/support/v5.1/vendor/.keep +0 -0
  320. data/spec/test_data/v5.0/expected_active_record_base.rbi +0 -113
  321. data/spec/test_data/v5.0/expected_active_record_relation.rbi +0 -198
  322. data/spec/test_data/v5.0/expected_habtm_subjects.rbi +0 -660
  323. data/spec/test_data/v5.0/expected_habtm_wizards.rbi +0 -660
  324. data/spec/test_data/v5.0/expected_headmaster.rbi +0 -328
  325. data/spec/test_data/v5.0/expected_internal_metadata.rbi +0 -298
  326. data/spec/test_data/v5.0/expected_potion.rbi +0 -280
  327. data/spec/test_data/v5.0/expected_robe.rbi +0 -301
  328. data/spec/test_data/v5.0/expected_routes.rbi +0 -27
  329. data/spec/test_data/v5.0/expected_schema_migration.rbi +0 -271
  330. data/spec/test_data/v5.0/expected_school.rbi +0 -301
  331. data/spec/test_data/v5.0/expected_spell/habtm_spell_books.rbi +0 -319
  332. data/spec/test_data/v5.0/expected_spell.rbi +0 -292
  333. data/spec/test_data/v5.0/expected_spell_book/habtm_spell_books.rbi +0 -637
  334. data/spec/test_data/v5.0/expected_spell_book/habtm_spells.rbi +0 -319
  335. data/spec/test_data/v5.0/expected_spell_book.rbi +0 -415
  336. data/spec/test_data/v5.0/expected_squib.rbi +0 -832
  337. data/spec/test_data/v5.0/expected_subject/habtm_wizards.rbi +0 -319
  338. data/spec/test_data/v5.0/expected_subject.rbi +0 -292
  339. data/spec/test_data/v5.0/expected_wand.rbi +0 -497
  340. data/spec/test_data/v5.0/expected_wizard/habtm_subjects.rbi +0 -319
  341. data/spec/test_data/v5.0/expected_wizard.rbi +0 -908
  342. data/spec/test_data/v5.0/expected_wizard_wo_spellbook.rbi +0 -902
  343. data/spec/test_data/v5.1/expected_application_job.rbi +0 -20
  344. data/spec/test_data/v5.1/expected_application_mailer.rbi +0 -5
  345. data/spec/test_data/v5.1/expected_award_house_point_hourglasses.rbi +0 -20
  346. data/spec/test_data/v5.1/expected_custom_application_job.rbi +0 -21
  347. data/spec/test_data/v5.1/expected_custom_application_mailer.rbi +0 -6
  348. data/spec/test_data/v5.1/expected_custom_award_house_point_hourglasses.rbi +0 -21
  349. data/spec/test_data/v5.1/expected_custom_daily_prophet_mailer.rbi +0 -8
  350. data/spec/test_data/v5.1/expected_custom_hogwarts_acceptance_mailer.rbi +0 -21
  351. data/spec/test_data/v5.1/expected_daily_prophet_mailer.rbi +0 -7
  352. data/spec/test_data/v5.1/expected_helpers.rbi +0 -27
  353. data/spec/test_data/v5.1/expected_helpers_with_application_and_devise_helpers.rbi +0 -34
  354. data/spec/test_data/v5.1/expected_hogwarts_acceptance_mailer.rbi +0 -20
  355. data/spec/test_data/v5.1/expected_no_routes.rbi +0 -4
  356. data/spec/test_data/v5.1/expected_routes.rbi +0 -27
  357. data/spec/test_data/v5.1/expected_srb_tc_output.txt +0 -1
data/.travis.yml DELETED
@@ -1,42 +0,0 @@
1
- language: ruby
2
- env:
3
- matrix:
4
- - RAILS_VERSION=5.0
5
- - RAILS_VERSION=5.1
6
- - RAILS_VERSION=5.2
7
- - RAILS_VERSION=6.0
8
- global:
9
- secure: S3rpBSDgDQjhA11/80dZ4RUlBP3XLJWOgvcl1eySFdXqHCZGS5p8Fa97yEvZHWiPInUTNhdvyQ5LHlgzu1CCZ9+MOykpEgYo+1yIueriv9Ia5PUNFbwhRp2eBkluSUMPNPOxf15mUlgAGdScnssRL9zftYel29dw4yg+BQnnkLOqpnLO7wHTjouEmp7M8Y/1j0ScIZ0tZL1ovDq70Lst+TJKHm4jdBbwoNmILIwNBgnzZT1LdAuaXVHEmwLvy0GLvClewuSmToJ4jyjuJorCjyMhyoBLrutSuN4KaJcSlP/LVtH4ZCFkFDayDMiVcSyUE3asSnL3yxGL0K99lgwNk4D58WWic7N+0UKnGoiMQOHC9EIsQKaxfXMOpO+Cq5wYhgmFzPGF4iL6ZBNCehcc+ToBojprmJw/0Ev71OS2YGvu5SZpYco5AvJeR73IUA2K0rjUEeY3gXm60aIac09kQuuminN3hUkJ894YoA35B8IEU0uW2uL5n/vX2Y8SD6RV8csbKlhpJmphYYWQQOYjHuFoW4MVnnrFHq6YIUDQpi6/We3I4xH3kvfjIpSemrYOmfF4PPXCarWA7ryI9ytR7BloQ0NQH7hqp1hbKN86LAy8zanW08xNOrxI7VDdbtV1k6mf+wiV1W2Vo54HYEDIw0+jwmW/uKWatTyRo5AUsMc=
10
- rvm:
11
- - 2.4
12
- - 2.5
13
- - 2.6
14
- - 2.7
15
- - ruby-head
16
- matrix:
17
- include:
18
- - rvm: 2.5
19
- env: RAILS_VERSION=5.2 SORBET_VERSION=0.5.6210
20
- exclude:
21
- - rvm: 2.3
22
- env: RAILS_VERSION=6.0
23
- - rvm: 2.4
24
- env: RAILS_VERSION=6.0
25
- allow_failures:
26
- - rvm: ruby-head
27
- - rvm: 2.7
28
- env: RAILS_VERSION=6.0
29
- before_install:
30
- - gem install bundler -v 2.0.1 --no-doc
31
- - gem install bundler -v 1.17.3 --no-doc
32
- script:
33
- - bundle exec srb tc
34
- - "./spec/bin/run_spec.sh"
35
- deploy:
36
- provider: rubygems
37
- api_key:
38
- secure: AVQi+tC5+HEoGgOKj/+/UeizOkwgVoB8zdPrd48/H9rx1KsAAmQ+2N9srOnrrEkm9I/bvHLOs0JpM96IiXFhztzrDefkaYQc1Zhu3tbWKZf6kuw0gabTMGhx3JsLoQiYRbJYea1qfrL0XlvQTxgkaa4zGJQaIBIZ97X7jlG5lVcys7JGjUFkozGJgS0t2HDffgDPLs3SiWR380Zvo4xcogw9tFHg5MuirZM/bXb9C/WhdDmKV9LbM8bTkJBjkZ0jbzKITtDJWSCXzdjRebLesTVN6F6cNWkwp2TumefgpQId4uGa5iUN8nXriqN890jjeZ3xHDq7xF0dRZgr8TyreocevCtNPCl+12c9ook0+mJn2GFTJL4W9BTuBGkBFekcQZ5MChWywcJ280iuPfX56Ilpt0wkCtWgB0k+k+eGTgEUv0iLykRFytNfiXr1oySG6mzxcUMf90IxfIKMydjFl8ZmAoTmZDfECtk59IW3PRwfHnNiNwmGMIGz9x9geO0wORWWnqdAwvHnQ7wMdScbSZ/VIPvpBdNe3rbhh4xAXXen+t1V0jvAlkBng9GLCwaRWuAsQG3fvRCbjWGxVmCLaQjUqIoJOtNVgeww+s5bXc8eVUtJ2UNRNnlN78lCWrRBhEfgRoyhVzl47vSZjhOE/2JlmQhpot9nwmMOz1h9wk8=
39
- gem: sorbet-rails
40
- on:
41
- tags: true
42
- repo: chanzuckerberg/sorbet-rails
@@ -1,4 +0,0 @@
1
- # typed: strong
2
- class ActionController::BadRequest < StandardError
3
- def initialize(*args); end
4
- end
@@ -1,21 +0,0 @@
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-journal
13
-
14
- # Ignore all logfiles and tempfiles.
15
- /log/*
16
- /tmp/*
17
- !/log/.keep
18
- !/tmp/.keep
19
-
20
- # Ignore Byebug command history file.
21
- .byebug_history
@@ -1,37 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- git_source(:github) do |repo_name|
4
- repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
5
- "https://github.com/#{repo_name}.git"
6
- end
7
-
8
-
9
- # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
10
- gem 'rails', '~> 5.0.7'
11
- # Use sqlite3 as the database for Active Record
12
- gem 'sqlite3', '~> 1.3.6'
13
- # Use Puma as the app server
14
- gem 'puma', '~> 3.12'
15
- # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
16
- gem 'jbuilder', '~> 2.5'
17
- # Use ActiveModel has_secure_password
18
- # gem 'bcrypt', '~> 3.1.7'
19
-
20
- # Use Capistrano for deployment
21
- # gem 'capistrano-rails', group: :development
22
-
23
- group :development, :test do
24
- # Call 'byebug' anywhere in the code to stop execution and get a debugger console
25
- gem 'byebug', platform: :mri
26
- end
27
-
28
- group :development do
29
- # Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
30
- end
31
-
32
- # Windows does not include zoneinfo files, so bundle the tzinfo-data gem
33
- gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
34
-
35
- gem 'sorbet-rails', path: '../../../.'
36
- gem 'sorbet'
37
- gem 'sorbet-runtime'
@@ -1,161 +0,0 @@
1
- PATH
2
- remote: ../../..
3
- specs:
4
- sorbet-rails (0.7.4)
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)
10
-
11
- GEM
12
- remote: https://rubygems.org/
13
- specs:
14
- actioncable (5.0.7.2)
15
- actionpack (= 5.0.7.2)
16
- nio4r (>= 1.2, < 3.0)
17
- websocket-driver (~> 0.6.1)
18
- actionmailer (5.0.7.2)
19
- actionpack (= 5.0.7.2)
20
- actionview (= 5.0.7.2)
21
- activejob (= 5.0.7.2)
22
- mail (~> 2.5, >= 2.5.4)
23
- rails-dom-testing (~> 2.0)
24
- actionpack (5.0.7.2)
25
- actionview (= 5.0.7.2)
26
- activesupport (= 5.0.7.2)
27
- rack (~> 2.0)
28
- rack-test (~> 0.6.3)
29
- rails-dom-testing (~> 2.0)
30
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
31
- actionview (5.0.7.2)
32
- activesupport (= 5.0.7.2)
33
- builder (~> 3.1)
34
- erubis (~> 2.7.0)
35
- rails-dom-testing (~> 2.0)
36
- rails-html-sanitizer (~> 1.0, >= 1.0.3)
37
- activejob (5.0.7.2)
38
- activesupport (= 5.0.7.2)
39
- globalid (>= 0.3.6)
40
- activemodel (5.0.7.2)
41
- activesupport (= 5.0.7.2)
42
- activerecord (5.0.7.2)
43
- activemodel (= 5.0.7.2)
44
- activesupport (= 5.0.7.2)
45
- arel (~> 7.0)
46
- activesupport (5.0.7.2)
47
- concurrent-ruby (~> 1.0, >= 1.0.2)
48
- i18n (>= 0.7, < 2)
49
- minitest (~> 5.1)
50
- tzinfo (~> 1.1)
51
- arel (7.1.4)
52
- ast (2.4.2)
53
- builder (3.2.4)
54
- byebug (11.1.1)
55
- commander (4.6.0)
56
- highline (~> 2.0.0)
57
- concurrent-ruby (1.1.6)
58
- crass (1.0.6)
59
- erubis (2.7.0)
60
- globalid (0.4.2)
61
- activesupport (>= 4.2.0)
62
- highline (2.0.3)
63
- i18n (1.8.2)
64
- concurrent-ruby (~> 1.0)
65
- jbuilder (2.10.0)
66
- activesupport (>= 5.0.0)
67
- loofah (2.4.0)
68
- crass (~> 1.0.2)
69
- nokogiri (>= 1.5.9)
70
- mail (2.7.1)
71
- mini_mime (>= 0.1.1)
72
- method_source (1.0.0)
73
- mini_mime (1.0.2)
74
- mini_portile2 (2.5.0)
75
- minitest (5.14.0)
76
- nio4r (2.5.2)
77
- nokogiri (1.11.1)
78
- mini_portile2 (~> 2.5.0)
79
- racc (~> 1.4)
80
- nokogiri (1.11.1-x86_64-darwin)
81
- racc (~> 1.4)
82
- parlour (6.0.0)
83
- commander (~> 4.5)
84
- parser
85
- rainbow (~> 3.0)
86
- sorbet-runtime (>= 0.5)
87
- parser (3.0.1.1)
88
- ast (~> 2.4.1)
89
- polyfill (1.9.0)
90
- puma (3.12.6)
91
- racc (1.5.2)
92
- rack (2.2.3)
93
- rack-test (0.6.3)
94
- rack (>= 1.0)
95
- rails (5.0.7.2)
96
- actioncable (= 5.0.7.2)
97
- actionmailer (= 5.0.7.2)
98
- actionpack (= 5.0.7.2)
99
- actionview (= 5.0.7.2)
100
- activejob (= 5.0.7.2)
101
- activemodel (= 5.0.7.2)
102
- activerecord (= 5.0.7.2)
103
- activesupport (= 5.0.7.2)
104
- bundler (>= 1.3.0)
105
- railties (= 5.0.7.2)
106
- sprockets-rails (>= 2.0.0)
107
- rails-dom-testing (2.0.3)
108
- activesupport (>= 4.2.0)
109
- nokogiri (>= 1.6)
110
- rails-html-sanitizer (1.3.0)
111
- loofah (~> 2.3)
112
- railties (5.0.7.2)
113
- actionpack (= 5.0.7.2)
114
- activesupport (= 5.0.7.2)
115
- method_source
116
- rake (>= 0.8.7)
117
- thor (>= 0.18.1, < 2.0)
118
- rainbow (3.0.0)
119
- rake (13.0.1)
120
- safe_type (1.1.1)
121
- sorbet (0.5.5480)
122
- sorbet-static (= 0.5.5480)
123
- sorbet-coerce (0.4.0)
124
- polyfill (~> 1.8)
125
- safe_type (~> 1.1, >= 1.1.1)
126
- sorbet-runtime (>= 0.4.4704)
127
- sorbet-runtime (0.5.5480)
128
- sorbet-static (0.5.5480-universal-darwin-19)
129
- sprockets (4.0.0)
130
- concurrent-ruby (~> 1.0)
131
- rack (> 1, < 3)
132
- sprockets-rails (3.2.1)
133
- actionpack (>= 4.0)
134
- activesupport (>= 4.0)
135
- sprockets (>= 3.0.0)
136
- sqlite3 (1.3.13)
137
- thor (1.0.1)
138
- thread_safe (0.3.6)
139
- tzinfo (1.2.6)
140
- thread_safe (~> 0.1)
141
- websocket-driver (0.6.5)
142
- websocket-extensions (>= 0.1.0)
143
- websocket-extensions (0.1.5)
144
-
145
- PLATFORMS
146
- ruby
147
- x86_64-darwin-19
148
-
149
- DEPENDENCIES
150
- byebug
151
- jbuilder (~> 2.5)
152
- puma (~> 3.12)
153
- rails (~> 5.0.7)
154
- sorbet
155
- sorbet-rails!
156
- sorbet-runtime
157
- sqlite3 (~> 1.3.6)
158
- tzinfo-data
159
-
160
- BUNDLED WITH
161
- 2.2.0
@@ -1,15 +0,0 @@
1
- /*
2
- * This is a manifest file that'll be compiled into application.css, which will include all the files
3
- * listed below.
4
- *
5
- * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
- * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
7
- *
8
- * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9
- * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
10
- * files in this directory. Styles in this file should be added after the last require_* statement.
11
- * It is generally better to create a new file per style scope.
12
- *
13
- *= require_tree .
14
- *= require_self
15
- */
@@ -1,3 +0,0 @@
1
- # typed: strong
2
- class ApplicationJob < ActiveJob::Base
3
- end
@@ -1,5 +0,0 @@
1
- # typed: strict
2
- class ApplicationMailer < ActionMailer::Base
3
- default from: 'from@example.com'
4
- layout 'mailer'
5
- end
@@ -1,8 +0,0 @@
1
- # typed: strict
2
- class Headmaster < ApplicationRecord
3
- belongs_to :school, required: false
4
- belongs_to :wizard, optional: true
5
-
6
- validates :school, presence: true
7
- validates :wizard_id, presence: true
8
- end
@@ -1,6 +0,0 @@
1
- # typed: strict
2
- # an abstract class that has no table
3
- class Potion < ApplicationRecord
4
- self.abstract_class = true
5
- belongs_to :wizard, required: false
6
- end
@@ -1,4 +0,0 @@
1
- # typed: strict
2
- class Robe < ApplicationRecord
3
- belongs_to :wizard, required: false
4
- end
@@ -1,5 +0,0 @@
1
- # typed: strict
2
- class Spell < ApplicationRecord
3
- # habtm enforced at the DB level
4
- has_and_belongs_to_many :spell_books
5
- end
@@ -1,5 +0,0 @@
1
- # typed: strict
2
- class Subject < ApplicationRecord
3
- # habtm which is optional at the db level
4
- has_and_belongs_to_many :wizards
5
- end
@@ -1,13 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>V50</title>
5
- <%= csrf_meta_tags %>
6
-
7
- <%= stylesheet_link_tag 'application', media: 'all' %>
8
- </head>
9
-
10
- <body>
11
- <%= yield %>
12
- </body>
13
- </html>
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env ruby
2
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3
- load Gem.bin_path('bundler', 'bundle')
@@ -1,34 +0,0 @@
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 starting point to setup your application.
15
- # Add necessary setup 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== Copying sample files =="
22
- # unless File.exist?('config/database.yml')
23
- # cp 'config/database.yml.sample', 'config/database.yml'
24
- # end
25
-
26
- puts "\n== Preparing database =="
27
- system! 'bin/rails db:setup'
28
-
29
- puts "\n== Removing old logs and tempfiles =="
30
- system! 'bin/rails log:clear tmp:clear'
31
-
32
- puts "\n== Restarting application server =="
33
- system! 'bin/rails restart'
34
- end
@@ -1,29 +0,0 @@
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
@@ -1,27 +0,0 @@
1
- # typed: strict
2
- require_relative 'boot'
3
-
4
- require "rails"
5
- # Pick the frameworks you want:
6
- require "active_model/railtie"
7
- require "active_job/railtie"
8
- require "active_record/railtie"
9
- require "action_controller/railtie"
10
- require "action_mailer/railtie"
11
- require "action_view/railtie"
12
- # require "action_cable/engine"
13
- # require "sprockets/railtie"
14
- # require "rails/test_unit/railtie"
15
-
16
- # Require the gems listed in Gemfile, including any gems
17
- # you've limited to :test, :development, or :production.
18
- Bundler.require(*Rails.groups)
19
-
20
- module V50
21
- class Application < Rails::Application
22
- config.active_record.time_zone_aware_types = [:datetime, :time]
23
- # Settings in config/environments/* take precedence over those specified here.
24
- # Application configuration should go into files in config/initializers
25
- # -- all .rb files in that directory are automatically loaded.
26
- end
27
- end
@@ -1,25 +0,0 @@
1
- # SQLite version 3.x
2
- # gem install sqlite3
3
- #
4
- # Ensure the SQLite 3 gem is defined in your Gemfile
5
- # gem 'sqlite3'
6
- #
7
- default: &default
8
- adapter: sqlite3
9
- pool: 5
10
- timeout: 5000
11
-
12
- development:
13
- <<: *default
14
- database: db/development.sqlite3
15
-
16
- # Warning: The database defined as "test" will be erased and
17
- # re-generated from your development database when you run "rake".
18
- # Do not set this db to the same as development or production.
19
- test:
20
- <<: *default
21
- database: db/test.sqlite3
22
-
23
- production:
24
- <<: *default
25
- database: db/production.sqlite3
@@ -1,48 +0,0 @@
1
- # typed: false
2
- Rails.application.configure do
3
- # Settings specified here will take precedence over those in config/application.rb.
4
-
5
- # In the development environment your application's code is reloaded on
6
- # every request. This slows down response time but is perfect for development
7
- # since you don't have to restart the web server when you make code changes.
8
- config.cache_classes = false
9
-
10
- # Do not eager load code on boot.
11
- config.eager_load = false
12
-
13
- # Show full error reports.
14
- config.consider_all_requests_local = true
15
-
16
- # Enable/disable caching. By default caching is disabled.
17
- if Rails.root.join('tmp/caching-dev.txt').exist?
18
- config.action_controller.perform_caching = true
19
-
20
- config.cache_store = :memory_store
21
- config.public_file_server.headers = {
22
- 'Cache-Control' => 'public, max-age=172800'
23
- }
24
- else
25
- config.action_controller.perform_caching = false
26
-
27
- config.cache_store = :null_store
28
- end
29
-
30
- # Don't care if the mailer can't send.
31
- config.action_mailer.raise_delivery_errors = false
32
-
33
- config.action_mailer.perform_caching = false
34
-
35
- # Print deprecation notices to the Rails logger.
36
- config.active_support.deprecation = :log
37
-
38
- # Raise an error on page load if there are pending migrations.
39
- config.active_record.migration_error = :page_load
40
-
41
-
42
- # Raises error for missing translations
43
- # config.action_view.raise_on_missing_translations = true
44
-
45
- # Use an evented file watcher to asynchronously detect changes in source code,
46
- # routes, locales, etc. This feature depends on the listen gem.
47
- # config.file_watcher = ActiveSupport::EventedFileUpdateChecker
48
- end
@@ -1,75 +0,0 @@
1
- # typed: false
2
- Rails.application.configure do
3
- # Settings specified here will take precedence over those in config/application.rb.
4
-
5
- # Code is not reloaded between requests.
6
- config.cache_classes = true
7
-
8
- # Eager load code on boot. This eager loads most of Rails and
9
- # your application in memory, allowing both threaded web servers
10
- # and those relying on copy on write to perform better.
11
- # Rake tasks automatically ignore this option for performance.
12
- config.eager_load = true
13
-
14
- # Full error reports are disabled and caching is turned on.
15
- config.consider_all_requests_local = false
16
- config.action_controller.perform_caching = true
17
-
18
- # Disable serving static files from the `/public` folder by default since
19
- # Apache or NGINX already handles this.
20
- config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
21
-
22
-
23
- # Enable serving of images, stylesheets, and JavaScripts from an asset server.
24
- # config.action_controller.asset_host = 'http://assets.example.com'
25
-
26
- # Specifies the header that your server uses for sending files.
27
- # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
28
- # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
29
-
30
-
31
- # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
32
- # config.force_ssl = true
33
-
34
- # Use the lowest log level to ensure availability of diagnostic information
35
- # when problems arise.
36
- config.log_level = :debug
37
-
38
- # Prepend all log lines with the following tags.
39
- config.log_tags = [ :request_id ]
40
-
41
- # Use a different cache store in production.
42
- # config.cache_store = :mem_cache_store
43
-
44
- # Use a real queuing backend for Active Job (and separate queues per environment)
45
- # config.active_job.queue_adapter = :resque
46
- # config.active_job.queue_name_prefix = "v5_0_#{Rails.env}"
47
- config.action_mailer.perform_caching = false
48
-
49
- # Ignore bad email addresses and do not raise email delivery errors.
50
- # Set this to true and configure the email server for immediate delivery to raise delivery errors.
51
- # config.action_mailer.raise_delivery_errors = false
52
-
53
- # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
54
- # the I18n.default_locale when a translation cannot be found).
55
- config.i18n.fallbacks = true
56
-
57
- # Send deprecation notices to registered listeners.
58
- config.active_support.deprecation = :notify
59
-
60
- # Use default logging formatter so that PID and timestamp are not suppressed.
61
- config.log_formatter = ::Logger::Formatter.new
62
-
63
- # Use a different logger for distributed setups.
64
- # require 'syslog/logger'
65
- # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
66
-
67
- if ENV["RAILS_LOG_TO_STDOUT"].present?
68
- logger = ActiveSupport::Logger.new(STDOUT)
69
- logger.formatter = config.log_formatter
70
- config.logger = ActiveSupport::TaggedLogging.new(logger)
71
- end
72
-
73
- # Do not dump schema after migrations.
74
- config.active_record.dump_schema_after_migration = false
75
- end
@@ -1,43 +0,0 @@
1
- # typed: false
2
- Rails.application.configure do
3
- # Settings specified here will take precedence over those in config/application.rb.
4
-
5
- # The test environment is used exclusively to run your application's
6
- # test suite. You never need to work with it otherwise. Remember that
7
- # your test database is "scratch space" for the test suite and is wiped
8
- # and recreated between test runs. Don't rely on the data there!
9
- config.cache_classes = true
10
-
11
- # Do not eager load code on boot. This avoids loading your whole application
12
- # just for the purpose of running a single test. If you are using a tool that
13
- # preloads Rails for running tests, you may have to set it to true.
14
- config.eager_load = false
15
-
16
- # Configure public file server for tests with Cache-Control for performance.
17
- config.public_file_server.enabled = true
18
- config.public_file_server.headers = {
19
- 'Cache-Control' => 'public, max-age=3600'
20
- }
21
-
22
- # Show full error reports and disable caching.
23
- config.consider_all_requests_local = true
24
- config.action_controller.perform_caching = false
25
-
26
- # Raise exceptions instead of rendering exception templates.
27
- config.action_dispatch.show_exceptions = false
28
-
29
- # Disable request forgery protection in test environment.
30
- config.action_controller.allow_forgery_protection = false
31
- config.action_mailer.perform_caching = false
32
-
33
- # Tell Action Mailer not to deliver emails to the real world.
34
- # The :test delivery method accumulates sent emails in the
35
- # ActionMailer::Base.deliveries array.
36
- config.action_mailer.delivery_method = :test
37
-
38
- # Print deprecation notices to the stderr.
39
- config.active_support.deprecation = :stderr
40
-
41
- # Raises error for missing translations
42
- # config.action_view.raise_on_missing_translations = true
43
- end
@@ -1,6 +0,0 @@
1
- # typed: strict
2
- # Be sure to restart your server when you modify this file.
3
-
4
- # Specify a serializer for the signed and encrypted cookie jars.
5
- # Valid options are :json, :marshal, and :hybrid.
6
- Rails.application.config.action_dispatch.cookies_serializer = :json
@@ -1,27 +0,0 @@
1
- # typed: strict
2
- # Be sure to restart your server when you modify this file.
3
- #
4
- # This file contains migration options to ease your Rails 5.0 upgrade.
5
- #
6
- # Read the Guide for Upgrading Ruby on Rails for more info on each option.
7
-
8
- Rails.application.config.action_controller.raise_on_unfiltered_parameters = true
9
-
10
- # Enable per-form CSRF tokens. Previous versions had false.
11
- Rails.application.config.action_controller.per_form_csrf_tokens = true
12
-
13
- # Enable origin-checking CSRF mitigation. Previous versions had false.
14
- Rails.application.config.action_controller.forgery_protection_origin_check = true
15
-
16
- # Make Ruby 2.4 preserve the timezone of the receiver when calling `to_time`.
17
- # Previous versions had false.
18
- ActiveSupport.to_time_preserves_timezone = true
19
-
20
- # Require `belongs_to` associations by default. Previous versions had false.
21
- Rails.application.config.active_record.belongs_to_required_by_default = true
22
-
23
- # Do not halt callback chains when a callback returns false. Previous versions had true.
24
- ActiveSupport.halt_callback_chains_on_return_false = false
25
-
26
- # Configure SSL options to enable HSTS with subdomains. Previous versions had false.
27
- Rails.application.config.ssl_options = { hsts: { subdomains: true } }