sorbet-rails 0.7.3 → 0.7.33

Sign up to get free protection for your applications and to get access to all the features.
Files changed (376) hide show
  1. checksums.yaml +4 -4
  2. data/.github/dependabot.yml +7 -0
  3. data/.github/workflows/ci-master.yml +30 -0
  4. data/.github/workflows/ci.yml +26 -0
  5. data/.github/workflows/publish-gem.yml +17 -0
  6. data/CONTRIBUTING.md +1 -2
  7. data/Gemfile +5 -9
  8. data/README.md +44 -6
  9. data/Rakefile +13 -24
  10. data/lib/sorbet-rails/active_record_rbi_formatter.rb +18 -15
  11. data/lib/sorbet-rails/dependent_gem_rbis/activerecord.rbi +4 -0
  12. data/lib/sorbet-rails/dependent_gem_rbis/parlour.rbi +1896 -0
  13. data/lib/sorbet-rails/gem_plugins/aasm_plugin.rb +55 -0
  14. data/lib/sorbet-rails/gem_plugins/attr_json_plugin.rb +137 -0
  15. data/lib/sorbet-rails/gem_plugins/flag_shih_tzu_plugin.rb +201 -0
  16. data/lib/sorbet-rails/gem_plugins/kaminari_plugin.rb +20 -0
  17. data/lib/sorbet-rails/gem_plugins/money_rails_plugin.rb +76 -0
  18. data/lib/sorbet-rails/gem_plugins/shrine_plugin.rb +1 -1
  19. data/lib/sorbet-rails/job_rbi_formatter.rb +1 -1
  20. data/lib/sorbet-rails/model_column_utils.rb +1 -1
  21. data/lib/sorbet-rails/model_plugins/active_record_assoc.rb +1 -1
  22. data/lib/sorbet-rails/model_plugins/active_record_querying.rb +38 -1
  23. data/lib/sorbet-rails/model_plugins/active_record_serialized_attribute.rb +3 -2
  24. data/lib/sorbet-rails/model_plugins/base.rb +8 -1
  25. data/lib/sorbet-rails/model_plugins/custom_finder_methods.rb +1 -1
  26. data/lib/sorbet-rails/model_plugins/plugins.rb +12 -0
  27. data/lib/sorbet-rails/model_rbi_formatter.rb +7 -4
  28. data/lib/sorbet-rails/model_utils.rb +14 -7
  29. data/lib/sorbet-rails/rails_mixins/custom_finder_methods.rb +12 -0
  30. data/lib/sorbet-rails/railtie.rb +1 -1
  31. data/lib/sorbet-rails/routes_rbi_formatter.rb +8 -0
  32. data/lib/sorbet-rails/tasks/rails_rbi.rake +12 -8
  33. data/sorbet-rails.gemspec +3 -3
  34. data/spec/bin/run_all_specs.sh +3 -4
  35. data/spec/bin/run_spec.sh +4 -1
  36. data/spec/custom_finder_methods_spec.rb +23 -0
  37. data/spec/generators/rails-template.rb +3 -20
  38. data/spec/generators/sorbet_test_cases.rb +26 -4
  39. data/spec/rails_helper.rb +6 -10
  40. data/spec/rake_rails_rbi_models_spec.rb +11 -4
  41. data/spec/sorbet_spec.rb +5 -1
  42. data/spec/support/v5.2/Gemfile +1 -3
  43. data/spec/support/v5.2/Gemfile.lock +88 -81
  44. data/spec/support/v5.2/app/controllers/application_controller.rb +1 -1
  45. data/spec/support/v5.2/app/mailers/application_mailer.rb +1 -1
  46. data/spec/support/v5.2/app/mailers/daily_prophet_mailer.rb +1 -1
  47. data/spec/support/v5.2/app/mailers/hogwarts_acceptance_mailer.rb +1 -1
  48. data/spec/support/v5.2/app/models/spell_book.rb +1 -1
  49. data/spec/support/v5.2/app/models/wand.rb +1 -1
  50. data/spec/support/v5.2/app/models/wizard.rb +1 -1
  51. data/spec/support/v5.2/config/environments/development.rb +1 -1
  52. data/spec/support/v5.2/config/environments/production.rb +1 -1
  53. data/spec/support/v5.2/config/environments/test.rb +1 -1
  54. data/spec/support/v5.2/config/initializers/wrap_parameters.rb +1 -1
  55. data/spec/support/v5.2/config/routes.rb +1 -1
  56. data/spec/support/v5.2/sorbet_test_cases.rb +26 -4
  57. data/spec/support/v6.0/Gemfile +1 -1
  58. data/spec/support/v6.0/Gemfile.lock +103 -96
  59. data/spec/support/v6.0/app/mailers/application_mailer.rb +1 -1
  60. data/spec/support/v6.0/config/environments/development.rb +1 -1
  61. data/spec/support/v6.0/config/environments/test.rb +1 -1
  62. data/spec/support/v6.0/config/initializers/cookies_serializer.rb +1 -1
  63. data/spec/support/v6.0/config/initializers/sorbet_rails.rb +1 -1
  64. data/spec/support/v6.0/config/routes.rb +1 -1
  65. data/spec/support/v6.0/sorbet_test_cases.rb +26 -4
  66. data/spec/support/{v5.1 → v6.1}/.gitignore +13 -2
  67. data/spec/support/{v5.1 → v6.1}/Gemfile +12 -15
  68. data/spec/support/v6.1/Gemfile.lock +203 -0
  69. data/spec/support/{v5.0 → v6.1}/README.md +0 -0
  70. data/spec/support/{v5.0 → v6.1}/Rakefile +0 -0
  71. data/spec/support/{v5.0 → v6.1}/app/assets/config/manifest.js +0 -0
  72. data/spec/support/{v5.0 → v6.1}/app/assets/images/.keep +0 -0
  73. data/spec/support/{v5.1 → v6.1}/app/assets/stylesheets/application.css +0 -0
  74. data/spec/support/{v5.0 → v6.1}/app/controllers/application_controller.rb +1 -2
  75. data/spec/support/{v5.0 → v6.1}/app/controllers/concerns/.keep +0 -0
  76. data/spec/support/{v5.0 → v6.1}/app/helpers/application_helper.rb +0 -0
  77. data/spec/support/{v5.0 → v6.1}/app/helpers/bar_helper.rb +0 -0
  78. data/spec/support/{v5.0 → v6.1}/app/helpers/baz_helper.rb +0 -0
  79. data/spec/support/{v5.0 → v6.1}/app/helpers/foo_helper.rb +0 -0
  80. data/spec/support/v6.1/app/jobs/application_job.rb +8 -0
  81. data/spec/support/{v5.0 → v6.1}/app/jobs/award_house_point_hourglasses.rb +0 -0
  82. data/spec/support/{v5.1 → v6.1}/app/mailers/application_mailer.rb +1 -1
  83. data/spec/support/{v5.0 → v6.1}/app/mailers/daily_prophet_mailer.rb +0 -0
  84. data/spec/support/{v5.0 → v6.1}/app/mailers/hogwarts_acceptance_mailer.rb +0 -0
  85. data/spec/support/{v5.0 → v6.1}/app/models/application_record.rb +0 -0
  86. data/spec/support/{v5.0 → v6.1}/app/models/concerns/.keep +0 -0
  87. data/spec/support/{v5.0 → v6.1}/app/models/concerns/mythical.rb +0 -0
  88. data/spec/support/{v5.1 → v6.1}/app/models/headmaster.rb +1 -1
  89. data/spec/support/{v5.1 → v6.1}/app/models/potion.rb +0 -0
  90. data/spec/support/{v5.1 → v6.1}/app/models/robe.rb +0 -0
  91. data/spec/support/{v5.0 → v6.1}/app/models/school.rb +1 -1
  92. data/spec/support/{v5.1 → v6.1}/app/models/spell.rb +0 -0
  93. data/spec/support/{v5.0 → v6.1}/app/models/spell_book.rb +0 -0
  94. data/spec/support/{v5.0 → v6.1}/app/models/squib.rb +0 -0
  95. data/spec/support/{v5.1 → v6.1}/app/models/subject.rb +0 -0
  96. data/spec/support/{v5.0 → v6.1}/app/models/wand.rb +0 -0
  97. data/spec/support/{v5.0 → v6.1}/app/models/wizard.rb +2 -1
  98. data/spec/support/{v5.1 → v6.1}/app/views/layouts/application.html.erb +2 -1
  99. data/spec/support/{v5.0 → v6.1}/app/views/layouts/mailer.html.erb +0 -0
  100. data/spec/support/{v5.0 → v6.1}/app/views/layouts/mailer.text.erb +0 -0
  101. data/spec/support/v6.1/bin/bundle +114 -0
  102. data/spec/support/{v5.0 → v6.1}/bin/rails +0 -0
  103. data/spec/support/{v5.0 → v6.1}/bin/rake +0 -0
  104. data/spec/support/{v5.1 → v6.1}/bin/setup +6 -11
  105. data/spec/support/{v5.1 → v6.1}/config/application.rb +8 -4
  106. data/spec/support/{v5.0 → v6.1}/config/boot.rb +0 -0
  107. data/spec/support/{v5.1 → v6.1}/config/database.yml +1 -1
  108. data/spec/support/{v5.0 → v6.1}/config/environment.rb +0 -0
  109. data/spec/support/{v5.1 → v6.1}/config/environments/development.rb +12 -4
  110. data/spec/support/{v5.1 → v6.1}/config/environments/production.rb +29 -7
  111. data/spec/support/{v5.1 → v6.1}/config/environments/test.rb +13 -7
  112. data/spec/support/{v5.0 → v6.1}/config/initializers/application_controller_renderer.rb +0 -0
  113. data/spec/support/{v5.0 → v6.1}/config/initializers/backtrace_silencers.rb +0 -0
  114. data/spec/support/v6.1/config/initializers/content_security_policy.rb +29 -0
  115. data/spec/support/{v5.1 → v6.1}/config/initializers/cookies_serializer.rb +1 -1
  116. data/spec/support/{v5.0 → v6.1}/config/initializers/filter_parameter_logging.rb +0 -0
  117. data/spec/support/{v5.0 → v6.1}/config/initializers/inflections.rb +0 -0
  118. data/spec/support/{v5.0 → v6.1}/config/initializers/mime_types.rb +0 -0
  119. data/spec/support/{v5.0 → v6.1}/config/initializers/sorbet_rails.rb +1 -1
  120. data/spec/support/{v5.0 → v6.1}/config/initializers/wrap_parameters.rb +1 -1
  121. data/spec/support/{v5.1 → v6.1}/config/locales/en.yml +1 -1
  122. data/spec/support/{v5.1 → v6.1}/config/puma.rb +8 -26
  123. data/spec/support/v6.1/config/routes.rb +5 -0
  124. data/spec/support/v6.1/config/storage.yml +34 -0
  125. data/spec/support/{v5.0 → v6.1}/config.ru +0 -0
  126. data/spec/support/{v5.1 → v6.1}/db/migrate/20190620000001_create_wizards.rb +2 -2
  127. data/spec/support/{v5.1 → v6.1}/db/migrate/20190620000002_create_wands.rb +2 -2
  128. data/spec/support/{v5.1 → v6.1}/db/migrate/20190620000003_create_spell_books.rb +2 -2
  129. data/spec/support/{v5.1 → v6.1}/db/migrate/20190620000004_add_more_column_types_to_wands.rb +2 -2
  130. data/spec/support/v6.1/db/migrate/20190620000005_add_broom_to_wizard.rb +6 -0
  131. data/spec/support/{v5.1 → v6.1}/db/migrate/20190620000006_add_more_enums_to_wizard.rb +2 -2
  132. data/spec/support/{v5.1 → v6.1}/db/migrate/20190620000007_add_type_to_wizard.rb +2 -2
  133. data/spec/support/{v5.1 → v6.1}/db/migrate/20190620000008_add_robe_to_wizard.rb +2 -2
  134. data/spec/support/{v5.1 → v6.1}/db/migrate/20190620000009_add_school.rb +2 -2
  135. data/spec/support/{v5.1 → v6.1}/db/migrate/20190620000010_add_subject.rb +2 -2
  136. data/spec/support/{v5.1 → v6.1}/db/migrate/20190620000011_add_subjects_wizards.rb +2 -2
  137. data/spec/support/{v5.1 → v6.1}/db/migrate/20190620000012_add_spell.rb +2 -2
  138. data/spec/support/{v5.1 → v6.1}/db/migrate/20190620000013_add_spells_spell_books.rb +2 -2
  139. data/spec/support/{v5.0 → v6.1}/db/migrate/20190620000014_create_headmasters.rb +2 -2
  140. data/spec/support/{v5.0 → v6.1}/db/migrate/20190620000015_add_serialized_to_wizards.rb +2 -2
  141. data/spec/support/{v5.1 → v6.1}/db/schema.rb +14 -11
  142. data/spec/support/{v5.0 → v6.1}/db/seeds.rb +0 -0
  143. data/spec/support/{v5.0 → v6.1}/lib/assets/.keep +0 -0
  144. data/spec/support/{v5.0 → v6.1}/lib/mythical_rbi_plugin.rb +0 -0
  145. data/spec/support/{v5.0 → v6.1}/lib/tasks/.keep +0 -0
  146. data/spec/support/{v5.0 → v6.1}/log/.keep +0 -0
  147. data/spec/support/{v5.0 → v6.1}/sorbet_test_cases.rb +29 -4
  148. data/spec/support/{v5.0/tmp → v6.1/storage}/.keep +0 -0
  149. data/spec/support/{v5.0/vendor/assets/stylesheets → v6.1/tmp}/.keep +0 -0
  150. data/spec/support/{v5.1/app/assets/images → v6.1/tmp/pids}/.keep +0 -0
  151. data/spec/support/{v5.1/app/controllers/concerns → v6.1/vendor}/.keep +0 -0
  152. data/spec/test_data/v5.2/expected_active_record_base.rbi +10 -10
  153. data/spec/test_data/v5.2/expected_active_record_relation.rbi +12 -13
  154. data/spec/test_data/v5.2/expected_attachment.rbi +16 -10
  155. data/spec/test_data/v5.2/expected_blob.rbi +16 -10
  156. data/spec/test_data/v5.2/expected_habtm_subjects.rbi +3 -3
  157. data/spec/test_data/v5.2/expected_habtm_wizards.rbi +3 -3
  158. data/spec/test_data/v5.2/expected_headmaster.rbi +16 -10
  159. data/spec/test_data/v5.2/expected_internal_metadata.rbi +16 -10
  160. data/spec/test_data/v5.2/expected_potion.rbi +16 -10
  161. data/spec/test_data/v5.2/expected_robe.rbi +16 -10
  162. data/spec/test_data/v5.2/expected_routes.rbi +8 -0
  163. data/spec/test_data/v5.2/expected_schema_migration.rbi +16 -10
  164. data/spec/test_data/v5.2/expected_school.rbi +16 -10
  165. data/spec/test_data/v5.2/expected_spell/habtm_spell_books.rbi +16 -10
  166. data/spec/test_data/v5.2/expected_spell.rbi +16 -10
  167. data/spec/test_data/v5.2/expected_spell_book/habtm_spell_books.rbi +3 -3
  168. data/spec/test_data/v5.2/expected_spell_book/habtm_spells.rbi +16 -10
  169. data/spec/test_data/v5.2/expected_spell_book.rbi +16 -10
  170. data/spec/test_data/v5.2/expected_squib.rbi +18 -12
  171. data/spec/test_data/v5.2/expected_subject/habtm_wizards.rbi +16 -10
  172. data/spec/test_data/v5.2/expected_subject.rbi +16 -10
  173. data/spec/test_data/v5.2/expected_wand.rbi +16 -10
  174. data/spec/test_data/v5.2/expected_wizard/habtm_subjects.rbi +16 -10
  175. data/spec/test_data/v5.2/expected_wizard.rbi +18 -12
  176. data/spec/test_data/v5.2/expected_wizard_wo_spellbook.rbi +21 -15
  177. data/spec/test_data/v6.0/expected_active_record_base.rbi +10 -10
  178. data/spec/test_data/v6.0/expected_active_record_relation.rbi +12 -13
  179. data/spec/test_data/v6.0/expected_attachment.rbi +16 -10
  180. data/spec/test_data/v6.0/expected_blob.rbi +16 -10
  181. data/spec/test_data/v6.0/expected_habtm_subjects.rbi +3 -3
  182. data/spec/test_data/v6.0/expected_habtm_wizards.rbi +3 -3
  183. data/spec/test_data/v6.0/expected_headmaster.rbi +16 -10
  184. data/spec/test_data/v6.0/expected_internal_metadata.rbi +16 -10
  185. data/spec/test_data/v6.0/expected_potion.rbi +16 -10
  186. data/spec/test_data/v6.0/expected_robe.rbi +16 -10
  187. data/spec/test_data/v6.0/expected_routes.rbi +8 -0
  188. data/spec/test_data/v6.0/expected_schema_migration.rbi +16 -10
  189. data/spec/test_data/v6.0/expected_school.rbi +16 -10
  190. data/spec/test_data/v6.0/expected_spell/habtm_spell_books.rbi +16 -10
  191. data/spec/test_data/v6.0/expected_spell.rbi +16 -10
  192. data/spec/test_data/v6.0/expected_spell_book/habtm_spell_books.rbi +3 -3
  193. data/spec/test_data/v6.0/expected_spell_book/habtm_spells.rbi +16 -10
  194. data/spec/test_data/v6.0/expected_spell_book.rbi +16 -10
  195. data/spec/test_data/v6.0/expected_squib.rbi +18 -12
  196. data/spec/test_data/v6.0/expected_subject/habtm_wizards.rbi +16 -10
  197. data/spec/test_data/v6.0/expected_subject.rbi +16 -10
  198. data/spec/test_data/v6.0/expected_wand.rbi +16 -10
  199. data/spec/test_data/v6.0/expected_wizard/habtm_subjects.rbi +16 -10
  200. data/spec/test_data/v6.0/expected_wizard.rbi +18 -12
  201. data/spec/test_data/v6.0/expected_wizard_wo_spellbook.rbi +21 -15
  202. data/spec/test_data/{v5.1 → v6.1}/expected_active_record_base.rbi +16 -16
  203. data/spec/test_data/{v5.1 → v6.1}/expected_active_record_relation.rbi +28 -32
  204. data/spec/test_data/{v5.0 → v6.1}/expected_application_job.rbi +0 -0
  205. data/spec/test_data/{v5.0 → v6.1}/expected_application_mailer.rbi +0 -0
  206. data/spec/test_data/v6.1/expected_attachment.rbi +340 -0
  207. data/spec/test_data/{v5.0 → v6.1}/expected_award_house_point_hourglasses.rbi +0 -0
  208. data/spec/test_data/v6.1/expected_blob.rbi +388 -0
  209. data/spec/test_data/{v5.0 → v6.1}/expected_custom_application_job.rbi +0 -0
  210. data/spec/test_data/{v5.0 → v6.1}/expected_custom_application_mailer.rbi +0 -0
  211. data/spec/test_data/{v5.0 → v6.1}/expected_custom_award_house_point_hourglasses.rbi +0 -0
  212. data/spec/test_data/{v5.0 → v6.1}/expected_custom_daily_prophet_mailer.rbi +0 -0
  213. data/spec/test_data/{v5.0 → v6.1}/expected_custom_hogwarts_acceptance_mailer.rbi +0 -0
  214. data/spec/test_data/{v5.0 → v6.1}/expected_daily_prophet_mailer.rbi +0 -0
  215. data/spec/test_data/{v5.1 → v6.1}/expected_habtm_subjects.rbi +51 -3
  216. data/spec/test_data/{v5.1 → v6.1}/expected_habtm_wizards.rbi +51 -3
  217. data/spec/test_data/{v5.1 → v6.1}/expected_headmaster.rbi +42 -6
  218. data/spec/test_data/{v5.0 → v6.1}/expected_helpers.rbi +0 -0
  219. data/spec/test_data/{v5.0 → v6.1}/expected_helpers_with_application_and_devise_helpers.rbi +0 -0
  220. data/spec/test_data/{v5.0 → v6.1}/expected_hogwarts_acceptance_mailer.rbi +0 -0
  221. data/spec/test_data/{v5.1 → v6.1}/expected_internal_metadata.rbi +42 -6
  222. data/spec/test_data/{v5.0 → v6.1}/expected_no_routes.rbi +0 -0
  223. data/spec/test_data/{v5.1 → v6.1}/expected_potion.rbi +42 -6
  224. data/spec/test_data/v6.1/expected_record.rbi +301 -0
  225. data/spec/test_data/{v5.1 → v6.1}/expected_robe.rbi +42 -6
  226. data/spec/test_data/v6.1/expected_routes.rbi +175 -0
  227. data/spec/test_data/{v5.1 → v6.1}/expected_schema_migration.rbi +42 -6
  228. data/spec/test_data/{v5.1 → v6.1}/expected_school.rbi +42 -6
  229. data/spec/test_data/{v5.1 → v6.1}/expected_spell/habtm_spell_books.rbi +42 -6
  230. data/spec/test_data/{v5.1 → v6.1}/expected_spell.rbi +42 -6
  231. data/spec/test_data/{v5.1 → v6.1}/expected_spell_book/habtm_spell_books.rbi +51 -3
  232. data/spec/test_data/{v5.1 → v6.1}/expected_spell_book/habtm_spells.rbi +42 -6
  233. data/spec/test_data/{v5.1 → v6.1}/expected_spell_book.rbi +78 -6
  234. data/spec/test_data/{v5.1 → v6.1}/expected_squib.rbi +514 -64
  235. data/spec/test_data/{v5.0 → v6.1}/expected_srb_tc_output.txt +0 -0
  236. data/spec/test_data/{v5.1 → v6.1}/expected_subject/habtm_wizards.rbi +42 -6
  237. data/spec/test_data/{v5.1 → v6.1}/expected_subject.rbi +42 -6
  238. data/spec/test_data/v6.1/expected_variant_record.rbi +376 -0
  239. data/spec/test_data/{v5.1 → v6.1}/expected_wand.rbi +108 -6
  240. data/spec/test_data/{v5.1 → v6.1}/expected_wizard/habtm_subjects.rbi +42 -6
  241. data/spec/test_data/{v5.1 → v6.1}/expected_wizard.rbi +514 -64
  242. data/spec/test_data/{v5.1 → v6.1}/expected_wizard_wo_spellbook.rbi +508 -58
  243. metadata +271 -503
  244. data/.travis.yml +0 -42
  245. data/lib/sorbet-rails/type_assert/actionpack.rbi +0 -4
  246. data/spec/support/v5.0/.gitignore +0 -21
  247. data/spec/support/v5.0/Gemfile +0 -37
  248. data/spec/support/v5.0/Gemfile.lock +0 -158
  249. data/spec/support/v5.0/app/assets/stylesheets/application.css +0 -15
  250. data/spec/support/v5.0/app/jobs/application_job.rb +0 -3
  251. data/spec/support/v5.0/app/mailers/application_mailer.rb +0 -5
  252. data/spec/support/v5.0/app/models/headmaster.rb +0 -8
  253. data/spec/support/v5.0/app/models/potion.rb +0 -6
  254. data/spec/support/v5.0/app/models/robe.rb +0 -4
  255. data/spec/support/v5.0/app/models/spell.rb +0 -5
  256. data/spec/support/v5.0/app/models/subject.rb +0 -5
  257. data/spec/support/v5.0/app/views/layouts/application.html.erb +0 -13
  258. data/spec/support/v5.0/bin/bundle +0 -3
  259. data/spec/support/v5.0/bin/setup +0 -34
  260. data/spec/support/v5.0/bin/update +0 -29
  261. data/spec/support/v5.0/config/application.rb +0 -27
  262. data/spec/support/v5.0/config/database.yml +0 -25
  263. data/spec/support/v5.0/config/environments/development.rb +0 -48
  264. data/spec/support/v5.0/config/environments/production.rb +0 -75
  265. data/spec/support/v5.0/config/environments/test.rb +0 -43
  266. data/spec/support/v5.0/config/initializers/cookies_serializer.rb +0 -6
  267. data/spec/support/v5.0/config/initializers/new_framework_defaults.rb +0 -27
  268. data/spec/support/v5.0/config/initializers/session_store.rb +0 -4
  269. data/spec/support/v5.0/config/locales/en.yml +0 -23
  270. data/spec/support/v5.0/config/puma.rb +0 -48
  271. data/spec/support/v5.0/config/routes.rb +0 -5
  272. data/spec/support/v5.0/db/migrate/20190620000001_create_wizards.rb +0 -14
  273. data/spec/support/v5.0/db/migrate/20190620000002_create_wands.rb +0 -12
  274. data/spec/support/v5.0/db/migrate/20190620000003_create_spell_books.rb +0 -10
  275. data/spec/support/v5.0/db/migrate/20190620000004_add_more_column_types_to_wands.rb +0 -17
  276. data/spec/support/v5.0/db/migrate/20190620000005_add_broom_to_wizard.rb +0 -6
  277. data/spec/support/v5.0/db/migrate/20190620000006_add_more_enums_to_wizard.rb +0 -9
  278. data/spec/support/v5.0/db/migrate/20190620000007_add_type_to_wizard.rb +0 -6
  279. data/spec/support/v5.0/db/migrate/20190620000008_add_robe_to_wizard.rb +0 -8
  280. data/spec/support/v5.0/db/migrate/20190620000009_add_school.rb +0 -10
  281. data/spec/support/v5.0/db/migrate/20190620000010_add_subject.rb +0 -8
  282. data/spec/support/v5.0/db/migrate/20190620000011_add_subjects_wizards.rb +0 -8
  283. data/spec/support/v5.0/db/migrate/20190620000012_add_spell.rb +0 -8
  284. data/spec/support/v5.0/db/migrate/20190620000013_add_spells_spell_books.rb +0 -8
  285. data/spec/support/v5.0/db/schema.rb +0 -96
  286. data/spec/support/v5.0/public/robots.txt +0 -5
  287. data/spec/support/v5.1/Gemfile.lock +0 -165
  288. data/spec/support/v5.1/README.md +0 -24
  289. data/spec/support/v5.1/Rakefile +0 -6
  290. data/spec/support/v5.1/app/assets/config/manifest.js +0 -2
  291. data/spec/support/v5.1/app/controllers/application_controller.rb +0 -4
  292. data/spec/support/v5.1/app/helpers/application_helper.rb +0 -3
  293. data/spec/support/v5.1/app/helpers/bar_helper.rb +0 -3
  294. data/spec/support/v5.1/app/helpers/baz_helper.rb +0 -3
  295. data/spec/support/v5.1/app/helpers/foo_helper.rb +0 -3
  296. data/spec/support/v5.1/app/jobs/application_job.rb +0 -3
  297. data/spec/support/v5.1/app/jobs/award_house_point_hourglasses.rb +0 -12
  298. data/spec/support/v5.1/app/mailers/daily_prophet_mailer.rb +0 -9
  299. data/spec/support/v5.1/app/mailers/hogwarts_acceptance_mailer.rb +0 -29
  300. data/spec/support/v5.1/app/models/application_record.rb +0 -4
  301. data/spec/support/v5.1/app/models/concerns/.keep +0 -0
  302. data/spec/support/v5.1/app/models/concerns/mythical.rb +0 -11
  303. data/spec/support/v5.1/app/models/school.rb +0 -5
  304. data/spec/support/v5.1/app/models/spell_book.rb +0 -18
  305. data/spec/support/v5.1/app/models/squib.rb +0 -6
  306. data/spec/support/v5.1/app/models/wand.rb +0 -19
  307. data/spec/support/v5.1/app/models/wizard.rb +0 -65
  308. data/spec/support/v5.1/app/views/layouts/mailer.html.erb +0 -13
  309. data/spec/support/v5.1/app/views/layouts/mailer.text.erb +0 -1
  310. data/spec/support/v5.1/bin/bundle +0 -3
  311. data/spec/support/v5.1/bin/rails +0 -4
  312. data/spec/support/v5.1/bin/rake +0 -4
  313. data/spec/support/v5.1/bin/update +0 -29
  314. data/spec/support/v5.1/bin/yarn +0 -11
  315. data/spec/support/v5.1/config/boot.rb +0 -4
  316. data/spec/support/v5.1/config/environment.rb +0 -6
  317. data/spec/support/v5.1/config/initializers/application_controller_renderer.rb +0 -9
  318. data/spec/support/v5.1/config/initializers/backtrace_silencers.rb +0 -8
  319. data/spec/support/v5.1/config/initializers/filter_parameter_logging.rb +0 -5
  320. data/spec/support/v5.1/config/initializers/inflections.rb +0 -17
  321. data/spec/support/v5.1/config/initializers/mime_types.rb +0 -5
  322. data/spec/support/v5.1/config/initializers/sorbet_rails.rb +0 -3
  323. data/spec/support/v5.1/config/initializers/wrap_parameters.rb +0 -15
  324. data/spec/support/v5.1/config/routes.rb +0 -5
  325. data/spec/support/v5.1/config.ru +0 -5
  326. data/spec/support/v5.1/db/migrate/20190620000005_add_broom_to_wizard.rb +0 -6
  327. data/spec/support/v5.1/db/migrate/20190620000014_create_headmasters.rb +0 -9
  328. data/spec/support/v5.1/db/migrate/20190620000015_add_serialized_to_wizards.rb +0 -9
  329. data/spec/support/v5.1/db/seeds.rb +0 -8
  330. data/spec/support/v5.1/lib/assets/.keep +0 -0
  331. data/spec/support/v5.1/lib/mythical_rbi_plugin.rb +0 -16
  332. data/spec/support/v5.1/lib/tasks/.keep +0 -0
  333. data/spec/support/v5.1/log/.keep +0 -0
  334. data/spec/support/v5.1/package.json +0 -5
  335. data/spec/support/v5.1/public/robots.txt +0 -1
  336. data/spec/support/v5.1/sorbet_test_cases.rb +0 -409
  337. data/spec/support/v5.1/tmp/.keep +0 -0
  338. data/spec/support/v5.1/vendor/.keep +0 -0
  339. data/spec/test_data/v5.0/expected_active_record_base.rbi +0 -113
  340. data/spec/test_data/v5.0/expected_active_record_relation.rbi +0 -199
  341. data/spec/test_data/v5.0/expected_habtm_subjects.rbi +0 -660
  342. data/spec/test_data/v5.0/expected_habtm_wizards.rbi +0 -660
  343. data/spec/test_data/v5.0/expected_headmaster.rbi +0 -328
  344. data/spec/test_data/v5.0/expected_internal_metadata.rbi +0 -298
  345. data/spec/test_data/v5.0/expected_potion.rbi +0 -280
  346. data/spec/test_data/v5.0/expected_robe.rbi +0 -301
  347. data/spec/test_data/v5.0/expected_routes.rbi +0 -27
  348. data/spec/test_data/v5.0/expected_schema_migration.rbi +0 -271
  349. data/spec/test_data/v5.0/expected_school.rbi +0 -301
  350. data/spec/test_data/v5.0/expected_spell/habtm_spell_books.rbi +0 -319
  351. data/spec/test_data/v5.0/expected_spell.rbi +0 -292
  352. data/spec/test_data/v5.0/expected_spell_book/habtm_spell_books.rbi +0 -637
  353. data/spec/test_data/v5.0/expected_spell_book/habtm_spells.rbi +0 -319
  354. data/spec/test_data/v5.0/expected_spell_book.rbi +0 -415
  355. data/spec/test_data/v5.0/expected_squib.rbi +0 -832
  356. data/spec/test_data/v5.0/expected_subject/habtm_wizards.rbi +0 -319
  357. data/spec/test_data/v5.0/expected_subject.rbi +0 -292
  358. data/spec/test_data/v5.0/expected_wand.rbi +0 -497
  359. data/spec/test_data/v5.0/expected_wizard/habtm_subjects.rbi +0 -319
  360. data/spec/test_data/v5.0/expected_wizard.rbi +0 -908
  361. data/spec/test_data/v5.0/expected_wizard_wo_spellbook.rbi +0 -902
  362. data/spec/test_data/v5.1/expected_application_job.rbi +0 -20
  363. data/spec/test_data/v5.1/expected_application_mailer.rbi +0 -5
  364. data/spec/test_data/v5.1/expected_award_house_point_hourglasses.rbi +0 -20
  365. data/spec/test_data/v5.1/expected_custom_application_job.rbi +0 -21
  366. data/spec/test_data/v5.1/expected_custom_application_mailer.rbi +0 -6
  367. data/spec/test_data/v5.1/expected_custom_award_house_point_hourglasses.rbi +0 -21
  368. data/spec/test_data/v5.1/expected_custom_daily_prophet_mailer.rbi +0 -8
  369. data/spec/test_data/v5.1/expected_custom_hogwarts_acceptance_mailer.rbi +0 -21
  370. data/spec/test_data/v5.1/expected_daily_prophet_mailer.rbi +0 -7
  371. data/spec/test_data/v5.1/expected_helpers.rbi +0 -27
  372. data/spec/test_data/v5.1/expected_helpers_with_application_and_devise_helpers.rbi +0 -34
  373. data/spec/test_data/v5.1/expected_hogwarts_acceptance_mailer.rbi +0 -20
  374. data/spec/test_data/v5.1/expected_no_routes.rbi +0 -4
  375. data/spec/test_data/v5.1/expected_routes.rbi +0 -27
  376. 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,158 +0,0 @@
