chef 18.7.10 → 18.8.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1159) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +4 -22
  3. data/Rakefile +1 -0
  4. data/chef.gemspec +13 -6
  5. data/lib/chef/chef_fs/file_system/chef_server/cookbook_dir.rb +4 -0
  6. data/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_dir.rb +1 -5
  7. data/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_entry.rb +12 -0
  8. data/lib/chef/chef_fs/file_system.rb +18 -0
  9. data/lib/chef/cookbook_version.rb +34 -0
  10. data/lib/chef/http/basic_client.rb +1 -0
  11. data/lib/chef/http.rb +1 -0
  12. data/lib/chef/provider/package/apt.rb +1 -1
  13. data/lib/chef/provider/package/bff.rb +5 -0
  14. data/lib/chef/provider/package/cab.rb +9 -0
  15. data/lib/chef/provider/package/chocolatey.rb +6 -1
  16. data/lib/chef/provider/package/deb.rb +1 -1
  17. data/lib/chef/provider/package/dnf.rb +3 -3
  18. data/lib/chef/provider/package/habitat.rb +9 -0
  19. data/lib/chef/provider/package/homebrew.rb +9 -0
  20. data/lib/chef/provider/package/ips.rb +5 -0
  21. data/lib/chef/provider/package/macports.rb +9 -0
  22. data/lib/chef/provider/package/msu.rb +9 -0
  23. data/lib/chef/provider/package/openbsd.rb +7 -2
  24. data/lib/chef/provider/package/pacman.rb +9 -0
  25. data/lib/chef/provider/package/paludis.rb +9 -0
  26. data/lib/chef/provider/package/portage.rb +9 -0
  27. data/lib/chef/provider/package/powershell.rb +6 -1
  28. data/lib/chef/provider/package/rpm.rb +3 -3
  29. data/lib/chef/provider/package/rubygems.rb +9 -0
  30. data/lib/chef/provider/package/smartos.rb +9 -0
  31. data/lib/chef/provider/package/snap.rb +6 -1
  32. data/lib/chef/provider/package/solaris.rb +5 -0
  33. data/lib/chef/provider/package/windows.rb +5 -0
  34. data/lib/chef/provider/package/yum.rb +3 -3
  35. data/lib/chef/provider/package/zypper.rb +5 -0
  36. data/lib/chef/pwsh.rb +2 -5
  37. data/lib/chef/recipe.rb +20 -0
  38. data/lib/chef/resource/apt_package.rb +5 -0
  39. data/lib/chef/resource/apt_repository.rb +53 -27
  40. data/lib/chef/resource/archive_file.rb +49 -2
  41. data/lib/chef/resource/chocolatey_installer.rb +19 -4
  42. data/lib/chef/resource/dnf_package.rb +5 -0
  43. data/lib/chef/resource/dpkg_package.rb +5 -0
  44. data/lib/chef/resource/ohai.rb +11 -0
  45. data/lib/chef/resource/package.rb +5 -0
  46. data/lib/chef/resource/rpm_package.rb +5 -0
  47. data/lib/chef/resource/yum_package.rb +5 -0
  48. data/lib/chef/resource_reporter.rb +1 -1
  49. data/lib/chef/shell.rb +21 -7
  50. data/lib/chef/version.rb +1 -1
  51. data/lib/chef/win32/version.rb +2 -1
  52. metadata +50 -1123
  53. data/spec/data/apt/chef-integration-test-1.0/debian/changelog +0 -5
  54. data/spec/data/apt/chef-integration-test-1.0/debian/compat +0 -1
  55. data/spec/data/apt/chef-integration-test-1.0/debian/control +0 -13
  56. data/spec/data/apt/chef-integration-test-1.0/debian/copyright +0 -34
  57. data/spec/data/apt/chef-integration-test-1.0/debian/files +0 -1
  58. data/spec/data/apt/chef-integration-test-1.0/debian/rules +0 -13
  59. data/spec/data/apt/chef-integration-test-1.0/debian/source/format +0 -1
  60. data/spec/data/apt/chef-integration-test-1.1/debian/changelog +0 -11
  61. data/spec/data/apt/chef-integration-test-1.1/debian/compat +0 -1
  62. data/spec/data/apt/chef-integration-test-1.1/debian/control +0 -13
  63. data/spec/data/apt/chef-integration-test-1.1/debian/copyright +0 -34
  64. data/spec/data/apt/chef-integration-test-1.1/debian/files +0 -1
  65. data/spec/data/apt/chef-integration-test-1.1/debian/rules +0 -13
  66. data/spec/data/apt/chef-integration-test-1.1/debian/source/format +0 -1
  67. data/spec/data/apt/chef-integration-test2-1.0/debian/changelog +0 -5
  68. data/spec/data/apt/chef-integration-test2-1.0/debian/chef-integration-test2/DEBIAN/conffiles +0 -1
  69. data/spec/data/apt/chef-integration-test2-1.0/debian/chef-integration-test2/DEBIAN/control +0 -10
  70. data/spec/data/apt/chef-integration-test2-1.0/debian/chef-integration-test2/DEBIAN/md5sums +0 -1
  71. data/spec/data/apt/chef-integration-test2-1.0/debian/chef-integration-test2.debhelper.log +0 -45
  72. data/spec/data/apt/chef-integration-test2-1.0/debian/chef-integration-test2.substvars +0 -1
  73. data/spec/data/apt/chef-integration-test2-1.0/debian/compat +0 -1
  74. data/spec/data/apt/chef-integration-test2-1.0/debian/conffiles +0 -1
  75. data/spec/data/apt/chef-integration-test2-1.0/debian/control +0 -13
  76. data/spec/data/apt/chef-integration-test2-1.0/debian/copyright +0 -34
  77. data/spec/data/apt/chef-integration-test2-1.0/debian/files +0 -1
  78. data/spec/data/apt/chef-integration-test2-1.0/debian/rules +0 -13
  79. data/spec/data/apt/chef-integration-test2-1.0/debian/source/format +0 -1
  80. data/spec/data/apt/chef-integration-test2_1.0-1.debian.tar.gz +0 -0
  81. data/spec/data/apt/chef-integration-test2_1.0-1.dsc +0 -18
  82. data/spec/data/apt/chef-integration-test2_1.0-1_amd64.build +0 -91
  83. data/spec/data/apt/chef-integration-test2_1.0-1_amd64.changes +0 -31
  84. data/spec/data/apt/chef-integration-test2_1.0-1_amd64.deb +0 -0
  85. data/spec/data/apt/chef-integration-test2_1.0.orig.tar.gz +0 -0
  86. data/spec/data/apt/chef-integration-test_1.0-1_amd64.changes +0 -22
  87. data/spec/data/apt/chef-integration-test_1.0-1_amd64.deb +0 -0
  88. data/spec/data/apt/chef-integration-test_1.0.orig.tar.gz +0 -0
  89. data/spec/data/apt/chef-integration-test_1.1-1_amd64.changes +0 -22
  90. data/spec/data/apt/chef-integration-test_1.1-1_amd64.deb +0 -0
  91. data/spec/data/apt/chef-integration-test_1.1.orig.tar.gz +0 -0
  92. data/spec/data/apt/var/www/apt/conf/distributions +0 -7
  93. data/spec/data/apt/var/www/apt/conf/incoming +0 -4
  94. data/spec/data/apt/var/www/apt/conf/pulls +0 -3
  95. data/spec/data/apt/var/www/apt/db/checksums.db +0 -0
  96. data/spec/data/apt/var/www/apt/db/contents.cache.db +0 -0
  97. data/spec/data/apt/var/www/apt/db/packages.db +0 -0
  98. data/spec/data/apt/var/www/apt/db/references.db +0 -0
  99. data/spec/data/apt/var/www/apt/db/release.caches.db +0 -0
  100. data/spec/data/apt/var/www/apt/db/version +0 -4
  101. data/spec/data/apt/var/www/apt/dists/sid/Release +0 -19
  102. data/spec/data/apt/var/www/apt/dists/sid/main/binary-amd64/Packages +0 -16
  103. data/spec/data/apt/var/www/apt/dists/sid/main/binary-amd64/Packages.gz +0 -0
  104. data/spec/data/apt/var/www/apt/dists/sid/main/binary-amd64/Release +0 -5
  105. data/spec/data/apt/var/www/apt/dists/sid/main/binary-i386/Packages +0 -0
  106. data/spec/data/apt/var/www/apt/pool/main/c/chef-integration-test/chef-integration-test_1.0-1_amd64.deb +0 -0
  107. data/spec/data/apt/var/www/apt/pool/main/c/chef-integration-test/chef-integration-test_1.1-1_amd64.deb +0 -0
  108. data/spec/data/archive_file/test_archive.tar.gz +0 -0
  109. data/spec/data/bad-config.rb +0 -1
  110. data/spec/data/bootstrap/encrypted_data_bag_secret +0 -1
  111. data/spec/data/bootstrap/no_proxy.erb +0 -2
  112. data/spec/data/bootstrap/secret.erb +0 -9
  113. data/spec/data/bootstrap/test-hints.erb +0 -12
  114. data/spec/data/bootstrap/test.erb +0 -1
  115. data/spec/data/cb_version_cookbooks/cookbook2/files/test.txt +0 -0
  116. data/spec/data/cb_version_cookbooks/cookbook2/templates/test.erb +0 -0
  117. data/spec/data/cb_version_cookbooks/tatft/README.rdoc +0 -3
  118. data/spec/data/cb_version_cookbooks/tatft/attributes/default.rb +0 -1
  119. data/spec/data/cb_version_cookbooks/tatft/definitions/runit_service.rb +0 -1
  120. data/spec/data/cb_version_cookbooks/tatft/files/default/giant_blob.tgz +0 -1
  121. data/spec/data/cb_version_cookbooks/tatft/libraries/ownage.rb +0 -1
  122. data/spec/data/cb_version_cookbooks/tatft/providers/lwp.rb +0 -1
  123. data/spec/data/cb_version_cookbooks/tatft/recipes/default.rb +0 -1
  124. data/spec/data/cb_version_cookbooks/tatft/resources/lwr.rb +0 -1
  125. data/spec/data/cb_version_cookbooks/tatft/templates/default/configuration.erb +0 -0
  126. data/spec/data/checksum/random.txt +0 -1
  127. data/spec/data/checksum_cache/chef-file--tmp-chef-rendered-template20100929-10863-600hhz-0 +0 -1
  128. data/spec/data/checksum_cache/chef-file--tmp-chef-rendered-template20100929-10863-6m8zdk-0 +0 -0
  129. data/spec/data/checksum_cache/chef-file--tmp-chef-rendered-template20100929-10863-ahd2gq-0 +0 -1
  130. data/spec/data/checksum_cache/chef-file--tmp-chef-rendered-template20100929-10863-api8ux-0 +0 -1
  131. data/spec/data/checksum_cache/chef-file--tmp-chef-rendered-template20100929-10863-b0r1m1-0 +0 -1
  132. data/spec/data/checksum_cache/chef-file--tmp-chef-rendered-template20100929-10863-bfygsi-0 +0 -1
  133. data/spec/data/checksum_cache/chef-file--tmp-chef-rendered-template20100929-10863-el14l6-0 +0 -1
  134. data/spec/data/checksum_cache/chef-file--tmp-chef-rendered-template20100929-10863-ivrl3y-0 +0 -1
  135. data/spec/data/checksum_cache/chef-file--tmp-chef-rendered-template20100929-10863-kkbs85-0 +0 -1
  136. data/spec/data/checksum_cache/chef-file--tmp-chef-rendered-template20100929-10863-ory1ux-0 +0 -1
  137. data/spec/data/checksum_cache/chef-file--tmp-chef-rendered-template20100929-10863-pgsq76-0 +0 -1
  138. data/spec/data/checksum_cache/chef-file--tmp-chef-rendered-template20100929-10863-ra8uim-0 +0 -1
  139. data/spec/data/checksum_cache/chef-file--tmp-chef-rendered-template20100929-10863-t7k1g-0 +0 -1
  140. data/spec/data/checksum_cache/chef-file--tmp-chef-rendered-template20100929-10863-t8g0sv-0 +0 -1
  141. data/spec/data/checksum_cache/chef-file--tmp-chef-rendered-template20100929-10863-ufy6g3-0 +0 -1
  142. data/spec/data/checksum_cache/chef-file--tmp-chef-rendered-template20100929-10863-x2d6j9-0 +0 -1
  143. data/spec/data/checksum_cache/chef-file--tmp-chef-rendered-template20100929-10863-xi0l6h-0 +0 -1
  144. data/spec/data/client.d_00/00-foo.rb +0 -2
  145. data/spec/data/client.d_00/01-bar.rb +0 -1
  146. data/spec/data/client.d_00/02-strings.rb +0 -2
  147. data/spec/data/client.d_00/bar +0 -1
  148. data/spec/data/client.d_01/foo/bar.rb +0 -1
  149. data/spec/data/client.d_02/foo.rb/foo.txt +0 -1
  150. data/spec/data/config.rb +0 -6
  151. data/spec/data/cookbooks/angrybash/metadata.rb +0 -2
  152. data/spec/data/cookbooks/angrybash/recipes/default.rb +0 -8
  153. data/spec/data/cookbooks/apache2/files/default/apache2_module_conf_generate.pl +0 -2
  154. data/spec/data/cookbooks/apache2/metadata.json +0 -33
  155. data/spec/data/cookbooks/apache2/metadata.rb +0 -2
  156. data/spec/data/cookbooks/apache2/recipes/default.rb +0 -3
  157. data/spec/data/cookbooks/borken/metadata.rb +0 -2
  158. data/spec/data/cookbooks/borken/recipes/default.rb +0 -2
  159. data/spec/data/cookbooks/borken/templates/default/borken.erb +0 -2
  160. data/spec/data/cookbooks/chefignore +0 -8
  161. data/spec/data/cookbooks/ignorken/files/default/not_me.rb +0 -2
  162. data/spec/data/cookbooks/ignorken/metadata.rb +0 -2
  163. data/spec/data/cookbooks/ignorken/recipes/default.rb +0 -1
  164. data/spec/data/cookbooks/ignorken/recipes/ignoreme.rb +0 -2
  165. data/spec/data/cookbooks/ignorken/templates/ubuntu-12.10/not_me.rb +0 -2
  166. data/spec/data/cookbooks/irssi/files/default/irssi.response +0 -2
  167. data/spec/data/cookbooks/java/files/default/java.response +0 -2
  168. data/spec/data/cookbooks/java/metadata.json +0 -33
  169. data/spec/data/cookbooks/java/metadata.rb +0 -2
  170. data/spec/data/cookbooks/name-mismatch-versionnumber/README.md +0 -4
  171. data/spec/data/cookbooks/name-mismatch-versionnumber/metadata.rb +0 -8
  172. data/spec/data/cookbooks/name-mismatch-versionnumber/recipes/default.rb +0 -8
  173. data/spec/data/cookbooks/openldap/.root_dotfile +0 -0
  174. data/spec/data/cookbooks/openldap/attributes/default.rb +0 -16
  175. data/spec/data/cookbooks/openldap/attributes/smokey.rb +0 -1
  176. data/spec/data/cookbooks/openldap/definitions/client.rb +0 -5
  177. data/spec/data/cookbooks/openldap/definitions/server.rb +0 -5
  178. data/spec/data/cookbooks/openldap/files/default/.dotfile +0 -1
  179. data/spec/data/cookbooks/openldap/files/default/.ssh/id_rsa +0 -1
  180. data/spec/data/cookbooks/openldap/files/default/remotedir/.a_dotdir/.a_dotfile_in_a_dotdir +0 -1
  181. data/spec/data/cookbooks/openldap/files/default/remotedir/not_a_template.erb +0 -2
  182. data/spec/data/cookbooks/openldap/files/default/remotedir/remote_dir_file1.txt +0 -3
  183. data/spec/data/cookbooks/openldap/files/default/remotedir/remote_dir_file2.txt +0 -3
  184. data/spec/data/cookbooks/openldap/files/default/remotedir/remotesubdir/.a_dotfile +0 -1
  185. data/spec/data/cookbooks/openldap/files/default/remotedir/remotesubdir/remote_subdir_file1.txt +0 -3
  186. data/spec/data/cookbooks/openldap/files/default/remotedir/remotesubdir/remote_subdir_file2.txt +0 -3
  187. data/spec/data/cookbooks/openldap/files/default/remotedir/subdir_with_no_file_just_a_subsubdir/the_subsubdir/some_file.txt +0 -3
  188. data/spec/data/cookbooks/openldap/libraries/openldap/version.rb +0 -3
  189. data/spec/data/cookbooks/openldap/libraries/openldap.rb +0 -4
  190. data/spec/data/cookbooks/openldap/metadata.rb +0 -8
  191. data/spec/data/cookbooks/openldap/recipes/default.rb +0 -4
  192. data/spec/data/cookbooks/openldap/recipes/gigantor.rb +0 -3
  193. data/spec/data/cookbooks/openldap/recipes/one.rb +0 -15
  194. data/spec/data/cookbooks/openldap/recipes/return.rb +0 -2
  195. data/spec/data/cookbooks/openldap/spec/spec_helper.rb +0 -0
  196. data/spec/data/cookbooks/openldap/templates/default/all_windows_line_endings.erb +0 -4
  197. data/spec/data/cookbooks/openldap/templates/default/helper_test.erb +0 -1
  198. data/spec/data/cookbooks/openldap/templates/default/helpers.erb +0 -14
  199. data/spec/data/cookbooks/openldap/templates/default/helpers_via_partial_test.erb +0 -1
  200. data/spec/data/cookbooks/openldap/templates/default/nested_openldap_partials.erb +0 -1
  201. data/spec/data/cookbooks/openldap/templates/default/nested_partial.erb +0 -1
  202. data/spec/data/cookbooks/openldap/templates/default/no_windows_line_endings.erb +0 -4
  203. data/spec/data/cookbooks/openldap/templates/default/openldap_nested_variable_stuff.erb +0 -1
  204. data/spec/data/cookbooks/openldap/templates/default/openldap_stuff.conf.erb +0 -1
  205. data/spec/data/cookbooks/openldap/templates/default/openldap_variable_stuff.conf.erb +0 -1
  206. data/spec/data/cookbooks/openldap/templates/default/some_windows_line_endings.erb +0 -4
  207. data/spec/data/cookbooks/openldap/templates/default/test.erb +0 -1
  208. data/spec/data/cookbooks/preseed/files/default/preseed-file.seed +0 -1
  209. data/spec/data/cookbooks/preseed/files/default/preseed-template.seed +0 -4
  210. data/spec/data/cookbooks/preseed/metadata.rb +0 -2
  211. data/spec/data/cookbooks/preseed/templates/default/preseed-template-variables.seed +0 -1
  212. data/spec/data/cookbooks/preseed/templates/default/preseed-template.seed +0 -1
  213. data/spec/data/cookbooks/starter/chefignore +0 -8
  214. data/spec/data/cookbooks/starter/files/sample.txt +0 -1
  215. data/spec/data/cookbooks/starter/metadata.rb +0 -2
  216. data/spec/data/cookbooks/starter/recipes/default.rb +0 -4
  217. data/spec/data/cookbooks/supports-platform-constraints/metadata.rb +0 -5
  218. data/spec/data/cookbooks/wget/files/default/wget.response +0 -2
  219. data/spec/data/definitions/test.rb +0 -5
  220. data/spec/data/dsc_lcm.pfx +0 -0
  221. data/spec/data/environment-config.rb +0 -5
  222. data/spec/data/file-providers-method-snapshot-chef-11-4.json +0 -127
  223. data/spec/data/fileedit/blank +0 -0
  224. data/spec/data/fileedit/hosts +0 -4
  225. data/spec/data/gems/chef-integration-test-0.1.0.gem +0 -0
  226. data/spec/data/git_bundles/example-repo.gitbundle +0 -0
  227. data/spec/data/git_bundles/sinatra-test-app-with-callback-files.gitbundle +0 -0
  228. data/spec/data/git_bundles/sinatra-test-app-with-symlinks.gitbundle +0 -0
  229. data/spec/data/git_bundles/sinatra-test-app.gitbundle +0 -0
  230. data/spec/data/incomplete-metadata-chef-repo/incomplete-metadata/README.md +0 -4
  231. data/spec/data/incomplete-metadata-chef-repo/incomplete-metadata/metadata.rb +0 -13
  232. data/spec/data/incomplete-metadata-chef-repo/incomplete-metadata/recipes/default.rb +0 -8
  233. data/spec/data/invalid-metadata-chef-repo/invalid-metadata/README.md +0 -4
  234. data/spec/data/invalid-metadata-chef-repo/invalid-metadata/metadata.rb +0 -9
  235. data/spec/data/invalid-metadata-chef-repo/invalid-metadata/recipes/default.rb +0 -8
  236. data/spec/data/kitchen/chefignore +0 -6
  237. data/spec/data/kitchen/openldap/attributes/default.rb +0 -3
  238. data/spec/data/kitchen/openldap/attributes/robinson.rb +0 -3
  239. data/spec/data/kitchen/openldap/definitions/client.rb +0 -3
  240. data/spec/data/kitchen/openldap/definitions/drewbarrymore.rb +0 -3
  241. data/spec/data/kitchen/openldap/recipes/gigantor.rb +0 -3
  242. data/spec/data/kitchen/openldap/recipes/ignoreme.rb +0 -3
  243. data/spec/data/kitchen/openldap/recipes/woot.rb +0 -3
  244. data/spec/data/knife-home/.chef/plugins/knife/example_home_subcommand.rb +0 -0
  245. data/spec/data/knife-site-subcommands/plugins/knife/example_subcommand.rb +0 -0
  246. data/spec/data/knife_subcommand/test_explicit_category.rb +0 -7
  247. data/spec/data/knife_subcommand/test_name_mapping.rb +0 -4
  248. data/spec/data/knife_subcommand/test_yourself.rb +0 -21
  249. data/spec/data/lwrp/providers/buck_passer.rb +0 -28
  250. data/spec/data/lwrp/providers/buck_passer_2.rb +0 -26
  251. data/spec/data/lwrp/providers/embedded_resource_accesses_providers_scope.rb +0 -28
  252. data/spec/data/lwrp/providers/inline_compiler.rb +0 -24
  253. data/spec/data/lwrp/providers/monkey_name_printer.rb +0 -5
  254. data/spec/data/lwrp/providers/paint_drying_watcher.rb +0 -7
  255. data/spec/data/lwrp/providers/thumb_twiddler.rb +0 -7
  256. data/spec/data/lwrp/resources/bar.rb +0 -4
  257. data/spec/data/lwrp/resources/buck_passer.rb +0 -6
  258. data/spec/data/lwrp/resources/buck_passer_2.rb +0 -4
  259. data/spec/data/lwrp/resources/embedded_resource_accesses_providers_scope.rb +0 -4
  260. data/spec/data/lwrp/resources/foo.rb +0 -6
  261. data/spec/data/lwrp/resources/inline_compiler.rb +0 -4
  262. data/spec/data/lwrp/resources/monkey_name_printer.rb +0 -6
  263. data/spec/data/lwrp/resources/paint_drying_watcher.rb +0 -4
  264. data/spec/data/lwrp/resources/thumb_twiddler.rb +0 -4
  265. data/spec/data/lwrp/resources_with_default_attributes/nodeattr.rb +0 -3
  266. data/spec/data/lwrp_const_scoping/resources/conflict.rb +0 -1
  267. data/spec/data/lwrp_override/providers/buck_passer.rb +0 -5
  268. data/spec/data/lwrp_override/resources/foo.rb +0 -11
  269. data/spec/data/mac_users/10.9.plist.xml +0 -560
  270. data/spec/data/mac_users/10.9.shadow.xml +0 -21
  271. data/spec/data/metadata/quick_start/metadata.rb +0 -14
  272. data/spec/data/mixin/invalid_data.rb +0 -3
  273. data/spec/data/mixin/real_data.rb +0 -2
  274. data/spec/data/nested.json +0 -2
  275. data/spec/data/nodes/default.rb +0 -15
  276. data/spec/data/nodes/test.example.com.rb +0 -17
  277. data/spec/data/nodes/test.rb +0 -15
  278. data/spec/data/null_config.rb +0 -1
  279. data/spec/data/object_loader/environments/test.json +0 -7
  280. data/spec/data/object_loader/environments/test.rb +0 -2
  281. data/spec/data/object_loader/environments/test_json_class.json +0 -8
  282. data/spec/data/object_loader/nodes/test.json +0 -7
  283. data/spec/data/object_loader/nodes/test.rb +0 -2
  284. data/spec/data/object_loader/nodes/test_json_class.json +0 -8
  285. data/spec/data/object_loader/roles/test.json +0 -7
  286. data/spec/data/object_loader/roles/test.rb +0 -2
  287. data/spec/data/object_loader/roles/test_json_class.json +0 -8
  288. data/spec/data/old_home_dir/my-dot-emacs +0 -0
  289. data/spec/data/old_home_dir/my-dot-vim +0 -0
  290. data/spec/data/partial_one.erb +0 -1
  291. data/spec/data/prefer_metadata_json/metadata.json +0 -51
  292. data/spec/data/prefer_metadata_json/metadata.rb +0 -6
  293. data/spec/data/prefer_metadata_json/recipes/default.rb +0 -0
  294. data/spec/data/recipes/test.rb +0 -7
  295. data/spec/data/recipes.tgz +0 -0
  296. data/spec/data/remote_directory_data/remote_dir_file.txt +0 -1
  297. data/spec/data/remote_directory_data/remote_subdirectory/remote_subdir_file.txt +0 -1
  298. data/spec/data/remote_file/nyan_cat.png +0 -0
  299. data/spec/data/remote_file/nyan_cat.png.gz +0 -0
  300. data/spec/data/root_alias_cookbooks/dup_attr/attributes/default.rb +0 -1
  301. data/spec/data/root_alias_cookbooks/dup_attr/attributes.rb +0 -1
  302. data/spec/data/root_alias_cookbooks/dup_attr/metadata.rb +0 -2
  303. data/spec/data/root_alias_cookbooks/dup_attr/recipe.rb +0 -3
  304. data/spec/data/root_alias_cookbooks/dup_recipe/attributes.rb +0 -1
  305. data/spec/data/root_alias_cookbooks/dup_recipe/metadata.rb +0 -2
  306. data/spec/data/root_alias_cookbooks/dup_recipe/recipe.rb +0 -3
  307. data/spec/data/root_alias_cookbooks/dup_recipe/recipes/default.rb +0 -3
  308. data/spec/data/root_alias_cookbooks/simple/attributes.rb +0 -1
  309. data/spec/data/root_alias_cookbooks/simple/metadata.rb +0 -2
  310. data/spec/data/root_alias_cookbooks/simple/recipe.rb +0 -3
  311. data/spec/data/rubygems.org/latest_specs.4.8.gz +0 -0
  312. data/spec/data/rubygems.org/nonexistent_gem +0 -0
  313. data/spec/data/rubygems.org/nonexistent_gem-info +0 -1
  314. data/spec/data/rubygems.org/sexp_processor +0 -0
  315. data/spec/data/rubygems.org/sexp_processor-4.15.1.gemspec.rz +0 -0
  316. data/spec/data/rubygems.org/sexp_processor-info +0 -50
  317. data/spec/data/run_context/cookbooks/circular-dep1/attributes/default.rb +0 -2
  318. data/spec/data/run_context/cookbooks/circular-dep1/definitions/circular_dep1_res.rb +0 -1
  319. data/spec/data/run_context/cookbooks/circular-dep1/libraries/lib.rb +0 -2
  320. data/spec/data/run_context/cookbooks/circular-dep1/metadata.rb +0 -2
  321. data/spec/data/run_context/cookbooks/circular-dep1/providers/provider.rb +0 -1
  322. data/spec/data/run_context/cookbooks/circular-dep1/recipes/default.rb +0 -0
  323. data/spec/data/run_context/cookbooks/circular-dep1/resources/resource.rb +0 -2
  324. data/spec/data/run_context/cookbooks/circular-dep2/attributes/default.rb +0 -2
  325. data/spec/data/run_context/cookbooks/circular-dep2/definitions/circular_dep2_res.rb +0 -1
  326. data/spec/data/run_context/cookbooks/circular-dep2/libraries/lib.rb +0 -2
  327. data/spec/data/run_context/cookbooks/circular-dep2/metadata.rb +0 -2
  328. data/spec/data/run_context/cookbooks/circular-dep2/providers/provider.rb +0 -1
  329. data/spec/data/run_context/cookbooks/circular-dep2/recipes/default.rb +0 -0
  330. data/spec/data/run_context/cookbooks/circular-dep2/resources/resource.rb +0 -2
  331. data/spec/data/run_context/cookbooks/dependency1/attributes/aa_first.rb +0 -2
  332. data/spec/data/run_context/cookbooks/dependency1/attributes/default.rb +0 -2
  333. data/spec/data/run_context/cookbooks/dependency1/attributes/unparsed_file +0 -1
  334. data/spec/data/run_context/cookbooks/dependency1/attributes/zz_last.rb +0 -2
  335. data/spec/data/run_context/cookbooks/dependency1/definitions/dependency1_res.rb +0 -1
  336. data/spec/data/run_context/cookbooks/dependency1/definitions/unparsed_file +0 -1
  337. data/spec/data/run_context/cookbooks/dependency1/libraries/lib.rb +0 -2
  338. data/spec/data/run_context/cookbooks/dependency1/libraries/unparsed_file +0 -1
  339. data/spec/data/run_context/cookbooks/dependency1/providers/provider.rb +0 -1
  340. data/spec/data/run_context/cookbooks/dependency1/providers/unparsed_file +0 -1
  341. data/spec/data/run_context/cookbooks/dependency1/recipes/default.rb +0 -0
  342. data/spec/data/run_context/cookbooks/dependency1/recipes/unparsed_file +0 -1
  343. data/spec/data/run_context/cookbooks/dependency1/resources/resource.rb +0 -2
  344. data/spec/data/run_context/cookbooks/dependency1/resources/unparsed_file +0 -1
  345. data/spec/data/run_context/cookbooks/dependency2/attributes/default.rb +0 -2
  346. data/spec/data/run_context/cookbooks/dependency2/definitions/dependency2_res.rb +0 -1
  347. data/spec/data/run_context/cookbooks/dependency2/libraries/lib.rb +0 -2
  348. data/spec/data/run_context/cookbooks/dependency2/providers/provider.rb +0 -1
  349. data/spec/data/run_context/cookbooks/dependency2/recipes/default.rb +0 -0
  350. data/spec/data/run_context/cookbooks/dependency2/resources/resource.rb +0 -2
  351. data/spec/data/run_context/cookbooks/include/recipes/default.rb +0 -24
  352. data/spec/data/run_context/cookbooks/include/recipes/includee.rb +0 -3
  353. data/spec/data/run_context/cookbooks/no-default-attr/attributes/server.rb +0 -2
  354. data/spec/data/run_context/cookbooks/no-default-attr/definitions/no_default-attr_res.rb +0 -1
  355. data/spec/data/run_context/cookbooks/no-default-attr/providers/provider.rb +0 -1
  356. data/spec/data/run_context/cookbooks/no-default-attr/recipes/default.rb +0 -0
  357. data/spec/data/run_context/cookbooks/no-default-attr/resources/resource.rb +0 -2
  358. data/spec/data/run_context/cookbooks/test/attributes/default.rb +0 -0
  359. data/spec/data/run_context/cookbooks/test/attributes/george.rb +0 -1
  360. data/spec/data/run_context/cookbooks/test/definitions/new_animals.rb +0 -9
  361. data/spec/data/run_context/cookbooks/test/definitions/new_cat.rb +0 -5
  362. data/spec/data/run_context/cookbooks/test/definitions/test_res.rb +0 -1
  363. data/spec/data/run_context/cookbooks/test/providers/provider.rb +0 -1
  364. data/spec/data/run_context/cookbooks/test/recipes/default.rb +0 -5
  365. data/spec/data/run_context/cookbooks/test/recipes/one.rb +0 -7
  366. data/spec/data/run_context/cookbooks/test/recipes/two.rb +0 -7
  367. data/spec/data/run_context/cookbooks/test/resources/resource.rb +0 -3
  368. data/spec/data/run_context/cookbooks/test-with-circular-deps/attributes/default.rb +0 -2
  369. data/spec/data/run_context/cookbooks/test-with-circular-deps/definitions/test_with-circular-deps_res.rb +0 -1
  370. data/spec/data/run_context/cookbooks/test-with-circular-deps/libraries/lib.rb +0 -2
  371. data/spec/data/run_context/cookbooks/test-with-circular-deps/metadata.rb +0 -2
  372. data/spec/data/run_context/cookbooks/test-with-circular-deps/providers/provider.rb +0 -1
  373. data/spec/data/run_context/cookbooks/test-with-circular-deps/recipes/default.rb +0 -0
  374. data/spec/data/run_context/cookbooks/test-with-circular-deps/resources/resource.rb +0 -3
  375. data/spec/data/run_context/cookbooks/test-with-deps/attributes/default.rb +0 -2
  376. data/spec/data/run_context/cookbooks/test-with-deps/definitions/test_with-deps_res.rb +0 -1
  377. data/spec/data/run_context/cookbooks/test-with-deps/libraries/lib.rb +0 -1
  378. data/spec/data/run_context/cookbooks/test-with-deps/metadata.rb +0 -3
  379. data/spec/data/run_context/cookbooks/test-with-deps/providers/provider.rb +0 -1
  380. data/spec/data/run_context/cookbooks/test-with-deps/recipes/default.rb +0 -0
  381. data/spec/data/run_context/cookbooks/test-with-deps/recipes/server.rb +0 -0
  382. data/spec/data/run_context/cookbooks/test-with-deps/resources/resource.rb +0 -2
  383. data/spec/data/run_context/nodes/run_context.rb +0 -5
  384. data/spec/data/sample_msu1.xml +0 -10
  385. data/spec/data/sample_msu2.xml +0 -14
  386. data/spec/data/sample_msu3.xml +0 -16
  387. data/spec/data/search_queries_to_transform.txt +0 -98
  388. data/spec/data/shef-config.rb +0 -11
  389. data/spec/data/snap_package/async_result_success.json +0 -6
  390. data/spec/data/snap_package/change_id_result.json +0 -175
  391. data/spec/data/snap_package/find_result_failure.json +0 -10
  392. data/spec/data/snap_package/find_result_success.json +0 -70
  393. data/spec/data/snap_package/get_by_name_result_failure.json +0 -10
  394. data/spec/data/snap_package/get_by_name_result_success.json +0 -38
  395. data/spec/data/snap_package/get_conf_success.json +0 -10
  396. data/spec/data/snap_package/result_failure.json +0 -9
  397. data/spec/data/ssl/5e707473.0 +0 -18
  398. data/spec/data/ssl/binary/chef-rspec-der.cert +0 -0
  399. data/spec/data/ssl/binary/chef-rspec-der.key +0 -0
  400. data/spec/data/ssl/chef-rspec.cert +0 -27
  401. data/spec/data/ssl/chef-rspec.key +0 -27
  402. data/spec/data/ssl/key.pem +0 -15
  403. data/spec/data/ssl/private_key.pem +0 -27
  404. data/spec/data/ssl/private_key_with_whitespace.pem +0 -32
  405. data/spec/data/standalone_cookbook/Gemfile +0 -1
  406. data/spec/data/standalone_cookbook/chefignore +0 -9
  407. data/spec/data/standalone_cookbook/recipes/default.rb +0 -3
  408. data/spec/data/standalone_cookbook/vendor/bundle/ruby/2.0.0/gems/multi_json-1.9.0/lib/multi_json.rb +0 -1
  409. data/spec/data/templates/chef-seattle20160930-4388-1crv7ef.txt +0 -1
  410. data/spec/data/templates/chef-seattle20160930-4388-jjfoae.txt +0 -1
  411. data/spec/data/templates/chef-seattle20160930-4388-umeq2c.txt +0 -1
  412. data/spec/data/templates/failed.erb +0 -5
  413. data/spec/data/templates/seattle.txt +0 -1
  414. data/spec/data/trusted_certs/example.crt +0 -31
  415. data/spec/data/trusted_certs/example_no_cn.crt +0 -32
  416. data/spec/data/trusted_certs/intermediate.pem +0 -38
  417. data/spec/data/trusted_certs/opscode.pem +0 -36
  418. data/spec/data/trusted_certs/root.pem +0 -22
  419. data/spec/data/windows_certificates/base64_test.cer +0 -20
  420. data/spec/data/windows_certificates/othertest.cer +0 -20
  421. data/spec/data/windows_certificates/test.cer +0 -20
  422. data/spec/data/windows_certificates/test.p7b +0 -0
  423. data/spec/data/windows_certificates/test.pem +0 -20
  424. data/spec/data/windows_certificates/test.pfx +0 -0
  425. data/spec/functional/application_spec.rb +0 -58
  426. data/spec/functional/assets/PkgA.1.0.0.0.bff +0 -0
  427. data/spec/functional/assets/PkgA.2.0.0.0.bff +0 -0
  428. data/spec/functional/assets/chefinittest +0 -36
  429. data/spec/functional/assets/chocolatey_feed/test-A.1.0.0.nupkg +0 -0
  430. data/spec/functional/assets/chocolatey_feed/test-A.1.5.0.nupkg +0 -0
  431. data/spec/functional/assets/chocolatey_feed/test-A.2.0.0.nupkg +0 -0
  432. data/spec/functional/assets/chocolatey_feed/test-B.1.0.0.nupkg +0 -0
  433. data/spec/functional/assets/dummy-1-0.aix6.1.noarch.rpm +0 -0
  434. data/spec/functional/assets/dummy-2-0.aix6.1.noarch.rpm +0 -0
  435. data/spec/functional/assets/inittest +0 -37
  436. data/spec/functional/assets/mytest-1.0-1.noarch.rpm +0 -0
  437. data/spec/functional/assets/mytest-2.0-1.noarch.rpm +0 -0
  438. data/spec/functional/assets/testchefsubsys +0 -10
  439. data/spec/functional/assets/yumrepo/chef_rpm-1.10-1.aarch64.rpm +0 -0
  440. data/spec/functional/assets/yumrepo/chef_rpm-1.10-1.i686.rpm +0 -0
  441. data/spec/functional/assets/yumrepo/chef_rpm-1.10-1.ppc64.rpm +0 -0
  442. data/spec/functional/assets/yumrepo/chef_rpm-1.10-1.ppc64le.rpm +0 -0
  443. data/spec/functional/assets/yumrepo/chef_rpm-1.10-1.s390x.rpm +0 -0
  444. data/spec/functional/assets/yumrepo/chef_rpm-1.10-1.src.rpm +0 -0
  445. data/spec/functional/assets/yumrepo/chef_rpm-1.10-1.x86_64.rpm +0 -0
  446. data/spec/functional/assets/yumrepo/chef_rpm-1.2-1.aarch64.rpm +0 -0
  447. data/spec/functional/assets/yumrepo/chef_rpm-1.2-1.i686.rpm +0 -0
  448. data/spec/functional/assets/yumrepo/chef_rpm-1.2-1.ppc64.rpm +0 -0
  449. data/spec/functional/assets/yumrepo/chef_rpm-1.2-1.ppc64le.rpm +0 -0
  450. data/spec/functional/assets/yumrepo/chef_rpm-1.2-1.s390x.rpm +0 -0
  451. data/spec/functional/assets/yumrepo/chef_rpm-1.2-1.src.rpm +0 -0
  452. data/spec/functional/assets/yumrepo/chef_rpm-1.2-1.x86_64.rpm +0 -0
  453. data/spec/functional/assets/yumrepo/repodata/4632d67cb92636e7575d911c24f0e04d3505a944e97c483abe0c3e73a7c62d33-filelists.sqlite.bz2 +0 -0
  454. data/spec/functional/assets/yumrepo/repodata/74599b793e54d877323837d2d81a1c3c594c44e4335f9528234bb490f7b9b439-other.xml.gz +0 -0
  455. data/spec/functional/assets/yumrepo/repodata/a845d418f919d2115ab95a56b2c76f6825ad0d0bede49181a55c04f58995d057-primary.sqlite.bz2 +0 -0
  456. data/spec/functional/assets/yumrepo/repodata/af9b7cf9ef23bd7b43068d74a460f3b5d06753d638e58e4a0c9edc35bfb9cdc4-other.sqlite.bz2 +0 -0
  457. data/spec/functional/assets/yumrepo/repodata/bdb4f5f1492a3b9532f22c43110a81500dd744f23da0aec5c33b2a41317c737d-filelists.xml.gz +0 -0
  458. data/spec/functional/assets/yumrepo/repodata/c10d1d34ce99e02f12ec96ef68360543ab1bb7c3cb81a4a2bf78df7d8597e9df-primary.xml.gz +0 -0
  459. data/spec/functional/assets/yumrepo/repodata/filelists.xml.gz +0 -0
  460. data/spec/functional/assets/yumrepo/repodata/other.xml.gz +0 -0
  461. data/spec/functional/assets/yumrepo/repodata/primary.xml.gz +0 -0
  462. data/spec/functional/assets/yumrepo/repodata/repomd.xml +0 -21
  463. data/spec/functional/assets/yumrepo-empty/repodata/01a3b-filelists.sqlite.bz2 +0 -0
  464. data/spec/functional/assets/yumrepo-empty/repodata/401dc-filelists.xml.gz +0 -0
  465. data/spec/functional/assets/yumrepo-empty/repodata/5dc1e-primary.sqlite.bz2 +0 -0
  466. data/spec/functional/assets/yumrepo-empty/repodata/6bf96-other.xml.gz +0 -0
  467. data/spec/functional/assets/yumrepo-empty/repodata/7c365-other.sqlite.bz2 +0 -0
  468. data/spec/functional/assets/yumrepo-empty/repodata/dabe2-primary.xml.gz +0 -0
  469. data/spec/functional/assets/yumrepo-empty/repodata/repomd.xml +0 -55
  470. data/spec/functional/assets/zypprepo/chef_rpm-1.10-1.aarch64.rpm +0 -0
  471. data/spec/functional/assets/zypprepo/chef_rpm-1.10-1.i686.rpm +0 -0
  472. data/spec/functional/assets/zypprepo/chef_rpm-1.10-1.ppc64.rpm +0 -0
  473. data/spec/functional/assets/zypprepo/chef_rpm-1.10-1.ppc64le.rpm +0 -0
  474. data/spec/functional/assets/zypprepo/chef_rpm-1.10-1.s390x.rpm +0 -0
  475. data/spec/functional/assets/zypprepo/chef_rpm-1.10-1.src.rpm +0 -0
  476. data/spec/functional/assets/zypprepo/chef_rpm-1.10-1.x86_64.rpm +0 -0
  477. data/spec/functional/assets/zypprepo/chef_rpm-1.2-1.aarch64.rpm +0 -0
  478. data/spec/functional/assets/zypprepo/chef_rpm-1.2-1.i686.rpm +0 -0
  479. data/spec/functional/assets/zypprepo/chef_rpm-1.2-1.ppc64.rpm +0 -0
  480. data/spec/functional/assets/zypprepo/chef_rpm-1.2-1.ppc64le.rpm +0 -0
  481. data/spec/functional/assets/zypprepo/chef_rpm-1.2-1.s390x.rpm +0 -0
  482. data/spec/functional/assets/zypprepo/chef_rpm-1.2-1.src.rpm +0 -0
  483. data/spec/functional/assets/zypprepo/chef_rpm-1.2-1.x86_64.rpm +0 -0
  484. data/spec/functional/dsl/reboot_pending_spec.rb +0 -88
  485. data/spec/functional/dsl/registry_helper_spec.rb +0 -61
  486. data/spec/functional/event_loggers/windows_eventlog_spec.rb +0 -107
  487. data/spec/functional/file_content_management/deploy_strategies_spec.rb +0 -229
  488. data/spec/functional/http/simple_spec.rb +0 -146
  489. data/spec/functional/mixin/from_file_spec.rb +0 -93
  490. data/spec/functional/mixin/powershell_out_spec.rb +0 -51
  491. data/spec/functional/mixin/shell_out_spec.rb +0 -48
  492. data/spec/functional/mixin/user_context_spec.rb +0 -119
  493. data/spec/functional/notifications_spec.rb +0 -238
  494. data/spec/functional/provider/remote_file/cache_control_data_spec.rb +0 -100
  495. data/spec/functional/provider/whyrun_safe_ruby_block_spec.rb +0 -51
  496. data/spec/functional/rebooter_spec.rb +0 -117
  497. data/spec/functional/resource/aix_service_spec.rb +0 -145
  498. data/spec/functional/resource/aixinit_service_spec.rb +0 -210
  499. data/spec/functional/resource/apt_package_spec.rb +0 -383
  500. data/spec/functional/resource/archive_file_spec.rb +0 -88
  501. data/spec/functional/resource/bash_spec.rb +0 -55
  502. data/spec/functional/resource/batch_spec.rb +0 -34
  503. data/spec/functional/resource/bff_spec.rb +0 -120
  504. data/spec/functional/resource/chocolatey_package_spec.rb +0 -194
  505. data/spec/functional/resource/cookbook_file_spec.rb +0 -79
  506. data/spec/functional/resource/cron_spec.rb +0 -179
  507. data/spec/functional/resource/directory_spec.rb +0 -43
  508. data/spec/functional/resource/dnf_package_spec.rb +0 -1629
  509. data/spec/functional/resource/dpkg_package_spec.rb +0 -355
  510. data/spec/functional/resource/dsc_resource_spec.rb +0 -91
  511. data/spec/functional/resource/dsc_script_spec.rb +0 -476
  512. data/spec/functional/resource/execute_spec.rb +0 -171
  513. data/spec/functional/resource/file_spec.rb +0 -167
  514. data/spec/functional/resource/git_spec.rb +0 -329
  515. data/spec/functional/resource/group_spec.rb +0 -486
  516. data/spec/functional/resource/ifconfig_spec.rb +0 -178
  517. data/spec/functional/resource/insserv_spec.rb +0 -206
  518. data/spec/functional/resource/launchd_spec.rb +0 -232
  519. data/spec/functional/resource/link_spec.rb +0 -704
  520. data/spec/functional/resource/locale_spec.rb +0 -108
  521. data/spec/functional/resource/macos_userdefaults_spec.rb +0 -139
  522. data/spec/functional/resource/mount_spec.rb +0 -219
  523. data/spec/functional/resource/msu_package_spec.rb +0 -107
  524. data/spec/functional/resource/ohai_spec.rb +0 -54
  525. data/spec/functional/resource/plist_spec.rb +0 -25
  526. data/spec/functional/resource/powershell_package_source_spec.rb +0 -106
  527. data/spec/functional/resource/powershell_script_spec.rb +0 -588
  528. data/spec/functional/resource/reboot_spec.rb +0 -103
  529. data/spec/functional/resource/registry_spec.rb +0 -300
  530. data/spec/functional/resource/remote_directory_spec.rb +0 -220
  531. data/spec/functional/resource/remote_file_spec.rb +0 -418
  532. data/spec/functional/resource/rpm_spec.rb +0 -120
  533. data/spec/functional/resource/template_spec.rb +0 -245
  534. data/spec/functional/resource/timezone_spec.rb +0 -41
  535. data/spec/functional/resource/user/linux_user_spec.rb +0 -127
  536. data/spec/functional/resource/user/mac_user_spec.rb +0 -207
  537. data/spec/functional/resource/user/windows_spec.rb +0 -245
  538. data/spec/functional/resource/windows_certificate_spec.rb +0 -401
  539. data/spec/functional/resource/windows_env_spec.rb +0 -285
  540. data/spec/functional/resource/windows_firewall_rule_spec.rb +0 -93
  541. data/spec/functional/resource/windows_font_spec.rb +0 -52
  542. data/spec/functional/resource/windows_hostname_spec.rb +0 -91
  543. data/spec/functional/resource/windows_package_spec.rb +0 -193
  544. data/spec/functional/resource/windows_pagefile_spec.rb +0 -125
  545. data/spec/functional/resource/windows_path_spec.rb +0 -68
  546. data/spec/functional/resource/windows_security_policy_spec.rb +0 -86
  547. data/spec/functional/resource/windows_share_spec.rb +0 -103
  548. data/spec/functional/resource/windows_task_spec.rb +0 -1969
  549. data/spec/functional/resource/windows_user_privilege_spec.rb +0 -192
  550. data/spec/functional/resource/yum_package_spec.rb +0 -1739
  551. data/spec/functional/resource/zypper_package_spec.rb +0 -276
  552. data/spec/functional/root_alias_spec.rb +0 -78
  553. data/spec/functional/run_lock_spec.rb +0 -481
  554. data/spec/functional/shell_spec.rb +0 -149
  555. data/spec/functional/tiny_server_spec.rb +0 -79
  556. data/spec/functional/util/path_helper_spec.rb +0 -37
  557. data/spec/functional/version_spec.rb +0 -36
  558. data/spec/functional/win32/crypto_spec.rb +0 -54
  559. data/spec/functional/win32/registry_spec.rb +0 -618
  560. data/spec/functional/win32/security_spec.rb +0 -233
  561. data/spec/functional/win32/sid_spec.rb +0 -55
  562. data/spec/functional/win32/version_info_spec.rb +0 -50
  563. data/spec/functional/win32/versions_spec.rb +0 -115
  564. data/spec/integration/client/client_spec.rb +0 -963
  565. data/spec/integration/client/exit_code_spec.rb +0 -116
  566. data/spec/integration/client/fips_spec.rb +0 -29
  567. data/spec/integration/client/ipv6_spec.rb +0 -135
  568. data/spec/integration/client/open_ssl_spec.rb +0 -20
  569. data/spec/integration/compliance/compliance_spec.rb +0 -143
  570. data/spec/integration/ohai/ohai_spec.rb +0 -62
  571. data/spec/integration/recipes/accumulator_spec.rb +0 -245
  572. data/spec/integration/recipes/lwrp_inline_resources_spec.rb +0 -176
  573. data/spec/integration/recipes/lwrp_spec.rb +0 -56
  574. data/spec/integration/recipes/noop_resource_spec.rb +0 -24
  575. data/spec/integration/recipes/notifies_spec.rb +0 -438
  576. data/spec/integration/recipes/notifying_block_spec.rb +0 -116
  577. data/spec/integration/recipes/provider_choice.rb +0 -38
  578. data/spec/integration/recipes/recipe_dsl_spec.rb +0 -1281
  579. data/spec/integration/recipes/remote_directory.rb +0 -74
  580. data/spec/integration/recipes/resource_action_spec.rb +0 -524
  581. data/spec/integration/recipes/resource_converge_if_changed_spec.rb +0 -554
  582. data/spec/integration/recipes/resource_load_spec.rb +0 -315
  583. data/spec/integration/recipes/unified_mode_spec.rb +0 -947
  584. data/spec/integration/recipes/use_partial_spec.rb +0 -116
  585. data/spec/integration/solo/solo_spec.rb +0 -219
  586. data/spec/rcov.opts +0 -2
  587. data/spec/spec_helper.rb +0 -349
  588. data/spec/stress/win32/file_spec.rb +0 -37
  589. data/spec/stress/win32/memory_spec.rb +0 -22
  590. data/spec/stress/win32/security_spec.rb +0 -69
  591. data/spec/support/chef_helpers.rb +0 -79
  592. data/spec/support/key_helpers.rb +0 -102
  593. data/spec/support/lib/chef/provider/easy.rb +0 -35
  594. data/spec/support/lib/chef/provider/openldap_includer.rb +0 -29
  595. data/spec/support/lib/chef/provider/snakeoil.rb +0 -42
  596. data/spec/support/lib/chef/resource/cat.rb +0 -39
  597. data/spec/support/lib/chef/resource/one_two_three_four.rb +0 -36
  598. data/spec/support/lib/chef/resource/openldap_includer.rb +0 -28
  599. data/spec/support/lib/chef/resource/with_state.rb +0 -29
  600. data/spec/support/lib/chef/resource/zen_follower.rb +0 -36
  601. data/spec/support/lib/chef/resource/zen_master.rb +0 -39
  602. data/spec/support/lib/library_load_order.rb +0 -20
  603. data/spec/support/matchers/leak.rb +0 -96
  604. data/spec/support/mock/platform.rb +0 -33
  605. data/spec/support/platform_helpers.rb +0 -284
  606. data/spec/support/platforms/prof/gc.rb +0 -51
  607. data/spec/support/platforms/prof/win32.rb +0 -45
  608. data/spec/support/platforms/win32/spec_service.rb +0 -57
  609. data/spec/support/recipe_dsl_helper.rb +0 -83
  610. data/spec/support/ruby_installer.rb +0 -51
  611. data/spec/support/shared/context/config.rb +0 -18
  612. data/spec/support/shared/context/win32.rb +0 -34
  613. data/spec/support/shared/functional/diff_disabled.rb +0 -10
  614. data/spec/support/shared/functional/directory_resource.rb +0 -178
  615. data/spec/support/shared/functional/execute_resource.rb +0 -150
  616. data/spec/support/shared/functional/file_resource.rb +0 -1047
  617. data/spec/support/shared/functional/http.rb +0 -224
  618. data/spec/support/shared/functional/knife.rb +0 -37
  619. data/spec/support/shared/functional/securable_resource.rb +0 -654
  620. data/spec/support/shared/functional/securable_resource_with_reporting.rb +0 -393
  621. data/spec/support/shared/functional/windows_script.rb +0 -260
  622. data/spec/support/shared/integration/integration_helper.rb +0 -122
  623. data/spec/support/shared/integration/knife_support.rb +0 -192
  624. data/spec/support/shared/matchers/exit_with_code.rb +0 -32
  625. data/spec/support/shared/matchers/match_environment_variable.rb +0 -17
  626. data/spec/support/shared/shared_examples.rb +0 -14
  627. data/spec/support/shared/unit/api_error_inspector.rb +0 -190
  628. data/spec/support/shared/unit/api_versioning.rb +0 -77
  629. data/spec/support/shared/unit/application_dot_d.rb +0 -82
  630. data/spec/support/shared/unit/execute_resource.rb +0 -166
  631. data/spec/support/shared/unit/file_system_support.rb +0 -70
  632. data/spec/support/shared/unit/knife_shared.rb +0 -39
  633. data/spec/support/shared/unit/mock_shellout.rb +0 -49
  634. data/spec/support/shared/unit/platform_introspector.rb +0 -189
  635. data/spec/support/shared/unit/provider/file.rb +0 -877
  636. data/spec/support/shared/unit/provider/package/package_shared.rb +0 -95
  637. data/spec/support/shared/unit/provider/useradd_based_user_provider.rb +0 -410
  638. data/spec/support/shared/unit/resource/static_provider_resolution.rb +0 -63
  639. data/spec/support/shared/unit/script_resource.rb +0 -74
  640. data/spec/support/shared/unit/user_and_client_shared.rb +0 -114
  641. data/spec/support/shared/unit/windows_script_resource.rb +0 -65
  642. data/spec/tiny_server.rb +0 -193
  643. data/spec/unit/action_collection_spec.rb +0 -19
  644. data/spec/unit/api_client/registration_spec.rb +0 -278
  645. data/spec/unit/api_client_spec.rb +0 -341
  646. data/spec/unit/api_client_v1_spec.rb +0 -455
  647. data/spec/unit/application/agent_spec.rb +0 -0
  648. data/spec/unit/application/apply_spec.rb +0 -116
  649. data/spec/unit/application/base_spec.rb +0 -40
  650. data/spec/unit/application/client_spec.rb +0 -588
  651. data/spec/unit/application/exit_code_spec.rb +0 -145
  652. data/spec/unit/application/server_spec.rb +0 -0
  653. data/spec/unit/application/solo_spec.rb +0 -218
  654. data/spec/unit/application_spec.rb +0 -587
  655. data/spec/unit/chef_class_spec.rb +0 -240
  656. data/spec/unit/chef_fs/config_spec.rb +0 -235
  657. data/spec/unit/chef_fs/data_handler/data_bag_item_data_handler.rb +0 -82
  658. data/spec/unit/chef_fs/data_handler/data_handler_base_spec.rb +0 -65
  659. data/spec/unit/chef_fs/data_handler/group_handler_spec.rb +0 -63
  660. data/spec/unit/chef_fs/diff_spec.rb +0 -328
  661. data/spec/unit/chef_fs/file_pattern_spec.rb +0 -512
  662. data/spec/unit/chef_fs/file_system/cookbook_subdir_spec.rb +0 -34
  663. data/spec/unit/chef_fs/file_system/operation_failed_error_spec.rb +0 -45
  664. data/spec/unit/chef_fs/file_system/repository/base_file_spec.rb +0 -126
  665. data/spec/unit/chef_fs/file_system/repository/directory_spec.rb +0 -175
  666. data/spec/unit/chef_fs/file_system_spec.rb +0 -150
  667. data/spec/unit/chef_fs/path_util_spec.rb +0 -108
  668. data/spec/unit/chef_spec.rb +0 -25
  669. data/spec/unit/client_spec.rb +0 -881
  670. data/spec/unit/compliance/fetcher/automate_spec.rb +0 -126
  671. data/spec/unit/compliance/fetcher/chef_server_spec.rb +0 -93
  672. data/spec/unit/compliance/input_spec.rb +0 -104
  673. data/spec/unit/compliance/profile_spec.rb +0 -120
  674. data/spec/unit/compliance/reporter/automate_spec.rb +0 -451
  675. data/spec/unit/compliance/reporter/chef_server_automate_spec.rb +0 -197
  676. data/spec/unit/compliance/reporter/compliance_enforcer_spec.rb +0 -49
  677. data/spec/unit/compliance/runner_spec.rb +0 -354
  678. data/spec/unit/compliance/waiver_spec.rb +0 -104
  679. data/spec/unit/config_fetcher_spec.rb +0 -125
  680. data/spec/unit/config_spec.rb +0 -31
  681. data/spec/unit/cookbook/chefignore_spec.rb +0 -69
  682. data/spec/unit/cookbook/cookbook_version_loader_spec.rb +0 -213
  683. data/spec/unit/cookbook/file_vendor_spec.rb +0 -123
  684. data/spec/unit/cookbook/gem_installer_spec.rb +0 -114
  685. data/spec/unit/cookbook/manifest_v0_spec.rb +0 -133
  686. data/spec/unit/cookbook/manifest_v2_spec.rb +0 -70
  687. data/spec/unit/cookbook/metadata_spec.rb +0 -610
  688. data/spec/unit/cookbook/synchronizer_spec.rb +0 -560
  689. data/spec/unit/cookbook/syntax_check_spec.rb +0 -229
  690. data/spec/unit/cookbook_loader_spec.rb +0 -265
  691. data/spec/unit/cookbook_manifest_spec.rb +0 -228
  692. data/spec/unit/cookbook_spec.rb +0 -62
  693. data/spec/unit/cookbook_uploader_spec.rb +0 -205
  694. data/spec/unit/cookbook_version_file_specificity_spec.rb +0 -623
  695. data/spec/unit/cookbook_version_spec.rb +0 -302
  696. data/spec/unit/daemon_spec.rb +0 -179
  697. data/spec/unit/data_bag_item_spec.rb +0 -387
  698. data/spec/unit/data_bag_spec.rb +0 -263
  699. data/spec/unit/data_collector/config_validation_spec.rb +0 -208
  700. data/spec/unit/data_collector_spec.rb +0 -1076
  701. data/spec/unit/decorator/lazy_array_spec.rb +0 -58
  702. data/spec/unit/decorator/lazy_spec.rb +0 -39
  703. data/spec/unit/decorator_spec.rb +0 -142
  704. data/spec/unit/delayed_evaluator_spec.rb +0 -35
  705. data/spec/unit/deprecated_spec.rb +0 -65
  706. data/spec/unit/deprecation_spec.rb +0 -129
  707. data/spec/unit/digester_spec.rb +0 -49
  708. data/spec/unit/dsl/data_query_spec.rb +0 -108
  709. data/spec/unit/dsl/declare_resource_spec.rb +0 -374
  710. data/spec/unit/dsl/platform_introspection_spec.rb +0 -160
  711. data/spec/unit/dsl/reboot_pending_spec.rb +0 -87
  712. data/spec/unit/dsl/recipe_spec.rb +0 -76
  713. data/spec/unit/dsl/registry_helper_spec.rb +0 -52
  714. data/spec/unit/dsl/render_helpers_spec.rb +0 -102
  715. data/spec/unit/dsl/resources_spec.rb +0 -85
  716. data/spec/unit/dsl/secret_spec.rb +0 -175
  717. data/spec/unit/encrypted_data_bag_item/check_encrypted_spec.rb +0 -97
  718. data/spec/unit/encrypted_data_bag_item_spec.rb +0 -439
  719. data/spec/unit/environment_spec.rb +0 -476
  720. data/spec/unit/event_dispatch/dispatcher_spec.rb +0 -172
  721. data/spec/unit/event_dispatch/dsl_spec.rb +0 -83
  722. data/spec/unit/exceptions_spec.rb +0 -132
  723. data/spec/unit/file_access_control_spec.rb +0 -308
  724. data/spec/unit/file_cache_spec.rb +0 -178
  725. data/spec/unit/file_content_management/deploy/cp_spec.rb +0 -44
  726. data/spec/unit/file_content_management/deploy/mv_unix_spec.rb +0 -113
  727. data/spec/unit/file_content_management/deploy/mv_windows_spec.rb +0 -232
  728. data/spec/unit/file_content_management/tempfile_spec.rb +0 -115
  729. data/spec/unit/formatters/base_spec.rb +0 -100
  730. data/spec/unit/formatters/doc_spec.rb +0 -110
  731. data/spec/unit/formatters/error_description_spec.rb +0 -141
  732. data/spec/unit/formatters/error_inspectors/api_error_formatting_spec.rb +0 -76
  733. data/spec/unit/formatters/error_inspectors/compile_error_inspector_spec.rb +0 -265
  734. data/spec/unit/formatters/error_inspectors/cookbook_resolve_error_inspector_spec.rb +0 -126
  735. data/spec/unit/formatters/error_inspectors/cookbook_sync_error_inspector_spec.rb +0 -43
  736. data/spec/unit/formatters/error_inspectors/node_load_error_inspector_spec.rb +0 -26
  737. data/spec/unit/formatters/error_inspectors/registration_error_inspector_spec.rb +0 -26
  738. data/spec/unit/formatters/error_inspectors/resource_failure_inspector_spec.rb +0 -191
  739. data/spec/unit/formatters/error_inspectors/run_list_expansion_error_inspector_spec.rb +0 -91
  740. data/spec/unit/guard_interpreter/resource_guard_interpreter_spec.rb +0 -155
  741. data/spec/unit/guard_interpreter_spec.rb +0 -41
  742. data/spec/unit/handler/json_file_spec.rb +0 -63
  743. data/spec/unit/handler_spec.rb +0 -308
  744. data/spec/unit/http/api_versions_spec.rb +0 -100
  745. data/spec/unit/http/authenticator_spec.rb +0 -247
  746. data/spec/unit/http/basic_client_spec.rb +0 -102
  747. data/spec/unit/http/http_request_spec.rb +0 -97
  748. data/spec/unit/http/json_input_spec.rb +0 -128
  749. data/spec/unit/http/simple_spec.rb +0 -32
  750. data/spec/unit/http/socketless_chef_zero_client_spec.rb +0 -174
  751. data/spec/unit/http/ssl_policies_spec.rb +0 -228
  752. data/spec/unit/http/validate_content_length_spec.rb +0 -207
  753. data/spec/unit/http_spec.rb +0 -235
  754. data/spec/unit/json_compat_spec.rb +0 -73
  755. data/spec/unit/key_spec.rb +0 -631
  756. data/spec/unit/log/syslog_spec.rb +0 -47
  757. data/spec/unit/log/winevt_spec.rb +0 -62
  758. data/spec/unit/lwrp_spec.rb +0 -693
  759. data/spec/unit/mixin/api_version_request_handling_spec.rb +0 -126
  760. data/spec/unit/mixin/checksum_spec.rb +0 -82
  761. data/spec/unit/mixin/convert_to_class_name_spec.rb +0 -54
  762. data/spec/unit/mixin/deep_merge_spec.rb +0 -357
  763. data/spec/unit/mixin/default_paths_spec.rb +0 -92
  764. data/spec/unit/mixin/deprecation_spec.rb +0 -57
  765. data/spec/unit/mixin/enforce_ownership_and_permissions_spec.rb +0 -96
  766. data/spec/unit/mixin/homebrew_spec.rb +0 -118
  767. data/spec/unit/mixin/lazy_module_include.rb +0 -71
  768. data/spec/unit/mixin/openssl_helper_spec.rb +0 -897
  769. data/spec/unit/mixin/params_validate_spec.rb +0 -422
  770. data/spec/unit/mixin/powershell_exec_spec.rb +0 -90
  771. data/spec/unit/mixin/powershell_out_spec.rb +0 -106
  772. data/spec/unit/mixin/powershell_type_coercions_spec.rb +0 -84
  773. data/spec/unit/mixin/properties_spec.rb +0 -107
  774. data/spec/unit/mixin/proxified_socket_spec.rb +0 -97
  775. data/spec/unit/mixin/securable_spec.rb +0 -313
  776. data/spec/unit/mixin/shell_out_spec.rb +0 -308
  777. data/spec/unit/mixin/subclass_directive_spec.rb +0 -45
  778. data/spec/unit/mixin/template_spec.rb +0 -317
  779. data/spec/unit/mixin/unformatter_spec.rb +0 -60
  780. data/spec/unit/mixin/uris_spec.rb +0 -57
  781. data/spec/unit/mixin/user_context_spec.rb +0 -99
  782. data/spec/unit/mixin/versioned_api_spec.rb +0 -128
  783. data/spec/unit/mixin/which.rb +0 -170
  784. data/spec/unit/mixin/why_run_spec.rb +0 -53
  785. data/spec/unit/mixin/windows_architecture_helper_spec.rb +0 -85
  786. data/spec/unit/mixin/xml_escape_spec.rb +0 -54
  787. data/spec/unit/monologger_spec.rb +0 -45
  788. data/spec/unit/node/attribute_spec.rb +0 -1322
  789. data/spec/unit/node/immutable_collections_spec.rb +0 -258
  790. data/spec/unit/node/vivid_mash_spec.rb +0 -500
  791. data/spec/unit/node_map_spec.rb +0 -276
  792. data/spec/unit/node_spec.rb +0 -2038
  793. data/spec/unit/org_group_spec.rb +0 -45
  794. data/spec/unit/org_spec.rb +0 -196
  795. data/spec/unit/platform/query_helpers_spec.rb +0 -48
  796. data/spec/unit/policy_builder/dynamic_spec.rb +0 -256
  797. data/spec/unit/policy_builder/expand_node_object_spec.rb +0 -311
  798. data/spec/unit/policy_builder/policyfile_spec.rb +0 -960
  799. data/spec/unit/policy_builder_spec.rb +0 -26
  800. data/spec/unit/property/state_spec.rb +0 -514
  801. data/spec/unit/property/validation_spec.rb +0 -813
  802. data/spec/unit/property_spec.rb +0 -1329
  803. data/spec/unit/provider/apt_preference_spec.rb +0 -91
  804. data/spec/unit/provider/apt_repository_spec.rb +0 -293
  805. data/spec/unit/provider/apt_update_spec.rb +0 -119
  806. data/spec/unit/provider/batch_spec.rb +0 -130
  807. data/spec/unit/provider/cookbook_file/content_spec.rb +0 -39
  808. data/spec/unit/provider/cookbook_file_spec.rb +0 -59
  809. data/spec/unit/provider/cron/unix_spec.rb +0 -144
  810. data/spec/unit/provider/cron_spec.rb +0 -1252
  811. data/spec/unit/provider/directory_spec.rb +0 -289
  812. data/spec/unit/provider/dsc_resource_spec.rb +0 -313
  813. data/spec/unit/provider/dsc_script_spec.rb +0 -173
  814. data/spec/unit/provider/execute_spec.rb +0 -244
  815. data/spec/unit/provider/file/content_spec.rb +0 -114
  816. data/spec/unit/provider/file_spec.rb +0 -58
  817. data/spec/unit/provider/git_spec.rb +0 -822
  818. data/spec/unit/provider/group/dscl_spec.rb +0 -339
  819. data/spec/unit/provider/group/gpasswd_spec.rb +0 -119
  820. data/spec/unit/provider/group/groupadd_spec.rb +0 -195
  821. data/spec/unit/provider/group/groupmod_spec.rb +0 -136
  822. data/spec/unit/provider/group/pw_spec.rb +0 -141
  823. data/spec/unit/provider/group/solaris_spec.rb +0 -106
  824. data/spec/unit/provider/group/usermod_spec.rb +0 -112
  825. data/spec/unit/provider/group/windows_spec.rb +0 -130
  826. data/spec/unit/provider/group_spec.rb +0 -285
  827. data/spec/unit/provider/http_request_spec.rb +0 -147
  828. data/spec/unit/provider/ifconfig/aix_spec.rb +0 -180
  829. data/spec/unit/provider/ifconfig/debian_spec.rb +0 -332
  830. data/spec/unit/provider/ifconfig/redhat_spec.rb +0 -83
  831. data/spec/unit/provider/ifconfig_spec.rb +0 -247
  832. data/spec/unit/provider/launchd_spec.rb +0 -234
  833. data/spec/unit/provider/link_spec.rb +0 -425
  834. data/spec/unit/provider/log_spec.rb +0 -94
  835. data/spec/unit/provider/mdadm_spec.rb +0 -138
  836. data/spec/unit/provider/mount/aix_spec.rb +0 -277
  837. data/spec/unit/provider/mount/linux_spec.rb +0 -131
  838. data/spec/unit/provider/mount/mount_spec.rb +0 -590
  839. data/spec/unit/provider/mount/solaris_spec.rb +0 -822
  840. data/spec/unit/provider/mount/windows_spec.rb +0 -150
  841. data/spec/unit/provider/mount_spec.rb +0 -222
  842. data/spec/unit/provider/package/apt_spec.rb +0 -703
  843. data/spec/unit/provider/package/bff_spec.rb +0 -188
  844. data/spec/unit/provider/package/cab_spec.rb +0 -272
  845. data/spec/unit/provider/package/chocolatey_spec.rb +0 -574
  846. data/spec/unit/provider/package/deb_spec.rb +0 -135
  847. data/spec/unit/provider/package/dnf/python_helper_spec.rb +0 -36
  848. data/spec/unit/provider/package/dpkg_spec.rb +0 -314
  849. data/spec/unit/provider/package/freebsd/pkgng_spec.rb +0 -147
  850. data/spec/unit/provider/package/freebsd/port_spec.rb +0 -151
  851. data/spec/unit/provider/package/homebrew_spec.rb +0 -402
  852. data/spec/unit/provider/package/ips_spec.rb +0 -233
  853. data/spec/unit/provider/package/macports_spec.rb +0 -203
  854. data/spec/unit/provider/package/msu_spec.rb +0 -283
  855. data/spec/unit/provider/package/openbsd_spec.rb +0 -136
  856. data/spec/unit/provider/package/pacman_spec.rb +0 -109
  857. data/spec/unit/provider/package/paludis_spec.rb +0 -134
  858. data/spec/unit/provider/package/portage_spec.rb +0 -179
  859. data/spec/unit/provider/package/powershell_spec.rb +0 -565
  860. data/spec/unit/provider/package/rpm_spec.rb +0 -440
  861. data/spec/unit/provider/package/rubygems_spec.rb +0 -1187
  862. data/spec/unit/provider/package/smartos_spec.rb +0 -110
  863. data/spec/unit/provider/package/snap_spec.rb +0 -208
  864. data/spec/unit/provider/package/solaris_spec.rb +0 -168
  865. data/spec/unit/provider/package/windows/exe_spec.rb +0 -201
  866. data/spec/unit/provider/package/windows/msi_spec.rb +0 -168
  867. data/spec/unit/provider/package/windows/registry_uninstall_entry_spec.rb +0 -78
  868. data/spec/unit/provider/package/windows_spec.rb +0 -441
  869. data/spec/unit/provider/package/yum/python_helper_spec.rb +0 -30
  870. data/spec/unit/provider/package/yum/yum_cache_spec.rb +0 -109
  871. data/spec/unit/provider/package/zypper_spec.rb +0 -494
  872. data/spec/unit/provider/package_spec.rb +0 -791
  873. data/spec/unit/provider/powershell_script_spec.rb +0 -157
  874. data/spec/unit/provider/registry_key_spec.rb +0 -487
  875. data/spec/unit/provider/remote_directory_spec.rb +0 -236
  876. data/spec/unit/provider/remote_file/cache_control_data_spec.rb +0 -245
  877. data/spec/unit/provider/remote_file/content_spec.rb +0 -253
  878. data/spec/unit/provider/remote_file/fetcher_spec.rb +0 -95
  879. data/spec/unit/provider/remote_file/ftp_spec.rb +0 -217
  880. data/spec/unit/provider/remote_file/http_spec.rb +0 -334
  881. data/spec/unit/provider/remote_file/local_file_spec.rb +0 -105
  882. data/spec/unit/provider/remote_file/network_file_spec.rb +0 -50
  883. data/spec/unit/provider/remote_file/sftp_spec.rb +0 -150
  884. data/spec/unit/provider/remote_file_spec.rb +0 -61
  885. data/spec/unit/provider/route_spec.rb +0 -268
  886. data/spec/unit/provider/ruby_block_spec.rb +0 -45
  887. data/spec/unit/provider/script_spec.rb +0 -67
  888. data/spec/unit/provider/service/aix_service_spec.rb +0 -195
  889. data/spec/unit/provider/service/aixinit_service_spec.rb +0 -272
  890. data/spec/unit/provider/service/arch_service_spec.rb +0 -326
  891. data/spec/unit/provider/service/debian_service_spec.rb +0 -273
  892. data/spec/unit/provider/service/freebsd_service_spec.rb +0 -621
  893. data/spec/unit/provider/service/gentoo_service_spec.rb +0 -145
  894. data/spec/unit/provider/service/init_service_spec.rb +0 -235
  895. data/spec/unit/provider/service/insserv_service_spec.rb +0 -75
  896. data/spec/unit/provider/service/invokercd_service_spec.rb +0 -211
  897. data/spec/unit/provider/service/macosx_spec.rb +0 -337
  898. data/spec/unit/provider/service/openbsd_service_spec.rb +0 -553
  899. data/spec/unit/provider/service/redhat_spec.rb +0 -253
  900. data/spec/unit/provider/service/simple_service_spec.rb +0 -171
  901. data/spec/unit/provider/service/solaris_smf_service_spec.rb +0 -292
  902. data/spec/unit/provider/service/systemd_service_spec.rb +0 -504
  903. data/spec/unit/provider/service/upstart_service_spec.rb +0 -322
  904. data/spec/unit/provider/service/windows_spec.rb +0 -986
  905. data/spec/unit/provider/service_spec.rb +0 -168
  906. data/spec/unit/provider/subversion_spec.rb +0 -364
  907. data/spec/unit/provider/systemd_unit_spec.rb +0 -1039
  908. data/spec/unit/provider/template/content_spec.rb +0 -169
  909. data/spec/unit/provider/template_spec.rb +0 -86
  910. data/spec/unit/provider/user/aix_spec.rb +0 -96
  911. data/spec/unit/provider/user/linux_spec.rb +0 -178
  912. data/spec/unit/provider/user/mac_spec.rb +0 -38
  913. data/spec/unit/provider/user/pw_spec.rb +0 -235
  914. data/spec/unit/provider/user/solaris_spec.rb +0 -177
  915. data/spec/unit/provider/user/windows_spec.rb +0 -198
  916. data/spec/unit/provider/user_spec.rb +0 -520
  917. data/spec/unit/provider/whyrun_safe_ruby_block_spec.rb +0 -46
  918. data/spec/unit/provider/windows_env_spec.rb +0 -385
  919. data/spec/unit/provider/windows_path_spec.rb +0 -60
  920. data/spec/unit/provider/windows_task_spec.rb +0 -436
  921. data/spec/unit/provider/yum_repository_spec.rb +0 -35
  922. data/spec/unit/provider/zypper_repository_spec.rb +0 -169
  923. data/spec/unit/provider_spec.rb +0 -215
  924. data/spec/unit/pure_application_spec.rb +0 -32
  925. data/spec/unit/recipe_spec.rb +0 -652
  926. data/spec/unit/resource/alternatives_spec.rb +0 -120
  927. data/spec/unit/resource/apt_package_spec.rb +0 -66
  928. data/spec/unit/resource/apt_preference_spec.rb +0 -39
  929. data/spec/unit/resource/apt_repository_spec.rb +0 -79
  930. data/spec/unit/resource/apt_update_spec.rb +0 -44
  931. data/spec/unit/resource/archive_file_spec.rb +0 -466
  932. data/spec/unit/resource/bash_spec.rb +0 -45
  933. data/spec/unit/resource/batch_spec.rb +0 -46
  934. data/spec/unit/resource/bff_package_spec.rb +0 -51
  935. data/spec/unit/resource/breakpoint_spec.rb +0 -64
  936. data/spec/unit/resource/build_essential_spec.rb +0 -77
  937. data/spec/unit/resource/cab_package_spec.rb +0 -64
  938. data/spec/unit/resource/chef_client_config_spec.rb +0 -145
  939. data/spec/unit/resource/chef_client_cron_spec.rb +0 -161
  940. data/spec/unit/resource/chef_client_launchd_spec.rb +0 -132
  941. data/spec/unit/resource/chef_client_scheduled_task_spec.rb +0 -186
  942. data/spec/unit/resource/chef_client_systemd_timer_spec.rb +0 -108
  943. data/spec/unit/resource/chef_client_trusted_certificate_spec.rb +0 -68
  944. data/spec/unit/resource/chef_gem_spec.rb +0 -122
  945. data/spec/unit/resource/chef_handler_spec.rb +0 -40
  946. data/spec/unit/resource/chef_sleep_spec.rb +0 -30
  947. data/spec/unit/resource/chef_vault_secret_spec.rb +0 -40
  948. data/spec/unit/resource/chocolatey_config_spec.rb +0 -93
  949. data/spec/unit/resource/chocolatey_feature_spec.rb +0 -89
  950. data/spec/unit/resource/chocolatey_installer_spec.rb +0 -151
  951. data/spec/unit/resource/chocolatey_package_spec.rb +0 -106
  952. data/spec/unit/resource/chocolatey_source_spec.rb +0 -151
  953. data/spec/unit/resource/conditional_action_not_nothing_spec.rb +0 -45
  954. data/spec/unit/resource/conditional_spec.rb +0 -254
  955. data/spec/unit/resource/cookbook_file_spec.rb +0 -93
  956. data/spec/unit/resource/cron_access_spec.rb +0 -36
  957. data/spec/unit/resource/cron_d_spec.rb +0 -84
  958. data/spec/unit/resource/cron_spec.rb +0 -167
  959. data/spec/unit/resource/csh_spec.rb +0 -45
  960. data/spec/unit/resource/directory_spec.rb +0 -69
  961. data/spec/unit/resource/dmg_package_spec.rb +0 -39
  962. data/spec/unit/resource/dnf_package_spec.rb +0 -108
  963. data/spec/unit/resource/dpkg_package_spec.rb +0 -72
  964. data/spec/unit/resource/dsc_resource_spec.rb +0 -102
  965. data/spec/unit/resource/dsc_script_spec.rb +0 -134
  966. data/spec/unit/resource/execute_spec.rb +0 -282
  967. data/spec/unit/resource/file/verification/json_spec.rb +0 -72
  968. data/spec/unit/resource/file/verification/systemd_unit_spec.rb +0 -103
  969. data/spec/unit/resource/file/verification/yaml_spec.rb +0 -67
  970. data/spec/unit/resource/file/verification_spec.rb +0 -147
  971. data/spec/unit/resource/file_spec.rb +0 -127
  972. data/spec/unit/resource/freebsd_package_spec.rb +0 -77
  973. data/spec/unit/resource/gem_package_spec.rb +0 -67
  974. data/spec/unit/resource/group_spec.rb +0 -165
  975. data/spec/unit/resource/helpers/cron_validations_spec.rb +0 -81
  976. data/spec/unit/resource/homebrew_cask_spec.rb +0 -58
  977. data/spec/unit/resource/homebrew_package_spec.rb +0 -68
  978. data/spec/unit/resource/homebrew_tap_spec.rb +0 -44
  979. data/spec/unit/resource/homebrew_update_spec.rb +0 -30
  980. data/spec/unit/resource/hostname_spec.rb +0 -47
  981. data/spec/unit/resource/http_request_spec.rb +0 -65
  982. data/spec/unit/resource/ifconfig_spec.rb +0 -101
  983. data/spec/unit/resource/inspec_input_spec.rb +0 -300
  984. data/spec/unit/resource/inspec_waiver_file_entry_spec.rb +0 -80
  985. data/spec/unit/resource/inspec_waiver_spec.rb +0 -312
  986. data/spec/unit/resource/ips_package_spec.rb +0 -54
  987. data/spec/unit/resource/kernel_module_spec.rb +0 -45
  988. data/spec/unit/resource/ksh_spec.rb +0 -45
  989. data/spec/unit/resource/launchd_spec.rb +0 -48
  990. data/spec/unit/resource/link_spec.rb +0 -120
  991. data/spec/unit/resource/locale_spec.rb +0 -189
  992. data/spec/unit/resource/log_spec.rb +0 -64
  993. data/spec/unit/resource/macos_pkg_spec.rb +0 -38
  994. data/spec/unit/resource/macos_user_defaults_spec.rb +0 -76
  995. data/spec/unit/resource/macosx_service.rb +0 -37
  996. data/spec/unit/resource/macports_package_spec.rb +0 -51
  997. data/spec/unit/resource/mdadm_spec.rb +0 -104
  998. data/spec/unit/resource/mount_spec.rb +0 -201
  999. data/spec/unit/resource/msu_package_spec.rb +0 -67
  1000. data/spec/unit/resource/notify_group_spec.rb +0 -34
  1001. data/spec/unit/resource/ohai_hint_spec.rb +0 -44
  1002. data/spec/unit/resource/ohai_spec.rb +0 -112
  1003. data/spec/unit/resource/openbsd_package_spec.rb +0 -58
  1004. data/spec/unit/resource/openssl_dhparam_spec.rb +0 -61
  1005. data/spec/unit/resource/openssl_ec_private_key_spec.rb +0 -64
  1006. data/spec/unit/resource/openssl_ec_public_key_spec.rb +0 -43
  1007. data/spec/unit/resource/openssl_rsa_private_key_spec.rb +0 -64
  1008. data/spec/unit/resource/openssl_rsa_public_key_spec.rb +0 -43
  1009. data/spec/unit/resource/openssl_x509_certificate_spec.rb +0 -72
  1010. data/spec/unit/resource/openssl_x509_crl_spec.rb +0 -61
  1011. data/spec/unit/resource/openssl_x509_request.rb +0 -68
  1012. data/spec/unit/resource/osx_profile_spec.rb +0 -360
  1013. data/spec/unit/resource/package_spec.rb +0 -98
  1014. data/spec/unit/resource/pacman_package_spec.rb +0 -46
  1015. data/spec/unit/resource/paludis_package_spec.rb +0 -36
  1016. data/spec/unit/resource/perl_spec.rb +0 -44
  1017. data/spec/unit/resource/plist_spec.rb +0 -130
  1018. data/spec/unit/resource/portage_package_spec.rb +0 -46
  1019. data/spec/unit/resource/powershell_package_source_spec.rb +0 -220
  1020. data/spec/unit/resource/powershell_package_spec.rb +0 -98
  1021. data/spec/unit/resource/powershell_script_spec.rb +0 -65
  1022. data/spec/unit/resource/python_spec.rb +0 -40
  1023. data/spec/unit/resource/reboot_spec.rb +0 -47
  1024. data/spec/unit/resource/registry_key_spec.rb +0 -215
  1025. data/spec/unit/resource/remote_directory_spec.rb +0 -118
  1026. data/spec/unit/resource/remote_file_spec.rb +0 -220
  1027. data/spec/unit/resource/resource_notification_spec.rb +0 -169
  1028. data/spec/unit/resource/rest_resource_spec.rb +0 -381
  1029. data/spec/unit/resource/rhsm_errata_level_spec.rb +0 -50
  1030. data/spec/unit/resource/rhsm_errata_spec.rb +0 -39
  1031. data/spec/unit/resource/rhsm_register_spec.rb +0 -308
  1032. data/spec/unit/resource/rhsm_repo_spec.rb +0 -70
  1033. data/spec/unit/resource/rhsm_subscription_spec.rb +0 -145
  1034. data/spec/unit/resource/route_spec.rb +0 -100
  1035. data/spec/unit/resource/rpm_package_spec.rb +0 -62
  1036. data/spec/unit/resource/ruby_block_spec.rb +0 -58
  1037. data/spec/unit/resource/ruby_spec.rb +0 -39
  1038. data/spec/unit/resource/scm/git_spec.rb +0 -110
  1039. data/spec/unit/resource/scm/scm.rb +0 -122
  1040. data/spec/unit/resource/scm/subversion_spec.rb +0 -90
  1041. data/spec/unit/resource/script_spec.rb +0 -57
  1042. data/spec/unit/resource/selinux_boolean_spec.rb +0 -92
  1043. data/spec/unit/resource/selinux_fcontext_spec.rb +0 -65
  1044. data/spec/unit/resource/selinux_install_spec.rb +0 -60
  1045. data/spec/unit/resource/selinux_login_spec.rb +0 -73
  1046. data/spec/unit/resource/selinux_module_spec.rb +0 -55
  1047. data/spec/unit/resource/selinux_permissive_spec.rb +0 -39
  1048. data/spec/unit/resource/selinux_port_spec.rb +0 -42
  1049. data/spec/unit/resource/selinux_state_spec.rb +0 -46
  1050. data/spec/unit/resource/selinux_user_spec.rb +0 -92
  1051. data/spec/unit/resource/service_spec.rb +0 -203
  1052. data/spec/unit/resource/smartos_package_spec.rb +0 -52
  1053. data/spec/unit/resource/snap_package_spec.rb +0 -60
  1054. data/spec/unit/resource/solaris_package_spec.rb +0 -52
  1055. data/spec/unit/resource/ssh_known_hosts_entry_spec.rb +0 -50
  1056. data/spec/unit/resource/sudo_spec.rb +0 -99
  1057. data/spec/unit/resource/swap_file_spec.rb +0 -39
  1058. data/spec/unit/resource/sysctl_spec.rb +0 -76
  1059. data/spec/unit/resource/systemd_unit_spec.rb +0 -130
  1060. data/spec/unit/resource/template_spec.rb +0 -222
  1061. data/spec/unit/resource/timezone_spec.rb +0 -102
  1062. data/spec/unit/resource/user/linux_user_spec.rb +0 -42
  1063. data/spec/unit/resource/user/windows_user_spec.rb +0 -36
  1064. data/spec/unit/resource/user_spec.rb +0 -121
  1065. data/spec/unit/resource/user_ulimit_spec.rb +0 -66
  1066. data/spec/unit/resource/windows_ad_join_spec.rb +0 -55
  1067. data/spec/unit/resource/windows_audit_policy_spec.rb +0 -64
  1068. data/spec/unit/resource/windows_auto_run_spec.rb +0 -50
  1069. data/spec/unit/resource/windows_certificate_spec.rb +0 -95
  1070. data/spec/unit/resource/windows_defender_exclusion_spec.rb +0 -62
  1071. data/spec/unit/resource/windows_defender_spec.rb +0 -71
  1072. data/spec/unit/resource/windows_dfs_folder_spec.rb +0 -39
  1073. data/spec/unit/resource/windows_dfs_namespace_spec.rb +0 -39
  1074. data/spec/unit/resource/windows_dfs_server_spec.rb +0 -34
  1075. data/spec/unit/resource/windows_dns_record_spec.rb +0 -55
  1076. data/spec/unit/resource/windows_dns_zone_spec.rb +0 -51
  1077. data/spec/unit/resource/windows_env_spec.rb +0 -75
  1078. data/spec/unit/resource/windows_feature_dism_spec.rb +0 -57
  1079. data/spec/unit/resource/windows_feature_powershell_spec.rb +0 -83
  1080. data/spec/unit/resource/windows_feature_spec.rb +0 -64
  1081. data/spec/unit/resource/windows_firewall_profile_spec.rb +0 -77
  1082. data/spec/unit/resource/windows_firewall_rule_spec.rb +0 -510
  1083. data/spec/unit/resource/windows_font_spec.rb +0 -43
  1084. data/spec/unit/resource/windows_package_spec.rb +0 -125
  1085. data/spec/unit/resource/windows_pagefile_spec.rb +0 -44
  1086. data/spec/unit/resource/windows_path_spec.rb +0 -40
  1087. data/spec/unit/resource/windows_printer_port_spec.rb +0 -62
  1088. data/spec/unit/resource/windows_printer_spec.rb +0 -52
  1089. data/spec/unit/resource/windows_service_spec.rb +0 -122
  1090. data/spec/unit/resource/windows_share_spec.rb +0 -48
  1091. data/spec/unit/resource/windows_shortcut_spec.rb +0 -38
  1092. data/spec/unit/resource/windows_task_spec.rb +0 -403
  1093. data/spec/unit/resource/windows_uac_spec.rb +0 -50
  1094. data/spec/unit/resource/windows_update_settings_spec.rb +0 -64
  1095. data/spec/unit/resource/windows_user_privilege_spec.rb +0 -55
  1096. data/spec/unit/resource/windows_workgroup_spec.rb +0 -74
  1097. data/spec/unit/resource/yum_package_spec.rb +0 -150
  1098. data/spec/unit/resource/yum_repository_spec.rb +0 -156
  1099. data/spec/unit/resource/zypper_package_spec.rb +0 -51
  1100. data/spec/unit/resource/zypper_repository_spec.rb +0 -115
  1101. data/spec/unit/resource_builder_spec.rb +0 -1
  1102. data/spec/unit/resource_collection/resource_list_spec.rb +0 -137
  1103. data/spec/unit/resource_collection/resource_set_spec.rb +0 -244
  1104. data/spec/unit/resource_collection/stepable_iterator_spec.rb +0 -144
  1105. data/spec/unit/resource_collection_spec.rb +0 -408
  1106. data/spec/unit/resource_definition_spec.rb +0 -117
  1107. data/spec/unit/resource_inspector_spec.rb +0 -101
  1108. data/spec/unit/resource_reporter_spec.rb +0 -860
  1109. data/spec/unit/resource_resolver_spec.rb +0 -52
  1110. data/spec/unit/resource_spec.rb +0 -1484
  1111. data/spec/unit/role_spec.rb +0 -363
  1112. data/spec/unit/run_context/child_run_context_spec.rb +0 -126
  1113. data/spec/unit/run_context/cookbook_compiler_spec.rb +0 -236
  1114. data/spec/unit/run_context_spec.rb +0 -257
  1115. data/spec/unit/run_list/run_list_expansion_spec.rb +0 -147
  1116. data/spec/unit/run_list/run_list_item_spec.rb +0 -117
  1117. data/spec/unit/run_list/versioned_recipe_list_spec.rb +0 -197
  1118. data/spec/unit/run_list_spec.rb +0 -312
  1119. data/spec/unit/run_lock_spec.rb +0 -144
  1120. data/spec/unit/run_status_spec.rb +0 -144
  1121. data/spec/unit/runner_spec.rb +0 -397
  1122. data/spec/unit/scan_access_control_spec.rb +0 -183
  1123. data/spec/unit/search/query_spec.rb +0 -291
  1124. data/spec/unit/secret_fetcher/akeyless_vault_spec.rb +0 -37
  1125. data/spec/unit/secret_fetcher/aws_secrets_manager_spec.rb +0 -70
  1126. data/spec/unit/secret_fetcher/azure_key_vault_spec.rb +0 -149
  1127. data/spec/unit/secret_fetcher/hashi_vault_spec.rb +0 -126
  1128. data/spec/unit/secret_fetcher_spec.rb +0 -82
  1129. data/spec/unit/server_api_spec.rb +0 -151
  1130. data/spec/unit/server_api_versions_spec.rb +0 -66
  1131. data/spec/unit/shell/model_wrapper_spec.rb +0 -96
  1132. data/spec/unit/shell/shell_ext_spec.rb +0 -196
  1133. data/spec/unit/shell/shell_session_spec.rb +0 -218
  1134. data/spec/unit/shell_spec.rb +0 -158
  1135. data/spec/unit/train_transport_spec.rb +0 -85
  1136. data/spec/unit/user_spec.rb +0 -275
  1137. data/spec/unit/user_v1_spec.rb +0 -585
  1138. data/spec/unit/util/backup_spec.rb +0 -141
  1139. data/spec/unit/util/diff_spec.rb +0 -562
  1140. data/spec/unit/util/dsc/configuration_generator_spec.rb +0 -272
  1141. data/spec/unit/util/dsc/lcm_output_parser_spec.rb +0 -248
  1142. data/spec/unit/util/dsc/local_configuration_manager_spec.rb +0 -192
  1143. data/spec/unit/util/dsc/resource_store.rb +0 -78
  1144. data/spec/unit/util/editor_spec.rb +0 -152
  1145. data/spec/unit/util/file_edit_spec.rb +0 -224
  1146. data/spec/unit/util/powershell/ps_credential_spec.rb +0 -51
  1147. data/spec/unit/util/selinux_spec.rb +0 -160
  1148. data/spec/unit/util/threaded_job_queue_spec.rb +0 -60
  1149. data/spec/unit/util/windows/logon_session_spec.rb +0 -285
  1150. data/spec/unit/version/platform_spec.rb +0 -60
  1151. data/spec/unit/version_class_spec.rb +0 -171
  1152. data/spec/unit/version_constraint/platform_spec.rb +0 -45
  1153. data/spec/unit/version_constraint_spec.rb +0 -179
  1154. data/spec/unit/version_string_spec.rb +0 -79
  1155. data/spec/unit/win32/error_spec.rb +0 -77
  1156. data/spec/unit/win32/link_spec.rb +0 -73
  1157. data/spec/unit/win32/registry_spec.rb +0 -394
  1158. data/spec/unit/win32/security_spec.rb +0 -136
  1159. data/tasks/rspec.rb +0 -87
