chef 15.17.4-universal-mingw32 → 16.0.257-universal-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (571) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +14 -20
  3. data/README.md +6 -6
  4. data/Rakefile +18 -23
  5. data/chef-universal-mingw32.gemspec +4 -4
  6. data/chef.gemspec +10 -26
  7. data/distro/powershell/chef/chef.psm1 +3 -3
  8. data/distro/templates/powershell/chef/chef.psm1.erb +3 -3
  9. data/lib/chef/action_collection.rb +16 -5
  10. data/lib/chef/api_client/registration.rb +2 -2
  11. data/lib/chef/application.rb +33 -54
  12. data/lib/chef/application/apply.rb +20 -3
  13. data/lib/chef/application/base.rb +8 -3
  14. data/lib/chef/application/exit_code.rb +2 -2
  15. data/lib/chef/application/knife.rb +1 -1
  16. data/lib/chef/chef_class.rb +4 -4
  17. data/lib/chef/chef_fs/chef_fs_data_store.rb +3 -3
  18. data/lib/chef/chef_fs/file_system/chef_server/policies_dir.rb +1 -1
  19. data/lib/chef/chef_fs/file_system/chef_server/rest_list_dir.rb +1 -1
  20. data/lib/chef/chef_fs/file_system/chef_server/rest_list_entry.rb +6 -2
  21. data/lib/chef/chef_fs/file_system/multiplexed_dir.rb +1 -1
  22. data/lib/chef/chef_fs/file_system/repository/base_file.rb +0 -1
  23. data/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_dir.rb +2 -2
  24. data/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_entry.rb +1 -1
  25. data/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_root_dir.rb +5 -5
  26. data/lib/chef/chef_fs/file_system/repository/directory.rb +1 -1
  27. data/lib/chef/chef_fs/file_system/repository/file_system_entry.rb +1 -1
  28. data/lib/chef/chef_fs/path_utils.rb +3 -3
  29. data/lib/chef/client.rb +16 -14
  30. data/lib/chef/config.rb +1 -1
  31. data/lib/chef/cookbook/file_system_file_vendor.rb +1 -1
  32. data/lib/chef/cookbook/gem_installer.rb +1 -1
  33. data/lib/chef/cookbook/metadata.rb +45 -22
  34. data/lib/chef/cookbook_version.rb +40 -5
  35. data/lib/chef/data_bag.rb +2 -2
  36. data/lib/chef/data_collector/error_handlers.rb +1 -1
  37. data/lib/chef/data_collector/run_end_message.rb +7 -1
  38. data/lib/chef/deprecated.rb +1 -9
  39. data/lib/chef/dist.rb +8 -0
  40. data/lib/chef/dsl/chef_vault.rb +84 -0
  41. data/lib/chef/dsl/declare_resource.rb +7 -5
  42. data/lib/chef/dsl/platform_introspection.rb +2 -3
  43. data/lib/chef/dsl/recipe.rb +7 -12
  44. data/lib/chef/dsl/universal.rb +3 -7
  45. data/lib/chef/environment.rb +2 -2
  46. data/lib/chef/event_dispatch/base.rb +3 -0
  47. data/lib/chef/exceptions.rb +0 -3
  48. data/lib/chef/formatters/doc.rb +1 -1
  49. data/lib/chef/formatters/error_inspectors/node_load_error_inspector.rb +2 -2
  50. data/lib/chef/formatters/error_inspectors/registration_error_inspector.rb +7 -7
  51. data/lib/chef/formatters/indentable_output_stream.rb +7 -16
  52. data/lib/chef/http.rb +1 -2
  53. data/lib/chef/http/http_request.rb +3 -2
  54. data/lib/chef/knife.rb +1 -3
  55. data/lib/chef/knife/acl_add.rb +57 -0
  56. data/lib/chef/knife/acl_base.rb +183 -0
  57. data/lib/chef/knife/acl_bulk_add.rb +78 -0
  58. data/lib/chef/knife/acl_bulk_remove.rb +83 -0
  59. data/lib/chef/knife/acl_remove.rb +62 -0
  60. data/lib/chef/knife/acl_show.rb +56 -0
  61. data/lib/chef/knife/bootstrap.rb +93 -97
  62. data/lib/chef/knife/bootstrap/chef_vault_handler.rb +1 -1
  63. data/lib/chef/knife/bootstrap/client_builder.rb +1 -1
  64. data/lib/chef/knife/bootstrap/templates/chef-full.erb +20 -20
  65. data/lib/chef/knife/bootstrap/templates/windows-chef-client-msi.erb +13 -15
  66. data/lib/chef/knife/bootstrap/train_connector.rb +0 -1
  67. data/lib/chef/knife/cookbook_download.rb +1 -1
  68. data/lib/chef/knife/cookbook_metadata.rb +1 -1
  69. data/lib/chef/knife/core/bootstrap_context.rb +63 -60
  70. data/lib/chef/knife/core/gem_glob_loader.rb +1 -1
  71. data/lib/chef/knife/core/generic_presenter.rb +4 -3
  72. data/lib/chef/knife/core/hashed_command_loader.rb +2 -3
  73. data/lib/chef/knife/core/node_presenter.rb +2 -2
  74. data/lib/chef/knife/core/status_presenter.rb +5 -5
  75. data/lib/chef/knife/core/subcommand_loader.rb +1 -1
  76. data/lib/chef/knife/core/ui.rb +17 -1
  77. data/lib/chef/knife/core/windows_bootstrap_context.rb +45 -58
  78. data/lib/chef/knife/data_bag_secret_options.rb +18 -45
  79. data/lib/chef/knife/environment_compare.rb +1 -1
  80. data/lib/chef/knife/exec.rb +2 -2
  81. data/lib/chef/knife/group_add.rb +55 -0
  82. data/lib/chef/knife/{cookbook_site_download.rb → group_create.rb} +21 -12
  83. data/lib/chef/knife/group_destroy.rb +53 -0
  84. data/lib/chef/knife/{cookbook_site_list.rb → group_list.rb} +14 -11
  85. data/lib/chef/knife/group_remove.rb +56 -0
  86. data/lib/chef/knife/{cookbook_site_install.rb → group_show.rb} +21 -12
  87. data/lib/chef/knife/list.rb +1 -1
  88. data/lib/chef/knife/ssh.rb +12 -50
  89. data/lib/chef/knife/status.rb +3 -3
  90. data/lib/chef/knife/supermarket_download.rb +1 -2
  91. data/lib/chef/knife/supermarket_install.rb +1 -2
  92. data/lib/chef/knife/supermarket_list.rb +1 -2
  93. data/lib/chef/knife/supermarket_search.rb +1 -2
  94. data/lib/chef/knife/supermarket_share.rb +1 -2
  95. data/lib/chef/knife/supermarket_show.rb +1 -2
  96. data/lib/chef/knife/supermarket_unshare.rb +1 -2
  97. data/lib/chef/knife/{cookbook_site_show.rb → user_dissociate.rb} +15 -13
  98. data/lib/chef/knife/{cookbook_site_search.rb → user_invite_add.rb} +16 -13
  99. data/lib/chef/knife/user_invite_list.rb +34 -0
  100. data/lib/chef/knife/user_invite_recind.rb +63 -0
  101. data/lib/chef/knife/yaml_convert.rb +91 -0
  102. data/lib/chef/log.rb +1 -1
  103. data/lib/chef/mixin/create_path.rb +8 -8
  104. data/lib/chef/mixin/openssl_helper.rb +3 -26
  105. data/lib/chef/mixin/powershell_exec.rb +10 -1
  106. data/lib/chef/mixin/powershell_out.rb +1 -1
  107. data/lib/chef/mixin/properties.rb +13 -1
  108. data/lib/chef/mixin/shell_out.rb +0 -4
  109. data/lib/chef/mixin/template.rb +0 -1
  110. data/lib/chef/monkey_patches/net_http.rb +0 -4
  111. data/lib/chef/node.rb +18 -6
  112. data/lib/chef/node/mixin/deep_merge_cache.rb +7 -7
  113. data/lib/chef/node/mixin/immutablize_array.rb +4 -0
  114. data/lib/chef/node/mixin/immutablize_hash.rb +3 -0
  115. data/lib/chef/node_map.rb +7 -36
  116. data/lib/chef/platform/priority_map.rb +4 -4
  117. data/lib/chef/platform/query_helpers.rb +6 -34
  118. data/lib/chef/powershell.rb +14 -0
  119. data/lib/chef/property.rb +22 -4
  120. data/lib/chef/provider.rb +40 -6
  121. data/lib/chef/provider/cron.rb +2 -2
  122. data/lib/chef/provider/directory.rb +2 -2
  123. data/lib/chef/provider/dsc_resource.rb +1 -1
  124. data/lib/chef/provider/dsc_script.rb +1 -1
  125. data/lib/chef/provider/execute.rb +2 -8
  126. data/lib/chef/provider/file.rb +5 -5
  127. data/lib/chef/provider/git.rb +84 -27
  128. data/lib/chef/provider/group.rb +4 -4
  129. data/lib/chef/provider/http_request.rb +6 -6
  130. data/lib/chef/provider/ifconfig.rb +4 -4
  131. data/lib/chef/provider/launchd.rb +36 -51
  132. data/lib/chef/provider/link.rb +2 -2
  133. data/lib/chef/provider/mount.rb +5 -5
  134. data/lib/chef/provider/mount/solaris.rb +1 -0
  135. data/lib/chef/provider/osx_profile.rb +7 -3
  136. data/lib/chef/provider/package.rb +2 -2
  137. data/lib/chef/provider/package/cab.rb +3 -4
  138. data/lib/chef/provider/package/chocolatey.rb +1 -3
  139. data/lib/chef/provider/package/dnf.rb +66 -10
  140. data/lib/chef/provider/package/dnf/dnf_helper.py +84 -30
  141. data/lib/chef/provider/package/dnf/python_helper.rb +79 -36
  142. data/lib/chef/provider/package/dnf/version.rb +5 -1
  143. data/lib/chef/provider/package/freebsd/pkgng.rb +1 -3
  144. data/lib/chef/provider/package/homebrew.rb +106 -42
  145. data/lib/chef/provider/package/msu.rb +3 -1
  146. data/lib/chef/provider/package/pacman.rb +25 -34
  147. data/lib/chef/provider/package/powershell.rb +2 -6
  148. data/lib/chef/provider/package/rubygems.rb +29 -2
  149. data/lib/chef/provider/package/snap.rb +27 -96
  150. data/lib/chef/provider/package/windows.rb +3 -2
  151. data/lib/chef/provider/package/windows/msi.rb +2 -2
  152. data/lib/chef/provider/package/yum.rb +0 -8
  153. data/lib/chef/provider/package/yum/yum_helper.py +0 -4
  154. data/lib/chef/provider/package/zypper.rb +1 -1
  155. data/lib/chef/provider/powershell_script.rb +4 -10
  156. data/lib/chef/provider/registry_key.rb +4 -4
  157. data/lib/chef/provider/remote_directory.rb +3 -3
  158. data/lib/chef/provider/remote_file/ftp.rb +3 -2
  159. data/lib/chef/provider/remote_file/local_file.rb +2 -1
  160. data/lib/chef/provider/remote_file/sftp.rb +3 -2
  161. data/lib/chef/provider/route.rb +5 -3
  162. data/lib/chef/provider/ruby_block.rb +1 -1
  163. data/lib/chef/provider/script.rb +2 -2
  164. data/lib/chef/provider/service.rb +8 -8
  165. data/lib/chef/provider/service/aixinit.rb +1 -1
  166. data/lib/chef/provider/service/arch.rb +2 -2
  167. data/lib/chef/provider/service/debian.rb +31 -29
  168. data/lib/chef/provider/service/gentoo.rb +2 -2
  169. data/lib/chef/provider/service/macosx.rb +7 -12
  170. data/lib/chef/provider/service/openbsd.rb +1 -1
  171. data/lib/chef/provider/service/redhat.rb +2 -2
  172. data/lib/chef/provider/service/simple.rb +3 -3
  173. data/lib/chef/provider/service/systemd.rb +12 -12
  174. data/lib/chef/provider/service/upstart.rb +1 -1
  175. data/lib/chef/provider/service/windows.rb +5 -11
  176. data/lib/chef/provider/subversion.rb +25 -5
  177. data/lib/chef/provider/systemd_unit.rb +26 -25
  178. data/lib/chef/provider/user.rb +6 -6
  179. data/lib/chef/provider/user/dscl.rb +3 -3
  180. data/lib/chef/provider/user/mac.rb +10 -9
  181. data/lib/chef/provider/whyrun_safe_ruby_block.rb +1 -1
  182. data/lib/chef/provider/windows_env.rb +3 -3
  183. data/lib/chef/provider/windows_script.rb +2 -2
  184. data/lib/chef/provider/windows_task.rb +7 -9
  185. data/lib/chef/provider/yum_repository.rb +1 -1
  186. data/lib/chef/provider/zypper_repository.rb +11 -31
  187. data/lib/chef/providers.rb +0 -6
  188. data/lib/chef/recipe.rb +36 -0
  189. data/lib/chef/resource.rb +41 -56
  190. data/lib/chef/resource/action_class.rb +24 -22
  191. data/lib/chef/resource/alternatives.rb +149 -0
  192. data/lib/chef/resource/apt_package.rb +2 -1
  193. data/lib/chef/resource/apt_preference.rb +69 -2
  194. data/lib/chef/resource/apt_repository.rb +337 -5
  195. data/lib/chef/resource/apt_update.rb +52 -1
  196. data/lib/chef/resource/archive_file.rb +9 -29
  197. data/lib/chef/resource/bash.rb +2 -0
  198. data/lib/chef/resource/bff_package.rb +9 -1
  199. data/lib/chef/resource/breakpoint.rb +0 -1
  200. data/lib/chef/resource/build_essential.rb +42 -48
  201. data/lib/chef/resource/cab_package.rb +8 -1
  202. data/lib/chef/resource/chef_client_cron.rb +225 -0
  203. data/lib/chef/resource/chef_client_scheduled_task.rb +198 -0
  204. data/lib/chef/resource/chef_client_systemd_timer.rb +177 -0
  205. data/lib/chef/resource/chef_gem.rb +9 -16
  206. data/lib/chef/resource/chef_handler.rb +2 -1
  207. data/lib/chef/resource/chef_sleep.rb +0 -1
  208. data/lib/chef/resource/chef_vault_secret.rb +135 -0
  209. data/lib/chef/resource/chocolatey_config.rb +3 -1
  210. data/lib/chef/resource/chocolatey_feature.rb +2 -1
  211. data/lib/chef/resource/chocolatey_package.rb +2 -1
  212. data/lib/chef/resource/chocolatey_source.rb +2 -1
  213. data/lib/chef/resource/cookbook_file.rb +1 -1
  214. data/lib/chef/resource/cron.rb +22 -68
  215. data/lib/chef/resource/cron_access.rb +8 -15
  216. data/lib/chef/resource/cron_d.rb +9 -75
  217. data/lib/chef/resource/csh.rb +2 -0
  218. data/lib/chef/resource/directory.rb +2 -2
  219. data/lib/chef/resource/dmg_package.rb +4 -4
  220. data/lib/chef/resource/dnf_package.rb +2 -3
  221. data/lib/chef/resource/dpkg_package.rb +2 -1
  222. data/lib/chef/resource/dsc_resource.rb +6 -4
  223. data/lib/chef/resource/dsc_script.rb +3 -2
  224. data/lib/chef/resource/execute.rb +13 -12
  225. data/lib/chef/resource/file.rb +3 -1
  226. data/lib/chef/resource/freebsd_package.rb +2 -1
  227. data/lib/chef/resource/gem_package.rb +14 -6
  228. data/lib/chef/resource/group.rb +4 -1
  229. data/lib/chef/resource/helpers/cron_validations.rb +98 -0
  230. data/lib/chef/resource/homebrew_cask.rb +5 -4
  231. data/lib/chef/resource/homebrew_package.rb +4 -2
  232. data/lib/chef/resource/homebrew_tap.rb +2 -1
  233. data/lib/chef/resource/hostname.rb +41 -36
  234. data/lib/chef/resource/http_request.rb +0 -1
  235. data/lib/chef/resource/ifconfig.rb +1 -1
  236. data/lib/chef/resource/ips_package.rb +10 -2
  237. data/lib/chef/resource/kernel_module.rb +29 -29
  238. data/lib/chef/resource/ksh.rb +2 -0
  239. data/lib/chef/resource/launchd.rb +6 -6
  240. data/lib/chef/resource/link.rb +1 -23
  241. data/lib/chef/resource/locale.rb +58 -24
  242. data/lib/chef/resource/log.rb +12 -1
  243. data/lib/chef/resource/lwrp_base.rb +1 -8
  244. data/lib/chef/resource/macos_userdefaults.rb +9 -6
  245. data/lib/chef/resource/macosx_service.rb +2 -1
  246. data/lib/chef/resource/macports_package.rb +10 -2
  247. data/lib/chef/resource/mdadm.rb +62 -2
  248. data/lib/chef/resource/mount.rb +3 -0
  249. data/lib/chef/resource/msu_package.rb +13 -1
  250. data/lib/chef/resource/notify_group.rb +8 -3
  251. data/lib/chef/resource/ohai.rb +19 -3
  252. data/lib/chef/resource/ohai_hint.rb +3 -12
  253. data/lib/chef/resource/openbsd_package.rb +9 -1
  254. data/lib/chef/resource/openssl_dhparam.rb +10 -1
  255. data/lib/chef/resource/openssl_ec_private_key.rb +23 -1
  256. data/lib/chef/resource/openssl_ec_public_key.rb +21 -1
  257. data/lib/chef/resource/openssl_rsa_private_key.rb +20 -1
  258. data/lib/chef/resource/openssl_rsa_public_key.rb +22 -1
  259. data/lib/chef/resource/openssl_x509_certificate.rb +37 -1
  260. data/lib/chef/resource/openssl_x509_crl.rb +12 -1
  261. data/lib/chef/resource/openssl_x509_request.rb +37 -1
  262. data/lib/chef/resource/osx_profile.rb +3 -2
  263. data/lib/chef/resource/package.rb +2 -1
  264. data/lib/chef/resource/pacman_package.rb +2 -1
  265. data/lib/chef/resource/paludis_package.rb +12 -3
  266. data/lib/chef/resource/perl.rb +2 -0
  267. data/lib/chef/resource/plist.rb +207 -0
  268. data/lib/chef/resource/portage_package.rb +13 -3
  269. data/lib/chef/resource/powershell_package.rb +1 -3
  270. data/lib/chef/resource/powershell_package_source.rb +3 -1
  271. data/lib/chef/resource/powershell_script.rb +7 -17
  272. data/lib/chef/resource/python.rb +2 -0
  273. data/lib/chef/resource/reboot.rb +0 -1
  274. data/lib/chef/resource/registry_key.rb +1 -2
  275. data/lib/chef/resource/remote_directory.rb +2 -0
  276. data/lib/chef/resource/remote_file.rb +2 -0
  277. data/lib/chef/resource/rhsm_errata.rb +0 -1
  278. data/lib/chef/resource/rhsm_errata_level.rb +0 -1
  279. data/lib/chef/resource/rhsm_register.rb +2 -1
  280. data/lib/chef/resource/rhsm_repo.rb +3 -1
  281. data/lib/chef/resource/rhsm_subscription.rb +4 -1
  282. data/lib/chef/resource/route.rb +5 -1
  283. data/lib/chef/resource/rpm_package.rb +9 -2
  284. data/lib/chef/resource/ruby.rb +2 -0
  285. data/lib/chef/resource/ruby_block.rb +1 -1
  286. data/lib/chef/resource/scm/_scm.rb +48 -0
  287. data/lib/chef/resource/{scm.rb → scm/git.rb} +16 -30
  288. data/lib/chef/resource/{subversion.rb → scm/subversion.rb} +8 -5
  289. data/lib/chef/resource/script.rb +6 -3
  290. data/lib/chef/resource/service.rb +6 -7
  291. data/lib/chef/resource/smartos_package.rb +9 -1
  292. data/lib/chef/resource/snap_package.rb +3 -1
  293. data/lib/chef/resource/solaris_package.rb +9 -1
  294. data/lib/chef/resource/ssh_known_hosts_entry.rb +6 -3
  295. data/lib/chef/resource/sudo.rb +9 -9
  296. data/lib/chef/resource/support/cron.d.erb +1 -1
  297. data/lib/chef/resource/support/cron_access.erb +1 -1
  298. data/lib/chef/resource/support/sudoer.erb +1 -2
  299. data/lib/chef/resource/support/ulimit.erb +41 -0
  300. data/lib/chef/resource/swap_file.rb +5 -3
  301. data/lib/chef/resource/sysctl.rb +2 -2
  302. data/lib/chef/resource/systemd_unit.rb +4 -2
  303. data/lib/chef/resource/template.rb +0 -1
  304. data/lib/chef/resource/timezone.rb +7 -18
  305. data/lib/chef/resource/user.rb +1 -3
  306. data/lib/chef/resource/user/aix_user.rb +0 -2
  307. data/lib/chef/resource/user/dscl_user.rb +1 -1
  308. data/lib/chef/resource/user/linux_user.rb +0 -2
  309. data/lib/chef/resource/user/mac_user.rb +1 -1
  310. data/lib/chef/resource/user/pw_user.rb +0 -2
  311. data/lib/chef/resource/user/solaris_user.rb +0 -2
  312. data/lib/chef/resource/user/windows_user.rb +0 -2
  313. data/lib/chef/resource/user_ulimit.rb +114 -0
  314. data/lib/chef/resource/whyrun_safe_ruby_block.rb +1 -0
  315. data/lib/chef/resource/windows_ad_join.rb +19 -6
  316. data/lib/chef/resource/windows_auto_run.rb +0 -1
  317. data/lib/chef/resource/windows_certificate.rb +1 -1
  318. data/lib/chef/resource/windows_dfs_folder.rb +0 -1
  319. data/lib/chef/resource/windows_dfs_namespace.rb +0 -1
  320. data/lib/chef/resource/windows_dfs_server.rb +0 -1
  321. data/lib/chef/resource/windows_dns_record.rb +0 -1
  322. data/lib/chef/resource/windows_dns_zone.rb +0 -1
  323. data/lib/chef/resource/windows_env.rb +2 -3
  324. data/lib/chef/resource/windows_feature.rb +2 -2
  325. data/lib/chef/resource/windows_feature_dism.rb +9 -22
  326. data/lib/chef/resource/windows_feature_powershell.rb +17 -82
  327. data/lib/chef/resource/windows_firewall_rule.rb +119 -10
  328. data/lib/chef/resource/windows_font.rb +1 -3
  329. data/lib/chef/resource/windows_package.rb +13 -4
  330. data/lib/chef/resource/windows_pagefile.rb +0 -1
  331. data/lib/chef/resource/windows_path.rb +0 -1
  332. data/lib/chef/resource/windows_printer.rb +0 -1
  333. data/lib/chef/resource/windows_printer_port.rb +0 -1
  334. data/lib/chef/resource/windows_script.rb +3 -4
  335. data/lib/chef/resource/windows_security_policy.rb +90 -0
  336. data/lib/chef/resource/windows_service.rb +45 -31
  337. data/lib/chef/resource/windows_share.rb +3 -7
  338. data/lib/chef/resource/windows_shortcut.rb +0 -1
  339. data/lib/chef/resource/windows_task.rb +14 -15
  340. data/lib/chef/resource/windows_uac.rb +0 -1
  341. data/lib/chef/resource/windows_user_privilege.rb +157 -0
  342. data/lib/chef/resource/windows_workgroup.rb +0 -1
  343. data/lib/chef/resource/yum_package.rb +3 -1
  344. data/lib/chef/resource/yum_repository.rb +2 -1
  345. data/lib/chef/resource/zypper_package.rb +3 -2
  346. data/lib/chef/resource/zypper_repository.rb +2 -1
  347. data/lib/chef/resource_builder.rb +8 -0
  348. data/lib/chef/resource_inspector.rb +6 -6
  349. data/lib/chef/resource_resolver.rb +7 -14
  350. data/lib/chef/resources.rb +11 -3
  351. data/lib/chef/role.rb +2 -2
  352. data/lib/chef/run_context/cookbook_compiler.rb +29 -5
  353. data/lib/chef/shell.rb +23 -32
  354. data/lib/chef/shell/shell_session.rb +0 -2
  355. data/lib/chef/util/diff.rb +1 -1
  356. data/lib/chef/util/dsc/configuration_generator.rb +1 -1
  357. data/lib/chef/util/dsc/lcm_output_parser.rb +3 -3
  358. data/lib/chef/util/powershell/cmdlet.rb +1 -1
  359. data/lib/chef/version.rb +2 -2
  360. data/lib/chef/version_string.rb +1 -1
  361. data/lib/chef/win32/api/file.rb +18 -18
  362. data/lib/chef/win32/api/security.rb +6 -0
  363. data/lib/chef/win32/file.rb +3 -11
  364. data/lib/chef/win32/process.rb +2 -2
  365. data/lib/chef/win32/security.rb +40 -2
  366. data/spec/functional/assets/inittest +8 -7
  367. data/spec/functional/knife/ssh_spec.rb +27 -23
  368. data/spec/functional/resource/aix_service_spec.rb +1 -0
  369. data/spec/functional/resource/aixinit_service_spec.rb +8 -7
  370. data/spec/functional/resource/apt_package_spec.rb +1 -0
  371. data/spec/functional/resource/bff_spec.rb +2 -2
  372. data/spec/functional/resource/cookbook_file_spec.rb +1 -1
  373. data/spec/functional/resource/cron_spec.rb +11 -29
  374. data/spec/functional/resource/dnf_package_spec.rb +441 -156
  375. data/spec/functional/resource/dsc_resource_spec.rb +1 -1
  376. data/spec/functional/resource/git_spec.rb +184 -134
  377. data/spec/functional/resource/insserv_spec.rb +6 -5
  378. data/spec/functional/resource/link_spec.rb +17 -17
  379. data/spec/functional/resource/locale_spec.rb +13 -2
  380. data/spec/functional/resource/powershell_script_spec.rb +7 -68
  381. data/spec/functional/resource/rpm_spec.rb +2 -2
  382. data/spec/functional/resource/user/dscl_spec.rb +2 -2
  383. data/spec/functional/resource/user/mac_user_spec.rb +2 -2
  384. data/spec/functional/resource/windows_certificate_spec.rb +3 -3
  385. data/spec/functional/resource/windows_security_policy_spec.rb +90 -0
  386. data/spec/functional/resource/windows_task_spec.rb +8 -8
  387. data/spec/functional/resource/windows_user_privilege_spec.rb +193 -0
  388. data/spec/functional/run_lock_spec.rb +1 -2
  389. data/spec/functional/shell_spec.rb +6 -6
  390. data/spec/functional/util/powershell/cmdlet_spec.rb +1 -1
  391. data/spec/functional/version_spec.rb +1 -1
  392. data/spec/functional/win32/registry_spec.rb +0 -6
  393. data/spec/functional/win32/security_spec.rb +22 -0
  394. data/spec/functional/win32/service_manager_spec.rb +1 -1
  395. data/spec/integration/client/client_spec.rb +123 -2
  396. data/spec/integration/knife/cookbook_show_spec.rb +28 -26
  397. data/spec/integration/knife/data_bag_show_spec.rb +1 -1
  398. data/spec/integration/knife/raw_spec.rb +30 -2
  399. data/spec/integration/knife/show_spec.rb +32 -3
  400. data/spec/integration/recipes/accumulator_spec.rb +1 -1
  401. data/spec/integration/recipes/lwrp_inline_resources_spec.rb +5 -5
  402. data/spec/integration/recipes/lwrp_spec.rb +1 -1
  403. data/spec/integration/recipes/noop_resource_spec.rb +1 -1
  404. data/spec/integration/recipes/notifies_spec.rb +50 -21
  405. data/spec/integration/recipes/notifying_block_spec.rb +9 -6
  406. data/spec/integration/recipes/provider_choice.rb +2 -0
  407. data/spec/integration/recipes/recipe_dsl_spec.rb +46 -144
  408. data/spec/integration/recipes/resource_action_spec.rb +16 -11
  409. data/spec/integration/recipes/resource_converge_if_changed_spec.rb +1 -3
  410. data/spec/integration/recipes/resource_load_spec.rb +133 -13
  411. data/spec/integration/recipes/unified_mode_spec.rb +1 -1
  412. data/spec/integration/recipes/use_partial_spec.rb +112 -0
  413. data/spec/integration/solo/solo_spec.rb +3 -3
  414. data/spec/scripts/ssl-serve.rb +1 -1
  415. data/spec/spec_helper.rb +11 -14
  416. data/spec/support/chef_helpers.rb +2 -2
  417. data/spec/support/lib/chef/resource/zen_follower.rb +2 -0
  418. data/spec/support/platform_helpers.rb +44 -19
  419. data/spec/support/platforms/win32/spec_service.rb +1 -1
  420. data/spec/support/recipe_dsl_helper.rb +83 -0
  421. data/spec/support/shared/functional/directory_resource.rb +1 -1
  422. data/spec/support/shared/functional/execute_resource.rb +1 -1
  423. data/spec/support/shared/functional/file_resource.rb +3 -3
  424. data/spec/support/shared/functional/win32_service.rb +1 -1
  425. data/spec/support/shared/functional/windows_script.rb +5 -18
  426. data/spec/support/shared/integration/knife_support.rb +14 -8
  427. data/spec/unit/application/apply_spec.rb +3 -0
  428. data/spec/unit/application/client_spec.rb +5 -1
  429. data/spec/unit/application_spec.rb +1 -9
  430. data/spec/unit/chef_fs/file_system/operation_failed_error_spec.rb +4 -2
  431. data/spec/unit/client_spec.rb +7 -5
  432. data/spec/unit/cookbook/gem_installer_spec.rb +3 -4
  433. data/spec/unit/cookbook/metadata_spec.rb +38 -19
  434. data/spec/unit/data_bag_spec.rb +1 -1
  435. data/spec/unit/data_collector_spec.rb +38 -17
  436. data/spec/unit/dsl/platform_introspection_spec.rb +0 -1
  437. data/spec/unit/environment_spec.rb +7 -7
  438. data/spec/unit/event_dispatch/dispatcher_spec.rb +0 -3
  439. data/spec/unit/file_access_control_spec.rb +1 -1
  440. data/spec/unit/knife/bootstrap/chef_vault_handler_spec.rb +15 -15
  441. data/spec/unit/knife/bootstrap/client_builder_spec.rb +9 -9
  442. data/spec/unit/knife/bootstrap_spec.rb +36 -54
  443. data/spec/unit/knife/cookbook_download_spec.rb +4 -4
  444. data/spec/unit/knife/cookbook_metadata_from_file_spec.rb +1 -1
  445. data/spec/unit/knife/cookbook_show_spec.rb +1 -0
  446. data/spec/unit/knife/cookbook_upload_spec.rb +6 -5
  447. data/spec/unit/knife/core/bootstrap_context_spec.rb +23 -43
  448. data/spec/unit/knife/core/hashed_command_loader_spec.rb +3 -3
  449. data/spec/unit/knife/core/ui_spec.rb +16 -0
  450. data/spec/unit/knife/core/windows_bootstrap_context_spec.rb +8 -68
  451. data/spec/unit/knife/data_bag_secret_options_spec.rb +22 -14
  452. data/spec/unit/knife/role_env_run_list_add_spec.rb +6 -6
  453. data/spec/unit/knife/role_env_run_list_clear_spec.rb +4 -4
  454. data/spec/unit/knife/role_env_run_list_remove_spec.rb +4 -4
  455. data/spec/unit/knife/role_env_run_list_replace_spec.rb +4 -4
  456. data/spec/unit/knife/role_env_run_list_set_spec.rb +4 -4
  457. data/spec/unit/knife/role_run_list_add_spec.rb +6 -6
  458. data/spec/unit/knife/role_run_list_clear_spec.rb +4 -4
  459. data/spec/unit/knife/role_run_list_remove_spec.rb +4 -4
  460. data/spec/unit/knife/role_run_list_replace_spec.rb +4 -4
  461. data/spec/unit/knife/role_run_list_set_spec.rb +4 -4
  462. data/spec/unit/knife/ssh_spec.rb +10 -113
  463. data/spec/unit/knife/status_spec.rb +1 -1
  464. data/spec/unit/knife/supermarket_share_spec.rb +3 -5
  465. data/spec/unit/knife_spec.rb +18 -0
  466. data/spec/unit/lwrp_spec.rb +4 -4
  467. data/spec/unit/mixin/powershell_exec_spec.rb +10 -0
  468. data/spec/unit/mixin/securable_spec.rb +1 -0
  469. data/spec/unit/mixin/user_context_spec.rb +9 -1
  470. data/spec/unit/node/attribute_spec.rb +2 -2
  471. data/spec/unit/node_spec.rb +24 -0
  472. data/spec/unit/platform/query_helpers_spec.rb +0 -143
  473. data/spec/unit/property/state_spec.rb +12 -7
  474. data/spec/unit/property/validation_spec.rb +25 -1
  475. data/spec/unit/property_spec.rb +18 -15
  476. data/spec/unit/provider/apt_preference_spec.rb +14 -10
  477. data/spec/unit/provider/apt_repository_spec.rb +9 -11
  478. data/spec/unit/provider/apt_update_spec.rb +12 -11
  479. data/spec/unit/provider/cookbook_file_spec.rb +4 -4
  480. data/spec/unit/provider/cron_spec.rb +2 -2
  481. data/spec/unit/provider/directory_spec.rb +4 -15
  482. data/spec/unit/provider/file_spec.rb +4 -4
  483. data/spec/unit/provider/git_spec.rb +44 -4
  484. data/spec/unit/provider/link_spec.rb +0 -1
  485. data/spec/unit/provider/log_spec.rb +3 -3
  486. data/spec/unit/provider/mdadm_spec.rb +3 -3
  487. data/spec/unit/provider/osx_profile_spec.rb +2 -2
  488. data/spec/unit/provider/package/dnf/python_helper_spec.rb +2 -2
  489. data/spec/unit/provider/package/freebsd/pkgng_spec.rb +1 -1
  490. data/spec/unit/provider/package/homebrew_spec.rb +280 -174
  491. data/spec/unit/provider/package/msu_spec.rb +3 -3
  492. data/spec/unit/provider/package/pacman_spec.rb +65 -147
  493. data/spec/unit/provider/package/powershell_spec.rb +88 -96
  494. data/spec/unit/provider/package/rubygems_spec.rb +221 -31
  495. data/spec/unit/provider/package/snap_spec.rb +1 -1
  496. data/spec/unit/provider/package/windows/exe_spec.rb +1 -1
  497. data/spec/unit/provider/package/windows_spec.rb +53 -30
  498. data/spec/unit/provider/powershell_script_spec.rb +21 -61
  499. data/spec/unit/provider/remote_file_spec.rb +3 -4
  500. data/spec/unit/provider/service/arch_service_spec.rb +2 -3
  501. data/spec/unit/provider/service/debian_service_spec.rb +35 -14
  502. data/spec/unit/provider/service/gentoo_service_spec.rb +8 -8
  503. data/spec/unit/provider/service/macosx_spec.rb +210 -214
  504. data/spec/unit/provider/service/redhat_spec.rb +2 -2
  505. data/spec/unit/provider/service/systemd_service_spec.rb +23 -23
  506. data/spec/unit/provider/service/upstart_service_spec.rb +3 -3
  507. data/spec/unit/provider/service/windows_spec.rb +6 -2
  508. data/spec/unit/provider/subversion_spec.rb +4 -2
  509. data/spec/unit/provider/systemd_unit_spec.rb +24 -28
  510. data/spec/unit/provider/template_spec.rb +3 -4
  511. data/spec/unit/provider/zypper_repository_spec.rb +25 -75
  512. data/spec/unit/provider_resolver_spec.rb +11 -11
  513. data/spec/unit/provider_spec.rb +0 -1
  514. data/spec/unit/recipe_spec.rb +68 -0
  515. data/spec/unit/resource/alternatives_spec.rb +120 -0
  516. data/spec/unit/resource/apt_preference_spec.rb +0 -18
  517. data/spec/unit/resource/apt_repository_spec.rb +0 -18
  518. data/spec/unit/resource/apt_update_spec.rb +0 -18
  519. data/spec/unit/resource/archive_file_spec.rb +2 -11
  520. data/spec/unit/resource/chef_client_cron_spec.rb +119 -0
  521. data/spec/unit/resource/chef_client_scheduled_task_spec.rb +102 -0
  522. data/spec/unit/resource/chef_client_systemd_timer_spec.rb +70 -0
  523. data/spec/unit/resource/chef_vault_secret_spec.rb +40 -0
  524. data/spec/unit/resource/chocolatey_source_spec.rb +2 -1
  525. data/spec/unit/resource/cron_d_spec.rb +6 -48
  526. data/spec/unit/resource/cron_spec.rb +4 -10
  527. data/spec/unit/resource/gem_package_spec.rb +3 -3
  528. data/spec/unit/resource/helpers/cron_validations_spec.rb +77 -0
  529. data/spec/unit/resource/link_spec.rb +0 -4
  530. data/spec/unit/resource/locale_spec.rb +0 -34
  531. data/spec/unit/resource/ohai_spec.rb +56 -2
  532. data/spec/unit/resource/plist_spec.rb +130 -0
  533. data/spec/unit/resource/powershell_script_spec.rb +0 -5
  534. data/spec/unit/resource/{git_spec.rb → scm/git_spec.rb} +50 -2
  535. data/spec/unit/resource/{scm_spec.rb → scm/scm.rb} +1 -52
  536. data/spec/unit/resource/{subversion_spec.rb → scm/subversion_spec.rb} +2 -3
  537. data/spec/unit/resource/service_spec.rb +4 -0
  538. data/spec/unit/resource/user_spec.rb +2 -2
  539. data/spec/unit/resource/user_ulimit_spec.rb +53 -0
  540. data/spec/unit/resource/windows_dns_record_spec.rb +3 -3
  541. data/spec/unit/resource/windows_dns_zone_spec.rb +2 -2
  542. data/spec/unit/resource/windows_feature_dism_spec.rb +2 -17
  543. data/spec/unit/resource/windows_feature_powershell_spec.rb +6 -47
  544. data/spec/unit/resource/windows_firewall_rule_spec.rb +88 -41
  545. data/spec/unit/resource/windows_package_spec.rb +4 -1
  546. data/spec/unit/resource/windows_service_spec.rb +9 -0
  547. data/spec/unit/resource/windows_task_spec.rb +1 -1
  548. data/spec/unit/resource/windows_uac_spec.rb +2 -2
  549. data/spec/unit/resource/yum_repository_spec.rb +21 -21
  550. data/spec/unit/resource_reporter_spec.rb +1 -5
  551. data/spec/unit/resource_spec.rb +11 -4
  552. data/spec/unit/role_spec.rb +11 -11
  553. data/spec/unit/run_context/cookbook_compiler_spec.rb +1 -1
  554. data/spec/unit/run_context_spec.rb +1 -1
  555. data/spec/unit/search/query_spec.rb +1 -1
  556. data/spec/unit/util/threaded_job_queue_spec.rb +0 -9
  557. data/spec/unit/win32/security_spec.rb +3 -4
  558. data/tasks/rspec.rb +1 -1
  559. metadata +116 -87
  560. data/lib/chef/dsl/core.rb +0 -52
  561. data/lib/chef/knife/cookbook_site_share.rb +0 -41
  562. data/lib/chef/knife/cookbook_site_unshare.rb +0 -41
  563. data/lib/chef/provider/apt_preference.rb +0 -93
  564. data/lib/chef/provider/apt_repository.rb +0 -358
  565. data/lib/chef/provider/apt_update.rb +0 -79
  566. data/lib/chef/provider/log.rb +0 -43
  567. data/lib/chef/provider/mdadm.rb +0 -85
  568. data/lib/chef/provider/ohai.rb +0 -45
  569. data/lib/chef/resource/git.rb +0 -37
  570. data/spec/functional/resource/windows_font_spec.rb +0 -49
  571. data/spec/unit/provider/ohai_spec.rb +0 -84
