以下の内容はhttps://y-yagi.hatenablog.com/entry/2025/08/15/052322より取得しました。


rails commit log流し読み(2025/08/14)

2025/08/14分のコミットです。

CHANGELOGにのったコミットは以下の通りです。

actiontext/CHANGELOG.md

activesupport/CHANGELOG.md


docs: document alias_attribute behavior change in Rails 7.2 upgrading guide

rails guideのUpgrading Ruby on Railsの修正です。

Upgrading from Rails 7.1 to Rails 7.2セクションに、alias_attributeが元のatrributeのcustom methodsをbypassするようになった変更についての説明を追加しています。


Merge pull request #53686 from seanpdoyle/action-text-system-test-helper-options

actiontext/lib/action_text/system_test_helper.rbの修正です。

fill_in_rich_text_areaに指定された、fill_in_rich_text_areaで使用しないオプションをCapybaraのfindメソッドにそのまま指定するよう修正しています。id等のfindで使用したいオプションを指定出来るようにする為。


Add Structured Event Reporter

Active Supportの修正です。

構造化された"event"をreportするための"Structured Event Reporter"を追加しています。このrepoterはRails.event経由でアクセス出来るようになっています。

Rails.event.notify("user.signup", user_id: 123, email: "user@example.com")

eventには、tagや、contextを追加出来るようになっています。

Rails.event.tagged("graphql") do
  # eventに`tags: { graphql: true }`が含まれる
  Rails.event.notify("user.signup", user_id: 123, email: "user@example.com")
end

# すべてのeventに`{request_id: "abc123", shop_id: 456}`が含まれるようになる
Rails.event.set_context(request_id: "abc123", shop_id: 456)

eventはsubscriberに送信されるようになっており、subscriberでどのようにeventをserializeするか等を定義出来るようになっています。また、eventをserializeするためのデフォルトのencoderが提供されており、JSONへの変換はそのencoderで行えるようになっています。

class MySubscriber
  def emit(event)
    encoded_event = ActiveSupport::EventReporter.encoder(:json).encode(event)
    StructuredLogExporter.export(encoded_event)
  end
end

Rails.event.subscribe(MySubscriber.new)

Refactor BroadcastLogger; only execute blocks once

Active Support、railtiesの修正です。

ActiveSupport::BroadcastLoggerでログを出力する際、broadcast対象のlogger数分、引数に指定したblockが実行されていたのを、logger数に依存せず一度だけ実行されるよう修正しています。


Merge pull request #54513 from segiddins/segiddins/release-gems-with-attestations-from-github-actions

toolsの修正です。

rails関連のgem及びJS用のパッケージをリリースする際に、sigstoreの署名と証明書をアップロードするよう修正しています。


Active Storage: Remove dangerous transformations

activestorage/lib/active_storage.rbの修正です。

Active Storageでデフォルトでサポートしているtransformation methodsから、コマンドインジェクションなどの、アンセキュアな処理が実行出来てしまう可能性があるメソッド(applyloadersaver)を削除しています。脆弱性対応。

参考:[CVE-2025-24293] Active Storage allowed transformation methods potentially unsafe - Security Announcements - Ruby on Rails Discussions


Call inspect on ids in RecordNotFound error

activerecord/lib/active_record/core.rbactiverecord/lib/active_record/relation/finder_methods.rbの修正です。

findなどのメソッドの引数に存在しないIDが指定された場合に、エラーメッセージにその指定されたIDがエスケープ処理なしでそのまま出力されていたのを、エスケープ処理を行うよう修正しています。IDにエスケープされていないANSIシーケンスが含まれている場合に、端末にそのまま出力されるのを避ける為。脆弱性対応。

参考:[CVE-2025-55193] ANSI escape injection in Active Record logging - Security Announcements - Ruby on Rails Discussions


Merge pull request #53199 from bogdan/time-zone-standard-name

activesupport/lib/active_support/values/time_zone.rbの修正です。

ActiveSupport::TimeZoneに、IANAで定義されているstandard time zone nameを返す、ActiveSupport::TimeZone#standard_nameメソッドを追加しています。

zone = ActiveSupport::TimeZone['Hawaii']

# before
ActiveSupport::TimeZone::MAPPING[zone.name]  #=> 'Pacific/Honolulu'

# aftr
zone.standard_name # => 'Pacific/Honolulu'

Bump RuboCop to fix some transient failures

RuboCopを最新バージョンに更新、及び、Rubocopのチェックでエラーになるコードがあったのを修正しています


Add cgi gem to Gemfile until newer rouge gem is released

Gemfileの修正です。

cgi gemを依存に追加しています。 Ruby 3.5でRuby本体からcgi gemが削除されるのですが、rouge gemがcgi gemに依存しており、その影響でテストがfailしてしまっているので、一時的にcgi gemを依存に追加しています。

参考:Feature #21258: Retire CGI library from Ruby 3.5 - Ruby - Ruby Issue Tracking System


Replace America/Godthab with America/Nuuk

activesupport/lib/active_support/values/time_zone.rbの修正です。

America/GodthabAmerica/Nuukに変更しています。America/Godthabは正規のtimezoneではなく、Debianではtzdata経由で取得しないtimezoneになっている為。




以上の内容はhttps://y-yagi.hatenablog.com/entry/2025/08/15/052322より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14