{"action":"created","comment":{"url":"https://api.github.com/repos/codeclimate/codeclimate-services/pulls/comments/77008504","id":77008504,"diff_hunk":"@@ -6,40 +6,37 @@ def described_class\n   end\n \n   def test_quality_alert_with_new_constants\n-    f = described_class.new({\"new_constants\" => [{\"to\" => {\"rating\" => \"D\"}}], \"changed_constants\" => []})\n+    f = described_class.new(\"new_constants\" => [{ \"to\" => { \"rating\" => \"D\" } }], \"changed_constants\" => [])\n     refute_nil f.alert_constants_payload\n   end\n \n   def test_quality_alert_with_decreased_constants\n-    f = described_class.new({\"new_constants\" => [],\n-                             \"changed_constants\" => [{\"to\" => {\"rating\" => \"D\"}, \"from\" => {\"rating\" => \"A\"}}]\n-    })\n+    f = described_class.new(\"new_constants\" => [],\n+                            \"changed_constants\" => [{ \"to\" => { \"rating\" => \"D\" }, \"from\" => { \"rating\" => \"A\" } }])\n     refute_nil f.alert_constants_payload\n   end\n \n   def test_quality_improvements_with_better_ratings\n-    f = described_class.new({\"new_constants\" => [],\n-                             \"changed_constants\" => [{\"to\" => {\"rating\" => \"A\"}, \"from\" => {\"rating\" => \"D\"}}]\n-    })\n+    f = described_class.new(\"new_constants\" => [],\n+                            \"changed_constants\" => [{ \"to\" => { \"rating\" => \"A\" }, \"from\" => { \"rating\" => \"D\" } }])\n     refute_nil f.improved_constants_payload\n   end\n \n   def test_nothing_set_without_changes\n-    f = described_class.new({\"new_constants\" => [], \"changed_constants\" => []})\n+    f = described_class.new(\"new_constants\" => [], \"changed_constants\" => [])\n     assert_nil f.alert_constants_payload\n     assert_nil f.improved_constants_payload\n   end\n \n   def test_snapshot_formatter_test_with_relaxed_constraints\n-    f = CC::Formatters::SnapshotFormatter::Sample.new({\n-       \"new_constants\" => [{\"name\" => \"foo\", \"to\" => {\"rating\" => \"A\"}}, {\"name\" => \"bar\", \"to\" => {\"rating\" => \"A\"}}],\n-       \"changed_constants\" => [\n-         {\"from\" => {\"rating\" => \"B\"}, \"to\" => {\"rating\" => \"C\"}},\n-         {\"from\" => {\"rating\" => \"D\"}, \"to\" => {\"rating\" => \"D\"}},\n-         {\"from\" => {\"rating\" => \"D\"}, \"to\" => {\"rating\" => \"D\"}},\n-         {\"from\" => {\"rating\" => \"A\"}, \"to\" => {\"rating\" => \"B\"}},\n-         {\"from\" => {\"rating\" => \"C\"}, \"to\" => {\"rating\" => \"B\"}}\n-       ]})\n+    f = CC::Formatters::SnapshotFormatter::Sample.new(\"new_constants\" => [{ \"name\" => \"foo\", \"to\" => { \"rating\" => \"A\" } }, { \"name\" => \"bar\", \"to\" => { \"rating\" => \"A\" } }],","path":"test/formatters/snapshot_formatter_test.rb","position":44,"original_position":44,"commit_id":"1af25147d51f95cb98182a7f8ae9897fcd8618bf","original_commit_id":"1af25147d51f95cb98182a7f8ae9897fcd8618bf","user":{"login":"pbrisbin","id":50812,"avatar_url":"https://avatars.githubusercontent.com/u/50812?v=3","gravatar_id":"","url":"https://api.github.com/users/pbrisbin","html_url":"https://github.com/pbrisbin","followers_url":"https://api.github.com/users/pbrisbin/followers","following_url":"https://api.github.com/users/pbrisbin/following{/other_user}","gists_url":"https://api.github.com/users/pbrisbin/gists{/gist_id}","starred_url":"https://api.github.com/users/pbrisbin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pbrisbin/subscriptions","organizations_url":"https://api.github.com/users/pbrisbin/orgs","repos_url":"https://api.github.com/users/pbrisbin/repos","events_url":"https://api.github.com/users/pbrisbin/events{/privacy}","received_events_url":"https://api.github.com/users/pbrisbin/received_events","type":"User","site_admin":false},"body":"```rb\r\nf = ...Sample.new(\r\n  \"new_constants\" => [...],\r\n  \"changed_constants\" => [\r\n    { ...\r\n    { ...\r\n  ]\r\n)\r\n```","created_at":"2016-08-31T15:22:38Z","updated_at":"2016-08-31T15:22:38Z","html_url":"https://github.com/codeclimate/codeclimate-services/pull/111#discussion_r77008504","pull_request_url":"https://api.github.com/repos/codeclimate/codeclimate-services/pulls/111","_links":{"self":{"href":"https://api.github.com/repos/codeclimate/codeclimate-services/pulls/comments/77008504"},"html":{"href":"https://github.com/codeclimate/codeclimate-services/pull/111#discussion_r77008504"},"pull_request":{"href":"https://api.github.com/repos/codeclimate/codeclimate-services/pulls/111"}}},"pull_request":{"url":"https://api.github.com/repos/codeclimate/codeclimate-services/pulls/111","id":83131382,"html_url":"https://github.com/codeclimate/codeclimate-services/pull/111","diff_url":"https://github.com/codeclimate/codeclimate-services/pull/111.diff","patch_url":"https://github.com/codeclimate/codeclimate-services/pull/111.patch","issue_url":"https://api.github.com/repos/codeclimate/codeclimate-services/issues/111","number":111,"state":"open","locked":false,"title":"Add RuboCop config from our styleguide","user":{"login":"maxjacobson","id":1421211,"avatar_url":"https://avatars.githubusercontent.com/u/1421211?v=3","gravatar_id":"","url":"https://api.github.com/users/maxjacobson","html_url":"https://github.com/maxjacobson","followers_url":"https://api.github.com/users/maxjacobson/followers","following_url":"https://api.github.com/users/maxjacobson/following{/other_user}","gists_url":"https://api.github.com/users/maxjacobson/gists{/gist_id}","starred_url":"https://api.github.com/users/maxjacobson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxjacobson/subscriptions","organizations_url":"https://api.github.com/users/maxjacobson/orgs","repos_url":"https://api.github.com/users/maxjacobson/repos","events_url":"https://api.github.com/users/maxjacobson/events{/privacy}","received_events_url":"https://api.github.com/users/maxjacobson/received_events","type":"User","site_admin":false},"body":"We were using the less opinionated version that CC infers based on the project.\r\n\r\n(Inspired by this comment: https://github.com/codeclimate/codeclimate-services/pull/110#discussion_r76623698)","created_at":"2016-08-29T17:00:06Z","updated_at":"2016-08-31T15:22:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3c9cbfade13687a54e286ad94d4105a22df9476d","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/codeclimate/codeclimate-services/pulls/111/commits","review_comments_url":"https://api.github.com/repos/codeclimate/codeclimate-services/pulls/111/comments","review_comment_url":"https://api.github.com/repos/codeclimate/codeclimate-services/pulls/comments{/number}","comments_url":"https://api.github.com/repos/codeclimate/codeclimate-services/issues/111/comments","statuses_url":"https://api.github.com/repos/codeclimate/codeclimate-services/statuses/1af25147d51f95cb98182a7f8ae9897fcd8618bf","head":{"label":"codeclimate:mj-add-rubocop-config","ref":"mj-add-rubocop-config","sha":"1af25147d51f95cb98182a7f8ae9897fcd8618bf","user":{"login":"codeclimate","id":789641,"avatar_url":"https://avatars.githubusercontent.com/u/789641?v=3","gravatar_id":"","url":"https://api.github.com/users/codeclimate","html_url":"https://github.com/codeclimate","followers_url":"https://api.github.com/users/codeclimate/followers","following_url":"https://api.github.com/users/codeclimate/following{/other_user}","gists_url":"https://api.github.com/users/codeclimate/gists{/gist_id}","starred_url":"https://api.github.com/users/codeclimate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codeclimate/subscriptions","organizations_url":"https://api.github.com/users/codeclimate/orgs","repos_url":"https://api.github.com/users/codeclimate/repos","events_url":"https://api.github.com/users/codeclimate/events{/privacy}","received_events_url":"https://api.github.com/users/codeclimate/received_events","type":"Organization","site_admin":false},"repo":{"id":14462314,"name":"codeclimate-services","full_name":"codeclimate/codeclimate-services","owner":{"login":"codeclimate","id":789641,"avatar_url":"https://avatars.githubusercontent.com/u/789641?v=3","gravatar_id":"","url":"https://api.github.com/users/codeclimate","html_url":"https://github.com/codeclimate","followers_url":"https://api.github.com/users/codeclimate/followers","following_url":"https://api.github.com/users/codeclimate/following{/other_user}","gists_url":"https://api.github.com/users/codeclimate/gists{/gist_id}","starred_url":"https://api.github.com/users/codeclimate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codeclimate/subscriptions","organizations_url":"https://api.github.com/users/codeclimate/orgs","repos_url":"https://api.github.com/users/codeclimate/repos","events_url":"https://api.github.com/users/codeclimate/events{/privacy}","received_events_url":"https://api.github.com/users/codeclimate/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/codeclimate/codeclimate-services","description":"Code Climate services","fork":false,"url":"https://api.github.com/repos/codeclimate/codeclimate-services","forks_url":"https://api.github.com/repos/codeclimate/codeclimate-services/forks","keys_url":"https://api.github.com/repos/codeclimate/codeclimate-services/keys{/key_id}","collaborators_url":"https://api.github.com/repos/codeclimate/codeclimate-services/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/codeclimate/codeclimate-services/teams","hooks_url":"https://api.github.com/repos/codeclimate/codeclimate-services/hooks","issue_events_url":"https://api.github.com/repos/codeclimate/codeclimate-services/issues/events{/number}","events_url":"https://api.github.com/repos/codeclimate/codeclimate-services/events","assignees_url":"https://api.github.com/repos/codeclimate/codeclimate-services/assignees{/user}","branches_url":"https://api.github.com/repos/codeclimate/codeclimate-services/branches{/branch}","tags_url":"https://api.github.com/repos/codeclimate/codeclimate-services/tags","blobs_url":"https://api.github.com/repos/codeclimate/codeclimate-services/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/codeclimate/codeclimate-services/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/codeclimate/codeclimate-services/git/refs{/sha}","trees_url":"https://api.github.com/repos/codeclimate/codeclimate-services/git/trees{/sha}","statuses_url":"https://api.github.com/repos/codeclimate/codeclimate-services/statuses/{sha}","languages_url":"https://api.github.com/repos/codeclimate/codeclimate-services/languages","stargazers_url":"https://api.github.com/repos/codeclimate/codeclimate-services/stargazers","contributors_url":"https://api.github.com/repos/codeclimate/codeclimate-services/contributors","subscribers_url":"https://api.github.com/repos/codeclimate/codeclimate-services/subscribers","subscription_url":"https://api.github.com/repos/codeclimate/codeclimate-services/subscription","commits_url":"https://api.github.com/repos/codeclimate/codeclimate-services/commits{/sha}","git_commits_url":"https://api.github.com/repos/codeclimate/codeclimate-services/git/commits{/sha}","comments_url":"https://api.github.com/repos/codeclimate/codeclimate-services/comments{/number}","issue_comment_url":"https://api.github.com/repos/codeclimate/codeclimate-services/issues/comments{/number}","contents_url":"https://api.github.com/repos/codeclimate/codeclimate-services/contents/{+path}","compare_url":"https://api.github.com/repos/codeclimate/codeclimate-services/compare/{base}...{head}","merges_url":"https://api.github.com/repos/codeclimate/codeclimate-services/merges","archive_url":"https://api.github.com/repos/codeclimate/codeclimate-services/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/codeclimate/codeclimate-services/downloads","issues_url":"https://api.github.com/repos/codeclimate/codeclimate-services/issues{/number}","pulls_url":"https://api.github.com/repos/codeclimate/codeclimate-services/pulls{/number}","milestones_url":"https://api.github.com/repos/codeclimate/codeclimate-services/milestones{/number}","notifications_url":"https://api.github.com/repos/codeclimate/codeclimate-services/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/codeclimate/codeclimate-services/labels{/name}","releases_url":"https://api.github.com/repos/codeclimate/codeclimate-services/releases{/id}","deployments_url":"https://api.github.com/repos/codeclimate/codeclimate-services/deployments","created_at":"2013-11-17T06:22:37Z","updated_at":"2016-06-14T19:35:46Z","pushed_at":"2016-08-31T15:14:56Z","git_url":"git://github.com/codeclimate/codeclimate-services.git","ssh_url":"git@github.com:codeclimate/codeclimate-services.git","clone_url":"https://github.com/codeclimate/codeclimate-services.git","svn_url":"https://github.com/codeclimate/codeclimate-services","homepage":null,"size":497,"stargazers_count":8,"watchers_count":8,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":4,"forks":6,"open_issues":4,"watchers":8,"default_branch":"master"}},"base":{"label":"codeclimate:master","ref":"master","sha":"e0e48d49bb3f268ee07d094b1101799ad2247bee","user":{"login":"codeclimate","id":789641,"avatar_url":"https://avatars.githubusercontent.com/u/789641?v=3","gravatar_id":"","url":"https://api.github.com/users/codeclimate","html_url":"https://github.com/codeclimate","followers_url":"https://api.github.com/users/codeclimate/followers","following_url":"https://api.github.com/users/codeclimate/following{/other_user}","gists_url":"https://api.github.com/users/codeclimate/gists{/gist_id}","starred_url":"https://api.github.com/users/codeclimate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codeclimate/subscriptions","organizations_url":"https://api.github.com/users/codeclimate/orgs","repos_url":"https://api.github.com/users/codeclimate/repos","events_url":"https://api.github.com/users/codeclimate/events{/privacy}","received_events_url":"https://api.github.com/users/codeclimate/received_events","type":"Organization","site_admin":false},"repo":{"id":14462314,"name":"codeclimate-services","full_name":"codeclimate/codeclimate-services","owner":{"login":"codeclimate","id":789641,"avatar_url":"https://avatars.githubusercontent.com/u/789641?v=3","gravatar_id":"","url":"https://api.github.com/users/codeclimate","html_url":"https://github.com/codeclimate","followers_url":"https://api.github.com/users/codeclimate/followers","following_url":"https://api.github.com/users/codeclimate/following{/other_user}","gists_url":"https://api.github.com/users/codeclimate/gists{/gist_id}","starred_url":"https://api.github.com/users/codeclimate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codeclimate/subscriptions","organizations_url":"https://api.github.com/users/codeclimate/orgs","repos_url":"https://api.github.com/users/codeclimate/repos","events_url":"https://api.github.com/users/codeclimate/events{/privacy}","received_events_url":"https://api.github.com/users/codeclimate/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/codeclimate/codeclimate-services","description":"Code Climate services","fork":false,"url":"https://api.github.com/repos/codeclimate/codeclimate-services","forks_url":"https://api.github.com/repos/codeclimate/codeclimate-services/forks","keys_url":"https://api.github.com/repos/codeclimate/codeclimate-services/keys{/key_id}","collaborators_url":"https://api.github.com/repos/codeclimate/codeclimate-services/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/codeclimate/codeclimate-services/teams","hooks_url":"https://api.github.com/repos/codeclimate/codeclimate-services/hooks","issue_events_url":"https://api.github.com/repos/codeclimate/codeclimate-services/issues/events{/number}","events_url":"https://api.github.com/repos/codeclimate/codeclimate-services/events","assignees_url":"https://api.github.com/repos/codeclimate/codeclimate-services/assignees{/user}","branches_url":"https://api.github.com/repos/codeclimate/codeclimate-services/branches{/branch}","tags_url":"https://api.github.com/repos/codeclimate/codeclimate-services/tags","blobs_url":"https://api.github.com/repos/codeclimate/codeclimate-services/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/codeclimate/codeclimate-services/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/codeclimate/codeclimate-services/git/refs{/sha}","trees_url":"https://api.github.com/repos/codeclimate/codeclimate-services/git/trees{/sha}","statuses_url":"https://api.github.com/repos/codeclimate/codeclimate-services/statuses/{sha}","languages_url":"https://api.github.com/repos/codeclimate/codeclimate-services/languages","stargazers_url":"https://api.github.com/repos/codeclimate/codeclimate-services/stargazers","contributors_url":"https://api.github.com/repos/codeclimate/codeclimate-services/contributors","subscribers_url":"https://api.github.com/repos/codeclimate/codeclimate-services/subscribers","subscription_url":"https://api.github.com/repos/codeclimate/codeclimate-services/subscription","commits_url":"https://api.github.com/repos/codeclimate/codeclimate-services/commits{/sha}","git_commits_url":"https://api.github.com/repos/codeclimate/codeclimate-services/git/commits{/sha}","comments_url":"https://api.github.com/repos/codeclimate/codeclimate-services/comments{/number}","issue_comment_url":"https://api.github.com/repos/codeclimate/codeclimate-services/issues/comments{/number}","contents_url":"https://api.github.com/repos/codeclimate/codeclimate-services/contents/{+path}","compare_url":"https://api.github.com/repos/codeclimate/codeclimate-services/compare/{base}...{head}","merges_url":"https://api.github.com/repos/codeclimate/codeclimate-services/merges","archive_url":"https://api.github.com/repos/codeclimate/codeclimate-services/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/codeclimate/codeclimate-services/downloads","issues_url":"https://api.github.com/repos/codeclimate/codeclimate-services/issues{/number}","pulls_url":"https://api.github.com/repos/codeclimate/codeclimate-services/pulls{/number}","milestones_url":"https://api.github.com/repos/codeclimate/codeclimate-services/milestones{/number}","notifications_url":"https://api.github.com/repos/codeclimate/codeclimate-services/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/codeclimate/codeclimate-services/labels{/name}","releases_url":"https://api.github.com/repos/codeclimate/codeclimate-services/releases{/id}","deployments_url":"https://api.github.com/repos/codeclimate/codeclimate-services/deployments","created_at":"2013-11-17T06:22:37Z","updated_at":"2016-06-14T19:35:46Z","pushed_at":"2016-08-31T15:14:56Z","git_url":"git://github.com/codeclimate/codeclimate-services.git","ssh_url":"git@github.com:codeclimate/codeclimate-services.git","clone_url":"https://github.com/codeclimate/codeclimate-services.git","svn_url":"https://github.com/codeclimate/codeclimate-services","homepage":null,"size":497,"stargazers_count":8,"watchers_count":8,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":4,"forks":6,"open_issues":4,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/codeclimate/codeclimate-services/pulls/111"},"html":{"href":"https://github.com/codeclimate/codeclimate-services/pull/111"},"issue":{"href":"https://api.github.com/repos/codeclimate/codeclimate-services/issues/111"},"comments":{"href":"https://api.github.com/repos/codeclimate/codeclimate-services/issues/111/comments"},"review_comments":{"href":"https://api.github.com/repos/codeclimate/codeclimate-services/pulls/111/comments"},"review_comment":{"href":"https://api.github.com/repos/codeclimate/codeclimate-services/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/codeclimate/codeclimate-services/pulls/111/commits"},"statuses":{"href":"https://api.github.com/repos/codeclimate/codeclimate-services/statuses/1af25147d51f95cb98182a7f8ae9897fcd8618bf"}}}}
{"actor":{"display_login":"pbrisbin"}}