@@ -58,7 +58,6 @@ describe Chef::Resource::WindowsPackage, "initialize" do
58
58
  expect { resource.installer_type :msi }.not_to raise_error
59
59
  expect { resource.installer_type :nsis }.not_to raise_error
60
60
  expect { resource.installer_type :wise }.not_to raise_error
61
- expect { resource.installer_type :something_else_entirely }.to raise_error(Chef::Exceptions::ValidationFailed)
62
61
  expect { resource.installer_type "msi" }.to raise_error(Chef::Exceptions::ValidationFailed)
63
62
  end
64
63
 
@@ -90,6 +89,10 @@ describe Chef::Resource::WindowsPackage, "initialize" do
90
89
  expect(resource.source).to eql "c:\\frost.msi"
91
90
  end
92
91
 
92
+ it "defaults returns to [0, 3010]" do
93
+ expect(resource.returns).to eq([0, 3010])
94
+ end
95
+
93
96
  it "defaults source to the resource name" do
94
97
  # it's a little late to stub out File.absolute_path
95
98
  expect(resource.source).to include("solitaire.msi")
@@ -48,6 +48,15 @@ describe Chef::Resource::WindowsService, "initialize" do
48
48
  expect { resource.action :unmask }.not_to raise_error
49
49
  end
50
50
 
