{"action":"created","comment":{"url":"https://api.github.com/repos/caskroom/homebrew-cask/pulls/comments/49546370","id":49546370,"diff_hunk":"@@ -12,11 +12,23 @@ syntax_error() {\n   exit 1\n }\n \n+depends_on() {\n+  if [[ ! $(which \"${1}\") ]]; then\n+    echo -e \"$(tput setaf 1)\n+      This script depends on '${1}'.\n+      If you have [Homebrew](http://brew.sh), you can install it with 'brew install ${2}'.","path":"developer/bin/cask-switch-https","position":null,"original_position":17,"commit_id":"583ec64f910a9c54ab17598198d2a142261533f1","original_commit_id":"4178e2a00c4b69a46b7bd62c05d85f39e85aeb48","user":{"login":"tsparber","id":1390036,"avatar_url":"https://avatars.githubusercontent.com/u/1390036?v=3","gravatar_id":"","url":"https://api.github.com/users/tsparber","html_url":"https://github.com/tsparber","followers_url":"https://api.github.com/users/tsparber/followers","following_url":"https://api.github.com/users/tsparber/following{/other_user}","gists_url":"https://api.github.com/users/tsparber/gists{/gist_id}","starred_url":"https://api.github.com/users/tsparber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsparber/subscriptions","organizations_url":"https://api.github.com/users/tsparber/orgs","repos_url":"https://api.github.com/users/tsparber/repos","events_url":"https://api.github.com/users/tsparber/events{/privacy}","received_events_url":"https://api.github.com/users/tsparber/received_events","type":"User","site_admin":false},"body":"Now with even less typing :smiley: . The command is derived from the repo, or can be added as a second option (if formula / bin names differ)","created_at":"2016-01-13T02:51:55Z","updated_at":"2016-01-13T02:51:55Z","html_url":"https://github.com/caskroom/homebrew-cask/pull/16787#discussion_r49546370","pull_request_url":"https://api.github.com/repos/caskroom/homebrew-cask/pulls/16787","_links":{"self":{"href":"https://api.github.com/repos/caskroom/homebrew-cask/pulls/comments/49546370"},"html":{"href":"https://github.com/caskroom/homebrew-cask/pull/16787#discussion_r49546370"},"pull_request":{"href":"https://api.github.com/repos/caskroom/homebrew-cask/pulls/16787"}}},"pull_request":{"url":"https://api.github.com/repos/caskroom/homebrew-cask/pulls/16787","id":55718075,"html_url":"https://github.com/caskroom/homebrew-cask/pull/16787","diff_url":"https://github.com/caskroom/homebrew-cask/pull/16787.diff","patch_url":"https://github.com/caskroom/homebrew-cask/pull/16787.patch","issue_url":"https://api.github.com/repos/caskroom/homebrew-cask/issues/16787","number":16787,"state":"open","locked":false,"title":"Use curl-check-url to check for HTTP 200 using GET","user":{"login":"tsparber","id":1390036,"avatar_url":"https://avatars.githubusercontent.com/u/1390036?v=3","gravatar_id":"","url":"https://api.github.com/users/tsparber","html_url":"https://github.com/tsparber","followers_url":"https://api.github.com/users/tsparber/followers","following_url":"https://api.github.com/users/tsparber/following{/other_user}","gists_url":"https://api.github.com/users/tsparber/gists{/gist_id}","starred_url":"https://api.github.com/users/tsparber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsparber/subscriptions","organizations_url":"https://api.github.com/users/tsparber/orgs","repos_url":"https://api.github.com/users/tsparber/repos","events_url":"https://api.github.com/users/tsparber/events{/privacy}","received_events_url":"https://api.github.com/users/tsparber/received_events","type":"User","site_admin":false},"body":"Some servers do not support HEAD requests, this script uses now the [curl-check-url](https://github.com/tsparber/homebrew-tiny-scripts/blob/master/bin/curl-check-url) script to issue a GET request but abort after the headers have been received.\r\n","created_at":"2016-01-12T06:07:43Z","updated_at":"2016-01-13T02:51:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"55ffca71960210242ce6a3b097918119c0fdf531","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/caskroom/homebrew-cask/pulls/16787/commits","review_comments_url":"https://api.github.com/repos/caskroom/homebrew-cask/pulls/16787/comments","review_comment_url":"https://api.github.com/repos/caskroom/homebrew-cask/pulls/comments{/number}","comments_url":"https://api.github.com/repos/caskroom/homebrew-cask/issues/16787/comments","statuses_url":"https://api.github.com/repos/caskroom/homebrew-cask/statuses/583ec64f910a9c54ab17598198d2a142261533f1","head":{"label":"tsparber:better-curl-url-check","ref":"better-curl-url-check","sha":"583ec64f910a9c54ab17598198d2a142261533f1","user":{"login":"tsparber","id":1390036,"avatar_url":"https://avatars.githubusercontent.com/u/1390036?v=3","gravatar_id":"","url":"https://api.github.com/users/tsparber","html_url":"https://github.com/tsparber","followers_url":"https://api.github.com/users/tsparber/followers","following_url":"https://api.github.com/users/tsparber/following{/other_user}","gists_url":"https://api.github.com/users/tsparber/gists{/gist_id}","starred_url":"https://api.github.com/users/tsparber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsparber/subscriptions","organizations_url":"https://api.github.com/users/tsparber/orgs","repos_url":"https://api.github.com/users/tsparber/repos","events_url":"https://api.github.com/users/tsparber/events{/privacy}","received_events_url":"https://api.github.com/users/tsparber/received_events","type":"User","site_admin":false},"repo":{"id":45085381,"name":"homebrew-cask","full_name":"tsparber/homebrew-cask","owner":{"login":"tsparber","id":1390036,"avatar_url":"https://avatars.githubusercontent.com/u/1390036?v=3","gravatar_id":"","url":"https://api.github.com/users/tsparber","html_url":"https://github.com/tsparber","followers_url":"https://api.github.com/users/tsparber/followers","following_url":"https://api.github.com/users/tsparber/following{/other_user}","gists_url":"https://api.github.com/users/tsparber/gists{/gist_id}","starred_url":"https://api.github.com/users/tsparber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsparber/subscriptions","organizations_url":"https://api.github.com/users/tsparber/orgs","repos_url":"https://api.github.com/users/tsparber/repos","events_url":"https://api.github.com/users/tsparber/events{/privacy}","received_events_url":"https://api.github.com/users/tsparber/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tsparber/homebrew-cask","description":"A CLI workflow for the administration of Mac applications distributed as binaries","fork":true,"url":"https://api.github.com/repos/tsparber/homebrew-cask","forks_url":"https://api.github.com/repos/tsparber/homebrew-cask/forks","keys_url":"https://api.github.com/repos/tsparber/homebrew-cask/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tsparber/homebrew-cask/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tsparber/homebrew-cask/teams","hooks_url":"https://api.github.com/repos/tsparber/homebrew-cask/hooks","issue_events_url":"https://api.github.com/repos/tsparber/homebrew-cask/issues/events{/number}","events_url":"https://api.github.com/repos/tsparber/homebrew-cask/events","assignees_url":"https://api.github.com/repos/tsparber/homebrew-cask/assignees{/user}","branches_url":"https://api.github.com/repos/tsparber/homebrew-cask/branches{/branch}","tags_url":"https://api.github.com/repos/tsparber/homebrew-cask/tags","blobs_url":"https://api.github.com/repos/tsparber/homebrew-cask/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tsparber/homebrew-cask/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tsparber/homebrew-cask/git/refs{/sha}","trees_url":"https://api.github.com/repos/tsparber/homebrew-cask/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tsparber/homebrew-cask/statuses/{sha}","languages_url":"https://api.github.com/repos/tsparber/homebrew-cask/languages","stargazers_url":"https://api.github.com/repos/tsparber/homebrew-cask/stargazers","contributors_url":"https://api.github.com/repos/tsparber/homebrew-cask/contributors","subscribers_url":"https://api.github.com/repos/tsparber/homebrew-cask/subscribers","subscription_url":"https://api.github.com/repos/tsparber/homebrew-cask/subscription","commits_url":"https://api.github.com/repos/tsparber/homebrew-cask/commits{/sha}","git_commits_url":"https://api.github.com/repos/tsparber/homebrew-cask/git/commits{/sha}","comments_url":"https://api.github.com/repos/tsparber/homebrew-cask/comments{/number}","issue_comment_url":"https://api.github.com/repos/tsparber/homebrew-cask/issues/comments{/number}","contents_url":"https://api.github.com/repos/tsparber/homebrew-cask/contents/{+path}","compare_url":"https://api.github.com/repos/tsparber/homebrew-cask/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tsparber/homebrew-cask/merges","archive_url":"https://api.github.com/repos/tsparber/homebrew-cask/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tsparber/homebrew-cask/downloads","issues_url":"https://api.github.com/repos/tsparber/homebrew-cask/issues{/number}","pulls_url":"https://api.github.com/repos/tsparber/homebrew-cask/pulls{/number}","milestones_url":"https://api.github.com/repos/tsparber/homebrew-cask/milestones{/number}","notifications_url":"https://api.github.com/repos/tsparber/homebrew-cask/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tsparber/homebrew-cask/labels{/name}","releases_url":"https://api.github.com/repos/tsparber/homebrew-cask/releases{/id}","created_at":"2015-10-28T03:05:06Z","updated_at":"2016-01-12T08:35:20Z","pushed_at":"2016-01-13T02:34:53Z","git_url":"git://github.com/tsparber/homebrew-cask.git","ssh_url":"git@github.com:tsparber/homebrew-cask.git","clone_url":"https://github.com/tsparber/homebrew-cask.git","svn_url":"https://github.com/tsparber/homebrew-cask","homepage":"http://caskroom.io","size":53909,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"caskroom:master","ref":"master","sha":"cbbbfcf2348024e843e755ebcdc0f28b38fb3414","user":{"login":"caskroom","id":5647711,"avatar_url":"https://avatars.githubusercontent.com/u/5647711?v=3","gravatar_id":"","url":"https://api.github.com/users/caskroom","html_url":"https://github.com/caskroom","followers_url":"https://api.github.com/users/caskroom/followers","following_url":"https://api.github.com/users/caskroom/following{/other_user}","gists_url":"https://api.github.com/users/caskroom/gists{/gist_id}","starred_url":"https://api.github.com/users/caskroom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caskroom/subscriptions","organizations_url":"https://api.github.com/users/caskroom/orgs","repos_url":"https://api.github.com/users/caskroom/repos","events_url":"https://api.github.com/users/caskroom/events{/privacy}","received_events_url":"https://api.github.com/users/caskroom/received_events","type":"Organization","site_admin":false},"repo":{"id":3623050,"name":"homebrew-cask","full_name":"caskroom/homebrew-cask","owner":{"login":"caskroom","id":5647711,"avatar_url":"https://avatars.githubusercontent.com/u/5647711?v=3","gravatar_id":"","url":"https://api.github.com/users/caskroom","html_url":"https://github.com/caskroom","followers_url":"https://api.github.com/users/caskroom/followers","following_url":"https://api.github.com/users/caskroom/following{/other_user}","gists_url":"https://api.github.com/users/caskroom/gists{/gist_id}","starred_url":"https://api.github.com/users/caskroom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caskroom/subscriptions","organizations_url":"https://api.github.com/users/caskroom/orgs","repos_url":"https://api.github.com/users/caskroom/repos","events_url":"https://api.github.com/users/caskroom/events{/privacy}","received_events_url":"https://api.github.com/users/caskroom/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/caskroom/homebrew-cask","description":"A CLI workflow for the administration of Mac applications distributed as binaries","fork":false,"url":"https://api.github.com/repos/caskroom/homebrew-cask","forks_url":"https://api.github.com/repos/caskroom/homebrew-cask/forks","keys_url":"https://api.github.com/repos/caskroom/homebrew-cask/keys{/key_id}","collaborators_url":"https://api.github.com/repos/caskroom/homebrew-cask/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/caskroom/homebrew-cask/teams","hooks_url":"https://api.github.com/repos/caskroom/homebrew-cask/hooks","issue_events_url":"https://api.github.com/repos/caskroom/homebrew-cask/issues/events{/number}","events_url":"https://api.github.com/repos/caskroom/homebrew-cask/events","assignees_url":"https://api.github.com/repos/caskroom/homebrew-cask/assignees{/user}","branches_url":"https://api.github.com/repos/caskroom/homebrew-cask/branches{/branch}","tags_url":"https://api.github.com/repos/caskroom/homebrew-cask/tags","blobs_url":"https://api.github.com/repos/caskroom/homebrew-cask/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/caskroom/homebrew-cask/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/caskroom/homebrew-cask/git/refs{/sha}","trees_url":"https://api.github.com/repos/caskroom/homebrew-cask/git/trees{/sha}","statuses_url":"https://api.github.com/repos/caskroom/homebrew-cask/statuses/{sha}","languages_url":"https://api.github.com/repos/caskroom/homebrew-cask/languages","stargazers_url":"https://api.github.com/repos/caskroom/homebrew-cask/stargazers","contributors_url":"https://api.github.com/repos/caskroom/homebrew-cask/contributors","subscribers_url":"https://api.github.com/repos/caskroom/homebrew-cask/subscribers","subscription_url":"https://api.github.com/repos/caskroom/homebrew-cask/subscription","commits_url":"https://api.github.com/repos/caskroom/homebrew-cask/commits{/sha}","git_commits_url":"https://api.github.com/repos/caskroom/homebrew-cask/git/commits{/sha}","comments_url":"https://api.github.com/repos/caskroom/homebrew-cask/comments{/number}","issue_comment_url":"https://api.github.com/repos/caskroom/homebrew-cask/issues/comments{/number}","contents_url":"https://api.github.com/repos/caskroom/homebrew-cask/contents/{+path}","compare_url":"https://api.github.com/repos/caskroom/homebrew-cask/compare/{base}...{head}","merges_url":"https://api.github.com/repos/caskroom/homebrew-cask/merges","archive_url":"https://api.github.com/repos/caskroom/homebrew-cask/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/caskroom/homebrew-cask/downloads","issues_url":"https://api.github.com/repos/caskroom/homebrew-cask/issues{/number}","pulls_url":"https://api.github.com/repos/caskroom/homebrew-cask/pulls{/number}","milestones_url":"https://api.github.com/repos/caskroom/homebrew-cask/milestones{/number}","notifications_url":"https://api.github.com/repos/caskroom/homebrew-cask/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/caskroom/homebrew-cask/labels{/name}","releases_url":"https://api.github.com/repos/caskroom/homebrew-cask/releases{/id}","created_at":"2012-03-05T02:05:17Z","updated_at":"2016-01-13T02:45:20Z","pushed_at":"2016-01-13T02:34:54Z","git_url":"git://github.com/caskroom/homebrew-cask.git","ssh_url":"git@github.com:caskroom/homebrew-cask.git","clone_url":"https://github.com/caskroom/homebrew-cask.git","svn_url":"https://github.com/caskroom/homebrew-cask","homepage":"http://caskroom.io","size":118743,"stargazers_count":8268,"watchers_count":8268,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3100,"mirror_url":null,"open_issues_count":85,"forks":3100,"open_issues":85,"watchers":8268,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/caskroom/homebrew-cask/pulls/16787"},"html":{"href":"https://github.com/caskroom/homebrew-cask/pull/16787"},"issue":{"href":"https://api.github.com/repos/caskroom/homebrew-cask/issues/16787"},"comments":{"href":"https://api.github.com/repos/caskroom/homebrew-cask/issues/16787/comments"},"review_comments":{"href":"https://api.github.com/repos/caskroom/homebrew-cask/pulls/16787/comments"},"review_comment":{"href":"https://api.github.com/repos/caskroom/homebrew-cask/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/caskroom/homebrew-cask/pulls/16787/commits"},"statuses":{"href":"https://api.github.com/repos/caskroom/homebrew-cask/statuses/583ec64f910a9c54ab17598198d2a142261533f1"}}}}