chef-powershell 1.0.7 → 3.0.15

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of chef-powershell might be problematic. Click here for more details.

Files changed (255) hide show
  1. checksums.yaml +4 -4
  2. data/bin/ruby_bin_folder/AMD64/Chef.PowerShell.dll +0 -0
  3. data/bin/ruby_bin_folder/AMD64/Chef.Powershell.Wrapper.dll +0 -0
  4. data/bin/ruby_bin_folder/AMD64/Ijwhost.dll +0 -0
  5. data/bin/ruby_bin_folder/AMD64/concrt140.dll +0 -0
  6. data/bin/ruby_bin_folder/AMD64/host/fxr/5.0.0/hostfxr.dll +0 -0
  7. data/bin/ruby_bin_folder/AMD64/msvcp140.dll +0 -0
  8. data/bin/ruby_bin_folder/AMD64/msvcp140_1.dll +0 -0
  9. data/bin/ruby_bin_folder/AMD64/msvcp140_2.dll +0 -0
  10. data/bin/ruby_bin_folder/AMD64/msvcp140_atomic_wait.dll +0 -0
  11. data/bin/ruby_bin_folder/AMD64/msvcp140_codecvt_ids.dll +0 -0
  12. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Chef.PowerShell.Wrapper.Core.dll +0 -0
  13. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Chef.Powershell.Core.dll +0 -0
  14. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Chef.Powershell.Core.pdb +0 -0
  15. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Ijwhost.dll +0 -0
  16. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Microsoft.CSharp.dll +0 -0
  17. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Microsoft.NETCore.App.deps.json +221 -221
  18. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Microsoft.VisualBasic.Core.dll +0 -0
  19. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Microsoft.VisualBasic.dll +0 -0
  20. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Microsoft.Win32.Primitives.dll +0 -0
  21. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Microsoft.Win32.Registry.dll +0 -0
  22. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Newtonsoft.Json.dll +0 -0
  23. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.AppContext.dll +0 -0
  24. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Buffers.dll +0 -0
  25. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Collections.Concurrent.dll +0 -0
  26. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Collections.Immutable.dll +0 -0
  27. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Collections.NonGeneric.dll +0 -0
  28. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Collections.Specialized.dll +0 -0
  29. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Collections.dll +0 -0
  30. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ComponentModel.Annotations.dll +0 -0
  31. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ComponentModel.DataAnnotations.dll +0 -0
  32. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ComponentModel.EventBasedAsync.dll +0 -0
  33. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ComponentModel.Primitives.dll +0 -0
  34. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ComponentModel.TypeConverter.dll +0 -0
  35. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ComponentModel.dll +0 -0
  36. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Configuration.dll +0 -0
  37. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Console.dll +0 -0
  38. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Core.dll +0 -0
  39. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Data.Common.dll +0 -0
  40. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Data.DataSetExtensions.dll +0 -0
  41. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Data.dll +0 -0
  42. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.Contracts.dll +0 -0
  43. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.Debug.dll +0 -0
  44. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.DiagnosticSource.dll +0 -0
  45. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.FileVersionInfo.dll +0 -0
  46. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.Process.dll +0 -0
  47. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.StackTrace.dll +0 -0
  48. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.TextWriterTraceListener.dll +0 -0
  49. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.Tools.dll +0 -0
  50. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.TraceSource.dll +0 -0
  51. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.Tracing.dll +0 -0
  52. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Drawing.Primitives.dll +0 -0
  53. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Drawing.dll +0 -0
  54. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Dynamic.Runtime.dll +0 -0
  55. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Formats.Asn1.dll +0 -0
  56. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Globalization.Calendars.dll +0 -0
  57. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Globalization.Extensions.dll +0 -0
  58. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Globalization.dll +0 -0
  59. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.Compression.Brotli.dll +0 -0
  60. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.Compression.FileSystem.dll +0 -0
  61. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.Compression.ZipFile.dll +0 -0
  62. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.Compression.dll +0 -0
  63. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.FileSystem.AccessControl.dll +0 -0
  64. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.FileSystem.DriveInfo.dll +0 -0
  65. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.FileSystem.Primitives.dll +0 -0
  66. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.FileSystem.Watcher.dll +0 -0
  67. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.FileSystem.dll +0 -0
  68. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.IsolatedStorage.dll +0 -0
  69. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.MemoryMappedFiles.dll +0 -0
  70. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.Pipes.AccessControl.dll +0 -0
  71. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.Pipes.dll +0 -0
  72. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.UnmanagedMemoryStream.dll +0 -0
  73. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.dll +0 -0
  74. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Linq.Expressions.dll +0 -0
  75. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Linq.Parallel.dll +0 -0
  76. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Linq.Queryable.dll +0 -0
  77. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Linq.dll +0 -0
  78. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Memory.dll +0 -0
  79. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.Http.Json.dll +0 -0
  80. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.Http.dll +0 -0
  81. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.HttpListener.dll +0 -0
  82. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.Mail.dll +0 -0
  83. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.NameResolution.dll +0 -0
  84. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.NetworkInformation.dll +0 -0
  85. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.Ping.dll +0 -0
  86. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.Primitives.dll +0 -0
  87. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.Requests.dll +0 -0
  88. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.Security.dll +0 -0
  89. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.ServicePoint.dll +0 -0
  90. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.Sockets.dll +0 -0
  91. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.WebClient.dll +0 -0
  92. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.WebHeaderCollection.dll +0 -0
  93. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.WebProxy.dll +0 -0
  94. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.WebSockets.Client.dll +0 -0
  95. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.WebSockets.dll +0 -0
  96. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.dll +0 -0
  97. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Numerics.Vectors.dll +0 -0
  98. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Numerics.dll +0 -0
  99. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ObjectModel.dll +0 -0
  100. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Private.CoreLib.dll +0 -0
  101. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Private.DataContractSerialization.dll +0 -0
  102. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Private.Uri.dll +0 -0
  103. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Private.Xml.Linq.dll +0 -0
  104. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Private.Xml.dll +0 -0
  105. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.DispatchProxy.dll +0 -0
  106. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.Emit.ILGeneration.dll +0 -0
  107. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.Emit.Lightweight.dll +0 -0
  108. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.Emit.dll +0 -0
  109. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.Extensions.dll +0 -0
  110. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.Metadata.dll +0 -0
  111. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.Primitives.dll +0 -0
  112. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.TypeExtensions.dll +0 -0
  113. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.dll +0 -0
  114. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Resources.Reader.dll +0 -0
  115. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Resources.ResourceManager.dll +0 -0
  116. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Resources.Writer.dll +0 -0
  117. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.CompilerServices.Unsafe.dll +0 -0
  118. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.CompilerServices.VisualC.dll +0 -0
  119. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Extensions.dll +0 -0
  120. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Handles.dll +0 -0
  121. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.InteropServices.RuntimeInformation.dll +0 -0
  122. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.InteropServices.dll +0 -0
  123. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Intrinsics.dll +0 -0
  124. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Loader.dll +0 -0
  125. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Numerics.dll +0 -0
  126. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Serialization.Formatters.dll +0 -0
  127. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Serialization.Json.dll +0 -0
  128. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Serialization.Primitives.dll +0 -0
  129. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Serialization.Xml.dll +0 -0
  130. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Serialization.dll +0 -0
  131. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.dll +0 -0
  132. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.AccessControl.dll +0 -0
  133. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Claims.dll +0 -0
  134. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Cryptography.Algorithms.dll +0 -0
  135. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Cryptography.Cng.dll +0 -0
  136. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Cryptography.Csp.dll +0 -0
  137. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Cryptography.Encoding.dll +0 -0
  138. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Cryptography.OpenSsl.dll +0 -0
  139. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Cryptography.Primitives.dll +0 -0
  140. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Cryptography.X509Certificates.dll +0 -0
  141. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Principal.Windows.dll +0 -0
  142. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Principal.dll +0 -0
  143. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.SecureString.dll +0 -0
  144. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.dll +0 -0
  145. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ServiceModel.Web.dll +0 -0
  146. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ServiceProcess.dll +0 -0
  147. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Text.Encoding.CodePages.dll +0 -0
  148. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Text.Encoding.Extensions.dll +0 -0
  149. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Text.Encoding.dll +0 -0
  150. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Text.Encodings.Web.dll +0 -0
  151. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Text.Json.dll +0 -0
  152. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Text.RegularExpressions.dll +0 -0
  153. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.Channels.dll +0 -0
  154. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.Overlapped.dll +0 -0
  155. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.Tasks.Dataflow.dll +0 -0
  156. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.Tasks.Extensions.dll +0 -0
  157. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.Tasks.Parallel.dll +0 -0
  158. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.Tasks.dll +0 -0
  159. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.Thread.dll +0 -0
  160. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.ThreadPool.dll +0 -0
  161. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.Timer.dll +0 -0
  162. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.dll +0 -0
  163. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Transactions.Local.dll +0 -0
  164. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Transactions.dll +0 -0
  165. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ValueTuple.dll +0 -0
  166. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Web.HttpUtility.dll +0 -0
  167. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Web.dll +0 -0
  168. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Windows.dll +0 -0
  169. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.Linq.dll +0 -0
  170. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.ReaderWriter.dll +0 -0
  171. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.Serialization.dll +0 -0
  172. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.XDocument.dll +0 -0
  173. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.XPath.XDocument.dll +0 -0
  174. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.XPath.dll +0 -0
  175. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.XmlDocument.dll +0 -0
  176. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.XmlSerializer.dll +0 -0
  177. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.dll +0 -0
  178. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.dll +0 -0
  179. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/WindowsBase.dll +0 -0
  180. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-core-console-l1-1-0.dll +0 -0
  181. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-core-console-l1-2-0.dll +0 -0
  182. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-core-datetime-l1-1-0.dll +0 -0
  183. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-core-debug-l1-1-0.dll +0 -0
  184. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-core-errorhandling-l1-1-0.dll +0 -0
  185. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-core-file-l1-1-0.dll +0 -0
  186. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-core-file-l1-2-0.dll +0 -0
  187. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-core-file-l2-1-0.dll +0 -0
  188. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-core-handle-l1-1-0.dll +0 -0
  189. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-core-heap-l1-1-0.dll +0 -0
  190. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-core-interlocked-l1-1-0.dll +0 -0
  191. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-core-libraryloader-l1-1-0.dll +0 -0
  192. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-core-localization-l1-2-0.dll +0 -0
  193. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-core-memory-l1-1-0.dll +0 -0
  194. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-core-namedpipe-l1-1-0.dll +0 -0
  195. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-core-processenvironment-l1-1-0.dll +0 -0
  196. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-core-processthreads-l1-1-0.dll +0 -0
  197. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-core-processthreads-l1-1-1.dll +0 -0
  198. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-core-profile-l1-1-0.dll +0 -0
  199. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-core-rtlsupport-l1-1-0.dll +0 -0
  200. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-core-string-l1-1-0.dll +0 -0
  201. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-core-synch-l1-1-0.dll +0 -0
  202. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-core-synch-l1-2-0.dll +0 -0
  203. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-core-sysinfo-l1-1-0.dll +0 -0
  204. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-core-timezone-l1-1-0.dll +0 -0
  205. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-core-util-l1-1-0.dll +0 -0
  206. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-crt-conio-l1-1-0.dll +0 -0
  207. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-crt-convert-l1-1-0.dll +0 -0
  208. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-crt-environment-l1-1-0.dll +0 -0
  209. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-crt-filesystem-l1-1-0.dll +0 -0
  210. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-crt-heap-l1-1-0.dll +0 -0
  211. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-crt-locale-l1-1-0.dll +0 -0
  212. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-crt-math-l1-1-0.dll +0 -0
  213. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-crt-multibyte-l1-1-0.dll +0 -0
  214. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-crt-private-l1-1-0.dll +0 -0
  215. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-crt-process-l1-1-0.dll +0 -0
  216. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-crt-runtime-l1-1-0.dll +0 -0
  217. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-crt-stdio-l1-1-0.dll +0 -0
  218. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-crt-string-l1-1-0.dll +0 -0
  219. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-crt-time-l1-1-0.dll +0 -0
  220. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/api-ms-win-crt-utility-l1-1-0.dll +0 -0
  221. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/clrcompression.dll +0 -0
  222. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/clretwrc.dll +0 -0
  223. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/clrjit.dll +0 -0
  224. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/coreclr.dll +0 -0
  225. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/createdump.exe +0 -0
  226. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/dbgshim.dll +0 -0
  227. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/hostfxr.dll +0 -0
  228. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/hostpolicy.dll +0 -0
  229. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/mscordaccore.dll +0 -0
  230. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/mscordaccore_amd64_amd64_5.0.1522.11506.dll +0 -0
  231. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/mscordbi.dll +0 -0
  232. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/mscorlib.dll +0 -0
  233. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/mscorrc.dll +0 -0
  234. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/netstandard.dll +0 -0
  235. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/ucrtbase.dll +0 -0
  236. data/bin/ruby_bin_folder/AMD64/vccorlib140.dll +0 -0
  237. data/bin/ruby_bin_folder/AMD64/vcruntime140.dll +0 -0
  238. data/bin/ruby_bin_folder/AMD64/vcruntime140_1.dll +0 -0
  239. data/bin/ruby_bin_folder/x86/Chef.PowerShell.dll +0 -0
  240. data/bin/ruby_bin_folder/x86/Chef.Powershell.Wrapper.dll +0 -0
  241. data/bin/ruby_bin_folder/x86/shared/Microsoft.NETCore.App/5.0.0/Chef.PowerShell.Wrapper.Core.dll +0 -0
  242. data/bin/ruby_bin_folder/x86/shared/Microsoft.NETCore.App/5.0.0/Chef.Powershell.Core.dll +0 -0
  243. data/bin/ruby_bin_folder/x86/shared/Microsoft.NETCore.App/5.0.0/Chef.Powershell.Core.pdb +0 -0
  244. data/bin/ruby_bin_folder/x86/shared/Microsoft.NETCore.App/5.0.0/Newtonsoft.Json.dll +0 -0
  245. data/chef-powershell.gemspec +52 -52
  246. data/lib/chef-powershell/exceptions.rb +1 -1
  247. data/lib/chef-powershell/powershell.rb +21 -32
  248. data/lib/chef-powershell/powershell_exec.rb +6 -6
  249. data/lib/chef-powershell/pwsh.rb +2 -2
  250. data/lib/chef-powershell/version.rb +20 -20
  251. data/lib/chef-powershell.rb +2 -2
  252. data/spec/unit/powershell_exec_spec.rb +36 -7
  253. metadata +4 -5
  254. data/bin/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/mscordaccore_amd64_amd64_5.0.521.16609.dll +0 -0
  255. data/lib/chef-powershell/json_compat.rb +0 -63
