{"action":"created","comment":{"url":"https://api.github.com/repos/CivicCommons/CivicCommons/pulls/comments/39861329","id":39861329,"diff_hunk":"@@ -21,4 +23,14 @@ def create_embeddly_info\n     end\n   end\n \n+  def set_root_domain\n+    return if self.root_domain.present?\n+    return if self.remote_page_url.blank?\n+\n+    uri = URI.parse self.remote_page_url\n+    return if url.nil?\n+\n+    self.root_domain = uri.host\n+  end\n+","path":"app/models/remote_page.rb","position":29,"original_position":29,"commit_id":"94f87e649693263716d89f2db84ed500a07f0bcc","original_commit_id":"94f87e649693263716d89f2db84ed500a07f0bcc","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":"Extra empty line detected at class body end.","created_at":"2015-09-18T14:38:51Z","updated_at":"2015-09-18T14:38:51Z","html_url":"https://github.com/CivicCommons/CivicCommons/pull/137#discussion_r39861329","pull_request_url":"https://api.github.com/repos/CivicCommons/CivicCommons/pulls/137","_links":{"self":{"href":"https://api.github.com/repos/CivicCommons/CivicCommons/pulls/comments/39861329"},"html":{"href":"https://github.com/CivicCommons/CivicCommons/pull/137#discussion_r39861329"},"pull_request":{"href":"https://api.github.com/repos/CivicCommons/CivicCommons/pulls/137"}}},"pull_request":{"url":"https://api.github.com/repos/CivicCommons/CivicCommons/pulls/137","id":45413562,"html_url":"https://github.com/CivicCommons/CivicCommons/pull/137","diff_url":"https://github.com/CivicCommons/CivicCommons/pull/137.diff","patch_url":"https://github.com/CivicCommons/CivicCommons/pull/137.patch","issue_url":"https://api.github.com/repos/CivicCommons/CivicCommons/issues/137","number":137,"state":"open","locked":false,"title":"Allow Sites to more directly control duplicate remote embeds","user":{"login":"JoshReedSchramm","id":56701,"avatar_url":"https://avatars.githubusercontent.com/u/56701?v=3","gravatar_id":"","url":"https://api.github.com/users/JoshReedSchramm","html_url":"https://github.com/JoshReedSchramm","followers_url":"https://api.github.com/users/JoshReedSchramm/followers","following_url":"https://api.github.com/users/JoshReedSchramm/following{/other_user}","gists_url":"https://api.github.com/users/JoshReedSchramm/gists{/gist_id}","starred_url":"https://api.github.com/users/JoshReedSchramm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JoshReedSchramm/subscriptions","organizations_url":"https://api.github.com/users/JoshReedSchramm/orgs","repos_url":"https://api.github.com/users/JoshReedSchramm/repos","events_url":"https://api.github.com/users/JoshReedSchramm/events{/privacy}","received_events_url":"https://api.github.com/users/JoshReedSchramm/received_events","type":"User","site_admin":false},"body":"This feature allows a client of the embed to either use the default remotePageAddress field or override it with the combination of sourceKey and rootDomain. Using the later will cause civic to search on those keys. This was requested by ideastream to fix a situation where the same article is posted on multiple subdomains but with different embeds. ","created_at":"2015-09-18T14:38:44Z","updated_at":"2015-09-18T14:38:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"351132e344dc3973031469d0f70b6a352da8d98d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/CivicCommons/CivicCommons/pulls/137/commits","review_comments_url":"https://api.github.com/repos/CivicCommons/CivicCommons/pulls/137/comments","review_comment_url":"https://api.github.com/repos/CivicCommons/CivicCommons/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CivicCommons/CivicCommons/issues/137/comments","statuses_url":"https://api.github.com/repos/CivicCommons/CivicCommons/statuses/94f87e649693263716d89f2db84ed500a07f0bcc","head":{"label":"CivicCommons:224-multiple_remote_embeds","ref":"224-multiple_remote_embeds","sha":"94f87e649693263716d89f2db84ed500a07f0bcc","user":{"login":"CivicCommons","id":302184,"avatar_url":"https://avatars.githubusercontent.com/u/302184?v=3","gravatar_id":"","url":"https://api.github.com/users/CivicCommons","html_url":"https://github.com/CivicCommons","followers_url":"https://api.github.com/users/CivicCommons/followers","following_url":"https://api.github.com/users/CivicCommons/following{/other_user}","gists_url":"https://api.github.com/users/CivicCommons/gists{/gist_id}","starred_url":"https://api.github.com/users/CivicCommons/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CivicCommons/subscriptions","organizations_url":"https://api.github.com/users/CivicCommons/orgs","repos_url":"https://api.github.com/users/CivicCommons/repos","events_url":"https://api.github.com/users/CivicCommons/events{/privacy}","received_events_url":"https://api.github.com/users/CivicCommons/received_events","type":"Organization","site_admin":false},"repo":{"id":740326,"name":"CivicCommons","full_name":"CivicCommons/CivicCommons","owner":{"login":"CivicCommons","id":302184,"avatar_url":"https://avatars.githubusercontent.com/u/302184?v=3","gravatar_id":"","url":"https://api.github.com/users/CivicCommons","html_url":"https://github.com/CivicCommons","followers_url":"https://api.github.com/users/CivicCommons/followers","following_url":"https://api.github.com/users/CivicCommons/following{/other_user}","gists_url":"https://api.github.com/users/CivicCommons/gists{/gist_id}","starred_url":"https://api.github.com/users/CivicCommons/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CivicCommons/subscriptions","organizations_url":"https://api.github.com/users/CivicCommons/orgs","repos_url":"https://api.github.com/users/CivicCommons/repos","events_url":"https://api.github.com/users/CivicCommons/events{/privacy}","received_events_url":"https://api.github.com/users/CivicCommons/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CivicCommons/CivicCommons","description":"Crowdsourced Civic Conversations","fork":false,"url":"https://api.github.com/repos/CivicCommons/CivicCommons","forks_url":"https://api.github.com/repos/CivicCommons/CivicCommons/forks","keys_url":"https://api.github.com/repos/CivicCommons/CivicCommons/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CivicCommons/CivicCommons/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CivicCommons/CivicCommons/teams","hooks_url":"https://api.github.com/repos/CivicCommons/CivicCommons/hooks","issue_events_url":"https://api.github.com/repos/CivicCommons/CivicCommons/issues/events{/number}","events_url":"https://api.github.com/repos/CivicCommons/CivicCommons/events","assignees_url":"https://api.github.com/repos/CivicCommons/CivicCommons/assignees{/user}","branches_url":"https://api.github.com/repos/CivicCommons/CivicCommons/branches{/branch}","tags_url":"https://api.github.com/repos/CivicCommons/CivicCommons/tags","blobs_url":"https://api.github.com/repos/CivicCommons/CivicCommons/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CivicCommons/CivicCommons/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CivicCommons/CivicCommons/git/refs{/sha}","trees_url":"https://api.github.com/repos/CivicCommons/CivicCommons/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CivicCommons/CivicCommons/statuses/{sha}","languages_url":"https://api.github.com/repos/CivicCommons/CivicCommons/languages","stargazers_url":"https://api.github.com/repos/CivicCommons/CivicCommons/stargazers","contributors_url":"https://api.github.com/repos/CivicCommons/CivicCommons/contributors","subscribers_url":"https://api.github.com/repos/CivicCommons/CivicCommons/subscribers","subscription_url":"https://api.github.com/repos/CivicCommons/CivicCommons/subscription","commits_url":"https://api.github.com/repos/CivicCommons/CivicCommons/commits{/sha}","git_commits_url":"https://api.github.com/repos/CivicCommons/CivicCommons/git/commits{/sha}","comments_url":"https://api.github.com/repos/CivicCommons/CivicCommons/comments{/number}","issue_comment_url":"https://api.github.com/repos/CivicCommons/CivicCommons/issues/comments{/number}","contents_url":"https://api.github.com/repos/CivicCommons/CivicCommons/contents/{+path}","compare_url":"https://api.github.com/repos/CivicCommons/CivicCommons/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CivicCommons/CivicCommons/merges","archive_url":"https://api.github.com/repos/CivicCommons/CivicCommons/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CivicCommons/CivicCommons/downloads","issues_url":"https://api.github.com/repos/CivicCommons/CivicCommons/issues{/number}","pulls_url":"https://api.github.com/repos/CivicCommons/CivicCommons/pulls{/number}","milestones_url":"https://api.github.com/repos/CivicCommons/CivicCommons/milestones{/number}","notifications_url":"https://api.github.com/repos/CivicCommons/CivicCommons/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CivicCommons/CivicCommons/labels{/name}","releases_url":"https://api.github.com/repos/CivicCommons/CivicCommons/releases{/id}","created_at":"2010-06-25T22:47:04Z","updated_at":"2015-04-08T20:29:38Z","pushed_at":"2015-09-18T14:38:45Z","git_url":"git://github.com/CivicCommons/CivicCommons.git","ssh_url":"git@github.com:CivicCommons/CivicCommons.git","clone_url":"https://github.com/CivicCommons/CivicCommons.git","svn_url":"https://github.com/CivicCommons/CivicCommons","homepage":"http://theciviccommons.com/","size":36783,"stargazers_count":21,"watchers_count":21,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":1,"forks":12,"open_issues":1,"watchers":21,"default_branch":"master"}},"base":{"label":"CivicCommons:master","ref":"master","sha":"79550921e2bcecab16339c7782d3e39b66ca3e93","user":{"login":"CivicCommons","id":302184,"avatar_url":"https://avatars.githubusercontent.com/u/302184?v=3","gravatar_id":"","url":"https://api.github.com/users/CivicCommons","html_url":"https://github.com/CivicCommons","followers_url":"https://api.github.com/users/CivicCommons/followers","following_url":"https://api.github.com/users/CivicCommons/following{/other_user}","gists_url":"https://api.github.com/users/CivicCommons/gists{/gist_id}","starred_url":"https://api.github.com/users/CivicCommons/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CivicCommons/subscriptions","organizations_url":"https://api.github.com/users/CivicCommons/orgs","repos_url":"https://api.github.com/users/CivicCommons/repos","events_url":"https://api.github.com/users/CivicCommons/events{/privacy}","received_events_url":"https://api.github.com/users/CivicCommons/received_events","type":"Organization","site_admin":false},"repo":{"id":740326,"name":"CivicCommons","full_name":"CivicCommons/CivicCommons","owner":{"login":"CivicCommons","id":302184,"avatar_url":"https://avatars.githubusercontent.com/u/302184?v=3","gravatar_id":"","url":"https://api.github.com/users/CivicCommons","html_url":"https://github.com/CivicCommons","followers_url":"https://api.github.com/users/CivicCommons/followers","following_url":"https://api.github.com/users/CivicCommons/following{/other_user}","gists_url":"https://api.github.com/users/CivicCommons/gists{/gist_id}","starred_url":"https://api.github.com/users/CivicCommons/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CivicCommons/subscriptions","organizations_url":"https://api.github.com/users/CivicCommons/orgs","repos_url":"https://api.github.com/users/CivicCommons/repos","events_url":"https://api.github.com/users/CivicCommons/events{/privacy}","received_events_url":"https://api.github.com/users/CivicCommons/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CivicCommons/CivicCommons","description":"Crowdsourced Civic Conversations","fork":false,"url":"https://api.github.com/repos/CivicCommons/CivicCommons","forks_url":"https://api.github.com/repos/CivicCommons/CivicCommons/forks","keys_url":"https://api.github.com/repos/CivicCommons/CivicCommons/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CivicCommons/CivicCommons/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CivicCommons/CivicCommons/teams","hooks_url":"https://api.github.com/repos/CivicCommons/CivicCommons/hooks","issue_events_url":"https://api.github.com/repos/CivicCommons/CivicCommons/issues/events{/number}","events_url":"https://api.github.com/repos/CivicCommons/CivicCommons/events","assignees_url":"https://api.github.com/repos/CivicCommons/CivicCommons/assignees{/user}","branches_url":"https://api.github.com/repos/CivicCommons/CivicCommons/branches{/branch}","tags_url":"https://api.github.com/repos/CivicCommons/CivicCommons/tags","blobs_url":"https://api.github.com/repos/CivicCommons/CivicCommons/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CivicCommons/CivicCommons/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CivicCommons/CivicCommons/git/refs{/sha}","trees_url":"https://api.github.com/repos/CivicCommons/CivicCommons/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CivicCommons/CivicCommons/statuses/{sha}","languages_url":"https://api.github.com/repos/CivicCommons/CivicCommons/languages","stargazers_url":"https://api.github.com/repos/CivicCommons/CivicCommons/stargazers","contributors_url":"https://api.github.com/repos/CivicCommons/CivicCommons/contributors","subscribers_url":"https://api.github.com/repos/CivicCommons/CivicCommons/subscribers","subscription_url":"https://api.github.com/repos/CivicCommons/CivicCommons/subscription","commits_url":"https://api.github.com/repos/CivicCommons/CivicCommons/commits{/sha}","git_commits_url":"https://api.github.com/repos/CivicCommons/CivicCommons/git/commits{/sha}","comments_url":"https://api.github.com/repos/CivicCommons/CivicCommons/comments{/number}","issue_comment_url":"https://api.github.com/repos/CivicCommons/CivicCommons/issues/comments{/number}","contents_url":"https://api.github.com/repos/CivicCommons/CivicCommons/contents/{+path}","compare_url":"https://api.github.com/repos/CivicCommons/CivicCommons/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CivicCommons/CivicCommons/merges","archive_url":"https://api.github.com/repos/CivicCommons/CivicCommons/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CivicCommons/CivicCommons/downloads","issues_url":"https://api.github.com/repos/CivicCommons/CivicCommons/issues{/number}","pulls_url":"https://api.github.com/repos/CivicCommons/CivicCommons/pulls{/number}","milestones_url":"https://api.github.com/repos/CivicCommons/CivicCommons/milestones{/number}","notifications_url":"https://api.github.com/repos/CivicCommons/CivicCommons/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CivicCommons/CivicCommons/labels{/name}","releases_url":"https://api.github.com/repos/CivicCommons/CivicCommons/releases{/id}","created_at":"2010-06-25T22:47:04Z","updated_at":"2015-04-08T20:29:38Z","pushed_at":"2015-09-18T14:38:45Z","git_url":"git://github.com/CivicCommons/CivicCommons.git","ssh_url":"git@github.com:CivicCommons/CivicCommons.git","clone_url":"https://github.com/CivicCommons/CivicCommons.git","svn_url":"https://github.com/CivicCommons/CivicCommons","homepage":"http://theciviccommons.com/","size":36783,"stargazers_count":21,"watchers_count":21,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":1,"forks":12,"open_issues":1,"watchers":21,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CivicCommons/CivicCommons/pulls/137"},"html":{"href":"https://github.com/CivicCommons/CivicCommons/pull/137"},"issue":{"href":"https://api.github.com/repos/CivicCommons/CivicCommons/issues/137"},"comments":{"href":"https://api.github.com/repos/CivicCommons/CivicCommons/issues/137/comments"},"review_comments":{"href":"https://api.github.com/repos/CivicCommons/CivicCommons/pulls/137/comments"},"review_comment":{"href":"https://api.github.com/repos/CivicCommons/CivicCommons/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CivicCommons/CivicCommons/pulls/137/commits"},"statuses":{"href":"https://api.github.com/repos/CivicCommons/CivicCommons/statuses/94f87e649693263716d89f2db84ed500a07f0bcc"}}}}