なるようになるブログ

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

rails commit log流し読み(2023/09/28)

2023/09/28分のコミットです。

CHANGELOGへの追加はありませんでした。


Make sure scheduled_at is a Time object when asserting enqueued jobs

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

Active Job用のtest helperでjobのdeserialize時にscheduled_atをTime objectに変換するよう修正しています。Set, serialize, and deserialize Active Job scheduled_at as Time; deserialize enqueued_at as Time; deprecate setting scheduled_at= with numeric/epochの対応によりdeserialize後はTime objectになっている事を期待されるようになっているため。


Use id in favor of send(primary_key)

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

RecordNotDestroyedのexceptionを生成する際に、primary keyを取得するのにsend(primary_keyを使用していたのをidを使用するよう修正しています。


Enable raising when running rubocop-md against invalid ruby snippets

rubocop-mdが不正なRubyのsnippetを検出した場合にexceptionをraiseするよう設定を変更、及び、このチェックによりエラーになるようになったsnippetをまとめて修正しています。


Document hierarchy for retry_on and discard_on

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

retry_on及びdiscard_onはクラス階層の下から検索されていく旨説明を追加しています。


Merge pull request #49394 from johanstenberg92/fix-method-documentation-for-attempts-retry-on [ci skip]

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

ActiveJob::Exceptions::ClassMethods#retry_on:attemptsオプションについて説明している箇所に、attemptsの回数には最初にjobを実行した回数も含まれる旨説明を追加しています。


Fix RenderCallExtractor to be compatible with Ruby 3.3

actionview/lib/action_view/ripper_ast_parser.rbの修正です。。

RenderCallExtractorRuby 3.3で正しく結果を取得出来ないバグがあったのを修正しています。


Move the database version cache from schema cache to pool config

Active Recordの修正です。

database version cacheをschema cacheからpool configに移動しています。

database versionがschema cacheにある都合上、versionのチェック処理と、schema cacheのチェック処理が互いに依存する実装になってしまっていました。しかし、DB serverのupgrade(database versionが変わるタイミング)は、schema cacheの再生性とは独立している処理の為、schema cacheにdatabase versionを保持するのはおかしいのでは、という事になり、pool configで保持するよう修正したようです。


Merge pull request #49409 from stevepolitodesign/sp-datetime-local-scaffold

railties/lib/rails/generators/test_unit/scaffold/scaffold_generator.rbの修正です。

scaffold generatorでsystem testを生成する際に、datetime及びtime attributeに対するテストが失敗する内容になっていた(値を正しく入力出来なかった)のを修正しています。


Fix the wrong markdown hightlighting [skip ci]

docの修正です。

markdownのlangの指定が誤っている箇所があったのを修正しています。