2023/11/16分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
activestorage/CHANGELOG.md
Merge pull request #50061 from andrewn617/database-configs-for-with-symbol
activerecord/lib/active_record/database_configurations.rb
の修正です。
DatabaseConfigurations#configs_for
のname
parameterにSymbolを指定出来るよう修正しています。
Prevent AS::Preview#processed
to generate an empty variant
activestorage/app/models/active_storage/preview.rb
の修正です。
ActiveStorage::Blob#preview
にvariationが指定されなかった場合、不要なvariantの生成処理を行わないようにして、変わりに元のpreview imageをそのままあ返すよう修正しています。
Fix word_wrap with empty string
actionview/lib/action_view/helpers/text_helper.rb
の修正です。
ActionView::Helpers::TextHelper#word_wrap
の空の文字列が指定された場合に、空の文字列を返すよう修正しています。Rails 7.1ではnilを返すようになっていたのですがこれは意図的な変更ではなかった為、前のバージョンと同じ挙動になるよう修正しています。
Refactor lookup of connection adapters
Active Recordの修正です。
connection adapterのlookup処理のリファクタリングを行っています。現在、third partyのadapterを追加しようとするとファイル名やメソッド名に色々ルールがあるのですが、これをActiveRecord::ConnectionAdapters.register
メソッドを使用するだけで追加出来るよう対応しています。
ActiveRecord::ConnectionAdapters.register("megadb", "MegaDB::ActiveRecordAdapter", "mega_db/active_record_adapter") ActiveRecord::ConnectionAdapters.register("mysql", "ActiveRecord::ConnectionAdapters::TrilogyAdapter", "active_record/connection_adapters/trilogy_adapter")
Routing::Mapper: Use Thread.each_caller_location if available
actionpack/lib/action_dispatch/routing/mapper.rb
の修正です。
Routing::Mapper
でsource locationを取得する際に、Thread.each_caller_location
が使えるバージョンではcaller_locations
ではなくThread.each_caller_location
を使用するよう修正しています。Thread.each_caller_location
の方がオブジェクトの生成が少ない為。
Make return values of Cache::Store#write consistent
activesupport/lib/active_support/cache/mem_cache_store.rb
、
activesupport/lib/active_support/cache/redis_cache_store.rb
の修正です。
全てのadapterでCache::Store#write
の戻り値が同じになるよう修正しています。書き込みに成功した場合はtrue
、cache backendでエラーになった場合はnil
、他の理由で書き込みに失敗した場合はfalse
を返すよう統一されています。