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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 96719fa423ac53ce31eafa6787511fb444c219ff
4
- data.tar.gz: d5272d8a50d9c5c100699388d07c073cbecbc52b
3
+ metadata.gz: 7b39e8162d8a1998f500dc54e2ece37c74f1ef63
4
+ data.tar.gz: 26c6f08f3073e338f9b739d5c282ea3510043e41
5
5
  SHA512:
6
- metadata.gz: a9983779ffd9a1885bf5ff92c775c53b7e92f0d831485608a3f2755c71d5290e7b093ada93e17e071047d0d53abdf1e12f01b4a4435506931f2122f5859355ca
7
- data.tar.gz: 12377bb8d2ae610aabe12fd2b4c21690ef85c3fbb378d5f8bca6c365be25b1b4ec8ea5424dcd4d65709d7d2154454b20056d4bdf750f24be73213b06c0a77b7f
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
 
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Specinfra
2
- VERSION = "2.34.3"
2
+ VERSION = "2.34.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: specinfra
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.34.3
4
+ version: 2.34.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gosuke Miyashita