なるようになるブログ

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

rails commit log流し読み(2025/02/06)

2025/02/06分のコミットです。

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

railties/CHANGELOG.md

activerecord/CHANGELOG.md


Handle connection pool errors in Redis and Memcached stores

activesupport/lib/active_support/cache/mem_cache_store.rbactivesupport/lib/active_support/cache/redis_cache_store.rbの修正です。

cache storeにRedis、Memcached storeを使用している場合に、ConnectionPool::TimeoutErrorなどのconnection pool関係のエラーが発生した場合、そのエラーがそのままraiseされていたのを、cache missとして扱い、エラーはlogで報告するが処理は継続(キャッシュから取得出来なかった場合の処理を継続)するよう修正しています。


Rate limit password resets in auth generator

railties/lib/rails/generators/rails/authentication/templates/app/controllers/passwords_controller.rb.ttの修正です。

authentication generatorが生成するpasswordリセット処理にrate limit指定をするよう修正しています。password reset form経由で無限にemailを送られてしまうのを防ぐ為。


Support joins in update_all for Postgresql and SQlite

Active Recordの修正です。

Postgresql及びSQLite3 adapterで、joins + update_allupdate_alljoinsで指定したテーブルのカラム名を指定する(e.g. Comment.joins(:post).update_all("title = posts.title"))とエラーになるSQLが生成されていたのを、正常に実行出来るよう修正しています。MySQL adapterでは長らくサポートされていた挙動であり、Postgresq及びSQLite 3 adapterでもMySQL adapterと同様に動作するよう修正しています。


Skip test if upsert/insert-duplicate not supported by database adapter

activerecord/test/cases/insert_all_test.rbの修正です。

upsert/insert-duplicateがサポートしていないadapterでは、それらを使用するテストをスキップするよう修正しています。


[docs] Use 'raises' to describe behaviour in CollectionProxy#find

activerecord/lib/active_record/associations/collection_proxy.rbのdocの修正です。

doc内のActiveRecord::RecordNotFoundをraiseする挙動について説明している箇所を、Returns ActiveRecord::RecordNotFoundからRaises ActiveRecord::RecordNotFoundに修正しています。


Go back to released version of net-smtp

Gemfileの修正です。

rubygemsにリリースされているnet-smtpを使用するよう修正しています。エラーになる問題は最新のバージョンでは解消済みの為。


Update webmock to fix net-http deprecation warning

Gemfile.lockの修正です。

webmock gemを最新バージョンに更新しています。net-httpに関するdeprecateメッセージが表示されないようにする為。


Fix example :blank error message in i18n to match default error [ci skip]

rails guideのRails Internationalization (I18n) APIの修正です。

:blank validationでエラーになった場合のデフォルトのエラーメッセージの値が、実際の値と異なっていたのを修正しています。