@@ -43,6 +43,11 @@ class Chef
43
43
  a.failure_message Chef::Exceptions::Package, "Package #{new_resource.package_name} not found: #{new_resource.source}"
44
44
  a.whyrun "would assume #{new_resource.source} would be have previously been made available"
45
45
  end
46
+
47
+ requirements.assert(:all_actions) do |a|
48
+ a.assertion { !new_resource.environment }
49
+ a.failure_message Chef::Exceptions::Package, "The environment property is not supported for package resources on this platform"
50
+ end
46
51
  end
47
52
 
48
53
  def load_current_resource
@@ -55,6 +55,11 @@ class Chef
55
55
  a.whyrun "Assuming source file #{new_resource.source} would have been created."
56
56
  end
57
57
  end
58
+
59
+ requirements.assert(:all_actions) do |a|
60
+ a.assertion { !new_resource.environment }
61
+ a.failure_message Chef::Exceptions::Package, "The environment property is not supported for package resources on this platform"
62
+ end
58
63
  end
59
64
 
60
65
  def load_current_resource
@@ -76,13 +76,13 @@ class Chef
76
76
  end
77
77
 
78
78
  def define_resource_requirements
79
+ super
80
+
79
81
  requirements.assert(:install, :upgrade, :remove, :purge) do |a|