@@ -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 = ChefPowerShell::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
@@ -15,7 +15,7 @@
15
15
  # See the License for the specific language governing permissions and
16
16
  # limitations under the License.
17
17
 
18
- class Chef_PowerShell
18
+ class ChefPowerShell
19
19
  class PowerShellExceptions
20
20
  class PowerShellCommandFailed < RuntimeError; end
21
21
 
@@ -16,12 +16,11 @@
16
16
  # limitations under the License.
17
17
 
18
18
  require "ffi" unless defined?(FFI)
19
- require_relative "json_compat"
19
+ autoload :FFI_Yajl, "ffi_yajl"
20
20
  require_relative "exceptions"
21
21
  require_relative "unicode"
22
- # require "chef-powershell"
23
22
 
24
- class Chef_PowerShell
23
+ class ChefPowerShell
25
24
  class PowerShell
26
25
 
27
26
  attr_reader :result
@@ -43,6 +42,8 @@ class Chef_PowerShell
43
42
  # There is no mechanism to build a Windows gem file. It has to be done manually running manual_gem_release.ps1
44
43
  # Bundle install ensures that the correct architecture binaries are installed into the path.
45
44
  @powershell_dll = Gem.loaded_specs["chef-powershell"].full_gem_path + "/bin/ruby_bin_folder/#{ENV["PROCESSOR_ARCHITECTURE"]}/Chef.PowerShell.Wrapper.dll"
