]> cat aescling's git repositories - mastodon.git/commit
Update Mastodon to Rails 6.1 (#15910)
authorClaire <claire.github-309c@sitedethib.com>
Wed, 24 Mar 2021 09:44:31 +0000 (10:44 +0100)
committerGitHub <noreply@github.com>
Wed, 24 Mar 2021 09:44:31 +0000 (10:44 +0100)
commitcbd0ee1d07c0d48e4ed14bd446cd23d334e76da8
treeb3bbd59f6589fefc7f88f55117951f62b5771f3d
parent82556834cf816030eac0d3f962028cb8dafac2aa
Update Mastodon to Rails 6.1 (#15910)

* Update devise-two-factor to unreleased fork for Rails 6 support

Update tests to match new `rotp` version.

* Update nsa gem to unreleased fork for Rails 6 support

* Update rails to 6.1.3 and rails-i18n to 6.0

* Update to unreleased fork of pluck_each for Ruby 6 support

* Run "rails app:update"

* Add missing ActiveStorage config file

* Use config.ssl_options instead of removed ApplicationController#force_ssl

Disabled force_ssl-related tests as they do not seem to be easily testable
anymore.

* Fix nonce directives by removing Rails 5 specific monkey-patching

* Fix fixture_file_upload deprecation warning

* Fix yield-based test failing with Rails 6

* Use Rails 6's index_with when possible

* Use ActiveRecord::Cache::Store#delete_multi from Rails 6

This will yield better performances when deleting an account

* Disable Rails 6.1's automatic preload link headers

Since Rails 6.1, ActionView adds preload links for javascript files
in the Links header per default.

In our case, that will bloat headers too much and potentially cause
issues with reverse proxies. Furhermore, we don't need those links,
as we already output them as HTML link tags.

* Switch to Rails 6.0 default config

* Switch to Rails 6.1 default config

* Do not include autoload paths in the load path
29 files changed:
Gemfile
Gemfile.lock
app/controllers/application_controller.rb
app/lib/delivery_failure_tracker.rb
app/lib/feed_manager.rb
app/lib/settings/scoped_settings.rb
app/models/concerns/account_interactions.rb
app/models/report.rb
app/services/delete_account_service.rb
app/services/import_service.rb
bin/setup
bin/yarn
config/application.rb
config/environments/production.rb
config/initializers/application_controller_renderer.rb
config/initializers/backtrace_silencers.rb
config/initializers/content_security_policy.rb
config/initializers/permissions_policy.rb [new file with mode: 0644]
config/initializers/preload_link_headers.rb [new file with mode: 0644]
config/storage.yml [new file with mode: 0644]
lib/tasks/emojis.rake
spec/controllers/api/v1/accounts/credentials_controller_spec.rb
spec/controllers/api/v1/media_controller_spec.rb
spec/controllers/application_controller_spec.rb
spec/controllers/settings/imports_controller_spec.rb
spec/controllers/settings/profiles_controller_spec.rb
spec/controllers/settings/two_factor_authentication/confirmations_controller_spec.rb
spec/models/setting_spec.rb
spec/models/user_spec.rb