{"action":"created","comment":{"url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/pulls/comments/32343775","id":32343775,"diff_hunk":"@@ -48,6 +49,20 @@ def validation_errors\n         results\n       end\n \n+      def validate_public_access\n+        return validate_http if @specification.source[:http]\n+        return validate_git if @specification.source[:git]\n+        true\n+      end\n+\n+      def validate_http\n+        system(\"curl -IL #{ Shellwords.escape @specification.source[:http] } -f\")","path":"app/models/specification_wrapper.rb","position":17,"original_position":17,"commit_id":"3f27ae901297598e6e04e0f16c8c6a831b24bfa0","original_commit_id":"3f27ae901297598e6e04e0f16c8c6a831b24bfa0","user":{"login":"kylef","id":44164,"avatar_url":"https://avatars.githubusercontent.com/u/44164?v=3","gravatar_id":"","url":"https://api.github.com/users/kylef","html_url":"https://github.com/kylef","followers_url":"https://api.github.com/users/kylef/followers","following_url":"https://api.github.com/users/kylef/following{/other_user}","gists_url":"https://api.github.com/users/kylef/gists{/gist_id}","starred_url":"https://api.github.com/users/kylef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kylef/subscriptions","organizations_url":"https://api.github.com/users/kylef/orgs","repos_url":"https://api.github.com/users/kylef/repos","events_url":"https://api.github.com/users/kylef/events{/privacy}","received_events_url":"https://api.github.com/users/kylef/received_events","type":"User","site_admin":false},"body":"Why not just use `validate_url` from Core? https://github.com/CocoaPods/Core/blob/816eda9f90dd8fc54901b0fd4b768691fc1295bf/lib/cocoapods-core/http.rb#L35-39","created_at":"2015-06-12T18:50:36Z","updated_at":"2015-06-12T18:50:36Z","html_url":"https://github.com/CocoaPods/trunk.cocoapods.org/pull/137#discussion_r32343775","pull_request_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/pulls/137","_links":{"self":{"href":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/pulls/comments/32343775"},"html":{"href":"https://github.com/CocoaPods/trunk.cocoapods.org/pull/137#discussion_r32343775"},"pull_request":{"href":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/pulls/137"}}},"pull_request":{"url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/pulls/137","id":36981156,"html_url":"https://github.com/CocoaPods/trunk.cocoapods.org/pull/137","diff_url":"https://github.com/CocoaPods/trunk.cocoapods.org/pull/137.diff","patch_url":"https://github.com/CocoaPods/trunk.cocoapods.org/pull/137.patch","issue_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/issues/137","number":137,"state":"open","locked":false,"title":"Add a validator for git / http sources","user":{"login":"orta","id":49038,"avatar_url":"https://avatars.githubusercontent.com/u/49038?v=3","gravatar_id":"","url":"https://api.github.com/users/orta","html_url":"https://github.com/orta","followers_url":"https://api.github.com/users/orta/followers","following_url":"https://api.github.com/users/orta/following{/other_user}","gists_url":"https://api.github.com/users/orta/gists{/gist_id}","starred_url":"https://api.github.com/users/orta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orta/subscriptions","organizations_url":"https://api.github.com/users/orta/orgs","repos_url":"https://api.github.com/users/orta/repos","events_url":"https://api.github.com/users/orta/events{/privacy}","received_events_url":"https://api.github.com/users/orta/received_events","type":"User","site_admin":false},"body":"This is some of the initial work around #136 \r\n\r\nI'm struggling with figuring out how to test this and whether it is safe. Assigning to @alloy  to give a one over.","created_at":"2015-06-04T21:38:56Z","updated_at":"2015-06-12T18:50:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a243a58251b885eab7b08fd17ceabd30e97c07a7","assignee":{"login":"alloy","id":2320,"avatar_url":"https://avatars.githubusercontent.com/u/2320?v=3","gravatar_id":"","url":"https://api.github.com/users/alloy","html_url":"https://github.com/alloy","followers_url":"https://api.github.com/users/alloy/followers","following_url":"https://api.github.com/users/alloy/following{/other_user}","gists_url":"https://api.github.com/users/alloy/gists{/gist_id}","starred_url":"https://api.github.com/users/alloy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alloy/subscriptions","organizations_url":"https://api.github.com/users/alloy/orgs","repos_url":"https://api.github.com/users/alloy/repos","events_url":"https://api.github.com/users/alloy/events{/privacy}","received_events_url":"https://api.github.com/users/alloy/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/pulls/137/commits","review_comments_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/pulls/137/comments","review_comment_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/pulls/comments{/number}","comments_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/issues/137/comments","statuses_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/statuses/3f27ae901297598e6e04e0f16c8c6a831b24bfa0","head":{"label":"CocoaPods:validate_spec_source","ref":"validate_spec_source","sha":"3f27ae901297598e6e04e0f16c8c6a831b24bfa0","user":{"login":"CocoaPods","id":1189714,"avatar_url":"https://avatars.githubusercontent.com/u/1189714?v=3","gravatar_id":"","url":"https://api.github.com/users/CocoaPods","html_url":"https://github.com/CocoaPods","followers_url":"https://api.github.com/users/CocoaPods/followers","following_url":"https://api.github.com/users/CocoaPods/following{/other_user}","gists_url":"https://api.github.com/users/CocoaPods/gists{/gist_id}","starred_url":"https://api.github.com/users/CocoaPods/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CocoaPods/subscriptions","organizations_url":"https://api.github.com/users/CocoaPods/orgs","repos_url":"https://api.github.com/users/CocoaPods/repos","events_url":"https://api.github.com/users/CocoaPods/events{/privacy}","received_events_url":"https://api.github.com/users/CocoaPods/received_events","type":"Organization","site_admin":false},"repo":{"id":9260377,"name":"trunk.cocoapods.org","full_name":"CocoaPods/trunk.cocoapods.org","owner":{"login":"CocoaPods","id":1189714,"avatar_url":"https://avatars.githubusercontent.com/u/1189714?v=3","gravatar_id":"","url":"https://api.github.com/users/CocoaPods","html_url":"https://github.com/CocoaPods","followers_url":"https://api.github.com/users/CocoaPods/followers","following_url":"https://api.github.com/users/CocoaPods/following{/other_user}","gists_url":"https://api.github.com/users/CocoaPods/gists{/gist_id}","starred_url":"https://api.github.com/users/CocoaPods/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CocoaPods/subscriptions","organizations_url":"https://api.github.com/users/CocoaPods/orgs","repos_url":"https://api.github.com/users/CocoaPods/repos","events_url":"https://api.github.com/users/CocoaPods/events{/privacy}","received_events_url":"https://api.github.com/users/CocoaPods/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CocoaPods/trunk.cocoapods.org","description":"The authentication server for CocoaPods push","fork":false,"url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org","forks_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/forks","keys_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/teams","hooks_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/hooks","issue_events_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/issues/events{/number}","events_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/events","assignees_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/assignees{/user}","branches_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/branches{/branch}","tags_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/tags","blobs_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/git/refs{/sha}","trees_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/statuses/{sha}","languages_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/languages","stargazers_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/stargazers","contributors_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/contributors","subscribers_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/subscribers","subscription_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/subscription","commits_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/commits{/sha}","git_commits_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/git/commits{/sha}","comments_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/comments{/number}","issue_comment_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/issues/comments{/number}","contents_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/contents/{+path}","compare_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/merges","archive_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/downloads","issues_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/issues{/number}","pulls_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/pulls{/number}","milestones_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/milestones{/number}","notifications_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/labels{/name}","releases_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/releases{/id}","created_at":"2013-04-06T13:33:05Z","updated_at":"2015-05-31T10:31:05Z","pushed_at":"2015-06-04T21:39:50Z","git_url":"git://github.com/CocoaPods/trunk.cocoapods.org.git","ssh_url":"git@github.com:CocoaPods/trunk.cocoapods.org.git","clone_url":"https://github.com/CocoaPods/trunk.cocoapods.org.git","svn_url":"https://github.com/CocoaPods/trunk.cocoapods.org","homepage":"","size":3021,"stargazers_count":18,"watchers_count":18,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":41,"forks":5,"open_issues":41,"watchers":18,"default_branch":"master"}},"base":{"label":"CocoaPods:master","ref":"master","sha":"bbbc9039abc2d587b9d1fd9f98dfabcb2b02f884","user":{"login":"CocoaPods","id":1189714,"avatar_url":"https://avatars.githubusercontent.com/u/1189714?v=3","gravatar_id":"","url":"https://api.github.com/users/CocoaPods","html_url":"https://github.com/CocoaPods","followers_url":"https://api.github.com/users/CocoaPods/followers","following_url":"https://api.github.com/users/CocoaPods/following{/other_user}","gists_url":"https://api.github.com/users/CocoaPods/gists{/gist_id}","starred_url":"https://api.github.com/users/CocoaPods/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CocoaPods/subscriptions","organizations_url":"https://api.github.com/users/CocoaPods/orgs","repos_url":"https://api.github.com/users/CocoaPods/repos","events_url":"https://api.github.com/users/CocoaPods/events{/privacy}","received_events_url":"https://api.github.com/users/CocoaPods/received_events","type":"Organization","site_admin":false},"repo":{"id":9260377,"name":"trunk.cocoapods.org","full_name":"CocoaPods/trunk.cocoapods.org","owner":{"login":"CocoaPods","id":1189714,"avatar_url":"https://avatars.githubusercontent.com/u/1189714?v=3","gravatar_id":"","url":"https://api.github.com/users/CocoaPods","html_url":"https://github.com/CocoaPods","followers_url":"https://api.github.com/users/CocoaPods/followers","following_url":"https://api.github.com/users/CocoaPods/following{/other_user}","gists_url":"https://api.github.com/users/CocoaPods/gists{/gist_id}","starred_url":"https://api.github.com/users/CocoaPods/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CocoaPods/subscriptions","organizations_url":"https://api.github.com/users/CocoaPods/orgs","repos_url":"https://api.github.com/users/CocoaPods/repos","events_url":"https://api.github.com/users/CocoaPods/events{/privacy}","received_events_url":"https://api.github.com/users/CocoaPods/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/CocoaPods/trunk.cocoapods.org","description":"The authentication server for CocoaPods push","fork":false,"url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org","forks_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/forks","keys_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/teams","hooks_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/hooks","issue_events_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/issues/events{/number}","events_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/events","assignees_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/assignees{/user}","branches_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/branches{/branch}","tags_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/tags","blobs_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/git/refs{/sha}","trees_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/statuses/{sha}","languages_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/languages","stargazers_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/stargazers","contributors_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/contributors","subscribers_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/subscribers","subscription_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/subscription","commits_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/commits{/sha}","git_commits_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/git/commits{/sha}","comments_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/comments{/number}","issue_comment_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/issues/comments{/number}","contents_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/contents/{+path}","compare_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/merges","archive_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/downloads","issues_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/issues{/number}","pulls_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/pulls{/number}","milestones_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/milestones{/number}","notifications_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/labels{/name}","releases_url":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/releases{/id}","created_at":"2013-04-06T13:33:05Z","updated_at":"2015-05-31T10:31:05Z","pushed_at":"2015-06-04T21:39:50Z","git_url":"git://github.com/CocoaPods/trunk.cocoapods.org.git","ssh_url":"git@github.com:CocoaPods/trunk.cocoapods.org.git","clone_url":"https://github.com/CocoaPods/trunk.cocoapods.org.git","svn_url":"https://github.com/CocoaPods/trunk.cocoapods.org","homepage":"","size":3021,"stargazers_count":18,"watchers_count":18,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":41,"forks":5,"open_issues":41,"watchers":18,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/pulls/137"},"html":{"href":"https://github.com/CocoaPods/trunk.cocoapods.org/pull/137"},"issue":{"href":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/issues/137"},"comments":{"href":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/issues/137/comments"},"review_comments":{"href":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/pulls/137/comments"},"review_comment":{"href":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/pulls/137/commits"},"statuses":{"href":"https://api.github.com/repos/CocoaPods/trunk.cocoapods.org/statuses/3f27ae901297598e6e04e0f16c8c6a831b24bfa0"}}}}