chef 17.6.15-universal-mingw32 → 17.8.25-universal-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (321) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +5 -0
  3. data/chef.gemspec +1 -0
  4. data/distro/ruby_bin_folder/AMD64/Chef.PowerShell.Wrapper.dll +0 -0
  5. data/distro/ruby_bin_folder/AMD64/Chef.PowerShell.dll +0 -0
  6. data/distro/ruby_bin_folder/AMD64/Ijwhost.dll +0 -0
  7. data/distro/ruby_bin_folder/AMD64/concrt140.dll +0 -0
  8. data/distro/ruby_bin_folder/AMD64/host/fxr/5.0.0/hostfxr.dll +0 -0
  9. data/distro/ruby_bin_folder/AMD64/msvcp140.dll +0 -0
  10. data/distro/ruby_bin_folder/AMD64/msvcp140_1.dll +0 -0
  11. data/distro/ruby_bin_folder/AMD64/msvcp140_2.dll +0 -0
  12. data/distro/ruby_bin_folder/AMD64/msvcp140_atomic_wait.dll +0 -0
  13. data/distro/ruby_bin_folder/AMD64/msvcp140_codecvt_ids.dll +0 -0
  14. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Chef.PowerShell.Wrapper.Core.dll +0 -0
  15. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Chef.Powershell.Core.dll +0 -0
  16. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Chef.Powershell.Core.pdb +0 -0
  17. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Ijwhost.dll +0 -0
  18. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Microsoft.CSharp.dll +0 -0
  19. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Microsoft.NETCore.App.deps.json +180 -180
  20. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Microsoft.VisualBasic.Core.dll +0 -0
  21. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Microsoft.VisualBasic.dll +0 -0
  22. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Microsoft.Win32.Primitives.dll +0 -0
  23. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/Microsoft.Win32.Registry.dll +0 -0
  24. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.AppContext.dll +0 -0
  25. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Buffers.dll +0 -0
  26. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Collections.Concurrent.dll +0 -0
  27. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Collections.Immutable.dll +0 -0
  28. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Collections.NonGeneric.dll +0 -0
  29. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Collections.Specialized.dll +0 -0
  30. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Collections.dll +0 -0
  31. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ComponentModel.Annotations.dll +0 -0
  32. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ComponentModel.DataAnnotations.dll +0 -0
  33. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ComponentModel.EventBasedAsync.dll +0 -0
  34. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ComponentModel.Primitives.dll +0 -0
  35. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ComponentModel.TypeConverter.dll +0 -0
  36. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ComponentModel.dll +0 -0
  37. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Configuration.dll +0 -0
  38. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Console.dll +0 -0
  39. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Core.dll +0 -0
  40. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Data.Common.dll +0 -0
  41. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Data.DataSetExtensions.dll +0 -0
  42. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Data.dll +0 -0
  43. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.Contracts.dll +0 -0
  44. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.Debug.dll +0 -0
  45. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.DiagnosticSource.dll +0 -0
  46. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.FileVersionInfo.dll +0 -0
  47. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.Process.dll +0 -0
  48. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.StackTrace.dll +0 -0
  49. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.TextWriterTraceListener.dll +0 -0
  50. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.Tools.dll +0 -0
  51. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.TraceSource.dll +0 -0
  52. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Diagnostics.Tracing.dll +0 -0
  53. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Drawing.Primitives.dll +0 -0
  54. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Drawing.dll +0 -0
  55. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Dynamic.Runtime.dll +0 -0
  56. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Formats.Asn1.dll +0 -0
  57. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Globalization.Calendars.dll +0 -0
  58. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Globalization.Extensions.dll +0 -0
  59. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Globalization.dll +0 -0
  60. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.Compression.Brotli.dll +0 -0
  61. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.Compression.FileSystem.dll +0 -0
  62. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.Compression.ZipFile.dll +0 -0
  63. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.Compression.dll +0 -0
  64. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.FileSystem.AccessControl.dll +0 -0
  65. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.FileSystem.DriveInfo.dll +0 -0
  66. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.FileSystem.Primitives.dll +0 -0
  67. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.FileSystem.Watcher.dll +0 -0
  68. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.FileSystem.dll +0 -0
  69. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.IsolatedStorage.dll +0 -0
  70. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.MemoryMappedFiles.dll +0 -0
  71. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.Pipes.AccessControl.dll +0 -0
  72. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.Pipes.dll +0 -0
  73. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.UnmanagedMemoryStream.dll +0 -0
  74. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.IO.dll +0 -0
  75. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Linq.Expressions.dll +0 -0
  76. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Linq.Parallel.dll +0 -0
  77. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Linq.Queryable.dll +0 -0
  78. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Linq.dll +0 -0
  79. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Memory.dll +0 -0
  80. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.Http.Json.dll +0 -0
  81. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.Http.dll +0 -0
  82. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.HttpListener.dll +0 -0
  83. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.Mail.dll +0 -0
  84. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.NameResolution.dll +0 -0
  85. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.NetworkInformation.dll +0 -0
  86. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.Ping.dll +0 -0
  87. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.Primitives.dll +0 -0
  88. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.Requests.dll +0 -0
  89. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.Security.dll +0 -0
  90. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.ServicePoint.dll +0 -0
  91. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.Sockets.dll +0 -0
  92. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.WebClient.dll +0 -0
  93. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.WebHeaderCollection.dll +0 -0
  94. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.WebProxy.dll +0 -0
  95. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.WebSockets.Client.dll +0 -0
  96. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.WebSockets.dll +0 -0
  97. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Net.dll +0 -0
  98. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Numerics.Vectors.dll +0 -0
  99. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Numerics.dll +0 -0
  100. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ObjectModel.dll +0 -0
  101. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Private.CoreLib.dll +0 -0
  102. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Private.DataContractSerialization.dll +0 -0
  103. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Private.Uri.dll +0 -0
  104. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Private.Xml.Linq.dll +0 -0
  105. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Private.Xml.dll +0 -0
  106. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.DispatchProxy.dll +0 -0
  107. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.Emit.ILGeneration.dll +0 -0
  108. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.Emit.Lightweight.dll +0 -0
  109. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.Emit.dll +0 -0
  110. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.Extensions.dll +0 -0
  111. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.Metadata.dll +0 -0
  112. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.Primitives.dll +0 -0
  113. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.TypeExtensions.dll +0 -0
  114. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Reflection.dll +0 -0
  115. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Resources.Reader.dll +0 -0
  116. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Resources.ResourceManager.dll +0 -0
  117. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Resources.Writer.dll +0 -0
  118. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.CompilerServices.Unsafe.dll +0 -0
  119. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.CompilerServices.VisualC.dll +0 -0
  120. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Extensions.dll +0 -0
  121. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Handles.dll +0 -0
  122. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.InteropServices.RuntimeInformation.dll +0 -0
  123. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.InteropServices.dll +0 -0
  124. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Intrinsics.dll +0 -0
  125. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Loader.dll +0 -0
  126. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Numerics.dll +0 -0
  127. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Serialization.Formatters.dll +0 -0
  128. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Serialization.Json.dll +0 -0
  129. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Serialization.Primitives.dll +0 -0
  130. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Serialization.Xml.dll +0 -0
  131. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.Serialization.dll +0 -0
  132. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Runtime.dll +0 -0
  133. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.AccessControl.dll +0 -0
  134. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Claims.dll +0 -0
  135. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Cryptography.Algorithms.dll +0 -0
  136. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Cryptography.Cng.dll +0 -0
  137. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Cryptography.Csp.dll +0 -0
  138. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Cryptography.Encoding.dll +0 -0
  139. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Cryptography.OpenSsl.dll +0 -0
  140. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Cryptography.Primitives.dll +0 -0
  141. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Cryptography.X509Certificates.dll +0 -0
  142. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Principal.Windows.dll +0 -0
  143. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.Principal.dll +0 -0
  144. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.SecureString.dll +0 -0
  145. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Security.dll +0 -0
  146. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ServiceModel.Web.dll +0 -0
  147. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ServiceProcess.dll +0 -0
  148. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Text.Encoding.CodePages.dll +0 -0
  149. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Text.Encoding.Extensions.dll +0 -0
  150. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Text.Encoding.dll +0 -0
  151. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Text.Encodings.Web.dll +0 -0
  152. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Text.Json.dll +0 -0
  153. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Text.RegularExpressions.dll +0 -0
  154. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.Channels.dll +0 -0
  155. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.Overlapped.dll +0 -0
  156. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.Tasks.Dataflow.dll +0 -0
  157. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.Tasks.Extensions.dll +0 -0
  158. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.Tasks.Parallel.dll +0 -0
  159. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.Tasks.dll +0 -0
  160. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.Thread.dll +0 -0
  161. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.ThreadPool.dll +0 -0
  162. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.Timer.dll +0 -0
  163. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Threading.dll +0 -0
  164. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Transactions.Local.dll +0 -0
  165. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Transactions.dll +0 -0
  166. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.ValueTuple.dll +0 -0
  167. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Web.HttpUtility.dll +0 -0
  168. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Web.dll +0 -0
  169. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Windows.dll +0 -0
  170. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.Linq.dll +0 -0
  171. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.ReaderWriter.dll +0 -0
  172. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.Serialization.dll +0 -0
  173. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.XDocument.dll +0 -0
  174. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.XPath.XDocument.dll +0 -0
  175. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.XPath.dll +0 -0
  176. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.XmlDocument.dll +0 -0
  177. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.XmlSerializer.dll +0 -0
  178. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.Xml.dll +0 -0
  179. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/System.dll +0 -0
  180. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/WindowsBase.dll +0 -0
  181. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/clrcompression.dll +0 -0
  182. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/clretwrc.dll +0 -0
  183. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/clrjit.dll +0 -0
  184. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/coreclr.dll +0 -0
  185. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/createdump.exe +0 -0
  186. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/dbgshim.dll +0 -0
  187. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/hostfxr.dll +0 -0
  188. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/hostpolicy.dll +0 -0
  189. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/mscordaccore.dll +0 -0
  190. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/mscordaccore_amd64_amd64_5.0.521.16609.dll +0 -0
  191. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/mscordbi.dll +0 -0
  192. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/mscorlib.dll +0 -0
  193. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/mscorrc.dll +0 -0
  194. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/netstandard.dll +0 -0
  195. data/distro/ruby_bin_folder/AMD64/vccorlib140.dll +0 -0
  196. data/distro/ruby_bin_folder/AMD64/vcruntime140.dll +0 -0
  197. data/distro/ruby_bin_folder/AMD64/vcruntime140_1.dll +0 -0
  198. data/distro/ruby_bin_folder/x86/Chef.PowerShell.dll +0 -0
  199. data/distro/ruby_bin_folder/x86/Chef.Powershell.Wrapper.dll +0 -0
  200. data/distro/ruby_bin_folder/x86/concrt140.dll +0 -0
  201. data/distro/ruby_bin_folder/x86/msvcp140.dll +0 -0
  202. data/distro/ruby_bin_folder/x86/msvcp140_1.dll +0 -0
  203. data/distro/ruby_bin_folder/x86/msvcp140_2.dll +0 -0
  204. data/distro/ruby_bin_folder/x86/msvcp140_atomic_wait.dll +0 -0
  205. data/distro/ruby_bin_folder/x86/msvcp140_codecvt_ids.dll +0 -0
  206. data/distro/ruby_bin_folder/x86/shared/Microsoft.NETCore.App/5.0.0/Chef.PowerShell.Wrapper.Core.dll +0 -0
  207. data/distro/ruby_bin_folder/x86/shared/Microsoft.NETCore.App/5.0.0/Chef.Powershell.Core.dll +0 -0
  208. data/distro/ruby_bin_folder/x86/shared/Microsoft.NETCore.App/5.0.0/Chef.Powershell.Core.pdb +0 -0
  209. data/distro/ruby_bin_folder/x86/vccorlib140.dll +0 -0
  210. data/distro/ruby_bin_folder/x86/vcruntime140.dll +0 -0
  211. data/lib/chef/application/base.rb +1 -1
  212. data/lib/chef/chef_fs/file_pattern.rb +1 -1
  213. data/lib/chef/chef_fs/path_utils.rb +1 -1
  214. data/lib/chef/compliance/default_attributes.rb +12 -2
  215. data/lib/chef/compliance/runner.rb +51 -5
  216. data/lib/chef/data_collector/run_end_message.rb +1 -1
  217. data/lib/chef/dsl/reboot_pending.rb +1 -1
  218. data/lib/chef/exceptions.rb +10 -0
  219. data/lib/chef/mixin/powershell_exec.rb +6 -5
  220. data/lib/chef/mixin/why_run.rb +8 -2
  221. data/lib/chef/powershell.rb +8 -6
  222. data/lib/chef/provider/cron.rb +4 -1
  223. data/lib/chef/provider/git.rb +1 -1
  224. data/lib/chef/provider/ifconfig/debian.rb +1 -1
  225. data/lib/chef/provider/mount/linux.rb +16 -2
  226. data/lib/chef/provider/mount/mount.rb +1 -1
  227. data/lib/chef/provider/package/dnf.rb +1 -1
  228. data/lib/chef/provider/package/habitat.rb +1 -1
  229. data/lib/chef/provider/package/powershell.rb +13 -10
  230. data/lib/chef/provider/package/zypper.rb +2 -0
  231. data/lib/chef/provider/package.rb +58 -23
  232. data/lib/chef/provider/subversion.rb +5 -5
  233. data/lib/chef/provider.rb +1 -1
  234. data/lib/chef/pwsh.rb +3 -2
  235. data/lib/chef/resource/chef_client_config.rb +22 -1
  236. data/lib/chef/resource/chef_client_launchd.rb +1 -1
  237. data/lib/chef/resource/chef_client_trusted_certificate.rb +1 -0
  238. data/lib/chef/resource/chocolatey_config.rb +1 -1
  239. data/lib/chef/resource/chocolatey_feature.rb +1 -1
  240. data/lib/chef/resource/chocolatey_source.rb +24 -2
  241. data/lib/chef/resource/directory.rb +1 -1
  242. data/lib/chef/resource/dnf_package.rb +4 -6
  243. data/lib/chef/resource/dpkg_package.rb +5 -0
  244. data/lib/chef/resource/execute.rb +1 -4
  245. data/lib/chef/resource/habitat_install.rb +5 -5
  246. data/lib/chef/resource/inspec_waiver.rb +1 -1
  247. data/lib/chef/resource/inspec_waiver_file_entry.rb +1 -1
  248. data/lib/chef/resource/kernel_module.rb +27 -2
  249. data/lib/chef/resource/launchd.rb +0 -3
  250. data/lib/chef/resource/macos_userdefaults.rb +41 -131
  251. data/lib/chef/resource/rhsm_register.rb +31 -0
  252. data/lib/chef/resource/support/client.erb +7 -0
  253. data/lib/chef/resource/windows_auto_run.rb +1 -1
  254. data/lib/chef/resource/windows_dfs_namespace.rb +2 -2
  255. data/lib/chef/resource/windows_feature_powershell.rb +7 -7
  256. data/lib/chef/resource/windows_update_settings.rb +3 -3
  257. data/lib/chef/resource.rb +2 -2
  258. data/lib/chef/resource_reporter.rb +1 -1
  259. data/lib/chef/secret_fetcher/azure_key_vault.rb +62 -8
  260. data/lib/chef/secret_fetcher.rb +0 -1
  261. data/lib/chef/version.rb +1 -1
  262. data/spec/functional/dsl/reboot_pending_spec.rb +3 -3
  263. data/spec/functional/dsl/registry_helper_spec.rb +1 -1
  264. data/spec/functional/resource/dnf_package_spec.rb +34 -20
  265. data/spec/functional/resource/dpkg_package_spec.rb +16 -0
  266. data/spec/functional/resource/dsc_script_spec.rb +2 -2
  267. data/spec/functional/resource/macos_userdefaults_spec.rb +139 -0
  268. data/spec/functional/resource/registry_spec.rb +81 -81
  269. data/spec/functional/resource/zypper_package_spec.rb +7 -0
  270. data/spec/functional/win32/registry_spec.rb +8 -8
  271. data/spec/integration/client/client_spec.rb +31 -0
  272. data/spec/unit/application/base_spec.rb +40 -0
  273. data/spec/unit/compliance/runner_spec.rb +62 -1
  274. data/spec/unit/data_collector_spec.rb +24 -1
  275. data/spec/unit/dsl/reboot_pending_spec.rb +1 -1
  276. data/spec/unit/file_access_control_spec.rb +1 -1
  277. data/spec/unit/mixin/default_paths_spec.rb +1 -1
  278. data/spec/unit/mixin/securable_spec.rb +3 -3
  279. data/spec/unit/mixin/why_run_spec.rb +53 -0
  280. data/spec/unit/provider/cron_spec.rb +45 -0
  281. data/spec/unit/provider/group/groupadd_spec.rb +1 -0
  282. data/spec/unit/provider/group/usermod_spec.rb +2 -2
  283. data/spec/unit/provider/ifconfig_spec.rb +2 -0
  284. data/spec/unit/provider/mount/linux_spec.rb +16 -3
  285. data/spec/unit/provider/package/bff_spec.rb +1 -0
  286. data/spec/unit/provider/package/powershell_spec.rb +114 -114
  287. data/spec/unit/provider/package/rubygems_spec.rb +8 -5
  288. data/spec/unit/provider/package/solaris_spec.rb +1 -0
  289. data/spec/unit/provider/package/windows_spec.rb +1 -1
  290. data/spec/unit/provider/registry_key_spec.rb +4 -4
  291. data/spec/unit/provider/service/arch_service_spec.rb +2 -2
  292. data/spec/unit/provider/service/debian_service_spec.rb +1 -0
  293. data/spec/unit/provider/service/gentoo_service_spec.rb +1 -0
  294. data/spec/unit/provider/service/macosx_spec.rb +1 -0
  295. data/spec/unit/provider/service/redhat_spec.rb +4 -1
  296. data/spec/unit/provider/service/simple_service_spec.rb +6 -4
  297. data/spec/unit/provider/service/windows_spec.rb +5 -5
  298. data/spec/unit/provider/subversion_spec.rb +4 -4
  299. data/spec/unit/provider/user_spec.rb +2 -0
  300. data/spec/unit/provider/windows_env_spec.rb +1 -1
  301. data/spec/unit/provider/zypper_repository_spec.rb +1 -1
  302. data/spec/unit/resource/chef_client_trusted_certificate_spec.rb +14 -0
  303. data/spec/unit/resource/chocolatey_config_spec.rb +1 -1
  304. data/spec/unit/resource/chocolatey_feature_spec.rb +1 -1
  305. data/spec/unit/resource/chocolatey_source_spec.rb +1 -1
  306. data/spec/unit/resource/dpkg_package_spec.rb +12 -0
  307. data/spec/unit/resource/kernel_module_spec.rb +2 -1
  308. data/spec/unit/resource/macos_user_defaults_spec.rb +36 -96
  309. data/spec/unit/resource/registry_key_spec.rb +10 -10
  310. data/spec/unit/resource/rhsm_register_spec.rb +42 -0
  311. data/spec/unit/resource/windows_auto_run_spec.rb +1 -1
  312. data/spec/unit/resource/windows_feature_powershell_spec.rb +1 -1
  313. data/spec/unit/resource/windows_firewall_rule_spec.rb +2 -2
  314. data/spec/unit/resource/windows_task_spec.rb +3 -3
  315. data/spec/unit/resource_reporter_spec.rb +2 -2
  316. data/spec/unit/resource_spec.rb +5 -0
  317. data/spec/unit/secret_fetcher/azure_key_vault_spec.rb +99 -20
  318. data/spec/unit/util/backup_spec.rb +1 -1
  319. data/spec/unit/win32/registry_spec.rb +3 -3
  320. metadata +25 -8
  321. data/distro/ruby_bin_folder/AMD64/shared/Microsoft.NETCore.App/5.0.0/mscordaccore_amd64_amd64_5.0.20.51904.dll +0 -0