51
+ it "accepts an Integer for timeout property" do
52
+ resource.timeout 1
53
+ expect(resource.timeout).to eql(1)
54
+ end
55
+
56
+ it "defaults the timeout property to 60 (seconds)" do
57
+ expect(resource.timeout).to eql(60)
58
+ end
59
+
51
60
  %i{automatic manual disabled}.each do |type|
52
61
  it "supports setting startup_type property to #{type.inspect}" do
53
62
  resource.startup_type type
@@ -144,7 +144,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
144
144
  resource.frequency :once
145
145
  resource.random_delay "20"
146
146
  resource.start_time "15:00"
147
- expect { resource.after_created }.to_not raise_error
147
+ expect { resource.after_created }.to_not raise_error(ArgumentError, "`random_delay` property is supported only for frequency :once, :minute, :hourly, :daily, :weekly and :monthly")
148
148
  end
149
149
 
150
150
  it "raises error for invalid random_delay" do
@@ -26,7 +26,7 @@ describe Chef::Resource::WindowsUac do
26
26
 
27
27
  %i{no_prompt secure_prompt_for_creds secure_prompt_for_consent prompt_for_creds prompt_for_consent prompt_for_consent_non_windows_binaries}.each do |val|
28
28
  it "the consent_behavior_admins property accepts :#{val}" do
