{"action":"created","comment":{"url":"https://api.github.com/repos/manheim/pack_rb/pulls/comments/55699443","id":55699443,"diff_hunk":"@@ -10,16 +10,63 @@ class SubCommands\n     include PackRb::SubCommands::Inspect\n     include PackRb::SubCommands::Validate\n \n+    # Execute a Packer command via {#run_cmd_stream_output}\n+    #\n+    # @param opts [Hash] options passed to the Packer class\n+    #\n+    # @return [Array] - stdout [String], stderr [String], exit code [Fixnum]\n     def execute(opts)\n       cmd = opts[:cmd]\n       tpl = opts[:tpl]\n \n-      out, err, status = Open3.capture3(\"#{cmd} -\", stdin_data: tpl)\n+      out, err, status = run_cmd_stream_output(\"#{cmd} -\", tpl)","path":"lib/pack_rb/sub_commands.rb","position":14,"original_position":14,"commit_id":"60043a8c38305061774d03bd86a673482868b6cd","original_commit_id":"60043a8c38305061774d03bd86a673482868b6cd","user":{"login":"jniesen","id":853921,"avatar_url":"https://avatars.githubusercontent.com/u/853921?v=3","gravatar_id":"","url":"https://api.github.com/users/jniesen","html_url":"https://github.com/jniesen","followers_url":"https://api.github.com/users/jniesen/followers","following_url":"https://api.github.com/users/jniesen/following{/other_user}","gists_url":"https://api.github.com/users/jniesen/gists{/gist_id}","starred_url":"https://api.github.com/users/jniesen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jniesen/subscriptions","organizations_url":"https://api.github.com/users/jniesen/orgs","repos_url":"https://api.github.com/users/jniesen/repos","events_url":"https://api.github.com/users/jniesen/events{/privacy}","received_events_url":"https://api.github.com/users/jniesen/received_events","type":"User","site_admin":false},"body":"This seems redundant. I'd go with the Ruby convention that RuboCop enforces on this one.","created_at":"2016-03-10T15:49:48Z","updated_at":"2016-03-10T15:49:48Z","html_url":"https://github.com/manheim/pack_rb/pull/6#discussion_r55699443","pull_request_url":"https://api.github.com/repos/manheim/pack_rb/pulls/6","_links":{"self":{"href":"https://api.github.com/repos/manheim/pack_rb/pulls/comments/55699443"},"html":{"href":"https://github.com/manheim/pack_rb/pull/6#discussion_r55699443"},"pull_request":{"href":"https://api.github.com/repos/manheim/pack_rb/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/manheim/pack_rb/pulls/6","id":62407287,"html_url":"https://github.com/manheim/pack_rb/pull/6","diff_url":"https://github.com/manheim/pack_rb/pull/6.diff","patch_url":"https://github.com/manheim/pack_rb/pull/6.patch","issue_url":"https://api.github.com/repos/manheim/pack_rb/issues/6","number":6,"state":"open","locked":false,"title":"fixes #2 and #3 - stream command output as it runs, and return stdout, stderr and exit code","user":{"login":"jantman","id":273454,"avatar_url":"https://avatars.githubusercontent.com/u/273454?v=3","gravatar_id":"","url":"https://api.github.com/users/jantman","html_url":"https://github.com/jantman","followers_url":"https://api.github.com/users/jantman/followers","following_url":"https://api.github.com/users/jantman/following{/other_user}","gists_url":"https://api.github.com/users/jantman/gists{/gist_id}","starred_url":"https://api.github.com/users/jantman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jantman/subscriptions","organizations_url":"https://api.github.com/users/jantman/orgs","repos_url":"https://api.github.com/users/jantman/repos","events_url":"https://api.github.com/users/jantman/events{/privacy}","received_events_url":"https://api.github.com/users/jantman/received_events","type":"User","site_admin":false},"body":"This uses some code I wrote for an internal gem and very slightly modified. When executing commands, it will now stream the output as well as return an Array of [STDOUT, STDERR, exit_status].\r\n\r\nI've tried this branch from a project's Rakefile that I'm working on, and these changes seem to function as intended.","created_at":"2016-03-10T15:34:45Z","updated_at":"2016-03-10T15:49:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a0263fc8856ee3dbc2f255d884e24ac39c62fdb3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/manheim/pack_rb/pulls/6/commits","review_comments_url":"https://api.github.com/repos/manheim/pack_rb/pulls/6/comments","review_comment_url":"https://api.github.com/repos/manheim/pack_rb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/manheim/pack_rb/issues/6/comments","statuses_url":"https://api.github.com/repos/manheim/pack_rb/statuses/60043a8c38305061774d03bd86a673482868b6cd","head":{"label":"jantman:issues/2","ref":"issues/2","sha":"60043a8c38305061774d03bd86a673482868b6cd","user":{"login":"jantman","id":273454,"avatar_url":"https://avatars.githubusercontent.com/u/273454?v=3","gravatar_id":"","url":"https://api.github.com/users/jantman","html_url":"https://github.com/jantman","followers_url":"https://api.github.com/users/jantman/followers","following_url":"https://api.github.com/users/jantman/following{/other_user}","gists_url":"https://api.github.com/users/jantman/gists{/gist_id}","starred_url":"https://api.github.com/users/jantman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jantman/subscriptions","organizations_url":"https://api.github.com/users/jantman/orgs","repos_url":"https://api.github.com/users/jantman/repos","events_url":"https://api.github.com/users/jantman/events{/privacy}","received_events_url":"https://api.github.com/users/jantman/received_events","type":"User","site_admin":false},"repo":{"id":53525051,"name":"pack_rb","full_name":"jantman/pack_rb","owner":{"login":"jantman","id":273454,"avatar_url":"https://avatars.githubusercontent.com/u/273454?v=3","gravatar_id":"","url":"https://api.github.com/users/jantman","html_url":"https://github.com/jantman","followers_url":"https://api.github.com/users/jantman/followers","following_url":"https://api.github.com/users/jantman/following{/other_user}","gists_url":"https://api.github.com/users/jantman/gists{/gist_id}","starred_url":"https://api.github.com/users/jantman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jantman/subscriptions","organizations_url":"https://api.github.com/users/jantman/orgs","repos_url":"https://api.github.com/users/jantman/repos","events_url":"https://api.github.com/users/jantman/events{/privacy}","received_events_url":"https://api.github.com/users/jantman/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jantman/pack_rb","description":"A gem for driving the Packer command line tool from within your Ruby project.","fork":true,"url":"https://api.github.com/repos/jantman/pack_rb","forks_url":"https://api.github.com/repos/jantman/pack_rb/forks","keys_url":"https://api.github.com/repos/jantman/pack_rb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jantman/pack_rb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jantman/pack_rb/teams","hooks_url":"https://api.github.com/repos/jantman/pack_rb/hooks","issue_events_url":"https://api.github.com/repos/jantman/pack_rb/issues/events{/number}","events_url":"https://api.github.com/repos/jantman/pack_rb/events","assignees_url":"https://api.github.com/repos/jantman/pack_rb/assignees{/user}","branches_url":"https://api.github.com/repos/jantman/pack_rb/branches{/branch}","tags_url":"https://api.github.com/repos/jantman/pack_rb/tags","blobs_url":"https://api.github.com/repos/jantman/pack_rb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jantman/pack_rb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jantman/pack_rb/git/refs{/sha}","trees_url":"https://api.github.com/repos/jantman/pack_rb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jantman/pack_rb/statuses/{sha}","languages_url":"https://api.github.com/repos/jantman/pack_rb/languages","stargazers_url":"https://api.github.com/repos/jantman/pack_rb/stargazers","contributors_url":"https://api.github.com/repos/jantman/pack_rb/contributors","subscribers_url":"https://api.github.com/repos/jantman/pack_rb/subscribers","subscription_url":"https://api.github.com/repos/jantman/pack_rb/subscription","commits_url":"https://api.github.com/repos/jantman/pack_rb/commits{/sha}","git_commits_url":"https://api.github.com/repos/jantman/pack_rb/git/commits{/sha}","comments_url":"https://api.github.com/repos/jantman/pack_rb/comments{/number}","issue_comment_url":"https://api.github.com/repos/jantman/pack_rb/issues/comments{/number}","contents_url":"https://api.github.com/repos/jantman/pack_rb/contents/{+path}","compare_url":"https://api.github.com/repos/jantman/pack_rb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jantman/pack_rb/merges","archive_url":"https://api.github.com/repos/jantman/pack_rb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jantman/pack_rb/downloads","issues_url":"https://api.github.com/repos/jantman/pack_rb/issues{/number}","pulls_url":"https://api.github.com/repos/jantman/pack_rb/pulls{/number}","milestones_url":"https://api.github.com/repos/jantman/pack_rb/milestones{/number}","notifications_url":"https://api.github.com/repos/jantman/pack_rb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jantman/pack_rb/labels{/name}","releases_url":"https://api.github.com/repos/jantman/pack_rb/releases{/id}","deployments_url":"https://api.github.com/repos/jantman/pack_rb/deployments","created_at":"2016-03-09T19:20:54Z","updated_at":"2016-03-09T19:20:55Z","pushed_at":"2016-03-10T15:35:10Z","git_url":"git://github.com/jantman/pack_rb.git","ssh_url":"git@github.com:jantman/pack_rb.git","clone_url":"https://github.com/jantman/pack_rb.git","svn_url":"https://github.com/jantman/pack_rb","homepage":"","size":33,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":"manheim:master","ref":"master","sha":"d07a18c0edeb685c45e82c6baf11f78a827fc315","user":{"login":"manheim","id":884486,"avatar_url":"https://avatars.githubusercontent.com/u/884486?v=3","gravatar_id":"","url":"https://api.github.com/users/manheim","html_url":"https://github.com/manheim","followers_url":"https://api.github.com/users/manheim/followers","following_url":"https://api.github.com/users/manheim/following{/other_user}","gists_url":"https://api.github.com/users/manheim/gists{/gist_id}","starred_url":"https://api.github.com/users/manheim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manheim/subscriptions","organizations_url":"https://api.github.com/users/manheim/orgs","repos_url":"https://api.github.com/users/manheim/repos","events_url":"https://api.github.com/users/manheim/events{/privacy}","received_events_url":"https://api.github.com/users/manheim/received_events","type":"Organization","site_admin":false},"repo":{"id":53421892,"name":"pack_rb","full_name":"manheim/pack_rb","owner":{"login":"manheim","id":884486,"avatar_url":"https://avatars.githubusercontent.com/u/884486?v=3","gravatar_id":"","url":"https://api.github.com/users/manheim","html_url":"https://github.com/manheim","followers_url":"https://api.github.com/users/manheim/followers","following_url":"https://api.github.com/users/manheim/following{/other_user}","gists_url":"https://api.github.com/users/manheim/gists{/gist_id}","starred_url":"https://api.github.com/users/manheim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manheim/subscriptions","organizations_url":"https://api.github.com/users/manheim/orgs","repos_url":"https://api.github.com/users/manheim/repos","events_url":"https://api.github.com/users/manheim/events{/privacy}","received_events_url":"https://api.github.com/users/manheim/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/manheim/pack_rb","description":"A gem for driving the Packer command line tool from within your Ruby project.","fork":false,"url":"https://api.github.com/repos/manheim/pack_rb","forks_url":"https://api.github.com/repos/manheim/pack_rb/forks","keys_url":"https://api.github.com/repos/manheim/pack_rb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/manheim/pack_rb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/manheim/pack_rb/teams","hooks_url":"https://api.github.com/repos/manheim/pack_rb/hooks","issue_events_url":"https://api.github.com/repos/manheim/pack_rb/issues/events{/number}","events_url":"https://api.github.com/repos/manheim/pack_rb/events","assignees_url":"https://api.github.com/repos/manheim/pack_rb/assignees{/user}","branches_url":"https://api.github.com/repos/manheim/pack_rb/branches{/branch}","tags_url":"https://api.github.com/repos/manheim/pack_rb/tags","blobs_url":"https://api.github.com/repos/manheim/pack_rb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/manheim/pack_rb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/manheim/pack_rb/git/refs{/sha}","trees_url":"https://api.github.com/repos/manheim/pack_rb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/manheim/pack_rb/statuses/{sha}","languages_url":"https://api.github.com/repos/manheim/pack_rb/languages","stargazers_url":"https://api.github.com/repos/manheim/pack_rb/stargazers","contributors_url":"https://api.github.com/repos/manheim/pack_rb/contributors","subscribers_url":"https://api.github.com/repos/manheim/pack_rb/subscribers","subscription_url":"https://api.github.com/repos/manheim/pack_rb/subscription","commits_url":"https://api.github.com/repos/manheim/pack_rb/commits{/sha}","git_commits_url":"https://api.github.com/repos/manheim/pack_rb/git/commits{/sha}","comments_url":"https://api.github.com/repos/manheim/pack_rb/comments{/number}","issue_comment_url":"https://api.github.com/repos/manheim/pack_rb/issues/comments{/number}","contents_url":"https://api.github.com/repos/manheim/pack_rb/contents/{+path}","compare_url":"https://api.github.com/repos/manheim/pack_rb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/manheim/pack_rb/merges","archive_url":"https://api.github.com/repos/manheim/pack_rb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/manheim/pack_rb/downloads","issues_url":"https://api.github.com/repos/manheim/pack_rb/issues{/number}","pulls_url":"https://api.github.com/repos/manheim/pack_rb/pulls{/number}","milestones_url":"https://api.github.com/repos/manheim/pack_rb/milestones{/number}","notifications_url":"https://api.github.com/repos/manheim/pack_rb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/manheim/pack_rb/labels{/name}","releases_url":"https://api.github.com/repos/manheim/pack_rb/releases{/id}","deployments_url":"https://api.github.com/repos/manheim/pack_rb/deployments","created_at":"2016-03-08T15:13:10Z","updated_at":"2016-03-08T16:50:56Z","pushed_at":"2016-03-10T15:35:11Z","git_url":"git://github.com/manheim/pack_rb.git","ssh_url":"git@github.com:manheim/pack_rb.git","clone_url":"https://github.com/manheim/pack_rb.git","svn_url":"https://github.com/manheim/pack_rb","homepage":"","size":31,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":3,"forks":1,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/manheim/pack_rb/pulls/6"},"html":{"href":"https://github.com/manheim/pack_rb/pull/6"},"issue":{"href":"https://api.github.com/repos/manheim/pack_rb/issues/6"},"comments":{"href":"https://api.github.com/repos/manheim/pack_rb/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/manheim/pack_rb/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/manheim/pack_rb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/manheim/pack_rb/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/manheim/pack_rb/statuses/60043a8c38305061774d03bd86a673482868b6cd"}}}}