@@ -17,10 +17,10 @@
17
17
  #
18
18
 
19
19
  require "spec_helper"
20
- require "chef/mixin/powershell_out"
20
+ require "chef/mixin/powershell_exec"
21
21
 
22
22
  describe Chef::Provider::Package::Powershell, :windows_only, :windows_gte_10 do
23
- include Chef::Mixin::PowershellOut
23
+ include Chef::Mixin::PowershellExec
24
24
  let(:timeout) { 900 }
25
25
  let(:source) { nil }
26
26
 
@@ -35,63 +35,63 @@ describe Chef::Provider::Package::Powershell, :windows_only, :windows_gte_10 do
35
35
  end
36
36
 
37
37
  let(:package_xcertificate_installed) do
38
- double("powershell_out", stdout: "2.1.0.0\r\n")
38
+ double("powershell_exec", result: "2.1.0.0\r\n")
39
39
  end
40
40
 
41
41
  let(:package_xcertificate_installed_2_0_0_0) do
42
- double("powershell_out", stdout: "2.0.0.0\r\n")
42
+ double("powershell_exec", result: "2.0.0.0\r\n")
43
43
  end
44
44
 
45
45
  let(:package_xcertificate_available) do
46
- double("powershell_out", stdout: "2.1.0.0\r\n")
46
+ double("powershell_exec", result: "2.1.0.0\r\n")
47
47
  end
