2025/01/08分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
activemodel/CHANGELOG.md
- Colorize the Rails console prompt even on non standard environments.
- Introduce
RAILS_MASTER_KEY
placeholder in generated ci.yml files
- Deprecate
ActiveSupport::Configurable
- Deprecate
String#mb_chars
andActiveSupport::Multibyte::Chars
.
docs: Update all code snippets to the latest version [ci skip] (#54118)
rails guideのThe Rails Initialization Process
の修正です。
guide内にあるRailsのコードのスニペットを最新の内容に更新しています。
Merge pull request #53955 from seanpdoyle/active-model-normalization
Active Record、Active Modelの修正です。
ActiveRecord::Normalization
をActiveModel::Attributes::Normalization
に移動し、Active Modelだけでもnormalizes APIを使用出来るよう修正しています。
class User include ActiveModel::Attributes include ActiveModel::Attributes::Normalization attribute :email, :string normalizes :email, with: -> email { email.strip.downcase } end
[ci skip] change "Destroy" to "Delete" on button for consistency
rails guideのGetting Started with Rails
の修正です。
Showing Links for Authenticated Users Only
セクション内のexampleコードで、Delete
をDestroy
タイポしていたのを修正しています。
Merge pull request #53027 from Uaitt/colorize-prompt-for-non-standard-environments
railties/lib/rails/commands/console/irb_console.rb
の修正です。
rails console
で実行したconsoleで、標準(development
、test
、production
)以外のenvの場合envに色が指定されてなかったのを、色をつけるようにしています。色はマゼンダ。
Merge pull request #54041 from zzak/fix-53754
activesupport/lib/active_support/core_ext/hash/deep_merge.rb
のdocの修正です。
Hash#deep_merge!
メソッドのdocがAPI docに表示されなくなっていたのを修正しています。
Merge pull request #54014 from mohsen-alizadeh/issue-54009
rails guideのGetting Started with Rails
の修正です。
Rails Routes
セクションで、同じroutingを2回定義していたのを修正、及び、CRUD用のroutesについて説明している箇所で、PUT requestとPATCH requestの説明をわけるよう修正しています。
Fix name of the gem being required
activestorage/lib/active_storage/analyzer/image_analyzer/image_magick.rb
の修正です。
mini_magick
gemのロードでエラーになった場合のエラーチェックで、エラーチェックする際のgem名をタイポしていたのを修正しています。
Merge pull request #53970 from seanpdoyle/deprecate-active-support-configurable
ActiveSupport::Configurable
をdeprecatedにしています。Railsのコード内で使用している箇所は1箇所のみで、ActiveSupport::Configurable
でないと出来ない機能も特に無い為。代わりにActiveSupport.deprecator
を使用するのが推奨されるようになっています。
CI: Introduce RAILS_MASTER_KEY
placeholder
railties/lib/rails/generators/rails/app/templates/github/ci.yml.tt
、
railties/lib/rails/generators/rails/plugin/templates/github/ci.yml.tt
の修正です。
rails new
で生成するCI用の設定ファイルで、RAILS_MASTER_KEY
envの指定を追加しています。credentialsを使用している場合にCI上でconfig.require_master_key
を参照出来るようにするため。
Merge pull request #53174 from BarnabeD/fix-yarn-dockerfile
railties/lib/rails/generators/app_base.rb
、
railties/lib/rails/generators/rails/app/templates/Dockerfile.tt
の修正です。
rails new
で生成するDockerfileでYarnをインストールする際、最新バージョンが必要な場合corepack経由でインストールするよう修正しています。Yarn v2以降はnpm経由だとインストール出来ないため。
Fix boolean columns triggering MySQL deprecation
activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb
の修正です。
MySQLでboolean
を表現するのにtinyint型をlimit: 1
を指定して使用していたのを、boolean
を使用するよう修正しています。MySQL 8.0.17+でInteger display widthがdeprecatedになっているため。
参考:MySQL :: MySQL 8.0 Release Notes :: Changes in MySQL 8.0.17 (2019-07-22, General Availability)
Merge pull request #54143 from Shopify/fix-action-controller-live-thread-locals-in-test
actionpack/lib/action_controller/metal/live.rb
の修正です。
controllerがActionController::Live
をincludeしている場合、test envでmain threadのthread localsが誤ってclearされてしまうバグがあったのを修正しています。
Don't load ActiveStorage::Blob when validating the service
Active Storageの修正です。
Active Storageで使用するserviceのvalidateを行う際に、ActiveStorage::Blob
がloadされないよう修正しています。assets:precompile
のようにActive Storageが不要な処理でActive Storageがloadされるのを避けるため。
Deprecate String#mb_chars
and AS::Multibyte::Chars
.
activesupport/lib/active_support/multibyte.rb
、
activesupport/lib/active_support/multibyte/chars.rb
の修正です。
String#mb_chars
及びAS::Multibyte::Chars
をdeprecatedにしています。Rubyのstringsがencodigを認識してなかった頃に必要だったAPIで、現在のRubyでは使用する必要は無いはずの為。
Avoid triggering AS::Multibyte deprecation when quoting
activerecord/lib/active_record/connection_adapters/abstract/quoting.rb
の修正です。
deprecatedになったActiveSupport::Multibyte::Chars
をロードしないよう修正しています。
Align example URL with protocol explanation
rails guideのGetting Started with Rails
の修正です。
http://example.org
-> https://example.org
に修正しています。
Fix small typo on Railties CHANGELOG and comment
railties/CHANGELOG.md
、
railties/lib/rails/application/configuration.rb
のdocの修正です。
CHANGELOG及びdoc内のタイポを修正しています。