{"action":"created","comment":{"url":"https://api.github.com/repos/interagent/pliny/pulls/comments/65782111","id":65782111,"diff_hunk":"@@ -14,29 +13,35 @@ def self.notify(exception, context: {}, rack_env: {})\n     end\n   end\n \n-  class RollbarReporter\n-    include ::Rollbar::ExceptionReporter\n-    include ::Rollbar::RequestDataExtractor\n+  begin","path":"lib/pliny/error_reporter.rb","position":17,"original_position":17,"commit_id":"f6b5dd82e671f71daa8c8e781a7e76819fda6580","original_commit_id":"f6b5dd82e671f71daa8c8e781a7e76819fda6580","user":{"login":"brandur","id":96890,"avatar_url":"https://avatars.githubusercontent.com/u/96890?v=3","gravatar_id":"","url":"https://api.github.com/users/brandur","html_url":"https://github.com/brandur","followers_url":"https://api.github.com/users/brandur/followers","following_url":"https://api.github.com/users/brandur/following{/other_user}","gists_url":"https://api.github.com/users/brandur/gists{/gist_id}","starred_url":"https://api.github.com/users/brandur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brandur/subscriptions","organizations_url":"https://api.github.com/users/brandur/orgs","repos_url":"https://api.github.com/users/brandur/repos","events_url":"https://api.github.com/users/brandur/events{/privacy}","received_events_url":"https://api.github.com/users/brandur/received_events","type":"User","site_admin":false},"body":"+1. The best I can up with is moving the reporter to its own file as suggested below, and then just load and configure it from an initializer:\r\n\r\n``` ruby\r\nrequire 'lib/pliny/error_reporters/rollbar'\r\nPliny::ErrorReporters << Pliny::RollbarLogger.new\r\n\r\nRollbar.configure do |config|\r\n  config.enabled = ENV.has_key?('ROLLBAR_ACCESS_TOKEN')\r\n...\r\n```\r\n\r\n(Or something.)","created_at":"2016-06-03T22:00:40Z","updated_at":"2016-06-03T22:00:40Z","html_url":"https://github.com/interagent/pliny/pull/274#discussion_r65782111","pull_request_url":"https://api.github.com/repos/interagent/pliny/pulls/274","_links":{"self":{"href":"https://api.github.com/repos/interagent/pliny/pulls/comments/65782111"},"html":{"href":"https://github.com/interagent/pliny/pull/274#discussion_r65782111"},"pull_request":{"href":"https://api.github.com/repos/interagent/pliny/pulls/274"}}},"pull_request":{"url":"https://api.github.com/repos/interagent/pliny/pulls/274","id":72259519,"html_url":"https://github.com/interagent/pliny/pull/274","diff_url":"https://github.com/interagent/pliny/pull/274.diff","patch_url":"https://github.com/interagent/pliny/pull/274.patch","issue_url":"https://api.github.com/repos/interagent/pliny/issues/274","number":274,"state":"open","locked":false,"title":"Make Rollbar dependency optional","user":{"login":"fdr","id":7191,"avatar_url":"https://avatars.githubusercontent.com/u/7191?v=3","gravatar_id":"","url":"https://api.github.com/users/fdr","html_url":"https://github.com/fdr","followers_url":"https://api.github.com/users/fdr/followers","following_url":"https://api.github.com/users/fdr/following{/other_user}","gists_url":"https://api.github.com/users/fdr/gists{/gist_id}","starred_url":"https://api.github.com/users/fdr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fdr/subscriptions","organizations_url":"https://api.github.com/users/fdr/orgs","repos_url":"https://api.github.com/users/fdr/repos","events_url":"https://api.github.com/users/fdr/events{/privacy}","received_events_url":"https://api.github.com/users/fdr/received_events","type":"User","site_admin":false},"body":"Previously, one could use Pliny with no error tracker or other error\r\ntrackers, but in 0.17.0 requiring Pliny will crash if one has removed\r\nRollbar.\r\n\r\nTo fix this, use a conditional class definition to fix this.\r\n\r\n\r\nIncidentally, I'm still testing this out, but running the specs is broken from missing mocking symbols, per #273...so I'm abusing the Travis buildfarm to test.","created_at":"2016-06-01T22:00:13Z","updated_at":"2016-06-03T22:00:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"67e6291fdfb400f0b863f894f946e525e0432767","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/interagent/pliny/pulls/274/commits","review_comments_url":"https://api.github.com/repos/interagent/pliny/pulls/274/comments","review_comment_url":"https://api.github.com/repos/interagent/pliny/pulls/comments{/number}","comments_url":"https://api.github.com/repos/interagent/pliny/issues/274/comments","statuses_url":"https://api.github.com/repos/interagent/pliny/statuses/f6b5dd82e671f71daa8c8e781a7e76819fda6580","head":{"label":"fdr:fdr-no-rollbar","ref":"fdr-no-rollbar","sha":"f6b5dd82e671f71daa8c8e781a7e76819fda6580","user":{"login":"fdr","id":7191,"avatar_url":"https://avatars.githubusercontent.com/u/7191?v=3","gravatar_id":"","url":"https://api.github.com/users/fdr","html_url":"https://github.com/fdr","followers_url":"https://api.github.com/users/fdr/followers","following_url":"https://api.github.com/users/fdr/following{/other_user}","gists_url":"https://api.github.com/users/fdr/gists{/gist_id}","starred_url":"https://api.github.com/users/fdr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fdr/subscriptions","organizations_url":"https://api.github.com/users/fdr/orgs","repos_url":"https://api.github.com/users/fdr/repos","events_url":"https://api.github.com/users/fdr/events{/privacy}","received_events_url":"https://api.github.com/users/fdr/received_events","type":"User","site_admin":false},"repo":{"id":22417254,"name":"pliny","full_name":"fdr/pliny","owner":{"login":"fdr","id":7191,"avatar_url":"https://avatars.githubusercontent.com/u/7191?v=3","gravatar_id":"","url":"https://api.github.com/users/fdr","html_url":"https://github.com/fdr","followers_url":"https://api.github.com/users/fdr/followers","following_url":"https://api.github.com/users/fdr/following{/other_user}","gists_url":"https://api.github.com/users/fdr/gists{/gist_id}","starred_url":"https://api.github.com/users/fdr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fdr/subscriptions","organizations_url":"https://api.github.com/users/fdr/orgs","repos_url":"https://api.github.com/users/fdr/repos","events_url":"https://api.github.com/users/fdr/events{/privacy}","received_events_url":"https://api.github.com/users/fdr/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fdr/pliny","description":"Write excellent APIs in Ruby","fork":true,"url":"https://api.github.com/repos/fdr/pliny","forks_url":"https://api.github.com/repos/fdr/pliny/forks","keys_url":"https://api.github.com/repos/fdr/pliny/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fdr/pliny/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fdr/pliny/teams","hooks_url":"https://api.github.com/repos/fdr/pliny/hooks","issue_events_url":"https://api.github.com/repos/fdr/pliny/issues/events{/number}","events_url":"https://api.github.com/repos/fdr/pliny/events","assignees_url":"https://api.github.com/repos/fdr/pliny/assignees{/user}","branches_url":"https://api.github.com/repos/fdr/pliny/branches{/branch}","tags_url":"https://api.github.com/repos/fdr/pliny/tags","blobs_url":"https://api.github.com/repos/fdr/pliny/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fdr/pliny/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fdr/pliny/git/refs{/sha}","trees_url":"https://api.github.com/repos/fdr/pliny/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fdr/pliny/statuses/{sha}","languages_url":"https://api.github.com/repos/fdr/pliny/languages","stargazers_url":"https://api.github.com/repos/fdr/pliny/stargazers","contributors_url":"https://api.github.com/repos/fdr/pliny/contributors","subscribers_url":"https://api.github.com/repos/fdr/pliny/subscribers","subscription_url":"https://api.github.com/repos/fdr/pliny/subscription","commits_url":"https://api.github.com/repos/fdr/pliny/commits{/sha}","git_commits_url":"https://api.github.com/repos/fdr/pliny/git/commits{/sha}","comments_url":"https://api.github.com/repos/fdr/pliny/comments{/number}","issue_comment_url":"https://api.github.com/repos/fdr/pliny/issues/comments{/number}","contents_url":"https://api.github.com/repos/fdr/pliny/contents/{+path}","compare_url":"https://api.github.com/repos/fdr/pliny/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fdr/pliny/merges","archive_url":"https://api.github.com/repos/fdr/pliny/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fdr/pliny/downloads","issues_url":"https://api.github.com/repos/fdr/pliny/issues{/number}","pulls_url":"https://api.github.com/repos/fdr/pliny/pulls{/number}","milestones_url":"https://api.github.com/repos/fdr/pliny/milestones{/number}","notifications_url":"https://api.github.com/repos/fdr/pliny/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fdr/pliny/labels{/name}","releases_url":"https://api.github.com/repos/fdr/pliny/releases{/id}","deployments_url":"https://api.github.com/repos/fdr/pliny/deployments","created_at":"2014-07-30T08:26:05Z","updated_at":"2016-06-01T21:46:44Z","pushed_at":"2016-06-01T22:32:34Z","git_url":"git://github.com/fdr/pliny.git","ssh_url":"git@github.com:fdr/pliny.git","clone_url":"https://github.com/fdr/pliny.git","svn_url":"https://github.com/fdr/pliny","homepage":"","size":432,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"interagent:master","ref":"master","sha":"514400f193580c8318bb9a65e9b5fc168935d871","user":{"login":"interagent","id":7388387,"avatar_url":"https://avatars.githubusercontent.com/u/7388387?v=3","gravatar_id":"","url":"https://api.github.com/users/interagent","html_url":"https://github.com/interagent","followers_url":"https://api.github.com/users/interagent/followers","following_url":"https://api.github.com/users/interagent/following{/other_user}","gists_url":"https://api.github.com/users/interagent/gists{/gist_id}","starred_url":"https://api.github.com/users/interagent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/interagent/subscriptions","organizations_url":"https://api.github.com/users/interagent/orgs","repos_url":"https://api.github.com/users/interagent/repos","events_url":"https://api.github.com/users/interagent/events{/privacy}","received_events_url":"https://api.github.com/users/interagent/received_events","type":"Organization","site_admin":false},"repo":{"id":19099484,"name":"pliny","full_name":"interagent/pliny","owner":{"login":"interagent","id":7388387,"avatar_url":"https://avatars.githubusercontent.com/u/7388387?v=3","gravatar_id":"","url":"https://api.github.com/users/interagent","html_url":"https://github.com/interagent","followers_url":"https://api.github.com/users/interagent/followers","following_url":"https://api.github.com/users/interagent/following{/other_user}","gists_url":"https://api.github.com/users/interagent/gists{/gist_id}","starred_url":"https://api.github.com/users/interagent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/interagent/subscriptions","organizations_url":"https://api.github.com/users/interagent/orgs","repos_url":"https://api.github.com/users/interagent/repos","events_url":"https://api.github.com/users/interagent/events{/privacy}","received_events_url":"https://api.github.com/users/interagent/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/interagent/pliny","description":"Write excellent APIs in Ruby","fork":false,"url":"https://api.github.com/repos/interagent/pliny","forks_url":"https://api.github.com/repos/interagent/pliny/forks","keys_url":"https://api.github.com/repos/interagent/pliny/keys{/key_id}","collaborators_url":"https://api.github.com/repos/interagent/pliny/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/interagent/pliny/teams","hooks_url":"https://api.github.com/repos/interagent/pliny/hooks","issue_events_url":"https://api.github.com/repos/interagent/pliny/issues/events{/number}","events_url":"https://api.github.com/repos/interagent/pliny/events","assignees_url":"https://api.github.com/repos/interagent/pliny/assignees{/user}","branches_url":"https://api.github.com/repos/interagent/pliny/branches{/branch}","tags_url":"https://api.github.com/repos/interagent/pliny/tags","blobs_url":"https://api.github.com/repos/interagent/pliny/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/interagent/pliny/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/interagent/pliny/git/refs{/sha}","trees_url":"https://api.github.com/repos/interagent/pliny/git/trees{/sha}","statuses_url":"https://api.github.com/repos/interagent/pliny/statuses/{sha}","languages_url":"https://api.github.com/repos/interagent/pliny/languages","stargazers_url":"https://api.github.com/repos/interagent/pliny/stargazers","contributors_url":"https://api.github.com/repos/interagent/pliny/contributors","subscribers_url":"https://api.github.com/repos/interagent/pliny/subscribers","subscription_url":"https://api.github.com/repos/interagent/pliny/subscription","commits_url":"https://api.github.com/repos/interagent/pliny/commits{/sha}","git_commits_url":"https://api.github.com/repos/interagent/pliny/git/commits{/sha}","comments_url":"https://api.github.com/repos/interagent/pliny/comments{/number}","issue_comment_url":"https://api.github.com/repos/interagent/pliny/issues/comments{/number}","contents_url":"https://api.github.com/repos/interagent/pliny/contents/{+path}","compare_url":"https://api.github.com/repos/interagent/pliny/compare/{base}...{head}","merges_url":"https://api.github.com/repos/interagent/pliny/merges","archive_url":"https://api.github.com/repos/interagent/pliny/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/interagent/pliny/downloads","issues_url":"https://api.github.com/repos/interagent/pliny/issues{/number}","pulls_url":"https://api.github.com/repos/interagent/pliny/pulls{/number}","milestones_url":"https://api.github.com/repos/interagent/pliny/milestones{/number}","notifications_url":"https://api.github.com/repos/interagent/pliny/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/interagent/pliny/labels{/name}","releases_url":"https://api.github.com/repos/interagent/pliny/releases{/id}","deployments_url":"https://api.github.com/repos/interagent/pliny/deployments","created_at":"2014-04-24T07:22:09Z","updated_at":"2016-05-28T00:04:46Z","pushed_at":"2016-06-01T22:32:34Z","git_url":"git://github.com/interagent/pliny.git","ssh_url":"git@github.com:interagent/pliny.git","clone_url":"https://github.com/interagent/pliny.git","svn_url":"https://github.com/interagent/pliny","homepage":"","size":571,"stargazers_count":608,"watchers_count":608,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":55,"mirror_url":null,"open_issues_count":25,"forks":55,"open_issues":25,"watchers":608,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/interagent/pliny/pulls/274"},"html":{"href":"https://github.com/interagent/pliny/pull/274"},"issue":{"href":"https://api.github.com/repos/interagent/pliny/issues/274"},"comments":{"href":"https://api.github.com/repos/interagent/pliny/issues/274/comments"},"review_comments":{"href":"https://api.github.com/repos/interagent/pliny/pulls/274/comments"},"review_comment":{"href":"https://api.github.com/repos/interagent/pliny/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/interagent/pliny/pulls/274/commits"},"statuses":{"href":"https://api.github.com/repos/interagent/pliny/statuses/f6b5dd82e671f71daa8c8e781a7e76819fda6580"}}}}
{"actor":{"display_login":"brandur"}}