Upgrade to Rails 7.0 and apply new framework defaults

* Remove `send_stream` method pulled in before upgrading Rails
* Remove spring, it is no longer included by default for new apps
* Remove deprecated options from environments
* Remove old asset paths and workarounds no longer needed
* Remove unnecessary `OAUTH_10_SUPPORT` const, LTI still uses OAuth 1.0
* Dump schema with new defaults (and specify precision for timestamps where needed)
This commit is contained in:
dependabot[bot]
2022-12-03 23:52:33 +00:00
committed by Sebastian Serth
parent ffe96d9223
commit 90b30e2bf7
19 changed files with 228 additions and 241 deletions

View File

@ -59,21 +59,4 @@ class LiveStreamsController < ApplicationController
redirect_back(fallback_location: redirect_fallback, alert: t('exercises.download_file_tree.gone'))
end
end
# TODO: Taken from Rails 7, remove when upgrading
# rubocop:disable all
def send_stream(filename:, disposition: "attachment", type: nil)
response.headers["Content-Type"] =
(type.is_a?(Symbol) ? Mime[type].to_s : type) ||
Mime::Type.lookup_by_extension(File.extname(filename).downcase.delete(".")) ||
"application/octet-stream"
response.headers["Content-Disposition"] =
ActionDispatch::Http::ContentDisposition.format(disposition: disposition, filename: filename)
yield response.stream
ensure
response.stream.close
end
# rubocop:enable all
end