80
82
  a.assertion { !new_resource.source || ::File.exist?(new_resource.source) }
81
83
  a.failure_message Chef::Exceptions::Package, "Package #{new_resource.package_name} not found: #{new_resource.source}"
82
84
  a.whyrun "assuming #{new_resource.source} would have previously been created"
83
85
  end
84
-
85
- super
86
86
  end
87
87
 
88
88
  def candidate_version
@@ -277,7 +277,7 @@ class Chef
277
277
  end
278
278
 
279
279
  def yum(*args)
280
- shell_out!(yum_binary, *args)
280
+ shell_out!(yum_binary, *args, env: new_resource.environment)
281
281
  end
282
282
 
283
283
  def safe_version_array
@@ -40,6 +40,11 @@ class Chef
40
40
  a.failure_message Chef::Exceptions::Package, "#{new_resource} source file(s) do not exist: #{missing_sources}"
41
41
  a.whyrun "Assuming they would have been previously created."
42
42
  end
43
+
44
+ requirements.assert(:all_actions) do |a|
45
+ a.assertion { !new_resource.environment }
46
+ a.failure_message Chef::Exceptions::Package, "The environment property is not supported for package resources on this platform"
47
+ end
43
48
  end
44
49
 
45
50
  def load_current_resource
data/lib/chef/pwsh.rb CHANGED
@@ -60,13 +60,10 @@ class Chef
60
60
 
