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 +4 -4
- data/changelog.md +7 -0
- data/lib/winrm/shells/power_shell.rb +1 -1
- data/lib/winrm/version.rb +1 -1
- data/lib/winrm/wsmv/receive_response_reader.rb +3 -5
- data/tests/integration/cmd_spec.rb +6 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5b23f30eeef61764dafa663e77588acda56160b5
|
4
|
+
data.tar.gz: cfbde1991563fd9b6d9dc9bc08171c5404cd330c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b28caeef7b43e428caafd1bd1406e9a1c9bf7a7e889683e1f7aad4ec6519b5f9831cad6f4014970d2be6fc3f12c01f1e321b0cf6622863f714637050c55b60b
|
7
|
+
data.tar.gz: 0c0c4ab172e632e70c9baf09bc58217f9a0e9b8c9412c12f3fbefc9a083b8a4e93cd197c185b65a530d680e55ed2169aaf7ba9d66f9d1d8c4f608baba558b3b2
|
data/changelog.md
CHANGED
@@ -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 {
|
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)
|
data/lib/winrm/version.rb
CHANGED
@@ -85,7 +85,9 @@ module WinRM
|
|
85
85
|
|
86
86
|
out = { stream[:type] => decoded_text }
|
87
87
|
output << out
|
88
|
-
|
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 " 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.
|
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-
|
12
|
+
date: 2016-09-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: gssapi
|