GitHub PullRequestReviewCommentEvent at 2014-10-24 20:25:13
Repository: marionette-socket-host
Actor: lightsofapollo
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/mozilla-b2g/marionette-socket-host/pulls/comments/19362180","id":19362180,"diff_hunk":"@@ -0,0 +1,101 @@\n+#!/bin/bash -e\n+\n+# TODO: isntall virtual env if they dont have it\n+# TODO: install the right version of python of they don't have it\n+# TODO: figure out what the right version of python is\n+echo \"checking python version\"\n+\n+PYTHON_NAME=Python-2.7.5\n+\n+PYTHON_DOWNLOAD_URL=https://www.python.org/ftp/python/2.7.5/Python-2.7.5.tgz\n+\n+function notify_sudo {\n+  if [ \"$SUDO_NOTIFY\" = \"1\" ]; then\n+    return\n+  fi\n+  echo \"Sudo access is required to install pip and/or virtualenv \"\n+  echo \"on your system.  Please enter your sudo password if prompted. \"\n+  echo \"If you don't have sudo access, you will need a system administrator \"\n+  echo \"to install python, pip and/or virtualenv for you. This is a requirement for marionette-socket-host.\"\n+  SUDO_NOTIFY=1\n+}\n+\n+function install_python_from_source {\n+  /usr/bin/curl -OLsS $PYTHON_DOWNLOAD_URL\n+  if [ ! -d $PYTHON_NAME ]; then mkdir $PYTHON_NAME; fi\n+  tar --strip-components 1 -x -m -f $PYTHON_NAME.tgz -C $PYTHON_NAME\n+  pushd $PYTHON_NAME && ./configure && make && sudo make install && popd\n+  if [ -d $PYTHON_NAME ]; then rm -rf $PYTHON_NAME; fi\n+  if [ -f $PYTHON_NAME.tgz ]; then rm $PYTHON_NAME.tgz; fi\n+}\n+\n+function install_python {\n+  notify_sudo\n+  SYS=`uname -s`\n+  if [ $SYS == 'Darwin' ]; then \n+    which brew\n+    if [ $? == 0 ]; then\n+      # this is python 2.7.6 or higher\n+      brew install python\n+    else\n+      install_python_from_source\n+    fi\n+  elif [ $SYS == 'Linux' ]; then\n+    which apt \n+    if [ $? == 0 ]; then\n+      # this is python 2.7.6 or higher\n+      sudo apt-get update\n+      sudo apt-get install python2.7\n+    else\n+      install_python_from_source\n+    fi\n+  else\n+    install_python_from_source\n+  fi\n+}\n+\n+USE_PYTHON=`which python`\n+if [ -n \"$PYTHON_27\" ]; then\n+  USE_PYTHON=$PYTHON_27\n+fi\n+PYTHON_MAJOR=`$USE_PYTHON -c 'import sys; print(sys.version_info[0])'`\n+if [ $? != 0 ]; then\n+  echo \"Python required, installing python 2.7.5\"\n+  install_python\n+fi\n+PYTHON_MINOR=`$USE_PYTHON -c 'import sys; print(sys.version_info[1])'`\n+PYTHON_MICRO=`$USE_PYTHON -c 'import sys; print(sys.version_info[2])'`\n+echo $PYTHON_MAJOR\n+echo $PYTHON_MINOR\n+echo $PYTHON_MICRO\n+if [ $PYTHON_MAJOR -ne 2 ] || [ $PYTHON_MINOR -ne 7 ] || [ $PYTHON_MICRO -lt 5 ] ; then\n+  echo \"Please install python 2.7.5. If you do not wish to override your system \"\n+  echo \"python, then please install python 2.7.5 and have the PYTHON_27 \"\n+  echo \"environment variable point to the location of that installation.\"\n+  exit 1\n+fi\n+\n+echo \"Setting up virtualenv\"\n+\n+which pip\n+if [ $? != 0 ]; then\n+  which easy_install\n+  if [ $? != 0 ]; then","path":"scripts/setup_python.sh","position":83,"original_position":83,"commit_id":"ab68eb3756c9ff684f1ec99b30d4e922205bd13d","original_commit_id":"ab68eb3756c9ff684f1ec99b30d4e922205bd13d","user":{"login":"lightsofapollo","id":322957,"avatar_url":"https://avatars.githubusercontent.com/u/322957?v=2","gravatar_id":"","url":"https://api.github.com/users/lightsofapollo","html_url":"https://github.com/lightsofapollo","followers_url":"https://api.github.com/users/lightsofapollo/followers","following_url":"https://api.github.com/users/lightsofapollo/following{/other_user}","gists_url":"https://api.github.com/users/lightsofapollo/gists{/gist_id}","starred_url":"https://api.github.com/users/lightsofapollo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lightsofapollo/subscriptions","organizations_url":"https://api.github.com/users/lightsofapollo/orgs","repos_url":"https://api.github.com/users/lightsofapollo/repos","events_url":"https://api.github.com/users/lightsofapollo/events{/privacy}","received_events_url":"https://api.github.com/users/lightsofapollo/received_events","type":"User","site_admin":false},"body":"^ see above","created_at":"2014-10-24T20:25:13Z","updated_at":"2014-10-24T20:25:13Z","html_url":"https://github.com/mozilla-b2g/marionette-socket-host/pull/2#discussion_r19362180","pull_request_url":"https://api.github.com/repos/mozilla-b2g/marionette-socket-host/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/mozilla-b2g/marionette-socket-host/pulls/comments/19362180"},"html":{"href":"https://github.com/mozilla-b2g/marionette-socket-host/pull/2#discussion_r19362180"},"pull_request":{"href":"https://api.github.com/repos/mozilla-b2g/marionette-socket-host/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla-b2g/marionette-socket-host/pulls/2","id":23318881,"html_url":"https://github.com/mozilla-b2g/marionette-socket-host/pull/2","diff_url":"https://github.com/mozilla-b2g/marionette-socket-host/pull/2.diff","patch_url":"https://github.com/mozilla-b2g/marionette-socket-host/pull/2.patch","issue_url":"https://api.github.com/repos/mozilla-b2g/marionette-socket-host/issues/2","number":2,"state":"open","locked":false,"title":"Bug 1088835 - have marionette-socket-host kick off runner-service ","user":{"login":"malini","id":24374,"avatar_url":"https://avatars.githubusercontent.com/u/24374?v=2","gravatar_id":"","url":"https://api.github.com/users/malini","html_url":"https://github.com/malini","followers_url":"https://api.github.com/users/malini/followers","following_url":"https://api.github.com/users/malini/following{/other_user}","gists_url":"https://api.github.com/users/malini/gists{/gist_id}","starred_url":"https://api.github.com/users/malini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/malini/subscriptions","organizations_url":"https://api.github.com/users/malini/orgs","repos_url":"https://api.github.com/users/malini/repos","events_url":"https://api.github.com/users/malini/events{/privacy}","received_events_url":"https://api.github.com/users/malini/received_events","type":"User","site_admin":false},"body":"","created_at":"2014-10-24T19:27:20Z","updated_at":"2014-10-24T20:25:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"745cb98b0ea1daadfcc6497b1df0e77a9d5b2e41","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla-b2g/marionette-socket-host/pulls/2/commits","review_comments_url":"https://api.github.com/repos/mozilla-b2g/marionette-socket-host/pulls/2/comments","review_comment_url":"https://api.github.com/repos/mozilla-b2g/marionette-socket-host/pulls/comments/{number}","comments_url":"https://api.github.com/repos/mozilla-b2g/marionette-socket-host/issues/2/comments","statuses_url":"https://api.github.com/repos/mozilla-b2g/marionette-socket-host/statuses/ab68eb3756c9ff684f1ec99b30d4e922205bd13d","head":{"label":"malini:node-py","ref":"node-py","sha":"ab68eb3756c9ff684f1ec99b30d4e922205bd13d","user":{"login":"malini","id":24374,"avatar_url":"https://avatars.githubusercontent.com/u/24374?v=2","gravatar_id":"","url":"https://api.github.com/users/malini","html_url":"https://github.com/malini","followers_url":"https://api.github.com/users/malini/followers","following_url":"https://api.github.com/users/malini/following{/other_user}","gists_url":"https://api.github.com/users/malini/gists{/gist_id}","starred_url":"https://api.github.com/users/malini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/malini/subscriptions","organizations_url":"https://api.github.com/users/malini/orgs","repos_url":"https://api.github.com/users/malini/repos","events_url":"https://api.github.com/users/malini/events{/privacy}","received_events_url":"https://api.github.com/users/malini/received_events","type":"User","site_admin":false},"repo":{"id":22842454,"name":"marionette-socket-host","full_name":"malini/marionette-socket-host","owner":{"login":"malini","id":24374,"avatar_url":"https://avatars.githubusercontent.com/u/24374?v=2","gravatar_id":"","url":"https://api.github.com/users/malini","html_url":"https://github.com/malini","followers_url":"https://api.github.com/users/malini/followers","following_url":"https://api.github.com/users/malini/following{/other_user}","gists_url":"https://api.github.com/users/malini/gists{/gist_id}","starred_url":"https://api.github.com/users/malini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/malini/subscriptions","organizations_url":"https://api.github.com/users/malini/orgs","repos_url":"https://api.github.com/users/malini/repos","events_url":"https://api.github.com/users/malini/events{/privacy}","received_events_url":"https://api.github.com/users/malini/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/malini/marionette-socket-host","description":"Host for marionette-js-runner","fork":true,"url":"https://api.github.com/repos/malini/marionette-socket-host","forks_url":"https://api.github.com/repos/malini/marionette-socket-host/forks","keys_url":"https://api.github.com/repos/malini/marionette-socket-host/keys{/key_id}","collaborators_url":"https://api.github.com/repos/malini/marionette-socket-host/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/malini/marionette-socket-host/teams","hooks_url":"https://api.github.com/repos/malini/marionette-socket-host/hooks","issue_events_url":"https://api.github.com/repos/malini/marionette-socket-host/issues/events{/number}","events_url":"https://api.github.com/repos/malini/marionette-socket-host/events","assignees_url":"https://api.github.com/repos/malini/marionette-socket-host/assignees{/user}","branches_url":"https://api.github.com/repos/malini/marionette-socket-host/branches{/branch}","tags_url":"https://api.github.com/repos/malini/marionette-socket-host/tags","blobs_url":"https://api.github.com/repos/malini/marionette-socket-host/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/malini/marionette-socket-host/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/malini/marionette-socket-host/git/refs{/sha}","trees_url":"https://api.github.com/repos/malini/marionette-socket-host/git/trees{/sha}","statuses_url":"https://api.github.com/repos/malini/marionette-socket-host/statuses/{sha}","languages_url":"https://api.github.com/repos/malini/marionette-socket-host/languages","stargazers_url":"https://api.github.com/repos/malini/marionette-socket-host/stargazers","contributors_url":"https://api.github.com/repos/malini/marionette-socket-host/contributors","subscribers_url":"https://api.github.com/repos/malini/marionette-socket-host/subscribers","subscription_url":"https://api.github.com/repos/malini/marionette-socket-host/subscription","commits_url":"https://api.github.com/repos/malini/marionette-socket-host/commits{/sha}","git_commits_url":"https://api.github.com/repos/malini/marionette-socket-host/git/commits{/sha}","comments_url":"https://api.github.com/repos/malini/marionette-socket-host/comments{/number}","issue_comment_url":"https://api.github.com/repos/malini/marionette-socket-host/issues/comments/{number}","contents_url":"https://api.github.com/repos/malini/marionette-socket-host/contents/{+path}","compare_url":"https://api.github.com/repos/malini/marionette-socket-host/compare/{base}...{head}","merges_url":"https://api.github.com/repos/malini/marionette-socket-host/merges","archive_url":"https://api.github.com/repos/malini/marionette-socket-host/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/malini/marionette-socket-host/downloads","issues_url":"https://api.github.com/repos/malini/marionette-socket-host/issues{/number}","pulls_url":"https://api.github.com/repos/malini/marionette-socket-host/pulls{/number}","milestones_url":"https://api.github.com/repos/malini/marionette-socket-host/milestones{/number}","notifications_url":"https://api.github.com/repos/malini/marionette-socket-host/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/malini/marionette-socket-host/labels{/name}","releases_url":"https://api.github.com/repos/malini/marionette-socket-host/releases{/id}","created_at":"2014-08-11T14:44:02Z","updated_at":"2014-07-14T16:05:43Z","pushed_at":"2014-10-24T20:19:44Z","git_url":"git://github.com/malini/marionette-socket-host.git","ssh_url":"git@github.com:malini/marionette-socket-host.git","clone_url":"https://github.com/malini/marionette-socket-host.git","svn_url":"https://github.com/malini/marionette-socket-host","homepage":null,"size":123,"stargazers_count":0,"watchers_count":0,"language":null,"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":"mozilla-b2g:master","ref":"master","sha":"56b07b20387965bd4434f9a43bc3df4f24388e51","user":{"login":"mozilla-b2g","id":1261292,"avatar_url":"https://avatars.githubusercontent.com/u/1261292?v=2","gravatar_id":"","url":"https://api.github.com/users/mozilla-b2g","html_url":"https://github.com/mozilla-b2g","followers_url":"https://api.github.com/users/mozilla-b2g/followers","following_url":"https://api.github.com/users/mozilla-b2g/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-b2g/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-b2g/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-b2g/subscriptions","organizations_url":"https://api.github.com/users/mozilla-b2g/orgs","repos_url":"https://api.github.com/users/mozilla-b2g/repos","events_url":"https://api.github.com/users/mozilla-b2g/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-b2g/received_events","type":"Organization","site_admin":false},"repo":{"id":21581870,"name":"marionette-socket-host","full_name":"mozilla-b2g/marionette-socket-host","owner":{"login":"mozilla-b2g","id":1261292,"avatar_url":"https://avatars.githubusercontent.com/u/1261292?v=2","gravatar_id":"","url":"https://api.github.com/users/mozilla-b2g","html_url":"https://github.com/mozilla-b2g","followers_url":"https://api.github.com/users/mozilla-b2g/followers","following_url":"https://api.github.com/users/mozilla-b2g/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-b2g/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-b2g/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-b2g/subscriptions","organizations_url":"https://api.github.com/users/mozilla-b2g/orgs","repos_url":"https://api.github.com/users/mozilla-b2g/repos","events_url":"https://api.github.com/users/mozilla-b2g/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-b2g/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla-b2g/marionette-socket-host","description":"Host for marionette-js-runner","fork":false,"url":"https://api.github.com/repos/mozilla-b2g/marionette-socket-host","forks_url":"https://api.github.com/repos/mozilla-b2g/marionette-socket-host/forks","keys_url":"https://api.github.com/repos/mozilla-b2g/marionette-socket-host/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla-b2g/marionette-socket-host/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla-b2g/marionette-socket-host/teams","hooks_url":"https://api.github.com/repos/mozilla-b2g/marionette-socket-host/hooks","issue_events_url":"https://api.github.com/repos/mozilla-b2g/marionette-socket-host/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla-b2g/marionette-socket-host/events","assignees_url":"https://api.github.com/repos/mozilla-b2g/marionette-socket-host/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla-b2g/marionette-socket-host/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla-b2g/marionette-socket-host/tags","blobs_url":"https://api.github.com/repos/mozilla-b2g/marionette-socket-host/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla-b2g/marionette-socket-host/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla-b2g/marionette-socket-host/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla-b2g/marionette-socket-host/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla-b2g/marionette-socket-host/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla-b2g/marionette-socket-host/languages","stargazers_url":"https://api.github.com/repos/mozilla-b2g/marionette-socket-host/stargazers","contributors_url":"https://api.github.com/repos/mozilla-b2g/marionette-socket-host/contributors","subscribers_url":"https://api.github.com/repos/mozilla-b2g/marionette-socket-host/subscribers","subscription_url":"https://api.github.com/repos/mozilla-b2g/marionette-socket-host/subscription","commits_url":"https://api.github.com/repos/mozilla-b2g/marionette-socket-host/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla-b2g/marionette-socket-host/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla-b2g/marionette-socket-host/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla-b2g/marionette-socket-host/issues/comments/{number}","contents_url":"https://api.github.com/repos/mozilla-b2g/marionette-socket-host/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla-b2g/marionette-socket-host/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla-b2g/marionette-socket-host/merges","archive_url":"https://api.github.com/repos/mozilla-b2g/marionette-socket-host/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla-b2g/marionette-socket-host/downloads","issues_url":"https://api.github.com/repos/mozilla-b2g/marionette-socket-host/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla-b2g/marionette-socket-host/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla-b2g/marionette-socket-host/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla-b2g/marionette-socket-host/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla-b2g/marionette-socket-host/labels{/name}","releases_url":"https://api.github.com/repos/mozilla-b2g/marionette-socket-host/releases{/id}","created_at":"2014-07-07T18:27:04Z","updated_at":"2014-07-14T16:05:43Z","pushed_at":"2014-10-21T05:56:53Z","git_url":"git://github.com/mozilla-b2g/marionette-socket-host.git","ssh_url":"git@github.com:mozilla-b2g/marionette-socket-host.git","clone_url":"https://github.com/mozilla-b2g/marionette-socket-host.git","svn_url":"https://github.com/mozilla-b2g/marionette-socket-host","homepage":null,"size":315,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla-b2g/marionette-socket-host/pulls/2"},"html":{"href":"https://github.com/mozilla-b2g/marionette-socket-host/pull/2"},"issue":{"href":"https://api.github.com/repos/mozilla-b2g/marionette-socket-host/issues/2"},"comments":{"href":"https://api.github.com/repos/mozilla-b2g/marionette-socket-host/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla-b2g/marionette-socket-host/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla-b2g/marionette-socket-host/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/mozilla-b2g/marionette-socket-host/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla-b2g/marionette-socket-host/statuses/ab68eb3756c9ff684f1ec99b30d4e922205bd13d"}}}}