29
- expect { resource.consent_behavior_admins val }.not_to raise_error
29
+ expect { resource.consent_behavior_admins val }.not_to raise_error(ArgumentError)
30
30
  end
31
31
  end
32
32
 
@@ -36,7 +36,7 @@ describe Chef::Resource::WindowsUac do
36
36
 
37
37
  %i{auto_deny secure_prompt_for_creds prompt_for_creds}.each do |val|
38
38
  it "the consent_behavior_users property accepts :#{val}" do
39
- expect { resource.consent_behavior_users val }.not_to raise_error
39
+ expect { resource.consent_behavior_users val }.not_to raise_error(ArgumentError)
40
40
  end
41
41
  end
42
42
 
@@ -73,52 +73,52 @@ describe Chef::Resource::YumRepository do
73
73
  end
74
74
 
75
75
  it "the timeout property expects numeric Strings" do
76
- expect { resource.timeout "123" }.not_to raise_error
76
+ expect { resource.timeout "123" }.not_to raise_error(ArgumentError)
77
77
  expect { resource.timeout "123foo" }.to raise_error(ArgumentError)
78
78
  end
79
79
 
80
80
  it "the priority property expects numeric Strings from '1' to '99'" do
81
- expect { resource.priority "99" }.not_to raise_error
82
- expect { resource.priority "1" }.not_to raise_error
81
+ expect { resource.priority "99" }.not_to raise_error(ArgumentError)
82
+ expect { resource.priority "1" }.not_to raise_error(ArgumentError)
83
83
  expect { resource.priority "100" }.to raise_error(ArgumentError)
84
84
  expect { resource.priority "0" }.to raise_error(ArgumentError)
85
85
  end
86
86
 
87
87
  it "the failovermethod property accepts 'priority' or 'roundrobin'" do
88
- expect { resource.failovermethod "priority" }.not_to raise_error
89
- expect { resource.failovermethod "roundrobin" }.not_to raise_error
88
+ expect { resource.failovermethod "priority" }.not_to raise_error(ArgumentError)
89
+ expect { resource.failovermethod "roundrobin" }.not_to raise_error(ArgumentError)
90
90
  expect { resource.failovermethod "bob" }.to raise_error(ArgumentError)
91
91
  end
92
92
 
93
93
  it "the http_caching property accepts 'packages', 'all', or 'none'" do
94
- expect { resource.http_caching "packages" }.not_to raise_error
95
- expect { resource.http_caching "all" }.not_to raise_error
96
- expect { resource.http_caching "none" }.not_to raise_error
94
+ expect { resource.http_caching "packages" }.not_to raise_error(ArgumentError)
95
+ expect { resource.http_caching "all" }.not_to raise_error(ArgumentError)
96
+ expect { resource.http_caching "none" }.not_to raise_error(ArgumentError)
97
97
  expect { resource.http_caching "bob" }.to raise_error(ArgumentError)
98
98
  end
99
99
 
100
100
  it "the metadata_expire property accepts a time value or 'never'" do
101
- expect { resource.metadata_expire "100" }.not_to raise_error
102
- expect { resource.metadata_expire "100d" }.not_to raise_error
103
- expect { resource.metadata_expire "100h" }.not_to raise_error
104
- expect { resource.metadata_expire "100m" }.not_to raise_error
105
- expect { resource.metadata_expire "never" }.not_to raise_error
101
+ expect { resource.metadata_expire "100" }.not_to raise_error(ArgumentError)
102
+ expect { resource.metadata_expire "100d" }.not_to raise_error(ArgumentError)
103
+ expect { resource.metadata_expire "100h" }.not_to raise_error(ArgumentError)
104
+ expect { resource.metadata_expire "100m" }.not_to raise_error(ArgumentError)
105
+ expect { resource.metadata_expire "never" }.not_to raise_error(ArgumentError)
106
106
  expect { resource.metadata_expire "100s" }.to raise_error(ArgumentError)
