なるようになるブログ

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

rails commit log流し読み(2023/10/02)

2023/10/02分のコミットです。

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


rails db:drop now removes -shm and -wal sqlite files (#49436)

activerecord/lib/active_record/tasks/sqlite_database_tasks.rbの修正です。

DBにSQLite3を使用している場合に、db:drop実行時にxx-shm、及び、xx-walファイルを削除するようにしています。性能改善を行った、Performance tune the SQLite3 adapter connection configurationの対応により-shmファイル及び-walファイルが作られるようになっており、ファイルが残ったままだとDB再作成時にエラーになってしまうため。


Revert "Also rescue TZInfo::ZoneinfoDirectoryNotFound when loading time zone data"

time zone dataをload時にTZInfo::ZoneinfoDirectoryNotFoundをハンドルするよう修正した、Also rescue TZInfo::ZoneinfoDirectoryNotFound when loading time zone …をRevertしています。最新のgemだとTZInfo::ZoneinfoDirectoryNotFoundがraiseされることは無いため。


Fix AS::MessagePack with ENV["RAILS_MAX_THREADS"]

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

ActiveSupport::MessagePackのRAILS_MAX_THREADSenvを元にpoolを作成する処理で、ArgumentError`がraiseされてしまうバグがあたのを修正しています。


Revert "Merge pull request #49056 from joshuay03/raise-on-duplicate-accepts-nested-attributes-for"

同じassociationに対するaccepts_nested_attributes_forが同じクラスで複数回定義された場合にArgumentErrorをraiseするよう修正した、[Fix #49055] Raise an ArgumentError when #accepts_nested_attributes_for is redeclared for an associationをRevertしています。共通で使うconcern、及び、それをincludeしたmodelで同じaccepts_nested_attribute_forを定義する、という事がある、というコメントがあり、それは許容すべきだろう、とという事でRevertされています。


Merge pull request #49438 from kddnewton/prism-render-parser

Action Viewの修正です。

render時のRubyコードのパース処理でripperを使用していたのを、使用出来る場合prismを使用するよう修正しています。prismRuby 3.3からstandard libraryに追加されており、ripperよりも処理が高速なため。


Fix CHANGELOG

actionview/CHANGELOG.mdの修正です。

不要な空行を削除しています。


Merge pull request #49437 from tnir/tn-remove-config-on-skip-ac

railtiesの修正です。

rails newに--skip-action-cableを指定した場合に、config/environments/development.rbにAction Cable用の設定を含まないよう修正しています。


Merge pull request #49442 from p8/actionpack/notifications-tests

actionpack/test/controller/redirect_test.rbactionpack/test/controller/send_file_test.rbの修正です。

send_file、及び、redirect_to実行時のinstrumentationに関するテストを追加しています。


Ensure PG connection is configured before looking up types

activerecord/lib/active_record/connection_adapters/postgresql/quoting.rbactiverecord/lib/active_record/connection_adapters/postgresql_adapter.rbの修正です。

PostgreSQL adapterでtypeの取得処理より前にDBへの接続が行えるよう修正しています。PostgreSQLのtypeはDBのデータに依存しており、設定するにはDBへの接続が必要な為。


[ci-skip][Docs]Add encryption.add_to_filter_parameters to configuring.md (#49443)

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

config.active_record.encryption.add_to_filter_parameters configについての説明を追加しています。


Get rid of the jruby_skip test helper

テストの修正です。

test_distance_in_words_doesnt_use_the_quotient_operatorJRubyの場合skipするようになっていたのを、テストを実行するよう修正しています。最新のJRubyだとテストが通るようになっている為。及び、使用しなくなったjruby_skipメソッドを削除しています。


Fix typo

activerecord/lib/active_record/railtie.rbのdocの修正です。

active_record.define_attribute_methods initializer内のdocのタイポを修正しています。


Fix ActionController::Parameters#deep_merge RDoc [ci skip]

actionpack/lib/action_controller/metal/strong_parameters.rbのdocの修正です。

ActionController::Parameters#deep_mergeのdocがAPI docで他のメソッドと同様に表示されるよう修正しています。