45
+ timeout = -1 if timeout.nil? || timeout == 0
46
+
46
47
  exec(script, timeout: timeout)
47
48
  end
48
49
 
@@ -52,56 +53,44 @@ class Chef_PowerShell
52
53
  # @return [Boolean]
53
54
  #
54
55
  def error?
55
- return true if errors.count > 0
56
-
57
- false
56
+ errors.count > 0
58
57
  end
59
58
 
60
59
  #
61
- # @raise [Chef_PowerShell::PowerShellExceptions::PowerShellCommandFailed] raise if the command failed
60
+ # @raise [ChefPowerShell::PowerShellExceptions::PowerShellCommandFailed] raise if the command failed
62
61
  #
63
62
  def error!
64
- raise Chef_PowerShell::PowerShellExceptions::PowerShellCommandFailed, "Unexpected exit in PowerShell command: #{@errors}" if error?
63
+ raise ChefPowerShell::PowerShellExceptions::PowerShellCommandFailed, "Unexpected exit in PowerShell command: #{@errors}" if error?
65
64
  end
66
65
 
67
66
  module PowerMod
68
67
  extend FFI::Library
69
- @@powershell_dll = Gem.loaded_specs["chef-powershell"].full_gem_path + "/bin/ruby_bin_folder/#{ENV["PROCESSOR_ARCHITECTURE"]}/Chef.PowerShell.Wrapper.dll"
70
- @@ps_command = ""
71
- @@ps_timeout = -1
72
-
73
- def self.set_ps_dll(value)
74
- @@powershell_dll = value
75
- end
76
68
 
