{"action":"created","comment":{"url":"https://api.github.com/repos/mblayman/httpony/pulls/comments/89243222","pull_request_review_id":9790524,"id":89243222,"diff_hunk":"@@ -24,6 +27,30 @@ def main():\n     app = make_app()\n     run_simple(hostname, port, app)\n \n+def parse(argv):\n+    \"\"\"Parse the user arguments.\"\"\"\n+    parser = build_parser()\n+\n+    # argparse expects the executable to be removed from argv.\n+    args = parser.parse_args(argv[1:])\n+\n+    return args\n+\n+def build_parser():\n+    \"\"\"Build the parser that will have all available commands and options.\"\"\"\n+    description = 'HTTPony (pronounced aych-tee-tee-pony) is a simple HTTP ' \\\n+                  'server that pretty prints HTTP requests to a terminal. It' \\\n+                  ' is a useful aide for developing clients that send HTTP ' \\\n+                  'requests. HTTPony acts as a sink for a client so that a ' \\\n+                  'developer can understand what the client is sending.'\n+    parser = argparse.ArgumentParser(description=description)\n+    parser.add_argument(\n+        '-l', '--listen', help='set ip/hostname',\n+        default='localhost')\n+    parser.add_argument(\n+        '-p','--port', help='set port', default='8000', type=int)\n+\n+    return parser\n \n if __name__ == '__main__':\n-    main()\n+    main()","path":"httpony/server.py","position":55,"original_position":55,"commit_id":"130f9078cdcb2331d11385cf574d81ff5d27cf6d","original_commit_id":"130f9078cdcb2331d11385cf574d81ff5d27cf6d","user":{"login":"mblayman","id":636865,"avatar_url":"https://avatars.githubusercontent.com/u/636865?v=3","gravatar_id":"","url":"https://api.github.com/users/mblayman","html_url":"https://github.com/mblayman","followers_url":"https://api.github.com/users/mblayman/followers","following_url":"https://api.github.com/users/mblayman/following{/other_user}","gists_url":"https://api.github.com/users/mblayman/gists{/gist_id}","starred_url":"https://api.github.com/users/mblayman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mblayman/subscriptions","organizations_url":"https://api.github.com/users/mblayman/orgs","repos_url":"https://api.github.com/users/mblayman/repos","events_url":"https://api.github.com/users/mblayman/events{/privacy}","received_events_url":"https://api.github.com/users/mblayman/received_events","type":"User","site_admin":false},"body":"Somehow this file lost its line ending character.","created_at":"2016-11-23T01:08:08Z","updated_at":"2016-11-23T01:10:26Z","html_url":"https://github.com/mblayman/httpony/pull/15#discussion_r89243222","pull_request_url":"https://api.github.com/repos/mblayman/httpony/pulls/15","_links":{"self":{"href":"https://api.github.com/repos/mblayman/httpony/pulls/comments/89243222"},"html":{"href":"https://github.com/mblayman/httpony/pull/15#discussion_r89243222"},"pull_request":{"href":"https://api.github.com/repos/mblayman/httpony/pulls/15"}}},"pull_request":{"url":"https://api.github.com/repos/mblayman/httpony/pulls/15","id":94730184,"html_url":"https://github.com/mblayman/httpony/pull/15","diff_url":"https://github.com/mblayman/httpony/pull/15.diff","patch_url":"https://github.com/mblayman/httpony/pull/15.patch","issue_url":"https://api.github.com/repos/mblayman/httpony/issues/15","number":15,"state":"open","locked":false,"title":"adding arg parsing","user":{"login":"patrickpierson","id":16248685,"avatar_url":"https://avatars.githubusercontent.com/u/16248685?v=3","gravatar_id":"","url":"https://api.github.com/users/patrickpierson","html_url":"https://github.com/patrickpierson","followers_url":"https://api.github.com/users/patrickpierson/followers","following_url":"https://api.github.com/users/patrickpierson/following{/other_user}","gists_url":"https://api.github.com/users/patrickpierson/gists{/gist_id}","starred_url":"https://api.github.com/users/patrickpierson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patrickpierson/subscriptions","organizations_url":"https://api.github.com/users/patrickpierson/orgs","repos_url":"https://api.github.com/users/patrickpierson/repos","events_url":"https://api.github.com/users/patrickpierson/events{/privacy}","received_events_url":"https://api.github.com/users/patrickpierson/received_events","type":"User","site_admin":false},"body":"potentially closes #7, added arg parsing. It does however break the test which I would happily take input on how to fix.","created_at":"2016-11-22T01:14:14Z","updated_at":"2016-11-23T01:10:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c460fe5f5f5cd3c7a685a5f382fdf8558ffc56ca","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/mblayman/httpony/pulls/15/commits","review_comments_url":"https://api.github.com/repos/mblayman/httpony/pulls/15/comments","review_comment_url":"https://api.github.com/repos/mblayman/httpony/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mblayman/httpony/issues/15/comments","statuses_url":"https://api.github.com/repos/mblayman/httpony/statuses/130f9078cdcb2331d11385cf574d81ff5d27cf6d","head":{"label":"patrickpierson:master","ref":"master","sha":"130f9078cdcb2331d11385cf574d81ff5d27cf6d","user":{"login":"patrickpierson","id":16248685,"avatar_url":"https://avatars.githubusercontent.com/u/16248685?v=3","gravatar_id":"","url":"https://api.github.com/users/patrickpierson","html_url":"https://github.com/patrickpierson","followers_url":"https://api.github.com/users/patrickpierson/followers","following_url":"https://api.github.com/users/patrickpierson/following{/other_user}","gists_url":"https://api.github.com/users/patrickpierson/gists{/gist_id}","starred_url":"https://api.github.com/users/patrickpierson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patrickpierson/subscriptions","organizations_url":"https://api.github.com/users/patrickpierson/orgs","repos_url":"https://api.github.com/users/patrickpierson/repos","events_url":"https://api.github.com/users/patrickpierson/events{/privacy}","received_events_url":"https://api.github.com/users/patrickpierson/received_events","type":"User","site_admin":false},"repo":{"id":74215929,"name":"httpony","full_name":"patrickpierson/httpony","owner":{"login":"patrickpierson","id":16248685,"avatar_url":"https://avatars.githubusercontent.com/u/16248685?v=3","gravatar_id":"","url":"https://api.github.com/users/patrickpierson","html_url":"https://github.com/patrickpierson","followers_url":"https://api.github.com/users/patrickpierson/followers","following_url":"https://api.github.com/users/patrickpierson/following{/other_user}","gists_url":"https://api.github.com/users/patrickpierson/gists{/gist_id}","starred_url":"https://api.github.com/users/patrickpierson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patrickpierson/subscriptions","organizations_url":"https://api.github.com/users/patrickpierson/orgs","repos_url":"https://api.github.com/users/patrickpierson/repos","events_url":"https://api.github.com/users/patrickpierson/events{/privacy}","received_events_url":"https://api.github.com/users/patrickpierson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/patrickpierson/httpony","description":":horse: An HTTP request listener and pretty printer","fork":true,"url":"https://api.github.com/repos/patrickpierson/httpony","forks_url":"https://api.github.com/repos/patrickpierson/httpony/forks","keys_url":"https://api.github.com/repos/patrickpierson/httpony/keys{/key_id}","collaborators_url":"https://api.github.com/repos/patrickpierson/httpony/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/patrickpierson/httpony/teams","hooks_url":"https://api.github.com/repos/patrickpierson/httpony/hooks","issue_events_url":"https://api.github.com/repos/patrickpierson/httpony/issues/events{/number}","events_url":"https://api.github.com/repos/patrickpierson/httpony/events","assignees_url":"https://api.github.com/repos/patrickpierson/httpony/assignees{/user}","branches_url":"https://api.github.com/repos/patrickpierson/httpony/branches{/branch}","tags_url":"https://api.github.com/repos/patrickpierson/httpony/tags","blobs_url":"https://api.github.com/repos/patrickpierson/httpony/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/patrickpierson/httpony/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/patrickpierson/httpony/git/refs{/sha}","trees_url":"https://api.github.com/repos/patrickpierson/httpony/git/trees{/sha}","statuses_url":"https://api.github.com/repos/patrickpierson/httpony/statuses/{sha}","languages_url":"https://api.github.com/repos/patrickpierson/httpony/languages","stargazers_url":"https://api.github.com/repos/patrickpierson/httpony/stargazers","contributors_url":"https://api.github.com/repos/patrickpierson/httpony/contributors","subscribers_url":"https://api.github.com/repos/patrickpierson/httpony/subscribers","subscription_url":"https://api.github.com/repos/patrickpierson/httpony/subscription","commits_url":"https://api.github.com/repos/patrickpierson/httpony/commits{/sha}","git_commits_url":"https://api.github.com/repos/patrickpierson/httpony/git/commits{/sha}","comments_url":"https://api.github.com/repos/patrickpierson/httpony/comments{/number}","issue_comment_url":"https://api.github.com/repos/patrickpierson/httpony/issues/comments{/number}","contents_url":"https://api.github.com/repos/patrickpierson/httpony/contents/{+path}","compare_url":"https://api.github.com/repos/patrickpierson/httpony/compare/{base}...{head}","merges_url":"https://api.github.com/repos/patrickpierson/httpony/merges","archive_url":"https://api.github.com/repos/patrickpierson/httpony/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/patrickpierson/httpony/downloads","issues_url":"https://api.github.com/repos/patrickpierson/httpony/issues{/number}","pulls_url":"https://api.github.com/repos/patrickpierson/httpony/pulls{/number}","milestones_url":"https://api.github.com/repos/patrickpierson/httpony/milestones{/number}","notifications_url":"https://api.github.com/repos/patrickpierson/httpony/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/patrickpierson/httpony/labels{/name}","releases_url":"https://api.github.com/repos/patrickpierson/httpony/releases{/id}","deployments_url":"https://api.github.com/repos/patrickpierson/httpony/deployments","created_at":"2016-11-19T15:12:14Z","updated_at":"2016-11-19T15:12:15Z","pushed_at":"2016-11-22T23:50:59Z","git_url":"git://github.com/patrickpierson/httpony.git","ssh_url":"git@github.com:patrickpierson/httpony.git","clone_url":"https://github.com/patrickpierson/httpony.git","svn_url":"https://github.com/patrickpierson/httpony","homepage":"","size":24,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"mblayman:master","ref":"master","sha":"ad80587c614e459000f9bee227b21657d70972ba","user":{"login":"mblayman","id":636865,"avatar_url":"https://avatars.githubusercontent.com/u/636865?v=3","gravatar_id":"","url":"https://api.github.com/users/mblayman","html_url":"https://github.com/mblayman","followers_url":"https://api.github.com/users/mblayman/followers","following_url":"https://api.github.com/users/mblayman/following{/other_user}","gists_url":"https://api.github.com/users/mblayman/gists{/gist_id}","starred_url":"https://api.github.com/users/mblayman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mblayman/subscriptions","organizations_url":"https://api.github.com/users/mblayman/orgs","repos_url":"https://api.github.com/users/mblayman/repos","events_url":"https://api.github.com/users/mblayman/events{/privacy}","received_events_url":"https://api.github.com/users/mblayman/received_events","type":"User","site_admin":false},"repo":{"id":41637056,"name":"httpony","full_name":"mblayman/httpony","owner":{"login":"mblayman","id":636865,"avatar_url":"https://avatars.githubusercontent.com/u/636865?v=3","gravatar_id":"","url":"https://api.github.com/users/mblayman","html_url":"https://github.com/mblayman","followers_url":"https://api.github.com/users/mblayman/followers","following_url":"https://api.github.com/users/mblayman/following{/other_user}","gists_url":"https://api.github.com/users/mblayman/gists{/gist_id}","starred_url":"https://api.github.com/users/mblayman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mblayman/subscriptions","organizations_url":"https://api.github.com/users/mblayman/orgs","repos_url":"https://api.github.com/users/mblayman/repos","events_url":"https://api.github.com/users/mblayman/events{/privacy}","received_events_url":"https://api.github.com/users/mblayman/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mblayman/httpony","description":":horse: An HTTP request listener and pretty printer","fork":false,"url":"https://api.github.com/repos/mblayman/httpony","forks_url":"https://api.github.com/repos/mblayman/httpony/forks","keys_url":"https://api.github.com/repos/mblayman/httpony/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mblayman/httpony/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mblayman/httpony/teams","hooks_url":"https://api.github.com/repos/mblayman/httpony/hooks","issue_events_url":"https://api.github.com/repos/mblayman/httpony/issues/events{/number}","events_url":"https://api.github.com/repos/mblayman/httpony/events","assignees_url":"https://api.github.com/repos/mblayman/httpony/assignees{/user}","branches_url":"https://api.github.com/repos/mblayman/httpony/branches{/branch}","tags_url":"https://api.github.com/repos/mblayman/httpony/tags","blobs_url":"https://api.github.com/repos/mblayman/httpony/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mblayman/httpony/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mblayman/httpony/git/refs{/sha}","trees_url":"https://api.github.com/repos/mblayman/httpony/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mblayman/httpony/statuses/{sha}","languages_url":"https://api.github.com/repos/mblayman/httpony/languages","stargazers_url":"https://api.github.com/repos/mblayman/httpony/stargazers","contributors_url":"https://api.github.com/repos/mblayman/httpony/contributors","subscribers_url":"https://api.github.com/repos/mblayman/httpony/subscribers","subscription_url":"https://api.github.com/repos/mblayman/httpony/subscription","commits_url":"https://api.github.com/repos/mblayman/httpony/commits{/sha}","git_commits_url":"https://api.github.com/repos/mblayman/httpony/git/commits{/sha}","comments_url":"https://api.github.com/repos/mblayman/httpony/comments{/number}","issue_comment_url":"https://api.github.com/repos/mblayman/httpony/issues/comments{/number}","contents_url":"https://api.github.com/repos/mblayman/httpony/contents/{+path}","compare_url":"https://api.github.com/repos/mblayman/httpony/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mblayman/httpony/merges","archive_url":"https://api.github.com/repos/mblayman/httpony/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mblayman/httpony/downloads","issues_url":"https://api.github.com/repos/mblayman/httpony/issues{/number}","pulls_url":"https://api.github.com/repos/mblayman/httpony/pulls{/number}","milestones_url":"https://api.github.com/repos/mblayman/httpony/milestones{/number}","notifications_url":"https://api.github.com/repos/mblayman/httpony/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mblayman/httpony/labels{/name}","releases_url":"https://api.github.com/repos/mblayman/httpony/releases{/id}","deployments_url":"https://api.github.com/repos/mblayman/httpony/deployments","created_at":"2015-08-30T17:34:15Z","updated_at":"2016-11-22T02:25:29Z","pushed_at":"2016-11-22T23:50:59Z","git_url":"git://github.com/mblayman/httpony.git","ssh_url":"git@github.com:mblayman/httpony.git","clone_url":"https://github.com/mblayman/httpony.git","svn_url":"https://github.com/mblayman/httpony","homepage":"","size":23,"stargazers_count":34,"watchers_count":34,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":6,"forks":5,"open_issues":6,"watchers":34,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mblayman/httpony/pulls/15"},"html":{"href":"https://github.com/mblayman/httpony/pull/15"},"issue":{"href":"https://api.github.com/repos/mblayman/httpony/issues/15"},"comments":{"href":"https://api.github.com/repos/mblayman/httpony/issues/15/comments"},"review_comments":{"href":"https://api.github.com/repos/mblayman/httpony/pulls/15/comments"},"review_comment":{"href":"https://api.github.com/repos/mblayman/httpony/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mblayman/httpony/pulls/15/commits"},"statuses":{"href":"https://api.github.com/repos/mblayman/httpony/statuses/130f9078cdcb2331d11385cf574d81ff5d27cf6d"}}}}
{"actor":{"display_login":"mblayman"}}