2023/03/28分のコミットです。
CHANGELOGにのったコミットは以下の通りです。
activestorage/CHANGELOG.md
Update active_record_migrations.md
rails guideのActive Record Migrations
の修正です。
Using reversible
の項にあるexampleコードについて説明している箇所で、exampleコードで行われる処理についての説明が不足していたのを追加しています。
Remove mini_mime usage in favour of marcel
Active Storageの修正です。
Active Storage内部でmime関連の処理を行うのにmini_mime
、marcel
と2つのgemを使用していたのを、全ての処理でmarcel
を使用するようにして、mini_mime
は依存から削除するよう修正しています。
Merge pull request #47777 from shouichi/use-google-cloud-env
activestorage/lib/active_storage/service/gcs_service.rb
の修正です。
GCSでemailを取得するのに、google-cloud-env
gemが提供しているメソッドを使用するよう修正しています。
Output generator usage on two lines
railties/lib/rails/generators.rb
の修正です。
rails
コマンドのusageを2行にわけて表示するよう修正しています。
Merge pull request #47781 from brenda-daroz/fix-hover-welcome-page
railties/lib/rails/templates/rails/welcome/index.html.erb
の修正です。
welcomeページのロゴをhoverした際に画像が正しく切り替わるよう修正しています。
Merge pull request #47773 from Roriz/feat/custom-header-direct-upload
Active Storageの修正です。
direct uploadでcustom headerを指定する際に、Authorization bearer tokenなどのauthorization tokenをheaderに指定出来るよう修正しています。
rails guideのActive Storage Overview
の修正です。
各箇所の言い回しやタイポの修正を行っています。
fix(ac-redis): rescue BaseConnectionError in redis <5
actioncable/lib/action_cable/subscription_adapter/redis.rb
の修正です。
redis
gem 5未満を使用している場合に、存在しない定数を参照している箇所があったのを修正しています。
Merge pull request #47548 from the-spectator/tagged_logging_example
activesupport/lib/active_support/tagged_logging.rb
のdocの修正です。
TaggedLogging
moduleのdoc内のexampleコードの変数名をより適切な名前に変更しています。
Fix dumping enum definitions from other schemas
activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
の修正です。
PostgreSQLのschema dumpで他のschemaのenumが含まれてしまっていたのを修正しています。
Implement marshal_dump
and marshal_load
on ActiveRecord::Base
Active Recordの修正です。
Ative RecordのmodelをMarshalでserializeした際のフォーマットを変更し、極力Railsとして必要な情報のみを含むよう修正しています。フォーマットの変更はbreaking changeな為、config.active_record.marshalling_format_version
に7.1
、またはload_defaults
に7.1
を指定した場合のみ新しいフォーマットが使用されるようになっています。
背景として、Ruby 3.2でmarshal dumpした際のデータのフォーマットが変わってしまっており、その影響で、特定のパターンのActive Recordのmodelのdeseriazlizeが出来ない、という問題があった為対応したとの事です。
参考:
- Marshalling of Active Record objects can be unpredictably broken on Ruby 3.2
- Bug #19535: Instance variables order is unpredictable on objects with `OBJ_TOO_COMPLEX_SHAPE_ID`
Ensure Inflector
methods return un-frozen strings
activesupport/lib/active_support/inflector/methods.rb
の修正です。
Optimize camelize for single wordの対応によりInflector#camelize、
#underscore`がfrozen Stringを返すようになってしまったのを、un-frozen Stringを返すよう修正しています。frozen Stringだと戻り値を使用している他の処理でエラーになってしまう為。