thoughtbot/cocaine — pull request #67 by jyurek (2014-06-04 23:49:15+00:00)
Title: Save both STDOUT and STDERR when possible

Create an Output object that stores the returned output and error
streams from the executed commands. Because of the implementation
details, this will only work for the ProcessRunner and PosixRunner.
Backticks and IO.popen don't have capabilities for this.

There is a good bit of duplication in those two runners and I can't think of a good way to get rid of it, given the requirement of the `waitpid` call in there. There is also a good bit of duplication between the runners themselves. All told, though, this seems like it might be too much hassle and complication for the feature. I'm unsure if I would pull this if I were handed it.