48
48
 
49
49
  let(:package_xcertificate_available_2_0_0_0) do
50
- double("powershell_out", stdout: "2.0.0.0\r\n")
50
+ double("powershell_exec", result: "2.0.0.0\r\n")
51
51
  end
52
52
 
53
53
  let(:package_xcertificate_not_installed) do
54
- double("powershell_out", stdout: "")
54
+ double("powershell_exec", result: "")
55
55
  end
56
56
 
57
57
  let(:package_xcertificate_not_available) do
58
- double("powershell_out", stdout: "")
58
+ double("powershell_exec", result: "")
59
59
  end
60
60
 
61
61
  let(:package_xnetworking_installed) do
62
- double("powershell_out", stdout: "2.12.0.0\r\n")
62
+ double("powershell_exec", result: "2.12.0.0\r\n")
63
63
  end
64
64
 
65
65
  let(:package_xnetworking_installed_2_11_0_0) do
66
- double("powershell_out", stdout: "2.11.0.0\r\n")
66
+ double("powershell_exec", result: "2.11.0.0\r\n")
67
67
  end
68
68
 
69
69
  let(:package_xnetworking_available) do
70
- double("powershell_out", stdout: "2.12.0.0\r\n")
70
+ double("powershell_exec", result: "2.12.0.0\r\n")
71
71
  end
72
72
 
73
73
  let(:package_xnetworking_available_2_11_0_0) do
74
- double("powershell_out", stdout: "2.11.0.0\r\n")
74
+ double("powershell_exec", result: "2.11.0.0\r\n")
75
75
  end
76
76
 
77
77
  let(:package_xnetworking_not_installed) do
78
- double("powershell_out", stdout: "")
78
+ double("powershell_exec", result: "")
79
79
  end
80
80
 
81
81
  let(:package_xnetworking_not_available) do
82
- double("powershell_out", stdout: "")
82
+ double("powershell_exec", result: "")
83
83
  end
84
84
 
85
85
  let(:package_7zip_available) do
86
- double("powershell_out", stdout: "16.02\r\n")
86
+ double("powershell_exec", result: "16.02\r\n")
87
87
  end
88
88
 
89
89
  let(:package_7zip_not_installed) do
90
- double("powershell_out", stdout: "")
90
+ double("powershell_exec", result: "")
91
91
  end
92
92
 
93
93
  let(:powershell_installed_version) do
94
- double("powershell_out", stdout: "5")
94
+ double("powershell_exec", result: "5")
95
95
  end
96
96
 
97
97
  let(:tls_set_command) { "if ([Net.ServicePointManager]::SecurityProtocol -lt [Net.SecurityProtocolType]::Tls12) { [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 };" }
@@ -122,14 +122,14 @@ describe Chef::Provider::Package::Powershell, :windows_only, :windows_gte_10 do
122
122
  describe "#candidate_version" do
123
123
 
124
124
  it "should set the candidate_version to the latest version when not pinning" do
