なるようになるブログ

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

rails commit log流し読み(2022/10/25)

2022/10/25分のコミットです。

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

activesupport/CHANGELOG.md


Apply config to Rails.application.deprecators

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

ActiveSupport::Deprecationに関する、config.active_support.report_deprecations等のconfigの値をデフォルトでRails.application.deprecatorsに反映するよう修正しています。


Merge pull request #46251 from jonathanhefner/fix-time-change-and-advance-around-end-of-dst

activesupport/lib/active_support/core_ext/time/calculations.rbの修正です。

Time#change、及び、Time#advanceが、Daylight Saving Timeの終了日時を跨ぐ処理の場合に、誤った結果を返してしまうバグがあったのを修正しています。


Add deprecator-only overload for assert_deprecated

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

assert_deprecated``deprecatorだけ指定出来るよう修正しています。これにより、元々assert_deprecated(/./, deprecator)と記載する必要があったのが、assert_deprecated(deprecator)と記載出来るようになっています。


Improve test_destroy_linked_models by adding two assertions

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

test_destroy_linked_modelsで、destroy!実行後に実際にレコードが削除されている事を確認するassertionを追加しています。


Merge pull request #46326 from bdewater/sqlcommenter-value-serialization

activerecord/lib/active_record/query_logs.rbactiverecord/lib/active_record/query_logs_formatter.rbの修正です。

sqlcommenterの値のserialize処理で、値をURL encodeするよう修正、及び、key=valueのpairを辞書順になるよう修正しています。どちらも、sqlcommenterの仕様に準ずるようにする為。

参考: sqlcommenter Specification


Merge pull request #46258 from arielvalentin/fix-activejob-test-helper

activejob/lib/active_job/test_helper.rbの修正です。

ActiveJob::Core#scheduled_atがtest helperでTime objectに変換されていたのを、Floatに変換するよう修正しています。通常のjobの生成処理ではFloatに変換されるようになっており、挙動を合わせる為。