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
@@ -38,7 +38,7 @@ class Chef
38
38
 
39
39
  property :full_users, Array,
40
40
  description: "Determines which users should have full access to the share.",
41
- default: ['BUILTIN\\administrators']
41
+ default: ["BUILTIN\\administrators"]
42
42
 
43
43
  property :change_users, Array,
44
44
  description: "Determines which users should have change access to the share.",
@@ -50,7 +50,7 @@ class Chef
50
50
 
51
51
  property :root, String,
52
52
  description: "The root from which to create the DFS tree. Defaults to C:\\DFSRoots.",
53
- default: 'C:\\DFSRoots'
53
+ default: "C:\\DFSRoots"
54
54
 
55
55
  action :create, description: "Creates the dfs namespace on the server." do
56
56
  directory file_path do
@@ -100,8 +100,8 @@ class Chef
100
100
  install_command << " -Source \"#{new_resource.source}\"" if new_resource.source
101
101
  install_command << " -IncludeManagementTools" if new_resource.management_tools
102
102
 
103
- cmd = powershell_out!(install_command, timeout: new_resource.timeout)
104
- Chef::Log.info(cmd.stdout)
103
+ cmd = powershell_exec!(install_command, timeout: new_resource.timeout)
104
+ Chef::Log.info(cmd.result)
105
105
 
106
106
  reload_cached_powershell_data # Reload cached powershell feature state
107
107
  end
@@ -115,8 +115,8 @@ class Chef
115
115
 
116
116
  unless features_to_remove.empty?
117
117
  converge_by("remove Windows feature#{"s" if features_to_remove.count > 1} #{features_to_remove.join(",")}") do
118
- cmd = powershell_out!("Uninstall-WindowsFeature #{features_to_remove.join(",")}", timeout: new_resource.timeout)
119
- Chef::Log.info(cmd.stdout)
118
+ cmd = powershell_exec!("Uninstall-WindowsFeature #{features_to_remove.join(",")}", timeout: new_resource.timeout)
119
+ Chef::Log.info(cmd.result)
120
120
 
121
121
  reload_cached_powershell_data # Reload cached powershell feature state
122
122
  end
@@ -132,8 +132,8 @@ class Chef
132
132
 
133
133
  unless features_to_delete.empty?
134
134
  converge_by("delete Windows feature#{"s" if features_to_delete.count > 1} #{features_to_delete.join(",")} from the image") do
135
- cmd = powershell_out!("Uninstall-WindowsFeature #{features_to_delete.join(",")} -Remove", timeout: new_resource.timeout)
136
- Chef::Log.info(cmd.stdout)
135
+ cmd = powershell_exec!("Uninstall-WindowsFeature #{features_to_delete.join(",")} -Remove", timeout: new_resource.timeout)
136
+ Chef::Log.info(cmd.result)
137
137
 
138
138
  reload_cached_powershell_data # Reload cached powershell feature state
139
139
  end
@@ -215,7 +215,7 @@ class Chef
215
215
  # fetch the list of available feature names and state in JSON and parse the JSON
216
216
  def parsed_feature_list
217
217
  # Grab raw feature information from WindowsFeature
218
- raw_list_of_features = powershell_out!("Get-WindowsFeature | Select-Object -Property Name,InstallState | ConvertTo-Json -Compress", timeout: new_resource.timeout).stdout
218
+ raw_list_of_features = powershell_exec!("Get-WindowsFeature | Select-Object -Property Name,InstallState", timeout: new_resource.timeout).result
219
219
 
220
220
  Chef::JSONCompat.from_json(raw_list_of_features)
221
221
  end
@@ -145,7 +145,7 @@ class Chef
145
145
  action :set, description: "Set Windows Update settings." do
146
146
  actual_day = convert_day(new_resource.scheduled_install_day)
147
147
 
148
- registry_key 'HKEY_LOCAL_MACHINE\\Software\\Policies\\Microsoft\\Windows\\WindowsUpdate' do
148
+ registry_key "HKEY_LOCAL_MACHINE\\Software\\Policies\\Microsoft\\Windows\\WindowsUpdate" do
149
149
  recursive true