77
- def self.set_ps_command(value)
78
- @@ps_command = value
69
+ def self.powershell_dll=(powershell_dll)
70
+ @powershell_dll = powershell_dll
79
71
  end
80
72
 
81
- def self.set_ps_timeout(value)
82
- @@ps_timeout = value
73
+ def self.powershell_dll
74
+ @powershell_dll
83
75
  end
84
76
 
85
- def self.do_work
86
- ffi_lib @@powershell_dll
77
+ def self.do_work(ps_command, timeout = -1)
78
+ ffi_lib PowerMod.powershell_dll
87
79
  attach_function :execute_powershell, :ExecuteScript, %i{string int}, :pointer
88
- execute_powershell(@@ps_command, @@ps_timeout)
80
+ execute_powershell(ps_command, timeout)
89
81
  end
90
82
  end
91
83
 
92
84
  private
93
85
 
94
86
  def exec(script, timeout: -1)
95
- timeout = -1 if timeout == 0 || timeout.nil?
96
- PowerMod.set_ps_dll(@powershell_dll)
97
- PowerMod.set_ps_timeout(timeout)
98
- PowerMod.set_ps_command(script)
99
- execution = PowerMod.do_work
100
- output = execution.read_utf16string
101
- hashed_outcome = Chef::JSONCompat.parse(output)
102
- @result = Chef::JSONCompat.parse(hashed_outcome["result"])
103
- @errors = hashed_outcome["errors"]
104
- @verbose = hashed_outcome["verbose"]
87
+ PowerMod.powershell_dll = @powershell_dll
88
+ @execution = PowerMod.do_work(script, timeout)
89
+ @output = @execution.read_utf16string
90
+ @hashed_outcome = FFI_Yajl::Parser.parse(@output)
91
+ @result = FFI_Yajl::Parser.parse(@hashed_outcome["result"])
92
+ @errors = @hashed_outcome["errors"]
93
+ @verbose = @hashed_outcome["verbose"]
105
94
  end
