GitHub PullRequestReviewCommentEvent at 2014-08-04 17:16:19
Repository: fake-braspag
Actor: rafaelfranca
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/Baby-com-br/fake-braspag/pulls/comments/15767327","id":15767327,"diff_hunk":"@@ -166,4 +224,44 @@\n       XML\n     end\n   end\n+\n+  describe 'disable capture' do\n+    it 'disables the capture response' do\n+      ResponseToggler.enable('capture')\n+\n+      get '/capture/disable'\n+\n+      expect(last_response).to be_ok\n+\n+      expect(ResponseToggler.enabled?('capture')).to be_falsy","path":"spec/fake_braspag_spec.rb","position":143,"original_position":143,"commit_id":"9bd9ebdf786d21ab7d544122c918de918fb77e6d","original_commit_id":"1cdfcee1f0798cd15cb445c3781ff789a860e719","user":{"login":"rafaelfranca","id":47848,"avatar_url":"https://avatars.githubusercontent.com/u/47848?v=2","gravatar_id":"0525b332aafb83307b32d9747a93de03","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},"body":"I like to keep falsy because I believe predicate methods don't need to return `true` and `false`. `Object` or `nil` is just fine, so although this method in question always return `true` or `false` I don't want to make users expect it to always return they.","created_at":"2014-08-04T17:16:19Z","updated_at":"2014-08-04T17:16:19Z","html_url":"https://github.com/Baby-com-br/fake-braspag/pull/5#discussion_r15767327","pull_request_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/Baby-com-br/fake-braspag/pulls/comments/15767327"},"html":{"href":"https://github.com/Baby-com-br/fake-braspag/pull/5#discussion_r15767327"},"pull_request":{"href":"https://api.github.com/repos/Baby-com-br/fake-braspag/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/Baby-com-br/fake-braspag/pulls/5","id":19293738,"html_url":"https://github.com/Baby-com-br/fake-braspag/pull/5","diff_url":"https://github.com/Baby-com-br/fake-braspag/pull/5.diff","patch_url":"https://github.com/Baby-com-br/fake-braspag/pull/5.patch","issue_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/issues/5","number":5,"state":"open","title":"Add endpoint to enable and disable capture and show failure message when it is disabled","user":{"login":"rafaelfranca","id":47848,"avatar_url":"https://avatars.githubusercontent.com/u/47848?v=2","gravatar_id":"0525b332aafb83307b32d9747a93de03","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},"body":"Now we store a configuration to say if a response will be successful or not on redis.\r\n\r\nIf the response is allowed we respond with a success response. If not we respond with a failure response.\r\n\r\nAlso I added two endpoints to enable and disable the response for the capture. Both endpoints can be requested using the GET verb. If we try to disable an already disabled response it will return 422.\r\n\r\nThis configuration will expires after 60 minutes for the case someone forgot to enabled it back.","created_at":"2014-08-04T16:54:40Z","updated_at":"2014-08-04T17:16:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cfda935238cb374e05c2f46a984188262e656338","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/pulls/5/commits","review_comments_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/pulls/5/comments","review_comment_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/pulls/comments/{number}","comments_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/issues/5/comments","statuses_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/statuses/9bd9ebdf786d21ab7d544122c918de918fb77e6d","head":{"label":"Baby-com-br:rm-failure-capture","ref":"rm-failure-capture","sha":"9bd9ebdf786d21ab7d544122c918de918fb77e6d","user":{"login":"Baby-com-br","id":1762272,"avatar_url":"https://avatars.githubusercontent.com/u/1762272?v=2","gravatar_id":"67d753d0ce00e115a07cd3889a25ed61","url":"https://api.github.com/users/Baby-com-br","html_url":"https://github.com/Baby-com-br","followers_url":"https://api.github.com/users/Baby-com-br/followers","following_url":"https://api.github.com/users/Baby-com-br/following{/other_user}","gists_url":"https://api.github.com/users/Baby-com-br/gists{/gist_id}","starred_url":"https://api.github.com/users/Baby-com-br/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Baby-com-br/subscriptions","organizations_url":"https://api.github.com/users/Baby-com-br/orgs","repos_url":"https://api.github.com/users/Baby-com-br/repos","events_url":"https://api.github.com/users/Baby-com-br/events{/privacy}","received_events_url":"https://api.github.com/users/Baby-com-br/received_events","type":"Organization","site_admin":false},"repo":{"id":11319630,"name":"fake-braspag","full_name":"Baby-com-br/fake-braspag","owner":{"login":"Baby-com-br","id":1762272,"avatar_url":"https://avatars.githubusercontent.com/u/1762272?v=2","gravatar_id":"67d753d0ce00e115a07cd3889a25ed61","url":"https://api.github.com/users/Baby-com-br","html_url":"https://github.com/Baby-com-br","followers_url":"https://api.github.com/users/Baby-com-br/followers","following_url":"https://api.github.com/users/Baby-com-br/following{/other_user}","gists_url":"https://api.github.com/users/Baby-com-br/gists{/gist_id}","starred_url":"https://api.github.com/users/Baby-com-br/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Baby-com-br/subscriptions","organizations_url":"https://api.github.com/users/Baby-com-br/orgs","repos_url":"https://api.github.com/users/Baby-com-br/repos","events_url":"https://api.github.com/users/Baby-com-br/events{/privacy}","received_events_url":"https://api.github.com/users/Baby-com-br/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Baby-com-br/fake-braspag","description":"","fork":true,"url":"https://api.github.com/repos/Baby-com-br/fake-braspag","forks_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/forks","keys_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/teams","hooks_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/hooks","issue_events_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/issues/events{/number}","events_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/events","assignees_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/assignees{/user}","branches_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/branches{/branch}","tags_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/tags","blobs_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/git/refs{/sha}","trees_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/statuses/{sha}","languages_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/languages","stargazers_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/stargazers","contributors_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/contributors","subscribers_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/subscribers","subscription_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/subscription","commits_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/commits{/sha}","git_commits_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/git/commits{/sha}","comments_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/comments{/number}","issue_comment_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/issues/comments/{number}","contents_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/contents/{+path}","compare_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/merges","archive_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/downloads","issues_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/issues{/number}","pulls_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/pulls{/number}","milestones_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/milestones{/number}","notifications_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/labels{/name}","releases_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/releases{/id}","created_at":"2013-07-10T18:01:20Z","updated_at":"2013-07-10T18:01:20Z","pushed_at":"2014-08-04T17:10:13Z","git_url":"git://github.com/Baby-com-br/fake-braspag.git","ssh_url":"git@github.com:Baby-com-br/fake-braspag.git","clone_url":"https://github.com/Baby-com-br/fake-braspag.git","svn_url":"https://github.com/Baby-com-br/fake-braspag","homepage":"","size":465,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"Baby-com-br:next","ref":"next","sha":"e956f687627173fa894d352803ab3c48eb52c54e","user":{"login":"Baby-com-br","id":1762272,"avatar_url":"https://avatars.githubusercontent.com/u/1762272?v=2","gravatar_id":"67d753d0ce00e115a07cd3889a25ed61","url":"https://api.github.com/users/Baby-com-br","html_url":"https://github.com/Baby-com-br","followers_url":"https://api.github.com/users/Baby-com-br/followers","following_url":"https://api.github.com/users/Baby-com-br/following{/other_user}","gists_url":"https://api.github.com/users/Baby-com-br/gists{/gist_id}","starred_url":"https://api.github.com/users/Baby-com-br/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Baby-com-br/subscriptions","organizations_url":"https://api.github.com/users/Baby-com-br/orgs","repos_url":"https://api.github.com/users/Baby-com-br/repos","events_url":"https://api.github.com/users/Baby-com-br/events{/privacy}","received_events_url":"https://api.github.com/users/Baby-com-br/received_events","type":"Organization","site_admin":false},"repo":{"id":11319630,"name":"fake-braspag","full_name":"Baby-com-br/fake-braspag","owner":{"login":"Baby-com-br","id":1762272,"avatar_url":"https://avatars.githubusercontent.com/u/1762272?v=2","gravatar_id":"67d753d0ce00e115a07cd3889a25ed61","url":"https://api.github.com/users/Baby-com-br","html_url":"https://github.com/Baby-com-br","followers_url":"https://api.github.com/users/Baby-com-br/followers","following_url":"https://api.github.com/users/Baby-com-br/following{/other_user}","gists_url":"https://api.github.com/users/Baby-com-br/gists{/gist_id}","starred_url":"https://api.github.com/users/Baby-com-br/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Baby-com-br/subscriptions","organizations_url":"https://api.github.com/users/Baby-com-br/orgs","repos_url":"https://api.github.com/users/Baby-com-br/repos","events_url":"https://api.github.com/users/Baby-com-br/events{/privacy}","received_events_url":"https://api.github.com/users/Baby-com-br/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Baby-com-br/fake-braspag","description":"","fork":true,"url":"https://api.github.com/repos/Baby-com-br/fake-braspag","forks_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/forks","keys_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/teams","hooks_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/hooks","issue_events_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/issues/events{/number}","events_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/events","assignees_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/assignees{/user}","branches_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/branches{/branch}","tags_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/tags","blobs_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/git/refs{/sha}","trees_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/statuses/{sha}","languages_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/languages","stargazers_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/stargazers","contributors_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/contributors","subscribers_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/subscribers","subscription_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/subscription","commits_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/commits{/sha}","git_commits_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/git/commits{/sha}","comments_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/comments{/number}","issue_comment_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/issues/comments/{number}","contents_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/contents/{+path}","compare_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/merges","archive_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/downloads","issues_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/issues{/number}","pulls_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/pulls{/number}","milestones_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/milestones{/number}","notifications_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/labels{/name}","releases_url":"https://api.github.com/repos/Baby-com-br/fake-braspag/releases{/id}","created_at":"2013-07-10T18:01:20Z","updated_at":"2013-07-10T18:01:20Z","pushed_at":"2014-08-04T17:10:13Z","git_url":"git://github.com/Baby-com-br/fake-braspag.git","ssh_url":"git@github.com:Baby-com-br/fake-braspag.git","clone_url":"https://github.com/Baby-com-br/fake-braspag.git","svn_url":"https://github.com/Baby-com-br/fake-braspag","homepage":"","size":465,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Baby-com-br/fake-braspag/pulls/5"},"html":{"href":"https://github.com/Baby-com-br/fake-braspag/pull/5"},"issue":{"href":"https://api.github.com/repos/Baby-com-br/fake-braspag/issues/5"},"comments":{"href":"https://api.github.com/repos/Baby-com-br/fake-braspag/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/Baby-com-br/fake-braspag/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/Baby-com-br/fake-braspag/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/Baby-com-br/fake-braspag/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/Baby-com-br/fake-braspag/statuses/9bd9ebdf786d21ab7d544122c918de918fb77e6d"}}}}