chef-powershell 1.0.7 → 2.18.5
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/Ijwhost.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/concrt140.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/host/fxr/5.0.0/hostfxr.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/msvcp140.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/msvcp140_1.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/msvcp140_2.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/msvcp140_atomic_wait.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/msvcp140_codecvt_ids.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Chef.PowerShell.Wrapper.Core.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Chef.Powershell.Core.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Chef.Powershell.Core.pdb +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Ijwhost.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Microsoft.CSharp.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Microsoft.NETCore.App.deps.json +221 -221
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Microsoft.VisualBasic.Core.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Microsoft.VisualBasic.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Microsoft.Win32.Primitives.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Microsoft.Win32.Registry.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Newtonsoft.Json.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.AppContext.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Buffers.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Collections.Concurrent.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Collections.Immutable.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Collections.NonGeneric.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Collections.Specialized.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Collections.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ComponentModel.Annotations.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ComponentModel.DataAnnotations.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ComponentModel.EventBasedAsync.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ComponentModel.Primitives.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ComponentModel.TypeConverter.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ComponentModel.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Configuration.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Console.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Core.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Data.Common.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Data.DataSetExtensions.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Data.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.Contracts.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.Debug.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.DiagnosticSource.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.FileVersionInfo.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.Process.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.StackTrace.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.TextWriterTraceListener.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.Tools.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.TraceSource.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.Tracing.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Drawing.Primitives.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Drawing.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Dynamic.Runtime.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Formats.Asn1.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Globalization.Calendars.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Globalization.Extensions.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Globalization.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.Compression.Brotli.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.Compression.FileSystem.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.Compression.ZipFile.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.Compression.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.FileSystem.AccessControl.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.FileSystem.DriveInfo.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.FileSystem.Primitives.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.FileSystem.Watcher.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.FileSystem.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.IsolatedStorage.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.MemoryMappedFiles.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.Pipes.AccessControl.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.Pipes.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.UnmanagedMemoryStream.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Linq.Expressions.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Linq.Parallel.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Linq.Queryable.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Linq.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Memory.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.Http.Json.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.Http.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.HttpListener.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.Mail.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.NameResolution.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.NetworkInformation.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.Ping.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.Primitives.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.Requests.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.Security.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.ServicePoint.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.Sockets.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.WebClient.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.WebHeaderCollection.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.WebProxy.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.WebSockets.Client.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.WebSockets.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Numerics.Vectors.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Numerics.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ObjectModel.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Private.CoreLib.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Private.DataContractSerialization.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Private.Uri.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Private.Xml.Linq.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Private.Xml.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.DispatchProxy.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.Emit.ILGeneration.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.Emit.Lightweight.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.Emit.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.Extensions.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.Metadata.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.Primitives.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.TypeExtensions.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Resources.Reader.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Resources.ResourceManager.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Resources.Writer.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.CompilerServices.Unsafe.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.CompilerServices.VisualC.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Extensions.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Handles.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.InteropServices.RuntimeInformation.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.InteropServices.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Intrinsics.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Loader.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Numerics.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Serialization.Formatters.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Serialization.Json.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Serialization.Primitives.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Serialization.Xml.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Serialization.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.AccessControl.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Claims.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Cryptography.Algorithms.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Cryptography.Cng.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Cryptography.Csp.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Cryptography.Encoding.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Cryptography.OpenSsl.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Cryptography.Primitives.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Cryptography.X509Certificates.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Principal.Windows.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Principal.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.SecureString.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ServiceModel.Web.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ServiceProcess.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Text.Encoding.CodePages.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Text.Encoding.Extensions.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Text.Encoding.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Text.Encodings.Web.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Text.Json.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Text.RegularExpressions.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.Channels.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.Overlapped.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.Tasks.Dataflow.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.Tasks.Extensions.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.Tasks.Parallel.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.Tasks.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.Thread.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.ThreadPool.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.Timer.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Transactions.Local.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Transactions.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ValueTuple.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Web.HttpUtility.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Web.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Windows.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.Linq.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.ReaderWriter.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.Serialization.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.XDocument.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.XPath.XDocument.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.XPath.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.XmlDocument.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.XmlSerializer.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/WindowsBase.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-core-console-l1-1-0.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-core-console-l1-2-0.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-core-datetime-l1-1-0.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-core-debug-l1-1-0.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-core-errorhandling-l1-1-0.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-core-file-l1-1-0.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-core-file-l1-2-0.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-core-file-l2-1-0.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-core-handle-l1-1-0.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-core-heap-l1-1-0.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-core-interlocked-l1-1-0.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-core-libraryloader-l1-1-0.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-core-localization-l1-2-0.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-core-memory-l1-1-0.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-core-namedpipe-l1-1-0.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-core-processenvironment-l1-1-0.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-core-processthreads-l1-1-0.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-core-processthreads-l1-1-1.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-core-profile-l1-1-0.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-core-rtlsupport-l1-1-0.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-core-string-l1-1-0.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-core-synch-l1-1-0.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-core-synch-l1-2-0.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-core-sysinfo-l1-1-0.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-core-timezone-l1-1-0.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-core-util-l1-1-0.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-crt-conio-l1-1-0.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-crt-convert-l1-1-0.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-crt-environment-l1-1-0.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-crt-filesystem-l1-1-0.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-crt-heap-l1-1-0.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-crt-locale-l1-1-0.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-crt-math-l1-1-0.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-crt-multibyte-l1-1-0.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-crt-private-l1-1-0.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-crt-process-l1-1-0.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-crt-runtime-l1-1-0.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-crt-stdio-l1-1-0.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-crt-string-l1-1-0.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-crt-time-l1-1-0.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-crt-utility-l1-1-0.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/clrcompression.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/clretwrc.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/clrjit.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/coreclr.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/createdump.exe +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/dbgshim.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/hostfxr.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/hostpolicy.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/mscordaccore.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/mscordaccore_amd64_amd64_5.0.1522.11506.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/mscordbi.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/mscorlib.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/mscorrc.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/netstandard.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/ucrtbase.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/vccorlib140.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/vcruntime140.dll +0 -0
- data/bin/ruby_bin_folder/AMD64/vcruntime140_1.dll +0 -0
- data/bin/ruby_bin_folder/x86/Chef.PowerShell.dll +0 -0
- data/bin/ruby_bin_folder/x86/Chef.Powershell.Wrapper.dll +0 -0
- data/bin/ruby_bin_folder/x86/shared/Microsoft.NETCore.App/5.0.0/Chef.PowerShell.Wrapper.Core.dll +0 -0
- data/bin/ruby_bin_folder/x86/shared/Microsoft.NETCore.App/5.0.0/Chef.Powershell.Core.dll +0 -0
- data/bin/ruby_bin_folder/x86/shared/Microsoft.NETCore.App/5.0.0/Chef.Powershell.Core.pdb +0 -0
- data/bin/ruby_bin_folder/x86/shared/Microsoft.NETCore.App/5.0.0/Newtonsoft.Json.dll +0 -0
- data/chef-powershell.gemspec +52 -52
- data/lib/chef-powershell/exceptions.rb +1 -1
- data/lib/chef-powershell/powershell.rb +46 -12
- data/lib/chef-powershell/powershell_exec.rb +6 -6
- data/lib/chef-powershell/pwsh.rb +2 -2
- data/lib/chef-powershell/version.rb +20 -20
- data/lib/chef-powershell.rb +2 -2
- data/spec/unit/powershell_exec_spec.rb +7 -7
- metadata +4 -5
- data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/mscordaccore_amd64_amd64_5.0.521.16609.dll +0 -0
- data/lib/chef-powershell/json_compat.rb +0 -63
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/bin/ruby_bin_folder/x86/shared/Microsoft.NETCore.App/5.0.0/Chef.PowerShell.Wrapper.Core.dll
CHANGED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/chef-powershell.gemspec
CHANGED
@@ -1,52 +1,52 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
lib = File.expand_path("lib", __dir__)
|
3
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
bin = File.expand_path("bin", __dir__)
|
5
|
-
$LOAD_PATH.unshift(bin) unless $LOAD_PATH.include?(bin)
|
6
|
-
require "chef-powershell/version"
|
7
|
-
|
8
|
-
Gem::Specification.new do |spec|
|
9
|
-
spec.name = "chef-powershell"
|
10
|
-
spec.version =
|
11
|
-
spec.authors = ["Chef Software, Inc"]
|
12
|
-
spec.email = ["oss@chef.io"]
|
13
|
-
|
14
|
-
spec.summary = %q{External Chef module for accessing and utilizing PowerShell}
|
15
|
-
spec.homepage = "https://github.com/chef/chef-powershell-shim"
|
16
|
-
spec.license = "Apache-2.0"
|
17
|
-
|
18
|
-
spec.required_ruby_version = ">= 2.6"
|
19
|
-
|
20
|
-
spec.add_runtime_dependency "ffi", "~> 1.15"
|
21
|
-
spec.add_runtime_dependency "ffi-yajl", "~> 2.4"
|
22
|
-
|
23
|
-
spec.metadata = {
|
24
|
-
"bug_tracker_uri" => "https://github.com/chef/chef/issues",
|
25
|
-
"changelog_uri" => "https://github.com/chef/chef-powershell-shim/CHANGELOG.md",
|
26
|
-
"documentation_uri" => "https://github.com/chef/chef-powershell-shim/chef-powershell/README.md",
|
27
|
-
"homepage_uri" => "https://github.com/chef/chef/tree/main/chef-powershell",
|
28
|
-
"source_code_uri" => "https://github.com/chef/chef-powershell-shim/chef-powershell",
|
29
|
-
}
|
30
|
-
|
31
|
-
spec.require_paths = %w{lib bin}
|
32
|
-
|
33
|
-
#
|
34
|
-
# NOTE: DO NOT ADD RUNTIME DEPS TO OTHER CHEF ECOSYSTEM GEMS
|
35
|
-
# (e.g. chef, ohai, mixlib-anything, ffi-yajl, and IN PARTICULAR NOT chef-config)
|
36
|
-
#
|
37
|
-
# This is so that this set of common code can be reused in any other library without
|
38
|
-
# creating circular dependencies. If you find yourself wanting to do that you probably
|
39
|
-
# have a helper that should go into the library you want to declare a dependency on,
|
40
|
-
# or you need to create another gem that is not this one. You may also want to rub some
|
41
|
-
# dependency injection on your API to invert things so that you don't have to take
|
42
|
-
# a dependency on the thing you need (i.e. allow injecting a hash-like thing instead of taking
|
43
|
-
# a dep on mixlib-config and then require the consumer to wire up chef-config to your
|
44
|
-
# API). Same for mixlib-log and Chef::Log in general.
|
45
|
-
#
|
46
|
-
# ABSOLUTELY NO EXCEPTIONS
|
47
|
-
#
|
48
|
-
spec.bindir = "bin"
|
49
|
-
spec.executables = []
|
50
|
-
spec.files = %w{Rakefile LICENSE} + Dir.glob("*.gemspec") +
|
51
|
-
Dir.glob("{lib,spec,bin}/**/*", File::FNM_DOTMATCH).reject { |f| File.directory?(f) }
|
52
|
-
end
|
1
|
+
# frozen_string_literal: true
|
2
|
+
lib = File.expand_path("lib", __dir__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
bin = File.expand_path("bin", __dir__)
|
5
|
+
$LOAD_PATH.unshift(bin) unless $LOAD_PATH.include?(bin)
|
6
|
+
require "chef-powershell/version"
|
7
|
+
|
8
|
+
Gem::Specification.new do |spec|
|
9
|
+
spec.name = "chef-powershell"
|
10
|
+
spec.version = ChefPowerShellModule::VERSION
|
11
|
+
spec.authors = ["Chef Software, Inc"]
|
12
|
+
spec.email = ["oss@chef.io"]
|
13
|
+
|
14
|
+
spec.summary = %q{External Chef module for accessing and utilizing PowerShell}
|
15
|
+
spec.homepage = "https://github.com/chef/chef-powershell-shim"
|
16
|
+
spec.license = "Apache-2.0"
|
17
|
+
|
18
|
+
spec.required_ruby_version = ">= 2.6"
|
19
|
+
|
20
|
+
spec.add_runtime_dependency "ffi", "~> 1.15"
|
21
|
+
spec.add_runtime_dependency "ffi-yajl", "~> 2.4"
|
22
|
+
|
23
|
+
spec.metadata = {
|
24
|
+
"bug_tracker_uri" => "https://github.com/chef/chef/issues",
|
25
|
+
"changelog_uri" => "https://github.com/chef/chef-powershell-shim/CHANGELOG.md",
|
26
|
+
"documentation_uri" => "https://github.com/chef/chef-powershell-shim/chef-powershell/README.md",
|
27
|
+
"homepage_uri" => "https://github.com/chef/chef/tree/main/chef-powershell",
|
28
|
+
"source_code_uri" => "https://github.com/chef/chef-powershell-shim/chef-powershell",
|
29
|
+
}
|
30
|
+
|
31
|
+
spec.require_paths = %w{lib bin}
|
32
|
+
|
33
|
+
#
|
34
|
+
# NOTE: DO NOT ADD RUNTIME DEPS TO OTHER CHEF ECOSYSTEM GEMS
|
35
|
+
# (e.g. chef, ohai, mixlib-anything, ffi-yajl, and IN PARTICULAR NOT chef-config)
|
36
|
+
#
|
37
|
+
# This is so that this set of common code can be reused in any other library without
|
38
|
+
# creating circular dependencies. If you find yourself wanting to do that you probably
|
39
|
+
# have a helper that should go into the library you want to declare a dependency on,
|
40
|
+
# or you need to create another gem that is not this one. You may also want to rub some
|
41
|
+
# dependency injection on your API to invert things so that you don't have to take
|
42
|
+
# a dependency on the thing you need (i.e. allow injecting a hash-like thing instead of taking
|
43
|
+
# a dep on mixlib-config and then require the consumer to wire up chef-config to your
|
44
|
+
# API). Same for mixlib-log and Chef::Log in general.
|
45
|
+
#
|
46
|
+
# ABSOLUTELY NO EXCEPTIONS
|
47
|
+
#
|
48
|
+
spec.bindir = "bin"
|
49
|
+
spec.executables = []
|
50
|
+
spec.files = %w{Rakefile LICENSE} + Dir.glob("*.gemspec") +
|
51
|
+
Dir.glob("{lib,spec,bin}/**/*", File::FNM_DOTMATCH).reject { |f| File.directory?(f) }
|
52
|
+
end
|
@@ -16,12 +16,11 @@
|
|
16
16
|
# limitations under the License.
|
17
17
|
|
18
18
|
require "ffi" unless defined?(FFI)
|
19
|
-
|
19
|
+
autoload :FFI_Yajl, "ffi_yajl"
|
20
20
|
require_relative "exceptions"
|
21
21
|
require_relative "unicode"
|
22
|
-
# require "chef-powershell"
|
23
22
|
|
24
|
-
class
|
23
|
+
class ChefPowerShell
|
25
24
|
class PowerShell
|
26
25
|
|
27
26
|
attr_reader :result
|
@@ -58,18 +57,47 @@ class Chef_PowerShell
|
|
58
57
|
end
|
59
58
|
|
60
59
|
#
|
61
|
-
# @raise [
|
60
|
+
# @raise [ChefPowerShell::PowerShellExceptions::PowerShellCommandFailed] raise if the command failed
|
62
61
|
#
|
63
62
|
def error!
|
64
|
-
raise
|
63
|
+
raise ChefPowerShell::PowerShellExceptions::PowerShellCommandFailed, "Unexpected exit in PowerShell command: #{@errors}" if error?
|
65
64
|
end
|
66
65
|
|
67
66
|
module PowerMod
|
67
|
+
class << self
|
68
|
+
attr_accessor :result_string, :retry_count, :exception, :result, :errors, :verbose, :hashed_outcome
|
69
|
+
end
|
70
|
+
|
68
71
|
extend FFI::Library
|
72
|
+
# FFI requires attaching to modules, not classes, so we need to
|
73
|
+
# have a module here. The module level variables *could* be refactored
|
74
|
+
# out here, but still 100% of the work still goes through the module.
|
69
75
|
@@powershell_dll = Gem.loaded_specs["chef-powershell"].full_gem_path + "/bin/ruby_bin_folder/#{ENV["PROCESSOR_ARCHITECTURE"]}/Chef.PowerShell.Wrapper.dll"
|
70
76
|
@@ps_command = ""
|
71
77
|
@@ps_timeout = -1
|
72
78
|
|
79
|
+
StoreResultCallback = FFI::Function.new(:bool, [:pointer, :size_t]) do |data, size|
|
80
|
+
# try parsing the result *first* before returning from the function, and if it fails,
|
81
|
+
# return false so that the function can be retried from the C++ side.
|
82
|
+
begin
|
83
|
+
# @@result_string = data.get_bytes(0, size).force_encoding("UTF-16LE").encode("UTF-8")
|
84
|
+
@result_string = data.get_bytes(0, size).force_encoding("UTF-16LE").encode("UTF-8").bytes.reverse.drop_while {|x| x == 0}.reverse.pack("C*")
|
85
|
+
@hashed_outcome = FFI_Yajl::Parser.parse(@result_string)
|
86
|
+
@result = FFI_Yajl::Parser.parse(@hashed_outcome["result"])
|
87
|
+
@errors = @hashed_outcome["errors"]
|
88
|
+
@verbose = @hashed_outcome["verbose"]
|
89
|
+
true
|
90
|
+
rescue => e
|
91
|
+
@retry_count += 1
|
92
|
+
puts "#{e.inspect}"
|
93
|
+
@exception = e
|
94
|
+
return true if @retry_count > 3
|
95
|
+
puts "Retrying PowerShell command execution #{@retry_count}"
|
96
|
+
sleep 1
|
97
|
+
false
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
73
101
|
def self.set_ps_dll(value)
|
74
102
|
@@powershell_dll = value
|
75
103
|
end
|
@@ -83,9 +111,12 @@ class Chef_PowerShell
|
|
83
111
|
end
|
84
112
|
|
85
113
|
def self.do_work
|
114
|
+
@exception = nil
|
115
|
+
@retry_count = 0
|
86
116
|
ffi_lib @@powershell_dll
|
87
|
-
attach_function :execute_powershell, :ExecuteScript, %i{string int}, :pointer
|
88
|
-
|
117
|
+
attach_function :execute_powershell, :ExecuteScript, %i{string int pointer}, :pointer
|
118
|
+
|
119
|
+
execute_powershell(@@ps_command, @@ps_timeout, StoreResultCallback)
|
89
120
|
end
|
90
121
|
end
|
91
122
|
|
@@ -93,15 +124,18 @@ class Chef_PowerShell
|
|
93
124
|
|
94
125
|
def exec(script, timeout: -1)
|
95
126
|
timeout = -1 if timeout == 0 || timeout.nil?
|
127
|
+
|
128
|
+
# Set it every time because the test suite actually switches
|
129
|
+
# the DLL pointed to.
|
96
130
|
PowerMod.set_ps_dll(@powershell_dll)
|
97
131
|
PowerMod.set_ps_timeout(timeout)
|
132
|
+
|
98
133
|
PowerMod.set_ps_command(script)
|
99
134
|
execution = PowerMod.do_work
|
100
|
-
|
101
|
-
|
102
|
-
@
|
103
|
-
@
|
104
|
-
@verbose = hashed_outcome["verbose"]
|
135
|
+
raise PowerMod.exception if PowerMod.exception
|
136
|
+
@result = PowerMod.result
|
137
|
+
@errors = PowerMod.errors
|
138
|
+
@verbose = PowerMod.verbose
|
105
139
|
end
|
106
140
|
end
|
107
141
|
end
|
@@ -23,7 +23,7 @@ require_relative "./pwsh"
|
|
23
23
|
# powershell_exec is initialized with a string that should be set to the script
|
24
24
|
# to run and also takes an optional interpreter argument which must be either
|
25
25
|
# :powershell (Windows PowerShell which is the default) or :pwsh (PowerShell
|
26
|
-
# Core). It will return a
|
26
|
+
# Core). It will return a ChefPowerShell::PowerShell object that provides 5 methods:
|
27
27
|
#
|
28
28
|
# .result - returns a hash representing the results returned by executing the
|
29
29
|
# PowerShell script block
|
@@ -95,8 +95,8 @@ require_relative "./pwsh"
|
|
95
95
|
# credentials of the user running Chef Client are used.
|
96
96
|
#
|
97
97
|
|
98
|
-
class
|
99
|
-
module
|
98
|
+
class ChefPowerShell
|
99
|
+
module ChefPowerShellModule
|
100
100
|
module PowerShellExec
|
101
101
|
# The Chef.PowerShell.Wrapper.dll file looks in the same folder as ruby.exe OR in the folder specified by the environment variable CHEF_POWERSHELL_BIN for other chef powershell dll's
|
102
102
|
# We don't want to move files around so we're setting the variable here to keep everything tidy.
|
@@ -113,16 +113,16 @@ class Chef_PowerShell
|
|
113
113
|
def powershell_exec(script, interpreter = :powershell, timeout: -1)
|
114
114
|
case interpreter
|
115
115
|
when :powershell
|
116
|
-
|
116
|
+
ChefPowerShell::PowerShell.new(script, timeout: timeout)
|
117
117
|
when :pwsh
|
118
|
-
|
118
|
+
ChefPowerShell::Pwsh.new(script, timeout: timeout)
|
119
119
|
else
|
120
120
|
raise ArgumentError, "Expected interpreter of :powershell or :pwsh"
|
121
121
|
end
|
122
122
|
end
|
123
123
|
|
124
124
|
# The same as the #powershell_exec method except this will raise
|
125
|
-
#
|
125
|
+
# ChefPowerShell::PowerShellExceptions::PowerShellCommandFailed if the command fails
|
126
126
|
def powershell_exec!(script, interpreter = :powershell, **options)
|
127
127
|
cmd = powershell_exec(script, interpreter, **options)
|
128
128
|
cmd.error!
|
data/lib/chef-powershell/pwsh.rb
CHANGED
@@ -15,8 +15,8 @@
|
|
15
15
|
# See the License for the specific language governing permissions and
|
16
16
|
# limitations under the License.
|
17
17
|
|
18
|
-
class
|
19
|
-
class Pwsh <
|
18
|
+
class ChefPowerShell
|
19
|
+
class Pwsh < ChefPowerShell::PowerShell
|
20
20
|
# Run a command under pwsh (powershell core) via FFI
|
21
21
|
# This implementation requires the managed dll, native wrapper and a
|
22
22
|
# published, self contained dotnet core directory tree to exist in the
|
@@ -1,20 +1,20 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
# Copyright:: Copyright (c) Chef Software Inc.
|
3
|
-
# License:: Apache License, Version 2.0
|
4
|
-
#
|
5
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
-
# you may not use this file except in compliance with the License.
|
7
|
-
# You may obtain a copy of the License at
|
8
|
-
#
|
9
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
-
#
|
11
|
-
# Unless required by applicable law or agreed to in writing, software
|
12
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
-
# See the License for the specific language governing permissions and
|
15
|
-
# limitations under the License.
|
16
|
-
|
17
|
-
module
|
18
|
-
CHEFPOWERSHELL_ROOT = File.expand_path("..", __dir__)
|
19
|
-
VERSION = "
|
20
|
-
end
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# Copyright:: Copyright (c) Chef Software Inc.
|
3
|
+
# License:: Apache License, Version 2.0
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
module ChefPowerShellModule
|
18
|
+
CHEFPOWERSHELL_ROOT = File.expand_path("..", __dir__)
|
19
|
+
VERSION = "2.18.5".freeze
|
20
|
+
end
|
data/lib/chef-powershell.rb
CHANGED
@@ -18,8 +18,8 @@
|
|
18
18
|
|
19
19
|
require "chef-powershell"
|
20
20
|
|
21
|
-
describe
|
22
|
-
let(:powershell_mixin) { Class.new { include
|
21
|
+
describe ChefPowerShell::ChefPowerShellModule::PowerShellExec, :windows_only do
|
22
|
+
let(:powershell_mixin) { Class.new { include ChefPowerShell::ChefPowerShellModule::PowerShellExec } }
|
23
23
|
subject(:object) { powershell_mixin.new }
|
24
24
|
|
25
25
|
before do
|
@@ -30,7 +30,7 @@ describe Chef_PowerShell::ChefPowerShell::PowerShellExec, :windows_only do
|
|
30
30
|
describe "#powershell_exec" do
|
31
31
|
context "not specifying an interpreter" do
|
32
32
|
it "runs a basic command and returns a Chef::PowerShell object" do
|
33
|
-
expect(object.powershell_exec("$PSVersionTable", :powershell, timeout: -1)).to be_kind_of(
|
33
|
+
expect(object.powershell_exec("$PSVersionTable", :powershell, timeout: -1)).to be_kind_of(ChefPowerShell::PowerShell)
|
34
34
|
end
|
35
35
|
|
36
36
|
it "uses less than version 7" do
|
@@ -41,7 +41,7 @@ describe Chef_PowerShell::ChefPowerShell::PowerShellExec, :windows_only do
|
|
41
41
|
|
42
42
|
context "using pwsh interpreter" do
|
43
43
|
it "runs a basic command and returns a Chef::PowerShell object" do
|
44
|
-
expect(object.powershell_exec("$PSVersionTable", :pwsh, timeout: -1)).to be_kind_of(
|
44
|
+
expect(object.powershell_exec("$PSVersionTable", :pwsh, timeout: -1)).to be_kind_of(ChefPowerShell::Pwsh)
|
45
45
|
end
|
46
46
|
|
47
47
|
it "uses greater than version 6" do
|
@@ -52,7 +52,7 @@ describe Chef_PowerShell::ChefPowerShell::PowerShellExec, :windows_only do
|
|
52
52
|
|
53
53
|
context "using powershell interpreter" do
|
54
54
|
it "runs a basic command and returns a Chef::PowerShell object" do
|
55
|
-
expect(object.powershell_exec("$PSVersionTable", :powershell, timeout: -1)).to be_kind_of(
|
55
|
+
expect(object.powershell_exec("$PSVersionTable", :powershell, timeout: -1)).to be_kind_of(ChefPowerShell::PowerShell)
|
56
56
|
end
|
57
57
|
|
58
58
|
it "uses less than version 6" do
|
@@ -80,11 +80,11 @@ describe Chef_PowerShell::ChefPowerShell::PowerShellExec, :windows_only do
|
|
80
80
|
|
81
81
|
describe "#powershell_exec!" do
|
82
82
|
it "runs a basic command and returns a Chef::PowerShell object" do
|
83
|
-
expect(object.powershell_exec!("$PSVersionTable", :powershell, timeout: -1)).to be_kind_of(
|
83
|
+
expect(object.powershell_exec!("$PSVersionTable", :powershell, timeout: -1)).to be_kind_of(ChefPowerShell::PowerShell)
|
84
84
|
end
|
85
85
|
|
86
86
|
it "raises an error if the command fails" do
|
87
|
-
expect { object.powershell_exec!("this-should-error") }.to raise_error(
|
87
|
+
expect { object.powershell_exec!("this-should-error") }.to raise_error(ChefPowerShell::PowerShellExceptions::PowerShellCommandFailed)
|
88
88
|
end
|
89
89
|
|
90
90
|
it "raises an error if the interpreter is invalid" do
|
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:
|
4
|
+
version: 2.18.5
|
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:
|
11
|
+
date: 2023-07-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|
@@ -329,7 +329,7 @@ files:
|
|
329
329
|
- bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/mi.dll
|
330
330
|
- bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/miutils.dll
|
331
331
|
- bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/mscordaccore.dll
|
332
|
-
- bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/mscordaccore_amd64_amd64_5.0.
|
332
|
+
- bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/mscordaccore_amd64_amd64_5.0.1522.11506.dll
|
333
333
|
- bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/mscordbi.dll
|
334
334
|
- bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/mscorlib.dll
|
335
335
|
- bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/mscorrc.dll
|
@@ -658,7 +658,6 @@ files:
|
|
658
658
|
- chef-powershell.gemspec
|
659
659
|
- lib/chef-powershell.rb
|
660
660
|
- lib/chef-powershell/exceptions.rb
|
661
|
-
- lib/chef-powershell/json_compat.rb
|
662
661
|
- lib/chef-powershell/powershell.rb
|
663
662
|
- lib/chef-powershell/powershell_exec.rb
|
664
663
|
- lib/chef-powershell/pwsh.rb
|
@@ -691,7 +690,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
691
690
|
- !ruby/object:Gem::Version
|
692
691
|
version: '0'
|
693
692
|
requirements: []
|
694
|
-
rubygems_version: 3.
|
693
|
+
rubygems_version: 3.3.7
|
695
694
|
signing_key:
|
696
695
|
specification_version: 4
|
697
696
|
summary: External Chef module for accessing and utilizing PowerShell
|
Binary file
|
@@ -1,63 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# Author:: Tim Hinderliter (<tim@chef.io>)
|
3
|
-
# Copyright:: Copyright (c) Chef Software Inc.
|
4
|
-
# License:: Apache License, Version 2.0
|
5
|
-
#
|
6
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
-
# you may not use this file except in compliance with the License.
|
8
|
-
# You may obtain a copy of the License at
|
9
|
-
#
|
10
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
-
#
|
12
|
-
# Unless required by applicable law or agreed to in writing, software
|
13
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
-
# See the License for the specific language governing permissions and
|
16
|
-
# limitations under the License.
|
17
|
-
|
18
|
-
# Wrapper class for interacting with JSON.
|
19
|
-
|
20
|
-
autoload :FFI_Yajl, "ffi_yajl"
|
21
|
-
require_relative "exceptions"
|
22
|
-
# We're requiring this to prevent breaking consumers using Hash.to_json
|
23
|
-
require "json" unless defined?(JSON)
|
24
|
-
|
25
|
-
class Chef
|
26
|
-
class JSONCompat
|
27
|
-
|
28
|
-
class << self
|
29
|
-
|
30
|
-
def parse(source, opts = {})
|
31
|
-
FFI_Yajl::Parser.parse(source, opts)
|
32
|
-
rescue FFI_Yajl::ParseError => e
|
33
|
-
raise Chef_PowerShell::PowerShellExceptions::JSON::ParseError, e.message
|
34
|
-
end
|
35
|
-
|
36
|
-
def from_json(source, opts = {})
|
37
|
-
obj = parse(source, opts)
|
38
|
-
|
39
|
-
# JSON gem requires top level object to be a Hash or Array (otherwise
|
40
|
-
# you get the "must contain two octets" error). Yajl doesn't impose the
|
41
|
-
# same limitation. For compatibility, we re-impose this condition.
|
42
|
-
unless obj.is_a?(Hash) || obj.is_a?(Array)
|
43
|
-
raise Chef_PowerShell::PowerShellExceptions::JSON::ParseError, "Top level JSON object must be a Hash or Array. (actual: #{obj.class})"
|
44
|
-
end
|
45
|
-
|
46
|
-
obj
|
47
|
-
end
|
48
|
-
|
49
|
-
def to_json(obj, opts = nil)
|
50
|
-
FFI_Yajl::Encoder.encode(obj, opts)
|
51
|
-
rescue FFI_Yajl::EncodeError => e
|
52
|
-
raise Chef_PowerShell::PowerShellExceptions::JSON::EncodeError, e.message
|
53
|
-
end
|
54
|
-
|
55
|
-
def to_json_pretty(obj, opts = nil)
|
56
|
-
options_map = { pretty: true }
|
57
|
-
options_map[:indent] = opts[:indent] if opts.respond_to?(:key?) && opts.key?(:indent)
|
58
|
-
to_json(obj, options_map).chomp
|
59
|
-
end
|
60
|
-
|
61
|
-
end
|
62
|
-
end
|
63
|
-
end
|