1
- PATH
2
- remote: ../../..
3
- specs:
4
- sorbet-rails (0.7.3)
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.1)
53
- builder (3.2.4)
54
- byebug (11.1.1)
55
- commander (4.5.2)
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.4.0)
75
- minitest (5.14.0)
76
- nio4r (2.5.2)
77
- nokogiri (1.10.9)
78
- mini_portile2 (~> 2.4.0)
79
- parlour (5.0.0)
80
- commander (~> 4.5)
81
- parser
82
- rainbow (~> 3.0)
83
- sorbet-runtime (>= 0.5)
84
- parser (3.0.0.0)
85
- ast (~> 2.4.1)
86
- polyfill (1.9.0)
87
- puma (3.12.6)
88
- rack (2.2.3)
89
- rack-test (0.6.3)
90
- rack (>= 1.0)
91
- rails (5.0.7.2)
92
- actioncable (= 5.0.7.2)
93
- actionmailer (= 5.0.7.2)
94
- actionpack (= 5.0.7.2)
95
- actionview (= 5.0.7.2)
96
- activejob (= 5.0.7.2)
97
- activemodel (= 5.0.7.2)
98
- activerecord (= 5.0.7.2)
99
- activesupport (= 5.0.7.2)
100
- bundler (>= 1.3.0)
101
- railties (= 5.0.7.2)
102
- sprockets-rails (>= 2.0.0)
103
- rails-dom-testing (2.0.3)
104
- activesupport (>= 4.2.0)
105
- nokogiri (>= 1.6)
106
- rails-html-sanitizer (1.3.0)
107
- loofah (~> 2.3)
108
- railties (5.0.7.2)
109
- actionpack (= 5.0.7.2)
110
- activesupport (= 5.0.7.2)
111
- method_source
112
- rake (>= 0.8.7)
113
- thor (>= 0.18.1, < 2.0)
114
- rainbow (3.0.0)
115
- rake (13.0.1)
116
- safe_type (1.1.1)
117
- sorbet (0.5.5480)
118
- sorbet-static (= 0.5.5480)
119
- sorbet-coerce (0.3.0)
120
- polyfill (~> 1.8)
121
- safe_type (~> 1.1, >= 1.1.1)
122
- sorbet (>= 0.4.4704)
123
- sorbet-runtime (>= 0.4.4704)
124
- sorbet-runtime (0.5.5480)
125
- sorbet-static (0.5.5480-universal-darwin-19)
126
- sprockets (4.0.0)
127
- concurrent-ruby (~> 1.0)
128
- rack (> 1, < 3)
129
- sprockets-rails (3.2.1)
130
- actionpack (>= 4.0)
131
- activesupport (>= 4.0)
132
- sprockets (>= 3.0.0)
133
- sqlite3 (1.3.13)
134
- thor (1.0.1)
135
- thread_safe (0.3.6)
136
- tzinfo (1.2.6)
137
- thread_safe (~> 0.1)
138
- websocket-driver (0.6.5)
139
- websocket-extensions (>= 0.1.0)
140
- websocket-extensions (0.1.5)
141
-
142
- PLATFORMS
143
- ruby
144
- x86_64-darwin-19
145
-
146
- DEPENDENCIES
147
- byebug
148
- jbuilder (~> 2.5)
149
- puma (~> 3.12)
150
- rails (~> 5.0.7)
151
- sorbet
152
- sorbet-rails!
153
- sorbet-runtime
154
- sqlite3 (~> 1.3.6)
155
- tzinfo-data
156
-
157
- BUNDLED WITH
158
- 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 } }