106
95
  end
107
96
  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 Chef_PowerShell::PowerShell object that provides 5 methods:
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 Chef_PowerShell
99
- module ChefPowerShell
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
- Chef_PowerShell::PowerShell.new(script, timeout: timeout)
116
+ ChefPowerShell::PowerShell.new(script, timeout: timeout)
117
117
  when :pwsh
118
- Chef_PowerShell::Pwsh.new(script, timeout: timeout)
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
- # Chef_PowerShell::PowerShellExceptions::PowerShellCommandFailed if the command fails
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!
@@ -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 Chef_PowerShell
19
- class Pwsh < Chef_PowerShell::PowerShell
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 ChefPowerShell
18
- CHEFPOWERSHELL_ROOT = File.expand_path("..", __dir__)
19
- VERSION = "1.0.7"
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 = "3.0.15"
20
+ end
@@ -18,6 +18,6 @@
18
18
 
19
19
  require_relative "chef-powershell/powershell_exec"
20
20
 
21
- module ChefPowerShell
22
- include Chef_PowerShell::ChefPowerShell::PowerShellExec
21
+ module ChefPowerShellModule
22
+ include ChefPowerShell::ChefPowerShellModule::PowerShellExec
23
23
  end
@@ -18,8 +18,8 @@
18
18
 
