なるようになるブログ

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

rails commit log流し読み(2019/08/03)

2019/08/03分のコミットです。

CHANGELOGへの追加はありませんでした。


Add ability to unset preventing writes

activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rbactiverecord/lib/active_record/middleware/database_selector/resolver.rbの修正です。

while_preventing_writesメソッドに引数を指定出来るようにして、preventing writesの設定を解除出来るようにしています。

元々はpreventing writesの状態は解除する事が出来なかったのですが、それだとprimaryへのread後にprimaryへのwriteが発生する場合に処理を行えない、という問題があった為上記変更を行っています。


1.hour needs core_ext to work

railties/lib/rails/generators/rails/app/templates/config/environments/test.rb.ttの修正です。

active_support/core_ext/integer/timeのrequireを追加しています。config.public_file_server.headersの指定に1.hourを使用している為。


typo in word compatibily - autoloading and reloading constants guide

rails guideのAutoloading and Reloading Constants (Zeitwerk Mode)の修正です。

compatibilitycompatibilyにタイポしていたのを修正しています。


Address DEPRECATED: Use assert_nil if expecting nil

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

assert_equalメソッドのexpected引数にnilを指定していたテストを、assert_nilを使用するよう修正しています。Minitest 5.10からdeprecateになっている為。