capistrano/sshkit — pull request #165 by townsen (2014-07-25 22:54:04+00:00)
Title: Don't strip whitespace from capture()

Whilst writing some tasks to automate checking up on local submodules, I discovered that the capture() call was stripping leading and trailing whitespace. For some commands that is important information and so it should be preserved.

I also noticed a random failure (occurs around 50% of the time) on one of the tests as follows:
```
FAIL (0:00:03.922) test_execute_raises_on_non_zero_exit_status_and_captures_stdout_and_stderr
--- expected
+++ actual
@@ -1,4 +1,4 @@
"echo exit status: 1
echo stdout: Nothing written
-echo stderr: Test capturing stderr
+echo stderr: Nothing written
"
@ test/functional/backends/test_netssh.rb:74:in `test_execute_raises_on_non_zero_exit_status_and_captures_stdout_and_stderr'
/Users/townsen/.rvm/gems/ruby-2.1.2@sato/gems/mocha-1.1.0/lib/mocha/integration/mini_test/version_2112_to_320.rb:40:in `run'
```
I observed this test failure even when my capture change was not present, so I ignored it for now.

Lastly, I tidied up the Rakefile a bit so there was a 'test' task that ran both sets of tests, and I used the dependency style of invoking rather than the explicit Rake::Task[].execute as it seems more in the Rake spirit, though if there's a reason for the latter then I'd be happy to hear it.

Nick