107
107
  end
108
108
 
109
109
  it "the mirror_expire property accepts a time value" do
110
- expect { resource.mirror_expire "100" }.not_to raise_error
111
- expect { resource.mirror_expire "100d" }.not_to raise_error
112
- expect { resource.mirror_expire "100h" }.not_to raise_error
113
- expect { resource.mirror_expire "100m" }.not_to raise_error
110
+ expect { resource.mirror_expire "100" }.not_to raise_error(ArgumentError)
111
+ expect { resource.mirror_expire "100d" }.not_to raise_error(ArgumentError)
112
+ expect { resource.mirror_expire "100h" }.not_to raise_error(ArgumentError)
113
+ expect { resource.mirror_expire "100m" }.not_to raise_error(ArgumentError)
114
114
  expect { resource.mirror_expire "never" }.to raise_error(ArgumentError)
115
115
  end
116
116
 
117
117
  it "the mirrorlist_expire property accepts a time value" do
118
- expect { resource.mirrorlist_expire "100" }.not_to raise_error
119
- expect { resource.mirrorlist_expire "100d" }.not_to raise_error
120
- expect { resource.mirrorlist_expire "100h" }.not_to raise_error
121
- expect { resource.mirrorlist_expire "100m" }.not_to raise_error
118
+ expect { resource.mirrorlist_expire "100" }.not_to raise_error(ArgumentError)
119
+ expect { resource.mirrorlist_expire "100d" }.not_to raise_error(ArgumentError)
120
+ expect { resource.mirrorlist_expire "100h" }.not_to raise_error(ArgumentError)
121
+ expect { resource.mirrorlist_expire "100m" }.not_to raise_error(ArgumentError)
122
122
  expect { resource.mirrorlist_expire "never" }.to raise_error(ArgumentError)
123
123
  end
124
124
 
@@ -294,7 +294,7 @@ describe Chef::ResourceReporter do
294
294
  resource_reporter.run_started(run_status)
295
295
  end
296
296
 
297
- context "when the new_resource is sensitive" do
297
+ context "when the new_resource is a sensitive execute resource" do
298
298
  before do
299
299
  @execute_resource = Chef::Resource::Execute.new("sensitive-resource")
300
300
  @execute_resource.name("sensitive-resource")
@@ -312,10 +312,6 @@ describe Chef::ResourceReporter do
312
312
  it "resource_name in prepared_run_data should be the same" do
313
313
  expect(@first_update_report["name"]).to eq("sensitive-resource")
314
314
  end
315
-
316
- it "resource_command in prepared_run_data should be blank" do
317
- expect(@first_update_report["after"]).to eq({ command: "sensitive-resource" })
318
- end
319
315
  end
320
316
 
321
317
  context "when the new_resource does not have a string for name and identity" do
@@ -378,7 +378,7 @@ describe Chef::Resource do
378
378
  it "does not propagate validation errors" do
379
379
  resource_class = Class.new(Chef::Resource) { property :foo, String, required: true }
380
380
  resource = resource_class.new("required_property_tests")
381
- expect { resource.to_text }.to_not raise_error
381
+ expect { resource.to_text }.to_not raise_error Chef::Exceptions::ValidationFailed
382
382
  end
383
383
  end
384
384
  end
@@ -910,13 +910,20 @@ describe Chef::Resource do
910
910
  klz.provides :energy, platform: %w{autobots decepticons}
911
911
  end
912
912
 
913
- it "adds mappings for all platforms" do
913
+ it "adds mappings for all platforms", ruby: "< 2.7" do
914
914
  expect(Chef.resource_handler_map).to receive(:set).with(
915
915
  :tape_deck, Chef::Resource::Klz, {}
916
916
  )
917
917
  klz.provides :tape_deck
918
918
  end
919
919
 
920
+ it "adds mappings for all platforms", ruby: ">= 2.7" do
921
+ expect(Chef.resource_handler_map).to receive(:set).with(
922
+ :tape_deck, Chef::Resource::Klz
923
+ )
924
+ klz.provides :tape_deck
925
+ end
926
+
920
927
  end
921
928
 
922
929
  describe "resource_for_node" do
@@ -1188,8 +1195,8 @@ describe Chef::Resource do
1188
1195
  end
1189
1196
 
1190
1197
  it "does not affect provides by default" do
1191
- expect(Chef.resource_handler_map).to receive(:set).with(:test_resource, klass, { canonical: true })
1192
- klass.resource_name(:test_resource)
1198
+ expect(Chef.resource_handler_map).to receive(:set).with(:test_resource, klass, any_args)
1199
+ klass.provides(:test_resource)
1193
1200
  end
1194
1201
  end
1195
1202
 
@@ -259,7 +259,7 @@ describe Chef::Role do
259
259
  it "should return a Chef::Role object from JSON" do
260
260
  expect(Dir).to receive(:glob).and_return(["#{Chef::Config[:role_path]}/memes", "#{Chef::Config[:role_path]}/memes/lolcat.json"])
261
261
  file_path = File.join(Chef::Config[:role_path], "memes/lolcat.json")
262
- expect(File).to receive(:exist?).with(file_path).exactly(1).times.and_return(true)
262
+ expect(File).to receive(:exists?).with(file_path).exactly(1).times.and_return(true)
263
263
  expect(IO).to receive(:read).with(file_path).and_return('{"name": "ceiling_cat", "json_class": "Chef::Role" }')
264
264
  expect(@role).to be_a_kind_of(Chef::Role)
265
265
  @role.class.from_disk("lolcat")
@@ -268,7 +268,7 @@ describe Chef::Role do
268
268
  it "should return a Chef::Role object from a Ruby DSL" do
269
269
  expect(Dir).to receive(:glob).and_return(["#{Chef::Config[:role_path]}/memes", "#{Chef::Config[:role_path]}/memes/lolcat.rb"])
270
270
  rb_path = File.join(Chef::Config[:role_path], "memes/lolcat.rb")
271
- expect(File).to receive(:exist?).with(rb_path).exactly(1).times.and_return(true)
271
+ expect(File).to receive(:exists?).with(rb_path).exactly(1).times.and_return(true)
272
272
  expect(File).to receive(:readable?).with(rb_path).exactly(1).times.and_return(true)
273
273
  expect(File).to receive(:file?).with(rb_path).exactly(1).times.and_return(true)
274
274
  expect(IO).to receive(:read).with(rb_path).and_return(ROLE_DSL)
@@ -280,8 +280,8 @@ describe Chef::Role do
280
280
  expect(Dir).to receive(:glob).and_return(["#{Chef::Config[:role_path]}/memes", "#{Chef::Config[:role_path]}/memes/lolcat.json", "#{Chef::Config[:role_path]}/memes/lolcat.rb"])
281
281
  js_path = File.join(Chef::Config[:role_path], "memes/lolcat.json")
282
282
  rb_path = File.join(Chef::Config[:role_path], "memes/lolcat.rb")
283
- expect(File).to receive(:exist?).with(js_path).exactly(1).times.and_return(true)
284
- expect(File).not_to receive(:exist?).with(rb_path)
283
+ expect(File).to receive(:exists?).with(js_path).exactly(1).times.and_return(true)
284
+ expect(File).not_to receive(:exists?).with(rb_path)
285
285
  expect(IO).to receive(:read).with(js_path).and_return('{"name": "ceiling_cat", "json_class": "Chef::Role" }')
286
286
  expect(@role).to be_a_kind_of(Chef::Role)
287
287
  @role.class.from_disk("lolcat")
@@ -289,19 +289,19 @@ describe Chef::Role do
289
289
 
290
290
  it "should raise an exception if the file does not exist" do
291
291
  expect(Dir).to receive(:glob).and_return(["#{Chef::Config[:role_path]}/meme.rb"])
292
- expect(File).not_to receive(:exist?)
292
+ expect(File).not_to receive(:exists?)
293
293
  expect { @role.class.from_disk("lolcat") }.to raise_error(Chef::Exceptions::RoleNotFound)
294
294
  end
295
295
 
296
296
  it "should raise an exception if two files exist with the same name" do
297
297
  expect(Dir).to receive(:glob).and_return(["#{Chef::Config[:role_path]}/memes/lolcat.rb", "#{Chef::Config[:role_path]}/lolcat.rb"])
298
- expect(File).not_to receive(:exist?)
298
+ expect(File).not_to receive(:exists?)
299
299
  expect { @role.class.from_disk("lolcat") }.to raise_error(Chef::Exceptions::DuplicateRole)
300
300
  end
301
301
 
302
302
  it "should not raise an exception if two files exist with a similar name" do
303
303
  expect(Dir).to receive(:glob).and_return(["#{Chef::Config[:role_path]}/memes/lolcat.rb", "#{Chef::Config[:role_path]}/super_lolcat.rb"])
304
- expect(File).to receive(:exist?).with("#{Chef::Config[:role_path]}/memes/lolcat.rb").and_return(true)
304
+ expect(File).to receive(:exists?).with("#{Chef::Config[:role_path]}/memes/lolcat.rb").and_return(true)
305
305
  allow_any_instance_of(Chef::Role).to receive(:from_file).with("#{Chef::Config[:role_path]}/memes/lolcat.rb")
306
306
  expect { @role.class.from_disk("lolcat") }.not_to raise_error
307
307
  end
@@ -315,7 +315,7 @@ describe Chef::Role do
315
315
 
316
316
  it "should return a Chef::Role object from JSON" do
317
317
  expect(Dir).to receive(:glob).with(File.join("/path1", "**", "**")).exactly(1).times.and_return(["/path1/lolcat.json"])
318
- expect(File).to receive(:exist?).with("/path1/lolcat.json").exactly(1).times.and_return(true)
318
+ expect(File).to receive(:exists?).with("/path1/lolcat.json").exactly(1).times.and_return(true)
319
319
  expect(IO).to receive(:read).with("/path1/lolcat.json").and_return('{"name": "ceiling_cat", "json_class": "Chef::Role" }')
320
320
  expect(@role).to be_a_kind_of(Chef::Role)
321
321
  @role.class.from_disk("lolcat")
@@ -324,7 +324,7 @@ describe Chef::Role do
324
324
  it "should return a Chef::Role object from JSON when role is in the second path" do
325
325
  expect(Dir).to receive(:glob).with(File.join("/path1", "**", "**")).exactly(1).times.and_return([])
326
326
  expect(Dir).to receive(:glob).with(File.join("/path/path2", "**", "**")).exactly(1).times.and_return(["/path/path2/lolcat.json"])
327
- expect(File).to receive(:exist?).with("/path/path2/lolcat.json").exactly(1).times.and_return(true)
327
+ expect(File).to receive(:exists?).with("/path/path2/lolcat.json").exactly(1).times.and_return(true)
328
328
  expect(IO).to receive(:read).with("/path/path2/lolcat.json").and_return('{"name": "ceiling_cat", "json_class": "Chef::Role" }')
329
329
  expect(@role).to be_a_kind_of(Chef::Role)
330
330
  @role.class.from_disk("lolcat")
@@ -332,7 +332,7 @@ describe Chef::Role do
332
332
 
333
333
  it "should return a Chef::Role object from a Ruby DSL" do
334
334
  expect(Dir).to receive(:glob).with(File.join("/path1", "**", "**")).exactly(1).times.and_return(["/path1/lolcat.rb"])
335
- expect(File).to receive(:exist?).with("/path1/lolcat.rb").exactly(1).times.and_return(true)
335
+ expect(File).to receive(:exists?).with("/path1/lolcat.rb").exactly(1).times.and_return(true)
336
336
  expect(File).to receive(:readable?).with("/path1/lolcat.rb").and_return(true)
337
337
  expect(File).to receive(:file?).with("/path1/lolcat.rb").and_return(true)
338
338
  expect(IO).to receive(:read).with("/path1/lolcat.rb").exactly(1).times.and_return(ROLE_DSL)
