WinRb/WinRM — pull request #103 by maxlinc (2014-12-12 19:03:16+00:00)
Title: Output class

I created a class to hold the output returned by commands. It's fully backwards compatible (it's a subclass of Hash and still contains `:exitcode` and `:data` keys), but it adds helper methods to turn `:data` into printable strings.

Specifically I added `#stdout`, `#stderr` and `#output` (which returns output from both stdout and stderr). So you can still do this if you want real-time output:
```ruby
hostname = ''
winrm.cmd('hostname') do |stdout, stderr|
hostname << stdout
end
```

But you could also do this:
```ruby
hostname = winrm.cmd('hostname').stdout
```

That alone is pretty convenient, but the real reason I added this is because additional output parsing methods are needed and I wanted a place to add them. In particle, you can see in the integration tests that I added that PowerShell is returning objects instead of strings on `stderr`. This makes the powershell output very hard to read, as you can see in this integration test I added:

```ruby
it 'should have output' do
# TODO: Option to parse CLIXML
# expect(output.output).to eq("Hello\n, world!")
expect(output.output).to eq("Hello\n#< CLIXML\r\n, world!_x000D__x000A_")
end
```