61
61
  def self.dll
62
62
  # This Powershell DLL source lives here: https://github.com/chef/chef-powershell-shim
63
- # Every merge into that repo triggers a Habitat build and promotion. Running
64
- # the rake :update_chef_exec_dll task in this (chef/chef) repo will pull down
65
- # the built packages and copy the binaries to distro/ruby_bin_folder. Bundle install
66
- # ensures that the correct architecture binaries are installed into the path.
63
+ # Every merge into that repo triggers a Habitat build and promotion.
67
64
  # Also note that the version of pwsh is determined by which assemblies the dll was
68
65
  # built with. To update powershell, those dependencies must be bumped.
69
- @dll ||= Dir.glob("#{RbConfig::CONFIG["bindir"]}/**/Chef.PowerShell.Wrapper.Core.dll").last
66
+ @dll ||= Dir.glob("#{RbConfig::CONFIG["bindir"]}/../**/Chef.PowerShell.Wrapper.dll").last
70
67
  end
71
68
  end
72
69
  end
data/lib/chef/recipe.rb CHANGED
@@ -18,6 +18,7 @@
18
18
  #
19
19
 
20
20
  autoload :YAML, "yaml"
21
+ require_relative "json_compat"
21
22
  require_relative "dsl/recipe"
22
23
  require_relative "mixin/from_file"
