{"action":"created","comment":{"url":"https://api.github.com/repos/rails/rails/pulls/comments/76595026","id":76595026,"diff_hunk":"@@ -35,6 +41,29 @@ def test_deliver_is_notified\n     BaseMailer.deliveries.clear\n   end\n \n+  def test_deliver_is_notified_when_exception_is_raised\n+    @original_delivery_method = ActionMailer::Base.delivery_method\n+    ActionMailer::Base.delivery_method = ExceptionDelivery\n+\n+    mail = BaseMailer.welcome\n+    assert_raise Net::SMTPAuthenticationError do\n+      mail.deliver_now\n+    end\n+    wait\n+\n+    assert_equal(0, @logger.logged(:info).size)\n+\n+    assert_equal(1, @logger.logged(:error).size)\n+    assert_match(/Net::SMTPAuthenticationError was raised when sending mail to system@test.lindsaar.net/, @logger.logged(:error).first)","path":"actionmailer/test/log_subscriber_test.rb","position":30,"original_position":30,"commit_id":"ba8722dd1522a01fdc7ed01ac9fa12178d806eb2","original_commit_id":"ba8722dd1522a01fdc7ed01ac9fa12178d806eb2","user":{"login":"eileencodes","id":1080678,"avatar_url":"https://avatars.githubusercontent.com/u/1080678?v=3","gravatar_id":"","url":"https://api.github.com/users/eileencodes","html_url":"https://github.com/eileencodes","followers_url":"https://api.github.com/users/eileencodes/followers","following_url":"https://api.github.com/users/eileencodes/following{/other_user}","gists_url":"https://api.github.com/users/eileencodes/gists{/gist_id}","starred_url":"https://api.github.com/users/eileencodes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eileencodes/subscriptions","organizations_url":"https://api.github.com/users/eileencodes/orgs","repos_url":"https://api.github.com/users/eileencodes/repos","events_url":"https://api.github.com/users/eileencodes/events{/privacy}","received_events_url":"https://api.github.com/users/eileencodes/received_events","type":"User","site_admin":false},"body":"Can this use assert_equal instead of assert_match?","created_at":"2016-08-29T12:01:07Z","updated_at":"2016-08-29T12:01:07Z","html_url":"https://github.com/rails/rails/pull/19353#discussion_r76595026","pull_request_url":"https://api.github.com/repos/rails/rails/pulls/19353","_links":{"self":{"href":"https://api.github.com/repos/rails/rails/pulls/comments/76595026"},"html":{"href":"https://github.com/rails/rails/pull/19353#discussion_r76595026"},"pull_request":{"href":"https://api.github.com/repos/rails/rails/pulls/19353"}}},"pull_request":{"url":"https://api.github.com/repos/rails/rails/pulls/19353","id":31225046,"html_url":"https://github.com/rails/rails/pull/19353","diff_url":"https://github.com/rails/rails/pull/19353.diff","patch_url":"https://github.com/rails/rails/pull/19353.patch","issue_url":"https://api.github.com/repos/rails/rails/issues/19353","number":19353,"state":"open","locked":false,"title":"Write log with level :error when an exception got raised when trying to deliver an email.","user":{"login":"ignatiusreza","id":667726,"avatar_url":"https://avatars.githubusercontent.com/u/667726?v=3","gravatar_id":"","url":"https://api.github.com/users/ignatiusreza","html_url":"https://github.com/ignatiusreza","followers_url":"https://api.github.com/users/ignatiusreza/followers","following_url":"https://api.github.com/users/ignatiusreza/following{/other_user}","gists_url":"https://api.github.com/users/ignatiusreza/gists{/gist_id}","starred_url":"https://api.github.com/users/ignatiusreza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ignatiusreza/subscriptions","organizations_url":"https://api.github.com/users/ignatiusreza/orgs","repos_url":"https://api.github.com/users/ignatiusreza/repos","events_url":"https://api.github.com/users/ignatiusreza/events{/privacy}","received_events_url":"https://api.github.com/users/ignatiusreza/received_events","type":"User","site_admin":false},"body":"Before:\r\n\r\n>  \"Sent mail to [recipients]\" got written even when we fail to deliver.\r\n\r\nAfter:\r\n\r\n>  \"[exception_class] was raised when sending mail to [recipients]\" will be written\r\n\r\nThis changes helps in understanding which emails got delivered and which emails does not when parsing hundreds of lines of mailer logs. Current behavior is misleading, because \"Sent mail to\" gives of the sense that emails got successfully sent, even when it's not.","created_at":"2015-03-16T08:45:46Z","updated_at":"2016-08-29T12:01:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fe9011822ee6479324245e4e019617e452eb2107","assignee":{"login":"rafaelfranca","id":47848,"avatar_url":"https://avatars.githubusercontent.com/u/47848?v=3","gravatar_id":"","url":"https://api.github.com/users/rafaelfranca","html_url":"https://github.com/rafaelfranca","followers_url":"https://api.github.com/users/rafaelfranca/followers","following_url":"https://api.github.com/users/rafaelfranca/following{/other_user}","gists_url":"https://api.github.com/users/rafaelfranca/gists{/gist_id}","starred_url":"https://api.github.com/users/rafaelfranca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rafaelfranca/subscriptions","organizations_url":"https://api.github.com/users/rafaelfranca/orgs","repos_url":"https://api.github.com/users/rafaelfranca/repos","events_url":"https://api.github.com/users/rafaelfranca/events{/privacy}","received_events_url":"https://api.github.com/users/rafaelfranca/received_events","type":"User","site_admin":false},"assignees":[{"login":"rafaelfranca","id":47848,"avatar_url":"https://avatars.githubusercontent.com/u/47848?v=3","gravatar_id":"","url":"https://api.github.com/users/rafaelfranca","html_url":"https://github.com/rafaelfranca","followers_url":"https://api.github.com/users/rafaelfranca/followers","following_url":"https://api.github.com/users/rafaelfranca/following{/other_user}","gists_url":"https://api.github.com/users/rafaelfranca/gists{/gist_id}","starred_url":"https://api.github.com/users/rafaelfranca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rafaelfranca/subscriptions","organizations_url":"https://api.github.com/users/rafaelfranca/orgs","repos_url":"https://api.github.com/users/rafaelfranca/repos","events_url":"https://api.github.com/users/rafaelfranca/events{/privacy}","received_events_url":"https://api.github.com/users/rafaelfranca/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/rails/rails/pulls/19353/commits","review_comments_url":"https://api.github.com/repos/rails/rails/pulls/19353/comments","review_comment_url":"https://api.github.com/repos/rails/rails/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rails/rails/issues/19353/comments","statuses_url":"https://api.github.com/repos/rails/rails/statuses/ba8722dd1522a01fdc7ed01ac9fa12178d806eb2","head":{"label":"ignatiusreza:action_mailer_log_subscriber_on_exception","ref":"action_mailer_log_subscriber_on_exception","sha":"ba8722dd1522a01fdc7ed01ac9fa12178d806eb2","user":{"login":"ignatiusreza","id":667726,"avatar_url":"https://avatars.githubusercontent.com/u/667726?v=3","gravatar_id":"","url":"https://api.github.com/users/ignatiusreza","html_url":"https://github.com/ignatiusreza","followers_url":"https://api.github.com/users/ignatiusreza/followers","following_url":"https://api.github.com/users/ignatiusreza/following{/other_user}","gists_url":"https://api.github.com/users/ignatiusreza/gists{/gist_id}","starred_url":"https://api.github.com/users/ignatiusreza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ignatiusreza/subscriptions","organizations_url":"https://api.github.com/users/ignatiusreza/orgs","repos_url":"https://api.github.com/users/ignatiusreza/repos","events_url":"https://api.github.com/users/ignatiusreza/events{/privacy}","received_events_url":"https://api.github.com/users/ignatiusreza/received_events","type":"User","site_admin":false},"repo":{"id":32310754,"name":"rails","full_name":"ignatiusreza/rails","owner":{"login":"ignatiusreza","id":667726,"avatar_url":"https://avatars.githubusercontent.com/u/667726?v=3","gravatar_id":"","url":"https://api.github.com/users/ignatiusreza","html_url":"https://github.com/ignatiusreza","followers_url":"https://api.github.com/users/ignatiusreza/followers","following_url":"https://api.github.com/users/ignatiusreza/following{/other_user}","gists_url":"https://api.github.com/users/ignatiusreza/gists{/gist_id}","starred_url":"https://api.github.com/users/ignatiusreza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ignatiusreza/subscriptions","organizations_url":"https://api.github.com/users/ignatiusreza/orgs","repos_url":"https://api.github.com/users/ignatiusreza/repos","events_url":"https://api.github.com/users/ignatiusreza/events{/privacy}","received_events_url":"https://api.github.com/users/ignatiusreza/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ignatiusreza/rails","description":"Ruby on Rails","fork":true,"url":"https://api.github.com/repos/ignatiusreza/rails","forks_url":"https://api.github.com/repos/ignatiusreza/rails/forks","keys_url":"https://api.github.com/repos/ignatiusreza/rails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ignatiusreza/rails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ignatiusreza/rails/teams","hooks_url":"https://api.github.com/repos/ignatiusreza/rails/hooks","issue_events_url":"https://api.github.com/repos/ignatiusreza/rails/issues/events{/number}","events_url":"https://api.github.com/repos/ignatiusreza/rails/events","assignees_url":"https://api.github.com/repos/ignatiusreza/rails/assignees{/user}","branches_url":"https://api.github.com/repos/ignatiusreza/rails/branches{/branch}","tags_url":"https://api.github.com/repos/ignatiusreza/rails/tags","blobs_url":"https://api.github.com/repos/ignatiusreza/rails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ignatiusreza/rails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ignatiusreza/rails/git/refs{/sha}","trees_url":"https://api.github.com/repos/ignatiusreza/rails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ignatiusreza/rails/statuses/{sha}","languages_url":"https://api.github.com/repos/ignatiusreza/rails/languages","stargazers_url":"https://api.github.com/repos/ignatiusreza/rails/stargazers","contributors_url":"https://api.github.com/repos/ignatiusreza/rails/contributors","subscribers_url":"https://api.github.com/repos/ignatiusreza/rails/subscribers","subscription_url":"https://api.github.com/repos/ignatiusreza/rails/subscription","commits_url":"https://api.github.com/repos/ignatiusreza/rails/commits{/sha}","git_commits_url":"https://api.github.com/repos/ignatiusreza/rails/git/commits{/sha}","comments_url":"https://api.github.com/repos/ignatiusreza/rails/comments{/number}","issue_comment_url":"https://api.github.com/repos/ignatiusreza/rails/issues/comments{/number}","contents_url":"https://api.github.com/repos/ignatiusreza/rails/contents/{+path}","compare_url":"https://api.github.com/repos/ignatiusreza/rails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ignatiusreza/rails/merges","archive_url":"https://api.github.com/repos/ignatiusreza/rails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ignatiusreza/rails/downloads","issues_url":"https://api.github.com/repos/ignatiusreza/rails/issues{/number}","pulls_url":"https://api.github.com/repos/ignatiusreza/rails/pulls{/number}","milestones_url":"https://api.github.com/repos/ignatiusreza/rails/milestones{/number}","notifications_url":"https://api.github.com/repos/ignatiusreza/rails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ignatiusreza/rails/labels{/name}","releases_url":"https://api.github.com/repos/ignatiusreza/rails/releases{/id}","deployments_url":"https://api.github.com/repos/ignatiusreza/rails/deployments","created_at":"2015-03-16T08:23:48Z","updated_at":"2016-03-29T00:15:17Z","pushed_at":"2016-08-29T02:00:14Z","git_url":"git://github.com/ignatiusreza/rails.git","ssh_url":"git@github.com:ignatiusreza/rails.git","clone_url":"https://github.com/ignatiusreza/rails.git","svn_url":"https://github.com/ignatiusreza/rails","homepage":"http://rubyonrails.org","size":132994,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rails:master","ref":"master","sha":"8d251029cefaad559fb92c3ac529c6d490e4d280","user":{"login":"rails","id":4223,"avatar_url":"https://avatars.githubusercontent.com/u/4223?v=3","gravatar_id":"","url":"https://api.github.com/users/rails","html_url":"https://github.com/rails","followers_url":"https://api.github.com/users/rails/followers","following_url":"https://api.github.com/users/rails/following{/other_user}","gists_url":"https://api.github.com/users/rails/gists{/gist_id}","starred_url":"https://api.github.com/users/rails/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rails/subscriptions","organizations_url":"https://api.github.com/users/rails/orgs","repos_url":"https://api.github.com/users/rails/repos","events_url":"https://api.github.com/users/rails/events{/privacy}","received_events_url":"https://api.github.com/users/rails/received_events","type":"Organization","site_admin":false},"repo":{"id":8514,"name":"rails","full_name":"rails/rails","owner":{"login":"rails","id":4223,"avatar_url":"https://avatars.githubusercontent.com/u/4223?v=3","gravatar_id":"","url":"https://api.github.com/users/rails","html_url":"https://github.com/rails","followers_url":"https://api.github.com/users/rails/followers","following_url":"https://api.github.com/users/rails/following{/other_user}","gists_url":"https://api.github.com/users/rails/gists{/gist_id}","starred_url":"https://api.github.com/users/rails/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rails/subscriptions","organizations_url":"https://api.github.com/users/rails/orgs","repos_url":"https://api.github.com/users/rails/repos","events_url":"https://api.github.com/users/rails/events{/privacy}","received_events_url":"https://api.github.com/users/rails/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rails/rails","description":"Ruby on Rails","fork":false,"url":"https://api.github.com/repos/rails/rails","forks_url":"https://api.github.com/repos/rails/rails/forks","keys_url":"https://api.github.com/repos/rails/rails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rails/rails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rails/rails/teams","hooks_url":"https://api.github.com/repos/rails/rails/hooks","issue_events_url":"https://api.github.com/repos/rails/rails/issues/events{/number}","events_url":"https://api.github.com/repos/rails/rails/events","assignees_url":"https://api.github.com/repos/rails/rails/assignees{/user}","branches_url":"https://api.github.com/repos/rails/rails/branches{/branch}","tags_url":"https://api.github.com/repos/rails/rails/tags","blobs_url":"https://api.github.com/repos/rails/rails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rails/rails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rails/rails/git/refs{/sha}","trees_url":"https://api.github.com/repos/rails/rails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rails/rails/statuses/{sha}","languages_url":"https://api.github.com/repos/rails/rails/languages","stargazers_url":"https://api.github.com/repos/rails/rails/stargazers","contributors_url":"https://api.github.com/repos/rails/rails/contributors","subscribers_url":"https://api.github.com/repos/rails/rails/subscribers","subscription_url":"https://api.github.com/repos/rails/rails/subscription","commits_url":"https://api.github.com/repos/rails/rails/commits{/sha}","git_commits_url":"https://api.github.com/repos/rails/rails/git/commits{/sha}","comments_url":"https://api.github.com/repos/rails/rails/comments{/number}","issue_comment_url":"https://api.github.com/repos/rails/rails/issues/comments{/number}","contents_url":"https://api.github.com/repos/rails/rails/contents/{+path}","compare_url":"https://api.github.com/repos/rails/rails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rails/rails/merges","archive_url":"https://api.github.com/repos/rails/rails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rails/rails/downloads","issues_url":"https://api.github.com/repos/rails/rails/issues{/number}","pulls_url":"https://api.github.com/repos/rails/rails/pulls{/number}","milestones_url":"https://api.github.com/repos/rails/rails/milestones{/number}","notifications_url":"https://api.github.com/repos/rails/rails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rails/rails/labels{/name}","releases_url":"https://api.github.com/repos/rails/rails/releases{/id}","deployments_url":"https://api.github.com/repos/rails/rails/deployments","created_at":"2008-04-11T02:19:47Z","updated_at":"2016-08-29T09:40:27Z","pushed_at":"2016-08-29T10:55:00Z","git_url":"git://github.com/rails/rails.git","ssh_url":"git@github.com:rails/rails.git","clone_url":"https://github.com/rails/rails.git","svn_url":"https://github.com/rails/rails","homepage":"http://rubyonrails.org","size":344546,"stargazers_count":32602,"watchers_count":32602,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":13261,"mirror_url":null,"open_issues_count":1128,"forks":13261,"open_issues":1128,"watchers":32602,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rails/rails/pulls/19353"},"html":{"href":"https://github.com/rails/rails/pull/19353"},"issue":{"href":"https://api.github.com/repos/rails/rails/issues/19353"},"comments":{"href":"https://api.github.com/repos/rails/rails/issues/19353/comments"},"review_comments":{"href":"https://api.github.com/repos/rails/rails/pulls/19353/comments"},"review_comment":{"href":"https://api.github.com/repos/rails/rails/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rails/rails/pulls/19353/commits"},"statuses":{"href":"https://api.github.com/repos/rails/rails/statuses/ba8722dd1522a01fdc7ed01ac9fa12178d806eb2"}}}}
{"actor":{"display_login":"eileencodes"}}