なるようになるブログ

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

rails commit log流し読み(2024/03/26)

2024/03/26分のコミットです。

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

railties/CHANGELOG.md

activerecord/CHANGELOG.md


Merge pull request #51390 from andrewn617/devcontainer-use-ruby-feature

devcontainerで使用するDockerイメージを、Railsが提供しているイメージ(rails/devcontainer/)を使用するよう修正しています。


Conditionally skip test job in ci.yml (#51289)

railties/lib/rails/generators/rails/app/templates/github/ci.yml.ttの修正です。

rails newに--skip-test`オプションを指定した場合、ci.ymlにテスト用のjobを含まないよう修正しています。


Ensure all association options are added to the list unconditionally

activerecord/lib/active_record/associations/builder/has_many.rbactiverecord/lib/active_record/associations/builder/has_one.rbの修正です。

association optionに不正な値(e.g. through)が指定された場合に、ArgumentErrorをraiseするよう修正しています。


Regenerate some broken markdown in Action Pack

Action Packのdocの修正です。

メソッドのdoc内のオプションが正しく表示されていない箇所があったのを修正しています。


Fix ActiveRecord::Encryption::Errors::Encoding incorrectly raises for not-encrypted binary encoded values (#51412)

Active Recordの修正です。

encryptedされていないbinary encoded dataを保存しようとした際にActiveRecord::Encryption::Errors::Encodingがraiseされてさしまうバグがあったのを修正しています。


Ensure binary encoding check is performed with the correct context in #encrypt_as_text (#51423)

activerecord/lib/active_record/encryption/encrypted_attribute_type.rbの修正です。

直前の、Fix ActiveRecord::Encryption::Errors::Encoding incorrectly raises for not-encrypted binary encoded valuesの対応で、binary encodingのチェックを行う箇所が誤っていたのを修正しています。


Merge pull request #51417 from akhilgkrishnan/test-typo-fix

activerecord/test/activejob/destroy_association_async_job_test.rbの修正です。

destroy_asyncに関するテストでテスト名をタイポしていたのを修正しています。


Minor improvements to Testing guide (#51418)

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

guide全体について、グラマーの修正やフォーマットの修正等を行っています。


Retry known idempotent SELECT queries on connection-related exceptions

Active Recordの修正です。

冪等になる事がわかっているSELECT query実行時にconnection関連のエラーが発生した場合に、自動でqueryのリトライを行うよう修正しています。この対応では、Arel treeの構築処理のSQLと、#find#find_byにknown attributesが指定された場合に自動でリトライがされるようになっています。


Merge pull request #51357 from yahonda/ruby_chilled_strings

actionpack/test/fixtures/ruby_template.rubyの修正です。

Ruby本体でmagic commentのfrozen_string_literalsの指定がないスクリプト内の文字列リテラルに対してdeprecated warningを出すよう変更になった影響で、エラーになったテストがあったのを修正しています。

参考: