{"action":"created","comment":{"url":"https://api.github.com/repos/electronjs/windows-installer/pulls/comments/53091390","id":53091390,"diff_hunk":"@@ -0,0 +1,47 @@\n+const spawnOg = require('child_process').spawn;\n+\n+const d = require('debug')('electron-windows-installer:spawn');\n+\n+// Public: Maps a process's output into an {Observable}\n+//\n+// exe - The program to execute\n+// params - Arguments passed to the process\n+// opts - Options that will be passed to child_process.spawn\n+//\n+// Returns an {Observable} with a single value, that is the output of the\n+// spawned process\n+export default function spawn(exe, params, opts=null) {\n+  return new Promise((resolve, reject) => {\n+    let proc = null;\n+\n+    d(`Spawning ${exe} ${params.join(' ')}`);\n+    if (!opts) {\n+      proc = spawnOg(exe, params);\n+    } else {\n+      proc = spawnOg(exe, params, opts);\n+    }\n+\n+    let stdout = '';\n+    let bufHandler = (b) => {\n+      let chunk = b.toString();\n+      stdout += chunk;\n+    };\n+\n+    proc.stdout.on('data', bufHandler);\n+    proc.stderr.on('data', bufHandler);\n+    proc.on('error', (e) => reject(e));\n+\n+    proc.on('close', (code) => {\n+      // NB: Close fires before stdout fully flushes (i.e. you'll get 'data' ","path":"src/spawn-promise.js","position":35,"original_position":35,"commit_id":"d76b8c1def674a483a4179dc5e557933ef26ce99","original_commit_id":"d76b8c1def674a483a4179dc5e557933ef26ce99","user":{"login":"paulcbetts","id":1396,"avatar_url":"https://avatars.githubusercontent.com/u/1396?v=3","gravatar_id":"","url":"https://api.github.com/users/paulcbetts","html_url":"https://github.com/paulcbetts","followers_url":"https://api.github.com/users/paulcbetts/followers","following_url":"https://api.github.com/users/paulcbetts/following{/other_user}","gists_url":"https://api.github.com/users/paulcbetts/gists{/gist_id}","starred_url":"https://api.github.com/users/paulcbetts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulcbetts/subscriptions","organizations_url":"https://api.github.com/users/paulcbetts/orgs","repos_url":"https://api.github.com/users/paulcbetts/repos","events_url":"https://api.github.com/users/paulcbetts/events{/privacy}","received_events_url":"https://api.github.com/users/paulcbetts/received_events","type":"User","site_admin":false},"body":"Ooh, yes I can","created_at":"2016-02-16T22:35:39Z","updated_at":"2016-02-16T22:35:39Z","html_url":"https://github.com/electronjs/windows-installer/pull/2#discussion_r53091390","pull_request_url":"https://api.github.com/repos/electronjs/windows-installer/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/electronjs/windows-installer/pulls/comments/53091390"},"html":{"href":"https://github.com/electronjs/windows-installer/pull/2#discussion_r53091390"},"pull_request":{"href":"https://api.github.com/repos/electronjs/windows-installer/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/electronjs/windows-installer/pulls/2","id":57899284,"html_url":"https://github.com/electronjs/windows-installer/pull/2","diff_url":"https://github.com/electronjs/windows-installer/pull/2.diff","patch_url":"https://github.com/electronjs/windows-installer/pull/2.patch","issue_url":"https://api.github.com/repos/electronjs/windows-installer/issues/2","number":2,"state":"open","locked":false,"title":"Rewrite in ES6","user":{"login":"paulcbetts","id":1396,"avatar_url":"https://avatars.githubusercontent.com/u/1396?v=3","gravatar_id":"","url":"https://api.github.com/users/paulcbetts","html_url":"https://github.com/paulcbetts","followers_url":"https://api.github.com/users/paulcbetts/followers","following_url":"https://api.github.com/users/paulcbetts/following{/other_user}","gists_url":"https://api.github.com/users/paulcbetts/gists{/gist_id}","starred_url":"https://api.github.com/users/paulcbetts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulcbetts/subscriptions","organizations_url":"https://api.github.com/users/paulcbetts/orgs","repos_url":"https://api.github.com/users/paulcbetts/repos","events_url":"https://api.github.com/users/paulcbetts/events{/privacy}","received_events_url":"https://api.github.com/users/paulcbetts/received_events","type":"User","site_admin":false},"body":"This PR cleans up this project into a proper ES6 package\r\n\r\n## TODO:\r\n\r\n- [x] Port the source code over\r\n- [x] Port the tests over\r\n- [x] Verify on Windows\r\n- [x] Verify on OS X\r\n- [ ] Fix up the README","created_at":"2016-02-01T21:02:09Z","updated_at":"2016-02-16T22:35:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"33c5862a94911d619e59c83fe43e749f65648619","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/electronjs/windows-installer/pulls/2/commits","review_comments_url":"https://api.github.com/repos/electronjs/windows-installer/pulls/2/comments","review_comment_url":"https://api.github.com/repos/electronjs/windows-installer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/electronjs/windows-installer/issues/2/comments","statuses_url":"https://api.github.com/repos/electronjs/windows-installer/statuses/d76b8c1def674a483a4179dc5e557933ef26ce99","head":{"label":"electronjs:javascript-tiem","ref":"javascript-tiem","sha":"d76b8c1def674a483a4179dc5e557933ef26ce99","user":{"login":"electronjs","id":13409222,"avatar_url":"https://avatars.githubusercontent.com/u/13409222?v=3","gravatar_id":"","url":"https://api.github.com/users/electronjs","html_url":"https://github.com/electronjs","followers_url":"https://api.github.com/users/electronjs/followers","following_url":"https://api.github.com/users/electronjs/following{/other_user}","gists_url":"https://api.github.com/users/electronjs/gists{/gist_id}","starred_url":"https://api.github.com/users/electronjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/electronjs/subscriptions","organizations_url":"https://api.github.com/users/electronjs/orgs","repos_url":"https://api.github.com/users/electronjs/repos","events_url":"https://api.github.com/users/electronjs/events{/privacy}","received_events_url":"https://api.github.com/users/electronjs/received_events","type":"Organization","site_admin":false},"repo":{"id":49976795,"name":"windows-installer","full_name":"electronjs/windows-installer","owner":{"login":"electronjs","id":13409222,"avatar_url":"https://avatars.githubusercontent.com/u/13409222?v=3","gravatar_id":"","url":"https://api.github.com/users/electronjs","html_url":"https://github.com/electronjs","followers_url":"https://api.github.com/users/electronjs/followers","following_url":"https://api.github.com/users/electronjs/following{/other_user}","gists_url":"https://api.github.com/users/electronjs/gists{/gist_id}","starred_url":"https://api.github.com/users/electronjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/electronjs/subscriptions","organizations_url":"https://api.github.com/users/electronjs/orgs","repos_url":"https://api.github.com/users/electronjs/repos","events_url":"https://api.github.com/users/electronjs/events{/privacy}","received_events_url":"https://api.github.com/users/electronjs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/electronjs/windows-installer","description":"Build Windows Installers for Electron apps","fork":false,"url":"https://api.github.com/repos/electronjs/windows-installer","forks_url":"https://api.github.com/repos/electronjs/windows-installer/forks","keys_url":"https://api.github.com/repos/electronjs/windows-installer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/electronjs/windows-installer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/electronjs/windows-installer/teams","hooks_url":"https://api.github.com/repos/electronjs/windows-installer/hooks","issue_events_url":"https://api.github.com/repos/electronjs/windows-installer/issues/events{/number}","events_url":"https://api.github.com/repos/electronjs/windows-installer/events","assignees_url":"https://api.github.com/repos/electronjs/windows-installer/assignees{/user}","branches_url":"https://api.github.com/repos/electronjs/windows-installer/branches{/branch}","tags_url":"https://api.github.com/repos/electronjs/windows-installer/tags","blobs_url":"https://api.github.com/repos/electronjs/windows-installer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/electronjs/windows-installer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/electronjs/windows-installer/git/refs{/sha}","trees_url":"https://api.github.com/repos/electronjs/windows-installer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/electronjs/windows-installer/statuses/{sha}","languages_url":"https://api.github.com/repos/electronjs/windows-installer/languages","stargazers_url":"https://api.github.com/repos/electronjs/windows-installer/stargazers","contributors_url":"https://api.github.com/repos/electronjs/windows-installer/contributors","subscribers_url":"https://api.github.com/repos/electronjs/windows-installer/subscribers","subscription_url":"https://api.github.com/repos/electronjs/windows-installer/subscription","commits_url":"https://api.github.com/repos/electronjs/windows-installer/commits{/sha}","git_commits_url":"https://api.github.com/repos/electronjs/windows-installer/git/commits{/sha}","comments_url":"https://api.github.com/repos/electronjs/windows-installer/comments{/number}","issue_comment_url":"https://api.github.com/repos/electronjs/windows-installer/issues/comments{/number}","contents_url":"https://api.github.com/repos/electronjs/windows-installer/contents/{+path}","compare_url":"https://api.github.com/repos/electronjs/windows-installer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/electronjs/windows-installer/merges","archive_url":"https://api.github.com/repos/electronjs/windows-installer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/electronjs/windows-installer/downloads","issues_url":"https://api.github.com/repos/electronjs/windows-installer/issues{/number}","pulls_url":"https://api.github.com/repos/electronjs/windows-installer/pulls{/number}","milestones_url":"https://api.github.com/repos/electronjs/windows-installer/milestones{/number}","notifications_url":"https://api.github.com/repos/electronjs/windows-installer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/electronjs/windows-installer/labels{/name}","releases_url":"https://api.github.com/repos/electronjs/windows-installer/releases{/id}","deployments_url":"https://api.github.com/repos/electronjs/windows-installer/deployments","created_at":"2016-01-19T19:19:46Z","updated_at":"2016-02-16T15:10:42Z","pushed_at":"2016-02-11T23:43:33Z","git_url":"git://github.com/electronjs/windows-installer.git","ssh_url":"git@github.com:electronjs/windows-installer.git","clone_url":"https://github.com/electronjs/windows-installer.git","svn_url":"https://github.com/electronjs/windows-installer","homepage":null,"size":24371,"stargazers_count":15,"watchers_count":15,"language":"CoffeeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":2,"forks":4,"open_issues":2,"watchers":15,"default_branch":"master"}},"base":{"label":"electronjs:master","ref":"master","sha":"4f997014ca03ee31a3b42dbd86214feaddaea36b","user":{"login":"electronjs","id":13409222,"avatar_url":"https://avatars.githubusercontent.com/u/13409222?v=3","gravatar_id":"","url":"https://api.github.com/users/electronjs","html_url":"https://github.com/electronjs","followers_url":"https://api.github.com/users/electronjs/followers","following_url":"https://api.github.com/users/electronjs/following{/other_user}","gists_url":"https://api.github.com/users/electronjs/gists{/gist_id}","starred_url":"https://api.github.com/users/electronjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/electronjs/subscriptions","organizations_url":"https://api.github.com/users/electronjs/orgs","repos_url":"https://api.github.com/users/electronjs/repos","events_url":"https://api.github.com/users/electronjs/events{/privacy}","received_events_url":"https://api.github.com/users/electronjs/received_events","type":"Organization","site_admin":false},"repo":{"id":49976795,"name":"windows-installer","full_name":"electronjs/windows-installer","owner":{"login":"electronjs","id":13409222,"avatar_url":"https://avatars.githubusercontent.com/u/13409222?v=3","gravatar_id":"","url":"https://api.github.com/users/electronjs","html_url":"https://github.com/electronjs","followers_url":"https://api.github.com/users/electronjs/followers","following_url":"https://api.github.com/users/electronjs/following{/other_user}","gists_url":"https://api.github.com/users/electronjs/gists{/gist_id}","starred_url":"https://api.github.com/users/electronjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/electronjs/subscriptions","organizations_url":"https://api.github.com/users/electronjs/orgs","repos_url":"https://api.github.com/users/electronjs/repos","events_url":"https://api.github.com/users/electronjs/events{/privacy}","received_events_url":"https://api.github.com/users/electronjs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/electronjs/windows-installer","description":"Build Windows Installers for Electron apps","fork":false,"url":"https://api.github.com/repos/electronjs/windows-installer","forks_url":"https://api.github.com/repos/electronjs/windows-installer/forks","keys_url":"https://api.github.com/repos/electronjs/windows-installer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/electronjs/windows-installer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/electronjs/windows-installer/teams","hooks_url":"https://api.github.com/repos/electronjs/windows-installer/hooks","issue_events_url":"https://api.github.com/repos/electronjs/windows-installer/issues/events{/number}","events_url":"https://api.github.com/repos/electronjs/windows-installer/events","assignees_url":"https://api.github.com/repos/electronjs/windows-installer/assignees{/user}","branches_url":"https://api.github.com/repos/electronjs/windows-installer/branches{/branch}","tags_url":"https://api.github.com/repos/electronjs/windows-installer/tags","blobs_url":"https://api.github.com/repos/electronjs/windows-installer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/electronjs/windows-installer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/electronjs/windows-installer/git/refs{/sha}","trees_url":"https://api.github.com/repos/electronjs/windows-installer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/electronjs/windows-installer/statuses/{sha}","languages_url":"https://api.github.com/repos/electronjs/windows-installer/languages","stargazers_url":"https://api.github.com/repos/electronjs/windows-installer/stargazers","contributors_url":"https://api.github.com/repos/electronjs/windows-installer/contributors","subscribers_url":"https://api.github.com/repos/electronjs/windows-installer/subscribers","subscription_url":"https://api.github.com/repos/electronjs/windows-installer/subscription","commits_url":"https://api.github.com/repos/electronjs/windows-installer/commits{/sha}","git_commits_url":"https://api.github.com/repos/electronjs/windows-installer/git/commits{/sha}","comments_url":"https://api.github.com/repos/electronjs/windows-installer/comments{/number}","issue_comment_url":"https://api.github.com/repos/electronjs/windows-installer/issues/comments{/number}","contents_url":"https://api.github.com/repos/electronjs/windows-installer/contents/{+path}","compare_url":"https://api.github.com/repos/electronjs/windows-installer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/electronjs/windows-installer/merges","archive_url":"https://api.github.com/repos/electronjs/windows-installer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/electronjs/windows-installer/downloads","issues_url":"https://api.github.com/repos/electronjs/windows-installer/issues{/number}","pulls_url":"https://api.github.com/repos/electronjs/windows-installer/pulls{/number}","milestones_url":"https://api.github.com/repos/electronjs/windows-installer/milestones{/number}","notifications_url":"https://api.github.com/repos/electronjs/windows-installer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/electronjs/windows-installer/labels{/name}","releases_url":"https://api.github.com/repos/electronjs/windows-installer/releases{/id}","deployments_url":"https://api.github.com/repos/electronjs/windows-installer/deployments","created_at":"2016-01-19T19:19:46Z","updated_at":"2016-02-16T15:10:42Z","pushed_at":"2016-02-11T23:43:33Z","git_url":"git://github.com/electronjs/windows-installer.git","ssh_url":"git@github.com:electronjs/windows-installer.git","clone_url":"https://github.com/electronjs/windows-installer.git","svn_url":"https://github.com/electronjs/windows-installer","homepage":null,"size":24371,"stargazers_count":15,"watchers_count":15,"language":"CoffeeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":2,"forks":4,"open_issues":2,"watchers":15,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/electronjs/windows-installer/pulls/2"},"html":{"href":"https://github.com/electronjs/windows-installer/pull/2"},"issue":{"href":"https://api.github.com/repos/electronjs/windows-installer/issues/2"},"comments":{"href":"https://api.github.com/repos/electronjs/windows-installer/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/electronjs/windows-installer/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/electronjs/windows-installer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/electronjs/windows-installer/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/electronjs/windows-installer/statuses/d76b8c1def674a483a4179dc5e557933ef26ce99"}}}}