winrm 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/lib/soap/winrm_service.rb +16 -0
  3. metadata +2 -2
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.1
1
+ 0.0.2
@@ -174,6 +174,22 @@ module WinRM
174
174
  next if n.to_s.nil?
175
175
  cmd_stderr << Base64.decode64(n.to_s)
176
176
  end
177
+
178
+ # We may need to get additional output if the stream has not finished.
179
+ # The CommandState will change from Running to Done like so:
180
+ # @example
181
+ # from...
182
+ # <rsp:CommandState CommandId="495C3B09-E0B0-442A-9958-83B529F76C2C" State="http://schemas.microsoft.com/wbem/wsman/1/windows/shell/CommandState/Running"/>
183
+ # to...
184
+ # <rsp:CommandState CommandId="495C3B09-E0B0-442A-9958-83B529F76C2C" State="http://schemas.microsoft.com/wbem/wsman/1/windows/shell/CommandState/Done">
185
+ # <rsp:ExitCode>0</rsp:ExitCode>
186
+ # </rsp:CommandState>
187
+ if((resp/"//#{NS_WIN_SHELL}:ExitCode").empty?)
188
+ more_out = get_command_output(shell_id,command_id)
189
+ cmd_stdout << more_out[:stdout]
190
+ cmd_stderr << more_out[:stderr]
191
+ end
192
+
177
193
  {:stdout => cmd_stdout, :stderr => cmd_stderr}
178
194
  end
179
195
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 1
9
- version: 0.0.1
8
+ - 2
9
+ version: 0.0.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Dan Wanek