23
24
  require_relative "mixin/deprecation"
@@ -101,6 +102,25 @@ class Chef
101
102
  from_hash(res)
102
103
  end
103
104
 
105
+ def from_json_file(filename)
106
+ self.source_file = filename
107
+ if File.file?(filename) && File.readable?(filename)
108
+ json_contents = IO.read(filename)
109
+ from_json(json_contents)
110
+ else
111
+ raise IOError, "Cannot open or read file '#{filename}'!"
112
+ end
113
+ end
114
+
115
+ def from_json(string)
116
+ res = JSONCompat.from_json(string)
117
+ unless res.is_a?(Hash) && res.key?("resources")
118
+ raise ArgumentError, "JSON recipe '#{source_file}' must contain a top-level 'resources' hash"
119
+ end
120
+
121
+ from_hash(res)
122
+ end
123
+
104
124
  def from_hash(hash)
105
125
  hash["resources"].each do |rhash|
106
126
  type = rhash.delete("type").to_sym
@@ -94,6 +94,11 @@ class Chef
94
94
  introduced: "18.3",
95
95
  description: "A Boolean flag that indicates whether the package name, which can be a regular expression, must match the entire name of the package (true) or if the regular expression is allowed to match a subset of the name (false).",
96
96
  default: false
97
+
98
+ property :environment, Hash,
99
+ introduced: "18.8",
100
+ description: "A Hash of environment variables in the form of {'ENV_VARIABLE' => 'VALUE'} to be set before running the command.",
101
+ default: {}, desired_state: false
97
102
  end
