chef-powershell 3.0.15 → 3.0.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/ruby_bin_folder/AMD64/Chef.PowerShell.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/Chef.Powershell.Wrapper.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Chef.PowerShell.Wrapper.Core.dll +0 -0
- data/lib/chef-powershell/powershell.rb +11 -14
- data/lib/chef-powershell/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 35e73a848097f74f51dfe777d0c519915fc8c23f57a84c024e0914570e474e0f
|
4
|
+
data.tar.gz: 63a1bd552b291846fb85e181b46f243f3a4b784302fcdb8b6b46c65d764d4a5d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4b4cf06572b6f67fa9e913fd85f84bb07718da8590254875fd5efcaa33bf0fded0db6976652e48463e7164e569a21208adf8b95c1994848f336211aff31c255a
|
7
|
+
data.tar.gz: 79dd6ca6afe1334761cf2dfd0ec0989530e44d5c3c7c7fead9e63bcd5808d27979d08313506dbea65519d85d847053560c7f0ed22fa8d6451d977f3d2699925e
|
Binary file
|
Binary file
|
data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Chef.PowerShell.Wrapper.Core.dll
CHANGED
Binary file
|
@@ -66,16 +66,13 @@ class ChefPowerShell
|
|
66
66
|
module PowerMod
|
67
67
|
extend FFI::Library
|
68
68
|
|
69
|
-
def self.
|
70
|
-
@
|
71
|
-
|
72
|
-
|
73
|
-
def self.powershell_dll
|
74
|
-
@powershell_dll
|
69
|
+
def self.load_powershell_dll(powershell_dll)
|
70
|
+
@dlls ||= []
|
71
|
+
return if @dlls.include?(powershell_dll)
|
72
|
+
@dlls << powershell_dll
|
75
73
|
end
|
76
74
|
|
77
75
|
def self.do_work(ps_command, timeout = -1)
|
78
|
-
ffi_lib PowerMod.powershell_dll
|
79
76
|
attach_function :execute_powershell, :ExecuteScript, %i{string int}, :pointer
|
80
77
|
execute_powershell(ps_command, timeout)
|
81
78
|
end
|
@@ -84,13 +81,13 @@ class ChefPowerShell
|
|
84
81
|
private
|
85
82
|
|
86
83
|
def exec(script, timeout: -1)
|
87
|
-
PowerMod.
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
@result = FFI_Yajl::Parser.parse(
|
92
|
-
@errors =
|
93
|
-
@verbose =
|
84
|
+
PowerMod.load_powershell_dll(@powershell_dll)
|
85
|
+
execution = PowerMod.do_work(script, timeout)
|
86
|
+
output = execution.read_utf16string
|
87
|
+
hashed_outcome = FFI_Yajl::Parser.parse(output)
|
88
|
+
@result = FFI_Yajl::Parser.parse(hashed_outcome["result"])
|
89
|
+
@errors = hashed_outcome["errors"]
|
90
|
+
@verbose = hashed_outcome["verbose"]
|
94
91
|
end
|
95
92
|
end
|
96
93
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chef-powershell
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chef Software, Inc
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-03-
|
11
|
+
date: 2023-03-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|