{"action":"created","comment":{"url":"https://api.github.com/repos/spurious-io/js-aws-sdk-helper/pulls/comments/29550235","id":29550235,"diff_hunk":"@@ -1,13 +1,28 @@\n-const exec = require('exec-sync')\n const url = require('url')\n const Strategy = require('./strategy')\n \n+function get_ports() {\n+  //  Use execSync if it exist (Node 0.12 and later) or exec-sync\n+  const execSync = require('child_process').execSync || require('exec-sync');\n+  const ports = execSync('spurious ports --json');\n+  if (typeof ports === 'string') {\n+    return ports;\n+  }\n+\n+  const Buffer = require('buffer').Buffer;\n+  if (Buffer.isBuffer(ports)) {\n+    return ports.toString();\n+  }\n+  \n+  return \"[error] Spurious service returned an unsupported result: \" + ports;","path":"src/index.js","position":18,"original_position":18,"commit_id":"6fa49c9b695166fbed0d8300efebd82adec41d6c","original_commit_id":"6fa49c9b695166fbed0d8300efebd82adec41d6c","user":{"login":"ierceg","id":1505203,"avatar_url":"https://avatars.githubusercontent.com/u/1505203?v=3","gravatar_id":"","url":"https://api.github.com/users/ierceg","html_url":"https://github.com/ierceg","followers_url":"https://api.github.com/users/ierceg/followers","following_url":"https://api.github.com/users/ierceg/following{/other_user}","gists_url":"https://api.github.com/users/ierceg/gists{/gist_id}","starred_url":"https://api.github.com/users/ierceg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ierceg/subscriptions","organizations_url":"https://api.github.com/users/ierceg/orgs","repos_url":"https://api.github.com/users/ierceg/repos","events_url":"https://api.github.com/users/ierceg/events{/privacy}","received_events_url":"https://api.github.com/users/ierceg/received_events","type":"User","site_admin":false},"body":"@JakeChampion I would actually prefer that but I tried to make it work as closely as they way it was before. I'll throw an error here and update the PR.","created_at":"2015-05-02T20:00:14Z","updated_at":"2015-05-02T20:00:14Z","html_url":"https://github.com/spurious-io/js-aws-sdk-helper/pull/3#discussion_r29550235","pull_request_url":"https://api.github.com/repos/spurious-io/js-aws-sdk-helper/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/spurious-io/js-aws-sdk-helper/pulls/comments/29550235"},"html":{"href":"https://github.com/spurious-io/js-aws-sdk-helper/pull/3#discussion_r29550235"},"pull_request":{"href":"https://api.github.com/repos/spurious-io/js-aws-sdk-helper/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/spurious-io/js-aws-sdk-helper/pulls/3","id":34513568,"html_url":"https://github.com/spurious-io/js-aws-sdk-helper/pull/3","diff_url":"https://github.com/spurious-io/js-aws-sdk-helper/pull/3.diff","patch_url":"https://github.com/spurious-io/js-aws-sdk-helper/pull/3.patch","issue_url":"https://api.github.com/repos/spurious-io/js-aws-sdk-helper/issues/3","number":3,"state":"open","locked":false,"title":"Added compatibility with Node 0.12","user":{"login":"ierceg","id":1505203,"avatar_url":"https://avatars.githubusercontent.com/u/1505203?v=3","gravatar_id":"","url":"https://api.github.com/users/ierceg","html_url":"https://github.com/ierceg","followers_url":"https://api.github.com/users/ierceg/followers","following_url":"https://api.github.com/users/ierceg/following{/other_user}","gists_url":"https://api.github.com/users/ierceg/gists{/gist_id}","starred_url":"https://api.github.com/users/ierceg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ierceg/subscriptions","organizations_url":"https://api.github.com/users/ierceg/orgs","repos_url":"https://api.github.com/users/ierceg/repos","events_url":"https://api.github.com/users/ierceg/events{/privacy}","received_events_url":"https://api.github.com/users/ierceg/received_events","type":"User","site_admin":false},"body":"Now compatible with 0.12 by using built-in execSync or, for previous versions, using exec-sync as before","created_at":"2015-05-01T00:27:53Z","updated_at":"2015-05-02T20:00:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dd60b732e478af7abb4de442a6277c4301d4c621","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/spurious-io/js-aws-sdk-helper/pulls/3/commits","review_comments_url":"https://api.github.com/repos/spurious-io/js-aws-sdk-helper/pulls/3/comments","review_comment_url":"https://api.github.com/repos/spurious-io/js-aws-sdk-helper/pulls/comments{/number}","comments_url":"https://api.github.com/repos/spurious-io/js-aws-sdk-helper/issues/3/comments","statuses_url":"https://api.github.com/repos/spurious-io/js-aws-sdk-helper/statuses/6fa49c9b695166fbed0d8300efebd82adec41d6c","head":{"label":"ierceg:node-0_12-compatibility","ref":"node-0_12-compatibility","sha":"6fa49c9b695166fbed0d8300efebd82adec41d6c","user":{"login":"ierceg","id":1505203,"avatar_url":"https://avatars.githubusercontent.com/u/1505203?v=3","gravatar_id":"","url":"https://api.github.com/users/ierceg","html_url":"https://github.com/ierceg","followers_url":"https://api.github.com/users/ierceg/followers","following_url":"https://api.github.com/users/ierceg/following{/other_user}","gists_url":"https://api.github.com/users/ierceg/gists{/gist_id}","starred_url":"https://api.github.com/users/ierceg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ierceg/subscriptions","organizations_url":"https://api.github.com/users/ierceg/orgs","repos_url":"https://api.github.com/users/ierceg/repos","events_url":"https://api.github.com/users/ierceg/events{/privacy}","received_events_url":"https://api.github.com/users/ierceg/received_events","type":"User","site_admin":false},"repo":{"id":34881039,"name":"js-aws-sdk-helper","full_name":"ierceg/js-aws-sdk-helper","owner":{"login":"ierceg","id":1505203,"avatar_url":"https://avatars.githubusercontent.com/u/1505203?v=3","gravatar_id":"","url":"https://api.github.com/users/ierceg","html_url":"https://github.com/ierceg","followers_url":"https://api.github.com/users/ierceg/followers","following_url":"https://api.github.com/users/ierceg/following{/other_user}","gists_url":"https://api.github.com/users/ierceg/gists{/gist_id}","starred_url":"https://api.github.com/users/ierceg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ierceg/subscriptions","organizations_url":"https://api.github.com/users/ierceg/orgs","repos_url":"https://api.github.com/users/ierceg/repos","events_url":"https://api.github.com/users/ierceg/events{/privacy}","received_events_url":"https://api.github.com/users/ierceg/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ierceg/js-aws-sdk-helper","description":"","fork":true,"url":"https://api.github.com/repos/ierceg/js-aws-sdk-helper","forks_url":"https://api.github.com/repos/ierceg/js-aws-sdk-helper/forks","keys_url":"https://api.github.com/repos/ierceg/js-aws-sdk-helper/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ierceg/js-aws-sdk-helper/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ierceg/js-aws-sdk-helper/teams","hooks_url":"https://api.github.com/repos/ierceg/js-aws-sdk-helper/hooks","issue_events_url":"https://api.github.com/repos/ierceg/js-aws-sdk-helper/issues/events{/number}","events_url":"https://api.github.com/repos/ierceg/js-aws-sdk-helper/events","assignees_url":"https://api.github.com/repos/ierceg/js-aws-sdk-helper/assignees{/user}","branches_url":"https://api.github.com/repos/ierceg/js-aws-sdk-helper/branches{/branch}","tags_url":"https://api.github.com/repos/ierceg/js-aws-sdk-helper/tags","blobs_url":"https://api.github.com/repos/ierceg/js-aws-sdk-helper/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ierceg/js-aws-sdk-helper/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ierceg/js-aws-sdk-helper/git/refs{/sha}","trees_url":"https://api.github.com/repos/ierceg/js-aws-sdk-helper/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ierceg/js-aws-sdk-helper/statuses/{sha}","languages_url":"https://api.github.com/repos/ierceg/js-aws-sdk-helper/languages","stargazers_url":"https://api.github.com/repos/ierceg/js-aws-sdk-helper/stargazers","contributors_url":"https://api.github.com/repos/ierceg/js-aws-sdk-helper/contributors","subscribers_url":"https://api.github.com/repos/ierceg/js-aws-sdk-helper/subscribers","subscription_url":"https://api.github.com/repos/ierceg/js-aws-sdk-helper/subscription","commits_url":"https://api.github.com/repos/ierceg/js-aws-sdk-helper/commits{/sha}","git_commits_url":"https://api.github.com/repos/ierceg/js-aws-sdk-helper/git/commits{/sha}","comments_url":"https://api.github.com/repos/ierceg/js-aws-sdk-helper/comments{/number}","issue_comment_url":"https://api.github.com/repos/ierceg/js-aws-sdk-helper/issues/comments{/number}","contents_url":"https://api.github.com/repos/ierceg/js-aws-sdk-helper/contents/{+path}","compare_url":"https://api.github.com/repos/ierceg/js-aws-sdk-helper/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ierceg/js-aws-sdk-helper/merges","archive_url":"https://api.github.com/repos/ierceg/js-aws-sdk-helper/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ierceg/js-aws-sdk-helper/downloads","issues_url":"https://api.github.com/repos/ierceg/js-aws-sdk-helper/issues{/number}","pulls_url":"https://api.github.com/repos/ierceg/js-aws-sdk-helper/pulls{/number}","milestones_url":"https://api.github.com/repos/ierceg/js-aws-sdk-helper/milestones{/number}","notifications_url":"https://api.github.com/repos/ierceg/js-aws-sdk-helper/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ierceg/js-aws-sdk-helper/labels{/name}","releases_url":"https://api.github.com/repos/ierceg/js-aws-sdk-helper/releases{/id}","created_at":"2015-04-30T23:04:34Z","updated_at":"2015-04-30T23:04:35Z","pushed_at":"2015-05-01T00:23:45Z","git_url":"git://github.com/ierceg/js-aws-sdk-helper.git","ssh_url":"git@github.com:ierceg/js-aws-sdk-helper.git","clone_url":"https://github.com/ierceg/js-aws-sdk-helper.git","svn_url":"https://github.com/ierceg/js-aws-sdk-helper","homepage":null,"size":90,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"spurious-io:master","ref":"master","sha":"08e1f3d1d2c69768c0fead214c68cd0aa5b5dfe0","user":{"login":"spurious-io","id":10815414,"avatar_url":"https://avatars.githubusercontent.com/u/10815414?v=3","gravatar_id":"","url":"https://api.github.com/users/spurious-io","html_url":"https://github.com/spurious-io","followers_url":"https://api.github.com/users/spurious-io/followers","following_url":"https://api.github.com/users/spurious-io/following{/other_user}","gists_url":"https://api.github.com/users/spurious-io/gists{/gist_id}","starred_url":"https://api.github.com/users/spurious-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spurious-io/subscriptions","organizations_url":"https://api.github.com/users/spurious-io/orgs","repos_url":"https://api.github.com/users/spurious-io/repos","events_url":"https://api.github.com/users/spurious-io/events{/privacy}","received_events_url":"https://api.github.com/users/spurious-io/received_events","type":"Organization","site_admin":false},"repo":{"id":30195126,"name":"js-aws-sdk-helper","full_name":"spurious-io/js-aws-sdk-helper","owner":{"login":"spurious-io","id":10815414,"avatar_url":"https://avatars.githubusercontent.com/u/10815414?v=3","gravatar_id":"","url":"https://api.github.com/users/spurious-io","html_url":"https://github.com/spurious-io","followers_url":"https://api.github.com/users/spurious-io/followers","following_url":"https://api.github.com/users/spurious-io/following{/other_user}","gists_url":"https://api.github.com/users/spurious-io/gists{/gist_id}","starred_url":"https://api.github.com/users/spurious-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spurious-io/subscriptions","organizations_url":"https://api.github.com/users/spurious-io/orgs","repos_url":"https://api.github.com/users/spurious-io/repos","events_url":"https://api.github.com/users/spurious-io/events{/privacy}","received_events_url":"https://api.github.com/users/spurious-io/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/spurious-io/js-aws-sdk-helper","description":"","fork":false,"url":"https://api.github.com/repos/spurious-io/js-aws-sdk-helper","forks_url":"https://api.github.com/repos/spurious-io/js-aws-sdk-helper/forks","keys_url":"https://api.github.com/repos/spurious-io/js-aws-sdk-helper/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spurious-io/js-aws-sdk-helper/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spurious-io/js-aws-sdk-helper/teams","hooks_url":"https://api.github.com/repos/spurious-io/js-aws-sdk-helper/hooks","issue_events_url":"https://api.github.com/repos/spurious-io/js-aws-sdk-helper/issues/events{/number}","events_url":"https://api.github.com/repos/spurious-io/js-aws-sdk-helper/events","assignees_url":"https://api.github.com/repos/spurious-io/js-aws-sdk-helper/assignees{/user}","branches_url":"https://api.github.com/repos/spurious-io/js-aws-sdk-helper/branches{/branch}","tags_url":"https://api.github.com/repos/spurious-io/js-aws-sdk-helper/tags","blobs_url":"https://api.github.com/repos/spurious-io/js-aws-sdk-helper/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spurious-io/js-aws-sdk-helper/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spurious-io/js-aws-sdk-helper/git/refs{/sha}","trees_url":"https://api.github.com/repos/spurious-io/js-aws-sdk-helper/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spurious-io/js-aws-sdk-helper/statuses/{sha}","languages_url":"https://api.github.com/repos/spurious-io/js-aws-sdk-helper/languages","stargazers_url":"https://api.github.com/repos/spurious-io/js-aws-sdk-helper/stargazers","contributors_url":"https://api.github.com/repos/spurious-io/js-aws-sdk-helper/contributors","subscribers_url":"https://api.github.com/repos/spurious-io/js-aws-sdk-helper/subscribers","subscription_url":"https://api.github.com/repos/spurious-io/js-aws-sdk-helper/subscription","commits_url":"https://api.github.com/repos/spurious-io/js-aws-sdk-helper/commits{/sha}","git_commits_url":"https://api.github.com/repos/spurious-io/js-aws-sdk-helper/git/commits{/sha}","comments_url":"https://api.github.com/repos/spurious-io/js-aws-sdk-helper/comments{/number}","issue_comment_url":"https://api.github.com/repos/spurious-io/js-aws-sdk-helper/issues/comments{/number}","contents_url":"https://api.github.com/repos/spurious-io/js-aws-sdk-helper/contents/{+path}","compare_url":"https://api.github.com/repos/spurious-io/js-aws-sdk-helper/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spurious-io/js-aws-sdk-helper/merges","archive_url":"https://api.github.com/repos/spurious-io/js-aws-sdk-helper/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spurious-io/js-aws-sdk-helper/downloads","issues_url":"https://api.github.com/repos/spurious-io/js-aws-sdk-helper/issues{/number}","pulls_url":"https://api.github.com/repos/spurious-io/js-aws-sdk-helper/pulls{/number}","milestones_url":"https://api.github.com/repos/spurious-io/js-aws-sdk-helper/milestones{/number}","notifications_url":"https://api.github.com/repos/spurious-io/js-aws-sdk-helper/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spurious-io/js-aws-sdk-helper/labels{/name}","releases_url":"https://api.github.com/repos/spurious-io/js-aws-sdk-helper/releases{/id}","created_at":"2015-02-02T16:05:11Z","updated_at":"2015-02-27T16:40:14Z","pushed_at":"2015-05-01T00:27:53Z","git_url":"git://github.com/spurious-io/js-aws-sdk-helper.git","ssh_url":"git@github.com:spurious-io/js-aws-sdk-helper.git","clone_url":"https://github.com/spurious-io/js-aws-sdk-helper.git","svn_url":"https://github.com/spurious-io/js-aws-sdk-helper","homepage":null,"size":220,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/spurious-io/js-aws-sdk-helper/pulls/3"},"html":{"href":"https://github.com/spurious-io/js-aws-sdk-helper/pull/3"},"issue":{"href":"https://api.github.com/repos/spurious-io/js-aws-sdk-helper/issues/3"},"comments":{"href":"https://api.github.com/repos/spurious-io/js-aws-sdk-helper/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/spurious-io/js-aws-sdk-helper/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/spurious-io/js-aws-sdk-helper/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/spurious-io/js-aws-sdk-helper/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/spurious-io/js-aws-sdk-helper/statuses/6fa49c9b695166fbed0d8300efebd82adec41d6c"}}}}