{"action":"created","comment":{"url":"https://api.github.com/repos/Homebrew/install/pulls/comments/26679346","id":26679346,"diff_hunk":"@@ -0,0 +1,214 @@\n+#!/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby\n+\n+require \"optparse\"\n+require \"pathname\"\n+\n+# Default options\n+options = {\n+  :force => false,\n+  :quiet => false,\n+  :dry_run => false,\n+  :skip_cache_log => false,\n+}\n+\n+module Tty extend self\n+  def blue; bold 34; end\n+  def white; bold 39; end\n+  def red; underline 31; end\n+  def reset; escape 0; end\n+  def bold n; escape \"1;#{n}\" end\n+  def underline n; escape \"4;#{n}\" end\n+  def escape n; \"\\033[#{n}m\" if STDOUT.tty? end\n+end\n+\n+class Array\n+  def shell_s\n+    cp = dup\n+    first = cp.shift\n+    cp.map{ |arg| arg.gsub \" \", \"\\\\ \" }.unshift(first) * \" \"\n+  end\n+end\n+\n+class Pathname\n+  def subdirs\n+    children.select { |child| child.directory? }\n+  end\n+\n+  def resolved_path\n+    self.symlink? ? dirname+readlink : self\n+  end\n+\n+  def /(other)\n+    self + other.to_s\n+  end\n+\n+  def pretty_print\n+    if self.symlink?\n+      puts to_s + \" -> \" + resolved_path.to_s\n+    elsif self.directory?\n+      puts to_s + \"/\"\n+    else\n+      puts to_s\n+    end\n+  end\n+end\n+\n+def ohai *args\n+  puts \"#{Tty.blue}==>#{Tty.white} #{args.shell_s}#{Tty.reset}\"\n+end\n+\n+def warn warning\n+  puts \"#{Tty.red}Warning#{Tty.reset}: #{warning.chomp}\"\n+end\n+\n+def system *args\n+  warn \"Failed during: #{args.shell_s}\" unless Kernel.system(*args)\n+end\n+\n+####################################################################### script\n+\n+$HOMEBREW_PREFIX_CANDIDATES=[]\n+\n+OptionParser.new do |opts|\n+  opts.banner = \"Homebrew Uninstaller\\nUsage: ./uninstall [options]\"\n+  opts.summary_width = 16\n+  opts.on(\"-pPATH\", \"--path=PATH\", \"Manually set path to Homebrew.\") { |p| $HOMEBREW_PREFIX_CANDIDATES << Pathname.new(p) }\n+  opts.on(\"--skip-cache-log\", \"Skipes removal of Caches and Logs files.\") { |p| options[:skip_cache_log] = true }","path":"uninstall","position":76,"original_position":76,"commit_id":"d95008e0017d1b0618fe43cedf6c1ccdbc695e43","original_commit_id":"d95008e0017d1b0618fe43cedf6c1ccdbc695e43","user":{"login":"tdsmith","id":173889,"avatar_url":"https://avatars.githubusercontent.com/u/173889?v=3","gravatar_id":"","url":"https://api.github.com/users/tdsmith","html_url":"https://github.com/tdsmith","followers_url":"https://api.github.com/users/tdsmith/followers","following_url":"https://api.github.com/users/tdsmith/following{/other_user}","gists_url":"https://api.github.com/users/tdsmith/gists{/gist_id}","starred_url":"https://api.github.com/users/tdsmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tdsmith/subscriptions","organizations_url":"https://api.github.com/users/tdsmith/orgs","repos_url":"https://api.github.com/users/tdsmith/repos","events_url":"https://api.github.com/users/tdsmith/events{/privacy}","received_events_url":"https://api.github.com/users/tdsmith/received_events","type":"User","site_admin":false},"body":"s/Skipes/Skips/","created_at":"2015-03-18T16:22:06Z","updated_at":"2015-03-18T16:22:06Z","html_url":"https://github.com/Homebrew/install/pull/7#discussion_r26679346","pull_request_url":"https://api.github.com/repos/Homebrew/install/pulls/7","_links":{"self":{"href":"https://api.github.com/repos/Homebrew/install/pulls/comments/26679346"},"html":{"href":"https://github.com/Homebrew/install/pull/7#discussion_r26679346"},"pull_request":{"href":"https://api.github.com/repos/Homebrew/install/pulls/7"}}},"pull_request":{"url":"https://api.github.com/repos/Homebrew/install/pulls/7","id":31406423,"html_url":"https://github.com/Homebrew/install/pull/7","diff_url":"https://github.com/Homebrew/install/pull/7.diff","patch_url":"https://github.com/Homebrew/install/pull/7.patch","issue_url":"https://api.github.com/repos/Homebrew/install/issues/7","number":7,"state":"open","locked":false,"title":"uninstall script","user":{"login":"xu-cheng","id":3105373,"avatar_url":"https://avatars.githubusercontent.com/u/3105373?v=3","gravatar_id":"","url":"https://api.github.com/users/xu-cheng","html_url":"https://github.com/xu-cheng","followers_url":"https://api.github.com/users/xu-cheng/followers","following_url":"https://api.github.com/users/xu-cheng/following{/other_user}","gists_url":"https://api.github.com/users/xu-cheng/gists{/gist_id}","starred_url":"https://api.github.com/users/xu-cheng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xu-cheng/subscriptions","organizations_url":"https://api.github.com/users/xu-cheng/orgs","repos_url":"https://api.github.com/users/xu-cheng/repos","events_url":"https://api.github.com/users/xu-cheng/events{/privacy}","received_events_url":"https://api.github.com/users/xu-cheng/received_events","type":"User","site_admin":false},"body":"cc @Homebrew/owners @DomT4 @chdiza","created_at":"2015-03-18T07:46:51Z","updated_at":"2015-03-18T16:22:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"db20417851db03022f4d006fd2529a5e8c3a31fd","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Homebrew/install/pulls/7/commits","review_comments_url":"https://api.github.com/repos/Homebrew/install/pulls/7/comments","review_comment_url":"https://api.github.com/repos/Homebrew/install/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Homebrew/install/issues/7/comments","statuses_url":"https://api.github.com/repos/Homebrew/install/statuses/d95008e0017d1b0618fe43cedf6c1ccdbc695e43","head":{"label":"xu-cheng:uninstall","ref":"uninstall","sha":"d95008e0017d1b0618fe43cedf6c1ccdbc695e43","user":{"login":"xu-cheng","id":3105373,"avatar_url":"https://avatars.githubusercontent.com/u/3105373?v=3","gravatar_id":"","url":"https://api.github.com/users/xu-cheng","html_url":"https://github.com/xu-cheng","followers_url":"https://api.github.com/users/xu-cheng/followers","following_url":"https://api.github.com/users/xu-cheng/following{/other_user}","gists_url":"https://api.github.com/users/xu-cheng/gists{/gist_id}","starred_url":"https://api.github.com/users/xu-cheng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xu-cheng/subscriptions","organizations_url":"https://api.github.com/users/xu-cheng/orgs","repos_url":"https://api.github.com/users/xu-cheng/repos","events_url":"https://api.github.com/users/xu-cheng/events{/privacy}","received_events_url":"https://api.github.com/users/xu-cheng/received_events","type":"User","site_admin":false},"repo":{"id":32249364,"name":"install","full_name":"xu-cheng/install","owner":{"login":"xu-cheng","id":3105373,"avatar_url":"https://avatars.githubusercontent.com/u/3105373?v=3","gravatar_id":"","url":"https://api.github.com/users/xu-cheng","html_url":"https://github.com/xu-cheng","followers_url":"https://api.github.com/users/xu-cheng/followers","following_url":"https://api.github.com/users/xu-cheng/following{/other_user}","gists_url":"https://api.github.com/users/xu-cheng/gists{/gist_id}","starred_url":"https://api.github.com/users/xu-cheng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xu-cheng/subscriptions","organizations_url":"https://api.github.com/users/xu-cheng/orgs","repos_url":"https://api.github.com/users/xu-cheng/repos","events_url":"https://api.github.com/users/xu-cheng/events{/privacy}","received_events_url":"https://api.github.com/users/xu-cheng/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/xu-cheng/install","description":"Homebrew's installer","fork":true,"url":"https://api.github.com/repos/xu-cheng/install","forks_url":"https://api.github.com/repos/xu-cheng/install/forks","keys_url":"https://api.github.com/repos/xu-cheng/install/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xu-cheng/install/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xu-cheng/install/teams","hooks_url":"https://api.github.com/repos/xu-cheng/install/hooks","issue_events_url":"https://api.github.com/repos/xu-cheng/install/issues/events{/number}","events_url":"https://api.github.com/repos/xu-cheng/install/events","assignees_url":"https://api.github.com/repos/xu-cheng/install/assignees{/user}","branches_url":"https://api.github.com/repos/xu-cheng/install/branches{/branch}","tags_url":"https://api.github.com/repos/xu-cheng/install/tags","blobs_url":"https://api.github.com/repos/xu-cheng/install/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xu-cheng/install/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xu-cheng/install/git/refs{/sha}","trees_url":"https://api.github.com/repos/xu-cheng/install/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xu-cheng/install/statuses/{sha}","languages_url":"https://api.github.com/repos/xu-cheng/install/languages","stargazers_url":"https://api.github.com/repos/xu-cheng/install/stargazers","contributors_url":"https://api.github.com/repos/xu-cheng/install/contributors","subscribers_url":"https://api.github.com/repos/xu-cheng/install/subscribers","subscription_url":"https://api.github.com/repos/xu-cheng/install/subscription","commits_url":"https://api.github.com/repos/xu-cheng/install/commits{/sha}","git_commits_url":"https://api.github.com/repos/xu-cheng/install/git/commits{/sha}","comments_url":"https://api.github.com/repos/xu-cheng/install/comments{/number}","issue_comment_url":"https://api.github.com/repos/xu-cheng/install/issues/comments{/number}","contents_url":"https://api.github.com/repos/xu-cheng/install/contents/{+path}","compare_url":"https://api.github.com/repos/xu-cheng/install/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xu-cheng/install/merges","archive_url":"https://api.github.com/repos/xu-cheng/install/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xu-cheng/install/downloads","issues_url":"https://api.github.com/repos/xu-cheng/install/issues{/number}","pulls_url":"https://api.github.com/repos/xu-cheng/install/pulls{/number}","milestones_url":"https://api.github.com/repos/xu-cheng/install/milestones{/number}","notifications_url":"https://api.github.com/repos/xu-cheng/install/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xu-cheng/install/labels{/name}","releases_url":"https://api.github.com/repos/xu-cheng/install/releases{/id}","created_at":"2015-03-15T07:19:11Z","updated_at":"2015-03-15T07:19:12Z","pushed_at":"2015-03-18T11:27:39Z","git_url":"git://github.com/xu-cheng/install.git","ssh_url":"git@github.com:xu-cheng/install.git","clone_url":"https://github.com/xu-cheng/install.git","svn_url":"https://github.com/xu-cheng/install","homepage":"http://brew.sh","size":100,"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":"Homebrew:master","ref":"master","sha":"436f1c7f8bc4139f3f3419752f5eb7d4302f6469","user":{"login":"Homebrew","id":1503512,"avatar_url":"https://avatars.githubusercontent.com/u/1503512?v=3","gravatar_id":"","url":"https://api.github.com/users/Homebrew","html_url":"https://github.com/Homebrew","followers_url":"https://api.github.com/users/Homebrew/followers","following_url":"https://api.github.com/users/Homebrew/following{/other_user}","gists_url":"https://api.github.com/users/Homebrew/gists{/gist_id}","starred_url":"https://api.github.com/users/Homebrew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Homebrew/subscriptions","organizations_url":"https://api.github.com/users/Homebrew/orgs","repos_url":"https://api.github.com/users/Homebrew/repos","events_url":"https://api.github.com/users/Homebrew/events{/privacy}","received_events_url":"https://api.github.com/users/Homebrew/received_events","type":"Organization","site_admin":false},"repo":{"id":23519392,"name":"install","full_name":"Homebrew/install","owner":{"login":"Homebrew","id":1503512,"avatar_url":"https://avatars.githubusercontent.com/u/1503512?v=3","gravatar_id":"","url":"https://api.github.com/users/Homebrew","html_url":"https://github.com/Homebrew","followers_url":"https://api.github.com/users/Homebrew/followers","following_url":"https://api.github.com/users/Homebrew/following{/other_user}","gists_url":"https://api.github.com/users/Homebrew/gists{/gist_id}","starred_url":"https://api.github.com/users/Homebrew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Homebrew/subscriptions","organizations_url":"https://api.github.com/users/Homebrew/orgs","repos_url":"https://api.github.com/users/Homebrew/repos","events_url":"https://api.github.com/users/Homebrew/events{/privacy}","received_events_url":"https://api.github.com/users/Homebrew/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Homebrew/install","description":"Homebrew's installer","fork":false,"url":"https://api.github.com/repos/Homebrew/install","forks_url":"https://api.github.com/repos/Homebrew/install/forks","keys_url":"https://api.github.com/repos/Homebrew/install/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Homebrew/install/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Homebrew/install/teams","hooks_url":"https://api.github.com/repos/Homebrew/install/hooks","issue_events_url":"https://api.github.com/repos/Homebrew/install/issues/events{/number}","events_url":"https://api.github.com/repos/Homebrew/install/events","assignees_url":"https://api.github.com/repos/Homebrew/install/assignees{/user}","branches_url":"https://api.github.com/repos/Homebrew/install/branches{/branch}","tags_url":"https://api.github.com/repos/Homebrew/install/tags","blobs_url":"https://api.github.com/repos/Homebrew/install/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Homebrew/install/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Homebrew/install/git/refs{/sha}","trees_url":"https://api.github.com/repos/Homebrew/install/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Homebrew/install/statuses/{sha}","languages_url":"https://api.github.com/repos/Homebrew/install/languages","stargazers_url":"https://api.github.com/repos/Homebrew/install/stargazers","contributors_url":"https://api.github.com/repos/Homebrew/install/contributors","subscribers_url":"https://api.github.com/repos/Homebrew/install/subscribers","subscription_url":"https://api.github.com/repos/Homebrew/install/subscription","commits_url":"https://api.github.com/repos/Homebrew/install/commits{/sha}","git_commits_url":"https://api.github.com/repos/Homebrew/install/git/commits{/sha}","comments_url":"https://api.github.com/repos/Homebrew/install/comments{/number}","issue_comment_url":"https://api.github.com/repos/Homebrew/install/issues/comments{/number}","contents_url":"https://api.github.com/repos/Homebrew/install/contents/{+path}","compare_url":"https://api.github.com/repos/Homebrew/install/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Homebrew/install/merges","archive_url":"https://api.github.com/repos/Homebrew/install/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Homebrew/install/downloads","issues_url":"https://api.github.com/repos/Homebrew/install/issues{/number}","pulls_url":"https://api.github.com/repos/Homebrew/install/pulls{/number}","milestones_url":"https://api.github.com/repos/Homebrew/install/milestones{/number}","notifications_url":"https://api.github.com/repos/Homebrew/install/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Homebrew/install/labels{/name}","releases_url":"https://api.github.com/repos/Homebrew/install/releases{/id}","created_at":"2014-08-31T17:48:16Z","updated_at":"2015-02-28T02:25:27Z","pushed_at":"2015-02-11T06:57:03Z","git_url":"git://github.com/Homebrew/install.git","ssh_url":"git@github.com:Homebrew/install.git","clone_url":"https://github.com/Homebrew/install.git","svn_url":"https://github.com/Homebrew/install","homepage":"http://brew.sh","size":317,"stargazers_count":5,"watchers_count":5,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":2,"forks":12,"open_issues":2,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Homebrew/install/pulls/7"},"html":{"href":"https://github.com/Homebrew/install/pull/7"},"issue":{"href":"https://api.github.com/repos/Homebrew/install/issues/7"},"comments":{"href":"https://api.github.com/repos/Homebrew/install/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/Homebrew/install/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/Homebrew/install/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Homebrew/install/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/Homebrew/install/statuses/d95008e0017d1b0618fe43cedf6c1ccdbc695e43"}}}}