2024/05/24分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
update sqlite3 adapter tests to accept error messages from v3.46.0
activerecord/test/cases/adapters/sqlite3/sqlite3_adapter_test.rbの修正です。
SQLite v3.46.0で指定されたカラムが無い場合のエラーメッセージが変更になっており、その変更後のエラーメッセージでもテストが通るようメッセージのチェック処理を修正しています。
Enable Rails minitest plugin in our rake tasks
テストの修正です。
各コンポーネントのテスト実行時にRails内部のminitest pluginがロードされなくなってしまっていたのを、ロードされるよう修正しています。
Point to the right executable when warning about --profile
railties/lib/minitest/rails_plugin.rbの修正です。
profileオプションに不正な値を指定した場合のエラーメッセージで、テスト実行用のexeを指定するのにRails::TestUnitReporter.executableの値を使用するよう修正しています。
chore: remove webpack from yarn dependencies in Rails dev
package.jsonの修正です。
使用していないwebpackのdependencyを削除しています。
fix the direct upload class example
rails guideのActive Storage Overviewの修正です。
Integrating with Libraries or FrameworksセクションにあるDirectUploadを使用したexampleコードが実際には動作しないコードになっていたのを修正しています。
Merge pull request #51822 from excid3/plugin-github-actions
railtiesの修正です。
pluginを新規に作成した際に、CI(GitHub Actions)とRubocopの設定を含むよう修正しています。
Look up route from requirements (#51850)
actionpack/lib/action_dispatch/routing/route_set.rbの修正です。
requirementからrouteを検索するためのfrom_requirementsメソッドを追加しています。
Rails.application.routes.from_requirements(controller: "posts", action: "show")
Ruby LSP Railsでroutesのcode lensを表示出来るようにするために追加、したとの事です。
参考:Add code lens for mapping actions to routes
Move plumbing to enable yjit to inside the framework
railtiesの修正です。
YJITを有効化するかどうかの設定をinitializerで設定するようにしていたのを、それ用のconfig(config.yjit)を追加し、そのconfig経由で指定出来るよう修正しています。処理の詳細をアプリケーション側で保持する必要はないだろう、との事です。
Merge pull request #51880 from Shopify/devcontainer-generator
railtiesの修正です。
Dev Containersのサポートをオプトイン機能に変更しています。そのため、デフォルトではDev Containers用のファイルは生成されず、rails newに--devcontainerを指定した場合のみ生成されるよう変更しています。
Don't enable automatically_invert_plural_associations by default
activerecord/lib/active_record/reflection.rbの修正です。
pluralized nameに対するinverse relationsの検索を自動で行うかどうかのconfig(automatically_invert_plural_associations)のデフォルトをfalseに変更しています。この変更に関するissueが沢山きており、デフォルトで有効にするのはまずそう、という事のようです。
Use the --devcontainer option when generating a new Rails app in the guide
rails guideのGetting Started with Dev Containersの修正です。
サンプル用のアプリケーションを作成するためのコマンドに--devcontainer引数を追加しています。
Use released version of RDoc v6.7.0
Gemfileの修正です。
リリース済みのrdoc gemを使用するよう修正しています。forkを使用する理由になった修正を含むバージョンがリリースされたため。
Private methods do not need :nodoc: to be private API
actionpack/lib/action_controller/metal/request_forgery_protection.rbの修正です。
private methodsに対する不要な:nodoc:の指定を削除しています。
Fix railtie config test for sqlite 3.46.0
railties/test/application/configuration_test.rbの修正です。
SQLite v3.46.0で指定されたカラムが無い場合のエラーメッセージが変更に伴う対応で、修正が漏れていた箇所があったのを修正しています。
Merge pull request #51898 from flavorjones/51699-improve-store-accessor-for
activerecord/lib/active_record/store.rbの修正です。
structured(hstore、json) typeでない、かつ、ActiveRecord.storeでserializeを定義していないattributeをActiveRecord::Storeに指定した場合に、attribute参照時に不正な値である事がわかる明示的なエラー(ActiveRecord::ConfigurationError)をraiseするよう修正してます。
fix colspan for HtmlTableFormatter and dynamic search for routes
actionpack/lib/action_dispatch/middleware/templates/routes/_table.html.erb、
actionpack/lib/action_dispatch/routing/inspector.rbの修正です。
dynamic route search用のtemplateのcolspanの指定が誤っていたのを修正しています。
Revert "Merge pull request #51614 from gmcgibbon/defer_route_drawing"
eager_loadがfalseの場合、最初のrequestかurl_helpersが実行されるまでrouteのdrawingを遅らせるよう修正した、Defer route drawing to the first request, or when url_helpers calledをRevertしています。eager_loadがfalseの場合に幾つかのrouting処理が正しく動作しない、というissueがきている為。