{"action":"created","comment":{"url":"https://api.github.com/repos/puppetlabs/bolt/pulls/comments/171854724","pull_request_review_id":100653370,"id":171854724,"diff_hunk":"@@ -0,0 +1,246 @@\n+require 'spec_helper'\n+require 'bolt_spec/errors'\n+require 'bolt_spec/files'\n+require 'bolt_spec/task'\n+require 'bolt/transport/local'\n+require 'bolt/config'\n+\n+describe Bolt::Transport::Local do\n+  include BoltSpec::Errors\n+  include BoltSpec::Files\n+  include BoltSpec::Task\n+\n+  let(:local) { Bolt::Transport::Local.new }\n+  let(:echo_script) { <<BASH }\n+for var in \"$@\"\n+do\n+    echo $var\n+done\n+BASH\n+\n+  let(:target) { Bolt::Target.new('local://localhost') }\n+\n+  def result_value(stdout = nil, stderr = nil, exit_code = 0)\n+    { 'stdout' => stdout || '',\n+      'stderr' => stderr || '',\n+      'exit_code' => exit_code }\n+  end\n+\n+  context \"when executing\", bash: true do\n+    it \"executes a command\" do\n+      expect(local.run_command(target, 'echo $USER').value['stdout'].strip).to eq(ENV['USER'])\n+    end\n+\n+    it \"captures stderr from a host\" do\n+      expect(local.run_command(target, 'ssh -V').value['stderr']).to match(/OpenSSH/)","path":"spec/bolt/transport/local_spec.rb","position":35,"original_position":35,"commit_id":"849ca78ffa85d01b6284a5dfba28426c09f9ce31","original_commit_id":"849ca78ffa85d01b6284a5dfba28426c09f9ce31","user":{"login":"mruzicka","id":562920,"avatar_url":"https://avatars0.githubusercontent.com/u/562920?v=4","gravatar_id":"","url":"https://api.github.com/users/mruzicka","html_url":"https://github.com/mruzicka","followers_url":"https://api.github.com/users/mruzicka/followers","following_url":"https://api.github.com/users/mruzicka/following{/other_user}","gists_url":"https://api.github.com/users/mruzicka/gists{/gist_id}","starred_url":"https://api.github.com/users/mruzicka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mruzicka/subscriptions","organizations_url":"https://api.github.com/users/mruzicka/orgs","repos_url":"https://api.github.com/users/mruzicka/repos","events_url":"https://api.github.com/users/mruzicka/events{/privacy}","received_events_url":"https://api.github.com/users/mruzicka/received_events","type":"User","site_admin":false},"body":"This doesn't seem very portable. What about using something like:\r\n```bash\r\n$ expr 1 / 0\r\nexpr: division by zero\r\n```\r\ninstead?","created_at":"2018-03-02T14:06:12Z","updated_at":"2018-03-02T14:52:04Z","html_url":"https://github.com/puppetlabs/bolt/pull/317#discussion_r171854724","pull_request_url":"https://api.github.com/repos/puppetlabs/bolt/pulls/317","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/bolt/pulls/comments/171854724"},"html":{"href":"https://github.com/puppetlabs/bolt/pull/317#discussion_r171854724"},"pull_request":{"href":"https://api.github.com/repos/puppetlabs/bolt/pulls/317"}}},"pull_request":{"url":"https://api.github.com/repos/puppetlabs/bolt/pulls/317","id":171448772,"html_url":"https://github.com/puppetlabs/bolt/pull/317","diff_url":"https://github.com/puppetlabs/bolt/pull/317.diff","patch_url":"https://github.com/puppetlabs/bolt/pull/317.patch","issue_url":"https://api.github.com/repos/puppetlabs/bolt/issues/317","number":317,"state":"open","locked":false,"title":"(BOLT-338) Add local transport for shell systems","user":{"login":"MikaelSmith","id":8162496,"avatar_url":"https://avatars0.githubusercontent.com/u/8162496?v=4","gravatar_id":"","url":"https://api.github.com/users/MikaelSmith","html_url":"https://github.com/MikaelSmith","followers_url":"https://api.github.com/users/MikaelSmith/followers","following_url":"https://api.github.com/users/MikaelSmith/following{/other_user}","gists_url":"https://api.github.com/users/MikaelSmith/gists{/gist_id}","starred_url":"https://api.github.com/users/MikaelSmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MikaelSmith/subscriptions","organizations_url":"https://api.github.com/users/MikaelSmith/orgs","repos_url":"https://api.github.com/users/MikaelSmith/repos","events_url":"https://api.github.com/users/MikaelSmith/events{/privacy}","received_events_url":"https://api.github.com/users/MikaelSmith/received_events","type":"User","site_admin":false},"body":"Add a local transport that should work on systems that support shell scripts. Work on Windows support will come later.","created_at":"2018-02-26T18:02:03Z","updated_at":"2018-03-02T14:52:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0b3b5d97fb16cfa0e47bd2c0924123c1aff8d8e3","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/puppetlabs/bolt/pulls/317/commits","review_comments_url":"https://api.github.com/repos/puppetlabs/bolt/pulls/317/comments","review_comment_url":"https://api.github.com/repos/puppetlabs/bolt/pulls/comments{/number}","comments_url":"https://api.github.com/repos/puppetlabs/bolt/issues/317/comments","statuses_url":"https://api.github.com/repos/puppetlabs/bolt/statuses/849ca78ffa85d01b6284a5dfba28426c09f9ce31","head":{"label":"MikaelSmith:BOLT-338","ref":"BOLT-338","sha":"849ca78ffa85d01b6284a5dfba28426c09f9ce31","user":{"login":"MikaelSmith","id":8162496,"avatar_url":"https://avatars0.githubusercontent.com/u/8162496?v=4","gravatar_id":"","url":"https://api.github.com/users/MikaelSmith","html_url":"https://github.com/MikaelSmith","followers_url":"https://api.github.com/users/MikaelSmith/followers","following_url":"https://api.github.com/users/MikaelSmith/following{/other_user}","gists_url":"https://api.github.com/users/MikaelSmith/gists{/gist_id}","starred_url":"https://api.github.com/users/MikaelSmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MikaelSmith/subscriptions","organizations_url":"https://api.github.com/users/MikaelSmith/orgs","repos_url":"https://api.github.com/users/MikaelSmith/repos","events_url":"https://api.github.com/users/MikaelSmith/events{/privacy}","received_events_url":"https://api.github.com/users/MikaelSmith/received_events","type":"User","site_admin":false},"repo":{"id":106455068,"name":"bolt","full_name":"MikaelSmith/bolt","owner":{"login":"MikaelSmith","id":8162496,"avatar_url":"https://avatars0.githubusercontent.com/u/8162496?v=4","gravatar_id":"","url":"https://api.github.com/users/MikaelSmith","html_url":"https://github.com/MikaelSmith","followers_url":"https://api.github.com/users/MikaelSmith/followers","following_url":"https://api.github.com/users/MikaelSmith/following{/other_user}","gists_url":"https://api.github.com/users/MikaelSmith/gists{/gist_id}","starred_url":"https://api.github.com/users/MikaelSmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MikaelSmith/subscriptions","organizations_url":"https://api.github.com/users/MikaelSmith/orgs","repos_url":"https://api.github.com/users/MikaelSmith/repos","events_url":"https://api.github.com/users/MikaelSmith/events{/privacy}","received_events_url":"https://api.github.com/users/MikaelSmith/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MikaelSmith/bolt","description":"Execute commands remotely over SSH and WinRM","fork":true,"url":"https://api.github.com/repos/MikaelSmith/bolt","forks_url":"https://api.github.com/repos/MikaelSmith/bolt/forks","keys_url":"https://api.github.com/repos/MikaelSmith/bolt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MikaelSmith/bolt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MikaelSmith/bolt/teams","hooks_url":"https://api.github.com/repos/MikaelSmith/bolt/hooks","issue_events_url":"https://api.github.com/repos/MikaelSmith/bolt/issues/events{/number}","events_url":"https://api.github.com/repos/MikaelSmith/bolt/events","assignees_url":"https://api.github.com/repos/MikaelSmith/bolt/assignees{/user}","branches_url":"https://api.github.com/repos/MikaelSmith/bolt/branches{/branch}","tags_url":"https://api.github.com/repos/MikaelSmith/bolt/tags","blobs_url":"https://api.github.com/repos/MikaelSmith/bolt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MikaelSmith/bolt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MikaelSmith/bolt/git/refs{/sha}","trees_url":"https://api.github.com/repos/MikaelSmith/bolt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MikaelSmith/bolt/statuses/{sha}","languages_url":"https://api.github.com/repos/MikaelSmith/bolt/languages","stargazers_url":"https://api.github.com/repos/MikaelSmith/bolt/stargazers","contributors_url":"https://api.github.com/repos/MikaelSmith/bolt/contributors","subscribers_url":"https://api.github.com/repos/MikaelSmith/bolt/subscribers","subscription_url":"https://api.github.com/repos/MikaelSmith/bolt/subscription","commits_url":"https://api.github.com/repos/MikaelSmith/bolt/commits{/sha}","git_commits_url":"https://api.github.com/repos/MikaelSmith/bolt/git/commits{/sha}","comments_url":"https://api.github.com/repos/MikaelSmith/bolt/comments{/number}","issue_comment_url":"https://api.github.com/repos/MikaelSmith/bolt/issues/comments{/number}","contents_url":"https://api.github.com/repos/MikaelSmith/bolt/contents/{+path}","compare_url":"https://api.github.com/repos/MikaelSmith/bolt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MikaelSmith/bolt/merges","archive_url":"https://api.github.com/repos/MikaelSmith/bolt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MikaelSmith/bolt/downloads","issues_url":"https://api.github.com/repos/MikaelSmith/bolt/issues{/number}","pulls_url":"https://api.github.com/repos/MikaelSmith/bolt/pulls{/number}","milestones_url":"https://api.github.com/repos/MikaelSmith/bolt/milestones{/number}","notifications_url":"https://api.github.com/repos/MikaelSmith/bolt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MikaelSmith/bolt/labels{/name}","releases_url":"https://api.github.com/repos/MikaelSmith/bolt/releases{/id}","deployments_url":"https://api.github.com/repos/MikaelSmith/bolt/deployments","created_at":"2017-10-10T18:23:34Z","updated_at":"2017-10-10T18:23:36Z","pushed_at":"2018-03-01T23:12:17Z","git_url":"git://github.com/MikaelSmith/bolt.git","ssh_url":"git@github.com:MikaelSmith/bolt.git","clone_url":"https://github.com/MikaelSmith/bolt.git","svn_url":"https://github.com/MikaelSmith/bolt","homepage":null,"size":1406,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"puppetlabs:master","ref":"master","sha":"aef099ffad705735bd5fccaf9b99b75d3c1f67fc","user":{"login":"puppetlabs","id":234268,"avatar_url":"https://avatars0.githubusercontent.com/u/234268?v=4","gravatar_id":"","url":"https://api.github.com/users/puppetlabs","html_url":"https://github.com/puppetlabs","followers_url":"https://api.github.com/users/puppetlabs/followers","following_url":"https://api.github.com/users/puppetlabs/following{/other_user}","gists_url":"https://api.github.com/users/puppetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/puppetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puppetlabs/subscriptions","organizations_url":"https://api.github.com/users/puppetlabs/orgs","repos_url":"https://api.github.com/users/puppetlabs/repos","events_url":"https://api.github.com/users/puppetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/puppetlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":99991450,"name":"bolt","full_name":"puppetlabs/bolt","owner":{"login":"puppetlabs","id":234268,"avatar_url":"https://avatars0.githubusercontent.com/u/234268?v=4","gravatar_id":"","url":"https://api.github.com/users/puppetlabs","html_url":"https://github.com/puppetlabs","followers_url":"https://api.github.com/users/puppetlabs/followers","following_url":"https://api.github.com/users/puppetlabs/following{/other_user}","gists_url":"https://api.github.com/users/puppetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/puppetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puppetlabs/subscriptions","organizations_url":"https://api.github.com/users/puppetlabs/orgs","repos_url":"https://api.github.com/users/puppetlabs/repos","events_url":"https://api.github.com/users/puppetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/puppetlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/puppetlabs/bolt","description":"Execute commands remotely over SSH and WinRM","fork":false,"url":"https://api.github.com/repos/puppetlabs/bolt","forks_url":"https://api.github.com/repos/puppetlabs/bolt/forks","keys_url":"https://api.github.com/repos/puppetlabs/bolt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/puppetlabs/bolt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/puppetlabs/bolt/teams","hooks_url":"https://api.github.com/repos/puppetlabs/bolt/hooks","issue_events_url":"https://api.github.com/repos/puppetlabs/bolt/issues/events{/number}","events_url":"https://api.github.com/repos/puppetlabs/bolt/events","assignees_url":"https://api.github.com/repos/puppetlabs/bolt/assignees{/user}","branches_url":"https://api.github.com/repos/puppetlabs/bolt/branches{/branch}","tags_url":"https://api.github.com/repos/puppetlabs/bolt/tags","blobs_url":"https://api.github.com/repos/puppetlabs/bolt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/puppetlabs/bolt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/puppetlabs/bolt/git/refs{/sha}","trees_url":"https://api.github.com/repos/puppetlabs/bolt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/puppetlabs/bolt/statuses/{sha}","languages_url":"https://api.github.com/repos/puppetlabs/bolt/languages","stargazers_url":"https://api.github.com/repos/puppetlabs/bolt/stargazers","contributors_url":"https://api.github.com/repos/puppetlabs/bolt/contributors","subscribers_url":"https://api.github.com/repos/puppetlabs/bolt/subscribers","subscription_url":"https://api.github.com/repos/puppetlabs/bolt/subscription","commits_url":"https://api.github.com/repos/puppetlabs/bolt/commits{/sha}","git_commits_url":"https://api.github.com/repos/puppetlabs/bolt/git/commits{/sha}","comments_url":"https://api.github.com/repos/puppetlabs/bolt/comments{/number}","issue_comment_url":"https://api.github.com/repos/puppetlabs/bolt/issues/comments{/number}","contents_url":"https://api.github.com/repos/puppetlabs/bolt/contents/{+path}","compare_url":"https://api.github.com/repos/puppetlabs/bolt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/puppetlabs/bolt/merges","archive_url":"https://api.github.com/repos/puppetlabs/bolt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/puppetlabs/bolt/downloads","issues_url":"https://api.github.com/repos/puppetlabs/bolt/issues{/number}","pulls_url":"https://api.github.com/repos/puppetlabs/bolt/pulls{/number}","milestones_url":"https://api.github.com/repos/puppetlabs/bolt/milestones{/number}","notifications_url":"https://api.github.com/repos/puppetlabs/bolt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/puppetlabs/bolt/labels{/name}","releases_url":"https://api.github.com/repos/puppetlabs/bolt/releases{/id}","deployments_url":"https://api.github.com/repos/puppetlabs/bolt/deployments","created_at":"2017-08-11T04:26:56Z","updated_at":"2018-02-27T15:10:49Z","pushed_at":"2018-03-02T00:42:13Z","git_url":"git://github.com/puppetlabs/bolt.git","ssh_url":"git@github.com:puppetlabs/bolt.git","clone_url":"https://github.com/puppetlabs/bolt.git","svn_url":"https://github.com/puppetlabs/bolt","homepage":null,"size":1383,"stargazers_count":129,"watchers_count":129,"language":"Ruby","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":41,"mirror_url":null,"archived":false,"open_issues_count":16,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":41,"open_issues":16,"watchers":129,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/bolt/pulls/317"},"html":{"href":"https://github.com/puppetlabs/bolt/pull/317"},"issue":{"href":"https://api.github.com/repos/puppetlabs/bolt/issues/317"},"comments":{"href":"https://api.github.com/repos/puppetlabs/bolt/issues/317/comments"},"review_comments":{"href":"https://api.github.com/repos/puppetlabs/bolt/pulls/317/comments"},"review_comment":{"href":"https://api.github.com/repos/puppetlabs/bolt/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/puppetlabs/bolt/pulls/317/commits"},"statuses":{"href":"https://api.github.com/repos/puppetlabs/bolt/statuses/849ca78ffa85d01b6284a5dfba28426c09f9ce31"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"mruzicka"}}