{"action":"created","comment":{"url":"https://api.github.com/repos/Homebrew/homebrew/pulls/comments/29103895","id":29103895,"diff_hunk":"@@ -0,0 +1,40 @@\n+class Eg < Formula\n+  homepage \"https://github.com/srsudar/eg\"\n+  url \"https://github.com/srsudar/eg/archive/v0.0.3.tar.gz\"\n+  sha256 \"c257e334f2a2e494f9b9791b92c1d3f7b00da3e2e7ec47f02d720342b466f968\"\n+\n+  def install\n+    if Dir.exist? \"#{var}/examples\"\n+      Dir[\"eg/examples/*\"].each do |example|\n+        next if example.to_s == '.' || example.to_s == '..'\n+        mv example, \"#{var}/examples/\"\n+      end\n+      rmdir \"eg/examples\"\n+    else\n+      var.install \"eg/examples\"\n+    end\n+\n+    inreplace \"eg/eg_config.py\",\n+              /DEFAULT_EXAMPLES_DIR = .+$/,\n+              \"DEFAULT_EXAMPLES_DIR = os.path.join('#{var}', 'examples')\"\n+    mv \"eg\", \"commands\"\n+    prefix.install \"commands\"\n+    inreplace \"bin/eg\",\n+              \"from eg import eg_exec\",\n+              import_eg_exec\n+    bin.install \"bin/eg\"\n+  end\n+\n+  test do\n+    system \"#{bin}/eg\"\n+  end\n+\n+  private\n+\n+  def import_eg_exec\n+    \"import os.path\\n\" +\n+    \"import sys\\n\" +\n+    \"sys.path.append(os.path.abspath(os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', 'commands')))\\n\" +\n+    \"import eg_exec\"\n+  end","path":"Library/Formula/eg.rb","position":39,"original_position":39,"commit_id":"3430001f433bd7a1eec77226bf17c819d1aad933","original_commit_id":"3430001f433bd7a1eec77226bf17c819d1aad933","user":{"login":"mikemcquaid","id":125011,"avatar_url":"https://avatars.githubusercontent.com/u/125011?v=3","gravatar_id":"","url":"https://api.github.com/users/mikemcquaid","html_url":"https://github.com/mikemcquaid","followers_url":"https://api.github.com/users/mikemcquaid/followers","following_url":"https://api.github.com/users/mikemcquaid/following{/other_user}","gists_url":"https://api.github.com/users/mikemcquaid/gists{/gist_id}","starred_url":"https://api.github.com/users/mikemcquaid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikemcquaid/subscriptions","organizations_url":"https://api.github.com/users/mikemcquaid/orgs","repos_url":"https://api.github.com/users/mikemcquaid/repos","events_url":"https://api.github.com/users/mikemcquaid/events{/privacy}","received_events_url":"https://api.github.com/users/mikemcquaid/received_events","type":"User","site_admin":true},"body":"Just inline this function above and use `EOS.undent`","created_at":"2015-04-25T20:47:20Z","updated_at":"2015-04-25T20:47:20Z","html_url":"https://github.com/Homebrew/homebrew/pull/39058#discussion_r29103895","pull_request_url":"https://api.github.com/repos/Homebrew/homebrew/pulls/39058","_links":{"self":{"href":"https://api.github.com/repos/Homebrew/homebrew/pulls/comments/29103895"},"html":{"href":"https://github.com/Homebrew/homebrew/pull/39058#discussion_r29103895"},"pull_request":{"href":"https://api.github.com/repos/Homebrew/homebrew/pulls/39058"}}},"pull_request":{"url":"https://api.github.com/repos/Homebrew/homebrew/pulls/39058","id":34110798,"html_url":"https://github.com/Homebrew/homebrew/pull/39058","diff_url":"https://github.com/Homebrew/homebrew/pull/39058.diff","patch_url":"https://github.com/Homebrew/homebrew/pull/39058.patch","issue_url":"https://api.github.com/repos/Homebrew/homebrew/issues/39058","number":39058,"state":"open","locked":false,"title":"Add eg formula.","user":{"login":"habibalamin","id":1415293,"avatar_url":"https://avatars.githubusercontent.com/u/1415293?v=3","gravatar_id":"","url":"https://api.github.com/users/habibalamin","html_url":"https://github.com/habibalamin","followers_url":"https://api.github.com/users/habibalamin/followers","following_url":"https://api.github.com/users/habibalamin/following{/other_user}","gists_url":"https://api.github.com/users/habibalamin/gists{/gist_id}","starred_url":"https://api.github.com/users/habibalamin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/habibalamin/subscriptions","organizations_url":"https://api.github.com/users/habibalamin/orgs","repos_url":"https://api.github.com/users/habibalamin/repos","events_url":"https://api.github.com/users/habibalamin/events{/privacy}","received_events_url":"https://api.github.com/users/habibalamin/received_events","type":"User","site_admin":false},"body":"`eg` is a complement to `man` that provides examples of usage.","created_at":"2015-04-25T18:34:00Z","updated_at":"2015-04-25T20:47:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b8fab8b3d868ae8fb672fa271409ea7b969f5615","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Homebrew/homebrew/pulls/39058/commits","review_comments_url":"https://api.github.com/repos/Homebrew/homebrew/pulls/39058/comments","review_comment_url":"https://api.github.com/repos/Homebrew/homebrew/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Homebrew/homebrew/issues/39058/comments","statuses_url":"https://api.github.com/repos/Homebrew/homebrew/statuses/3430001f433bd7a1eec77226bf17c819d1aad933","head":{"label":"habibalamin:eg_formula","ref":"eg_formula","sha":"3430001f433bd7a1eec77226bf17c819d1aad933","user":{"login":"habibalamin","id":1415293,"avatar_url":"https://avatars.githubusercontent.com/u/1415293?v=3","gravatar_id":"","url":"https://api.github.com/users/habibalamin","html_url":"https://github.com/habibalamin","followers_url":"https://api.github.com/users/habibalamin/followers","following_url":"https://api.github.com/users/habibalamin/following{/other_user}","gists_url":"https://api.github.com/users/habibalamin/gists{/gist_id}","starred_url":"https://api.github.com/users/habibalamin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/habibalamin/subscriptions","organizations_url":"https://api.github.com/users/habibalamin/orgs","repos_url":"https://api.github.com/users/habibalamin/repos","events_url":"https://api.github.com/users/habibalamin/events{/privacy}","received_events_url":"https://api.github.com/users/habibalamin/received_events","type":"User","site_admin":false},"repo":{"id":13621441,"name":"homebrew","full_name":"habibalamin/homebrew","owner":{"login":"habibalamin","id":1415293,"avatar_url":"https://avatars.githubusercontent.com/u/1415293?v=3","gravatar_id":"","url":"https://api.github.com/users/habibalamin","html_url":"https://github.com/habibalamin","followers_url":"https://api.github.com/users/habibalamin/followers","following_url":"https://api.github.com/users/habibalamin/following{/other_user}","gists_url":"https://api.github.com/users/habibalamin/gists{/gist_id}","starred_url":"https://api.github.com/users/habibalamin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/habibalamin/subscriptions","organizations_url":"https://api.github.com/users/habibalamin/orgs","repos_url":"https://api.github.com/users/habibalamin/repos","events_url":"https://api.github.com/users/habibalamin/events{/privacy}","received_events_url":"https://api.github.com/users/habibalamin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/habibalamin/homebrew","description":"The missing package manager for OS X.","fork":true,"url":"https://api.github.com/repos/habibalamin/homebrew","forks_url":"https://api.github.com/repos/habibalamin/homebrew/forks","keys_url":"https://api.github.com/repos/habibalamin/homebrew/keys{/key_id}","collaborators_url":"https://api.github.com/repos/habibalamin/homebrew/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/habibalamin/homebrew/teams","hooks_url":"https://api.github.com/repos/habibalamin/homebrew/hooks","issue_events_url":"https://api.github.com/repos/habibalamin/homebrew/issues/events{/number}","events_url":"https://api.github.com/repos/habibalamin/homebrew/events","assignees_url":"https://api.github.com/repos/habibalamin/homebrew/assignees{/user}","branches_url":"https://api.github.com/repos/habibalamin/homebrew/branches{/branch}","tags_url":"https://api.github.com/repos/habibalamin/homebrew/tags","blobs_url":"https://api.github.com/repos/habibalamin/homebrew/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/habibalamin/homebrew/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/habibalamin/homebrew/git/refs{/sha}","trees_url":"https://api.github.com/repos/habibalamin/homebrew/git/trees{/sha}","statuses_url":"https://api.github.com/repos/habibalamin/homebrew/statuses/{sha}","languages_url":"https://api.github.com/repos/habibalamin/homebrew/languages","stargazers_url":"https://api.github.com/repos/habibalamin/homebrew/stargazers","contributors_url":"https://api.github.com/repos/habibalamin/homebrew/contributors","subscribers_url":"https://api.github.com/repos/habibalamin/homebrew/subscribers","subscription_url":"https://api.github.com/repos/habibalamin/homebrew/subscription","commits_url":"https://api.github.com/repos/habibalamin/homebrew/commits{/sha}","git_commits_url":"https://api.github.com/repos/habibalamin/homebrew/git/commits{/sha}","comments_url":"https://api.github.com/repos/habibalamin/homebrew/comments{/number}","issue_comment_url":"https://api.github.com/repos/habibalamin/homebrew/issues/comments{/number}","contents_url":"https://api.github.com/repos/habibalamin/homebrew/contents/{+path}","compare_url":"https://api.github.com/repos/habibalamin/homebrew/compare/{base}...{head}","merges_url":"https://api.github.com/repos/habibalamin/homebrew/merges","archive_url":"https://api.github.com/repos/habibalamin/homebrew/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/habibalamin/homebrew/downloads","issues_url":"https://api.github.com/repos/habibalamin/homebrew/issues{/number}","pulls_url":"https://api.github.com/repos/habibalamin/homebrew/pulls{/number}","milestones_url":"https://api.github.com/repos/habibalamin/homebrew/milestones{/number}","notifications_url":"https://api.github.com/repos/habibalamin/homebrew/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/habibalamin/homebrew/labels{/name}","releases_url":"https://api.github.com/repos/habibalamin/homebrew/releases{/id}","created_at":"2013-10-16T14:33:43Z","updated_at":"2015-04-25T18:26:51Z","pushed_at":"2015-04-25T18:30:08Z","git_url":"git://github.com/habibalamin/homebrew.git","ssh_url":"git@github.com:habibalamin/homebrew.git","clone_url":"https://github.com/habibalamin/homebrew.git","svn_url":"https://github.com/habibalamin/homebrew","homepage":"http://brew.sh","size":37583,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":false,"has_wiki":true,"has_pages":true,"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":"8ad6717b72178c8a20c7d1d0a577265edff4d31c","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":206084,"name":"homebrew","full_name":"Homebrew/homebrew","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/homebrew","description":":beer: The missing package manager for OS X.","fork":false,"url":"https://api.github.com/repos/Homebrew/homebrew","forks_url":"https://api.github.com/repos/Homebrew/homebrew/forks","keys_url":"https://api.github.com/repos/Homebrew/homebrew/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Homebrew/homebrew/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Homebrew/homebrew/teams","hooks_url":"https://api.github.com/repos/Homebrew/homebrew/hooks","issue_events_url":"https://api.github.com/repos/Homebrew/homebrew/issues/events{/number}","events_url":"https://api.github.com/repos/Homebrew/homebrew/events","assignees_url":"https://api.github.com/repos/Homebrew/homebrew/assignees{/user}","branches_url":"https://api.github.com/repos/Homebrew/homebrew/branches{/branch}","tags_url":"https://api.github.com/repos/Homebrew/homebrew/tags","blobs_url":"https://api.github.com/repos/Homebrew/homebrew/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Homebrew/homebrew/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Homebrew/homebrew/git/refs{/sha}","trees_url":"https://api.github.com/repos/Homebrew/homebrew/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Homebrew/homebrew/statuses/{sha}","languages_url":"https://api.github.com/repos/Homebrew/homebrew/languages","stargazers_url":"https://api.github.com/repos/Homebrew/homebrew/stargazers","contributors_url":"https://api.github.com/repos/Homebrew/homebrew/contributors","subscribers_url":"https://api.github.com/repos/Homebrew/homebrew/subscribers","subscription_url":"https://api.github.com/repos/Homebrew/homebrew/subscription","commits_url":"https://api.github.com/repos/Homebrew/homebrew/commits{/sha}","git_commits_url":"https://api.github.com/repos/Homebrew/homebrew/git/commits{/sha}","comments_url":"https://api.github.com/repos/Homebrew/homebrew/comments{/number}","issue_comment_url":"https://api.github.com/repos/Homebrew/homebrew/issues/comments{/number}","contents_url":"https://api.github.com/repos/Homebrew/homebrew/contents/{+path}","compare_url":"https://api.github.com/repos/Homebrew/homebrew/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Homebrew/homebrew/merges","archive_url":"https://api.github.com/repos/Homebrew/homebrew/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Homebrew/homebrew/downloads","issues_url":"https://api.github.com/repos/Homebrew/homebrew/issues{/number}","pulls_url":"https://api.github.com/repos/Homebrew/homebrew/pulls{/number}","milestones_url":"https://api.github.com/repos/Homebrew/homebrew/milestones{/number}","notifications_url":"https://api.github.com/repos/Homebrew/homebrew/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Homebrew/homebrew/labels{/name}","releases_url":"https://api.github.com/repos/Homebrew/homebrew/releases{/id}","created_at":"2009-05-20T19:38:37Z","updated_at":"2015-04-25T19:53:30Z","pushed_at":"2015-04-25T20:41:22Z","git_url":"git://github.com/Homebrew/homebrew.git","ssh_url":"git@github.com:Homebrew/homebrew.git","clone_url":"https://github.com/Homebrew/homebrew.git","svn_url":"https://github.com/Homebrew/homebrew","homepage":"http://brew.sh","size":1476762,"stargazers_count":22624,"watchers_count":22624,"language":"Ruby","has_issues":true,"has_downloads":false,"has_wiki":true,"has_pages":true,"forks_count":11368,"mirror_url":null,"open_issues_count":394,"forks":11368,"open_issues":394,"watchers":22624,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Homebrew/homebrew/pulls/39058"},"html":{"href":"https://github.com/Homebrew/homebrew/pull/39058"},"issue":{"href":"https://api.github.com/repos/Homebrew/homebrew/issues/39058"},"comments":{"href":"https://api.github.com/repos/Homebrew/homebrew/issues/39058/comments"},"review_comments":{"href":"https://api.github.com/repos/Homebrew/homebrew/pulls/39058/comments"},"review_comment":{"href":"https://api.github.com/repos/Homebrew/homebrew/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Homebrew/homebrew/pulls/39058/commits"},"statuses":{"href":"https://api.github.com/repos/Homebrew/homebrew/statuses/3430001f433bd7a1eec77226bf17c819d1aad933"}}}}