なるようになるブログ

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

rails commit log流し読み(2018/06/29)

2018/06/29分のコミットです。

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

activesupport/CHANGELOG.md

actionmailer/CHANGELOG.md

activejob/CHANGELOG.md


Tweak Previewer::PopplerPDFPreviewer#pdftoppm_exists?

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

Previewer::PopplerPDFPreviewer#pdftoppm_exists?メソッドで@pdftoppm_existsが定義されているかをチェックするのに、nil?メソッドを使用していたのを、defined?を使用するよ修正しています。

@pdftoppm_existsは初期化がされていない為、nil?でチェックするとRubyのwarning(instance variable @pdftoppm_exists not initialized)が表示されてしまう為。


Add :expires_in option support for RedisCacheStore increment/decrement method.

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

RedisCacheStoreincrement / decrementメソッドにexpires_inオプションを指定出来るよう修正しています。

指定されたcounterが存在しない時(新規に作成したcounterの場合)のみ、expires_inオプションに指定された値がRedis EXPIREとして指定されるようになっています。


Incompatibility of Direct Uploads & Mirror Service

rails guideのActive Storage Overviewの修正です。

Mirror Serviceの項に、Mirror Serviceを指定している場合Direct Uploadsは使えない旨注記を追加しています。


Merge pull request #33238 from dikond/explicit_action_mailer_deliver_later_queue_name

rails guideのAction Mailer Basicsの修正です。

Calling the Mailerの項に、Action Mailerがデフォルトで使用するqueueについての説明、及び、そのqueueを変更する方法についての説明を追加しています。


Allow call assert_enqueued_with and assert_enqueued_email_with with no block

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

assert_enqueued_email_withassert_enqueued_withメソッドが、blockを指定しないでも正しく動作するよう修正しています。

Fix ActionMailer assert_enqueued_email_withの対応と異なり、blockの指定が無い場合はenqueueされているjobを即座に取得するようにし、assertionが通るように対応しています。


Fix docs of assert_no_emails [ci skip]

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

assert_no_emailsのdoc内、assert_no_emailsがショートカットとなるメソッドについて説明している箇所で、引数の指定が不足していたのを修正しています。