@@ -343,7 +343,7 @@ describe Chef::Role do
343
343
  it "should return a Chef::Role object from a Ruby DSL when role is in the second path" do
344
344
  expect(Dir).to receive(:glob).with(File.join("/path1", "**", "**")).exactly(1).times.and_return([])
345
345
  expect(Dir).to receive(:glob).with(File.join("/path/path2", "**", "**")).exactly(1).times.and_return(["/path/path2/lolcat.rb"])
346
- expect(File).to receive(:exist?).with("/path/path2/lolcat.rb").exactly(1).times.and_return(true)
346
+ expect(File).to receive(:exists?).with("/path/path2/lolcat.rb").exactly(1).times.and_return(true)
347
347
  expect(File).to receive(:readable?).with("/path/path2/lolcat.rb").and_return(true)
348
348
  expect(File).to receive(:file?).with("/path/path2/lolcat.rb").and_return(true)
349
349
  expect(IO).to receive(:read).with("/path/path2/lolcat.rb").exactly(1).times.and_return(ROLE_DSL)
@@ -175,7 +175,7 @@ describe Chef::RunContext::CookbookCompiler do
175
175
  describe "event dispatch" do
176
176
  let(:recipe) { "dependency1::default" }
177
177
  let(:recipe_path) do
178
- File.expand_path("../../data/run_context/cookbooks/dependency1/recipes/default.rb", __dir__)
178
+ File.expand_path("../../../data/run_context/cookbooks/dependency1/recipes/default.rb", __FILE__)
179
179
  end
180
180
  before do
181
181
  node.run_list(recipe)
@@ -138,7 +138,7 @@ describe Chef::RunContext do
138
138
  expect(node).to receive(:loaded_recipe).with(:ancient, "aliens")
139
139
  expect do
140
140
  run_context.include_recipe("ancient::aliens")
141
- # In CHEF-5120, this becomes a Chef::Exceptions::MissingCookbookDependency error:
141
+ # In CHEF-5120, this becomes a Chef::Exceptions::MissingCookbookDependency error:
142
142
  end.to raise_error(Chef::Exceptions::CookbookNotFound)
143
143
  end
144
144
 
@@ -195,7 +195,7 @@ describe Chef::Search::Query do
195
195
 
196
196
  it "throws an exception if you pass an incorrect option" do
197
197
  expect { query.search(:node, "platform:rhel", total: 10) }
198
- .to raise_error(ArgumentError, /unknown keyword: total/)
198
+ .to raise_error(ArgumentError, /unknown keyword: :?total/)
199
199
  end
200
200
 
201
201
  it "returns the raw rows, start, and total if no block is passed" do
@@ -21,15 +21,6 @@ end
21
21
  describe Chef::Util::ThreadedJobQueue do
22
22
  let(:queue) { Chef::Util::ThreadedJobQueue.new }
23
23
 
24
- around(:example) do |example|
25
- old_value = Thread.report_on_exception
26
- Thread.report_on_exception = false
27
-
28
- example.run
29
-
30
- Thread.report_on_exception = old_value
31
- end
32
-
33
24
  it "should pass mutex to jobs with an arity of 1" do
34
25
  job = double
35
26
  expect(job).to receive(:arity).at_least(:once).and_return(1)
@@ -81,10 +81,9 @@ describe "Chef::Win32::Security", :windows_only do
81
81
 
82
82
  context "when the user has admin privileges" do
83
83
  it "returns true" do
84
- token = double(:process_token)
84
+ allow(Chef::ReservedNames::Win32::Security).to receive(:open_current_process_token)
85
+ token = Chef::ReservedNames::Win32::Security.open_current_process_token
85
86
  allow(token).to receive_message_chain(:handle, :handle)
86
-
87
- allow(Chef::ReservedNames::Win32::Security).to receive(:open_current_process_token).and_return(token)
88
87
  allow(Chef::ReservedNames::Win32::Security).to receive(:get_token_information_elevation_type)
89
88
  allow(Chef::ReservedNames::Win32::Security).to receive(:GetTokenInformation).and_return(true)
90
89
  allow_any_instance_of(FFI::Buffer).to receive(:read_ulong).and_return(1)
@@ -129,7 +128,7 @@ describe "Chef::Win32::Security", :windows_only do
129
128
  context "when FFI::LastError.error result is not ERROR_INSUFFICIENT_BUFFER and not NO_ERROR" do
130
129
  it "raises Chef::ReservedNames::Win32::Error.raise! exception" do
131
130
  expect(FFI::LastError).to receive(:error).and_return(123).at_least(:once)
132
- expect { security_class.lookup_account_name "system" }.to raise_error(Chef::Exceptions::Win32APIError)
131
+ expect { security_class.lookup_account_name "system" }.to raise_error
133
132
  end
134
133
  end
135
134
  end
data/tasks/rspec.rb CHANGED
@@ -29,7 +29,7 @@ begin
29
29
  task :component_specs do
30
30
  %w{chef-utils chef-config}.each do |gem|
31
31
  Dir.chdir(gem) do
32
- Bundler.with_clean_env do
32
+ Bundler.with_unbundled_env do
33
33
  sh("bundle install")
34
34
  sh("bundle exec rake spec")
35
35
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chef
3
3
  version: !ruby/object:Gem::Version
4
- version: 15.17.4
4
+ version: 16.0.257
5
5
  platform: universal-mingw32
6
6
  authors:
7
7
  - Adam Jacob
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-16 00:00:00.000000000 Z
11
+ date: 2020-04-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chef-config
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 15.17.4
19
+ version: 16.0.257
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 15.17.4
26
+ version: 16.0.257
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: chef-utils
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 15.17.4
33
+ version: 16.0.257
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 15.17.4
40
+ version: 16.0.257
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: train-core
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -76,22 +76,22 @@ dependencies:
76
76
  name: license-acceptance
77
77
  requirement: !ruby/object:Gem::Requirement
78
78
  requirements:
79
+ - - "~>"
80
+ - !ruby/object:Gem::Version
81
+ version: '1.0'
79
82
  - - ">="
80
83
  - !ruby/object:Gem::Version
81
84
  version: 1.0.5
82
- - - "<"
83
- - !ruby/object:Gem::Version
84
- version: '3'
85
85
  type: :runtime
86
86
  prerelease: false
87
87
  version_requirements: !ruby/object:Gem::Requirement
88
88
  requirements:
89
+ - - "~>"
90
+ - !ruby/object:Gem::Version
91
+ version: '1.0'
89
92
  - - ">="
90
93
  - !ruby/object:Gem::Version
91
94
  version: 1.0.5
92
- - - "<"
93
- - !ruby/object:Gem::Version
94
- version: '3'
95
95
  - !ruby/object:Gem::Dependency
96
96
  name: mixlib-cli
97
97
  requirement: !ruby/object:Gem::Requirement
@@ -198,14 +198,14 @@ dependencies:
198
198
  requirements:
199
199
  - - "~>"
200
200
  - !ruby/object:Gem::Version
201
- version: '15.0'
201
+ version: '16.0'
202
202
  type: :runtime
203
203
  prerelease: false
204
204
  version_requirements: !ruby/object:Gem::Requirement
205
205
  requirements:
206
206
  - - "~>"
207
207
  - !ruby/object:Gem::Version
208
- version: '15.0'
208
+ version: '16.0'
209
209
  - !ruby/object:Gem::Dependency
210
210
  name: ffi
211
211
  requirement: !ruby/object:Gem::Requirement
@@ -249,7 +249,7 @@ dependencies:
249
249
  version: '4.2'
250
250
  - - "<"
251
251
  - !ruby/object:Gem::Version
252
- version: '7'
252
+ version: '6'
253
253
  type: :runtime
254
254
  prerelease: false
255
255
  version_requirements: !ruby/object:Gem::Requirement
@@ -259,7 +259,7 @@ dependencies:
259
259
  version: '4.2'
260
260
  - - "<"
261
261
  - !ruby/object:Gem::Version
262
- version: '7'
262
+ version: '6'
263
263
  - !ruby/object:Gem::Dependency
264
264
  name: net-ssh-multi
265
265
  requirement: !ruby/object:Gem::Requirement
@@ -284,22 +284,22 @@ dependencies:
284
284
  name: net-sftp
285
285
  requirement: !ruby/object:Gem::Requirement
286
286
  requirements:
287
+ - - "~>"
288
+ - !ruby/object:Gem::Version
289
+ version: '2.1'
287
290
  - - ">="
288
291
  - !ruby/object:Gem::Version
289
292
  version: 2.1.2
290
- - - "<"
291
- - !ruby/object:Gem::Version
292
- version: '4.0'
293
293
  type: :runtime
294
294
  prerelease: false
295
295
  version_requirements: !ruby/object:Gem::Requirement
296
296
  requirements:
297
+ - - "~>"
298
+ - !ruby/object:Gem::Version
299
+ version: '2.1'
297
300
  - - ">="
298
301
  - !ruby/object:Gem::Version
299
302
  version: 2.1.2
300
- - - "<"
301
- - !ruby/object:Gem::Version
302
- version: '4.0'
303
303
  - !ruby/object:Gem::Dependency
304
304
  name: ed25519
305
305
  requirement: !ruby/object:Gem::Requirement
@@ -362,6 +362,20 @@ dependencies:
362
362
  - - "~>"
363
363
  - !ruby/object:Gem::Version
364
364
  version: '0.6'
365
+ - !ruby/object:Gem::Dependency
366
+ name: pastel
367
+ requirement: !ruby/object:Gem::Requirement
368
+ requirements:
369
+ - - ">="
370
+ - !ruby/object:Gem::Version
371
+ version: '0'
372
+ type: :runtime
373
+ prerelease: false
374
+ version_requirements: !ruby/object:Gem::Requirement
375
+ requirements:
376
+ - - ">="
377
+ - !ruby/object:Gem::Version
378
+ version: '0'
365
379
  - !ruby/object:Gem::Dependency
366
380
  name: erubis
367
381
  requirement: !ruby/object:Gem::Requirement
@@ -380,42 +394,36 @@ dependencies:
380
394
  name: diff-lcs
381
395
  requirement: !ruby/object:Gem::Requirement
382
396
  requirements:
397
+ - - "~>"
398
+ - !ruby/object:Gem::Version
399
+ version: '1.2'
383
400
  - - ">="
384
401
  - !ruby/object:Gem::Version
385
402
  version: 1.2.4
386
- - - "<"
387
- - !ruby/object:Gem::Version
388
- version: 1.4.0
389
403
  type: :runtime
390
404
  prerelease: false
391
405
  version_requirements: !ruby/object:Gem::Requirement
392
406
  requirements:
407
+ - - "~>"
408
+ - !ruby/object:Gem::Version
409
+ version: '1.2'
393
410
  - - ">="
394
411
  - !ruby/object:Gem::Version
395
412
  version: 1.2.4
396
- - - "<"
397
- - !ruby/object:Gem::Version
398
- version: 1.4.0
399
413
  - !ruby/object:Gem::Dependency
400
414
  name: ffi-libarchive
401
415
  requirement: !ruby/object:Gem::Requirement
402
416
  requirements:
403
- - - "~>"
404
- - !ruby/object:Gem::Version
405
- version: '1.0'
406
417
  - - ">="
407
418
  - !ruby/object:Gem::Version
408
- version: 1.0.3
419
+ version: '0'
409
420
  type: :runtime
410
421
  prerelease: false
411
422
  version_requirements: !ruby/object:Gem::Requirement
412
423
  requirements:
413
- - - "~>"
414
- - !ruby/object:Gem::Version
415
- version: '1.0'
416
424
  - - ">="
417
425
  - !ruby/object:Gem::Version
418
- version: 1.0.3
426
+ version: '0'
419
427
  - !ruby/object:Gem::Dependency
