GitHub PullRequestReviewCommentEvent at 2014-12-04 00:57:42
Repository: capybara-webkit
Actor: mhoran
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/thoughtbot/capybara-webkit/pulls/comments/21278989","id":21278989,"diff_hunk":"@@ -21,6 +21,18 @@ def enable_logging\n       browser.enable_logging\n     end\n \n+    def allow_remote_requests\n+      browser.set_remote_request_mode(\"allow\")\n+    end\n+\n+    def block_remote_requests\n+      browser.set_remote_request_mode(\"block\")\n+    end\n+\n+    def add_localhost(host)","path":"lib/capybara/webkit/driver.rb","position":12,"original_position":12,"commit_id":"1d59a6d64b9a1afda733d629ccb4e69689d154b5","original_commit_id":"1d59a6d64b9a1afda733d629ccb4e69689d154b5","user":{"login":"mhoran","id":5330,"avatar_url":"https://avatars.githubusercontent.com/u/5330?v=3","gravatar_id":"","url":"https://api.github.com/users/mhoran","html_url":"https://github.com/mhoran","followers_url":"https://api.github.com/users/mhoran/followers","following_url":"https://api.github.com/users/mhoran/following{/other_user}","gists_url":"https://api.github.com/users/mhoran/gists{/gist_id}","starred_url":"https://api.github.com/users/mhoran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhoran/subscriptions","organizations_url":"https://api.github.com/users/mhoran/orgs","repos_url":"https://api.github.com/users/mhoran/repos","events_url":"https://api.github.com/users/mhoran/events{/privacy}","received_events_url":"https://api.github.com/users/mhoran/received_events","type":"User","site_admin":false},"body":"Are we treating these \"local\" requests in any special way, other than allowing them to pass through this new filter? I think a configurable whitelist, allowing selected remote hosts, is preferably to only allowing localhosts.\r\n\r\nFor example, one could use [puffing-billy](https://github.com/oesmith/puffing-billy) to stub out Stripe in tests. This proxy may be running on \"localhost\", though it could conceivably be running elsewhere. The naming of \"localhost\" is misleading in that case.\r\n\r\nPersonally, blocking all remote hosts is probably fine for all of my use cases. However, I think there may be users who would want to whitelist certain remote requests while blocking all others. This is certainly possible with the code as exists, but users would confusingly have to `add_localhost` for a remote host.\r\n\r\nAm I missing something?","created_at":"2014-12-04T00:57:42Z","updated_at":"2014-12-04T00:57:42Z","html_url":"https://github.com/thoughtbot/capybara-webkit/pull/686#discussion_r21278989","pull_request_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/pulls/686","_links":{"self":{"href":"https://api.github.com/repos/thoughtbot/capybara-webkit/pulls/comments/21278989"},"html":{"href":"https://github.com/thoughtbot/capybara-webkit/pull/686#discussion_r21278989"},"pull_request":{"href":"https://api.github.com/repos/thoughtbot/capybara-webkit/pulls/686"}}},"pull_request":{"url":"https://api.github.com/repos/thoughtbot/capybara-webkit/pulls/686","id":24470234,"html_url":"https://github.com/thoughtbot/capybara-webkit/pull/686","diff_url":"https://github.com/thoughtbot/capybara-webkit/pull/686.diff","patch_url":"https://github.com/thoughtbot/capybara-webkit/pull/686.patch","issue_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/issues/686","number":686,"state":"open","locked":false,"title":"Warn about remote requests with option to block","user":{"login":"jferris","id":7591,"avatar_url":"https://avatars.githubusercontent.com/u/7591?v=3","gravatar_id":"","url":"https://api.github.com/users/jferris","html_url":"https://github.com/jferris","followers_url":"https://api.github.com/users/jferris/followers","following_url":"https://api.github.com/users/jferris/following{/other_user}","gists_url":"https://api.github.com/users/jferris/gists{/gist_id}","starred_url":"https://api.github.com/users/jferris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jferris/subscriptions","organizations_url":"https://api.github.com/users/jferris/orgs","repos_url":"https://api.github.com/users/jferris/repos","events_url":"https://api.github.com/users/jferris/events{/privacy}","received_events_url":"https://api.github.com/users/jferris/received_events","type":"User","site_admin":false},"body":"Adds a new request filter with three modes:\n\n* Warn on an outgoing remote request (default)\n* Stub out remote requests with an empty response\n* Allow remote requests without a warning\n* Allow adding custom localhost definitions","created_at":"2014-11-14T21:04:59Z","updated_at":"2014-12-04T00:57:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"001022503b201f901571aa7b0c6581005c16d977","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/pulls/686/commits","review_comments_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/pulls/686/comments","review_comment_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/pulls/comments/{number}","comments_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/issues/686/comments","statuses_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/statuses/1d59a6d64b9a1afda733d629ccb4e69689d154b5","head":{"label":"thoughtbot:jf-remote-requests","ref":"jf-remote-requests","sha":"1d59a6d64b9a1afda733d629ccb4e69689d154b5","user":{"login":"thoughtbot","id":6183,"avatar_url":"https://avatars.githubusercontent.com/u/6183?v=3","gravatar_id":"","url":"https://api.github.com/users/thoughtbot","html_url":"https://github.com/thoughtbot","followers_url":"https://api.github.com/users/thoughtbot/followers","following_url":"https://api.github.com/users/thoughtbot/following{/other_user}","gists_url":"https://api.github.com/users/thoughtbot/gists{/gist_id}","starred_url":"https://api.github.com/users/thoughtbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thoughtbot/subscriptions","organizations_url":"https://api.github.com/users/thoughtbot/orgs","repos_url":"https://api.github.com/users/thoughtbot/repos","events_url":"https://api.github.com/users/thoughtbot/events{/privacy}","received_events_url":"https://api.github.com/users/thoughtbot/received_events","type":"Organization","site_admin":false},"repo":{"id":1409544,"name":"capybara-webkit","full_name":"thoughtbot/capybara-webkit","owner":{"login":"thoughtbot","id":6183,"avatar_url":"https://avatars.githubusercontent.com/u/6183?v=3","gravatar_id":"","url":"https://api.github.com/users/thoughtbot","html_url":"https://github.com/thoughtbot","followers_url":"https://api.github.com/users/thoughtbot/followers","following_url":"https://api.github.com/users/thoughtbot/following{/other_user}","gists_url":"https://api.github.com/users/thoughtbot/gists{/gist_id}","starred_url":"https://api.github.com/users/thoughtbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thoughtbot/subscriptions","organizations_url":"https://api.github.com/users/thoughtbot/orgs","repos_url":"https://api.github.com/users/thoughtbot/repos","events_url":"https://api.github.com/users/thoughtbot/events{/privacy}","received_events_url":"https://api.github.com/users/thoughtbot/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/thoughtbot/capybara-webkit","description":"A Capybara driver for headless WebKit so you can test Javascript web apps","fork":false,"url":"https://api.github.com/repos/thoughtbot/capybara-webkit","forks_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/forks","keys_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/teams","hooks_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/hooks","issue_events_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/issues/events{/number}","events_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/events","assignees_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/assignees{/user}","branches_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/branches{/branch}","tags_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/tags","blobs_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/git/refs{/sha}","trees_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/statuses/{sha}","languages_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/languages","stargazers_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/stargazers","contributors_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/contributors","subscribers_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/subscribers","subscription_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/subscription","commits_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/commits{/sha}","git_commits_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/git/commits{/sha}","comments_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/comments{/number}","issue_comment_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/issues/comments/{number}","contents_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/contents/{+path}","compare_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/merges","archive_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/downloads","issues_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/issues{/number}","pulls_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/pulls{/number}","milestones_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/milestones{/number}","notifications_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/labels{/name}","releases_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/releases{/id}","created_at":"2011-02-25T03:46:54Z","updated_at":"2014-12-03T09:50:38Z","pushed_at":"2014-12-01T19:36:11Z","git_url":"git://github.com/thoughtbot/capybara-webkit.git","ssh_url":"git@github.com:thoughtbot/capybara-webkit.git","clone_url":"https://github.com/thoughtbot/capybara-webkit.git","svn_url":"https://github.com/thoughtbot/capybara-webkit","homepage":"","size":5621,"stargazers_count":1406,"watchers_count":1406,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":334,"mirror_url":null,"open_issues_count":74,"forks":334,"open_issues":74,"watchers":1406,"default_branch":"master"}},"base":{"label":"thoughtbot:jf-request-filters","ref":"jf-request-filters","sha":"82d0d6fcc96268a6931f01fcbab7c39b4ea71e9f","user":{"login":"thoughtbot","id":6183,"avatar_url":"https://avatars.githubusercontent.com/u/6183?v=3","gravatar_id":"","url":"https://api.github.com/users/thoughtbot","html_url":"https://github.com/thoughtbot","followers_url":"https://api.github.com/users/thoughtbot/followers","following_url":"https://api.github.com/users/thoughtbot/following{/other_user}","gists_url":"https://api.github.com/users/thoughtbot/gists{/gist_id}","starred_url":"https://api.github.com/users/thoughtbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thoughtbot/subscriptions","organizations_url":"https://api.github.com/users/thoughtbot/orgs","repos_url":"https://api.github.com/users/thoughtbot/repos","events_url":"https://api.github.com/users/thoughtbot/events{/privacy}","received_events_url":"https://api.github.com/users/thoughtbot/received_events","type":"Organization","site_admin":false},"repo":{"id":1409544,"name":"capybara-webkit","full_name":"thoughtbot/capybara-webkit","owner":{"login":"thoughtbot","id":6183,"avatar_url":"https://avatars.githubusercontent.com/u/6183?v=3","gravatar_id":"","url":"https://api.github.com/users/thoughtbot","html_url":"https://github.com/thoughtbot","followers_url":"https://api.github.com/users/thoughtbot/followers","following_url":"https://api.github.com/users/thoughtbot/following{/other_user}","gists_url":"https://api.github.com/users/thoughtbot/gists{/gist_id}","starred_url":"https://api.github.com/users/thoughtbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thoughtbot/subscriptions","organizations_url":"https://api.github.com/users/thoughtbot/orgs","repos_url":"https://api.github.com/users/thoughtbot/repos","events_url":"https://api.github.com/users/thoughtbot/events{/privacy}","received_events_url":"https://api.github.com/users/thoughtbot/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/thoughtbot/capybara-webkit","description":"A Capybara driver for headless WebKit so you can test Javascript web apps","fork":false,"url":"https://api.github.com/repos/thoughtbot/capybara-webkit","forks_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/forks","keys_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/teams","hooks_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/hooks","issue_events_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/issues/events{/number}","events_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/events","assignees_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/assignees{/user}","branches_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/branches{/branch}","tags_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/tags","blobs_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/git/refs{/sha}","trees_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/statuses/{sha}","languages_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/languages","stargazers_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/stargazers","contributors_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/contributors","subscribers_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/subscribers","subscription_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/subscription","commits_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/commits{/sha}","git_commits_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/git/commits{/sha}","comments_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/comments{/number}","issue_comment_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/issues/comments/{number}","contents_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/contents/{+path}","compare_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/merges","archive_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/downloads","issues_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/issues{/number}","pulls_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/pulls{/number}","milestones_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/milestones{/number}","notifications_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/labels{/name}","releases_url":"https://api.github.com/repos/thoughtbot/capybara-webkit/releases{/id}","created_at":"2011-02-25T03:46:54Z","updated_at":"2014-12-03T09:50:38Z","pushed_at":"2014-12-01T19:36:11Z","git_url":"git://github.com/thoughtbot/capybara-webkit.git","ssh_url":"git@github.com:thoughtbot/capybara-webkit.git","clone_url":"https://github.com/thoughtbot/capybara-webkit.git","svn_url":"https://github.com/thoughtbot/capybara-webkit","homepage":"","size":5621,"stargazers_count":1406,"watchers_count":1406,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":334,"mirror_url":null,"open_issues_count":74,"forks":334,"open_issues":74,"watchers":1406,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/thoughtbot/capybara-webkit/pulls/686"},"html":{"href":"https://github.com/thoughtbot/capybara-webkit/pull/686"},"issue":{"href":"https://api.github.com/repos/thoughtbot/capybara-webkit/issues/686"},"comments":{"href":"https://api.github.com/repos/thoughtbot/capybara-webkit/issues/686/comments"},"review_comments":{"href":"https://api.github.com/repos/thoughtbot/capybara-webkit/pulls/686/comments"},"review_comment":{"href":"https://api.github.com/repos/thoughtbot/capybara-webkit/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/thoughtbot/capybara-webkit/pulls/686/commits"},"statuses":{"href":"https://api.github.com/repos/thoughtbot/capybara-webkit/statuses/1d59a6d64b9a1afda733d629ccb4e69689d154b5"}}}}