なるようになるブログ

読書感想文かrailsについてかrubyについてか

rails commit log流し読み(2019/03/23)

2019/03/23分のコミットです。

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

activesupport/CHANGELOG.md


Fix rails guides generation

guides/rails_guides/generator.rbの修正です。

renderメソッドのformats引数にStringのArrayを渡していたのを、SymbolのArrayを渡すよう修正しています。Symbolが来ることを想定しておりStringだとMerge pull request #35661 from jhawthorn/lookup_context_validationで追加されたformatチェックエラーになってしまう為。


Merge pull request #35705 from alimi/instrumenter-block-optional

activesupport/lib/active_support/notifications/instrumenter.rbの修正です。

ActiveSupport::Notifications::Instrumenter#instrumentへのblockの指定をoptionalにしています。

ActiveSupport::Notificationsをメッセージングとして使うため、との事です。

例。

ActiveSupport::Notifications.instrument "my.custom.event", this: :data

ActiveSupport::Notifications.subscribe "my.custom.event" do |name, started, finished, unique_id, data|
  puts data.inspect # {:this=>:data}
end

Fix AS CHANGELOG typo

activesupport/CHANGELOG.mdの修正です。

先ほど追加されたCHANGELOGのエントリーでクォートが不足していたのを修正しています。


Update CHANGELOGs for 6.0.0.beta3 release

actionview/CHANGELOG.mdrailties/CHANGELOG.mdの修正です。

Merge tag 'v6.0.0.beta3'で行われたCVEの対応について、CHANGELOGにエントリーを追加しています。


Drop microseconds in job argument assertions

activejob/lib/active_job/test_helper.rbの修正です。

Active Jobのtest helperで、引数がTime, ActiveSupport::TimeWithZone, または DateTimeだった場合に、強制的にmicrosecondsの値を0にするよう修正しています。

jobのserialization処理でmicrosecond precisionは失われてしまい、チェックが出来ない為。


Update comment for how secret key is calculated

railties/lib/rails/application.rbのdocの修正です。

secret_key_baseメソッドにのdocで、testとdevelopment環境で生成されるsecret keyについての説明が実際の内容と異なっていたのを修正しています。


[ci skip] Fixed typo

actionview/CHANGELOG.mdの修正です。

CHANGELOGのエントリーのグラマーの修正を行っています。


Merge pull request #35683 from Kukunin/master

activerecord/lib/active_record/autosave_association.rbの修正です。

has_one through association + associationに外部キーが含まれている場合に、recordが変更されてないのにも関わらず、record_changed?がtrueを返してしまうケースがあったのを修正しています。


Depend on Zeitwerk 1.4.2

activesupport/activesupport.gemspecの修正です。

Zeitwerkのバージョンを>= 1.4.2に修正しています。


Avoid creating ActionText::RichText records unnecessarily

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

ActionText::RichTextのデータが無い状態で、rich-text attributeのreadを行うと、その時点でテーブルが作成されてしまっていたのを、read処理ではテーブルの作成が行われないよう修正しています。