19
19
  require "chef-powershell"
20
20
 
21
- describe Chef_PowerShell::ChefPowerShell::PowerShellExec, :windows_only do
22
- let(:powershell_mixin) { Class.new { include Chef_PowerShell::ChefPowerShell::PowerShellExec } }
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(Chef_PowerShell::PowerShell)
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(Chef_PowerShell::Pwsh)
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(Chef_PowerShell::PowerShell)
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,15 +80,44 @@ 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(Chef_PowerShell::PowerShell)
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(Chef_PowerShell::PowerShellExceptions::PowerShellCommandFailed)
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
91
91
  expect { object.powershell_exec!("this-should-error", :power_mistake) }.to raise_error(ArgumentError)
92
92
  end
93
+
94
+ let(:cert_script) do
95
+ %q~
96
+ $serverauth = New-SelfSignedCertificate -Subject "chef-Server2019DC" -CertStoreLocation Cert:\CurrentUser\My -KeyExportPolicy 'Exportable' #-Type SSLServerAuthentication
97
+ $rootStore = [System.Security.Cryptography.X509Certificates.X509Store]::new("Root","LocalMachine")
98
+ ## Open the root certificate store for reading and writing.
99
+ $rootStore.Open("ReadWrite")
100
+ ## Add the certificate stored in the $authenticode variable.
101
+ $rootStore.Add($serverauth)
102
+ ## Close the root certificate store.
103
+ $rootStore.Close()
104
+
105
+ $publisherStore = [System.Security.Cryptography.X509Certificates.X509Store]::new("TrustedPublisher","LocalMachine")
106
+ # Open the TrustedPublisher certificate store for reading and writing.
107
+ $publisherStore.Open("ReadWrite")
108
+ ## Add the certificate stored in the $authenticode variable.
109
+ $publisherStore.Add($serverauth)
110
+ ## Close the TrustedPublisher certificate store.
111
+ $publisherStore.Close()
112
+
113
+ # Get the code-signing certificate from the local computer's certificate store with the name *ATA Authenticode* and store it to the $codeCertificate variable.
114
+ $codeCertificate = Get-ChildItem Cert:\CurrentUser\My | Where-Object {$_.Subject -eq "CN=chef-Server2019DC"}
115
+ return [convert]::tobase64string($codeCertificate[0].rawdata)
116
+ ~
117
+ end
118
+ it "runs a command to create and retrieve a certificate" do
119
+ expect { object.powershell_exec!(cert_script) }.not_to raise_error
120
+ end
93
121
  end
122
+
94
123
  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: 1.0.7
4
+ version: 3.0.15
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: 2022-01-07 00:00:00.000000000 Z
11
+ date: 2023-03-10 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.521.16609.dll
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.2.22
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
@@ -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