2017/12/08分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
Add headless firefox driver to System Tests
actionpack/lib/action_dispatch/system_test_case.rb
、
actionpack/lib/action_dispatch/system_testing/driver.rb
の修正です。
System Testsにheadless firefoxのサポートを追加しています。
driven_by
にheadless_firefox
を指定(e.g. driven_by :selenium, using: :headless_firefox
)すれば使用出来るようになっています。
Fix scope_for_create
to do not lose polymorphic associations
activerecord/lib/active_record/relation/where_clause.rb
の修正です。
polymorphic associationをcreateするした際に、scopeで指定したpolymorphicの指定が失われしまうバグがあったのを修正しています。
Fix customizing Content-Type via GCS service URLs
activestorage/lib/active_storage/service/gcs_service.rb
の修正です。
GCS serviceでファイルをアップロードする際に、明示的にcontent typeにnilを指定するよう修正しています。
- bucket.create_file(io, key, md5: checksum) + # The official GCS client library doesn't allow us to create a file with no Content-Type metadata. + # We need the file we create to have no Content-Type so we can control it via the response-content-type + # param in signed URLs. Workaround: let the GCS client create the file with an inferred + # Content-Type (usually "application/octet-stream") then clear it. + bucket.create_file(io, key, md5: checksum).update do |file| + file.content_type = nil + end
GCS client libraryはデフォルトでcontent typeを設定するようになっているのですが、それが設定された状態だと、本来指定したいcontent type(signed URLsのparamに指定したresponse-content-type)が指定されない為、デフォルトの値がclearする事で対処した、との事です。
Merge pull request #30780 from JackMc/fix-chrome-referrer-invalidauthenticitytoken
actionpack/lib/action_controller/metal/request_forgery_protection.rb
の修正です。
authenticity tokenのチェックの際に、request originがnull
の場合、その旨エラーメッセージを返すよう修正しています。
Chromeが、referrer policy headerにno-referrer
が指定されている場合にnull
を返すようにした為、それがわかるよう明示的なエラーメッセージを返すようにしたとの事です。
SQLite: Fix copy_table
with composite primary keys
activerecord/lib/active_record/connection_adapters/sqlite3_adapter.rb
の修正です。
DBにsqliteを使用している場合にprimary keyにid以外のtypeを指定しているtableに対してchange_table
を実行するとエラーになるバグを対応した、Merge pull request #31327 from aellispierce/custom-id-change-table-sqliteで、primary keyがcomposite primary keyだった場合の対応が含まれていなかったので、追加で対応しています。