2021/12/09分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
Fix new framework defaults tests
railties/test/generators/app_generator_test.rb
の修正です。
ライブラリのバージョン更新時に、new framework defaultsのテストで参照するinitializerの更新が漏れていたのを対応しています。
Fix test for the new boot screen
railties/test/isolation/abstract_unit.rb
の修正です。
welcomeページのデザイン変更に伴いwelcomeページのテストがコケてしまっていたのを修正しています。
Open Rails website in new tab (#43802)
railties/lib/rails/templates/rails/welcome/index.html.erb
の修正です。
https://rubyonrails.org へのリンクを別タブで開くよう修正しています。
Use dynamic Rails version in framework dummy apps
Railsのテストで使用しているdummy applicationsでload_defaults
に指定するバージョンに固定値を使用していたのを、Rails::VERSION::STRING.to_f
を使用するよう修正しています。
Move multi-db config options to middleware
Active Record、railtiesの修正です。
multi database、及び、shard selectionに関するデフォルトの設定がconfig/environments/production.rb
に記載されていたのを削除して、同じ内容を記載したファイルをgeneratorで生成出来るよう修正しています。生成はbin/rails g active_record:automatic_swapping
で行えるようになっており、ファイルはinitializer(config/initializers/multi_db.rb
)配下に生成されます。全ての環境で同じ設定を使いたい場合のことを考えると、config/environments/production.rb
よりも、initializerに設定がある方が適切だろう、という事で変更されています。
Fix assert_called_with with empty args array
activesupport/lib/active_support/testing/method_call_assertions.rb
の修正です。
assert_called_with
のargs
に空のArrayを指定した場合に、unmocked method
errorが発生してしまうバグがあったのを修正しています。
Omit Rake test task from generated plugin
railties/lib/rails/generators/rails/plugin/plugin_generator.rb
の修正です。
generatorが生成するplugin用のRakefileからテストに関するtaskを削除しています。bin/rails test
、または、bin/test
でテストが実行出来るようになっており、Rakeでのテスト実行は不要な筈の為。
Use optimistic Rails version constraint in plugins
railties/lib/rails/generators/rails/plugin/plugin_generator.rb
の修正です。
generatorが生成するplugin用のgemspec内のRailsのバージョン指定を、>= xx
となるよう修正しています。pluginは通常複数のバージョンのRailsアプリケーションで動作する可能性があり、バージョン指定を厳密に行う必要は内筈のため。
Upgrade capybara to work with Ruby 3.1 and earlier
Gemfile.lock
の修正です。
Capybaraを3.36.0
に更新しています。Ruby 3.1で動作するようにする為。
Merge pull request #43368 from FestaLab/render-hash-syntax
hash rocket operatorを使用している箇所をxx: yy
フォーマットにまとめて修正しています。
Merge pull request #43776 from lifeiscontent/patch-1
activestorage/db/update_migrate/20191206030411_create_active_storage_variant_records.rb
の修正です。
既にテーブルが作成されていた場合にエラーになるのを避ける為、作成対象のテーブルが既に作成済みかチェックしてから作成処理を行うよう修正しています。
Use if_not_exists
instead of table_exists?
activestorage/db/update_migrate/20191206030411_create_active_storage_variant_records.rb
の修正です。
テーブルの存在チェックにtable_exists?
メソッドを使用していたのを、if_not_exists
オプションを使用するよう修正しています。
DescendantsTracker: fix the TruffleRuby implementation
activesupport/lib/active_support/descendants_tracker.rb
の修正です。
DescendantsTracker
のTruffleRuby用の実装でメソッド呼び出しをタイポしている箇所があったのを修正しています。
railties/lib/rails/templates/rails/welcome/index.html.erb
の修正です。
https://rubyonrails.org へのリンクを別タブで開く際のtarget
に_new
を指定していたのを、_blank
を指定するよう修正しています。
activerecord/CHANGELOG.md
の修正です。
multi database、及び、shard selectionに関するデフォルトの設定をinitializerに移行した対応のCHANGELOGのエントリーを削除しています。Rails 7.0ブランチにバックポートされ、mainブランチのCANGELOGには不要になった為。