125
- allow(provider).to receive(:powershell_out).with("#{tls_set_command} ( Find-Package 'xNetworking' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xnetworking_available)
125
+ allow(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Find-Package 'xNetworking' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xnetworking_available)
126
126
  new_resource.package_name(["xNetworking"])
127
127
  new_resource.version(nil)
128
128
  expect(provider.candidate_version).to eql(["2.12.0.0"])
129
129
  end
130
130
 
131
131
  it "should use the candidate_version from the correct source" do
132
- allow(provider).to receive(:powershell_out).with("#{tls_set_command} ( Find-Package 'xNetworking' -Force -ForceBootstrap -WarningAction SilentlyContinue -Source MyGallery ).Version", { timeout: new_resource.timeout }).and_return(package_xnetworking_available)
132
+ allow(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Find-Package 'xNetworking' -Force -ForceBootstrap -WarningAction SilentlyContinue -Source MyGallery ).Version", { timeout: new_resource.timeout }).and_return(package_xnetworking_available)
133
133
  new_resource.package_name(["xNetworking"])
134
134
  new_resource.version(nil)
135
135
  new_resource.source("MyGallery")
@@ -137,60 +137,60 @@ describe Chef::Provider::Package::Powershell, :windows_only, :windows_gte_10 do
137
137
  end
138
138
 
139
139
  it "should set the candidate_version to the latest version when not pinning and package name is space separated" do
140
- allow(provider).to receive(:powershell_out).with("#{tls_set_command} ( Find-Package '7-Zip 16.02 (x64)' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_7zip_available)
140
+ allow(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Find-Package '7-Zip 16.02 (x64)' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_7zip_available)
141
141
  new_resource.package_name(["7-Zip 16.02 (x64)"])
142
142
  new_resource.version(nil)
143
143
  expect(provider.candidate_version).to eql(["16.02"])
144
144
  end
145
145
 
146
146
  it "should set the candidate_version to pinned version if available" do
147
- allow(provider).to receive(:powershell_out).with("#{tls_set_command} ( Find-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue -RequiredVersion 2.0.0.0 ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_available_2_0_0_0)
147
+ allow(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Find-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue -RequiredVersion 2.0.0.0 ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_available_2_0_0_0)
148
148
  new_resource.package_name(["xCertificate"])
149
149
  new_resource.version(["2.0.0.0"])
150
150
  expect(provider.candidate_version).to eql(["2.0.0.0"])
151
151
  end
152
152
 
153
153
  it "should set the candidate_version to nil if there is no candidate" do
154
- allow(provider).to receive(:powershell_out).with("#{tls_set_command} ( Find-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_not_available)
154
+ allow(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Find-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_not_available)
155
155
  new_resource.package_name(["xCertificate"])
156
156
  expect(provider.candidate_version).to eql([nil])
157
157
  end
158
158
 
159
159
  it "should set the candidate_version correctly when there are two packages to install" do
160
- allow(provider).to receive(:powershell_out).with("#{tls_set_command} ( Find-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_available)
161
- allow(provider).to receive(:powershell_out).with("#{tls_set_command} ( Find-Package 'xNetworking' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xnetworking_available)
160
+ allow(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Find-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_available)
161
+ allow(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Find-Package 'xNetworking' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xnetworking_available)
162
162
  new_resource.package_name(%w{xCertificate xNetworking})
163
163
  new_resource.version(nil)
164
164
  expect(provider.candidate_version).to eql(["2.1.0.0", "2.12.0.0"])
165
165
  end
166
166
 
167
167
  it "should set the candidate_version correctly when only the first is installable" do
168
- allow(provider).to receive(:powershell_out).with("#{tls_set_command} ( Find-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_available)
169
- allow(provider).to receive(:powershell_out).with("#{tls_set_command} ( Find-Package 'xNetworking' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xnetworking_not_available)
168
+ allow(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Find-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_available)
169
+ allow(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Find-Package 'xNetworking' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xnetworking_not_available)
170
170
  new_resource.package_name(%w{xCertificate xNetworking})
171
171
  new_resource.version(nil)
172
172
  expect(provider.candidate_version).to eql(["2.1.0.0", nil])
173
173
  end
174
174
 
175
175
  it "should set the candidate_version correctly when only the last is installable" do
176
- allow(provider).to receive(:powershell_out).with("#{tls_set_command} ( Find-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_not_available)
177
- allow(provider).to receive(:powershell_out).with("#{tls_set_command} ( Find-Package 'xNetworking' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xnetworking_available)
176
+ allow(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Find-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_not_available)
177
+ allow(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Find-Package 'xNetworking' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xnetworking_available)
178
178
  new_resource.package_name(%w{xCertificate xNetworking})
179
179
  new_resource.version(nil)
180
180
  expect(provider.candidate_version).to eql([nil, "2.12.0.0"])
181
181
  end
182
182
 
183
183
  it "should set the candidate_version correctly when neither are is installable and version is passed as nil array" do
184
- allow(provider).to receive(:powershell_out).with("#{tls_set_command} ( Find-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_not_available)
185
- allow(provider).to receive(:powershell_out).with("#{tls_set_command} ( Find-Package 'xNetworking' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xnetworking_not_available)
184
+ allow(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Find-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_not_available)
185
+ allow(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Find-Package 'xNetworking' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xnetworking_not_available)
186
186
  new_resource.package_name(%w{xNetworking xCertificate})
187
187
  new_resource.version([nil, nil])
188
188
  expect(provider.candidate_version).to eql([nil, nil])
189
189
  end
190
190
 
191
191
  it "should set the candidate_version correctly when neither are is installable and version is not passed" do
192
- allow(provider).to receive(:powershell_out).with("#{tls_set_command} ( Find-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_not_available)
193
- allow(provider).to receive(:powershell_out).with("#{tls_set_command} ( Find-Package 'xNetworking' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xnetworking_not_available)
192
+ allow(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Find-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_not_available)
193
+ allow(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Find-Package 'xNetworking' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xnetworking_not_available)
194
194
  new_resource.package_name(%w{xNetworking xCertificate})
195
195
  new_resource.version(nil)
196
196
  expect(provider.candidate_version).to eql([nil, nil])
@@ -322,10 +322,10 @@ describe Chef::Provider::Package::Powershell, :windows_only, :windows_gte_10 do
322
322
  provider.load_current_resource
323
323
  new_resource.package_name(["xCertificate"])
324
324
  new_resource.version(nil)
325
- allow(provider).to receive(:powershell_out).with("#{tls_set_command} ( Find-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_available)
326
- allow(provider).to receive(:powershell_out).with("#{tls_set_command} ( Get-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_not_available)
327
- allow(provider).to receive(:powershell_out).with("$PSVersionTable.PSVersion.Major").and_return(powershell_installed_version)
328
- expect(provider).to receive(:powershell_out).with("#{tls_set_command} ( Install-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue -RequiredVersion 2.1.0.0 ).Version", { timeout: new_resource.timeout })
325
+ allow(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Find-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_available)
326
+ allow(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Get-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_not_available)
327
+ allow(provider).to receive(:powershell_exec).with("$PSVersionTable.PSVersion.Major").and_return(powershell_installed_version)
328
+ expect(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Install-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue -RequiredVersion 2.1.0.0 ).Version", { timeout: new_resource.timeout })
329
329
  provider.run_action(:install)
330
330
  expect(new_resource).to be_updated_by_last_action
331
331
  end
@@ -335,10 +335,10 @@ describe Chef::Provider::Package::Powershell, :windows_only, :windows_gte_10 do
335
335
  new_resource.package_name(["xCertificate"])
336
336
  new_resource.version(nil)
337
337
  new_resource.source("MyGallery")
338
- allow(provider).to receive(:powershell_out).with("#{tls_set_command} ( Find-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue -Source MyGallery ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_available)
339
- allow(provider).to receive(:powershell_out).with("#{tls_set_command} ( Get-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_not_available)
340
- allow(provider).to receive(:powershell_out).with("$PSVersionTable.PSVersion.Major").and_return(powershell_installed_version)
341
- expect(provider).to receive(:powershell_out).with("#{tls_set_command} ( Install-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue -RequiredVersion 2.1.0.0 -Source MyGallery ).Version", { timeout: new_resource.timeout })
338
+ allow(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Find-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue -Source MyGallery ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_available)
339
+ allow(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Get-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_not_available)
340
+ allow(provider).to receive(:powershell_exec).with("$PSVersionTable.PSVersion.Major").and_return(powershell_installed_version)
341
+ expect(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Install-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue -RequiredVersion 2.1.0.0 -Source MyGallery ).Version", { timeout: new_resource.timeout })
342
342
  provider.run_action(:install)
343
343
  expect(new_resource).to be_updated_by_last_action
344
344
  end
@@ -348,10 +348,10 @@ describe Chef::Provider::Package::Powershell, :windows_only, :windows_gte_10 do
348
348
  new_resource.package_name(["xCertificate"])
349
349
  new_resource.version(nil)
350
350
  new_resource.skip_publisher_check(true)
351
- allow(provider).to receive(:powershell_out).with("#{tls_set_command} ( Find-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_available)
352
- allow(provider).to receive(:powershell_out).with("#{tls_set_command} ( Get-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue -SkipPublisherCheck ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_not_available)
353
- allow(provider).to receive(:powershell_out).with("$PSVersionTable.PSVersion.Major").and_return(powershell_installed_version)
354
- expect(provider).to receive(:powershell_out).with("#{tls_set_command} ( Install-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue -RequiredVersion 2.1.0.0 -SkipPublisherCheck ).Version", { timeout: new_resource.timeout })
351
+ allow(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Find-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_available)
352
+ allow(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Get-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue -SkipPublisherCheck ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_not_available)
353
+ allow(provider).to receive(:powershell_exec).with("$PSVersionTable.PSVersion.Major").and_return(powershell_installed_version)
354
+ expect(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Install-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue -RequiredVersion 2.1.0.0 -SkipPublisherCheck ).Version", { timeout: new_resource.timeout })
355
355
  provider.run_action(:install)
356
356
  expect(new_resource).to be_updated_by_last_action
357
357
  end
@@ -360,10 +360,10 @@ describe Chef::Provider::Package::Powershell, :windows_only, :windows_gte_10 do
360
360
  provider.load_current_resource
361
361
  new_resource.package_name(["7-Zip 16.02 (x64)"])
362
362
  new_resource.version(nil)
363
- allow(provider).to receive(:powershell_out).with("#{tls_set_command} ( Find-Package '7-Zip 16.02 (x64)' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_7zip_available)
364
- allow(provider).to receive(:powershell_out).with("#{tls_set_command} ( Get-Package '7-Zip 16.02 (x64)' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_7zip_not_installed)
365
- allow(provider).to receive(:powershell_out).with("$PSVersionTable.PSVersion.Major").and_return(powershell_installed_version)
366
- expect(provider).to receive(:powershell_out).with("#{tls_set_command} ( Install-Package '7-Zip 16.02 (x64)' -Force -ForceBootstrap -WarningAction SilentlyContinue -RequiredVersion 16.02 ).Version", { timeout: new_resource.timeout })
363
+ allow(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Find-Package '7-Zip 16.02 (x64)' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_7zip_available)
364
+ allow(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Get-Package '7-Zip 16.02 (x64)' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_7zip_not_installed)
365
+ allow(provider).to receive(:powershell_exec).with("$PSVersionTable.PSVersion.Major").and_return(powershell_installed_version)
366
+ expect(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Install-Package '7-Zip 16.02 (x64)' -Force -ForceBootstrap -WarningAction SilentlyContinue -RequiredVersion 16.02 ).Version", { timeout: new_resource.timeout })
367
367
  provider.run_action(:install)
368
368
  expect(new_resource).to be_updated_by_last_action
369
369
  end
@@ -375,10 +375,10 @@ describe Chef::Provider::Package::Powershell, :windows_only, :windows_gte_10 do
375
375
  provider.load_current_resource
376
376
  new_resource.package_name(["xCertificate"])
377
377
  new_resource.version(nil)
378
- allow(provider).to receive(:powershell_out).with("#{tls_set_command} ( Find-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_available)
379
- allow(provider).to receive(:powershell_out).with("#{tls_set_command} ( Get-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_not_available)
380
- allow(provider).to receive(:powershell_out).with("$PSVersionTable.PSVersion.Major").and_return(powershell_installed_version)
381
- expect(provider).to receive(:powershell_out).with("#{tls_set_command} ( Install-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue -RequiredVersion 2.1.0.0 ).Version", { timeout: new_resource.timeout })
378
+ allow(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Find-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_available)
379
+ allow(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Get-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_not_available)
380
+ allow(provider).to receive(:powershell_exec).with("$PSVersionTable.PSVersion.Major").and_return(powershell_installed_version)
381
+ expect(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Install-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue -RequiredVersion 2.1.0.0 ).Version", { timeout: new_resource.timeout })
382
382
  provider.run_action(:install)
383
383
  expect(new_resource).to be_updated_by_last_action
384
384
  end
@@ -387,9 +387,9 @@ describe Chef::Provider::Package::Powershell, :windows_only, :windows_gte_10 do
387
387
  it "should not install packages that are up-to-date" do
388
388
  new_resource.package_name(["xCertificate"])
389
389
  new_resource.version(nil)
390
- allow(provider).to receive(:powershell_out).with("#{tls_set_command} ( Find-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_available)
391
- allow(provider).to receive(:powershell_out).with("#{tls_set_command} ( Get-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_available)
392
- allow(provider).to receive(:powershell_out).with("$PSVersionTable.PSVersion.Major").and_return(powershell_installed_version)
390
+ allow(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Find-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_available)
391
+ allow(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Get-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_available)
392
+ allow(provider).to receive(:powershell_exec).with("$PSVersionTable.PSVersion.Major").and_return(powershell_installed_version)
393
393
  provider.load_current_resource
394
394
  expect(provider).not_to receive(:install_package)
395
395
  provider.run_action(:install)
@@ -399,9 +399,9 @@ describe Chef::Provider::Package::Powershell, :windows_only, :windows_gte_10 do
399
399
  it "should not install packages that are up-to-date" do
400
400
  new_resource.package_name(["xNetworking"])
401
401
  new_resource.version(["2.11.0.0"])
402
- allow(provider).to receive(:powershell_out).with("#{tls_set_command} ( Find-Package 'xNetworking' -Force -ForceBootstrap -WarningAction SilentlyContinue -RequiredVersion 2.11.0.0 ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_available)
403
- allow(provider).to receive(:powershell_out).with("#{tls_set_command} ( Get-Package 'xNetworking' -Force -ForceBootstrap -WarningAction SilentlyContinue -RequiredVersion 2.11.0.0 ).Version", { timeout: new_resource.timeout }).and_return(package_xnetworking_available_2_11_0_0)
404
- allow(provider).to receive(:powershell_out).with("$PSVersionTable.PSVersion.Major").and_return(powershell_installed_version)
402
+ allow(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Find-Package 'xNetworking' -Force -ForceBootstrap -WarningAction SilentlyContinue -RequiredVersion 2.11.0.0 ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_available)
403
+ allow(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Get-Package 'xNetworking' -Force -ForceBootstrap -WarningAction SilentlyContinue -RequiredVersion 2.11.0.0 ).Version", { timeout: new_resource.timeout }).and_return(package_xnetworking_available_2_11_0_0)
404
+ allow(provider).to receive(:powershell_exec).with("$PSVersionTable.PSVersion.Major").and_return(powershell_installed_version)
405
405
  provider.load_current_resource
406
406
  expect(provider).not_to receive(:install_package)
407
407
  provider.run_action(:install)
@@ -413,13 +413,13 @@ describe Chef::Provider::Package::Powershell, :windows_only, :windows_gte_10 do
413
413
  # new_version.resource[0]
414
414
  new_resource.package_name(%w{xCertificate xNetworking})
415
415
  new_resource.version([nil, "2.11.0.0"])
416
- allow(provider).to receive(:powershell_out).with("#{tls_set_command} ( Find-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_available)
417
- allow(provider).to receive(:powershell_out).with("#{tls_set_command} ( Get-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_not_available)
418
- allow(provider).to receive(:powershell_out).with("#{tls_set_command} ( Find-Package 'xNetworking' -Force -ForceBootstrap -WarningAction SilentlyContinue -RequiredVersion 2.11.0.0 ).Version", { timeout: new_resource.timeout }).and_return(package_xnetworking_available_2_11_0_0)
419
- allow(provider).to receive(:powershell_out).with("#{tls_set_command} ( Get-Package 'xNetworking' -Force -ForceBootstrap -WarningAction SilentlyContinue -RequiredVersion 2.11.0.0 ).Version", { timeout: new_resource.timeout }).and_return(package_xnetworking_not_available)
420
- allow(provider).to receive(:powershell_out).with("$PSVersionTable.PSVersion.Major").and_return(powershell_installed_version)
421
- expect(provider).to receive(:powershell_out).with("#{tls_set_command} ( Install-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue -RequiredVersion 2.1.0.0 ).Version", { timeout: new_resource.timeout })
422
- expect(provider).to receive(:powershell_out).with("#{tls_set_command} ( Install-Package 'xNetworking' -Force -ForceBootstrap -WarningAction SilentlyContinue -RequiredVersion 2.11.0.0 ).Version", { timeout: new_resource.timeout })
416
+ allow(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Find-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_available)
417
+ allow(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Get-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_not_available)
418
+ allow(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Find-Package 'xNetworking' -Force -ForceBootstrap -WarningAction SilentlyContinue -RequiredVersion 2.11.0.0 ).Version", { timeout: new_resource.timeout }).and_return(package_xnetworking_available_2_11_0_0)
419
+ allow(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Get-Package 'xNetworking' -Force -ForceBootstrap -WarningAction SilentlyContinue -RequiredVersion 2.11.0.0 ).Version", { timeout: new_resource.timeout }).and_return(package_xnetworking_not_available)
420
+ allow(provider).to receive(:powershell_exec).with("$PSVersionTable.PSVersion.Major").and_return(powershell_installed_version)
421
+ expect(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Install-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue -RequiredVersion 2.1.0.0 ).Version", { timeout: new_resource.timeout })
422
+ expect(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Install-Package 'xNetworking' -Force -ForceBootstrap -WarningAction SilentlyContinue -RequiredVersion 2.11.0.0 ).Version", { timeout: new_resource.timeout })
423
423
  provider.load_current_resource
424
424
  provider.run_action(:install)
425
425
  expect(new_resource).to be_updated_by_last_action
@@ -428,13 +428,13 @@ describe Chef::Provider::Package::Powershell, :windows_only, :windows_gte_10 do
428
428
  it "should split up commands when given two packages, one with a version pin" do
429
429
  new_resource.package_name(%w{xCertificate xNetworking})
430
430
  new_resource.version(["2.1.0.0", nil])
431
- allow(provider).to receive(:powershell_out).with("#{tls_set_command} ( Find-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue -RequiredVersion 2.1.0.0 ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_available)
432
- allow(provider).to receive(:powershell_out).with("#{tls_set_command} ( Get-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue -RequiredVersion 2.1.0.0 ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_not_available)
433
- allow(provider).to receive(:powershell_out).with("#{tls_set_command} ( Find-Package 'xNetworking' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xnetworking_available)
434
- allow(provider).to receive(:powershell_out).with("#{tls_set_command} ( Get-Package 'xNetworking' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xnetworking_not_available)
435
- allow(provider).to receive(:powershell_out).with("$PSVersionTable.PSVersion.Major").and_return(powershell_installed_version)
436
- expect(provider).to receive(:powershell_out).with("#{tls_set_command} ( Install-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue -RequiredVersion 2.1.0.0 ).Version", { timeout: new_resource.timeout })
437
- expect(provider).to receive(:powershell_out).with("#{tls_set_command} ( Install-Package 'xNetworking' -Force -ForceBootstrap -WarningAction SilentlyContinue -RequiredVersion 2.12.0.0 ).Version", { timeout: new_resource.timeout })
431
+ allow(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Find-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue -RequiredVersion 2.1.0.0 ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_available)
432
+ allow(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Get-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue -RequiredVersion 2.1.0.0 ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_not_available)
433
+ allow(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Find-Package 'xNetworking' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xnetworking_available)
434
+ allow(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Get-Package 'xNetworking' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xnetworking_not_available)
435
+ allow(provider).to receive(:powershell_exec).with("$PSVersionTable.PSVersion.Major").and_return(powershell_installed_version)
436
+ expect(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Install-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue -RequiredVersion 2.1.0.0 ).Version", { timeout: new_resource.timeout })
437
+ expect(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Install-Package 'xNetworking' -Force -ForceBootstrap -WarningAction SilentlyContinue -RequiredVersion 2.12.0.0 ).Version", { timeout: new_resource.timeout })
438
438
 
439
439
  provider.load_current_resource
440
440
  provider.run_action(:install)
@@ -444,13 +444,13 @@ describe Chef::Provider::Package::Powershell, :windows_only, :windows_gte_10 do
444
444
  it "should do multipackage installs when given two packages without constraints" do
445
445
  new_resource.package_name(%w{xCertificate xNetworking})
446
446
  new_resource.version(nil)
447
- allow(provider).to receive(:powershell_out).with("#{tls_set_command} ( Find-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_available)
448
- allow(provider).to receive(:powershell_out).with("#{tls_set_command} ( Get-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_not_available)
449
- allow(provider).to receive(:powershell_out).with("#{tls_set_command} ( Find-Package 'xNetworking' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xnetworking_available)
450
- allow(provider).to receive(:powershell_out).with("#{tls_set_command} ( Get-Package 'xNetworking' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xnetworking_not_available)
451
- allow(provider).to receive(:powershell_out).with("$PSVersionTable.PSVersion.Major").and_return(powershell_installed_version)
452
- expect(provider).to receive(:powershell_out).with("#{tls_set_command} ( Install-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue -RequiredVersion 2.1.0.0 ).Version", { timeout: new_resource.timeout })
453
- expect(provider).to receive(:powershell_out).with("#{tls_set_command} ( Install-Package 'xNetworking' -Force -ForceBootstrap -WarningAction SilentlyContinue -RequiredVersion 2.12.0.0 ).Version", { timeout: new_resource.timeout })
447
+ allow(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Find-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_available)
448
+ allow(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Get-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_not_available)
449
+ allow(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Find-Package 'xNetworking' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xnetworking_available)
450
+ allow(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Get-Package 'xNetworking' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xnetworking_not_available)
451
+ allow(provider).to receive(:powershell_exec).with("$PSVersionTable.PSVersion.Major").and_return(powershell_installed_version)
452
+ expect(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Install-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue -RequiredVersion 2.1.0.0 ).Version", { timeout: new_resource.timeout })
453
+ expect(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Install-Package 'xNetworking' -Force -ForceBootstrap -WarningAction SilentlyContinue -RequiredVersion 2.12.0.0 ).Version", { timeout: new_resource.timeout })
454
454
  provider.load_current_resource
455
455
  provider.run_action(:install)
456
456
  expect(new_resource).to be_updated_by_last_action
@@ -460,13 +460,13 @@ describe Chef::Provider::Package::Powershell, :windows_only, :windows_gte_10 do
460
460
  new_resource.package_name(%w{xCertificate xNetworking})
461
461
  new_resource.version(nil)
462
462
  new_resource.source("MyGallery")
463
- allow(provider).to receive(:powershell_out).with("#{tls_set_command} ( Find-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue -Source MyGallery ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_available)
464
- allow(provider).to receive(:powershell_out).with("#{tls_set_command} ( Get-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_not_available)
465
- allow(provider).to receive(:powershell_out).with("#{tls_set_command} ( Find-Package 'xNetworking' -Force -ForceBootstrap -WarningAction SilentlyContinue -Source MyGallery ).Version", { timeout: new_resource.timeout }).and_return(package_xnetworking_available)
466
- allow(provider).to receive(:powershell_out).with("#{tls_set_command} ( Get-Package 'xNetworking' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xnetworking_not_available)
467
- allow(provider).to receive(:powershell_out).with("$PSVersionTable.PSVersion.Major").and_return(powershell_installed_version)
468
- expect(provider).to receive(:powershell_out).with("#{tls_set_command} ( Install-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue -RequiredVersion 2.1.0.0 -Source MyGallery ).Version", { timeout: new_resource.timeout })
469
- expect(provider).to receive(:powershell_out).with("#{tls_set_command} ( Install-Package 'xNetworking' -Force -ForceBootstrap -WarningAction SilentlyContinue -RequiredVersion 2.12.0.0 -Source MyGallery ).Version", { timeout: new_resource.timeout })
463
+ allow(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Find-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue -Source MyGallery ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_available)
464
+ allow(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Get-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_not_available)
465
+ allow(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Find-Package 'xNetworking' -Force -ForceBootstrap -WarningAction SilentlyContinue -Source MyGallery ).Version", { timeout: new_resource.timeout }).and_return(package_xnetworking_available)
466
+ allow(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Get-Package 'xNetworking' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xnetworking_not_available)
467
+ allow(provider).to receive(:powershell_exec).with("$PSVersionTable.PSVersion.Major").and_return(powershell_installed_version)
468
+ expect(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Install-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue -RequiredVersion 2.1.0.0 -Source MyGallery ).Version", { timeout: new_resource.timeout })
469
+ expect(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Install-Package 'xNetworking' -Force -ForceBootstrap -WarningAction SilentlyContinue -RequiredVersion 2.12.0.0 -Source MyGallery ).Version", { timeout: new_resource.timeout })
470
470
  provider.load_current_resource
471
471
  provider.run_action(:install)
472
472
  expect(new_resource).to be_updated_by_last_action
@@ -477,10 +477,10 @@ describe Chef::Provider::Package::Powershell, :windows_only, :windows_gte_10 do
477
477
  new_resource.package_name(["xCertificate"])
478
478
  new_resource.version(nil)
479
479
  new_resource.options(%w{-AcceptLicense -Verbose})
480
- allow(provider).to receive(:powershell_out).with("#{tls_set_command} ( Find-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_available)
481
- allow(provider).to receive(:powershell_out).with("#{tls_set_command} ( Get-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_not_available)
482
- allow(provider).to receive(:powershell_out).with("$PSVersionTable.PSVersion.Major").and_return(powershell_installed_version)
483
- expect(provider).to receive(:powershell_out).with("#{tls_set_command} ( Install-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue -RequiredVersion 2.1.0.0 -AcceptLicense -Verbose ).Version", { timeout: new_resource.timeout })
480
+ allow(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Find-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_available)
481
+ allow(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Get-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_not_available)
482
+ allow(provider).to receive(:powershell_exec).with("$PSVersionTable.PSVersion.Major").and_return(powershell_installed_version)
483
+ expect(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Install-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue -RequiredVersion 2.1.0.0 -AcceptLicense -Verbose ).Version", { timeout: new_resource.timeout })
484
484
  provider.run_action(:install)
485
485
  expect(new_resource).to be_updated_by_last_action
486
486
  end
@@ -491,9 +491,9 @@ describe Chef::Provider::Package::Powershell, :windows_only, :windows_gte_10 do
491
491
  provider.load_current_resource
492
492
  new_resource.package_name(["xCertificate"])
493
493
  new_resource.version(["2.1.0.0"])
494
- allow(provider).to receive(:powershell_out).with("#{tls_set_command} ( Find-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue -RequiredVersion 2.1.0.0 ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_available)
495
- allow(provider).to receive(:powershell_out).with("#{tls_set_command} ( Get-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue -RequiredVersion 2.1.0.0 ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_not_available)
496
- allow(provider).to receive(:powershell_out).with("$PSVersionTable.PSVersion.Major").and_return(powershell_installed_version)
494
+ allow(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Find-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue -RequiredVersion 2.1.0.0 ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_available)
495
+ allow(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Get-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue -RequiredVersion 2.1.0.0 ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_not_available)
496
+ allow(provider).to receive(:powershell_exec).with("$PSVersionTable.PSVersion.Major").and_return(powershell_installed_version)
497
497
  expect(provider).not_to receive(:remove_package)
498
498
  provider.run_action(:remove)
499
499
  expect(new_resource).not_to be_updated_by_last_action
@@ -503,11 +503,11 @@ describe Chef::Provider::Package::Powershell, :windows_only, :windows_gte_10 do
503
503
  new_resource.package_name(["xCertificate"])
504
504
  new_resource.version(["2.1.0.0"])
505
505
  new_resource.source("MyGallery")
506
- allow(provider).to receive(:powershell_out).with("#{tls_set_command} ( Find-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue -RequiredVersion 2.1.0.0 -Source MyGallery).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_available)
507
- allow(provider).to receive(:powershell_out).with("#{tls_set_command} ( Get-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue -RequiredVersion 2.1.0.0 ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_available)
508
- allow(provider).to receive(:powershell_out).with("$PSVersionTable.PSVersion.Major").and_return(powershell_installed_version)
506
+ allow(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Find-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue -RequiredVersion 2.1.0.0 -Source MyGallery).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_available)
507
+ allow(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Get-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue -RequiredVersion 2.1.0.0 ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_available)
508
+ allow(provider).to receive(:powershell_exec).with("$PSVersionTable.PSVersion.Major").and_return(powershell_installed_version)
509
509
  provider.load_current_resource
510
- expect(provider).to receive(:powershell_out).with("#{tls_set_command} ( Uninstall-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue -RequiredVersion 2.1.0.0 ).Version", { timeout: new_resource.timeout })
510
+ expect(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Uninstall-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue -RequiredVersion 2.1.0.0 ).Version", { timeout: new_resource.timeout })
511
511
  provider.run_action(:remove)
512
512
  expect(new_resource).to be_updated_by_last_action
513
513
  end
@@ -515,11 +515,11 @@ describe Chef::Provider::Package::Powershell, :windows_only, :windows_gte_10 do
515
515
  it "does nothing when all the packages are already removed" do
516
516
  new_resource.package_name(%w{xCertificate xNetworking})
517
517
  new_resource.version(nil)
518
- allow(provider).to receive(:powershell_out).with("#{tls_set_command} ( Find-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_available)
519
- allow(provider).to receive(:powershell_out).with("#{tls_set_command} ( Get-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_not_available)
520
- allow(provider).to receive(:powershell_out).with("#{tls_set_command} ( Find-Package 'xNetworking' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xnetworking_available)
521
- allow(provider).to receive(:powershell_out).with("#{tls_set_command} ( Get-Package 'xNetworking' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xnetworking_not_available)
522
- allow(provider).to receive(:powershell_out).with("$PSVersionTable.PSVersion.Major").and_return(powershell_installed_version)
518
+ allow(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Find-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_available)
519
+ allow(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Get-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_not_available)
520
+ allow(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Find-Package 'xNetworking' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xnetworking_available)
521
+ allow(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Get-Package 'xNetworking' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xnetworking_not_available)
522
+ allow(provider).to receive(:powershell_exec).with("$PSVersionTable.PSVersion.Major").and_return(powershell_installed_version)
523
523
  provider.load_current_resource
524
524
  expect(provider).not_to receive(:remove_package)
525
525
  provider.run_action(:remove)
@@ -529,11 +529,11 @@ describe Chef::Provider::Package::Powershell, :windows_only, :windows_gte_10 do
529
529
  it "removes a package when version is specified" do
530
530
  new_resource.package_name(["xCertificate"])
531
531
  new_resource.version(["2.1.0.0"])
532
- allow(provider).to receive(:powershell_out).with("#{tls_set_command} ( Find-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue -RequiredVersion 2.1.0.0 ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_available)
533
- allow(provider).to receive(:powershell_out).with("#{tls_set_command} ( Get-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue -RequiredVersion 2.1.0.0 ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_available)
534
- allow(provider).to receive(:powershell_out).with("$PSVersionTable.PSVersion.Major").and_return(powershell_installed_version)
532
+ allow(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Find-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue -RequiredVersion 2.1.0.0 ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_available)
533
+ allow(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Get-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue -RequiredVersion 2.1.0.0 ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_available)
534
+ allow(provider).to receive(:powershell_exec).with("$PSVersionTable.PSVersion.Major").and_return(powershell_installed_version)
535
535
  provider.load_current_resource
536
- expect(provider).to receive(:powershell_out).with("#{tls_set_command} ( Uninstall-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue -RequiredVersion 2.1.0.0 ).Version", { timeout: new_resource.timeout })
536
+ expect(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Uninstall-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue -RequiredVersion 2.1.0.0 ).Version", { timeout: new_resource.timeout })
537
537
  provider.run_action(:remove)
538
538
  expect(new_resource).to be_updated_by_last_action
539
539
  end
@@ -541,11 +541,11 @@ describe Chef::Provider::Package::Powershell, :windows_only, :windows_gte_10 do
541
541
  it "removes a package when version is not specified" do
542
542
  new_resource.package_name(["xCertificate"])
543
543
  new_resource.version(nil)
544
- allow(provider).to receive(:powershell_out).with("#{tls_set_command} ( Find-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_available)
545
- allow(provider).to receive(:powershell_out).with("#{tls_set_command} ( Get-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_available)
546
- allow(provider).to receive(:powershell_out).with("$PSVersionTable.PSVersion.Major").and_return(powershell_installed_version)
544
+ allow(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Find-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_available)
545
+ allow(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Get-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_available)
546
+ allow(provider).to receive(:powershell_exec).with("$PSVersionTable.PSVersion.Major").and_return(powershell_installed_version)
547
547
  provider.load_current_resource
548
- expect(provider).to receive(:powershell_out).with("#{tls_set_command} ( Uninstall-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_not_available)
548
+ expect(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Uninstall-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_not_available)
549
549
  provider.run_action(:remove)
550
550
  expect(new_resource).to be_updated_by_last_action
551
551
  end
@@ -553,11 +553,11 @@ describe Chef::Provider::Package::Powershell, :windows_only, :windows_gte_10 do
553
553
  it "should remove a package using provided options" do
554
554
  new_resource.package_name(["xCertificate"])
555
555
  new_resource.options(%w{-AllVersions})
556
- allow(provider).to receive(:powershell_out).with("#{tls_set_command} ( Find-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_available)
557
- allow(provider).to receive(:powershell_out).with("#{tls_set_command} ( Get-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_available)
558
- allow(provider).to receive(:powershell_out).with("$PSVersionTable.PSVersion.Major").and_return(powershell_installed_version)
556
+ allow(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Find-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_available)
557
+ allow(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Get-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_available)
558
+ allow(provider).to receive(:powershell_exec).with("$PSVersionTable.PSVersion.Major").and_return(powershell_installed_version)
559
559
  provider.load_current_resource
560
- expect(provider).to receive(:powershell_out).with("#{tls_set_command} ( Uninstall-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue -AllVersions ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_not_available)
560
+ expect(provider).to receive(:powershell_exec).with("#{tls_set_command} ( Uninstall-Package 'xCertificate' -Force -ForceBootstrap -WarningAction SilentlyContinue -AllVersions ).Version", { timeout: new_resource.timeout }).and_return(package_xcertificate_not_available)
561
561
  provider.run_action(:remove)
562
562
  expect(new_resource).to be_updated_by_last_action
563
563
  end
@@ -410,6 +410,9 @@ describe Chef::Provider::Package::Rubygems do
410
410
  # Rubygems uses these two interally
411
411
  allow(RbConfig::CONFIG).to receive(:[]).with("arch").and_call_original
412
412
  allow(RbConfig::CONFIG).to receive(:[]).with("ruby_install_name").and_call_original
413
+ allow(RbConfig::CONFIG).to receive(:[]).with("ruby_version").and_call_original
414
+ allow(RbConfig::CONFIG).to receive(:[]).with("rubylibprefix").and_call_original
415
+ allow(RbConfig::CONFIG).to receive(:[]).with("vendordir").and_call_original
413
416
  allow(File).to receive(:executable?).and_return false
414
417
  allow(File).to receive(:executable?).with("#{bindir}/gem").and_return true
415
418
  # XXX: we can't stub the provider object directly here because referencing it will create it and that
@@ -503,11 +506,11 @@ describe Chef::Provider::Package::Rubygems do
503
506
  platform_mock :windows do
504
507
  allow(ENV).to receive(:[]).with("PATH").and_return('C:\windows\system32;C:\windows;C:\Ruby186\bin')
505
508
  allow(ENV).to receive(:[]).with("PATHEXT").and_return(nil)
506
- allow(File).to receive(:executable?).with('C:\\windows\\system32/gem').and_return(false)
507
- allow(File).to receive(:executable?).with('C:\\windows/gem').and_return(false)
508
- allow(File).to receive(:executable?).with('C:\\Ruby186\\bin/gem').and_return(true)
509
- allow(File).to receive(:executable?).with('d:\\opscode\\chef\\bin/gem').and_return(false) # should not get here
510
- allow(File).to receive(:executable?).with('d:\\opscode\\chef\\bin/gem').and_return(false) # should not get here
509
+ allow(File).to receive(:executable?).with("C:\\windows\\system32/gem").and_return(false)
510
+ allow(File).to receive(:executable?).with("C:\\windows/gem").and_return(false)
511
+ allow(File).to receive(:executable?).with("C:\\Ruby186\\bin/gem").and_return(true)
512
+ allow(File).to receive(:executable?).with("d:\\opscode\\chef\\bin/gem").and_return(false) # should not get here
513
+ allow(File).to receive(:executable?).with("d:\\opscode\\chef\\bin/gem").and_return(false) # should not get here
511
514
  allow(File).to receive(:executable?).with("d:/opscode/chef/embedded/bin/gem").and_return(false) # should not get here
512
515
  expect(provider.gem_env.gem_binary_location).to eq('C:\Ruby186\bin/gem')
513
516
  end
@@ -65,6 +65,7 @@ describe Chef::Provider::Package::Solaris do
65
65
  allow(@provider).to receive(:shell_out_compacted).and_return(@status)
66
66
  allow(::File).to receive(:exist?).and_return(false)
67
67
  @provider.load_current_resource
68
+ @provider.action = :install
68
69
  @provider.define_resource_requirements
69
70
  expect { @provider.process_resource_requirements }.to raise_error(Chef::Exceptions::Package)
70
71
  end
@@ -39,7 +39,7 @@ describe Chef::Provider::Package::Windows, :windows_only do
39
39
  new_resource
40
40
  end
41
41
  let(:provider) { Chef::Provider::Package::Windows.new(new_resource, run_context) }
42
- let(:cache_path) { 'c:\\cache\\' }
42
+ let(:cache_path) { "c:\\cache\\" }
43
43
 
44
44
  before(:each) do
45
45
  allow(::File).to receive(:exist?).with(new_resource.source).and_return(true)
@@ -274,7 +274,7 @@ describe Chef::Provider::RegistryKey do
274
274
  end
275
275
 
276
276
  context "when the key data is safe" do
277
- let(:keyname) { 'HKLM\Software\Opscode\Testing\Safe' }
277
+ let(:keyname) { "HKLM\\Software\\Opscode\\Testing\\Safe" }
278
278
  let(:testval1) { { name: "one", type: :string, data: "1" } }
279
279
  let(:testval1_wrong_type) { { name: "one", type: :multi_string, data: "1" } }
280
280
  let(:testval1_wrong_data) { { name: "one", type: :string, data: "2" } }
@@ -295,7 +295,7 @@ describe Chef::Provider::RegistryKey do
295
295
 
296
296
  describe "action_create" do
297
297
  context "when key exists and type matches" do
298
- let(:keyname) { 'hklm\\software\\opscode\\testing\\dword' }
298
+ let(:keyname) { "hklm\\software\\opscode\\testing\\dword" }
299
299
  let(:dword_passed_as_integer) { { name: "one", type: :dword, data: 12345 } }
300
300
  let(:testval1) { { name: "one", type: :dword, data: "12345" } }
301
301
  before do
@@ -349,7 +349,7 @@ describe Chef::Provider::RegistryKey do
349
349
  end
350
350
 
351
351
  context "and key does not exist" do
352
- let(:keyname) { 'hklm\\software\\opscode\\testing\\sensitive\missing' }
352
+ let(:keyname) { "hklm\\software\\opscode\\testing\\sensitive\\missing" }
353
353
  let(:testval1) { { name: "one", type: :string, data: "first_value" } }
354
354
 
355
355
  before(:each) do
@@ -368,7 +368,7 @@ describe Chef::Provider::RegistryKey do
368
368
 
369
369
  describe "action_create_if_missing" do
370
370
  context "when sensitive is true" do
371
- let(:keyname) { 'hklm\\software\\opscode\\testing\\create_if_missing\\sensitive' }
371
+ let(:keyname) { "hklm\\software\\opscode\\testing\\create_if_missing\\sensitive" }
372
372
  let(:testval1) { { name: "one", type: :string, data: "first_value" } }
373
373
 
374
374
  before(:each) do