winrm 2.0.0 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 072067618af23f03c6b60e0bbca78d0a63a4d0fd
4
- data.tar.gz: f6f1972fb0c1fe27eb4c5650e4d1582de2d4831d
3
+ metadata.gz: 5b23f30eeef61764dafa663e77588acda56160b5
4
+ data.tar.gz: cfbde1991563fd9b6d9dc9bc08171c5404cd330c
5
5
  SHA512:
6
- metadata.gz: 67a66f1af015bd9d1b8b02206fd5a21ff7b60b8daa217747ad4f471ef688f21649b439e7f25bfe4f1c7cf53c4e7f9362c4eba4a915b70992349eaa73e4d78f38
7
- data.tar.gz: da5703c72863218b5266263a3baca8ad62ed3d03dd892e7863ed55ab67f6b4c61bd482e8b8c6656da489179f3d9cd54e325a48c4c407e48ba17fd1e6daa8e99e
6
+ metadata.gz: 2b28caeef7b43e428caafd1bd1406e9a1c9bf7a7e889683e1f7aad4ec6519b5f9831cad6f4014970d2be6fc3f12c01f1e321b0cf6622863f714637050c55b60b
7
+ data.tar.gz: 0c0c4ab172e632e70c9baf09bc58217f9a0e9b8c9412c12f3fbefc9a083b8a4e93cd197c185b65a530d680e55ed2169aaf7ba9d66f9d1d8c4f608baba558b3b2
@@ -1,5 +1,12 @@
1
1
  # WinRM Gem Changelog
2
2
 
3
+ # 2.0.1
4
+ - Fixed Powershell shell leakage when not explicitly closed
5
+ - Fixed cmd commands with responses that extend beyond one stream
6
+
7
+ # 2.0.0
8
+ - Cleaned up API and implemented Powershell Remoting Protocol (PSRP) for all powershell calls.
9
+
3
10
  # 1.8.1
4
11
  - Http receive timeout should always be equal to 10 seconds greater than the winrm operation timeout and not default to one hour
5
12
 
@@ -32,7 +32,7 @@ module WinRM
32
32
 
33
33
  class << self
34
34
  def finalize(connection_opts, transport, shell_id)
35
- proc { PowerShell.close_shell(connection_opts, transport, shell_id) }
35
+ proc { Powershell.close_shell(connection_opts, transport, shell_id) }
36
36
  end
37
37
 
38
38
  def close_shell(connection_opts, transport, shell_id)
@@ -3,5 +3,5 @@
3
3
  # WinRM module
4
4
  module WinRM
5
5
  # The version of the WinRM library
6
- VERSION = '2.0.0'.freeze
6
+ VERSION = '2.0.1'.freeze
7
7
  end
@@ -85,7 +85,9 @@ module WinRM
85
85
 
86
86
  out = { stream[:type] => decoded_text }
87
87
  output << out
88
- output.exitcode ||= exit_code(resp_doc)
88
+ if (code = REXML::XPath.first(resp_doc, "//#{NS_WIN_SHELL}:ExitCode"))
89
+ output.exitcode = code.text.to_i
90
+ end
89
91
  [out[:stdout], out[:stderr]]
90
92
  end
91
93
 
@@ -103,10 +105,6 @@ module WinRM
103
105
  retry
104
106
  end
105
107
 
106
- def exit_code(resp_doc)
107
- REXML::XPath.first(resp_doc, "//#{NS_WIN_SHELL}:ExitCode").text.to_i
108
- end
109
-
110
108
  def command_done?(resp_doc, wait_for_done_state)
111
109
  return false unless resp_doc
112
110
  return true unless wait_for_done_state
@@ -27,6 +27,12 @@ describe 'winrm client cmd' do
27
27
  it { should have_no_stderr }
28
28
  end
29
29
 
30
+ describe 'multi stream output from large file' do
31
+ subject(:output) { @cmd_shell.run('type c:\windows\logs\dism\dism.log') }
32
+ it { should have_exit_code 0 }
33
+ it { should have_no_stderr }
34
+ end
35
+
30
36
  describe 'echo "string with trailing \\" using double quotes' do
31
37
  # This is a regression test for #131. " is converted to &quot; when serializing
32
38
  # the command to SOAP/XML. Any naive substitution performed on such a serialized
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: winrm
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Wanek
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-08-30 00:00:00.000000000 Z
12
+ date: 2016-09-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: gssapi