なるようになるブログ

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

rails commit log流し読み(2019/11/04)

2019/11/04分のコミットです。

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

actionpack/CHANGELOG.md


Fix "warning: instance variable @db_config not initialized"

railties/lib/rails/commands/dbconsole/dbconsole_command.rbの修正です。

"instance variable @db_config not initialized"のwarningが出ていたのを対応しています。


Add :location to process_action.action_controller payloads

actionpack/lib/action_controller/metal/instrumentation.rbの修正です。

process_action.action_controller notificationのpayloadに、Location headerの値を含むよう修正しています。

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

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

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


Fix multi-threaded issue for AcceptanceValidator

activemodel/lib/active_model/validations/acceptance.rbの修正です。

AcceptanceValidatorでattr methodの追加やmethod_missing等のメソッドの削除を行う際にmutexで排他制御するよう修正しています。複数スレッドで処理を行う際に正しく動作するようにする為。

rails commit log流し読み(2019/11/02)

2019/11/02分のコミットです。

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


Merge pull request #37601 from Edouard-chin/ec-reset-connection-when-migrating

activerecord/lib/active_record/railties/databases.rakeの修正です。

db:migrate taskで、各コネクションに対するmigration実行後に、DBのコネクションをtask実行前に接続していたコネクションに再接続するよう修正しています。


Appease rubocop

railties/test/application/rake/multi_dbs_test.rbの修正です。

rubocopの設定に違反している箇所があったのを修正しています。


Run inline jobs in separate threads

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

inline jobを個別のスレッドで実行するよう修正しています。

current attributesのようなスレッドローカル変数を使用している場合に、他のjobに値が影響しないようにする為。

rails commit log流し読み(2019/11/01)

2019/11/01分のコミットです。

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


Cache gems for GitHub Actions

.github/workflows/rubocop.ymlの修正です。

actions/cacheを使用して、GitHub Actionsでインストールしたgemsをcacheするよう修正しています。

rails commit log流し読み(2019/10/31)

2019/10/31分のコミットです。

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

actionmailer/CHANGELOG.md


Avoid using require_dependency is Zeitwerk is enabled

activestorage/app/models/active_storage/blob.rbの修正です。

Zeitwerkが使用されている場合、blobの各ファイルをロードするのにrequire_dependencyを使用しないよう修正しています。

Zeitwerkを使用していてconfig.add_autoload_paths_to_load_pathを無効化していた場合require_dependencyだとロード処理に失敗する、かつ、元々あったblobファイルのロード処理はclassic loaderの為の処理で、Zeitwerkを使用している場合は不要な為。


Correctly deprecate where.not working as NOR for relations:

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

relationをqueryにwhere.not(relation: { })のように指定した場合に、where.notがNORとして機能しなくなる旨のdeprecateメッセージが正しく表示されないバグがあったのを修正しています。


Improve deprecation message for nested where.not condition

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

where.notがNORとして機能しなくなる旨表示するdeprecateメッセージで、where.notの引数がネストしていた場合の修正方法についての詳細を表示するよう修正しています。


Fix random CI failure due to non-deterministic sorting order

activerecord/test/cases/associations/has_many_associations_test.rbの修正です。

assertionで値を比較する際に、値をidでsortしてからチェックするよう修正しています。 sortを指定しないと結果が不定になる為。


Fix ActionMailer assertions don't work for parameterized mail with legacy delivery job

actionmailer/lib/action_mailer/test_helper.rbの修正です。

Action Mailerのassetionsが古いdeplivery jobを使用している場合に正しく動作しないバグがあったのを修正しています。


Enabled GitHub Actions to run the latest RuboCop 0.76.0

RuboCopのバージョンを0.76.0に更新、及び、RuboCopの実行時にCode Climateを使用していたのを、GitHub Actionsを使用するよう修正しています。

Code ClimateだとRuboCopの最新バージョンが使用出来るようになるまで時間が掛かる、masterへの直pushだとチェックが実行されない、等の問題があった為。


Merge pull request #37602 from Edouard-chin/ec-fix-activejob-integration-test

activejob/test/helper.rbの修正です。

activejob integration test実行時にAJ_ADAPTERが設定されていない場合、inline adapterでテストを実行するよう修正しています。

rails commit log流し読み(2019/10/30)

2019/10/30分のコミットです。

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


Duplicate the cached value before writing it in the local cache

activesupport/lib/active_support/cache/strategy/local_cache.rbの修正です。

local cacheのwriteメソッドでデフォルト値を格納する前に値をdupするよう修正しています。

指定された値が変更された場合に、取得する値が変わってしまうのを避ける為。


Fix typo guides/source/configuring.md

rails guideのConfiguring Rails Applicationsの修正です。

ActionController::BaseActionController:Baseにタイポしていたのを修正しています。


Remove unused requires

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

使用していないrequireを削除しています。

rails commit log流し読み(2019/10/29)

2019/10/29分のコミットです。

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


Fix typo in ACa documentation [ci skip]

actioncable/app/javascript/action_cable/subscriptions.jsのdocの修正です。

Subscriptionのdoc内のタイポを修正、及び、適切な位置に改行を追加しています。