150
150
  values [{
151
151
  name: "DisableOSUpgrade",
@@ -180,7 +180,7 @@ class Chef
180
180
  action :create
181
181
  end
182
182
 
183
- registry_key 'HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer' do
183
+ registry_key "HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\Explorer" do
184
184
  recursive true
185
185
  values [{
186
186
  name: "NoWindowsUpdate",
@@ -190,7 +190,7 @@ class Chef
190
190
  action :create
191
191
  end
192
192
 
193
- registry_key 'HKEY_LOCAL_MACHINE\\Software\\Policies\\Microsoft\\Windows\\WindowsUpdate\\AU' do
193
+ registry_key "HKEY_LOCAL_MACHINE\\Software\\Policies\\Microsoft\\Windows\\WindowsUpdate\\AU" do
194
194
  recursive true
195
195
  values [{
196
196
  name: "AUOptions",
data/lib/chef/resource.rb CHANGED
@@ -454,7 +454,7 @@ class Chef
454
454
  # @param arg [String] The umask to apply while converging the resource.
455
455
  # @return [Boolean] The umask to apply while converging the resource.
456
456
  #
457
- property :umask, String,
457
+ property :umask, [String, Integer],
458
458
  desired_state: false,
459
459
  introduced: "16.2",
460
460
  description: "Set a umask to be used for the duration of converging the resource. Defaults to `nil`, which means to use the system umask. Unsupported on Windows because Windows lacks a direct equivalent to UNIX's umask."
@@ -1508,7 +1508,7 @@ class Chef
1508
1508
  # @return Chef::CookbookVersion The cookbook in which this Resource was defined.
1509
1509
  #
1510
1510
  def cookbook_version
1511
- if cookbook_name
1511
+ if cookbook_name && cookbook_name != "@recipe_files"
1512
1512
  run_context.cookbook_collection[cookbook_name]
1513
1513
  end
1514
1514
  end
@@ -41,7 +41,7 @@ class Chef
41
41
  as_hash["result"] = action_record.action.to_s
42
42
  if new_resource.cookbook_name
43
43
  as_hash["cookbook_name"] = new_resource.cookbook_name
44
- as_hash["cookbook_version"] = new_resource.cookbook_version.version
44
+ as_hash["cookbook_version"] = new_resource.cookbook_version&.version
45
45
  end
46
46
 
47
47
  as_hash
@@ -1,4 +1,6 @@
1
1
  require_relative "base"
2
+ require_relative "../exceptions"
3
+ require "uri" unless defined?(URI)
2
4
 
3
5
  class Chef
4
6
  class SecretFetcher
@@ -14,13 +16,19 @@ class Chef
14
16
  #
15
17
  # @example
16
18
  #
17
- # fetcher = SecretFetcher.for_service(:azure_key_vault, { vault: "my_vault" }, run_context )
19
+ # fetcher = SecretFetcher.for_service(:azure_key_vault, { vault: "my_vault" }, run_context)
18
20
  # fetcher.fetch("secretkey1", "v1")
19
21
  #
20
22
  # @example
21
23
  #
22
- # fetcher = SecretFetcher.for_service(:azure_key_vault, {}, run_context )
24
+ # fetcher = SecretFetcher.for_service(:azure_key_vault, {}, run_context)
23
25
  # fetcher.fetch("my_vault/secretkey1", "v1")
26
+ #
27
+ # @example
28
+ #
29
+ # fetcher = SecretFetcher.for_service(:azure_key_vault, { client_id: "540d76b6-7f76-456c-b68b-ccae4dc9d99d" }, run_context)
30
+ # fetcher.fetch("my_vault/secretkey1", "v1")
31
+ #
24
32
  class AzureKeyVault < Base
25
33
 
26
34
  def do_fetch(name, version)
@@ -48,6 +56,12 @@ class Chef
48
56
  end
49
57
  end
50
58
 
59
+ def validate!
60
+ raise Chef::Exceptions::Secret::ConfigurationInvalid, "You may only specify one (these are mutually exclusive): :object_id, :client_id, or :mi_res_id" if [object_id, client_id, mi_res_id].select { |x| !x.nil? }.length > 1
61
+ end
62
+
63
+ private
64
+
51
65
  # Determine the vault name and secret name from the provided name.
52
66
  # If it is not in the provided name in the form "vault_name/secret_name"
53
67
  # it will determine the vault name from `config[:vault]`.
@@ -63,16 +77,56 @@ class Chef
63
77
  end
64
78
  end
65
79
 
80
+ def api_version
81
+ "2018-02-01"
82
+ end
83
+
84
+ def resource
85
+ "https://vault.azure.net"
86
+ end
87
+
88
+ def object_id
89
+ config[:object_id]
90
+ end
91
+
92
+ def client_id
93
+ config[:client_id]
94
+ end
95
+
96
+ def mi_res_id
97
+ config[:mi_res_id]
98
+ end
99
+
100
+ def token_query
101
+ @token_query ||= begin
102
+ p = {}
103
+ p["api-version"] = api_version
104
+ p["resource"] = resource
105
+ p["object_id"] = object_id if object_id
106
+ p["client_id"] = client_id if client_id
107
+ p["mi_res_id"] = mi_res_id if mi_res_id
108
+ URI.encode_www_form(p)
109
+ end
110
+ end
111
+
66
112
  def fetch_token
67
- token_uri = URI.parse("http://169.254.169.254/metadata/identity/oauth2/token?api-version=2018-02-01&resource=https%3A%2F%2Fvault.azure.net")
113
+ token_uri = URI.parse("http://169.254.169.254/metadata/identity/oauth2/token")
114
+ token_uri.query = token_query
68
115
  http = Net::HTTP.new(token_uri.host, token_uri.port)
69
116
  response = http.get(token_uri, { "Metadata" => "true" })
70
- body = JSON.parse(response.body)
71
- body["access_token"]
117
+
118
+ case response
119
+ when Net::HTTPSuccess
120
+ body = JSON.parse(response.body)
121
+ body["access_token"]
122
+ when Net::HTTPBadRequest
123
+ body = JSON.parse(response.body)
124
+ raise Chef::Exceptions::Secret::Azure::IdentityNotFound if body["error_description"] =~ /identity not found/i
125
+ else
126
+ body = JSON.parse(response.body)
127
+ body["access_token"]
128
+ end
72
129
  end
73
130
  end
74
131
  end
75
132
  end
76
-
77
-
78
-
@@ -58,4 +58,3 @@ class Chef
58
58
  end
59
59
  end
60
60
  end
61
-
data/lib/chef/version.rb CHANGED
@@ -23,7 +23,7 @@ require_relative "version_string"
23
23
 
24
24
  class Chef
25
25
  CHEF_ROOT = File.expand_path("..", __dir__)
26
- VERSION = Chef::VersionString.new("17.6.15")
26
+ VERSION = Chef::VersionString.new("17.8.25")
27
27
  end
28
28
 
29
29
  #
@@ -39,8 +39,8 @@ describe Chef::DSL::RebootPending, :windows_only do
39
39
  let(:reg_key) { nil }
40
40
  let(:original_set) { false }
41
41
 
42
- describe 'HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\PendingFileRenameOperations' do
43
- let(:reg_key) { 'HKLM\SYSTEM\CurrentControlSet\Control\Session Manager' }
42
+ describe "HKLM\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\PendingFileRenameOperations" do
43
+ let(:reg_key) { "HKLM\\SYSTEM\\CurrentControlSet\\Control\\Session Manager" }
44
44
  let(:original_set) { registry.value_exists?(reg_key, { name: "PendingFileRenameOperations" }) }
45
45
 
46
46
  it "returns true if the registry value exists" do
@@ -78,7 +78,7 @@ describe Chef::DSL::RebootPending, :windows_only do
78
78
 
79
79
  describe "when there is nothing to indicate a reboot is pending" do
80
80
  it "should return false" do
81
- skip "reboot pending" if registry_value_exists?('HKLM\SYSTEM\CurrentControlSet\Control\Session Manager', { name: "PendingFileRenameOperations" }) ||
81
+ skip "reboot pending" if registry_value_exists?("HKLM\\SYSTEM\\CurrentControlSet\\Control\\Session Manager", { name: "PendingFileRenameOperations" }) ||
82
82
  registry_key_exists?('HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired') ||
83
83
  registry_key_exists?('HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Component Based Servicing\RebootPending')
84
84
  expect(recipe.reboot_pending?).to be_falsey
@@ -24,7 +24,7 @@ describe Chef::Resource::RegistryKey, :windows_only do
24
24
  before(:all) do
25
25
  ::Win32::Registry::HKEY_CURRENT_USER.create "Software\\Root"
26
26
  ::Win32::Registry::HKEY_CURRENT_USER.create "Software\\Root\\Branch"
27
- ::Win32::Registry::HKEY_CURRENT_USER.open('Software\\Root', Win32::Registry::KEY_ALL_ACCESS) do |reg|
27
+ ::Win32::Registry::HKEY_CURRENT_USER.open("Software\\Root", Win32::Registry::KEY_ALL_ACCESS) do |reg|
28
28
  reg["RootType1", Win32::Registry::REG_SZ] = "fibrous"
29
29
  reg.write("Roots", Win32::Registry::REG_MULTI_SZ, ["strong roots", "healthy tree"])
30
30
  end
@@ -455,7 +455,7 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
455
455
  end
456
456
 
457
457
  context "downgrades" do
458
- it "downgrades the package when allow_downgrade" do
458
+ it "downgrades the package when allow_downgrade is true" do
459
459
  flush_cache
460
460
  preinstall("chef_rpm-1.10-1.#{pkg_arch}.rpm")
461
461
  dnf_package "chef_rpm" do
@@ -470,6 +470,18 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
470
470
  action :install
471
471
  end.should_not_be_updated
472
472
  end
473
+
474
+ it "does not downgrade the package when allow_downgrade is false" do
475
+ flush_cache
476
+ preinstall("chef_rpm-1.10-1.#{pkg_arch}.rpm")
477
+ dnf_package "chef_rpm" do
478
+ options default_options
479
+ allow_downgrade false
480
+ version "1.2-1"
481
+ action :install
482
+ end.should_not_be_updated
483
+ expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.10-1.#{pkg_arch}$")
484
+ end
473
485
  end
474
486
 
475
487
  context "with arches", :intel_64bit do
@@ -763,6 +775,17 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
763
775
  end.should_not_be_updated
764
776
  end
765
777
 
778
+ it "downgrade on a local file with allow_downgrade false does not downgrade" do
779
+ preinstall("chef_rpm-1.10-1.#{pkg_arch}.rpm")
780
+ dnf_package "#{CHEF_SPEC_ASSETS}/yumrepo/chef_rpm-1.2-1.#{pkg_arch}.rpm" do
781
+ options default_options
782
+ allow_downgrade false
783
+ version "1.2-1"
784
+ action :install
785
+ end.should_not_be_updated
786
+ expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.10-1.#{pkg_arch}$")
787
+ end
788
+
766
789
  it "does not downgrade the package with :install" do
767
790
  preinstall("chef_rpm-1.10-1.#{pkg_arch}.rpm")
768
791
  dnf_package "#{CHEF_SPEC_ASSETS}/yumrepo/chef_rpm-1.2-1.#{pkg_arch}.rpm" do
@@ -1027,25 +1050,6 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
1027
1050
  action :install
1028
1051
  end.should_not_be_updated
1029
1052
  end
1030
-
1031
- it "throws a deprecation warning with allow_downgrade" do
1032
- Chef::Config[:treat_deprecation_warnings_as_errors] = false
1033
- expect(Chef).to receive(:deprecated).at_least(:once).with(:dnf_package_allow_downgrade, /^the allow_downgrade property on the dnf_package provider is not used/)
1034
- preinstall("chef_rpm-1.10-1.#{pkg_arch}.rpm")
1035
- dnf_package "chef_rpm" do
1036
- options default_options
1037
- version "1.2"
1038
- allow_downgrade true
1039
- action :install
1040
- end.should_be_updated
1041
- expect(shell_out("rpm -q chef_rpm").stdout.chomp).to match("^chef_rpm-1.2-1.#{pkg_arch}")
1042
- dnf_package "chef_rpm" do
1043
- options default_options
1044
- version "1.2"
1045
- allow_downgrade true
1046
- action :install
1047
- end.should_not_be_updated
1048
- end
1049
1053
  end
1050
1054
 
1051
1055
  context "with source arguments" do
@@ -1092,6 +1096,16 @@ describe Chef::Resource::DnfPackage, :requires_root, external: exclude_test do
1092
1096
  end.should_not_be_updated
1093
1097
  end
1094
1098
 
1099
+ it "does not downgrade the package when allow_downgrade is false" do
1100
+ preinstall("chef_rpm-1.10-1.#{pkg_arch}.rpm")
1101
+ dnf_package "#{CHEF_SPEC_ASSETS}/yumrepo/chef_rpm-1.2-1.#{pkg_arch}.rpm" do
1102
+ options default_options
1103
+ allow_downgrade false
1104
+ action :upgrade
1105
+ end.should_not_be_updated
1106
+ expect(shell_out("rpm -q --queryformat '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n' chef_rpm").stdout.chomp).to match("^chef_rpm-1.10-1.#{pkg_arch}$")
1107
+ end
1108
+
1095
1109
  it "upgrades the package" do
1096
1110
  preinstall("chef_rpm-1.2-1.#{pkg_arch}.rpm")
1097
1111
  dnf_package "#{CHEF_SPEC_ASSETS}/yumrepo/chef_rpm-1.10-1.#{pkg_arch}.rpm" do
@@ -184,6 +184,22 @@ describe Chef::Resource::DpkgPackage, :requires_root, :debian_family_only, arch:
184
184
  dpkg_package.run_action(action)
185
185
  expect(dpkg_package).to be_updated_by_last_action
186
186
  end
187
+
188
+ it "should not allow downgrade a package" do
189
+ dpkg_package.allow_downgrade false
190
+ shell_out!("dpkg -i #{test1_1}")
191
+ set_dpkg_package_name test1_0
192
+ dpkg_package.run_action(action)
193
+ expect(dpkg_package).not_to be_updated_by_last_action
194
+ end
195
+
196
+ it "should allow downgrade a package" do
197
+ dpkg_package.allow_downgrade true
198
+ shell_out!("dpkg -i #{test1_1}")
199
+ set_dpkg_package_name test1_0
200
+ dpkg_package.run_action(action)
201
+ expect(dpkg_package).to be_updated_by_last_action
202
+ end
187
203
  end
188
204
 
189
205
  shared_examples_for "common behavior for remove or purge" do
@@ -85,7 +85,7 @@ describe Chef::Resource::DscScript, :windows_powershell_dsc_only, :ruby64_only d
85
85
  let(:dsc_test_resource_base) do
86
86
  Chef::Resource::DscScript.new(dsc_test_resource_name, dsc_test_run_context)
87
87
  end
88
- let(:test_registry_key) { 'HKEY_LOCAL_MACHINE\Software\Chef\Spec\Functional\Resource\dsc_script_spec' }
88
+ let(:test_registry_key) { "HKEY_LOCAL_MACHINE\\Software\\Chef\\Spec\\Functional\\Resource\\dsc_script_spec" }
89
89
  let(:test_registry_value) { "Registration" }
90
90
  let(:test_registry_data1) { "LL927" }
91
91
  let(:test_registry_data2) { "LL928" }
@@ -394,7 +394,7 @@ describe Chef::Resource::DscScript, :windows_powershell_dsc_only, :ruby64_only d
394
394
  dsc_test_run_context.node.consume_external_attrs(OHAI_SYSTEM.data, {})
395
395
  end
396
396
 
397
- let(:configuration_data_path) { 'C:\\configurationdata.psd1' }
397
+ let(:configuration_data_path) { "C:\\configurationdata.psd1" }
398
398
 
399
399
  let(:self_signed_cert_path) do
400
400
  File.join(CHEF_SPEC_DATA, "dsc_lcm.pfx")
@@ -0,0 +1,139 @@
1
+ #
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
+ require "spec_helper"
18
+
19
+ describe Chef::Resource::MacosUserDefaults, :macos_only do
20
+ def create_resource
21
+ node = Chef::Node.new
22
+ events = Chef::EventDispatch::Dispatcher.new
23
+ run_context = Chef::RunContext.new(node, {}, events)
24
+ resource = Chef::Resource::MacosUserDefaults.new("test", run_context)
25
+ resource
26
+ end
27
+
28
+ let(:resource) do
29
+ create_resource
30
+ end
31
+
32
+ context "has a default value" do
33
+ it ":macos_userdefaults for resource name" do
34
+ expect(resource.name).to eq("test")
35
+ end
36
+
37
+ it "NSGlobalDomain for the domain property" do
38
+ expect(resource.domain).to eq("NSGlobalDomain")
39
+ end
40
+
41
+ it "nil for the host property" do
42
+ expect(resource.host).to be_nil
43
+ end
44
+
45
+ it "nil for the user property" do
46
+ expect(resource.user).to be_nil
47
+ end
48
+
49
+ it ":write for resource action" do
50
+ expect(resource.action).to eq([:write])
51
+ end
52
+ end
53
+
54
+ it "supports :write, :delete actions" do
55
+ expect { resource.action :write }.not_to raise_error
56
+ expect { resource.action :delete }.not_to raise_error
57
+ end
58
+
59
+ context "can process expected data" do
60
+ it "set array values" do
61
+ resource.domain "/Library/Preferences/ManagedInstalls"
62
+ resource.key "TestArrayValues"
63
+ resource.value [ "/Library/Managed Installs/fake.log", "/Library/Managed Installs/also_fake.log"]
64
+ resource.run_action(:write)
65
+ expect(resource.get_preference resource).to eq([ "/Library/Managed Installs/fake.log", "/Library/Managed Installs/also_fake.log"])
66
+ end
67
+
68
+ it "set dictionary value" do
69
+ resource.domain "/Library/Preferences/ManagedInstalls"
70
+ resource.key "TestDictionaryValues"
71
+ resource.value "User": "/Library/Managed Installs/way_fake.log"
72
+ resource.run_action(:write)
73
+ expect(resource.get_preference resource).to eq("User" => "/Library/Managed Installs/way_fake.log")
74
+ end
75
+
76
+ it "set array of dictionaries" do
77
+ resource.domain "/Library/Preferences/ManagedInstalls"
78
+ resource.key "TestArrayWithDictionary"
79
+ resource.value [ { "User": "/Library/Managed Installs/way_fake.log" } ]
80
+ resource.run_action(:write)
81
+ expect(resource.get_preference resource).to eq([ { "User" => "/Library/Managed Installs/way_fake.log" } ])
82
+ end
83
+
84
+ it "set boolean for preference value" do
85
+ resource.domain "/Library/Preferences/ManagedInstalls"
86
+ resource.key "TestBooleanValue"
87
+ resource.value true
88
+ resource.run_action(:write)
89
+ expect(resource.get_preference resource).to eq(true)
90
+ end
91
+
92
+ it "sets value to global domain when domain is not passed" do
93
+ resource.key "TestKey"
94
+ resource.value 1
95
+ resource.run_action(:write)
96
+ expect(resource.get_preference resource).to eq(1)
97
+ end
98
+
99
+ it "short domain names" do
100
+ resource.domain "com.apple.dock"
101
+ resource.key "titlesize"
102
+ resource.value "20"
103
+ resource.run_action(:write)
104
+ expect(resource.get_preference resource).to eq("20")
105
+ end
106
+ end
107
+
108
+ it "we can delete a preference with full path" do
109
+ resource.domain "/Library/Preferences/ManagedInstalls"
110
+ resource.key "TestKey"
111
+ expect { resource.run_action(:delete) }. to_not raise_error
112
+ end
113
+
114
+ it "we can delete a preference with short name" do
115
+ resource.domain "com.apple.dock"
116
+ resource.key "titlesize"
117
+ expect { resource.run_action(:delete) }. to_not raise_error
118
+ end
119
+
120
+ context "resource can process FFI::Pointer type" do
121
+ it "for host property" do
122
+ resource.domain "/Library/Preferences/ManagedInstalls"
123
+ resource.key "TestDictionaryValues"
124
+ resource.value "User": "/Library/Managed Installs/way_fake.log"
125
+ resource.host :current
126
+ resource.run_action(:write)
127
+ expect { resource.run_action(:write) }. to_not raise_error
128
+ end
129
+
130
+ it "for user property" do
131
+ resource.domain "/Library/Preferences/ManagedInstalls"
132
+ resource.key "TestDictionaryValues"
133
+ resource.value "User": "/Library/Managed Installs/way_fake.log"
134
+ resource.user :current
135
+ resource.run_action(:write)
136
+ expect { resource.run_action(:write) }. to_not raise_error
137
+ end
138
+ end
139
+ end