420
428
  name: chef-zero
421
429
  requirement: !ruby/object:Gem::Requirement
@@ -430,6 +438,20 @@ dependencies:
430
438
  - - ">="
431
439
  - !ruby/object:Gem::Version
432
440
  version: 14.0.11
441
+ - !ruby/object:Gem::Dependency
442
+ name: chef-vault
443
+ requirement: !ruby/object:Gem::Requirement
444
+ requirements:
445
+ - - ">="
446
+ - !ruby/object:Gem::Version
447
+ version: '0'
448
+ type: :runtime
449
+ prerelease: false
450
+ version_requirements: !ruby/object:Gem::Requirement
451
+ requirements:
452
+ - - ">="
453
+ - !ruby/object:Gem::Version
454
+ version: '0'
433
455
  - !ruby/object:Gem::Dependency
434
456
  name: plist
435
457
  requirement: !ruby/object:Gem::Requirement
@@ -490,22 +512,16 @@ dependencies:
490
512
  name: uuidtools
491
513
  requirement: !ruby/object:Gem::Requirement
492
514
  requirements:
493
- - - ">="
515
+ - - "~>"
494
516
  - !ruby/object:Gem::Version
495
517
  version: 2.1.5
496
- - - "<"
497
- - !ruby/object:Gem::Version
498
- version: '3.0'
499
518
  type: :runtime
500
519
  prerelease: false
501
520
  version_requirements: !ruby/object:Gem::Requirement
502
521
  requirements:
503
- - - ">="
522
+ - - "~>"
504
523
  - !ruby/object:Gem::Version
505
524
  version: 2.1.5
506
- - - "<"
507
- - !ruby/object:Gem::Version
508
- version: '3.0'
509
525
  - !ruby/object:Gem::Dependency
510
526
  name: proxifier
511
527
  requirement: !ruby/object:Gem::Requirement
@@ -624,14 +640,14 @@ dependencies:
624
640
  requirements:
625
641
  - - "~>"
626
642
  - !ruby/object:Gem::Version
627
- version: '0.9'
643
+ version: 0.8.2
628
644
  type: :runtime
629
645
  prerelease: false
630
646
  version_requirements: !ruby/object:Gem::Requirement
631
647
  requirements:
632
648
  - - "~>"
633
649
  - !ruby/object:Gem::Version
634
- version: '0.9'
650
+ version: 0.8.2
635
651
  - !ruby/object:Gem::Dependency
636
652
  name: win32-service
637
653
  requirement: !ruby/object:Gem::Requirement
@@ -684,36 +700,30 @@ dependencies:
684
700
  name: iso8601
685
701
  requirement: !ruby/object:Gem::Requirement
686
702
  requirements:
687
- - - ">="
703
+ - - "~>"
688
704
  - !ruby/object:Gem::Version
689
705
  version: 0.12.1
690
- - - "<"
691
- - !ruby/object:Gem::Version
692
- version: '0.14'
693
706
  type: :runtime
694
707
  prerelease: false
695
708
  version_requirements: !ruby/object:Gem::Requirement
696
709
  requirements:
697
- - - ">="
710
+ - - "~>"
698
711
  - !ruby/object:Gem::Version
699
712
  version: 0.12.1
700
- - - "<"
701
- - !ruby/object:Gem::Version
702
- version: '0.14'
703
713
  - !ruby/object:Gem::Dependency
704
714
  name: win32-certstore
705
715
  requirement: !ruby/object:Gem::Requirement
706
716
  requirements:
707
717
  - - "~>"
708
718
  - !ruby/object:Gem::Version
709
- version: 0.5.0
719
+ version: '0.3'
710
720
  type: :runtime
711
721
  prerelease: false
712
722
  version_requirements: !ruby/object:Gem::Requirement
713
723
  requirements:
714
724
  - - "~>"
715
725
  - !ruby/object:Gem::Version
716
- version: 0.5.0
726
+ version: '0.3'
717
727
  description: A systems integration framework, built to bring the benefits of configuration
718
728
  management to your entire infrastructure.
719
729
  email: adam@chef.io
@@ -901,8 +911,8 @@ files:
901
911
  - lib/chef/digester.rb
902
912
  - lib/chef/dist.rb
903
913
  - lib/chef/dsl.rb
914
+ - lib/chef/dsl/chef_vault.rb
904
915
  - lib/chef/dsl/cheffish.rb
905
- - lib/chef/dsl/core.rb
906
916
  - lib/chef/dsl/data_query.rb
907
917
  - lib/chef/dsl/declare_resource.rb
908
918
  - lib/chef/dsl/definitions.rb
@@ -986,6 +996,12 @@ files:
986
996
  - lib/chef/json_compat.rb
987
997
  - lib/chef/key.rb
988
998
  - lib/chef/knife.rb
999
+ - lib/chef/knife/acl_add.rb
1000
+ - lib/chef/knife/acl_base.rb
1001
+ - lib/chef/knife/acl_bulk_add.rb
1002
+ - lib/chef/knife/acl_bulk_remove.rb
1003
+ - lib/chef/knife/acl_remove.rb
1004
+ - lib/chef/knife/acl_show.rb
989
1005
  - lib/chef/knife/bootstrap.rb
990
1006
  - lib/chef/knife/bootstrap/chef_vault_handler.rb
991
1007
  - lib/chef/knife/bootstrap/client_builder.rb
@@ -1018,13 +1034,6 @@ files:
1018
1034
  - lib/chef/knife/cookbook_metadata.rb
1019
1035
  - lib/chef/knife/cookbook_metadata_from_file.rb
1020
1036
  - lib/chef/knife/cookbook_show.rb
1021
- - lib/chef/knife/cookbook_site_download.rb
1022
- - lib/chef/knife/cookbook_site_install.rb
1023
- - lib/chef/knife/cookbook_site_list.rb
1024
- - lib/chef/knife/cookbook_site_search.rb
1025
- - lib/chef/knife/cookbook_site_share.rb
1026
- - lib/chef/knife/cookbook_site_show.rb
1027
- - lib/chef/knife/cookbook_site_unshare.rb
1028
1037
  - lib/chef/knife/cookbook_upload.rb
1029
1038
  - lib/chef/knife/core/bootstrap_context.rb
1030
1039
  - lib/chef/knife/core/cookbook_scm_repo.rb
@@ -1059,6 +1068,12 @@ files:
1059
1068
  - lib/chef/knife/environment_list.rb
1060
1069
  - lib/chef/knife/environment_show.rb
1061
1070
  - lib/chef/knife/exec.rb
1071
+ - lib/chef/knife/group_add.rb
1072
+ - lib/chef/knife/group_create.rb
1073
+ - lib/chef/knife/group_destroy.rb
1074
+ - lib/chef/knife/group_list.rb
1075
+ - lib/chef/knife/group_remove.rb
1076
+ - lib/chef/knife/group_show.rb
1062
1077
  - lib/chef/knife/key_create.rb
1063
1078
  - lib/chef/knife/key_create_base.rb
1064
1079
  - lib/chef/knife/key_delete.rb
@@ -1121,7 +1136,11 @@ files:
1121
1136
  - lib/chef/knife/upload.rb
1122
1137
  - lib/chef/knife/user_create.rb
1123
1138
  - lib/chef/knife/user_delete.rb
1139
+ - lib/chef/knife/user_dissociate.rb
1124
1140
  - lib/chef/knife/user_edit.rb
1141
+ - lib/chef/knife/user_invite_add.rb
1142
+ - lib/chef/knife/user_invite_list.rb
1143
+ - lib/chef/knife/user_invite_recind.rb
1125
1144
  - lib/chef/knife/user_key_create.rb
1126
1145
  - lib/chef/knife/user_key_delete.rb
1127
1146
  - lib/chef/knife/user_key_edit.rb
@@ -1131,6 +1150,7 @@ files:
1131
1150
  - lib/chef/knife/user_reregister.rb
1132
1151
  - lib/chef/knife/user_show.rb
1133
1152
  - lib/chef/knife/xargs.rb
1153
+ - lib/chef/knife/yaml_convert.rb
1134
1154
  - lib/chef/local_mode.rb
1135
1155
  - lib/chef/log.rb
1136
1156
  - lib/chef/log/syslog.rb
@@ -1208,9 +1228,6 @@ files:
1208
1228
  - lib/chef/powershell.rb
1209
1229
  - lib/chef/property.rb
1210
1230
  - lib/chef/provider.rb
1211
- - lib/chef/provider/apt_preference.rb
1212
- - lib/chef/provider/apt_repository.rb
1213
- - lib/chef/provider/apt_update.rb
1214
1231
  - lib/chef/provider/batch.rb
1215
1232
  - lib/chef/provider/cookbook_file.rb
1216
1233
  - lib/chef/provider/cookbook_file/content.rb
@@ -1243,16 +1260,13 @@ files:
1243
1260
  - lib/chef/provider/ifconfig/redhat.rb
1244
1261
  - lib/chef/provider/launchd.rb
1245
1262
  - lib/chef/provider/link.rb
1246
- - lib/chef/provider/log.rb
1247
1263
  - lib/chef/provider/lwrp_base.rb
1248
- - lib/chef/provider/mdadm.rb
1249
1264
  - lib/chef/provider/mount.rb
1250
1265
  - lib/chef/provider/mount/aix.rb
1251
1266
  - lib/chef/provider/mount/mount.rb
1252
1267
  - lib/chef/provider/mount/solaris.rb
1253
1268
  - lib/chef/provider/mount/windows.rb
1254
1269
  - lib/chef/provider/noop.rb
1255
- - lib/chef/provider/ohai.rb
1256
1270
  - lib/chef/provider/osx_profile.rb
1257
1271
  - lib/chef/provider/package.rb
1258
1272
  - lib/chef/provider/package/apt.rb
@@ -1366,6 +1380,7 @@ files:
1366
1380
  - lib/chef/reserved_names.rb
1367
1381
  - lib/chef/resource.rb
1368
1382
  - lib/chef/resource/action_class.rb
1383
+ - lib/chef/resource/alternatives.rb
1369
1384
  - lib/chef/resource/apt_package.rb
1370
1385
  - lib/chef/resource/apt_preference.rb
1371
1386
  - lib/chef/resource/apt_repository.rb
@@ -1377,9 +1392,13 @@ files:
1377
1392
  - lib/chef/resource/breakpoint.rb
1378
1393
  - lib/chef/resource/build_essential.rb
1379
1394
  - lib/chef/resource/cab_package.rb
1395
+ - lib/chef/resource/chef_client_cron.rb
1396
+ - lib/chef/resource/chef_client_scheduled_task.rb
1397
+ - lib/chef/resource/chef_client_systemd_timer.rb
1380
1398
  - lib/chef/resource/chef_gem.rb
1381
1399
  - lib/chef/resource/chef_handler.rb
1382
1400
  - lib/chef/resource/chef_sleep.rb
1401
+ - lib/chef/resource/chef_vault_secret.rb
1383
1402
  - lib/chef/resource/chocolatey_config.rb
1384
1403
  - lib/chef/resource/chocolatey_feature.rb
1385
1404
  - lib/chef/resource/chocolatey_package.rb
@@ -1403,8 +1422,8 @@ files:
1403
1422
  - lib/chef/resource/file/verification/systemd_unit.rb
1404
1423
  - lib/chef/resource/freebsd_package.rb
1405
1424
  - lib/chef/resource/gem_package.rb
1406
- - lib/chef/resource/git.rb
1407
1425
  - lib/chef/resource/group.rb
1426
+ - lib/chef/resource/helpers/cron_validations.rb
1408
1427
  - lib/chef/resource/homebrew_cask.rb
1409
1428
  - lib/chef/resource/homebrew_package.rb
1410
1429
  - lib/chef/resource/homebrew_tap.rb
