なるようになるブログ

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

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

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

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


Merge pull request #47383 from zzak/guides-kindle-logo

rails guideの修正です。

Rails guidesのカバー画像のRailsのロゴが古い画像のままになっていたのを修正しています。


Delete test that tests nothing

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

assertionが無い何の為に必要だったかわからないテストを削除しています。


Remove unnecessary remove/establish_connection

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

テストから不要と思われるremove_connection/establish_connectionの呼び出しを削除しています。


Merge pull request #47147 from ioquatix/rack-3-headers-name-normalization

actionpack/lib/action_dispatch/http/response.rbの修正です。

accessor名や定数名などでHeaderになっていた箇所をHeadersに変更しています。Rack 3からheader用のクラス名がRack::Headersになっておりそれに合わせる為。


Merge pull request #47092 from ioquatix/rack-3-streaming-body

actionpack/lib/action_dispatch/http/response.rbの修正です。

ActionDispatch::ResponseでRack 3で追加されたstreaming bodiesをサポートするよう修正しています。


Merge pull request #47222 from rafaelsales/patch-1

railties/lib/rails/generators/rails/app/templates/db/seeds.rb.ttのdocの修正です。

db/seeds.rbのコメントにあるdb/seeds.rbの説明及びexampleの内容をより適切な内容に修正しています。


Follow up re: idempotency in db/seeds.rb

rails guideのActive Record Migrationsの修正です。

db/seeds.rbについての説明及びexampleを、先に更新したdb/seeds.rbのコメントと同じ内容になるよう修正しています。


Update TimeHelpers#travel_to docs after stubbing Time.new

docの修正です。

CHANGELOGTimeHelpers#travel_toTime.newをstubするよう変更した対応のエントリーにexampleコードを追加、travel_toがstubするメソッドの一覧について説明している箇所にTime.newを追加、等を行っています。


SchemaCache#init_with skip deduplicate if specified

activerecord/lib/active_record/connection_adapters/schema_cache.rbの修正です。

SchemaCache#init_withにdeduplicateを行うかどうかを指定する為のdeduplicatedオプションを追加しています。custom Schema Cache serializerを使用していて、そちらでdeduplicateを行っている場合に、不要なdeduplicateを避けれるようにする為。


Remove unnecessary calls to establish_connection

Active Recordのテストの修正です。

各テストから不要なestablish_connectionの呼び出し処理を削除しています。


Fix collect_deprecations documentation and add a test

activesupport/lib/active_support/testing/deprecation.rbのdoc、及び、activesupport/test/deprecation_test.rbの修正です。

collect_deprecationsメソッドのdocにblockのreturn valueがメソッドの戻り値として返る旨説明を追加、及び、その挙動を確認する為のテストを追加しています。


Test Deprecation skipping caller locations

activesupport/test/deprecation_test.rbの修正です。

warn deprecationのcallstackがcaller locationを含まない事を確認するテストを追加しています。


Clean up async test

activerecord/test/cases/relation/load_async_test.rbの修正です。

async testについて、configでのasyncに関するオプションの指定が正しく行われてなかったのを修正、そのオプションが正しく設定されている事を確認するテストの追加、などを行っています。


Remove test that's not useful

activesupport/test/deprecation_test.rbの修正です。

現在は不要と思われるActiveSupport::Deprecationへのdelegateに関するテストを削除しています。


Document that only application deprecators are disabled by report_deprecations

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

config.active_support.report_deprecationsオプションについて説明している箇所を、falseを指定した場合applicationのdeprecatorの挙動を制御出来るが、ActiveSupport::Deprecationが出力する全てのwarningが抑制される訳ではない旨説明を修正しています。