GitHub PullRequestReviewCommentEvent at 2014-08-04 17:08:46
Repository: fake-braspag
Actor: pmatiello
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/Baby-com-br/fake-braspag/pulls/comments/15766895","id":15766895,"diff_hunk":"@@ -47,5 +52,25 @@ class Application < Sinatra::Base\n         builder :capture_partial_not_found\n       end\n     end\n+\n+    get '/capture/disable' do\n+      if ResponseToggler.enabled?('capture')\n+        ResponseToggler.disable('capture')\n+\n+        halt 200\n+      else\n+        halt 422\n+      end\n+    end\n+\n+    get '/capture/enable' do\n+      if !ResponseToggler.enabled?('capture')\n+        ResponseToggler.enable('capture')\n+\n+        halt 200\n+      else\n+        halt 422\n+      end\n+    end","path":"lib/fake_braspag.rb","position":46,"original_position":46,"commit_id":"1cdfcee1f0798cd15cb445c3781ff789a860e719","original_commit_id":"1cdfcee1f0798cd15cb445c3781ff789a860e719","user":{"login":"pmatiello","id":46062,"avatar_url":"https://avatars.githubusercontent.com/u/46062?v=2","gravatar_id":"e54f4140dc133a17200fe7a104c33a8e","url":"https://api.github.com/users/pmatiello","html_url":"https://github.com/pmatiello","followers_url":"https://api.github.com/users/pmatiello/followers","following_url":"https://api.github.com/users/pmatiello/following{/other_user}","gists_url":"https://api.github.com/users/pmatiello/gists{/gist_id}","starred_url":"https://api.github.com/users/pmatiello/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pmatiello/subscriptions","organizations_url":"https://api.github.com/users/pmatiello/orgs","repos_url":"https://api.github.com/users/pmatiello/repos","events_url":"https://api.github.com/users/pmatiello/events{/privacy}","received_events_url":"https://api.github.com/users/pmatiello/received_events","type":"User","site_admin":false},"body":"Same here.","created_at":"2014-08-04T17:08:46Z","updated_at":"2014-08-04T17:08:46Z","html_url":"https://github.com/Baby-com-br/fake-braspag/pull/5#discussion_r15766895","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/15766895"},"html":{"href":"https://github.com/Baby-com-br/fake-braspag/pull/5#discussion_r15766895"},"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:08:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d150d663cafa917729a9403ff2e6f191881b3ae7","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/1cdfcee1f0798cd15cb445c3781ff789a860e719","head":{"label":"Baby-com-br:rm-failure-capture","ref":"rm-failure-capture","sha":"1cdfcee1f0798cd15cb445c3781ff789a860e719","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-04T16:49:15Z","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-04T16:49:15Z","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/1cdfcee1f0798cd15cb445c3781ff789a860e719"}}}}