98
103
  end
99
104
  end
@@ -237,17 +237,28 @@ class Chef
237
237
  valid
238
238
  end
239
239
 
240
- # validate the key against the a gpg keyring to see if that version is expired
240
+ # validate the key against the gpg keyring to see if that version is expired or revoked
241
241
  # @param [String] key
242
+ # @param [String] keyring
242
243
  #
243
- # @return [Boolean] is the key valid or not
244
+ # @return [Boolean] if the key valid or not
244
245
  def keyring_key_is_valid?(keyring, key)
245
- valid = shell_out("gpg", "--no-default-keyring", "--keyring", keyring, "--list-public-keys", key).stdout.each_line.none?(/\[(expired|revoked):/)
246
+ out = shell_out("gpg", "--no-default-keyring", "--keyring", keyring, "--list-public-keys", key)
247
+ valid = out.exitstatus == 0 && out.stdout.each_line.none?(/\[(expired|revoked):/)
246
248
 
247
249
  logger.debug "key #{key} #{valid ? "is valid" : "is not valid"}"
248
250
  valid
249
251
  end
250
252
 
253
+ # validate the key against the gpg keyring to see if the key is present
254
+ # @param [String] key
255
+ # @param [String] keyring
256
+ #
257
+ # @return [Boolean] if the key present
258
+ def keyring_key_is_present?(keyring, key)
259
+ shell_out(*%W{gpg --no-default-keyring --keyring #{keyring} --list-public-keys --with-fingerprint --with-colons #{key}}).exitstatus == 0
260
+ end
261
+
251
262
  # return the specified cookbook name or the cookbook containing the
252
263
  # resource.
253
264
  #
@@ -284,7 +295,7 @@ class Chef
284
295
  # @raise [Chef::Exceptions::FileNotFound] Key isn't remote or found in the current run
285
296
  #
286
297
  # @return [Symbol] :remote_file or :cookbook_file
287
- def key_type(uri)
298
+ def key_resource_type(uri)
288
299
  if uri.start_with?("http")
289
300
  :remote_file
290
301
  elsif has_cookbook_file?(uri)
@@ -298,6 +309,15 @@ class Chef
298
309
  "/etc/apt/keyrings/#{new_resource.repo_name}.gpg"
299
310
  end
300
311
 
312
+ # Get the current APT version, this is important for creating keyring files,
313
+ # on newer APT versions these need to be an _older_ GnuPG format due to "sqv"
314
+ # being used to verify
315
+ #
316
+ # @return [Integer]
317
+ def apt_version
318
+ @apt_version ||= shell_out("apt -v").stdout.strip[/([0-9]\.?){3}/, 0].to_i
319
+ end
320
+
301
321
  # Fetch the key using either cookbook_file or remote_file, validate it,
302
322
  # and install it with apt-key add
303
323
  # @param [String] key the key to install
@@ -307,39 +327,46 @@ class Chef
307
327
  # @return [void]
308
328
  def install_key_from_uri(key)
309
329
  key_name = key.gsub(/[^0-9A-Za-z\-]/, "_")
310
- keyfile_path = ::File.join(Chef::Config[:file_cache_path], key_name)
330
+ keyfile_tmp_path = ::File.join(Chef::Config[:file_cache_path], key_name)
331
+ keyfile_path = keyring_path
332
+ gpg_keyring_prefix = apt_version > 2 ? "gnupg-ring:" : ""
311
333
  tmp_dir = Dir.mktmpdir(".gpg")
312
334
  at_exit { FileUtils.remove_entry(tmp_dir) }
313
335
 
314
336
  if new_resource.signed_by
315
- keyfile_path = keyring_path
316
-
317
337
  directory "/etc/apt/keyrings" do
318
338
  mode "0755"
319
339
  end
320
- end
321
340
 
322
- declare_resource(key_type(key), keyfile_path) do
323
- source key
324
- mode "0644"
325
- sensitive new_resource.sensitive
326
- action :create
327
- verify "gpg --homedir #{tmp_dir} %{path}"
328
- end
341
+ declare_resource(key_resource_type(key), keyfile_tmp_path) do
342
+ source key
343
+ mode "0644"
344
+ sensitive new_resource.sensitive
345
+ action :create
346
+ verify "gpg --homedir #{tmp_dir} %{path}"
347
+ notifies :run, "execute[import #{keyfile_path}]", :immediately
348
+ end
329
349
 
330
- # If signed by is true, then we don't need to
331
- # add to the default keyring. Instead make sure it's dearmored
332
- if new_resource.signed_by
333
- execute "gpg dearmor key" do
334
- input ::File.read(keyfile_path)
335
- command [ "gpg", "--batch", "--yes", "--dearmor", "-o", keyfile_path ]
350
+ execute "import #{keyfile_path}" do
351
+ command [ "gpg", "--import", "--batch", "--yes", "--no-default-keyring", "--keyring", "#{gpg_keyring_prefix}#{keyfile_path}", keyfile_tmp_path ]
336
352
  default_env true
337
353
  sensitive new_resource.sensitive
338
- action :run
339
- only_if { ::File.read(keyfile_path).include?("-----BEGIN PGP PUBLIC KEY BLOCK-----") }
340
- notifies :run, "execute[apt-cache gencaches]", :immediately
354
+ action :nothing
355
+ end
356
+
357
+ file keyfile_path do
358
+ mode "0644"
359
+ notifies :run, "execute[import #{keyfile_path}]", :before unless ::File.exist?(keyfile_path)
341
360
  end
342
361
  else
362
+ declare_resource(key_resource_type(key), keyfile_path) do
363
+ source key
364
+ mode "0644"
365
+ sensitive new_resource.sensitive
366
+ action :create
367
+ verify "gpg --homedir #{tmp_dir} %{path}"
368
+ end
369
+
343
370
  execute "apt-key add #{keyfile_path}" do
344
371
  command [ "apt-key", "add", keyfile_path ]
345
372
  default_env true
@@ -413,8 +440,7 @@ class Chef
413
440
  default_env true
414
441
  sensitive new_resource.sensitive
415
442
  not_if do
416
- present = shell_out(*%W{gpg --no-default-keyring --keyring #{keyring} --list-public-keys --with-fingerprint --with-colons #{key}}).exitstatus != 0
417
- present && keyring_key_is_valid?(keyring, key.upcase)
443
+ keyring_key_is_present?(keyring, key.upcase) && keyring_key_is_valid?(keyring, key.upcase)
418
444
  end
419
445
  notifies :run, "execute[apt-cache gencaches]", :immediately
420
446
  end
@@ -430,7 +456,7 @@ class Chef
430
456
  # @return [void]
431
457
  def install_ppa_key(owner, repo)
432
458
  url = "https://launchpad.net/api/1.0/~#{owner}/+archive/#{repo}"
433
- key_id = Chef::HTTP::Simple.new(url).get("signing_key_fingerprint").delete('"')
459
+ key_id = Chef::HTTP::Simple.new(url, {}).get("signing_key_fingerprint").delete('"')
434
460
  install_key_from_keyserver(key_id, "keyserver.ubuntu.com")
435
461
  rescue Net::HTTPClientException => e
436
462
  raise "Could not access Launchpad ppa API: #{e.message}"
@@ -21,10 +21,57 @@
21
21
  require_relative "../resource"
22
22
  require "fileutils" unless defined?(FileUtils)
23
23
  begin
24
+ # The explicit call to FFI::DynamicLibrary.open was added to address an issue specific to the Habitat packaging of Chef Infra Client on windows.
25
+ # In the Habitat environment, the libarchive library (archive.dll) is installed in a non-standard location that is not included
26
+ # in the default search paths used by the FFI gem to locate dynamic libraries. The default search paths for FFI are:
27
+ # - <system library path>
28
+ # - /usr/lib
29
+ # - /usr/local/lib
30
+ # - /opt/local/lib
31
+ # These paths do not account for the Habitat package structure, where libraries are installed in isolated directories under
32
+ # the Habitat package path (e.g., C:/hab/pkgs/core/libarchive/<version>/bin on Windows).
33
+ #
34
+ # Without explicitly loading archive.dll using FFI::DynamicLibrary.open, the ffi-libarchive gem fails to locate and load the library,
35
+ # resulting in runtime errors when attempting to use the archive_file resource.
36
+ #
37
+ # This code dynamically determines the path to archive.dll using the Habitat CLI (`hab pkg path core/libarchive`) and explicitly
38
+ # loads the library using FFI::DynamicLibrary.open. This ensures that the library is correctly loaded in the Habitat environment.
39
+ #
40
+ # Note: This logic is gated by a check for Habitat-specific environment variables (HAB_CACHE_SRC_PATH or HAB_PKG_PATH) to ensure
41
+ # that it is only applied in Habitat runs. For other environments (e.g., Omnibus, plain gem installations, or git checkouts),
42
+ # the default behavior of FFI is sufficient, as the libraries are installed in standard locations or embedded paths that are
43
+ # included in the default search paths.
44
+ if RUBY_PLATFORM.match?(/mswin|mingw|windows/) && (ENV["HAB_CACHE_SRC_PATH"] || ENV["HAB_PKG_PATH"])
45
+ require "ffi" unless defined?(FFI)
46
+ require "open3" unless defined?(Open3)
47
+ # Dynamically determine the path to the core/libarchive package
48
+ stdout, stderr, status = Open3.capture3("hab pkg path core/libarchive")
49
+ unless status.success?
50
+ Chef::Log.debug("Failed to determine Habitat libarchive path: #{stderr}")
51
+ return
52
+ end
53
+
54
+ habitat_libarchive_path = File.join(stdout.strip.tr("\\", "/"), "bin")
55
+ unless Dir.exist?(habitat_libarchive_path)
56
+ Chef::Log.debug("Habitat libarchive path not found: #{habitat_libarchive_path}")
57
+ return
58
+ end
59
+
60
+ archive_dll_path = File.join(habitat_libarchive_path, "archive.dll")
61
+ unless File.exist?(archive_dll_path)
62
+ Chef::Log.debug("archive.dll not found in Habitat path: #{habitat_libarchive_path}")
63
+ return
64
+ end
65
+
66
+ FFI::DynamicLibrary.open(archive_dll_path, FFI::DynamicLibrary::RTLD_LAZY) # Explicitly load the DLL
67
+ Chef::Log.debug("Explicitly loaded archive.dll from Habitat path: #{archive_dll_path}")
68
+ end
69
+
24
70
  # ffi-libarchive must be eager loaded see: https://github.com/chef/chef/issues/12228
25
71
  require "ffi-libarchive" unless defined?(Archive::Reader)
26
- rescue LoadError
27
- STDERR.puts "ffi-libarchive could not be loaded, libarchive is probably not installed on system, archive_file will not be available"
72
+ rescue LoadError => e
73
+ STDERR.puts "ffi-libarchive could not be loaded: #{e.message}"
74
+ STDERR.puts "libarchive is probably not installed on system, archive_file will not be available"
28
75
  end
29
76
 
30
77
  class Chef
@@ -53,7 +53,7 @@ class Chef
53
53
  allowed_actions :install, :uninstall, :upgrade
54
54
 
55
55
  property :download_url, String,
56
- description: "The URL to download Chocolatey from. This sets the value of $env:ChocolateyDownloadUrl and causes the installer to choose an alternate download location. If this is not set, Chocolatey installs fall back to the official Chocolatey community repository to download Chocolatey from. It can also be used for offline installation by providing a path to a Chocolatey.nupkg."
56
+ description: "The URL to download Chocolatey from. This sets the value of $env:ChocolateyDownloadUrl and causes the installer to choose an alternate download location. If this is not set, Chocolatey installs fall back to the official Chocolatey community repository to download Chocolatey from. It can also be used for offline installation by providing a path to a Chocolatey.nupkg. If the provided URL is a PowerShell script (ending in .ps1), that script will be downloaded and executed directly. If it is any other file type, it will be downloaded to the Chef client directory. ChefConfig::Config.etc_chef_dir(windows: true) is used to find that location."
57
57
 
58
58
  property :chocolatey_version, String,
59
59
  description: "Specifies a target version of Chocolatey to install. By default, the latest stable version is installed. This will use the value in $env:ChocolateyVersion by default, if that environment variable is present. This parameter is ignored if download_url is set."
@@ -128,10 +128,25 @@ class Chef
128
128
  powershell_exec("Set-Item -path env:ChocolateyProxyUser -Value #{new_resource.proxy_user}; Set-Item -path env:ChocolateyProxyPassword -Value #{new_resource.proxy_password}")
129
129
  end
130
130
 
131
- # note that Invoke-Expression is being called on the downloaded script (outer parens),
132
- # not triggering the script download (inner parens)
131
+ # Handle custom download URLs appropriately based on file type
133
132
  converge_if_changed do
134
- powershell_exec("Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))").error!
133
+ if new_resource.download_url
134
+ Chef::Log.info("Using custom download URL for Chocolatey installation: #{new_resource.download_url}")
135
+ # If it's a PowerShell script, execute it directly (original behavior)
136
+ if new_resource.download_url.downcase.end_with?(".ps1")
137
+ powershell_exec("Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('#{new_resource.download_url}'))").error!
138
+ else
139
+ # Assume it's a direct link to a nupkg or other file and handle accordingly
140
+ chef_dir = ChefConfig::Config.etc_chef_dir(windows: true)
141
+
142
+ # Let PowerShell handle the filename - it will use the server's suggested filename
143
+ # from Content-Disposition header, or fall back to the URL path
144
+ powershell_exec("Invoke-WebRequest '#{new_resource.download_url}' -OutFile '#{chef_dir}'").error!
145
+ Chef::Log.info("Downloaded file from #{new_resource.download_url} to #{chef_dir}")
146
+ end
147
+ else
148
+ powershell_exec("Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))").error!
149
+ end
135
150
  end
136
151
  end
137
152
 
@@ -71,6 +71,11 @@ class Chef
71
71
  description: "Allow downgrading a package to satisfy requested version requirements.",
72
72
  default: true,
73
73
  desired_state: false
74
+
75
+ property :environment, Hash,
76
+ introduced: "18.8",
77
+ description: "A Hash of environment variables in the form of {'ENV_VARIABLE' => 'VALUE'} to be set before running the command.",
78
+ default: {}, desired_state: false
74
79
  end
75
80
  end
76
81
  end
@@ -41,6 +41,11 @@ class Chef
41
41
  description: "Allow downgrading a package to satisfy requested version requirements.",
42
42
  default: true,
43
43
  desired_state: false
44
+
45
+ property :environment, Hash,
46
+ introduced: "18.8",
47
+ description: "A Hash of environment variables in the form of {'ENV_VARIABLE' => 'VALUE'} to be set before running the command.",
48
+ default: {}, desired_state: false
44
49
  end
45
50
  end
46
51
  end
@@ -84,6 +84,17 @@ class Chef
84
84
  converge_by("re-run ohai and merge results into node attributes") do
85
85
  ohai = ::Ohai::System.new
86
86
 
87
+ # Load any custom plugins from cookbooks if they exist
88
+ # This ensures that cookbook-provided Ohai plugins are available
89
+ # when the resource reloads Ohai data
90
+ ohai_plugin_path = Chef::Config[:ohai_segment_plugin_path]
91
+ if ohai_plugin_path && Dir.exist?(ohai_plugin_path) && !Dir.empty?(ohai_plugin_path)
92
+ # Configure Ohai to load plugins from the cookbook segment path
93
+ ohai.config[:plugin_path] ||= ::Ohai.config[:plugin_path]
94
+ ohai.config[:plugin_path] << ohai_plugin_path
95
+ logger.trace("Added cookbook plugin path to ohai: #{ohai_plugin_path}")
96
+ end
97
+
87
98
  # If new_resource.plugin is nil, ohai will reload all the plugins
88
99
  # Otherwise it will only reload the specified plugin
89
100
  # Note that any changes to plugins, or new plugins placed on
@@ -60,6 +60,11 @@ class Chef
60
60
  description: "The amount of time (in seconds) to wait before timing out.",
61
61
  desired_state: false
62
62
 
63
+ property :environment, Hash,
64
+ introduced: "18.8",
65
+ description: "A Hash of environment variables in the form of {'ENV_VARIABLE' => 'VALUE'} to be set before running the command.",
66
+ desired_state: false
67
+
63
68
  end
64
69
  end
65
70
  end
@@ -39,6 +39,11 @@ class Chef
39
39
 
40
40
  property :version, String,
41
41
  description: "The version of a package to be installed or upgraded."
42
+
43
+ property :environment, Hash,
44
+ introduced: "18.8",
45
+ description: "A Hash of environment variables in the form of {'ENV_VARIABLE' => 'VALUE'} to be set before running the command.",
46
+ default: {}, desired_state: false
42
47
  end
43
48
  end
44
49
  end
@@ -155,6 +155,11 @@ class Chef
155
155
 
156
156
  property :yum_binary, String,
157
157
  description: "The path to the yum binary."
158
+
159
+ property :environment, Hash,
160
+ introduced: "18.8",
161
+ description: "A Hash of environment variables in the form of {'ENV_VARIABLE' => 'VALUE'} to be set before running the command.",
162
+ default: {}, desired_state: false
158
163
  end
159
164
  end
160
165
  end
@@ -35,7 +35,7 @@ class Chef
35
35
  as_hash["before"] = current_resource ? current_resource.state_for_resource_reporter : {}
36
36
  # if the "before" hash is too large, we need to truncate it to avoid 413 errors
37
37
  # 640K ought be enough for every Windows registry entry
38
- as_hash["before"] = {} if as_hash["before"].to_json.length > 657920
38
+ as_hash["before"] = {} if as_hash["before"].to_s.bytesize > 657920
39
39
  as_hash["duration"] = ( action_record.elapsed_time * 1000 ).to_i.to_s
40
40
  as_hash["delta"] = new_resource.diff if new_resource.respond_to?(:diff)
41
41
  as_hash["delta"] = "" if as_hash["delta"].nil?
data/lib/chef/shell.rb CHANGED
@@ -56,9 +56,14 @@ module Shell
56
56
  # Start the irb REPL with chef-shell's customizations
57
57
  def self.start
58
58
  setup_logger
59
- # FUGLY HACK: irb gives us no other choice.
60
- irb_help = [:help, :irb_help, IRB::ExtendCommandBundle::NO_OVERRIDE]
61
- IRB::ExtendCommandBundle.instance_variable_get(:@ALIASES).delete(irb_help)
59
+
60
+ # @ALIASES was removed from irb in v1.13.0, but chef-shell can still be run in contexts that
61
+ # use the Ruby 3.1.x default of irb v1.4.1
62
+ if IRB::ExtendCommandBundle.instance_variables.include? :@ALIASES
63
+ # FUGLY HACK: irb gives us no other choice.
64
+ irb_help = [:help, :irb_help, IRB::ExtendCommandBundle::NO_OVERRIDE]
65
+ IRB::ExtendCommandBundle.instance_variable_get(:@ALIASES).delete(irb_help)
66
+ end
62
67
 
63
68
  parse_opts
64
69
  Chef::Config[:shell_config] = options.config
@@ -132,11 +137,20 @@ module Shell
132
137
  irb_conf[:IRB_RC] = lambda do |conf|
133
138
  m = conf.main
134
139
 
135
- conf.prompt_c = "#{ChefUtils::Dist::Infra::EXEC}#{leader(m)} > "
136
- conf.return_format = " => %s \n"
140
+ # remove this clause for any Chef version that has upgraded to ruby >= 3.3.0
141
+ if RUBY_VERSION >= "3.3.0"
142
+ conf.prompt_c = "#{ChefUtils::Dist::Infra::EXEC}#{leader(m)} > "
143
+ conf.prompt_n = "#{ChefUtils::Dist::Infra::EXEC}#{leader(m)} ?> "
144
+ conf.prompt_s = "#{ChefUtils::Dist::Infra::EXEC}#{leader(m)}%l> "
145
+ else
146
+ # there's a bug if you use a left arrow and the alternative prompts
147
+ # ... looks like 3.1.0 < version < 3.3.0 have it, from my manual testing
148
+ conf.prompt_c = "#{ChefUtils::Dist::Infra::EXEC}#{leader(m)} (#{Chef::VERSION})> "
149
+ conf.prompt_n = "#{ChefUtils::Dist::Infra::EXEC}#{leader(m)}(#{Chef::VERSION})?> "
150
+ conf.prompt_s = "#{ChefUtils::Dist::Infra::EXEC}#{leader(m)}(#{Chef::VERSION})%l> "
151
+ end
137
152
  conf.prompt_i = "#{ChefUtils::Dist::Infra::EXEC}#{leader(m)} (#{Chef::VERSION})> "
138
- conf.prompt_n = "#{ChefUtils::Dist::Infra::EXEC}#{leader(m)} ?> "
139
- conf.prompt_s = "#{ChefUtils::Dist::Infra::EXEC}#{leader(m)}%l> "
153
+ conf.return_format = " => %s \n"
140
154
  conf.use_tracer = false
141
155
  conf.instance_variable_set(:@use_multiline, false)
142
156
  conf.instance_variable_set(:@use_singleline, false)
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("18.7.10")
26
+ VERSION = Chef::VersionString.new("18.8.46")
27
27
  end
28
28
 
29
29
  #
@@ -49,7 +49,8 @@ class Chef
49
49
  private_class_method :method_name_from_marketing_name
50
50
 
51
51
  WIN_VERSIONS = {
52
- "Windows Server 2022" => { major: 10, minor: 0, callable: lambda { |product_type, suite_mask, build_number| product_type != VER_NT_WORKSTATION && build_number >= 20348 } },
52
+ "Windows Server 2025" => { major: 10, minor: 0, callable: lambda { |product_type, suite_mask, build_number| product_type != VER_NT_WORKSTATION && build_number >= 25398 } },
53
+ "Windows Server 2022" => { major: 10, minor: 0, callable: lambda { |product_type, suite_mask, build_number| product_type != VER_NT_WORKSTATION && build_number >= 20348 && build_number < 25398 } },
53
54
  "Windows Server 2019" => { major: 10, minor: 0, callable: lambda { |product_type, suite_mask, build_number| product_type != VER_NT_WORKSTATION && build_number >= 17763 && build_number < 20348 } },
54
55
  "Windows 11" => { major: 10, minor: 0, callable: lambda { |product_type, suite_mask, build_number| product_type == VER_NT_WORKSTATION && build_number >= 22000 } },
55
56
  "Windows 10" => { major: 10, minor: 0, callable: lambda { |product_type, suite_mask, build_number| product_type == VER_NT_WORKSTATION && build_number >= 19044 && build_number < 22000 } },