なるようになるブログ

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

rails commit log流し読み(2018/12/28)

2018/12/28分のコミットです。

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

activestorage/CHANGELOG.md

actionmailer/CHANGELOG.md


Don’t include an undefined X-CSRF-Token header

activestorage/app/assets/javascripts/activestorage.jsの修正です。

Active Storageのdirect upload処理で、HTMLにcsrf-tokenメタタグが無い場合、X-CSRF-Tokenヘッダーを付与しないよう修正しています。


Enable Lint/ShadowingOuterLocalVariable cop to avoid newly adding the warning

Lint/ShadowingOuterLocalVariable copを追加しています。


Remove redundant assignning to current_env

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

重複して行われていたcurrent_env変数への値の設定を削除しています。


Deprecate passing migrations_paths to connection.assume_migrated_upto_version

activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rbactiverecord/lib/active_record/schema.rbの修正です。

assume_migrated_upto_versionメソッドのmigrations_paths引数がdeprecateになりました。

Refactor migration to move migrations paths to connection以降、使用されていない為。


Use high level API on migration_context instead of using low level API directly

activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rbactiverecord/lib/active_record/migration.rbの修正です。

assume_migrated_upto_versionメソッドでmigrationのversionを取得するのに、migration filesを明示的に指定 + parse_migration_filenameメソッドを使用して値を取得していたのを、migrationsメソッドを経由して値を取得するよう修正しています。


Deprecate ActionMailer::Base.receive in favor of Action Mailbox

Action Mailerの修正です。

ActionMailer::Base.receiveメソッドがdeprecateになりました。Action Mailboxが導入されたので、今後はそちらを使ってねとの事です。


Load Action Mailbox when other components are skipped

railties/lib/rails/generators/rails/app/templates/config/application.rb.ttの修正です。

rails/allをrequireしない時にもaction_mailbox/engineがrequireされるよう修正しています。


Don't load Action Mailbox when Active Record is skipped

railties/lib/rails/generators/app_base.rbrailties/lib/rails/generators/rails/app/templates/config/application.rb.ttの修正です。

skip_active_recordオプションが指定された際にaction_mailbox/engineをrequireしないよう修正しています。Action MailboxはActive Recordに依存している為。


Add missing quotes on Mailbox test template

actionmailbox/lib/rails/generators/test_unit/templates/mailbox_test.rb.ttの修正です。

Action Mailboxのgeneratorが生成するテストファイルで、クォートが不足している箇所があったのを修正しています。


Fix broken Mailbox generator test

actionmailbox/test/generators/mailbox_generator_test.rbの修正です。

先のテストファイルの修正で、テストの修正が漏れていたのを対応しています。


Remove mention about receive.action_mailer from the AS instrumentation guide

actionmailer/test/log_subscriber_test.rb、guides/source/active_support_instrumentation.md`の修正です。

Deprecate ActionMailer::Base.receive in favor of Action Mailboxのfollow upとして、テストでActionMailer::Base.receiveを使用した場合にdeprecateメッセージが出る事を確認するよう修正、Active Support Instrumentation guideからreceive.action_mailer hookの削除を行っています。