なるようになるブログ

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

rails commit log流し読み(2024/06/22)

2024/06/22分のコミットです。

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

activerecord/CHANGELOG.md


Revert lazy routesets (#52012) due to polymorphic routing regression

config.eager_loadがfalseの場合に最初のrequestかurl_helpersが実行されるまでrouteのdrawingを遅らせるよう修正した対応、Defer route drawing to the first request, or when url_helpers called.を再度Revertしています。eager_loadがtrueの場合にpolymorphic routingが正しく定義されないバグがあった為。


Merge pull request #52179 from Uaitt/Dockerfile-FromAsCasing-offenses

railties/lib/rails/generators/rails/app/templates/Dockerfile.ttの修正です。

Dockerfile内のFROMinstructionのasASに変更しています。FROMが大文字でasが小文字だとbuild時にwarningが出てしまう為。

参考:FromAsCasing | Docker Docs


Turn ActionController::Base inclusions explicit

actionpack/lib/action_controller/base.rbの修正です。

ActionController::Baseに対するincludeを動的に行っていたのを、moduleを個別に明示的にincludeするよう修正しています。LSP等の静的解析ツールがancestorsの取得を出来るようにする為


Merge pull request #52175 from y-yagi/correctly_generate_devcontainer_for_mysql2

railties/lib/rails/commands/devcontainer/devcontainer_command.rbの修正です。

devcontainerコマンドで、mysql2 gemを使っているアプリケーションに対してのDevcontainersの設定ファイルが正しく生成されないバグがあったのを修正しています。


Add condensed #inspect for Pool, Adapter, Config

Active Recordの修正です。

ActiveRecord::ConnectionAdapters::ConnectionPoolActiveRecord::ConnectionAdapters::AbstractAdapter、及び、ActiveRecord::DatabaseConfigurations::DatabaseConfig#inspectメソッドを定義しています。誤ってpasswords等のセンシティブな情報が#inspectメソッド経由で出力されてしまうのを避けるため。


Merge pull request #51740 from heka1024/parallel-upload-in-mirror-service

activestorage/lib/active_storage/service/mirror_service.rbの修正です。

ActiveStorage::Service::MirrorServiceでの各種serviceへの処理をスレッドで並列に実行するよう修正しています。