{"action":"created","comment":{"url":"https://api.github.com/repos/chocolatey/package-validator/pulls/comments/46685171","id":46685171,"diff_hunk":"@@ -0,0 +1,144 @@\n+﻿namespace chocolatey.package.validator.tests.infrastructure.app\n+{\n+    using chocolatey.package.validator.infrastructure.app.rules;\n+    using Should;\n+\n+    public abstract class IconUrlNotSameDomainAsProjectUrlDomainorRawGitGuidelineSpecsBase : TinySpec\n+    {\n+        protected IconUrlNotSameDomainAsProjectUrlDomainOrRawGitGuideline iconGuideline;\n+\n+        public override void Context()\n+        {\n+            iconGuideline = new IconUrlNotSameDomainAsProjectUrlDomainOrRawGitGuideline();\n+        }\n+    }\n+\n+    public class when_extracting_domain_from_host : IconUrlNotSameDomainAsProjectUrlDomainorRawGitGuidelineSpecsBase\n+    {\n+        private string result;\n+\n+        public override void Because()\n+        {\n+        }\n+\n+        [Fact]\n+        public void IsIconFromSameDomainAsProjectOrRawgit_should_return_true_from_same_hosts_with_single_level_top_level_domain()\n+        {\n+            Context();\n+\n+            var result = this.iconGuideline.is_icon_from_same_domain_as_project_or_rawgit(\"test.com\", \"test.com\");\n+\n+            result.ShouldBeTrue();\n+        }\n+\n+        [Fact]\n+        public void IsIconFromSameDomainAsProjectOrRawgit_should_return_true_from_same_hosts_with_double_level_top_level_domain()\n+        {\n+            Context();\n+\n+            var result = this.iconGuideline.is_icon_from_same_domain_as_project_or_rawgit(\"test.co.uk\", \"test.co.uk\");\n+\n+            result.ShouldBeTrue();\n+        }\n+\n+        [Fact]\n+        public void IsIconFromSameDomainAsProjectOrRawgit_should_return_true_from_rawgit_domain_with_single_level_top_level_domain()\n+        {\n+            Context();","path":"src/chocolatey.package.validator.tests/infrastructure.app/IconUrlNotSameDomainAsProjectUrlDomainorRawGitGuidelineSpecs.cs","position":47,"original_position":47,"commit_id":"84e16118a2e987587e4e5e14884c9fc3ccb80951","original_commit_id":"84e16118a2e987587e4e5e14884c9fc3ccb80951","user":{"login":"ferventcoder","id":63502,"avatar_url":"https://avatars.githubusercontent.com/u/63502?v=3","gravatar_id":"","url":"https://api.github.com/users/ferventcoder","html_url":"https://github.com/ferventcoder","followers_url":"https://api.github.com/users/ferventcoder/followers","following_url":"https://api.github.com/users/ferventcoder/following{/other_user}","gists_url":"https://api.github.com/users/ferventcoder/gists{/gist_id}","starred_url":"https://api.github.com/users/ferventcoder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ferventcoder/subscriptions","organizations_url":"https://api.github.com/users/ferventcoder/orgs","repos_url":"https://api.github.com/users/ferventcoder/repos","events_url":"https://api.github.com/users/ferventcoder/events{/privacy}","received_events_url":"https://api.github.com/users/ferventcoder/received_events","type":"User","site_admin":false},"body":"This is the norm - https://github.com/chocolatey/choco/blob/56677dfe853f9852b8292c9d4de4c7778dd6029e/src/chocolatey.tests/infrastructure.app/services/FilesServiceSpecs.cs#L135-L169","created_at":"2015-12-04T14:14:06Z","updated_at":"2015-12-04T14:14:06Z","html_url":"https://github.com/chocolatey/package-validator/pull/23#discussion_r46685171","pull_request_url":"https://api.github.com/repos/chocolatey/package-validator/pulls/23","_links":{"self":{"href":"https://api.github.com/repos/chocolatey/package-validator/pulls/comments/46685171"},"html":{"href":"https://github.com/chocolatey/package-validator/pull/23#discussion_r46685171"},"pull_request":{"href":"https://api.github.com/repos/chocolatey/package-validator/pulls/23"}}},"pull_request":{"url":"https://api.github.com/repos/chocolatey/package-validator/pulls/23","id":51944844,"html_url":"https://github.com/chocolatey/package-validator/pull/23","diff_url":"https://github.com/chocolatey/package-validator/pull/23.diff","patch_url":"https://github.com/chocolatey/package-validator/pull/23.patch","issue_url":"https://api.github.com/repos/chocolatey/package-validator/issues/23","number":23,"state":"open","locked":false,"title":"(GH-14) Adding additional IconUrl check","user":{"login":"gep13","id":1271146,"avatar_url":"https://avatars.githubusercontent.com/u/1271146?v=3","gravatar_id":"","url":"https://api.github.com/users/gep13","html_url":"https://github.com/gep13","followers_url":"https://api.github.com/users/gep13/followers","following_url":"https://api.github.com/users/gep13/following{/other_user}","gists_url":"https://api.github.com/users/gep13/gists{/gist_id}","starred_url":"https://api.github.com/users/gep13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gep13/subscriptions","organizations_url":"https://api.github.com/users/gep13/orgs","repos_url":"https://api.github.com/users/gep13/repos","events_url":"https://api.github.com/users/gep13/events{/privacy}","received_events_url":"https://api.github.com/users/gep13/received_events","type":"User","site_admin":false},"body":"- To ensure that the IconUrl either comes from the same domain as the\r\nProjectUrl, or comes from the RawGit CDN\r\n- Fixes GH-14","created_at":"2015-11-26T20:45:54Z","updated_at":"2015-12-04T14:14:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3b00b5a7658ea2ed45129e449cb5b4abe581ef5c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/chocolatey/package-validator/pulls/23/commits","review_comments_url":"https://api.github.com/repos/chocolatey/package-validator/pulls/23/comments","review_comment_url":"https://api.github.com/repos/chocolatey/package-validator/pulls/comments{/number}","comments_url":"https://api.github.com/repos/chocolatey/package-validator/issues/23/comments","statuses_url":"https://api.github.com/repos/chocolatey/package-validator/statuses/84e16118a2e987587e4e5e14884c9fc3ccb80951","head":{"label":"gep13:Issue-14","ref":"Issue-14","sha":"84e16118a2e987587e4e5e14884c9fc3ccb80951","user":{"login":"gep13","id":1271146,"avatar_url":"https://avatars.githubusercontent.com/u/1271146?v=3","gravatar_id":"","url":"https://api.github.com/users/gep13","html_url":"https://github.com/gep13","followers_url":"https://api.github.com/users/gep13/followers","following_url":"https://api.github.com/users/gep13/following{/other_user}","gists_url":"https://api.github.com/users/gep13/gists{/gist_id}","starred_url":"https://api.github.com/users/gep13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gep13/subscriptions","organizations_url":"https://api.github.com/users/gep13/orgs","repos_url":"https://api.github.com/users/gep13/repos","events_url":"https://api.github.com/users/gep13/events{/privacy}","received_events_url":"https://api.github.com/users/gep13/received_events","type":"User","site_admin":false},"repo":{"id":46746924,"name":"package-validator","full_name":"gep13/package-validator","owner":{"login":"gep13","id":1271146,"avatar_url":"https://avatars.githubusercontent.com/u/1271146?v=3","gravatar_id":"","url":"https://api.github.com/users/gep13","html_url":"https://github.com/gep13","followers_url":"https://api.github.com/users/gep13/followers","following_url":"https://api.github.com/users/gep13/following{/other_user}","gists_url":"https://api.github.com/users/gep13/gists{/gist_id}","starred_url":"https://api.github.com/users/gep13/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gep13/subscriptions","organizations_url":"https://api.github.com/users/gep13/orgs","repos_url":"https://api.github.com/users/gep13/repos","events_url":"https://api.github.com/users/gep13/events{/privacy}","received_events_url":"https://api.github.com/users/gep13/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gep13/package-validator","description":"Windows service to validate packages conform to pacakge standards","fork":true,"url":"https://api.github.com/repos/gep13/package-validator","forks_url":"https://api.github.com/repos/gep13/package-validator/forks","keys_url":"https://api.github.com/repos/gep13/package-validator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gep13/package-validator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gep13/package-validator/teams","hooks_url":"https://api.github.com/repos/gep13/package-validator/hooks","issue_events_url":"https://api.github.com/repos/gep13/package-validator/issues/events{/number}","events_url":"https://api.github.com/repos/gep13/package-validator/events","assignees_url":"https://api.github.com/repos/gep13/package-validator/assignees{/user}","branches_url":"https://api.github.com/repos/gep13/package-validator/branches{/branch}","tags_url":"https://api.github.com/repos/gep13/package-validator/tags","blobs_url":"https://api.github.com/repos/gep13/package-validator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gep13/package-validator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gep13/package-validator/git/refs{/sha}","trees_url":"https://api.github.com/repos/gep13/package-validator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gep13/package-validator/statuses/{sha}","languages_url":"https://api.github.com/repos/gep13/package-validator/languages","stargazers_url":"https://api.github.com/repos/gep13/package-validator/stargazers","contributors_url":"https://api.github.com/repos/gep13/package-validator/contributors","subscribers_url":"https://api.github.com/repos/gep13/package-validator/subscribers","subscription_url":"https://api.github.com/repos/gep13/package-validator/subscription","commits_url":"https://api.github.com/repos/gep13/package-validator/commits{/sha}","git_commits_url":"https://api.github.com/repos/gep13/package-validator/git/commits{/sha}","comments_url":"https://api.github.com/repos/gep13/package-validator/comments{/number}","issue_comment_url":"https://api.github.com/repos/gep13/package-validator/issues/comments{/number}","contents_url":"https://api.github.com/repos/gep13/package-validator/contents/{+path}","compare_url":"https://api.github.com/repos/gep13/package-validator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gep13/package-validator/merges","archive_url":"https://api.github.com/repos/gep13/package-validator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gep13/package-validator/downloads","issues_url":"https://api.github.com/repos/gep13/package-validator/issues{/number}","pulls_url":"https://api.github.com/repos/gep13/package-validator/pulls{/number}","milestones_url":"https://api.github.com/repos/gep13/package-validator/milestones{/number}","notifications_url":"https://api.github.com/repos/gep13/package-validator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gep13/package-validator/labels{/name}","releases_url":"https://api.github.com/repos/gep13/package-validator/releases{/id}","created_at":"2015-11-23T20:44:32Z","updated_at":"2015-11-23T20:44:34Z","pushed_at":"2015-12-03T13:13:41Z","git_url":"git://github.com/gep13/package-validator.git","ssh_url":"git@github.com:gep13/package-validator.git","clone_url":"https://github.com/gep13/package-validator.git","svn_url":"https://github.com/gep13/package-validator","homepage":"","size":4310,"stargazers_count":0,"watchers_count":0,"language":"C#","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":"chocolatey:master","ref":"master","sha":"a1566071a43a3d0c731afd701bdbd3ab4a008731","user":{"login":"chocolatey","id":811025,"avatar_url":"https://avatars.githubusercontent.com/u/811025?v=3","gravatar_id":"","url":"https://api.github.com/users/chocolatey","html_url":"https://github.com/chocolatey","followers_url":"https://api.github.com/users/chocolatey/followers","following_url":"https://api.github.com/users/chocolatey/following{/other_user}","gists_url":"https://api.github.com/users/chocolatey/gists{/gist_id}","starred_url":"https://api.github.com/users/chocolatey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chocolatey/subscriptions","organizations_url":"https://api.github.com/users/chocolatey/orgs","repos_url":"https://api.github.com/users/chocolatey/repos","events_url":"https://api.github.com/users/chocolatey/events{/privacy}","received_events_url":"https://api.github.com/users/chocolatey/received_events","type":"Organization","site_admin":false},"repo":{"id":46729330,"name":"package-validator","full_name":"chocolatey/package-validator","owner":{"login":"chocolatey","id":811025,"avatar_url":"https://avatars.githubusercontent.com/u/811025?v=3","gravatar_id":"","url":"https://api.github.com/users/chocolatey","html_url":"https://github.com/chocolatey","followers_url":"https://api.github.com/users/chocolatey/followers","following_url":"https://api.github.com/users/chocolatey/following{/other_user}","gists_url":"https://api.github.com/users/chocolatey/gists{/gist_id}","starred_url":"https://api.github.com/users/chocolatey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chocolatey/subscriptions","organizations_url":"https://api.github.com/users/chocolatey/orgs","repos_url":"https://api.github.com/users/chocolatey/repos","events_url":"https://api.github.com/users/chocolatey/events{/privacy}","received_events_url":"https://api.github.com/users/chocolatey/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/chocolatey/package-validator","description":"Windows service to validate packages conform to pacakge standards","fork":false,"url":"https://api.github.com/repos/chocolatey/package-validator","forks_url":"https://api.github.com/repos/chocolatey/package-validator/forks","keys_url":"https://api.github.com/repos/chocolatey/package-validator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chocolatey/package-validator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chocolatey/package-validator/teams","hooks_url":"https://api.github.com/repos/chocolatey/package-validator/hooks","issue_events_url":"https://api.github.com/repos/chocolatey/package-validator/issues/events{/number}","events_url":"https://api.github.com/repos/chocolatey/package-validator/events","assignees_url":"https://api.github.com/repos/chocolatey/package-validator/assignees{/user}","branches_url":"https://api.github.com/repos/chocolatey/package-validator/branches{/branch}","tags_url":"https://api.github.com/repos/chocolatey/package-validator/tags","blobs_url":"https://api.github.com/repos/chocolatey/package-validator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chocolatey/package-validator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chocolatey/package-validator/git/refs{/sha}","trees_url":"https://api.github.com/repos/chocolatey/package-validator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chocolatey/package-validator/statuses/{sha}","languages_url":"https://api.github.com/repos/chocolatey/package-validator/languages","stargazers_url":"https://api.github.com/repos/chocolatey/package-validator/stargazers","contributors_url":"https://api.github.com/repos/chocolatey/package-validator/contributors","subscribers_url":"https://api.github.com/repos/chocolatey/package-validator/subscribers","subscription_url":"https://api.github.com/repos/chocolatey/package-validator/subscription","commits_url":"https://api.github.com/repos/chocolatey/package-validator/commits{/sha}","git_commits_url":"https://api.github.com/repos/chocolatey/package-validator/git/commits{/sha}","comments_url":"https://api.github.com/repos/chocolatey/package-validator/comments{/number}","issue_comment_url":"https://api.github.com/repos/chocolatey/package-validator/issues/comments{/number}","contents_url":"https://api.github.com/repos/chocolatey/package-validator/contents/{+path}","compare_url":"https://api.github.com/repos/chocolatey/package-validator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chocolatey/package-validator/merges","archive_url":"https://api.github.com/repos/chocolatey/package-validator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chocolatey/package-validator/downloads","issues_url":"https://api.github.com/repos/chocolatey/package-validator/issues{/number}","pulls_url":"https://api.github.com/repos/chocolatey/package-validator/pulls{/number}","milestones_url":"https://api.github.com/repos/chocolatey/package-validator/milestones{/number}","notifications_url":"https://api.github.com/repos/chocolatey/package-validator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chocolatey/package-validator/labels{/name}","releases_url":"https://api.github.com/repos/chocolatey/package-validator/releases{/id}","created_at":"2015-11-23T15:28:51Z","updated_at":"2015-11-29T08:34:59Z","pushed_at":"2015-12-03T13:13:43Z","git_url":"git://github.com/chocolatey/package-validator.git","ssh_url":"git@github.com:chocolatey/package-validator.git","clone_url":"https://github.com/chocolatey/package-validator.git","svn_url":"https://github.com/chocolatey/package-validator","homepage":"","size":4306,"stargazers_count":4,"watchers_count":4,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":26,"forks":2,"open_issues":26,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/chocolatey/package-validator/pulls/23"},"html":{"href":"https://github.com/chocolatey/package-validator/pull/23"},"issue":{"href":"https://api.github.com/repos/chocolatey/package-validator/issues/23"},"comments":{"href":"https://api.github.com/repos/chocolatey/package-validator/issues/23/comments"},"review_comments":{"href":"https://api.github.com/repos/chocolatey/package-validator/pulls/23/comments"},"review_comment":{"href":"https://api.github.com/repos/chocolatey/package-validator/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/chocolatey/package-validator/pulls/23/commits"},"statuses":{"href":"https://api.github.com/repos/chocolatey/package-validator/statuses/84e16118a2e987587e4e5e14884c9fc3ccb80951"}}}}