winrm 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/winrm/winrm_service.rb +1 -1
- data/test/spec/cmd_spec.rb +1 -0
- data/test/spec/powershell_spec.rb +3 -2
- data/test/spec/spec_helper.rb +1 -1
- data/test/spec/winrm_primitives_spec.rb +1 -0
- data/test/spec/wql_spec.rb +1 -0
- metadata +3 -5
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.4
|
data/lib/winrm/winrm_service.rb
CHANGED
@@ -270,7 +270,7 @@ module WinRM
|
|
270
270
|
}
|
271
271
|
|
272
272
|
resp = send_message(s.to_xml)
|
273
|
-
hresp =
|
273
|
+
hresp = Nori.parse(resp.to_xml)[:envelope][:body]
|
274
274
|
# Normalize items so the type always has an array even if it's just a single item.
|
275
275
|
items = {}
|
276
276
|
hresp[:enumerate_response][:items].each_pair do |k,v|
|
data/test/spec/cmd_spec.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
$: << File.dirname(__FILE__)
|
1
2
|
require 'spec_helper'
|
2
3
|
|
3
4
|
describe "Test remote Powershell features via WinRM" do
|
@@ -6,8 +7,8 @@ describe "Test remote Powershell features via WinRM" do
|
|
6
7
|
end
|
7
8
|
|
8
9
|
it 'should run a test Powershell script' do
|
9
|
-
ps_file = File.open(
|
10
|
-
output = @winrm.run_powershell_script(
|
10
|
+
ps_file = File.open("#{File.dirname(__FILE__)}/test.ps1", 'r+')
|
11
|
+
output = @winrm.run_powershell_script(ps_file)
|
11
12
|
ps_file.close
|
12
13
|
output[:exitcode].should == 0
|
13
14
|
end
|
data/test/spec/spec_helper.rb
CHANGED
@@ -5,7 +5,7 @@ require 'json'
|
|
5
5
|
module ConnectionHelper
|
6
6
|
# To run this test put a file called 'creds.json' in this directory with the following format:
|
7
7
|
# {"user":"myuser","pass":"mypass","endpoint":"http://mysys.com/wsman","realm":"MY.REALM"}
|
8
|
-
CREDS_FILE='
|
8
|
+
CREDS_FILE=File.dirname(__FILE__) + '/creds.json'
|
9
9
|
|
10
10
|
def winrm_connection
|
11
11
|
creds = JSON.load(File.open(CREDS_FILE,'r'))
|
data/test/spec/wql_spec.rb
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: winrm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 1.0.
|
5
|
+
version: 1.0.4
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Dan Wanek
|
@@ -10,8 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-
|
14
|
-
default_executable:
|
13
|
+
date: 2011-09-10 00:00:00 Z
|
15
14
|
dependencies:
|
16
15
|
- !ruby/object:Gem::Dependency
|
17
16
|
name: gssapi
|
@@ -109,7 +108,6 @@ files:
|
|
109
108
|
- test/spec/winrm_primitives_spec.rb
|
110
109
|
- test/spec/wql_spec.rb
|
111
110
|
- winrm.gemspec
|
112
|
-
has_rdoc: true
|
113
111
|
homepage: http://github.com/zenchild/WinRM
|
114
112
|
licenses: []
|
115
113
|
|
@@ -136,7 +134,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
136
134
|
requirements: []
|
137
135
|
|
138
136
|
rubyforge_project:
|
139
|
-
rubygems_version: 1.
|
137
|
+
rubygems_version: 1.8.10
|
140
138
|
signing_key:
|
141
139
|
specification_version: 3
|
142
140
|
summary: Ruby library for Windows Remote Management
|