@@ -1442,6 +1461,7 @@ files:
1442
1461
  - lib/chef/resource/pacman_package.rb
1443
1462
  - lib/chef/resource/paludis_package.rb
1444
1463
  - lib/chef/resource/perl.rb
1464
+ - lib/chef/resource/plist.rb
1445
1465
  - lib/chef/resource/portage_package.rb
1446
1466
  - lib/chef/resource/powershell_package.rb
1447
1467
  - lib/chef/resource/powershell_package_source.rb
@@ -1461,19 +1481,21 @@ files:
1461
1481
  - lib/chef/resource/rpm_package.rb
1462
1482
  - lib/chef/resource/ruby.rb
1463
1483
  - lib/chef/resource/ruby_block.rb
1464
- - lib/chef/resource/scm.rb
1484
+ - lib/chef/resource/scm/_scm.rb
1485
+ - lib/chef/resource/scm/git.rb
1486
+ - lib/chef/resource/scm/subversion.rb
1465
1487
  - lib/chef/resource/script.rb
1466
1488
  - lib/chef/resource/service.rb
1467
1489
  - lib/chef/resource/smartos_package.rb
1468
1490
  - lib/chef/resource/snap_package.rb
1469
1491
  - lib/chef/resource/solaris_package.rb
1470
1492
  - lib/chef/resource/ssh_known_hosts_entry.rb
1471
- - lib/chef/resource/subversion.rb
1472
1493
  - lib/chef/resource/sudo.rb
1473
1494
  - lib/chef/resource/support/cron.d.erb
1474
1495
  - lib/chef/resource/support/cron_access.erb
1475
1496
  - lib/chef/resource/support/ssh_known_hosts.erb
1476
1497
  - lib/chef/resource/support/sudoer.erb
1498
+ - lib/chef/resource/support/ulimit.erb
1477
1499
  - lib/chef/resource/swap_file.rb
1478
1500
  - lib/chef/resource/sysctl.rb
1479
1501
  - lib/chef/resource/systemd_unit.rb
@@ -1487,6 +1509,7 @@ files:
1487
1509
  - lib/chef/resource/user/pw_user.rb
1488
1510
  - lib/chef/resource/user/solaris_user.rb
1489
1511
  - lib/chef/resource/user/windows_user.rb
1512
+ - lib/chef/resource/user_ulimit.rb
1490
1513
  - lib/chef/resource/whyrun_safe_ruby_block.rb
1491
1514
  - lib/chef/resource/windows_ad_join.rb
1492
1515
  - lib/chef/resource/windows_auto_run.rb
@@ -1508,11 +1531,13 @@ files:
1508
1531
  - lib/chef/resource/windows_printer.rb
1509
1532
  - lib/chef/resource/windows_printer_port.rb
1510
1533
  - lib/chef/resource/windows_script.rb
1534
+ - lib/chef/resource/windows_security_policy.rb
1511
1535
  - lib/chef/resource/windows_service.rb
1512
1536
  - lib/chef/resource/windows_share.rb
1513
1537
  - lib/chef/resource/windows_shortcut.rb
1514
1538
  - lib/chef/resource/windows_task.rb
1515
1539
  - lib/chef/resource/windows_uac.rb
1540
+ - lib/chef/resource/windows_user_privilege.rb
1516
1541
  - lib/chef/resource/windows_workgroup.rb
1517
1542
  - lib/chef/resource/yum_package.rb
1518
1543
  - lib/chef/resource/yum_repository.rb
@@ -2094,11 +2119,12 @@ files:
2094
2119
  - spec/functional/resource/user/windows_spec.rb
2095
2120
  - spec/functional/resource/windows_certificate_spec.rb
2096
2121
  - spec/functional/resource/windows_env_spec.rb
2097
- - spec/functional/resource/windows_font_spec.rb
2098
2122
  - spec/functional/resource/windows_package_spec.rb
2099
2123
  - spec/functional/resource/windows_path_spec.rb
2124
+ - spec/functional/resource/windows_security_policy_spec.rb
2100
2125
  - spec/functional/resource/windows_service_spec.rb
2101
2126
  - spec/functional/resource/windows_task_spec.rb
2127
+ - spec/functional/resource/windows_user_privilege_spec.rb
2102
2128
  - spec/functional/resource/yum_package_spec.rb
2103
2129
  - spec/functional/resource/zypper_package_spec.rb
2104
2130
  - spec/functional/root_alias_spec.rb
@@ -2194,6 +2220,7 @@ files:
2194
2220
  - spec/integration/recipes/resource_converge_if_changed_spec.rb
2195
2221
  - spec/integration/recipes/resource_load_spec.rb
2196
2222
  - spec/integration/recipes/unified_mode_spec.rb
2223
+ - spec/integration/recipes/use_partial_spec.rb
2197
2224
  - spec/integration/solo/solo_spec.rb
2198
2225
  - spec/rcov.opts
2199
2226
  - spec/scripts/ssl-serve.rb
@@ -2220,6 +2247,7 @@ files:
2220
2247
  - spec/support/platforms/prof/gc.rb
2221
2248
  - spec/support/platforms/prof/win32.rb
2222
2249
  - spec/support/platforms/win32/spec_service.rb
2250
+ - spec/support/recipe_dsl_helper.rb
2223
2251
  - spec/support/shared/context/config.rb
2224
2252
  - spec/support/shared/context/win32.rb
2225
2253
  - spec/support/shared/functional/diff_disabled.rb
@@ -2537,7 +2565,6 @@ files:
2537
2565
  - spec/unit/provider/mount/solaris_spec.rb
2538
2566
  - spec/unit/provider/mount/windows_spec.rb
2539
2567
  - spec/unit/provider/mount_spec.rb
2540
- - spec/unit/provider/ohai_spec.rb
2541
2568
  - spec/unit/provider/osx_profile_spec.rb
2542
2569
  - spec/unit/provider/package/apt_spec.rb
2543
2570
  - spec/unit/provider/package/bff_spec.rb
@@ -2625,6 +2652,7 @@ files:
2625
2652
  - spec/unit/provider_spec.rb
2626
2653
  - spec/unit/pure_application_spec.rb
2627
2654
  - spec/unit/recipe_spec.rb
2655
+ - spec/unit/resource/alternatives_spec.rb
2628
2656
  - spec/unit/resource/apt_package_spec.rb
2629
2657
  - spec/unit/resource/apt_preference_spec.rb
2630
2658
  - spec/unit/resource/apt_repository_spec.rb
@@ -2636,9 +2664,13 @@ files:
2636
2664
  - spec/unit/resource/breakpoint_spec.rb
2637
2665
  - spec/unit/resource/build_essential_spec.rb
2638
2666
  - spec/unit/resource/cab_package_spec.rb
2667
+ - spec/unit/resource/chef_client_cron_spec.rb
2668
+ - spec/unit/resource/chef_client_scheduled_task_spec.rb
2669
+ - spec/unit/resource/chef_client_systemd_timer_spec.rb
2639
2670
  - spec/unit/resource/chef_gem_spec.rb
2640
2671
  - spec/unit/resource/chef_handler_spec.rb
2641
2672
  - spec/unit/resource/chef_sleep_spec.rb
2673
+ - spec/unit/resource/chef_vault_secret_spec.rb
2642
2674
  - spec/unit/resource/chocolatey_config_spec.rb
2643
2675
  - spec/unit/resource/chocolatey_feature_spec.rb
2644
2676
  - spec/unit/resource/chocolatey_package_spec.rb
@@ -2664,8 +2696,8 @@ files:
2664
2696
  - spec/unit/resource/file_spec.rb
2665
2697
  - spec/unit/resource/freebsd_package_spec.rb
2666
2698
  - spec/unit/resource/gem_package_spec.rb
2667
- - spec/unit/resource/git_spec.rb
2668
2699
  - spec/unit/resource/group_spec.rb
2700
+ - spec/unit/resource/helpers/cron_validations_spec.rb
2669
2701
  - spec/unit/resource/homebrew_cask_spec.rb
2670
2702
  - spec/unit/resource/homebrew_package_spec.rb
2671
2703
  - spec/unit/resource/homebrew_tap_spec.rb
@@ -2702,6 +2734,7 @@ files:
2702
2734
  - spec/unit/resource/pacman_package_spec.rb
2703
2735
  - spec/unit/resource/paludis_package_spec.rb
2704
2736
  - spec/unit/resource/perl_spec.rb
2737
+ - spec/unit/resource/plist_spec.rb
2705
2738
  - spec/unit/resource/portage_package_spec.rb
2706
2739
  - spec/unit/resource/powershell_package_source_spec.rb
2707
2740
  - spec/unit/resource/powershell_package_spec.rb
@@ -2721,14 +2754,15 @@ files:
2721
2754
  - spec/unit/resource/rpm_package_spec.rb
2722
2755
  - spec/unit/resource/ruby_block_spec.rb
2723
2756
  - spec/unit/resource/ruby_spec.rb
2724
- - spec/unit/resource/scm_spec.rb
2757
+ - spec/unit/resource/scm/git_spec.rb
2758
+ - spec/unit/resource/scm/scm.rb
2759
+ - spec/unit/resource/scm/subversion_spec.rb
2725
2760
  - spec/unit/resource/script_spec.rb
2726
2761
  - spec/unit/resource/service_spec.rb
2727
2762
  - spec/unit/resource/smartos_package_spec.rb
2728
2763
  - spec/unit/resource/snap_package_spec.rb
2729
2764
  - spec/unit/resource/solaris_package_spec.rb
2730
2765
  - spec/unit/resource/ssh_known_hosts_entry_spec.rb
2731
- - spec/unit/resource/subversion_spec.rb
2732
2766
  - spec/unit/resource/sudo_spec.rb
2733
2767
  - spec/unit/resource/swap_file_spec.rb
2734
2768
  - spec/unit/resource/sysctl_spec.rb
@@ -2736,6 +2770,7 @@ files:
2736
2770
  - spec/unit/resource/template_spec.rb
2737
2771
  - spec/unit/resource/timezone_spec.rb
2738
2772
  - spec/unit/resource/user_spec.rb
2773
+ - spec/unit/resource/user_ulimit_spec.rb
2739
2774
  - spec/unit/resource/windows_ad_join_spec.rb
2740
2775
  - spec/unit/resource/windows_auto_run_spec.rb
2741
2776
  - spec/unit/resource/windows_certificate_spec.rb
@@ -2824,13 +2859,7 @@ files:
2824
2859
  homepage: https://www.chef.io
2825
2860
  licenses:
2826
2861
  - Apache-2.0
2827
- metadata:
2828
- bug_tracker_uri: https://github.com/chef/chef/issues
2829
- changelog_uri: https://github.com/chef/chef/blob/master/CHANGELOG.md
2830
- documentation_uri: https://docs.chef.io/
2831
- homepage_uri: https://www.chef.io
2832
- mailing_list_uri: https://discourse.chef.io/
2833
- source_code_uri: https://github.com/chef/chef/
2862
+ metadata: {}
2834
2863
  post_install_message:
2835
2864
  rdoc_options: []
2836
2865
  require_paths:
@@ -2839,14 +2868,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
2839
2868
  requirements:
2840
2869
  - - ">="
2841
2870
  - !ruby/object:Gem::Version
2842
- version: 2.5.0
2871
+ version: 2.6.0
2843
2872
  required_rubygems_version: !ruby/object:Gem::Requirement
2844
2873
  requirements:
2845
2874
  - - ">="
2846
2875
  - !ruby/object:Gem::Version
2847
2876
  version: '0'
2848
2877
  requirements: []
2849
- rubygems_version: 3.0.3.1
2878
+ rubygems_version: 3.1.2
2850
2879
  signing_key:
2851
2880
  specification_version: 4
2852
2881
  summary: A systems integration framework, built to bring the benefits of configuration