なるようになるブログ

読書感想文かrailsについてかrubyについてか

rails commit log流し読み(2023/08/05)

2023/08/05分のコミットです。

CHANGELOGにのったコミットは以下の通りです。

actionpack/CHANGELOG.md


Fix NoMethodError when request Content-Type is blank.

actionpack/lib/action_dispatch/http/mime_type.rbの修正です。

requestのContent-Type headerが空の場合に、mimeの取得処理でNoMethodErrorがraiseしてしまうバグがあったのを修正しています。


Rename fixture_file_upload method to file_fixture_upload

actionpack/lib/action_dispatch/testing/test_process.rbの修正です。

fixture_file_uploadfile_fixture_uploadにリネームしています。file fixtureを参照するメソッド名がfile_fixtureになっている、pathを設定するconfig名もfile_fixture_pathになっていることから、file_fixtureから始まる名前の方が一貫性があるのでは、という事で変更されています。互換性の為に古いメソッドも使えるままになっています。


Action Mailer Preview empty states

railtiesの修正です。

mailerがある、かつ、そのmailerに対するpreviewが1つも無い状態で、/rails/mailersにアクセスした場合に空のbodyタグを返していたのを、previewが1つも無い状態である旨メッセージを表示するよう修正しています。


Make sure nested base errors are translatable

activemodel/lib/active_model/error.rbの修正です。

errorのattributeにbaseが含まれている場合に、エラーメッセージのtranslation処理でそのbaseが無視されてしまっていたのを修正しています。


Merge pull request #48883 from zzak/welcome-logo-overflow-bug

railties/lib/rails/templates/rails/welcome/index.html.erbの修正です。

welcome pageのlogo用のcssからoverflow:hiddenを削除しています。この指定があるとSafariでborderが正しく表示されなくなってしまう為。


Link to the API and let the documentation generator point to edge

rails guideのTesting Rails Applicationsの修正です。

API docのリンク先がedgeのdocになっていたのを修正しています。


Merge pull request #48718 from alexandreruban/mirror-job

activestorage/app/models/active_storage/blob.rbactivestorage/lib/active_storage/service/mirror_service.rbの修正です。

Active Storageのmirror upload処理がinlineで行われてしまってしたのを、非同期のjob処理で行うよう修正しています。


Allow setting number of parallel workers to 1

activesupport/lib/active_support/test_case.rbactivesupport/lib/active_support/testing/parallelize_executor.rbの修正です。

テストをparallelで実行する為のworkerの数の指定に、1を指定出来るよう修正しています。parallelizationが有効になっているがparallelに実行出来ないテストファイルがある場合に、強制的にworkerを1に出来るようにする為。


Set the variable to false instead of checking if it is defined

activesupport/lib/active_support/testing/parallelize_executor.rbの修正です。

クラス内で使用しているインスタンス変数の初期値の設定を、クラスの初期化時に行うよう修正しています。


Don't run memcache tests in parallel

activesupport/test/cache/stores/mem_cache_store_test.rbの修正です。

memcacheのテストをparallelに実行しないよう修正しています。テストの後処理でcacheのclear処理を行っており、parallelに実行するとランダムにfailしてしまう為。


Don't pring parallelization info when running in a single process

activesupport/lib/active_support/testing/parallelize_executor.rbの修正です。

workerが1つしか使用されていない場合は、不要なparallelizationに関するログを出力しないよう修正しています。


Update yarn.lock

yarn.lockの修正です。

yarn.lockを最新の状態に更新しています。