specinfra 2.34.3 → 2.34.4
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.
- checksums.yaml +4 -4
- data/lib/specinfra/backend/cmd.rb +4 -1
- data/lib/specinfra/backend/winrm.rb +4 -1
- data/lib/specinfra/helper/os.rb +6 -0
- data/lib/specinfra/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7b39e8162d8a1998f500dc54e2ece37c74f1ef63
|
|
4
|
+
data.tar.gz: 26c6f08f3073e338f9b739d5c282ea3510043e41
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b28b077d51bbe41c04c7122c601fcaf824ef85eba268bd003d2bc1de338bf09d7a73587e7a4a1b824b37e74aa9cd02f12135d62e612d283d0e245a7a3ef38280
|
|
7
|
+
data.tar.gz: 517620e73e1547107b6baa840bc50b7bb3cdb84864a05d14fc1c2ae5db403829cfdb4d6bc8c3c09d8c1628d68810890c72ec78e87c45e13a1f386cc740cbc946
|
|
@@ -5,8 +5,11 @@ module Specinfra
|
|
|
5
5
|
class Cmd < Base
|
|
6
6
|
include PowerShell::ScriptHelper
|
|
7
7
|
|
|
8
|
+
def os_info
|
|
9
|
+
{ :family => 'windows', :release => nil, :arch => nil }
|
|
10
|
+
end
|
|
11
|
+
|
|
8
12
|
def run_command(cmd, opts={})
|
|
9
|
-
set_config(:os, { :family => 'windows' })
|
|
10
13
|
script = create_script(cmd)
|
|
11
14
|
result = execute_script %Q{#{powershell} -encodedCommand #{encode_script(script)}}
|
|
12
15
|
|
|
@@ -3,8 +3,11 @@ module Specinfra
|
|
|
3
3
|
class Winrm < Base
|
|
4
4
|
include PowerShell::ScriptHelper
|
|
5
5
|
|
|
6
|
+
def os_info
|
|
7
|
+
{ :family => 'windows', :release => nil, :arch => nil }
|
|
8
|
+
end
|
|
9
|
+
|
|
6
10
|
def run_command(cmd, opts={})
|
|
7
|
-
set_config(:os, {:family => 'windows'})
|
|
8
11
|
script = create_script(cmd)
|
|
9
12
|
winrm = get_config(:winrm)
|
|
10
13
|
|
data/lib/specinfra/helper/os.rb
CHANGED
|
@@ -14,6 +14,12 @@ module Specinfra
|
|
|
14
14
|
private
|
|
15
15
|
def detect_os
|
|
16
16
|
return Specinfra.configuration.os if Specinfra.configuration.os
|
|
17
|
+
|
|
18
|
+
backend = Specinfra.configuration.backend
|
|
19
|
+
if backend == :cmd || backend == :winrm
|
|
20
|
+
return { :family => 'windows', :release => nil, :arch => nil }
|
|
21
|
+
end
|
|
22
|
+
|
|
17
23
|
Specinfra::Helper::DetectOs.subclasses.each do |c|
|
|
18
24
|
res = c.detect
|
|
19
25
|
if res
|
data/lib/specinfra/version.rb
CHANGED