2024/05/02分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
activestorage/CHANGELOG.md
- Remove deprecated
config.active_storage.replace_on_assign_to_many
. - Remove deprecated
config.active_storage.silence_invalid_content_types_warning
.
- Deprecate
DateAndTime::Compatibility.preserve_timezone
. - Deprecate
config.active_support.to_time_preserves_timezone
. - Remove deprecated support for the pre-Ruby 2.4 behavior of
to_time
returning aTime
object with local timezone. - Remove deprecated
:pool_size
and:pool_timeout
options for the cache storage - Remove deprecated support for
config.active_support.cache_format_version = 6.1
- Remove deprecated constants
ActiveSupport::LogSubscriber::CLEAR
andActiveSupport::LogSubscriber::BOLD
- Remove deprecated support to bolding log text with positional boolean in
ActiveSupport::LogSubscriber#color
- Remove deprecated
config.active_support.disable_to_s_conversion
- Remove deprecated
config.active_support.remove_deprecated_time_with_zone_name
- Remove deprecated
config.active_support.use_rfc4122_namespaced_uuids
- Remove deprecated support to passing
Dalli::Client
instances toMemCacheStore
- Remove deprecated
#to_default_s
fromArray
,Date
,DateTime
andTime
- Remove deprecated
SafeBuffer#clone_empty
- Remove deprecated
ActiveSupport::Deprecation
delegation to instance - Remove deprecated support to call the following methods without passing a deprecator
- Remove deprecated
ActiveSupport::Notifications::Event#children
andActiveSupport::Notifications::Event#parent_of?
- Remove deprecated
Rails.application.secrets
- Remove deprecated
Rails.config.enable_dependency_loading
- Remove deprecated
find_cmd_and_exec
console helper - Remove deprecated
Rails::Generators::Testing::Behaviour
- Implement Rails console commands and helpers with IRB v1.13's extension APIs
validate_constraint
can be called in achange_table
block.- Added support for recursive common table expressions.
Avoid seed data execution in CI by replacing db:setup
with db:test:prepare
railties/lib/rails/generators/rails/app/templates/github/ci.yml.tt
の修正です。
CIでのDBのセットアップ処理をdb:setup
からdb:test:prepare
に変更しています。CIで不要なseedのロード処理が行われないようにするため。
docs: Update FormHelper comments to use form_with
instead of form_for
actionview/lib/action_view/helpers/form_helper.rb
のdocの修正です。
doc内のexampleコードでform_for
を使用している箇所をform_with
を使用するよう修正しています。現在はform_with
を使用するのが推奨されているため。
Remove deprecated config.active_storage.replace_on_assign_to_many
activestorage/lib/active_storage.rb
の修正です。
deprecatedになっていたconfig.active_storage.replace_on_assign_to_many
を削除しています。
Remove deprecated config.active_storage.silence_invalid_content_types_warning
activestorage/lib/active_storage.rb
の修正です。
deprecatedになっていた`config.active_storage.silence_invalid_content_types_warningを削除しています。
Remove deprecated support for the pre-Ruby 2.4 behavior of to_time
Active Supportの修正です。
deprecatedになっていた、Ruby 2.4より前のバージョン向けの、to_time
メソッドが返すTimeオブジェクトをtimezoneを保持しないようにした対応を削除しています。合わせて、この挙動のためのDateAndTime::Compatibility.preserve_timezone
及びconfig.active_support.to_time_preserves_timezone
をdeprecateにしています。
Remove deprecated :pool_size
and :pool_timeout
options for the cache storage
activesupport/lib/active_support/cache.rb
の修正です。
deprecatedになっていた、cache storageの:pool_size
と:pool_timeout
オプションを削除しています。
Remove deprecated support for config.active_support.cache_format_version = 6.1
Active Supportの修正です。
deprecatedになっていた、Rails v6.1で作成されたcache format向けのサポートを削除しています。
activesupport/lib/active_support/log_subscriber.rb
の修正です。
deprecatedになっていた、ActiveSupport::LogSubscriber::CLEAR
及びActiveSupport::LogSubscriber::BOLD
を削除しています。
activesupport/lib/active_support/log_subscriber.rb
の修正です。
deprecatedになっていた、ActiveSupport::LogSubscriber#color
のログテキストを太字にするためのpositional argumentのサポートを削除しています。
Remove deprecated config.active_support.disable_to_s_conversion
activesupport/lib/active_support/railtie.rb
の修正です。
deprecatedになっていた、config.active_support.disable_to_s_conversion
を削除しています。
Remove deprecated config.active_support.remove_deprecated_time_with_zone_name
activesupport/lib/active_support/railtie.rb
の修正です。
deprecatedになっていた、`config.active_support.remove_deprecated_time_with_zone_nameを削除しています。
Remove deprecated config.active_support.use_rfc4122_namespaced_uuids
activesupport/lib/active_support/railtie.rb
の修正です。
deprecatedになっていた、config.active_support.use_rfc4122_namespaced_uuids
を削除しています。
Remove deprecated support to passing Dalli::Client
instances to MemCacheStore
activesupport/lib/active_support/cache/mem_cache_store.rb
の修正です。
deprecatedになっていた、MemCacheStore
にDalli::Client
のインスタンスを渡した場合のサポートを削除しています。
Remove deprecated #to_default_s
from Array
, Date
, DateTime
and Time
deprecatedになっていた、Array
, Date
, DateTime
及び Time
の#to_default_s
メソッドを削除しています。
Update deprecator horizon for 7.3
activesupport/lib/active_support/core_ext/module/attr_internal.rb
の修正です。
attr_internal_naming_format
を@
prefixで設定した場合に出力するdeprecateメッセージ内の、機能が削除されるRailsのバージョンが誤っていたのを修正しています。
Remove deprecated SafeBuffer#clone_empty
activesupport/lib/active_support/core_ext/string/output_safety.rb
の修正です。
deprecatedになっていた、SafeBuffer#clone_empty
を削除しています。
Remove deprecated ActiveSupport::Deprecation
delegation to instance
activesupport/lib/active_support/deprecation.rb
、
activesupport/lib/active_support/deprecation/instance_delegator.rb
の修正です。
deprecatedになっていた、ActiveSupport::Deprecation
のインスタンスへのdelegate処理を削除しています。
Remove deprecated support to call the following methods without passing a deprecator
Active Supportの修正です。。
deprecatedになっていた、deprecate
やdeprecate_constant
などのdeprecate関連のメソッドをdeprecatorの指定なしで呼び出した場合の挙動を削除しています。
activesupport/lib/active_support/notifications/instrumenter.rb
の修正です。
deprecatedになっていた、ActiveSupport::Notifications::Event#children
及びActiveSupport::Notifications::Event#parent_of?
を削除しています。
Remove unnecessary deprecation silencing in cache_store_compression_behavior.rb
activesupport/test/cache/behaviors/cache_store_compression_behavior.rb
の修正です。
不要なdeprecation silencingの処理を削除しています。
Gemfile.lock
の修正です。
prism
gemのバージョンを最新バージョンに更新しています。
Remove deprecation on calling assert_equal
with nil
railties/test/application/backtrace_cleaner_test.rb
の修正です。
deprecatedになっている、assert_equal
の第一引数にnil
を指定している処理を、assert_nil
を使用するよう修正しています。
Remove deprecated Rails.application.secrets
railtiesの修正です。
deprecatedになっていた、Rails.application.secrets
を削除しています。
Remove deprecated Rails.config.enable_dependency_loading
railties/lib/rails/application/configuration.rb
の修正です。
deprecatedになっていた、Rails.config.enable_dependency_loading
を削除しています。
Remove deprecated find_cmd_and_exec
console helper
railties/lib/rails/commands/dbconsole/dbconsole_command.rb
の修正です。
deprecatedになっていた、find_cmd_and_exec
メソッドを削除しています。
Remove deprecated Rails::Generators::Testing::Behaviour
railties/lib/rails/generators/testing/behavior.rb
の修正です。
deprecatedになっていた、Rails::Generators::Testing::Behaviour
を削除しています。
Pass validate(check)constraint through change_table
activerecord/lib/active_record/connection_adapters/postgresql/schema_definitions.rb
の修正です。
validate_constraint
をchange_table
block内で使用できるよう修正しています。
change_table :products do |t| t.check_constraint "price > discounted_price", name: "price_check", validate: false t.validate_check_constraint "price_check" end
Register Rails console commands/helpers with its latest extension APIs
railtiesの修正です。
Rails console commandとhelperを、IRB v1.13で追加されたextension APIsを使用して実装するよう修正しています。これにより、Rails が追加しているcommandとhelperがIRBのhelpで正しく表示されるようになっています。
参考:Extend IRB
Merge pull request #51702 from akhilgkrishnan/fix-guides-broken-link
rails guideの修正です。
guide内のanchor linksが壊れてないかをチェックするためのguides:lint
taskを追加しています。
Add support for recursive CTE in Active Record
Active Recordの修正です。
recursive Common Table Expression (CTE)の為のメソッド(with_recursive
)をActive Recordに追加しています。
Post.with_recursive( post_and_replies: [ Post.where(id: 42), Post.joins('JOIN post_and_replies ON posts.in_reply_to_id = post_and_replies.id'), ] )
上記を実行した場合、下記のSQLが生成されるようになっています。
WITH RECURSIVE "post_and_replies" AS ( (SELECT "posts".* FROM "posts" WHERE "posts"."id" = 42) UNION ALL (SELECT "posts".* FROM "posts" JOIN post_and_replies ON posts.in_reply_to_id = post_and_replies.id) ) SELECT "posts".* FROM "posts"
Fix typo from Changelog [ci skip]
activerecord/CHANGELOG.md
の修正です。
common
をcommont
にタイポしていたのを修正しています。
WithChain does not exist in the codebase
activerecord/lib/active_record/relation/query_methods.rb
の修正です。
with
メソッドで存在しないクラスを使用している箇所があったのを修正しています。
Don't cast stale_state
to String
Active Recordの修正です。
associationの状態を返すstale_state
メソッドで、結果をStringに変換してから返していたのをStringに変換しないよう修正しています。オブジェクトの生成数を減らす為、かつ、Stringに変換しなければならない理由が無さそうだった為。
Merge pull request #51710 from akhilgkrishnan/document-devecontainer
rails guideのGetting Started with Rails
の修正です。
rails new
が生成するfile/folderについて説明している箇所に、.devcontainer
folderについての説明を追加しています。
Merge pull request #51409 from fatkodima/fix-destroy_async-job-for-cpk
Active Recordの修正です。
composite primary keyを使用しているmodelで、associationをdestroy_async
jobで削除出来ないバグがあったのを修正しています。