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.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +7 -0
- data/.github/workflows/ci-master.yml +30 -0
- data/.github/workflows/ci.yml +26 -0
- data/.github/workflows/publish-gem.yml +17 -0
- data/CONTRIBUTING.md +1 -2
- data/Gemfile +5 -9
- data/README.md +44 -6
- data/Rakefile +13 -24
- data/lib/sorbet-rails/active_record_rbi_formatter.rb +18 -15
- data/lib/sorbet-rails/dependent_gem_rbis/activerecord.rbi +4 -0
- data/lib/sorbet-rails/dependent_gem_rbis/parlour.rbi +1896 -0
- data/lib/sorbet-rails/gem_plugins/aasm_plugin.rb +55 -0
- data/lib/sorbet-rails/gem_plugins/attr_json_plugin.rb +137 -0
- data/lib/sorbet-rails/gem_plugins/flag_shih_tzu_plugin.rb +201 -0
- data/lib/sorbet-rails/gem_plugins/kaminari_plugin.rb +20 -0
- data/lib/sorbet-rails/gem_plugins/money_rails_plugin.rb +76 -0
- data/lib/sorbet-rails/gem_plugins/shrine_plugin.rb +1 -1
- data/lib/sorbet-rails/job_rbi_formatter.rb +1 -1
- data/lib/sorbet-rails/model_column_utils.rb +1 -1
- data/lib/sorbet-rails/model_plugins/active_record_assoc.rb +1 -1
- data/lib/sorbet-rails/model_plugins/active_record_querying.rb +38 -1
- data/lib/sorbet-rails/model_plugins/active_record_serialized_attribute.rb +3 -2
- data/lib/sorbet-rails/model_plugins/base.rb +8 -1
- data/lib/sorbet-rails/model_plugins/custom_finder_methods.rb +1 -1
- data/lib/sorbet-rails/model_plugins/plugins.rb +12 -0
- data/lib/sorbet-rails/model_rbi_formatter.rb +7 -4
- data/lib/sorbet-rails/model_utils.rb +14 -7
- data/lib/sorbet-rails/rails_mixins/custom_finder_methods.rb +12 -0
- data/lib/sorbet-rails/railtie.rb +1 -1
- data/lib/sorbet-rails/routes_rbi_formatter.rb +8 -0
- data/lib/sorbet-rails/tasks/rails_rbi.rake +12 -8
- data/sorbet-rails.gemspec +3 -3
- data/spec/bin/run_all_specs.sh +3 -4
- data/spec/bin/run_spec.sh +4 -1
- data/spec/custom_finder_methods_spec.rb +23 -0
- data/spec/generators/rails-template.rb +3 -20
- data/spec/generators/sorbet_test_cases.rb +26 -4
- data/spec/rails_helper.rb +6 -10
- data/spec/rake_rails_rbi_models_spec.rb +11 -4
- data/spec/sorbet_spec.rb +5 -1
- data/spec/support/v5.2/Gemfile +1 -3
- data/spec/support/v5.2/Gemfile.lock +88 -81
- data/spec/support/v5.2/app/controllers/application_controller.rb +1 -1
- data/spec/support/v5.2/app/mailers/application_mailer.rb +1 -1
- data/spec/support/v5.2/app/mailers/daily_prophet_mailer.rb +1 -1
- data/spec/support/v5.2/app/mailers/hogwarts_acceptance_mailer.rb +1 -1
- data/spec/support/v5.2/app/models/spell_book.rb +1 -1
- data/spec/support/v5.2/app/models/wand.rb +1 -1
- data/spec/support/v5.2/app/models/wizard.rb +1 -1
- data/spec/support/v5.2/config/environments/development.rb +1 -1
- data/spec/support/v5.2/config/environments/production.rb +1 -1
- data/spec/support/v5.2/config/environments/test.rb +1 -1
- data/spec/support/v5.2/config/initializers/wrap_parameters.rb +1 -1
- data/spec/support/v5.2/config/routes.rb +1 -1
- data/spec/support/v5.2/sorbet_test_cases.rb +26 -4
- data/spec/support/v6.0/Gemfile +1 -1
- data/spec/support/v6.0/Gemfile.lock +103 -96
- data/spec/support/v6.0/app/mailers/application_mailer.rb +1 -1
- data/spec/support/v6.0/config/environments/development.rb +1 -1
- data/spec/support/v6.0/config/environments/test.rb +1 -1
- data/spec/support/v6.0/config/initializers/cookies_serializer.rb +1 -1
- data/spec/support/v6.0/config/initializers/sorbet_rails.rb +1 -1
- data/spec/support/v6.0/config/routes.rb +1 -1
- data/spec/support/v6.0/sorbet_test_cases.rb +26 -4
- data/spec/support/{v5.1 → v6.1}/.gitignore +13 -2
- data/spec/support/{v5.1 → v6.1}/Gemfile +12 -15
- data/spec/support/v6.1/Gemfile.lock +203 -0
- data/spec/support/{v5.0 → v6.1}/README.md +0 -0
- data/spec/support/{v5.0 → v6.1}/Rakefile +0 -0
- data/spec/support/{v5.0 → v6.1}/app/assets/config/manifest.js +0 -0
- data/spec/support/{v5.0 → v6.1}/app/assets/images/.keep +0 -0
- data/spec/support/{v5.1 → v6.1}/app/assets/stylesheets/application.css +0 -0
- data/spec/support/{v5.0 → v6.1}/app/controllers/application_controller.rb +1 -2
- data/spec/support/{v5.0 → v6.1}/app/controllers/concerns/.keep +0 -0
- data/spec/support/{v5.0 → v6.1}/app/helpers/application_helper.rb +0 -0
- data/spec/support/{v5.0 → v6.1}/app/helpers/bar_helper.rb +0 -0
- data/spec/support/{v5.0 → v6.1}/app/helpers/baz_helper.rb +0 -0
- data/spec/support/{v5.0 → v6.1}/app/helpers/foo_helper.rb +0 -0
- data/spec/support/v6.1/app/jobs/application_job.rb +8 -0
- data/spec/support/{v5.0 → v6.1}/app/jobs/award_house_point_hourglasses.rb +0 -0
- data/spec/support/{v5.1 → v6.1}/app/mailers/application_mailer.rb +1 -1
- data/spec/support/{v5.0 → v6.1}/app/mailers/daily_prophet_mailer.rb +0 -0
- data/spec/support/{v5.0 → v6.1}/app/mailers/hogwarts_acceptance_mailer.rb +0 -0
- data/spec/support/{v5.0 → v6.1}/app/models/application_record.rb +0 -0
- data/spec/support/{v5.0 → v6.1}/app/models/concerns/.keep +0 -0
- data/spec/support/{v5.0 → v6.1}/app/models/concerns/mythical.rb +0 -0
- data/spec/support/{v5.1 → v6.1}/app/models/headmaster.rb +1 -1
- data/spec/support/{v5.1 → v6.1}/app/models/potion.rb +0 -0
- data/spec/support/{v5.1 → v6.1}/app/models/robe.rb +0 -0
- data/spec/support/{v5.0 → v6.1}/app/models/school.rb +1 -1
- data/spec/support/{v5.1 → v6.1}/app/models/spell.rb +0 -0
- data/spec/support/{v5.0 → v6.1}/app/models/spell_book.rb +0 -0
- data/spec/support/{v5.0 → v6.1}/app/models/squib.rb +0 -0
- data/spec/support/{v5.1 → v6.1}/app/models/subject.rb +0 -0
- data/spec/support/{v5.0 → v6.1}/app/models/wand.rb +0 -0
- data/spec/support/{v5.0 → v6.1}/app/models/wizard.rb +2 -1
- data/spec/support/{v5.1 → v6.1}/app/views/layouts/application.html.erb +2 -1
- data/spec/support/{v5.0 → v6.1}/app/views/layouts/mailer.html.erb +0 -0
- data/spec/support/{v5.0 → v6.1}/app/views/layouts/mailer.text.erb +0 -0
- data/spec/support/v6.1/bin/bundle +114 -0
- data/spec/support/{v5.0 → v6.1}/bin/rails +0 -0
- data/spec/support/{v5.0 → v6.1}/bin/rake +0 -0
- data/spec/support/{v5.1 → v6.1}/bin/setup +6 -11
- data/spec/support/{v5.1 → v6.1}/config/application.rb +8 -4
- data/spec/support/{v5.0 → v6.1}/config/boot.rb +0 -0
- data/spec/support/{v5.1 → v6.1}/config/database.yml +1 -1
- data/spec/support/{v5.0 → v6.1}/config/environment.rb +0 -0
- data/spec/support/{v5.1 → v6.1}/config/environments/development.rb +12 -4
- data/spec/support/{v5.1 → v6.1}/config/environments/production.rb +29 -7
- data/spec/support/{v5.1 → v6.1}/config/environments/test.rb +13 -7
- data/spec/support/{v5.0 → v6.1}/config/initializers/application_controller_renderer.rb +0 -0
- data/spec/support/{v5.0 → v6.1}/config/initializers/backtrace_silencers.rb +0 -0
- data/spec/support/v6.1/config/initializers/content_security_policy.rb +29 -0
- data/spec/support/{v5.1 → v6.1}/config/initializers/cookies_serializer.rb +1 -1
- data/spec/support/{v5.0 → v6.1}/config/initializers/filter_parameter_logging.rb +0 -0
- data/spec/support/{v5.0 → v6.1}/config/initializers/inflections.rb +0 -0
- data/spec/support/{v5.0 → v6.1}/config/initializers/mime_types.rb +0 -0
- data/spec/support/{v5.0 → v6.1}/config/initializers/sorbet_rails.rb +1 -1
- data/spec/support/{v5.0 → v6.1}/config/initializers/wrap_parameters.rb +1 -1
- data/spec/support/{v5.1 → v6.1}/config/locales/en.yml +1 -1
- data/spec/support/{v5.1 → v6.1}/config/puma.rb +8 -26
- data/spec/support/v6.1/config/routes.rb +5 -0
- data/spec/support/v6.1/config/storage.yml +34 -0
- data/spec/support/{v5.0 → v6.1}/config.ru +0 -0
- data/spec/support/{v5.1 → v6.1}/db/migrate/20190620000001_create_wizards.rb +2 -2
- data/spec/support/{v5.1 → v6.1}/db/migrate/20190620000002_create_wands.rb +2 -2
- data/spec/support/{v5.1 → v6.1}/db/migrate/20190620000003_create_spell_books.rb +2 -2
- data/spec/support/{v5.1 → v6.1}/db/migrate/20190620000004_add_more_column_types_to_wands.rb +2 -2
- data/spec/support/v6.1/db/migrate/20190620000005_add_broom_to_wizard.rb +6 -0
- data/spec/support/{v5.1 → v6.1}/db/migrate/20190620000006_add_more_enums_to_wizard.rb +2 -2
- data/spec/support/{v5.1 → v6.1}/db/migrate/20190620000007_add_type_to_wizard.rb +2 -2
- data/spec/support/{v5.1 → v6.1}/db/migrate/20190620000008_add_robe_to_wizard.rb +2 -2
- data/spec/support/{v5.1 → v6.1}/db/migrate/20190620000009_add_school.rb +2 -2
- data/spec/support/{v5.1 → v6.1}/db/migrate/20190620000010_add_subject.rb +2 -2
- data/spec/support/{v5.1 → v6.1}/db/migrate/20190620000011_add_subjects_wizards.rb +2 -2
- data/spec/support/{v5.1 → v6.1}/db/migrate/20190620000012_add_spell.rb +2 -2
- data/spec/support/{v5.1 → v6.1}/db/migrate/20190620000013_add_spells_spell_books.rb +2 -2
- data/spec/support/{v5.0 → v6.1}/db/migrate/20190620000014_create_headmasters.rb +2 -2
- data/spec/support/{v5.0 → v6.1}/db/migrate/20190620000015_add_serialized_to_wizards.rb +2 -2
- data/spec/support/{v5.1 → v6.1}/db/schema.rb +14 -11
- data/spec/support/{v5.0 → v6.1}/db/seeds.rb +0 -0
- data/spec/support/{v5.0 → v6.1}/lib/assets/.keep +0 -0
- data/spec/support/{v5.0 → v6.1}/lib/mythical_rbi_plugin.rb +0 -0
- data/spec/support/{v5.0 → v6.1}/lib/tasks/.keep +0 -0
- data/spec/support/{v5.0 → v6.1}/log/.keep +0 -0
- data/spec/support/{v5.0 → v6.1}/sorbet_test_cases.rb +29 -4
- data/spec/support/{v5.0/tmp → v6.1/storage}/.keep +0 -0
- data/spec/support/{v5.0/vendor/assets/stylesheets → v6.1/tmp}/.keep +0 -0
- data/spec/support/{v5.1/app/assets/images → v6.1/tmp/pids}/.keep +0 -0
- data/spec/support/{v5.1/app/controllers/concerns → v6.1/vendor}/.keep +0 -0
- data/spec/test_data/v5.2/expected_active_record_base.rbi +10 -10
- data/spec/test_data/v5.2/expected_active_record_relation.rbi +12 -13
- data/spec/test_data/v5.2/expected_attachment.rbi +16 -10
- data/spec/test_data/v5.2/expected_blob.rbi +16 -10
- data/spec/test_data/v5.2/expected_habtm_subjects.rbi +3 -3
- data/spec/test_data/v5.2/expected_habtm_wizards.rbi +3 -3
- data/spec/test_data/v5.2/expected_headmaster.rbi +16 -10
- data/spec/test_data/v5.2/expected_internal_metadata.rbi +16 -10
- data/spec/test_data/v5.2/expected_potion.rbi +16 -10
- data/spec/test_data/v5.2/expected_robe.rbi +16 -10
- data/spec/test_data/v5.2/expected_routes.rbi +8 -0
- data/spec/test_data/v5.2/expected_schema_migration.rbi +16 -10
- data/spec/test_data/v5.2/expected_school.rbi +16 -10
- data/spec/test_data/v5.2/expected_spell/habtm_spell_books.rbi +16 -10
- data/spec/test_data/v5.2/expected_spell.rbi +16 -10
- data/spec/test_data/v5.2/expected_spell_book/habtm_spell_books.rbi +3 -3
- data/spec/test_data/v5.2/expected_spell_book/habtm_spells.rbi +16 -10
- data/spec/test_data/v5.2/expected_spell_book.rbi +16 -10
- data/spec/test_data/v5.2/expected_squib.rbi +18 -12
- data/spec/test_data/v5.2/expected_subject/habtm_wizards.rbi +16 -10
- data/spec/test_data/v5.2/expected_subject.rbi +16 -10
- data/spec/test_data/v5.2/expected_wand.rbi +16 -10
- data/spec/test_data/v5.2/expected_wizard/habtm_subjects.rbi +16 -10
- data/spec/test_data/v5.2/expected_wizard.rbi +18 -12
- data/spec/test_data/v5.2/expected_wizard_wo_spellbook.rbi +21 -15
- data/spec/test_data/v6.0/expected_active_record_base.rbi +10 -10
- data/spec/test_data/v6.0/expected_active_record_relation.rbi +12 -13
- data/spec/test_data/v6.0/expected_attachment.rbi +16 -10
- data/spec/test_data/v6.0/expected_blob.rbi +16 -10
- data/spec/test_data/v6.0/expected_habtm_subjects.rbi +3 -3
- data/spec/test_data/v6.0/expected_habtm_wizards.rbi +3 -3
- data/spec/test_data/v6.0/expected_headmaster.rbi +16 -10
- data/spec/test_data/v6.0/expected_internal_metadata.rbi +16 -10
- data/spec/test_data/v6.0/expected_potion.rbi +16 -10
- data/spec/test_data/v6.0/expected_robe.rbi +16 -10
- data/spec/test_data/v6.0/expected_routes.rbi +8 -0
- data/spec/test_data/v6.0/expected_schema_migration.rbi +16 -10
- data/spec/test_data/v6.0/expected_school.rbi +16 -10
- data/spec/test_data/v6.0/expected_spell/habtm_spell_books.rbi +16 -10
- data/spec/test_data/v6.0/expected_spell.rbi +16 -10
- data/spec/test_data/v6.0/expected_spell_book/habtm_spell_books.rbi +3 -3
- data/spec/test_data/v6.0/expected_spell_book/habtm_spells.rbi +16 -10
- data/spec/test_data/v6.0/expected_spell_book.rbi +16 -10
- data/spec/test_data/v6.0/expected_squib.rbi +18 -12
- data/spec/test_data/v6.0/expected_subject/habtm_wizards.rbi +16 -10
- data/spec/test_data/v6.0/expected_subject.rbi +16 -10
- data/spec/test_data/v6.0/expected_wand.rbi +16 -10
- data/spec/test_data/v6.0/expected_wizard/habtm_subjects.rbi +16 -10
- data/spec/test_data/v6.0/expected_wizard.rbi +18 -12
- data/spec/test_data/v6.0/expected_wizard_wo_spellbook.rbi +21 -15
- data/spec/test_data/{v5.1 → v6.1}/expected_active_record_base.rbi +16 -16
- data/spec/test_data/{v5.1 → v6.1}/expected_active_record_relation.rbi +28 -32
- data/spec/test_data/{v5.0 → v6.1}/expected_application_job.rbi +0 -0
- data/spec/test_data/{v5.0 → v6.1}/expected_application_mailer.rbi +0 -0
- data/spec/test_data/v6.1/expected_attachment.rbi +340 -0
- data/spec/test_data/{v5.0 → v6.1}/expected_award_house_point_hourglasses.rbi +0 -0
- data/spec/test_data/v6.1/expected_blob.rbi +388 -0
- data/spec/test_data/{v5.0 → v6.1}/expected_custom_application_job.rbi +0 -0
- data/spec/test_data/{v5.0 → v6.1}/expected_custom_application_mailer.rbi +0 -0
- data/spec/test_data/{v5.0 → v6.1}/expected_custom_award_house_point_hourglasses.rbi +0 -0
- data/spec/test_data/{v5.0 → v6.1}/expected_custom_daily_prophet_mailer.rbi +0 -0
- data/spec/test_data/{v5.0 → v6.1}/expected_custom_hogwarts_acceptance_mailer.rbi +0 -0
- data/spec/test_data/{v5.0 → v6.1}/expected_daily_prophet_mailer.rbi +0 -0
- data/spec/test_data/{v5.1 → v6.1}/expected_habtm_subjects.rbi +51 -3
- data/spec/test_data/{v5.1 → v6.1}/expected_habtm_wizards.rbi +51 -3
- data/spec/test_data/{v5.1 → v6.1}/expected_headmaster.rbi +42 -6
- data/spec/test_data/{v5.0 → v6.1}/expected_helpers.rbi +0 -0
- data/spec/test_data/{v5.0 → v6.1}/expected_helpers_with_application_and_devise_helpers.rbi +0 -0
- data/spec/test_data/{v5.0 → v6.1}/expected_hogwarts_acceptance_mailer.rbi +0 -0
- data/spec/test_data/{v5.1 → v6.1}/expected_internal_metadata.rbi +42 -6
- data/spec/test_data/{v5.0 → v6.1}/expected_no_routes.rbi +0 -0
- data/spec/test_data/{v5.1 → v6.1}/expected_potion.rbi +42 -6
- data/spec/test_data/v6.1/expected_record.rbi +301 -0
- data/spec/test_data/{v5.1 → v6.1}/expected_robe.rbi +42 -6
- data/spec/test_data/v6.1/expected_routes.rbi +175 -0
- data/spec/test_data/{v5.1 → v6.1}/expected_schema_migration.rbi +42 -6
- data/spec/test_data/{v5.1 → v6.1}/expected_school.rbi +42 -6
- data/spec/test_data/{v5.1 → v6.1}/expected_spell/habtm_spell_books.rbi +42 -6
- data/spec/test_data/{v5.1 → v6.1}/expected_spell.rbi +42 -6
- data/spec/test_data/{v5.1 → v6.1}/expected_spell_book/habtm_spell_books.rbi +51 -3
- data/spec/test_data/{v5.1 → v6.1}/expected_spell_book/habtm_spells.rbi +42 -6
- data/spec/test_data/{v5.1 → v6.1}/expected_spell_book.rbi +78 -6
- data/spec/test_data/{v5.1 → v6.1}/expected_squib.rbi +514 -64
- data/spec/test_data/{v5.0 → v6.1}/expected_srb_tc_output.txt +0 -0
- data/spec/test_data/{v5.1 → v6.1}/expected_subject/habtm_wizards.rbi +42 -6
- data/spec/test_data/{v5.1 → v6.1}/expected_subject.rbi +42 -6
- data/spec/test_data/v6.1/expected_variant_record.rbi +376 -0
- data/spec/test_data/{v5.1 → v6.1}/expected_wand.rbi +108 -6
- data/spec/test_data/{v5.1 → v6.1}/expected_wizard/habtm_subjects.rbi +42 -6
- data/spec/test_data/{v5.1 → v6.1}/expected_wizard.rbi +514 -64
- data/spec/test_data/{v5.1 → v6.1}/expected_wizard_wo_spellbook.rbi +508 -58
- metadata +271 -503
- data/.travis.yml +0 -42
- data/lib/sorbet-rails/type_assert/actionpack.rbi +0 -4
- data/spec/support/v5.0/.gitignore +0 -21
- data/spec/support/v5.0/Gemfile +0 -37
- data/spec/support/v5.0/Gemfile.lock +0 -158
- data/spec/support/v5.0/app/assets/stylesheets/application.css +0 -15
- data/spec/support/v5.0/app/jobs/application_job.rb +0 -3
- data/spec/support/v5.0/app/mailers/application_mailer.rb +0 -5
- data/spec/support/v5.0/app/models/headmaster.rb +0 -8
- data/spec/support/v5.0/app/models/potion.rb +0 -6
- data/spec/support/v5.0/app/models/robe.rb +0 -4
- data/spec/support/v5.0/app/models/spell.rb +0 -5
- data/spec/support/v5.0/app/models/subject.rb +0 -5
- data/spec/support/v5.0/app/views/layouts/application.html.erb +0 -13
- data/spec/support/v5.0/bin/bundle +0 -3
- data/spec/support/v5.0/bin/setup +0 -34
- data/spec/support/v5.0/bin/update +0 -29
- data/spec/support/v5.0/config/application.rb +0 -27
- data/spec/support/v5.0/config/database.yml +0 -25
- data/spec/support/v5.0/config/environments/development.rb +0 -48
- data/spec/support/v5.0/config/environments/production.rb +0 -75
- data/spec/support/v5.0/config/environments/test.rb +0 -43
- data/spec/support/v5.0/config/initializers/cookies_serializer.rb +0 -6
- data/spec/support/v5.0/config/initializers/new_framework_defaults.rb +0 -27
- data/spec/support/v5.0/config/initializers/session_store.rb +0 -4
- data/spec/support/v5.0/config/locales/en.yml +0 -23
- data/spec/support/v5.0/config/puma.rb +0 -48
- data/spec/support/v5.0/config/routes.rb +0 -5
- data/spec/support/v5.0/db/migrate/20190620000001_create_wizards.rb +0 -14
- data/spec/support/v5.0/db/migrate/20190620000002_create_wands.rb +0 -12
- data/spec/support/v5.0/db/migrate/20190620000003_create_spell_books.rb +0 -10
- data/spec/support/v5.0/db/migrate/20190620000004_add_more_column_types_to_wands.rb +0 -17
- data/spec/support/v5.0/db/migrate/20190620000005_add_broom_to_wizard.rb +0 -6
- data/spec/support/v5.0/db/migrate/20190620000006_add_more_enums_to_wizard.rb +0 -9
- data/spec/support/v5.0/db/migrate/20190620000007_add_type_to_wizard.rb +0 -6
- data/spec/support/v5.0/db/migrate/20190620000008_add_robe_to_wizard.rb +0 -8
- data/spec/support/v5.0/db/migrate/20190620000009_add_school.rb +0 -10
- data/spec/support/v5.0/db/migrate/20190620000010_add_subject.rb +0 -8
- data/spec/support/v5.0/db/migrate/20190620000011_add_subjects_wizards.rb +0 -8
- data/spec/support/v5.0/db/migrate/20190620000012_add_spell.rb +0 -8
- data/spec/support/v5.0/db/migrate/20190620000013_add_spells_spell_books.rb +0 -8
- data/spec/support/v5.0/db/schema.rb +0 -96
- data/spec/support/v5.0/public/robots.txt +0 -5
- data/spec/support/v5.1/Gemfile.lock +0 -165
- data/spec/support/v5.1/README.md +0 -24
- data/spec/support/v5.1/Rakefile +0 -6
- data/spec/support/v5.1/app/assets/config/manifest.js +0 -2
- data/spec/support/v5.1/app/controllers/application_controller.rb +0 -4
- data/spec/support/v5.1/app/helpers/application_helper.rb +0 -3
- data/spec/support/v5.1/app/helpers/bar_helper.rb +0 -3
- data/spec/support/v5.1/app/helpers/baz_helper.rb +0 -3
- data/spec/support/v5.1/app/helpers/foo_helper.rb +0 -3
- data/spec/support/v5.1/app/jobs/application_job.rb +0 -3
- data/spec/support/v5.1/app/jobs/award_house_point_hourglasses.rb +0 -12
- data/spec/support/v5.1/app/mailers/daily_prophet_mailer.rb +0 -9
- data/spec/support/v5.1/app/mailers/hogwarts_acceptance_mailer.rb +0 -29
- data/spec/support/v5.1/app/models/application_record.rb +0 -4
- data/spec/support/v5.1/app/models/concerns/.keep +0 -0
- data/spec/support/v5.1/app/models/concerns/mythical.rb +0 -11
- data/spec/support/v5.1/app/models/school.rb +0 -5
- data/spec/support/v5.1/app/models/spell_book.rb +0 -18
- data/spec/support/v5.1/app/models/squib.rb +0 -6
- data/spec/support/v5.1/app/models/wand.rb +0 -19
- data/spec/support/v5.1/app/models/wizard.rb +0 -65
- data/spec/support/v5.1/app/views/layouts/mailer.html.erb +0 -13
- data/spec/support/v5.1/app/views/layouts/mailer.text.erb +0 -1
- data/spec/support/v5.1/bin/bundle +0 -3
- data/spec/support/v5.1/bin/rails +0 -4
- data/spec/support/v5.1/bin/rake +0 -4
- data/spec/support/v5.1/bin/update +0 -29
- data/spec/support/v5.1/bin/yarn +0 -11
- data/spec/support/v5.1/config/boot.rb +0 -4
- data/spec/support/v5.1/config/environment.rb +0 -6
- data/spec/support/v5.1/config/initializers/application_controller_renderer.rb +0 -9
- data/spec/support/v5.1/config/initializers/backtrace_silencers.rb +0 -8
- data/spec/support/v5.1/config/initializers/filter_parameter_logging.rb +0 -5
- data/spec/support/v5.1/config/initializers/inflections.rb +0 -17
- data/spec/support/v5.1/config/initializers/mime_types.rb +0 -5
- data/spec/support/v5.1/config/initializers/sorbet_rails.rb +0 -3
- data/spec/support/v5.1/config/initializers/wrap_parameters.rb +0 -15
- data/spec/support/v5.1/config/routes.rb +0 -5
- data/spec/support/v5.1/config.ru +0 -5
- data/spec/support/v5.1/db/migrate/20190620000005_add_broom_to_wizard.rb +0 -6
- data/spec/support/v5.1/db/migrate/20190620000014_create_headmasters.rb +0 -9
- data/spec/support/v5.1/db/migrate/20190620000015_add_serialized_to_wizards.rb +0 -9
- data/spec/support/v5.1/db/seeds.rb +0 -8
- data/spec/support/v5.1/lib/assets/.keep +0 -0
- data/spec/support/v5.1/lib/mythical_rbi_plugin.rb +0 -16
- data/spec/support/v5.1/lib/tasks/.keep +0 -0
- data/spec/support/v5.1/log/.keep +0 -0
- data/spec/support/v5.1/package.json +0 -5
- data/spec/support/v5.1/public/robots.txt +0 -1
- data/spec/support/v5.1/sorbet_test_cases.rb +0 -409
- data/spec/support/v5.1/tmp/.keep +0 -0
- data/spec/support/v5.1/vendor/.keep +0 -0
- data/spec/test_data/v5.0/expected_active_record_base.rbi +0 -113
- data/spec/test_data/v5.0/expected_active_record_relation.rbi +0 -199
- data/spec/test_data/v5.0/expected_habtm_subjects.rbi +0 -660
- data/spec/test_data/v5.0/expected_habtm_wizards.rbi +0 -660
- data/spec/test_data/v5.0/expected_headmaster.rbi +0 -328
- data/spec/test_data/v5.0/expected_internal_metadata.rbi +0 -298
- data/spec/test_data/v5.0/expected_potion.rbi +0 -280
- data/spec/test_data/v5.0/expected_robe.rbi +0 -301
- data/spec/test_data/v5.0/expected_routes.rbi +0 -27
- data/spec/test_data/v5.0/expected_schema_migration.rbi +0 -271
- data/spec/test_data/v5.0/expected_school.rbi +0 -301
- data/spec/test_data/v5.0/expected_spell/habtm_spell_books.rbi +0 -319
- data/spec/test_data/v5.0/expected_spell.rbi +0 -292
- data/spec/test_data/v5.0/expected_spell_book/habtm_spell_books.rbi +0 -637
- data/spec/test_data/v5.0/expected_spell_book/habtm_spells.rbi +0 -319
- data/spec/test_data/v5.0/expected_spell_book.rbi +0 -415
- data/spec/test_data/v5.0/expected_squib.rbi +0 -832
- data/spec/test_data/v5.0/expected_subject/habtm_wizards.rbi +0 -319
- data/spec/test_data/v5.0/expected_subject.rbi +0 -292
- data/spec/test_data/v5.0/expected_wand.rbi +0 -497
- data/spec/test_data/v5.0/expected_wizard/habtm_subjects.rbi +0 -319
- data/spec/test_data/v5.0/expected_wizard.rbi +0 -908
- data/spec/test_data/v5.0/expected_wizard_wo_spellbook.rbi +0 -902
- data/spec/test_data/v5.1/expected_application_job.rbi +0 -20
- data/spec/test_data/v5.1/expected_application_mailer.rbi +0 -5
- data/spec/test_data/v5.1/expected_award_house_point_hourglasses.rbi +0 -20
- data/spec/test_data/v5.1/expected_custom_application_job.rbi +0 -21
- data/spec/test_data/v5.1/expected_custom_application_mailer.rbi +0 -6
- data/spec/test_data/v5.1/expected_custom_award_house_point_hourglasses.rbi +0 -21
- data/spec/test_data/v5.1/expected_custom_daily_prophet_mailer.rbi +0 -8
- data/spec/test_data/v5.1/expected_custom_hogwarts_acceptance_mailer.rbi +0 -21
- data/spec/test_data/v5.1/expected_daily_prophet_mailer.rbi +0 -7
- data/spec/test_data/v5.1/expected_helpers.rbi +0 -27
- data/spec/test_data/v5.1/expected_helpers_with_application_and_devise_helpers.rbi +0 -34
- data/spec/test_data/v5.1/expected_hogwarts_acceptance_mailer.rbi +0 -20
- data/spec/test_data/v5.1/expected_no_routes.rbi +0 -4
- data/spec/test_data/v5.1/expected_routes.rbi +0 -27
- data/spec/test_data/v5.1/expected_srb_tc_output.txt +0 -1
@@ -0,0 +1,203 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ../../..
|
3
|
+
specs:
|
4
|
+
sorbet-rails (0.7.32)
|
5
|
+
method_source (>= 0.9.2)
|
6
|
+
parlour (>= 4.0.1)
|
7
|
+
parser (>= 2.7)
|
8
|
+
sorbet-coerce (>= 0.2.6)
|
9
|
+
sorbet-runtime (>= 0.5.9892)
|
10
|
+
|
11
|
+
GEM
|
12
|
+
remote: https://rubygems.org/
|
13
|
+
specs:
|
14
|
+
actioncable (6.1.5)
|
15
|
+
actionpack (= 6.1.5)
|
16
|
+
activesupport (= 6.1.5)
|
17
|
+
nio4r (~> 2.0)
|
18
|
+
websocket-driver (>= 0.6.1)
|
19
|
+
actionmailbox (6.1.5)
|
20
|
+
actionpack (= 6.1.5)
|
21
|
+
activejob (= 6.1.5)
|
22
|
+
activerecord (= 6.1.5)
|
23
|
+
activestorage (= 6.1.5)
|
24
|
+
activesupport (= 6.1.5)
|
25
|
+
mail (>= 2.7.1)
|
26
|
+
actionmailer (6.1.5)
|
27
|
+
actionpack (= 6.1.5)
|
28
|
+
actionview (= 6.1.5)
|
29
|
+
activejob (= 6.1.5)
|
30
|
+
activesupport (= 6.1.5)
|
31
|
+
mail (~> 2.5, >= 2.5.4)
|
32
|
+
rails-dom-testing (~> 2.0)
|
33
|
+
actionpack (6.1.5)
|
34
|
+
actionview (= 6.1.5)
|
35
|
+
activesupport (= 6.1.5)
|
36
|
+
rack (~> 2.0, >= 2.0.9)
|
37
|
+
rack-test (>= 0.6.3)
|
38
|
+
rails-dom-testing (~> 2.0)
|
39
|
+
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
40
|
+
actiontext (6.1.5)
|
41
|
+
actionpack (= 6.1.5)
|
42
|
+
activerecord (= 6.1.5)
|
43
|
+
activestorage (= 6.1.5)
|
44
|
+
activesupport (= 6.1.5)
|
45
|
+
nokogiri (>= 1.8.5)
|
46
|
+
actionview (6.1.5)
|
47
|
+
activesupport (= 6.1.5)
|
48
|
+
builder (~> 3.1)
|
49
|
+
erubi (~> 1.4)
|
50
|
+
rails-dom-testing (~> 2.0)
|
51
|
+
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
52
|
+
activejob (6.1.5)
|
53
|
+
activesupport (= 6.1.5)
|
54
|
+
globalid (>= 0.3.6)
|
55
|
+
activemodel (6.1.5)
|
56
|
+
activesupport (= 6.1.5)
|
57
|
+
activerecord (6.1.5)
|
58
|
+
activemodel (= 6.1.5)
|
59
|
+
activesupport (= 6.1.5)
|
60
|
+
activestorage (6.1.5)
|
61
|
+
actionpack (= 6.1.5)
|
62
|
+
activejob (= 6.1.5)
|
63
|
+
activerecord (= 6.1.5)
|
64
|
+
activesupport (= 6.1.5)
|
65
|
+
marcel (~> 1.0)
|
66
|
+
mini_mime (>= 1.1.0)
|
67
|
+
activesupport (6.1.5)
|
68
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
69
|
+
i18n (>= 1.6, < 2)
|
70
|
+
minitest (>= 5.1)
|
71
|
+
tzinfo (~> 2.0)
|
72
|
+
zeitwerk (~> 2.3)
|
73
|
+
ast (2.4.2)
|
74
|
+
bindex (0.8.1)
|
75
|
+
builder (3.2.4)
|
76
|
+
byebug (11.1.3)
|
77
|
+
commander (4.6.0)
|
78
|
+
highline (~> 2.0.0)
|
79
|
+
concurrent-ruby (1.1.10)
|
80
|
+
crass (1.0.6)
|
81
|
+
erubi (1.10.0)
|
82
|
+
globalid (1.0.0)
|
83
|
+
activesupport (>= 5.0)
|
84
|
+
highline (2.0.3)
|
85
|
+
i18n (1.10.0)
|
86
|
+
concurrent-ruby (~> 1.0)
|
87
|
+
jbuilder (2.11.5)
|
88
|
+
actionview (>= 5.0.0)
|
89
|
+
activesupport (>= 5.0.0)
|
90
|
+
loofah (2.16.0)
|
91
|
+
crass (~> 1.0.2)
|
92
|
+
nokogiri (>= 1.5.9)
|
93
|
+
mail (2.7.1)
|
94
|
+
mini_mime (>= 0.1.1)
|
95
|
+
marcel (1.0.2)
|
96
|
+
method_source (1.0.0)
|
97
|
+
mini_mime (1.1.2)
|
98
|
+
mini_portile2 (2.8.0)
|
99
|
+
minitest (5.15.0)
|
100
|
+
nio4r (2.5.8)
|
101
|
+
nokogiri (1.13.4)
|
102
|
+
mini_portile2 (~> 2.8.0)
|
103
|
+
racc (~> 1.4)
|
104
|
+
nokogiri (1.13.4-x86_64-darwin)
|
105
|
+
racc (~> 1.4)
|
106
|
+
parlour (7.0.0)
|
107
|
+
commander (~> 4.5)
|
108
|
+
parser
|
109
|
+
rainbow (~> 3.0)
|
110
|
+
sorbet-runtime (>= 0.5)
|
111
|
+
parser (3.1.2.0)
|
112
|
+
ast (~> 2.4.1)
|
113
|
+
polyfill (1.9.0)
|
114
|
+
puma (5.6.4)
|
115
|
+
nio4r (~> 2.0)
|
116
|
+
racc (1.6.0)
|
117
|
+
rack (2.2.3)
|
118
|
+
rack-test (1.1.0)
|
119
|
+
rack (>= 1.0, < 3)
|
120
|
+
rails (6.1.5)
|
121
|
+
actioncable (= 6.1.5)
|
122
|
+
actionmailbox (= 6.1.5)
|
123
|
+
actionmailer (= 6.1.5)
|
124
|
+
actionpack (= 6.1.5)
|
125
|
+
actiontext (= 6.1.5)
|
126
|
+
actionview (= 6.1.5)
|
127
|
+
activejob (= 6.1.5)
|
128
|
+
activemodel (= 6.1.5)
|
129
|
+
activerecord (= 6.1.5)
|
130
|
+
activestorage (= 6.1.5)
|
131
|
+
activesupport (= 6.1.5)
|
132
|
+
bundler (>= 1.15.0)
|
133
|
+
railties (= 6.1.5)
|
134
|
+
sprockets-rails (>= 2.0.0)
|
135
|
+
rails-dom-testing (2.0.3)
|
136
|
+
activesupport (>= 4.2.0)
|
137
|
+
nokogiri (>= 1.6)
|
138
|
+
rails-html-sanitizer (1.4.2)
|
139
|
+
loofah (~> 2.3)
|
140
|
+
railties (6.1.5)
|
141
|
+
actionpack (= 6.1.5)
|
142
|
+
activesupport (= 6.1.5)
|
143
|
+
method_source
|
144
|
+
rake (>= 12.2)
|
145
|
+
thor (~> 1.0)
|
146
|
+
rainbow (3.1.1)
|
147
|
+
rake (13.0.6)
|
148
|
+
safe_type (1.1.1)
|
149
|
+
sorbet (0.5.9892)
|
150
|
+
sorbet-static (= 0.5.9892)
|
151
|
+
sorbet-coerce (0.5.0)
|
152
|
+
polyfill (~> 1.8)
|
153
|
+
safe_type (~> 1.1, >= 1.1.1)
|
154
|
+
sorbet-runtime (>= 0.4.4704)
|
155
|
+
sorbet-runtime (0.5.9892)
|
156
|
+
sorbet-static (0.5.9892-universal-darwin-14)
|
157
|
+
sorbet-static (0.5.9892-universal-darwin-15)
|
158
|
+
sorbet-static (0.5.9892-universal-darwin-16)
|
159
|
+
sorbet-static (0.5.9892-universal-darwin-17)
|
160
|
+
sorbet-static (0.5.9892-universal-darwin-18)
|
161
|
+
sorbet-static (0.5.9892-universal-darwin-19)
|
162
|
+
sorbet-static (0.5.9892-universal-darwin-20)
|
163
|
+
sorbet-static (0.5.9892-universal-darwin-21)
|
164
|
+
sorbet-static (0.5.9892-x86_64-linux)
|
165
|
+
sprockets (4.0.3)
|
166
|
+
concurrent-ruby (~> 1.0)
|
167
|
+
rack (> 1, < 3)
|
168
|
+
sprockets-rails (3.4.2)
|
169
|
+
actionpack (>= 5.2)
|
170
|
+
activesupport (>= 5.2)
|
171
|
+
sprockets (>= 3.0.0)
|
172
|
+
sqlite3 (1.4.2)
|
173
|
+
thor (1.2.1)
|
174
|
+
tzinfo (2.0.4)
|
175
|
+
concurrent-ruby (~> 1.0)
|
176
|
+
web-console (4.2.0)
|
177
|
+
actionview (>= 6.0.0)
|
178
|
+
activemodel (>= 6.0.0)
|
179
|
+
bindex (>= 0.4.0)
|
180
|
+
railties (>= 6.0.0)
|
181
|
+
websocket-driver (0.7.5)
|
182
|
+
websocket-extensions (>= 0.1.0)
|
183
|
+
websocket-extensions (0.1.5)
|
184
|
+
zeitwerk (2.5.4)
|
185
|
+
|
186
|
+
PLATFORMS
|
187
|
+
ruby
|
188
|
+
x86_64-darwin-19
|
189
|
+
|
190
|
+
DEPENDENCIES
|
191
|
+
byebug
|
192
|
+
jbuilder (~> 2.7)
|
193
|
+
puma (~> 5.0)
|
194
|
+
rails (~> 6.1.4)
|
195
|
+
sorbet
|
196
|
+
sorbet-rails!
|
197
|
+
sorbet-runtime
|
198
|
+
sqlite3 (~> 1.4)
|
199
|
+
tzinfo-data
|
200
|
+
web-console (>= 4.1.0)
|
201
|
+
|
202
|
+
BUNDLED WITH
|
203
|
+
2.2.32
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# typed: strong
|
2
|
+
class ApplicationJob < ActiveJob::Base
|
3
|
+
# Automatically retry jobs that encountered a deadlock
|
4
|
+
# retry_on ActiveRecord::Deadlocked
|
5
|
+
|
6
|
+
# Most jobs are safe to ignore if the underlying records are no longer available
|
7
|
+
# discard_on ActiveJob::DeserializationError
|
8
|
+
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,114 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
#
|
5
|
+
# This file was generated by Bundler.
|
6
|
+
#
|
7
|
+
# The application 'bundle' is installed as part of a gem, and
|
8
|
+
# this file is here to facilitate running it.
|
9
|
+
#
|
10
|
+
|
11
|
+
require "rubygems"
|
12
|
+
|
13
|
+
m = Module.new do
|
14
|
+
module_function
|
15
|
+
|
16
|
+
def invoked_as_script?
|
17
|
+
File.expand_path($0) == File.expand_path(__FILE__)
|
18
|
+
end
|
19
|
+
|
20
|
+
def env_var_version
|
21
|
+
ENV["BUNDLER_VERSION"]
|
22
|
+
end
|
23
|
+
|
24
|
+
def cli_arg_version
|
25
|
+
return unless invoked_as_script? # don't want to hijack other binstubs
|
26
|
+
return unless "update".start_with?(ARGV.first || " ") # must be running `bundle update`
|
27
|
+
bundler_version = nil
|
28
|
+
update_index = nil
|
29
|
+
ARGV.each_with_index do |a, i|
|
30
|
+
if update_index && update_index.succ == i && a =~ Gem::Version::ANCHORED_VERSION_PATTERN
|
31
|
+
bundler_version = a
|
32
|
+
end
|
33
|
+
next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/
|
34
|
+
bundler_version = $1
|
35
|
+
update_index = i
|
36
|
+
end
|
37
|
+
bundler_version
|
38
|
+
end
|
39
|
+
|
40
|
+
def gemfile
|
41
|
+
gemfile = ENV["BUNDLE_GEMFILE"]
|
42
|
+
return gemfile if gemfile && !gemfile.empty?
|
43
|
+
|
44
|
+
File.expand_path("../../Gemfile", __FILE__)
|
45
|
+
end
|
46
|
+
|
47
|
+
def lockfile
|
48
|
+
lockfile =
|
49
|
+
case File.basename(gemfile)
|
50
|
+
when "gems.rb" then gemfile.sub(/\.rb$/, gemfile)
|
51
|
+
else "#{gemfile}.lock"
|
52
|
+
end
|
53
|
+
File.expand_path(lockfile)
|
54
|
+
end
|
55
|
+
|
56
|
+
def lockfile_version
|
57
|
+
return unless File.file?(lockfile)
|
58
|
+
lockfile_contents = File.read(lockfile)
|
59
|
+
return unless lockfile_contents =~ /\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/
|
60
|
+
Regexp.last_match(1)
|
61
|
+
end
|
62
|
+
|
63
|
+
def bundler_version
|
64
|
+
@bundler_version ||=
|
65
|
+
env_var_version || cli_arg_version ||
|
66
|
+
lockfile_version
|
67
|
+
end
|
68
|
+
|
69
|
+
def bundler_requirement
|
70
|
+
return "#{Gem::Requirement.default}.a" unless bundler_version
|
71
|
+
|
72
|
+
bundler_gem_version = Gem::Version.new(bundler_version)
|
73
|
+
|
74
|
+
requirement = bundler_gem_version.approximate_recommendation
|
75
|
+
|
76
|
+
return requirement unless Gem::Version.new(Gem::VERSION) < Gem::Version.new("2.7.0")
|
77
|
+
|
78
|
+
requirement += ".a" if bundler_gem_version.prerelease?
|
79
|
+
|
80
|
+
requirement
|
81
|
+
end
|
82
|
+
|
83
|
+
def load_bundler!
|
84
|
+
ENV["BUNDLE_GEMFILE"] ||= gemfile
|
85
|
+
|
86
|
+
activate_bundler
|
87
|
+
end
|
88
|
+
|
89
|
+
def activate_bundler
|
90
|
+
gem_error = activation_error_handling do
|
91
|
+
gem "bundler", bundler_requirement
|
92
|
+
end
|
93
|
+
return if gem_error.nil?
|
94
|
+
require_error = activation_error_handling do
|
95
|
+
require "bundler/version"
|
96
|
+
end
|
97
|
+
return if require_error.nil? && Gem::Requirement.new(bundler_requirement).satisfied_by?(Gem::Version.new(Bundler::VERSION))
|
98
|
+
warn "Activating bundler (#{bundler_requirement}) failed:\n#{gem_error.message}\n\nTo install the version of bundler this project requires, run `gem install bundler -v '#{bundler_requirement}'`"
|
99
|
+
exit 42
|
100
|
+
end
|
101
|
+
|
102
|
+
def activation_error_handling
|
103
|
+
yield
|
104
|
+
nil
|
105
|
+
rescue StandardError, LoadError => e
|
106
|
+
e
|
107
|
+
end
|
108
|
+
end
|
109
|
+
|
110
|
+
m.load_bundler!
|
111
|
+
|
112
|
+
if m.invoked_as_script?
|
113
|
+
load Gem.bin_path("bundler", "bundle")
|
114
|
+
end
|
File without changes
|
File without changes
|
@@ -1,34 +1,29 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
require 'pathname'
|
3
2
|
require 'fileutils'
|
4
|
-
include FileUtils
|
5
3
|
|
6
4
|
# path to your application root.
|
7
|
-
APP_ROOT =
|
5
|
+
APP_ROOT = File.expand_path('..', __dir__)
|
8
6
|
|
9
7
|
def system!(*args)
|
10
8
|
system(*args) || abort("\n== Command #{args} failed ==")
|
11
9
|
end
|
12
10
|
|
13
|
-
chdir APP_ROOT do
|
14
|
-
# This script is a
|
11
|
+
FileUtils.chdir APP_ROOT do
|
12
|
+
# This script is a way to setup or update your development environment automatically.
|
13
|
+
# This script is idempotent, so that you can run it at anytime and get an expectable outcome.
|
15
14
|
# Add necessary setup steps to this file.
|
16
15
|
|
17
16
|
puts '== Installing dependencies =='
|
18
17
|
system! 'gem install bundler --conservative'
|
19
18
|
system('bundle check') || system!('bundle install')
|
20
19
|
|
21
|
-
# Install JavaScript dependencies if using Yarn
|
22
|
-
# system('bin/yarn')
|
23
|
-
|
24
|
-
|
25
20
|
# puts "\n== Copying sample files =="
|
26
21
|
# unless File.exist?('config/database.yml')
|
27
|
-
# cp 'config/database.yml.sample', 'config/database.yml'
|
22
|
+
# FileUtils.cp 'config/database.yml.sample', 'config/database.yml'
|
28
23
|
# end
|
29
24
|
|
30
25
|
puts "\n== Preparing database =="
|
31
|
-
system! 'bin/rails db:
|
26
|
+
system! 'bin/rails db:prepare'
|
32
27
|
|
33
28
|
puts "\n== Removing old logs and tempfiles =="
|
34
29
|
system! 'bin/rails log:clear tmp:clear'
|
@@ -6,8 +6,11 @@ require "rails"
|
|
6
6
|
require "active_model/railtie"
|
7
7
|
require "active_job/railtie"
|
8
8
|
require "active_record/railtie"
|
9
|
+
require "active_storage/engine"
|
9
10
|
require "action_controller/railtie"
|
10
11
|
require "action_mailer/railtie"
|
12
|
+
require "action_mailbox/engine"
|
13
|
+
require "action_text/engine"
|
11
14
|
require "action_view/railtie"
|
12
15
|
# require "action_cable/engine"
|
13
16
|
# require "sprockets/railtie"
|
@@ -17,14 +20,15 @@ require "action_view/railtie"
|
|
17
20
|
# you've limited to :test, :development, or :production.
|
18
21
|
Bundler.require(*Rails.groups)
|
19
22
|
|
20
|
-
module
|
23
|
+
module V60
|
21
24
|
class Application < Rails::Application
|
22
25
|
# Initialize configuration defaults for originally generated Rails version.
|
23
|
-
config.load_defaults
|
26
|
+
config.load_defaults 6.0
|
24
27
|
|
25
28
|
# Settings in config/environments/* take precedence over those specified here.
|
26
|
-
# Application configuration
|
27
|
-
# -- all .rb files in that directory are automatically loaded
|
29
|
+
# Application configuration can go into files in config/initializers
|
30
|
+
# -- all .rb files in that directory are automatically loaded after loading
|
31
|
+
# the framework and any gems in your application.
|
28
32
|
|
29
33
|
# Don't generate system test files.
|
30
34
|
config.generators.system_tests = nil
|
File without changes
|
File without changes
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# typed:
|
1
|
+
# typed: strict
|
2
2
|
Rails.application.configure do
|
3
3
|
# Settings specified here will take precedence over those in config/application.rb.
|
4
4
|
|
@@ -14,12 +14,14 @@ Rails.application.configure do
|
|
14
14
|
config.consider_all_requests_local = true
|
15
15
|
|
16
16
|
# Enable/disable caching. By default caching is disabled.
|
17
|
-
|
17
|
+
# Run rails dev:cache to toggle caching.
|
18
|
+
if Rails.root.join('tmp', 'caching-dev.txt').exist?
|
18
19
|
config.action_controller.perform_caching = true
|
20
|
+
config.action_controller.enable_fragment_cache_logging = true
|
19
21
|
|
20
22
|
config.cache_store = :memory_store
|
21
23
|
config.public_file_server.headers = {
|
22
|
-
'Cache-Control' => "public, max-age=#{2.days.
|
24
|
+
'Cache-Control' => "public, max-age=#{2.days.to_i}"
|
23
25
|
}
|
24
26
|
else
|
25
27
|
config.action_controller.perform_caching = false
|
@@ -27,6 +29,9 @@ Rails.application.configure do
|
|
27
29
|
config.cache_store = :null_store
|
28
30
|
end
|
29
31
|
|
32
|
+
# Store uploaded files on the local file system (see config/storage.yml for options).
|
33
|
+
config.active_storage.service = :local
|
34
|
+
|
30
35
|
# Don't care if the mailer can't send.
|
31
36
|
config.action_mailer.raise_delivery_errors = false
|
32
37
|
|
@@ -38,8 +43,11 @@ Rails.application.configure do
|
|
38
43
|
# Raise an error on page load if there are pending migrations.
|
39
44
|
config.active_record.migration_error = :page_load
|
40
45
|
|
46
|
+
# Highlight code that triggered database queries in logs.
|
47
|
+
config.active_record.verbose_query_logs = true
|
48
|
+
|
41
49
|
|
42
|
-
# Raises error for missing translations
|
50
|
+
# Raises error for missing translations.
|
43
51
|
# config.action_view.raise_on_missing_translations = true
|
44
52
|
|
45
53
|
# Use an evented file watcher to asynchronously detect changes in source code,
|
@@ -15,16 +15,14 @@ Rails.application.configure do
|
|
15
15
|
config.consider_all_requests_local = false
|
16
16
|
config.action_controller.perform_caching = true
|
17
17
|
|
18
|
-
#
|
19
|
-
#
|
20
|
-
#
|
21
|
-
config.read_encrypted_secrets = true
|
18
|
+
# Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"]
|
19
|
+
# or in config/master.key. This key is used to decrypt credentials (and other encrypted files).
|
20
|
+
# config.require_master_key = true
|
22
21
|
|
23
22
|
# Disable serving static files from the `/public` folder by default since
|
24
23
|
# Apache or NGINX already handles this.
|
25
24
|
config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
|
26
25
|
|
27
|
-
|
28
26
|
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
29
27
|
# config.action_controller.asset_host = 'http://assets.example.com'
|
30
28
|
|
@@ -32,6 +30,8 @@ Rails.application.configure do
|
|
32
30
|
# config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
|
33
31
|
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
|
34
32
|
|
33
|
+
# Store uploaded files on the local file system (see config/storage.yml for options).
|
34
|
+
config.active_storage.service = :local
|
35
35
|
|
36
36
|
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
37
37
|
# config.force_ssl = true
|
@@ -46,9 +46,10 @@ Rails.application.configure do
|
|
46
46
|
# Use a different cache store in production.
|
47
47
|
# config.cache_store = :mem_cache_store
|
48
48
|
|
49
|
-
# Use a real queuing backend for Active Job (and separate queues per environment)
|
49
|
+
# Use a real queuing backend for Active Job (and separate queues per environment).
|
50
50
|
# config.active_job.queue_adapter = :resque
|
51
|
-
# config.active_job.queue_name_prefix = "
|
51
|
+
# config.active_job.queue_name_prefix = "v6_0_production"
|
52
|
+
|
52
53
|
config.action_mailer.perform_caching = false
|
53
54
|
|
54
55
|
# Ignore bad email addresses and do not raise email delivery errors.
|
@@ -77,4 +78,25 @@ Rails.application.configure do
|
|
77
78
|
|
78
79
|
# Do not dump schema after migrations.
|
79
80
|
config.active_record.dump_schema_after_migration = false
|
81
|
+
|
82
|
+
# Inserts middleware to perform automatic connection switching.
|
83
|
+
# The `database_selector` hash is used to pass options to the DatabaseSelector
|
84
|
+
# middleware. The `delay` is used to determine how long to wait after a write
|
85
|
+
# to send a subsequent read to the primary.
|
86
|
+
#
|
87
|
+
# The `database_resolver` class is used by the middleware to determine which
|
88
|
+
# database is appropriate to use based on the time delay.
|
89
|
+
#
|
90
|
+
# The `database_resolver_context` class is used by the middleware to set
|
91
|
+
# timestamps for the last write to the primary. The resolver uses the context
|
92
|
+
# class timestamps to determine how long to wait before reading from the
|
93
|
+
# replica.
|
94
|
+
#
|
95
|
+
# By default Rails will store a last write timestamp in the session. The
|
96
|
+
# DatabaseSelector middleware is designed as such you can define your own
|
97
|
+
# strategy for connection switching and pass that into the middleware through
|
98
|
+
# these configuration options.
|
99
|
+
# config.active_record.database_selector = { delay: 2.seconds }
|
100
|
+
# config.active_record.database_resolver = ActiveRecord::Middleware::DatabaseSelector::Resolver
|
101
|
+
# config.active_record.database_resolver_context = ActiveRecord::Middleware::DatabaseSelector::Resolver::Session
|
80
102
|
end
|