なるようになるブログ

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

rails commit log流し読み(2019/10/31)

2019/10/31分のコミットです。

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

actionmailer/CHANGELOG.md


Avoid using require_dependency is Zeitwerk is enabled

activestorage/app/models/active_storage/blob.rbの修正です。

Zeitwerkが使用されている場合、blobの各ファイルをロードするのにrequire_dependencyを使用しないよう修正しています。

Zeitwerkを使用していてconfig.add_autoload_paths_to_load_pathを無効化していた場合require_dependencyだとロード処理に失敗する、かつ、元々あったblobファイルのロード処理はclassic loaderの為の処理で、Zeitwerkを使用している場合は不要な為。


Correctly deprecate where.not working as NOR for relations:

activerecord/lib/active_record/relation/query_methods.rbの修正です。

relationをqueryにwhere.not(relation: { })のように指定した場合に、where.notがNORとして機能しなくなる旨のdeprecateメッセージが正しく表示されないバグがあったのを修正しています。


Improve deprecation message for nested where.not condition

activerecord/lib/active_record/relation/query_methods.rbの修正です。

where.notがNORとして機能しなくなる旨表示するdeprecateメッセージで、where.notの引数がネストしていた場合の修正方法についての詳細を表示するよう修正しています。


Fix random CI failure due to non-deterministic sorting order

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

assertionで値を比較する際に、値をidでsortしてからチェックするよう修正しています。 sortを指定しないと結果が不定になる為。


Fix ActionMailer assertions don't work for parameterized mail with legacy delivery job

actionmailer/lib/action_mailer/test_helper.rbの修正です。

Action Mailerのassetionsが古いdeplivery jobを使用している場合に正しく動作しないバグがあったのを修正しています。


Enabled GitHub Actions to run the latest RuboCop 0.76.0

RuboCopのバージョンを0.76.0に更新、及び、RuboCopの実行時にCode Climateを使用していたのを、GitHub Actionsを使用するよう修正しています。

Code ClimateだとRuboCopの最新バージョンが使用出来るようになるまで時間が掛かる、masterへの直pushだとチェックが実行されない、等の問題があった為。


Merge pull request #37602 from Edouard-chin/ec-fix-activejob-integration-test

activejob/test/helper.rbの修正です。

activejob integration test実行時にAJ_ADAPTERが設定されていない場合、inline adapterでテストを実行するよう修正しています。