winrm 1.3.4 → 1.3.5.dev
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/winrm/winrm_service.rb +2 -2
- data/spec/powershell_spec.rb +6 -0
- data/winrm.gemspec +1 -1
- metadata +10 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7320325a5d0a46ce2d2a75eaa5d413349fe9d34b
|
4
|
+
data.tar.gz: 6fdd2bf0b4c5d96cd84acebfab32f67802a09c87
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df238e1b71fa07b41ac42b1e130f38ae1d129252150365cbd3fa212554a155a46ec59e1529f3d8488b291fed12cecbe6a88a14e3f6c2274b43a08ad5a679310f
|
7
|
+
data.tar.gz: ff0bdba5ac28ebe43721a7a29f59814bd2cb1978ac783cca1065f6458de234dfdc970c87383df6abecfd76a2fab33469106a323849928c46f2d588d79d1187c4
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.3.
|
1
|
+
1.3.5.dev
|
data/lib/winrm/winrm_service.rb
CHANGED
@@ -96,7 +96,7 @@ module WinRM
|
|
96
96
|
def open_shell(shell_opts = {}, &block)
|
97
97
|
i_stream = shell_opts.has_key?(:i_stream) ? shell_opts[:i_stream] : 'stdin'
|
98
98
|
o_stream = shell_opts.has_key?(:o_stream) ? shell_opts[:o_stream] : 'stdout stderr'
|
99
|
-
codepage = shell_opts.has_key?(:codepage) ? shell_opts[:codepage] :
|
99
|
+
codepage = shell_opts.has_key?(:codepage) ? shell_opts[:codepage] : 65001 # utf8 as default codepage (from https://msdn.microsoft.com/en-us/library/dd317756(VS.85).aspx)
|
100
100
|
noprofile = shell_opts.has_key?(:noprofile) ? shell_opts[:noprofile] : 'FALSE'
|
101
101
|
h_opts = { "#{NS_WSMAN_DMTF}:OptionSet" => { "#{NS_WSMAN_DMTF}:Option" => [noprofile, codepage],
|
102
102
|
:attributes! => {"#{NS_WSMAN_DMTF}:Option" => {'Name' => ['WINRS_NOPROFILE','WINRS_CODEPAGE']}}}}
|
@@ -232,7 +232,7 @@ module WinRM
|
|
232
232
|
|
233
233
|
REXML::XPath.match(resp_doc, "//#{NS_WIN_SHELL}:Stream").each do |n|
|
234
234
|
next if n.text.nil? || n.text.empty?
|
235
|
-
stream = { n.attributes['Name'].to_sym => Base64.decode64(n.text) }
|
235
|
+
stream = { n.attributes['Name'].to_sym => Base64.decode64(n.text).force_encoding('utf-8') }
|
236
236
|
output[:data] << stream
|
237
237
|
yield stream[:stdout], stream[:stderr] if block_given?
|
238
238
|
end
|
data/spec/powershell_spec.rb
CHANGED
@@ -94,4 +94,10 @@ describe 'winrm client powershell', integration: true do
|
|
94
94
|
"<S S=\"Error\">, world!_x000D__x000A_</S></Objs>")
|
95
95
|
end
|
96
96
|
end
|
97
|
+
|
98
|
+
describe 'it should handle utf-8 characters' do
|
99
|
+
subject(:output) { @winrm.powershell('echo "✓1234-äöü"') }
|
100
|
+
it { should have_exit_code 0 }
|
101
|
+
it { should have_stdout_match(/✓1234-äöü/) }
|
102
|
+
end
|
97
103
|
end
|
data/winrm.gemspec
CHANGED
@@ -31,7 +31,7 @@ Gem::Specification.new do |s|
|
|
31
31
|
s.add_runtime_dependency 'httpclient', '~> 2.2', '>= 2.2.0.2'
|
32
32
|
s.add_runtime_dependency 'rubyntlm', '~> 0.4.0'
|
33
33
|
s.add_runtime_dependency 'uuidtools', '~> 2.1.2'
|
34
|
-
s.add_runtime_dependency 'logging', '
|
34
|
+
s.add_runtime_dependency 'logging', ['>= 1.6.1', '< 3.0']
|
35
35
|
s.add_runtime_dependency 'nori', '~> 2.0'
|
36
36
|
s.add_runtime_dependency 'gyoku', '~> 1.0'
|
37
37
|
s.add_runtime_dependency 'builder', '>= 2.1.2'
|
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: 1.3.
|
4
|
+
version: 1.3.5.dev
|
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: 2015-
|
12
|
+
date: 2015-09-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: gssapi
|
@@ -77,22 +77,22 @@ dependencies:
|
|
77
77
|
name: logging
|
78
78
|
requirement: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - "~>"
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '1.6'
|
83
80
|
- - ">="
|
84
81
|
- !ruby/object:Gem::Version
|
85
82
|
version: 1.6.1
|
83
|
+
- - "<"
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '3.0'
|
86
86
|
type: :runtime
|
87
87
|
prerelease: false
|
88
88
|
version_requirements: !ruby/object:Gem::Requirement
|
89
89
|
requirements:
|
90
|
-
- - "~>"
|
91
|
-
- !ruby/object:Gem::Version
|
92
|
-
version: '1.6'
|
93
90
|
- - ">="
|
94
91
|
- !ruby/object:Gem::Version
|
95
92
|
version: 1.6.1
|
93
|
+
- - "<"
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '3.0'
|
96
96
|
- !ruby/object:Gem::Dependency
|
97
97
|
name: nori
|
98
98
|
requirement: !ruby/object:Gem::Requirement
|
@@ -249,9 +249,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
249
249
|
version: 1.9.0
|
250
250
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
251
251
|
requirements:
|
252
|
-
- - "
|
252
|
+
- - ">"
|
253
253
|
- !ruby/object:Gem::Version
|
254
|
-
version:
|
254
|
+
version: 1.3.1
|
255
255
|
requirements: []
|
256
256
|
rubyforge_project:
|
257
257
|
rubygems_version: 2.2.2
|