{"action":"created","comment":{"url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/pulls/comments/43931254","id":43931254,"diff_hunk":"@@ -75,4 +75,36 @@\n       expect(error).to eq('must be an HTTPS/SSL URI.')\n     end\n   end\n+\n+  context 'allow localhost' do\n+    it 'accepts an valid uri' do\n+      subject.redirect_uri = 'https://example.com/callback'\n+      expect(subject).to be_valid\n+    end\n+\n+    it 'accepts native redirect uri' do\n+      subject.redirect_uri = 'urn:ietf:wg:oauth:2.0:oob'\n+      expect(subject).to be_valid\n+    end\n+\n+    it 'accepts app redirect uri' do\n+      subject.redirect_uri = 'some-awesome-app://oauth/callback'\n+      expect(subject).to be_valid\n+    end\n+\n+    it 'accepts a localhost uri when allowed' do\n+      subject.redirect_uri = 'http://localhost:3000/callback'\n+      allow(Doorkeeper.configuration).to receive(\n+                                             :allow_localhost_in_redirect_uri\n+                                         ).and_return(true)","path":"spec/validators/redirect_uri_validator_spec.rb","position":25,"original_position":25,"commit_id":"d4d6cbad3475dc9027538e6012c8ebc668573493","original_commit_id":"d4d6cbad3475dc9027538e6012c8ebc668573493","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Indent `)` the same as the start of the line where `(` is.","created_at":"2015-11-04T20:00:35Z","updated_at":"2015-11-04T20:00:35Z","html_url":"https://github.com/doorkeeper-gem/doorkeeper/pull/740#discussion_r43931254","pull_request_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/pulls/740","_links":{"self":{"href":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/pulls/comments/43931254"},"html":{"href":"https://github.com/doorkeeper-gem/doorkeeper/pull/740#discussion_r43931254"},"pull_request":{"href":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/pulls/740"}}},"pull_request":{"url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/pulls/740","id":49737497,"html_url":"https://github.com/doorkeeper-gem/doorkeeper/pull/740","diff_url":"https://github.com/doorkeeper-gem/doorkeeper/pull/740.diff","patch_url":"https://github.com/doorkeeper-gem/doorkeeper/pull/740.patch","issue_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/issues/740","number":740,"state":"open","locked":false,"title":"Allow localhost in redirect URI option, and fixed attr_accessible issue with Rails 4.0.x","user":{"login":"TMSCH","id":2036827,"avatar_url":"https://avatars.githubusercontent.com/u/2036827?v=3","gravatar_id":"","url":"https://api.github.com/users/TMSCH","html_url":"https://github.com/TMSCH","followers_url":"https://api.github.com/users/TMSCH/followers","following_url":"https://api.github.com/users/TMSCH/following{/other_user}","gists_url":"https://api.github.com/users/TMSCH/gists{/gist_id}","starred_url":"https://api.github.com/users/TMSCH/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TMSCH/subscriptions","organizations_url":"https://api.github.com/users/TMSCH/orgs","repos_url":"https://api.github.com/users/TMSCH/repos","events_url":"https://api.github.com/users/TMSCH/events{/privacy}","received_events_url":"https://api.github.com/users/TMSCH/received_events","type":"User","site_admin":false},"body":"Hey,\r\n\r\nThis pull request covers 2 things:\r\n\r\n- The main one is the addition of a `allow_localhost_in_redirect_uri` option which allows to specify a localhost (e.g. `http://localhost:3000/callback`) even when `force_ssl_in_redirect_uri` is true. This has been a use case in our situation where an internal OAuth provider could be used for local dev (just as you can use Google OAuth for local dev too)\r\n- The second, minor one, was an issue when upgrading from Doorkeeper 2.2.0 to 2.2.2 where `attr_accessible` was added to model mixins. In the `included` block, it tests for `respond_to?(:attr_accessible)` before using it but Rails 4.0.x still provides the method and raises a deprecation error... I've changed the condition to fix that.\r\n\r\nLet me know if there's any issue with my updates!\r\n\r\nThanks\r\nThomas ","created_at":"2015-11-04T20:00:29Z","updated_at":"2015-11-04T20:00:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ce7c5b2f7f8124ce267ed377e122595aec6046d5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/pulls/740/commits","review_comments_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/pulls/740/comments","review_comment_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/pulls/comments{/number}","comments_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/issues/740/comments","statuses_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/statuses/d4d6cbad3475dc9027538e6012c8ebc668573493","head":{"label":"AnalyticsMediaGroup:master","ref":"master","sha":"d4d6cbad3475dc9027538e6012c8ebc668573493","user":{"login":"AnalyticsMediaGroup","id":3986915,"avatar_url":"https://avatars.githubusercontent.com/u/3986915?v=3","gravatar_id":"","url":"https://api.github.com/users/AnalyticsMediaGroup","html_url":"https://github.com/AnalyticsMediaGroup","followers_url":"https://api.github.com/users/AnalyticsMediaGroup/followers","following_url":"https://api.github.com/users/AnalyticsMediaGroup/following{/other_user}","gists_url":"https://api.github.com/users/AnalyticsMediaGroup/gists{/gist_id}","starred_url":"https://api.github.com/users/AnalyticsMediaGroup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AnalyticsMediaGroup/subscriptions","organizations_url":"https://api.github.com/users/AnalyticsMediaGroup/orgs","repos_url":"https://api.github.com/users/AnalyticsMediaGroup/repos","events_url":"https://api.github.com/users/AnalyticsMediaGroup/events{/privacy}","received_events_url":"https://api.github.com/users/AnalyticsMediaGroup/received_events","type":"Organization","site_admin":false},"repo":{"id":45559894,"name":"doorkeeper","full_name":"AnalyticsMediaGroup/doorkeeper","owner":{"login":"AnalyticsMediaGroup","id":3986915,"avatar_url":"https://avatars.githubusercontent.com/u/3986915?v=3","gravatar_id":"","url":"https://api.github.com/users/AnalyticsMediaGroup","html_url":"https://github.com/AnalyticsMediaGroup","followers_url":"https://api.github.com/users/AnalyticsMediaGroup/followers","following_url":"https://api.github.com/users/AnalyticsMediaGroup/following{/other_user}","gists_url":"https://api.github.com/users/AnalyticsMediaGroup/gists{/gist_id}","starred_url":"https://api.github.com/users/AnalyticsMediaGroup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AnalyticsMediaGroup/subscriptions","organizations_url":"https://api.github.com/users/AnalyticsMediaGroup/orgs","repos_url":"https://api.github.com/users/AnalyticsMediaGroup/repos","events_url":"https://api.github.com/users/AnalyticsMediaGroup/events{/privacy}","received_events_url":"https://api.github.com/users/AnalyticsMediaGroup/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AnalyticsMediaGroup/doorkeeper","description":"Doorkeeper is an OAuth 2 provider for Rails and Grape","fork":true,"url":"https://api.github.com/repos/AnalyticsMediaGroup/doorkeeper","forks_url":"https://api.github.com/repos/AnalyticsMediaGroup/doorkeeper/forks","keys_url":"https://api.github.com/repos/AnalyticsMediaGroup/doorkeeper/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AnalyticsMediaGroup/doorkeeper/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AnalyticsMediaGroup/doorkeeper/teams","hooks_url":"https://api.github.com/repos/AnalyticsMediaGroup/doorkeeper/hooks","issue_events_url":"https://api.github.com/repos/AnalyticsMediaGroup/doorkeeper/issues/events{/number}","events_url":"https://api.github.com/repos/AnalyticsMediaGroup/doorkeeper/events","assignees_url":"https://api.github.com/repos/AnalyticsMediaGroup/doorkeeper/assignees{/user}","branches_url":"https://api.github.com/repos/AnalyticsMediaGroup/doorkeeper/branches{/branch}","tags_url":"https://api.github.com/repos/AnalyticsMediaGroup/doorkeeper/tags","blobs_url":"https://api.github.com/repos/AnalyticsMediaGroup/doorkeeper/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AnalyticsMediaGroup/doorkeeper/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AnalyticsMediaGroup/doorkeeper/git/refs{/sha}","trees_url":"https://api.github.com/repos/AnalyticsMediaGroup/doorkeeper/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AnalyticsMediaGroup/doorkeeper/statuses/{sha}","languages_url":"https://api.github.com/repos/AnalyticsMediaGroup/doorkeeper/languages","stargazers_url":"https://api.github.com/repos/AnalyticsMediaGroup/doorkeeper/stargazers","contributors_url":"https://api.github.com/repos/AnalyticsMediaGroup/doorkeeper/contributors","subscribers_url":"https://api.github.com/repos/AnalyticsMediaGroup/doorkeeper/subscribers","subscription_url":"https://api.github.com/repos/AnalyticsMediaGroup/doorkeeper/subscription","commits_url":"https://api.github.com/repos/AnalyticsMediaGroup/doorkeeper/commits{/sha}","git_commits_url":"https://api.github.com/repos/AnalyticsMediaGroup/doorkeeper/git/commits{/sha}","comments_url":"https://api.github.com/repos/AnalyticsMediaGroup/doorkeeper/comments{/number}","issue_comment_url":"https://api.github.com/repos/AnalyticsMediaGroup/doorkeeper/issues/comments{/number}","contents_url":"https://api.github.com/repos/AnalyticsMediaGroup/doorkeeper/contents/{+path}","compare_url":"https://api.github.com/repos/AnalyticsMediaGroup/doorkeeper/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AnalyticsMediaGroup/doorkeeper/merges","archive_url":"https://api.github.com/repos/AnalyticsMediaGroup/doorkeeper/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AnalyticsMediaGroup/doorkeeper/downloads","issues_url":"https://api.github.com/repos/AnalyticsMediaGroup/doorkeeper/issues{/number}","pulls_url":"https://api.github.com/repos/AnalyticsMediaGroup/doorkeeper/pulls{/number}","milestones_url":"https://api.github.com/repos/AnalyticsMediaGroup/doorkeeper/milestones{/number}","notifications_url":"https://api.github.com/repos/AnalyticsMediaGroup/doorkeeper/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AnalyticsMediaGroup/doorkeeper/labels{/name}","releases_url":"https://api.github.com/repos/AnalyticsMediaGroup/doorkeeper/releases{/id}","created_at":"2015-11-04T18:45:50Z","updated_at":"2015-11-04T18:45:51Z","pushed_at":"2015-11-04T19:51:22Z","git_url":"git://github.com/AnalyticsMediaGroup/doorkeeper.git","ssh_url":"git@github.com:AnalyticsMediaGroup/doorkeeper.git","clone_url":"https://github.com/AnalyticsMediaGroup/doorkeeper.git","svn_url":"https://github.com/AnalyticsMediaGroup/doorkeeper","homepage":"","size":6471,"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":"doorkeeper-gem:master","ref":"master","sha":"f9d5e3df1a7dc0b944f6c075e9a9823126b54b80","user":{"login":"doorkeeper-gem","id":7275750,"avatar_url":"https://avatars.githubusercontent.com/u/7275750?v=3","gravatar_id":"","url":"https://api.github.com/users/doorkeeper-gem","html_url":"https://github.com/doorkeeper-gem","followers_url":"https://api.github.com/users/doorkeeper-gem/followers","following_url":"https://api.github.com/users/doorkeeper-gem/following{/other_user}","gists_url":"https://api.github.com/users/doorkeeper-gem/gists{/gist_id}","starred_url":"https://api.github.com/users/doorkeeper-gem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/doorkeeper-gem/subscriptions","organizations_url":"https://api.github.com/users/doorkeeper-gem/orgs","repos_url":"https://api.github.com/users/doorkeeper-gem/repos","events_url":"https://api.github.com/users/doorkeeper-gem/events{/privacy}","received_events_url":"https://api.github.com/users/doorkeeper-gem/received_events","type":"Organization","site_admin":false},"repo":{"id":2802565,"name":"doorkeeper","full_name":"doorkeeper-gem/doorkeeper","owner":{"login":"doorkeeper-gem","id":7275750,"avatar_url":"https://avatars.githubusercontent.com/u/7275750?v=3","gravatar_id":"","url":"https://api.github.com/users/doorkeeper-gem","html_url":"https://github.com/doorkeeper-gem","followers_url":"https://api.github.com/users/doorkeeper-gem/followers","following_url":"https://api.github.com/users/doorkeeper-gem/following{/other_user}","gists_url":"https://api.github.com/users/doorkeeper-gem/gists{/gist_id}","starred_url":"https://api.github.com/users/doorkeeper-gem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/doorkeeper-gem/subscriptions","organizations_url":"https://api.github.com/users/doorkeeper-gem/orgs","repos_url":"https://api.github.com/users/doorkeeper-gem/repos","events_url":"https://api.github.com/users/doorkeeper-gem/events{/privacy}","received_events_url":"https://api.github.com/users/doorkeeper-gem/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/doorkeeper-gem/doorkeeper","description":"Doorkeeper is an OAuth 2 provider for Rails and Grape","fork":false,"url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper","forks_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/forks","keys_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/keys{/key_id}","collaborators_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/teams","hooks_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/hooks","issue_events_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/issues/events{/number}","events_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/events","assignees_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/assignees{/user}","branches_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/branches{/branch}","tags_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/tags","blobs_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/git/refs{/sha}","trees_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/git/trees{/sha}","statuses_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/statuses/{sha}","languages_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/languages","stargazers_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/stargazers","contributors_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/contributors","subscribers_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/subscribers","subscription_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/subscription","commits_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/commits{/sha}","git_commits_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/git/commits{/sha}","comments_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/comments{/number}","issue_comment_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/issues/comments{/number}","contents_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/contents/{+path}","compare_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/compare/{base}...{head}","merges_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/merges","archive_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/downloads","issues_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/issues{/number}","pulls_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/pulls{/number}","milestones_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/milestones{/number}","notifications_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/labels{/name}","releases_url":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/releases{/id}","created_at":"2011-11-18T13:02:01Z","updated_at":"2015-11-04T11:06:22Z","pushed_at":"2015-11-04T20:00:29Z","git_url":"git://github.com/doorkeeper-gem/doorkeeper.git","ssh_url":"git@github.com:doorkeeper-gem/doorkeeper.git","clone_url":"https://github.com/doorkeeper-gem/doorkeeper.git","svn_url":"https://github.com/doorkeeper-gem/doorkeeper","homepage":"","size":6471,"stargazers_count":2664,"watchers_count":2664,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":542,"mirror_url":null,"open_issues_count":23,"forks":542,"open_issues":23,"watchers":2664,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/pulls/740"},"html":{"href":"https://github.com/doorkeeper-gem/doorkeeper/pull/740"},"issue":{"href":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/issues/740"},"comments":{"href":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/issues/740/comments"},"review_comments":{"href":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/pulls/740/comments"},"review_comment":{"href":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/pulls/740/commits"},"statuses":{"href":"https://api.github.com/repos/doorkeeper-gem/doorkeeper/statuses/d4d6cbad3475dc9027538e6012c8ebc668573493"}}}}