2024/02/15分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
- Generate a .devcontainer folder and its contents when creating a new app.
- Introduce
SystemTestCase#served_by
for configuring the System Test application server
Allow .test by default in development (#51087)
actionpack/lib/action_dispatch/middleware/host_authorization.rb
の修正です。
development envのデフォルトのallowed hostに.test
ドメインを追加しています。puma/puma-devがデフォルトで.test
ドメインを使用するようになっており、設定の追加無しで使用出来るようにするため。
Add missing super in prune_thread_cache method
activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb
の修正です。
prune_thread_cache
でsuper
の呼び出しが不足していたのを修正しています。
Use ruby file: ".ruby-version"
for new apps
railtiesの修正です。
rails new
で新規にアプリケーションを作成した際に、Gemfile
でRubyのバージョンを指定するのに.ruby-version
(ruby file: ".ruby-version"
)を使用するよう修正しています。Gemfile
と.ruby-version
それぞれで同じバージョンを指定するのを避けるようにするため。が、後ほどRevertされています。
Merge pull request #51084 from anonychun/dont-override-ld-preload
railties/lib/rails/generators/rails/app/templates/docker-entrypoint.tt
の修正です。
docker-entrypoint
でLD_PRELOAD
がすでに設定されている場合、jemalloc用のLD_PRELOAD
で既存の設定を上書きしないよう修正しています。
[RF DOCS] Review Action Mailbox guide [ci-skip] (#50973)
rails guideのAction Mailbox Basics
の修正です。
guide全体について、フォーマットや言い回しの修正、configの説明の追加等を行っています。
[RF DOCS] Review Action Text guide [ci-skip] (#50977)
rails guideのAction Text Overview
の修正です。
guide全体について、フォーマットや言い回しの修正、exampleコードの追加等を行っています。
railties/lib/rails/generators/rails/app/templates/config/puma.rb.tt
の修正です。
条件分岐処理の整理、コメントの追加などを行っています。
Merge pull request #51064 from mkasberg/debugging-guide
rails guideのDebugging Rails Applications
の修正です。
Breakpoint Options
セクションのタイポの修正を行っています。
Remove extra new line in the generated Gemfile
railties/lib/rails/generators/rails/app/templates/Gemfile.tt
の修正です。
rails new
で生成されるGemfileから不要な空行を削除しています。
Revert "Merge pull request #49360 from skipkayhil/hm-gemfile-ruby-file"
Gemfile
でRubyのバージョンを指定するのに.ruby-version
(ruby file: ".ruby-version"
)を使用するよう修正した、Use ruby file: ".ruby-version" for new appsをRevertしています。
この変更を適応した場合、bundleを実行するにはパッチバージョンまで正確に一致したRubyがインストールされている必要があるのですがdevcontainerではパッチバージョンまで一致したRubyのimageが提供されておらず、devcontainer環境で使用しようするとエラーになる、という問題が発生したためRevertされています。パッチバージョンを指定出来る独自のRuby imageの作成を行ってから、再度適用予定との事です。
Merge pull request #51055 from zzak/preview_docs
API doc 及び Guideのpreview用のHTMLを生成するためのrake taskを追加しています。buildkiteでpreview用のHTMLを生成し、PRの段階で変更を確認出来るようにするため。
Merge pull request #51034 from rails/rm-schema-cache-loading
Active Recordの修正です。
schema cache dumpをeager loadする為のinitializerを削除しています。Refactor Active Record Schema Cache to not hold a connectionの対応により、define_attribute_methods
のinitializerの中でeager loadされるようになっている為、合わせて、schema cacheのpathを指定する為のENV["SCHEMA_CACHE"]
をdeprecatedにしています。今後は、configファイルの:schema_cache_path
に指定する必要があります。
Merge pull request #50914 from andrewn617/devcontainer
railtiesの修正です。
rails new
で新規にアプリを作成時にDevcontainer用の設定を作成するよう修正しています。containerには、RDBMS、Redis、Headless chrome等テストや開発のために必要なcontainerが一通り含まれるようになっています。
合わせて、System Testで使用するアプリケーションサーバを変更するためのserved_by
メソッドを追加しています。Devcontainerで実行しているアプリケーションを指定出来るようにする為。
class ApplicationSystemTestCase < ActionDispatch::SystemTestCase served_by host: "testserver", port: 45678 end
Merge pull request #49655 from Shopify/fix-cpk-update-all-with-join-subquery
Active Recordの修正です。
composite primary keysを使用しているmodelをjoinしてupdate_all
/delete_all
を実行した場合に、誤ったSQLが生成されてしまうバグがあったのを修正しています。
Add autoload for ActionController::TestRequest
actionpack/lib/action_controller.rb
の修正です。
ActionController::TestRequest
をautoloadの対象に追加しています。ActionController::TestCase
に依存していない処理でも使用している為。
Use consistent ENV.fetch style
railties/lib/rails/generators/rails/app/templates/config/puma.rb.tt
の修正です。
ENV.fetch
でデフォルト値を指定する場合のスタイルを統一しています。
Merge pull request #51016 from javierav/optimistic-locking-doc
activerecord/lib/active_record/locking/optimistic.rb
のdocの修正です。
ActiveRecord::Locking::Optimistic
moduleのdocに、lock_version
columnはintegerである必要がある旨説明を追加しています。
railties/lib/rails/generators/rails/app/templates/config/environments/development.rb.tt
、
railties/lib/rails/generators/rails/app/templates/config/environments/test.rb.tt
の修正です。
configの値を指定する際のフォーマットの修正を行っています。
Merge pull request #51093 from seanpdoyle/action-view-rendered-memoization
actionview/lib/action_view/test_case.rb
の修正です。
ActionView::TestCase
内のrendered
のメモ化処理を削除しています。テストでviewのrender処理を複数回呼び出した際に、呼び出し毎に正しい結果が得られるようにする為。
ActiveRecord::TestCase: reap all leaked connection on teardown
activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb
、
activerecord/test/cases/test_case.rb
の修正です。
ActiveRecord::TestCase
のteardown処理で、全てのleaked connectionのreap処理を行うよう修正しています。他のテストでconnectionのclear処理を行った場合に影響が出ないようにする為。
Refactor SchemaCache to hold a ConnectionPool
Active Recordの修正です。
SchemaCache
でConnectionPool
を保持するようリファクタリングしています。 Decouple transactional fixtures and active connectionsなどと同様に、PoC: Add an option to disable connection checkout cachingに関連したリファクタリングの一環です。全てのconnectionがBoundSchemaReflection
を保持するよりも、BoundSchemaReflection
経由でconnectionを取得出来た方が効率が良いだろう、という事で修正されたようです。