chef 16.1.0-universal-mingw32 → 16.3.38-universal-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (424) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +6 -7
  3. data/README.md +3 -3
  4. data/Rakefile +4 -3
  5. data/chef-universal-mingw32.gemspec +2 -2
  6. data/chef.gemspec +7 -6
  7. data/distro/powershell/chef/chef.psm1 +3 -3
  8. data/distro/templates/powershell/chef/chef.psm1.erb +3 -3
  9. data/lib/chef/application.rb +12 -0
  10. data/lib/chef/application/apply.rb +2 -1
  11. data/lib/chef/application/base.rb +1 -1
  12. data/lib/chef/application/client.rb +1 -1
  13. data/lib/chef/application/windows_service_manager.rb +1 -1
  14. data/lib/chef/{whitelist.rb → attribute_allowlist.rb} +11 -11
  15. data/lib/chef/{blacklist.rb → attribute_blocklist.rb} +9 -9
  16. data/lib/chef/chef_fs/data_handler/data_bag_item_data_handler.rb +1 -1
  17. data/lib/chef/chef_fs/data_handler/organization_data_handler.rb +1 -2
  18. data/lib/chef/chef_fs/file_system/chef_server/acls_dir.rb +1 -1
  19. data/lib/chef/chef_fs/file_system/chef_server/cookbook_file.rb +2 -2
  20. data/lib/chef/chef_fs/file_system/chef_server/cookbooks_dir.rb +1 -5
  21. data/lib/chef/chef_fs/file_system/repository/base_file.rb +1 -0
  22. data/lib/chef/chef_fs/file_system/repository/directory.rb +1 -1
  23. data/lib/chef/chef_fs/parallelizer/parallel_enumerable.rb +2 -2
  24. data/lib/chef/chef_fs/path_utils.rb +4 -4
  25. data/lib/chef/client.rb +3 -3
  26. data/lib/chef/cookbook/chefignore.rb +1 -1
  27. data/lib/chef/cookbook/file_system_file_vendor.rb +1 -1
  28. data/lib/chef/cookbook/metadata.rb +2 -2
  29. data/lib/chef/cookbook/remote_file_vendor.rb +1 -3
  30. data/lib/chef/cookbook/syntax_check.rb +1 -2
  31. data/lib/chef/cookbook_loader.rb +16 -30
  32. data/lib/chef/cookbook_manifest.rb +1 -1
  33. data/lib/chef/cookbook_site_streaming_uploader.rb +1 -1
  34. data/lib/chef/cookbook_version.rb +4 -4
  35. data/lib/chef/data_bag.rb +5 -6
  36. data/lib/chef/data_collector.rb +1 -1
  37. data/lib/chef/data_collector/error_handlers.rb +1 -1
  38. data/lib/chef/decorator/lazy_array.rb +2 -2
  39. data/lib/chef/deprecated.rb +12 -0
  40. data/lib/chef/digester.rb +5 -4
  41. data/lib/chef/dsl/declare_resource.rb +1 -1
  42. data/lib/chef/dsl/platform_introspection.rb +2 -0
  43. data/lib/chef/encrypted_data_bag_item/decryptor.rb +1 -1
  44. data/lib/chef/encrypted_data_bag_item/encryptor.rb +1 -1
  45. data/lib/chef/environment.rb +1 -2
  46. data/lib/chef/exceptions.rb +3 -0
  47. data/lib/chef/file_access_control.rb +1 -1
  48. data/lib/chef/file_access_control/windows.rb +2 -2
  49. data/lib/chef/file_content_management/deploy/mv_unix.rb +1 -1
  50. data/lib/chef/formatters/base.rb +1 -1
  51. data/lib/chef/formatters/error_inspectors/compile_error_inspector.rb +1 -1
  52. data/lib/chef/formatters/error_inspectors/resource_failure_inspector.rb +3 -3
  53. data/lib/chef/http.rb +19 -4
  54. data/lib/chef/http/authenticator.rb +1 -1
  55. data/lib/chef/http/decompressor.rb +1 -1
  56. data/lib/chef/http/http_request.rb +1 -1
  57. data/lib/chef/http/json_output.rb +1 -1
  58. data/lib/chef/http/ssl_policies.rb +18 -0
  59. data/lib/chef/json_compat.rb +1 -1
  60. data/lib/chef/key.rb +1 -1
  61. data/lib/chef/knife.rb +6 -6
  62. data/lib/chef/knife/bootstrap.rb +24 -24
  63. data/lib/chef/knife/bootstrap/chef_vault_handler.rb +1 -1
  64. data/lib/chef/knife/bootstrap/client_builder.rb +1 -1
  65. data/lib/chef/knife/bootstrap/templates/chef-full.erb +9 -9
  66. data/lib/chef/knife/bootstrap/templates/windows-chef-client-msi.erb +3 -1
  67. data/lib/chef/knife/bootstrap/train_connector.rb +1 -0
  68. data/lib/chef/knife/client_bulk_delete.rb +1 -1
  69. data/lib/chef/knife/config_get.rb +2 -1
  70. data/lib/chef/knife/config_list_profiles.rb +4 -1
  71. data/lib/chef/knife/config_use_profile.rb +15 -5
  72. data/lib/chef/knife/configure.rb +1 -1
  73. data/lib/chef/knife/cookbook_delete.rb +1 -1
  74. data/lib/chef/knife/cookbook_upload.rb +6 -14
  75. data/lib/chef/knife/core/bootstrap_context.rb +1 -1
  76. data/lib/chef/knife/core/cookbook_scm_repo.rb +1 -1
  77. data/lib/chef/knife/core/gem_glob_loader.rb +1 -1
  78. data/lib/chef/knife/core/hashed_command_loader.rb +2 -1
  79. data/lib/chef/knife/core/node_presenter.rb +1 -1
  80. data/lib/chef/knife/core/status_presenter.rb +1 -1
  81. data/lib/chef/knife/core/subcommand_loader.rb +21 -2
  82. data/lib/chef/knife/core/ui.rb +8 -2
  83. data/lib/chef/knife/core/windows_bootstrap_context.rb +18 -4
  84. data/lib/chef/knife/data_bag_create.rb +1 -1
  85. data/lib/chef/knife/key_create_base.rb +1 -1
  86. data/lib/chef/knife/key_edit_base.rb +1 -1
  87. data/lib/chef/knife/node_bulk_delete.rb +1 -1
  88. data/lib/chef/knife/node_run_list_remove.rb +1 -1
  89. data/lib/chef/knife/rehash.rb +3 -21
  90. data/lib/chef/knife/role_bulk_delete.rb +1 -1
  91. data/lib/chef/knife/ssh.rb +7 -3
  92. data/lib/chef/knife/supermarket_share.rb +1 -1
  93. data/lib/chef/knife/supermarket_unshare.rb +1 -1
  94. data/lib/chef/log.rb +8 -3
  95. data/lib/chef/mixin/api_version_request_handling.rb +1 -1
  96. data/lib/chef/mixin/checksum.rb +0 -1
  97. data/{spec/functional/resource/base.rb → lib/chef/mixin/chef_utils_wiring.rb} +24 -12
  98. data/{spec/unit/log_spec.rb → lib/chef/mixin/default_paths.rb} +13 -5
  99. data/lib/chef/mixin/openssl_helper.rb +31 -9
  100. data/lib/chef/mixin/path_sanity.rb +5 -4
  101. data/lib/chef/mixin/properties.rb +2 -2
  102. data/lib/chef/mixin/securable.rb +2 -2
  103. data/lib/chef/mixin/shell_out.rb +4 -188
  104. data/lib/chef/mixin/template.rb +1 -0
  105. data/lib/chef/mixin/which.rb +6 -3
  106. data/lib/chef/mixins.rb +1 -0
  107. data/lib/chef/node.rb +36 -12
  108. data/lib/chef/node/attribute.rb +2 -2
  109. data/lib/chef/node/immutable_collections.rb +1 -1
  110. data/lib/chef/node_map.rb +21 -18
  111. data/lib/chef/platform/service_helpers.rb +31 -28
  112. data/lib/chef/policy_builder/policyfile.rb +1 -1
  113. data/lib/chef/powershell.rb +1 -1
  114. data/lib/chef/property.rb +2 -2
  115. data/lib/chef/provider.rb +3 -3
  116. data/lib/chef/provider/batch.rb +3 -10
  117. data/lib/chef/provider/cron.rb +2 -14
  118. data/lib/chef/provider/directory.rb +1 -1
  119. data/lib/chef/provider/execute.rb +2 -1
  120. data/lib/chef/provider/file.rb +1 -1
  121. data/lib/chef/provider/git.rb +12 -4
  122. data/lib/chef/provider/group/dscl.rb +2 -2
  123. data/lib/chef/provider/group/windows.rb +1 -1
  124. data/lib/chef/provider/ifconfig.rb +7 -7
  125. data/lib/chef/provider/mount/aix.rb +1 -1
  126. data/lib/chef/provider/mount/solaris.rb +0 -1
  127. data/lib/chef/provider/mount/windows.rb +2 -2
  128. data/lib/chef/provider/noop.rb +1 -1
  129. data/lib/chef/provider/package/chocolatey.rb +1 -1
  130. data/lib/chef/provider/package/dpkg.rb +1 -1
  131. data/lib/chef/provider/package/openbsd.rb +1 -1
  132. data/lib/chef/provider/package/portage.rb +3 -2
  133. data/lib/chef/provider/package/powershell.rb +6 -2
  134. data/lib/chef/provider/package/rubygems.rb +3 -3
  135. data/lib/chef/provider/package/snap.rb +97 -29
  136. data/lib/chef/provider/package/windows.rb +11 -6
  137. data/lib/chef/provider/package/windows/msi.rb +3 -3
  138. data/lib/chef/provider/package/windows/registry_uninstall_entry.rb +1 -1
  139. data/lib/chef/provider/package/yum.rb +1 -1
  140. data/lib/chef/provider/package/yum/yum_cache.rb +1 -1
  141. data/lib/chef/provider/package/zypper.rb +0 -1
  142. data/lib/chef/provider/powershell_script.rb +10 -14
  143. data/lib/chef/provider/remote_directory.rb +2 -2
  144. data/lib/chef/provider/remote_file/http.rb +4 -1
  145. data/lib/chef/provider/script.rb +4 -75
  146. data/lib/chef/provider/service.rb +2 -2
  147. data/lib/chef/provider/service/arch.rb +2 -2
  148. data/lib/chef/provider/service/debian.rb +2 -2
  149. data/lib/chef/provider/service/openbsd.rb +4 -4
  150. data/lib/chef/provider/service/redhat.rb +1 -1
  151. data/lib/chef/provider/service/upstart.rb +1 -1
  152. data/lib/chef/provider/service/windows.rb +1 -1
  153. data/lib/chef/provider/subversion.rb +2 -2
  154. data/lib/chef/provider/user/aix.rb +1 -1
  155. data/lib/chef/provider/user/dscl.rb +6 -6
  156. data/lib/chef/provider/user/linux.rb +3 -3
  157. data/lib/chef/provider/user/mac.rb +15 -11
  158. data/lib/chef/provider/windows_script.rb +87 -25
  159. data/lib/chef/provider/windows_task.rb +4 -2
  160. data/lib/chef/provider/yum_repository.rb +1 -1
  161. data/lib/chef/provider/zypper_repository.rb +31 -11
  162. data/lib/chef/resource.rb +27 -14
  163. data/lib/chef/resource/alternatives.rb +1 -1
  164. data/lib/chef/resource/apt_package.rb +1 -1
  165. data/lib/chef/resource/archive_file.rb +28 -8
  166. data/lib/chef/resource/bash.rb +0 -1
  167. data/lib/chef/resource/batch.rb +4 -2
  168. data/lib/chef/resource/build_essential.rb +2 -2
  169. data/lib/chef/resource/chef_client_scheduled_task.rb +14 -2
  170. data/lib/chef/resource/chef_gem.rb +57 -21
  171. data/lib/chef/resource/chef_handler.rb +2 -2
  172. data/lib/chef/resource/chef_vault_secret.rb +1 -1
  173. data/lib/chef/resource/chocolatey_feature.rb +1 -2
  174. data/lib/chef/resource/cron/_cron_shared.rb +98 -0
  175. data/lib/chef/resource/cron/cron.rb +46 -0
  176. data/lib/chef/resource/{cron_d.rb → cron/cron_d.rb} +7 -87
  177. data/lib/chef/resource/cron_access.rb +13 -5
  178. data/lib/chef/resource/csh.rb +0 -1
  179. data/lib/chef/resource/dmg_package.rb +2 -2
  180. data/lib/chef/resource/execute.rb +480 -10
  181. data/lib/chef/resource/file.rb +10 -8
  182. data/lib/chef/resource/freebsd_package.rb +1 -1
  183. data/lib/chef/resource/gem_package.rb +35 -2
  184. data/lib/chef/resource/helpers/cron_validations.rb +6 -3
  185. data/lib/chef/resource/homebrew_package.rb +30 -1
  186. data/lib/chef/resource/homebrew_update.rb +107 -0
  187. data/lib/chef/resource/hostname.rb +7 -20
  188. data/lib/chef/resource/kernel_module.rb +14 -1
  189. data/lib/chef/resource/launchd.rb +1 -1
  190. data/lib/chef/resource/locale.rb +3 -3
  191. data/lib/chef/resource/lwrp_base.rb +1 -0
  192. data/lib/chef/resource/macos_userdefaults.rb +176 -56
  193. data/lib/chef/resource/mount.rb +1 -1
  194. data/lib/chef/resource/openssl_x509_certificate.rb +11 -14
  195. data/lib/chef/resource/openssl_x509_crl.rb +1 -2
  196. data/lib/chef/resource/perl.rb +0 -1
  197. data/lib/chef/resource/plist.rb +23 -4
  198. data/lib/chef/resource/powershell_script.rb +4 -2
  199. data/lib/chef/resource/python.rb +0 -1
  200. data/lib/chef/resource/remote_file.rb +26 -10
  201. data/lib/chef/resource/ruby.rb +0 -1
  202. data/lib/chef/resource/scm/git.rb +1 -1
  203. data/lib/chef/resource/service.rb +2 -2
  204. data/lib/chef/resource/ssh_known_hosts_entry.rb +16 -1
  205. data/lib/chef/resource/sudo.rb +30 -3
  206. data/lib/chef/resource/swap_file.rb +17 -0
  207. data/lib/chef/resource/template.rb +1 -1
  208. data/lib/chef/resource/timezone.rb +15 -0
  209. data/lib/chef/resource/user_ulimit.rb +1 -1
  210. data/lib/chef/resource/windows_ad_join.rb +30 -1
  211. data/lib/chef/resource/windows_audit_policy.rb +227 -0
  212. data/lib/chef/resource/windows_auto_run.rb +11 -0
  213. data/lib/chef/resource/windows_certificate.rb +27 -1
  214. data/lib/chef/resource/windows_dfs_server.rb +1 -1
  215. data/lib/chef/resource/windows_dns_record.rb +17 -0
  216. data/lib/chef/resource/windows_firewall_profile.rb +197 -0
  217. data/lib/chef/resource/windows_font.rb +3 -3
  218. data/lib/chef/resource/windows_package.rb +1 -1
  219. data/lib/chef/resource/windows_pagefile.rb +2 -2
  220. data/lib/chef/resource/windows_script.rb +2 -16
  221. data/lib/chef/resource/windows_security_policy.rb +67 -36
  222. data/lib/chef/resource/windows_shortcut.rb +1 -2
  223. data/lib/chef/resource/windows_task.rb +10 -10
  224. data/lib/chef/resource/windows_user_privilege.rb +33 -10
  225. data/lib/chef/resource/yum_repository.rb +9 -9
  226. data/lib/chef/resource_inspector.rb +11 -4
  227. data/lib/chef/resources.rb +5 -2
  228. data/lib/chef/role.rb +1 -2
  229. data/lib/chef/run_context/cookbook_compiler.rb +1 -1
  230. data/lib/chef/search/query.rb +1 -1
  231. data/lib/chef/shell/ext.rb +1 -1
  232. data/lib/chef/shell/shell_session.rb +2 -0
  233. data/lib/chef/util/diff.rb +2 -3
  234. data/lib/chef/util/windows/net_user.rb +1 -1
  235. data/lib/chef/util/windows/volume.rb +1 -1
  236. data/lib/chef/version.rb +2 -2
  237. data/lib/chef/win32/api.rb +2 -2
  238. data/lib/chef/win32/api/error.rb +3 -1
  239. data/lib/chef/win32/api/file.rb +1 -1
  240. data/lib/chef/win32/api/net.rb +1 -0
  241. data/lib/chef/win32/file.rb +1 -1
  242. data/lib/chef/win32/mutex.rb +1 -1
  243. data/lib/chef/win32/net.rb +1 -0
  244. data/lib/chef/win32/registry.rb +3 -4
  245. data/lib/chef/win32/security.rb +1 -1
  246. data/lib/chef/win32/security/sid.rb +4 -4
  247. data/spec/data/lwrp/providers/buck_passer.rb +1 -1
  248. data/spec/data/lwrp/providers/buck_passer_2.rb +1 -1
  249. data/spec/data/lwrp/providers/embedded_resource_accesses_providers_scope.rb +1 -1
  250. data/spec/functional/knife/configure_spec.rb +1 -1
  251. data/spec/functional/knife/ssh_spec.rb +5 -16
  252. data/spec/functional/resource/aix_service_spec.rb +9 -2
  253. data/spec/functional/resource/aixinit_service_spec.rb +1 -2
  254. data/spec/functional/resource/apt_package_spec.rb +0 -1
  255. data/spec/functional/resource/bash_spec.rb +3 -2
  256. data/spec/functional/resource/bff_spec.rb +1 -1
  257. data/spec/functional/resource/chocolatey_package_spec.rb +4 -0
  258. data/spec/functional/resource/cron_spec.rb +20 -2
  259. data/spec/functional/resource/dnf_package_spec.rb +6 -3
  260. data/spec/functional/resource/execute_spec.rb +1 -1
  261. data/spec/functional/resource/git_spec.rb +29 -7
  262. data/spec/functional/resource/group_spec.rb +15 -3
  263. data/spec/functional/resource/ifconfig_spec.rb +9 -1
  264. data/spec/functional/resource/insserv_spec.rb +3 -3
  265. data/spec/functional/resource/link_spec.rb +2 -5
  266. data/spec/functional/resource/mount_spec.rb +9 -1
  267. data/spec/functional/resource/msu_package_spec.rb +9 -3
  268. data/spec/functional/resource/powershell_script_spec.rb +4 -4
  269. data/spec/functional/resource/remote_file_spec.rb +9 -15
  270. data/spec/functional/resource/rpm_spec.rb +1 -1
  271. data/spec/functional/resource/timezone_spec.rb +2 -0
  272. data/spec/functional/resource/windows_package_spec.rb +0 -1
  273. data/spec/functional/resource/windows_path_spec.rb +4 -0
  274. data/spec/functional/resource/windows_security_policy_spec.rb +0 -1
  275. data/spec/functional/resource/windows_service_spec.rb +4 -0
  276. data/spec/functional/resource/windows_task_spec.rb +16 -15
  277. data/spec/functional/resource/windows_user_privilege_spec.rb +1 -2
  278. data/spec/functional/resource/yum_package_spec.rb +4 -1
  279. data/spec/functional/resource/zypper_package_spec.rb +4 -1
  280. data/spec/functional/run_lock_spec.rb +2 -1
  281. data/spec/functional/shell_spec.rb +5 -6
  282. data/spec/functional/util/powershell/cmdlet_spec.rb +1 -1
  283. data/spec/functional/version_spec.rb +1 -1
  284. data/spec/functional/win32/crypto_spec.rb +1 -1
  285. data/spec/integration/knife/config_list_profiles_spec.rb +30 -2
  286. data/spec/integration/knife/config_use_profile_spec.rb +55 -2
  287. data/spec/integration/knife/cookbook_upload_spec.rb +28 -1
  288. data/spec/integration/knife/data_bag_from_file_spec.rb +1 -1
  289. data/spec/integration/knife/environment_from_file_spec.rb +1 -1
  290. data/spec/integration/knife/node_from_file_spec.rb +1 -1
  291. data/spec/integration/knife/role_from_file_spec.rb +1 -1
  292. data/spec/integration/recipes/accumulator_spec.rb +1 -1
  293. data/spec/integration/recipes/lwrp_inline_resources_spec.rb +1 -1
  294. data/spec/integration/recipes/lwrp_spec.rb +1 -1
  295. data/spec/integration/recipes/notifies_spec.rb +1 -1
  296. data/spec/integration/recipes/notifying_block_spec.rb +1 -1
  297. data/spec/integration/recipes/recipe_dsl_spec.rb +5 -1
  298. data/spec/integration/recipes/resource_converge_if_changed_spec.rb +2 -0
  299. data/spec/integration/recipes/resource_load_spec.rb +4 -2
  300. data/spec/integration/recipes/unified_mode_spec.rb +1 -1
  301. data/spec/integration/recipes/use_partial_spec.rb +1 -1
  302. data/spec/scripts/ssl-serve.rb +1 -1
  303. data/spec/spec_helper.rb +10 -4
  304. data/spec/support/chef_helpers.rb +2 -21
  305. data/spec/support/platform_helpers.rb +1 -3
  306. data/spec/support/platforms/win32/spec_service.rb +1 -1
  307. data/spec/support/shared/functional/execute_resource.rb +1 -1
  308. data/spec/support/shared/functional/file_resource.rb +0 -1
  309. data/spec/support/shared/functional/securable_resource.rb +1 -2
  310. data/spec/support/shared/functional/securable_resource_with_reporting.rb +0 -1
  311. data/spec/support/shared/functional/windows_script.rb +3 -3
  312. data/spec/support/shared/integration/knife_support.rb +2 -9
  313. data/spec/support/shared/unit/application_dot_d.rb +0 -1
  314. data/spec/support/shared/unit/execute_resource.rb +1 -1
  315. data/spec/support/shared/unit/provider/file.rb +12 -8
  316. data/spec/support/shared/unit/provider/useradd_based_user_provider.rb +4 -4
  317. data/spec/unit/application/solo_spec.rb +4 -2
  318. data/spec/unit/application_spec.rb +11 -2
  319. data/spec/unit/chef_fs/config_spec.rb +2 -2
  320. data/spec/unit/chef_fs/diff_spec.rb +8 -8
  321. data/spec/unit/chef_fs/file_system/operation_failed_error_spec.rb +2 -4
  322. data/spec/unit/chef_fs/{parallelizer.rb → parallelizer_spec.rb} +1 -1
  323. data/spec/unit/client_spec.rb +4 -1
  324. data/spec/unit/cookbook/gem_installer_spec.rb +2 -1
  325. data/spec/unit/cookbook/synchronizer_spec.rb +26 -24
  326. data/spec/unit/data_bag_spec.rb +6 -3
  327. data/spec/unit/data_collector_spec.rb +1 -1
  328. data/spec/unit/decorator_spec.rb +23 -23
  329. data/spec/unit/dsl/platform_introspection_spec.rb +1 -0
  330. data/spec/unit/environment_spec.rb +5 -1
  331. data/spec/unit/event_dispatch/dispatcher_spec.rb +3 -0
  332. data/spec/unit/guard_interpreter_spec.rb +1 -1
  333. data/spec/unit/http/api_versions_spec.rb +1 -1
  334. data/spec/unit/http/ssl_policies_spec.rb +20 -0
  335. data/spec/unit/json_compat_spec.rb +1 -1
  336. data/spec/unit/knife/bootstrap_spec.rb +5 -8
  337. data/spec/unit/knife/cookbook_download_spec.rb +2 -2
  338. data/spec/unit/knife/cookbook_show_spec.rb +6 -7
  339. data/spec/unit/knife/cookbook_upload_spec.rb +7 -10
  340. data/spec/unit/knife/core/windows_bootstrap_context_spec.rb +7 -1
  341. data/spec/unit/knife/data_bag_edit_spec.rb +1 -1
  342. data/spec/unit/log/syslog_spec.rb +6 -10
  343. data/spec/unit/log/winevt_spec.rb +21 -13
  344. data/spec/unit/lwrp_spec.rb +9 -6
  345. data/spec/unit/mixin/{path_sanity_spec.rb → default_paths_spec.rb} +14 -14
  346. data/spec/unit/mixin/openssl_helper_spec.rb +4 -4
  347. data/spec/unit/mixin/powershell_exec_spec.rb +1 -1
  348. data/spec/unit/mixin/powershell_out_spec.rb +2 -4
  349. data/spec/unit/mixin/powershell_type_coercions_spec.rb +1 -1
  350. data/spec/unit/mixin/securable_spec.rb +0 -1
  351. data/spec/unit/mixin/shell_out_spec.rb +25 -26
  352. data/spec/unit/mixin/subclass_directive_spec.rb +2 -2
  353. data/spec/unit/mixin/unformatter_spec.rb +2 -2
  354. data/spec/unit/mixin/uris_spec.rb +1 -1
  355. data/spec/unit/mixin/user_context_spec.rb +1 -9
  356. data/spec/unit/mixin/which.rb +8 -0
  357. data/spec/unit/node/attribute_spec.rb +1 -1
  358. data/spec/unit/node_spec.rb +98 -11
  359. data/spec/unit/property_spec.rb +6 -6
  360. data/spec/unit/provider/batch_spec.rb +130 -0
  361. data/spec/unit/provider/cron/unix_spec.rb +1 -1
  362. data/spec/unit/provider/cron_spec.rb +9 -49
  363. data/spec/unit/provider/dsc_resource_spec.rb +22 -38
  364. data/spec/unit/provider/dsc_script_spec.rb +10 -10
  365. data/spec/unit/provider/execute_spec.rb +1 -8
  366. data/spec/unit/provider/git_spec.rb +3 -3
  367. data/spec/unit/provider/group/groupadd_spec.rb +1 -1
  368. data/spec/unit/provider/ifconfig_spec.rb +0 -1
  369. data/spec/unit/provider/mdadm_spec.rb +1 -3
  370. data/spec/unit/provider/package/dnf/python_helper_spec.rb +1 -1
  371. data/spec/unit/provider/package/openbsd_spec.rb +1 -1
  372. data/spec/unit/provider/package/pacman_spec.rb +17 -20
  373. data/spec/unit/provider/package/portage_spec.rb +2 -2
  374. data/spec/unit/provider/package/powershell_spec.rb +96 -87
  375. data/spec/unit/provider/package/rubygems_spec.rb +5 -10
  376. data/spec/unit/provider/package/smartos_spec.rb +1 -1
  377. data/spec/unit/provider/package/snap_spec.rb +1 -1
  378. data/spec/unit/provider/package/windows/registry_uninstall_entry_spec.rb +3 -3
  379. data/spec/unit/provider/package/windows_spec.rb +30 -53
  380. data/spec/unit/provider/powershell_script_spec.rb +3 -45
  381. data/spec/unit/provider/script_spec.rb +20 -110
  382. data/spec/unit/provider/service/redhat_spec.rb +1 -1
  383. data/spec/unit/provider/service/windows_spec.rb +2 -6
  384. data/spec/unit/provider/systemd_unit_spec.rb +28 -24
  385. data/spec/unit/provider/user/dscl_spec.rb +2 -2
  386. data/spec/unit/provider/windows_env_spec.rb +5 -4
  387. data/spec/unit/provider/zypper_repository_spec.rb +60 -10
  388. data/spec/unit/provider_spec.rb +1 -0
  389. data/spec/unit/resource/archive_file_spec.rb +11 -2
  390. data/spec/unit/resource/chef_client_cron_spec.rb +23 -7
  391. data/spec/unit/resource/chef_client_scheduled_task_spec.rb +17 -7
  392. data/spec/unit/resource/chef_client_systemd_timer_spec.rb +7 -4
  393. data/spec/unit/resource/cron_spec.rb +2 -2
  394. data/spec/unit/resource/execute_spec.rb +10 -0
  395. data/spec/unit/resource/file/verification_spec.rb +2 -1
  396. data/spec/unit/resource/helpers/cron_validations_spec.rb +5 -1
  397. data/spec/unit/resource/homebrew_update_spec.rb +30 -0
  398. data/spec/unit/resource/macos_user_defaults_spec.rb +103 -2
  399. data/spec/unit/resource/powershell_script_spec.rb +10 -15
  400. data/spec/unit/resource/timezone_spec.rb +1 -1
  401. data/spec/unit/resource/windows_audit_policy_spec.rb +64 -0
  402. data/spec/unit/resource/windows_dns_record_spec.rb +3 -3
  403. data/spec/unit/resource/windows_dns_zone_spec.rb +2 -2
  404. data/spec/unit/resource/windows_firewall_profile_spec.rb +77 -0
  405. data/spec/unit/resource/windows_package_spec.rb +1 -0
  406. data/spec/unit/resource/windows_task_spec.rb +1 -1
  407. data/spec/unit/resource/windows_uac_spec.rb +2 -2
  408. data/spec/unit/resource/yum_repository_spec.rb +21 -21
  409. data/spec/unit/resource_reporter_spec.rb +1 -1
  410. data/spec/unit/resource_spec.rb +84 -1
  411. data/spec/unit/role_spec.rb +23 -21
  412. data/spec/unit/run_context/cookbook_compiler_spec.rb +1 -1
  413. data/spec/unit/run_lock_spec.rb +1 -1
  414. data/spec/unit/scan_access_control_spec.rb +1 -1
  415. data/spec/unit/util/backup_spec.rb +1 -1
  416. data/spec/unit/util/diff_spec.rb +1 -15
  417. data/spec/unit/util/dsc/configuration_generator_spec.rb +1 -1
  418. data/spec/unit/util/powershell/ps_credential_spec.rb +2 -2
  419. data/spec/unit/util/selinux_spec.rb +2 -1
  420. data/spec/unit/util/threaded_job_queue_spec.rb +9 -0
  421. data/spec/unit/win32/registry_spec.rb +1 -1
  422. data/spec/unit/win32/security_spec.rb +4 -3
  423. metadata +68 -40
  424. data/lib/chef/resource/cron.rb +0 -157
@@ -19,7 +19,7 @@
19
19
  # limitations under the License.
20
20
  #
21
21
 
22
- require_relative "../spec_helper"
22
+ require "spec_helper"
23
23
  require "chef/resource_reporter"
24
24
  require "socket"
25
25
 
@@ -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 Chef::Exceptions::ValidationFailed
381
+ expect { resource.to_text }.to_not raise_error
382
382
  end
383
383
  end
384
384
  end
@@ -492,6 +492,20 @@ describe Chef::Resource do
492
492
  expect(r.resource_name).to eq :blah
493
493
  expect(r.declared_type).to eq :d
494
494
  end
495
+
496
+ # This tests some somewhat confusing behavior that used to occur due to the resource_name call
497
+ # automatically wiring up the old canonical provides line.
498
+ it "setting resoure_name does not override provides in prior resource" do
499
+ c1 = Class.new(Chef::Resource) do
500
+ resource_name :self_resource_name_test_4
501
+ provides :self_resource_name_test_4
502
+ end
503
+ c2 = Class.new(Chef::Resource) do
504
+ resource_name :self_resource_name_test_4
505
+ provides(:self_resource_name_test_4) { false } # simulates any filter that does not match
506
+ end
507
+ expect(Chef::Resource.resource_for_node(:self_resource_name_test_4, node)).to eql(c1)
508
+ end
495
509
  end
496
510
 
497
511
  describe "to_json" do
@@ -1222,4 +1236,73 @@ describe Chef::Resource do
1222
1236
  expect(resource.tagged?("foo")).to be(false)
1223
1237
  end
1224
1238
  end
1239
+
1240
+ describe "#with_umask" do
1241
+ let(:resource) { Chef::Resource.new("testy testerson") }
1242
+ let!(:original_umask) { ::File.umask }
1243
+
1244
+ after do
1245
+ ::File.umask(original_umask)
1246
+ end
1247
+
1248
+ it "does not affect the umask by default" do
1249
+ block_value = nil
1250
+
1251
+ resource.with_umask do
1252
+ block_value = ::File.umask
1253
+ end
1254
+
1255
+ expect(block_value).to eq(original_umask)
1256
+ end
1257
+
1258
+ if windows?
1259
+ it "is a no-op on Windows" do
1260
+ resource.umask = "0123"
1261
+
1262
+ block_value = nil
1263
+
1264
+ resource.with_umask do
1265
+ block_value = ::File.umask
1266
+ end
1267
+
1268
+ # Format the returned value so a potential error message is easier to understand.
1269
+ actual_value = block_value.to_s(8).rjust(4, "0")
1270
+
1271
+ expect(actual_value).to eq("0000")
1272
+ end
1273
+ else
1274
+ it "changes the umask in the block to the set value" do
1275
+ resource.umask = "0123"
1276
+
1277
+ block_value = nil
1278
+
1279
+ resource.with_umask do
1280
+ block_value = ::File.umask
1281
+ end
1282
+
1283
+ # Format the returned value so a potential error message is easier to understand.
1284
+ actual_value = block_value.to_s(8).rjust(4, "0")
1285
+
1286
+ expect(actual_value).to eq("0123")
1287
+ end
1288
+ end
1289
+
1290
+ it "resets the umask afterwards" do
1291
+ resource.umask = "0123"
1292
+
1293
+ resource.with_umask do
1294
+ "noop"
1295
+ end
1296
+
1297
+ expect(::File.umask).to eq(original_umask)
1298
+ end
1299
+
1300
+ it "resets the umask if the block raises an error" do
1301
+ resource.umask = "0123"
1302
+
1303
+ expect { resource.with_umask { 1 / 0 } }.to raise_error(ZeroDivisionError)
1304
+
1305
+ expect(::File.umask).to eq(original_umask)
1306
+ end
1307
+ end
1225
1308
  end
@@ -310,50 +310,52 @@ describe Chef::Role do
310
310
  describe "when loading from disk and role_path is an array" do
311
311
 
312
312
  before(:each) do
313
- Chef::Config[:role_path] = ["/path1", "/path/path2"]
313
+ Chef::Config[:role_path] = ["/path1", "/path1/path2"]
314
314
  end
315
315
 
316
+ let(:root) { windows? ? "C:/path1" : "/path1" }
317
+
316
318
  it "should return a Chef::Role object from JSON" do
317
- expect(Dir).to receive(:glob).with(File.join("/path1", "**", "**")).exactly(1).times.and_return(["/path1/lolcat.json"])
318
- expect(File).to receive(:exists?).with("/path1/lolcat.json").exactly(1).times.and_return(true)
319
- expect(IO).to receive(:read).with("/path1/lolcat.json").and_return('{"name": "ceiling_cat", "json_class": "Chef::Role" }')
319
+ expect(Dir).to receive(:glob).with(File.join(root, "**", "**")).exactly(1).times.and_return(["#{root}/lolcat.json"])
320
+ expect(File).to receive(:exists?).with("#{root}/lolcat.json").exactly(1).times.and_return(true)
321
+ expect(IO).to receive(:read).with("#{root}/lolcat.json").and_return('{"name": "ceiling_cat", "json_class": "Chef::Role" }')
320
322
  expect(@role).to be_a_kind_of(Chef::Role)
321
323
  @role.class.from_disk("lolcat")
322
324
  end
323
325
 
324
326
  it "should return a Chef::Role object from JSON when role is in the second path" do
325
- expect(Dir).to receive(:glob).with(File.join("/path1", "**", "**")).exactly(1).times.and_return([])
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(:exists?).with("/path/path2/lolcat.json").exactly(1).times.and_return(true)
328
- expect(IO).to receive(:read).with("/path/path2/lolcat.json").and_return('{"name": "ceiling_cat", "json_class": "Chef::Role" }')
327
+ expect(Dir).to receive(:glob).with(File.join(root, "**", "**")).exactly(1).times.and_return([])
328
+ expect(Dir).to receive(:glob).with(File.join("#{root}/path2", "**", "**")).exactly(1).times.and_return(["#{root}/path2/lolcat.json"])
329
+ expect(File).to receive(:exists?).with("#{root}/path2/lolcat.json").exactly(1).times.and_return(true)
330
+ expect(IO).to receive(:read).with("#{root}/path2/lolcat.json").and_return('{"name": "ceiling_cat", "json_class": "Chef::Role" }')
329
331
  expect(@role).to be_a_kind_of(Chef::Role)
330
332
  @role.class.from_disk("lolcat")
331
333
  end
332
334
 
333
335
  it "should return a Chef::Role object from a Ruby DSL" do
334
- expect(Dir).to receive(:glob).with(File.join("/path1", "**", "**")).exactly(1).times.and_return(["/path1/lolcat.rb"])
335
- expect(File).to receive(:exists?).with("/path1/lolcat.rb").exactly(1).times.and_return(true)
336
- expect(File).to receive(:readable?).with("/path1/lolcat.rb").and_return(true)
337
- expect(File).to receive(:file?).with("/path1/lolcat.rb").and_return(true)
338
- expect(IO).to receive(:read).with("/path1/lolcat.rb").exactly(1).times.and_return(ROLE_DSL)
336
+ expect(Dir).to receive(:glob).with(File.join(root, "**", "**")).exactly(1).times.and_return(["#{root}/lolcat.rb"])
337
+ expect(File).to receive(:exists?).with("#{root}/lolcat.rb").exactly(1).times.and_return(true)
338
+ expect(File).to receive(:readable?).with("#{root}/lolcat.rb").and_return(true)
339
+ expect(File).to receive(:file?).with("#{root}/lolcat.rb").and_return(true)
340
+ expect(IO).to receive(:read).with("#{root}/lolcat.rb").exactly(1).times.and_return(ROLE_DSL)
339
341
  expect(@role).to be_a_kind_of(Chef::Role)
340
342
  @role.class.from_disk("lolcat")
341
343
  end
342
344
 
343
345
  it "should return a Chef::Role object from a Ruby DSL when role is in the second path" do
344
- expect(Dir).to receive(:glob).with(File.join("/path1", "**", "**")).exactly(1).times.and_return([])
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(:exists?).with("/path/path2/lolcat.rb").exactly(1).times.and_return(true)
347
- expect(File).to receive(:readable?).with("/path/path2/lolcat.rb").and_return(true)
348
- expect(File).to receive(:file?).with("/path/path2/lolcat.rb").and_return(true)
349
- expect(IO).to receive(:read).with("/path/path2/lolcat.rb").exactly(1).times.and_return(ROLE_DSL)
346
+ expect(Dir).to receive(:glob).with(File.join(root, "**", "**")).exactly(1).times.and_return([])
347
+ expect(Dir).to receive(:glob).with(File.join("#{root}/path2", "**", "**")).exactly(1).times.and_return(["#{root}/path2/lolcat.rb"])
348
+ expect(File).to receive(:exists?).with("#{root}/path2/lolcat.rb").exactly(1).times.and_return(true)
349
+ expect(File).to receive(:readable?).with("#{root}/path2/lolcat.rb").and_return(true)
350
+ expect(File).to receive(:file?).with("#{root}/path2/lolcat.rb").and_return(true)
351
+ expect(IO).to receive(:read).with("#{root}/path2/lolcat.rb").exactly(1).times.and_return(ROLE_DSL)
350
352
  expect(@role).to be_a_kind_of(Chef::Role)
351
353
  @role.class.from_disk("lolcat")
352
354
  end
353
355
 
354
356
  it "should raise an exception if the file does not exist" do
355
- expect(Dir).to receive(:glob).with(File.join("/path1", "**", "**")).exactly(1).times.and_return([])
356
- expect(Dir).to receive(:glob).with(File.join("/path/path2", "**", "**")).exactly(1).times.and_return([])
357
+ expect(Dir).to receive(:glob).with(File.join(root, "**", "**")).exactly(1).times.and_return([])
358
+ expect(Dir).to receive(:glob).with(File.join("#{root}/path2", "**", "**")).exactly(1).times.and_return([])
357
359
  expect { @role.class.from_disk("lolcat") }.to raise_error(Chef::Exceptions::RoleNotFound)
358
360
  end
359
361
 
@@ -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", __FILE__)
178
+ File.expand_path("../../data/run_context/cookbooks/dependency1/recipes/default.rb", __dir__)
179
179
  end
180
180
  before do
181
181
  node.run_list(recipe)
@@ -15,7 +15,7 @@
15
15
  # See the License for the specific language governing permissions and
16
16
  # limitations under the License.
17
17
 
18
- require_relative "../spec_helper"
18
+ require "spec_helper"
19
19
  require "chef/client"
20
20
 
21
21
  describe Chef::RunLock do
@@ -15,7 +15,7 @@
15
15
  # limitations under the License.
16
16
  #
17
17
 
18
- require_relative "../spec_helper"
18
+ require "spec_helper"
19
19
  require "chef/scan_access_control"
20
20
 
21
21
  describe Chef::ScanAccessControl do
@@ -21,7 +21,7 @@ require "tmpdir"
21
21
 
22
22
  describe Chef::Util::Backup do
23
23
 
24
- let (:tempfile) do
24
+ let(:tempfile) do
25
25
  Tempfile.new("chef-util-backup-spec-test")
26
26
  end
27
27
 
@@ -61,10 +61,6 @@ shared_examples_for "a diff util" do
61
61
  Chef::Config[:diff_disabled] = true
62
62
  end
63
63
 
64
- after do
65
- Chef::Config[:diff_disabled] = false
66
- end
67
-
68
64
  it "calling for_output should return the error message" do
69
65
  expect(differ.for_output).to eql( [ "(diff output suppressed by config)" ] )
70
66
  end
@@ -300,14 +296,9 @@ shared_examples_for "a diff util" do
300
296
 
301
297
  describe "when testing the diff_filesize_threshold" do
302
298
  before do
303
- @diff_filesize_threshold_saved = Chef::Config[:diff_filesize_threshold]
304
299
  Chef::Config[:diff_filesize_threshold] = 10
305
300
  end
306
301
 
307
- after do
308
- Chef::Config[:diff_filesize_threshold] = @diff_filesize_threshold_saved
309
- end
310
-
311
302
  describe "when the old_file goes over the threshold" do
312
303
  before do
313
304
  old_tempfile.write("But thats what you get when Wu-Tang raised you")
@@ -359,14 +350,9 @@ shared_examples_for "a diff util" do
359
350
  describe "when the diff output is too long" do
360
351
 
361
352
  before do
362
- @diff_output_threshold_saved = Chef::Config[:diff_output_threshold]
363
353
  Chef::Config[:diff_output_threshold] = 10
364
354
  end
365
355
 
366
- after do
367
- Chef::Config[:diff_output_threshold] = @diff_output_threshold_saved
368
- end
369
-
370
356
  it "calling for_output should return the error message" do
371
357
  expect(differ.for_output).to eql(["(long diff of over 10 characters, diff output suppressed)"])
372
358
  end
@@ -546,7 +532,7 @@ shared_examples_for "a diff util" do
546
532
 
547
533
  end
548
534
 
549
- describe Chef::Util::Diff, uses_diff: true do
535
+ describe Chef::Util::Diff do
550
536
  let!(:old_file) { old_tempfile.path }
551
537
  let!(:new_file) { new_tempfile.path }
552
538
 
@@ -161,7 +161,7 @@ describe Chef::Util::DSC::ConfigurationGenerator do
161
161
  dsc = conf_man.send(:configuration_code, "archive{}", "hello", {})
162
162
  found_configuration = false
163
163
  dsc.split(";").each do |command|
164
- if command.downcase =~ /\s*configuration\s+'hello'\s*\{\s*node\s+'localhost'\s*\{\s*archive\s*\{\s*\}\s*\}\s*\}\s*/
164
+ if /\s*configuration\s+'hello'\s*\{\s*node\s+'localhost'\s*\{\s*archive\s*\{\s*\}\s*\}\s*\}\s*/.match?(command.downcase)
165
165
  found_configuration = true
166
166
  end
167
167
  end
@@ -20,8 +20,8 @@ require "chef"
20
20
  require "chef/util/powershell/ps_credential"
21
21
 
22
22
  describe Chef::Util::Powershell::PSCredential do
23
- let (:username) { "foo" }
24
- let (:password) { "ThIsIsThEpAsSwOrD" }
23
+ let(:username) { "foo" }
24
+ let(:password) { "ThIsIsThEpAsSwOrD" }
25
25
 
26
26
  context "when username and password are provided" do
27
27
  let(:ps_credential) { Chef::Util::Powershell::PSCredential.new(username, password) }
@@ -30,6 +30,7 @@ describe Chef::Util::Selinux do
30
30
  end
31
31
 
32
32
  before do
33
+ allow(ChefUtils).to receive(:windows?).and_return(false)
33
34
  TestClass.reset_state
34
35
  @test_instance = TestClass.new
35
36
  end
@@ -113,7 +114,7 @@ describe Chef::Util::Selinux do
113
114
  end
114
115
 
115
116
  describe "when restorecon binary exists on the system" do
116
- let (:path) { "/path/to/awesome directory" }
117
+ let(:path) { "/path/to/awesome directory" }
117
118
 
118
119
  before do
119
120
  @restorecon_enabled_path = File.join("/sbin", "restorecon")
@@ -21,6 +21,15 @@ 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
+
24
33
  it "should pass mutex to jobs with an arity of 1" do
25
34
  job = double
26
35
  expect(job).to receive(:arity).at_least(:once).and_return(1)
@@ -30,7 +30,7 @@ describe Chef::Win32::Registry do
30
30
  let(:sub_key) { "OpscodePrimes" }
31
31
  let(:missing_key_path) { 'HKCU\Software' }
32
32
  let(:registry) { Chef::Win32::Registry.new }
33
- let(:hive_mock) { double("::Win32::Registry::KHKEY_CURRENT_USER") }
33
+ let(:hive_mock) { double("::Win32::Registry::HKEY_CURRENT_USER") }
34
34
  let(:reg_mock) { double("reg") }
35
35
 
36
36
  before(:all) do
@@ -81,9 +81,10 @@ 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
- allow(Chef::ReservedNames::Win32::Security).to receive(:open_current_process_token)
85
- token = Chef::ReservedNames::Win32::Security.open_current_process_token
84
+ token = double(:process_token)
86
85
  allow(token).to receive_message_chain(:handle, :handle)
86
+
87
+ allow(Chef::ReservedNames::Win32::Security).to receive(:open_current_process_token).and_return(token)
87
88
  allow(Chef::ReservedNames::Win32::Security).to receive(:get_token_information_elevation_type)
88
89
  allow(Chef::ReservedNames::Win32::Security).to receive(:GetTokenInformation).and_return(true)
89
90
  allow_any_instance_of(FFI::Buffer).to receive(:read_ulong).and_return(1)
@@ -128,7 +129,7 @@ describe "Chef::Win32::Security", :windows_only do
128
129
  context "when FFI::LastError.error result is not ERROR_INSUFFICIENT_BUFFER and not NO_ERROR" do
129
130
  it "raises Chef::ReservedNames::Win32::Error.raise! exception" do
130
131
  expect(FFI::LastError).to receive(:error).and_return(123).at_least(:once)
131
- expect { security_class.lookup_account_name "system" }.to raise_error
132
+ expect { security_class.lookup_account_name "system" }.to raise_error(Chef::Exceptions::Win32APIError)
132
133
  end
133
134
  end
134
135
  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: 16.1.0
4
+ version: 16.3.38
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: 2020-05-15 00:00:00.000000000 Z
11
+ date: 2020-07-25 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: 16.1.0
19
+ version: 16.3.38
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: 16.1.0
26
+ version: 16.3.38
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: 16.1.0
33
+ version: 16.3.38
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: 16.1.0
40
+ version: 16.3.38
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: train-core
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -158,7 +158,7 @@ dependencies:
158
158
  requirements:
159
159
  - - ">="
160
160
  - !ruby/object:Gem::Version
161
- version: 3.0.3
161
+ version: 3.1.1
162
162
  - - "<"
163
163
  - !ruby/object:Gem::Version
164
164
  version: '4.0'
@@ -168,7 +168,7 @@ dependencies:
168
168
  requirements:
169
169
  - - ">="
170
170
  - !ruby/object:Gem::Version
171
- version: 3.0.3
171
+ version: 3.1.1
172
172
  - - "<"
173
173
  - !ruby/object:Gem::Version
174
174
  version: '4.0'
@@ -210,9 +210,6 @@ dependencies:
210
210
  name: ffi
211
211
  requirement: !ruby/object:Gem::Requirement
212
212
  requirements:
213
- - - "~>"
214
- - !ruby/object:Gem::Version
215
- version: '1.9'
216
213
  - - ">="
217
214
  - !ruby/object:Gem::Version
218
215
  version: 1.9.25
@@ -220,9 +217,6 @@ dependencies:
220
217
  prerelease: false
221
218
  version_requirements: !ruby/object:Gem::Requirement
222
219
  requirements:
223
- - - "~>"
224
- - !ruby/object:Gem::Version
225
- version: '1.9'
226
220
  - - ">="
227
221
  - !ruby/object:Gem::Version
228
222
  version: 1.9.25
@@ -249,7 +243,7 @@ dependencies:
249
243
  version: '4.2'
250
244
  - - "<"
251
245
  - !ruby/object:Gem::Version
252
- version: '6'
246
+ version: '7'
253
247
  type: :runtime
254
248
  prerelease: false
255
249
  version_requirements: !ruby/object:Gem::Requirement
@@ -259,7 +253,7 @@ dependencies:
259
253
  version: '4.2'
260
254
  - - "<"
261
255
  - !ruby/object:Gem::Version
262
- version: '6'
256
+ version: '7'
263
257
  - !ruby/object:Gem::Dependency
264
258
  name: net-ssh-multi
265
259
  requirement: !ruby/object:Gem::Requirement
@@ -284,22 +278,22 @@ dependencies:
284
278
  name: net-sftp
285
279
  requirement: !ruby/object:Gem::Requirement
286
280
  requirements:
287
- - - "~>"
288
- - !ruby/object:Gem::Version
289
- version: '2.1'
290
281
  - - ">="
291
282
  - !ruby/object:Gem::Version
292
283
  version: 2.1.2
284
+ - - "<"
285
+ - !ruby/object:Gem::Version
286
+ version: '4.0'
293
287
  type: :runtime
294
288
  prerelease: false
295
289
  version_requirements: !ruby/object:Gem::Requirement
296
290
  requirements:
297
- - - "~>"
298
- - !ruby/object:Gem::Version
299
- version: '2.1'
300
291
  - - ">="
301
292
  - !ruby/object:Gem::Version
302
293
  version: 2.1.2
294
+ - - "<"
295
+ - !ruby/object:Gem::Version
296
+ version: '4.0'
303
297
  - !ruby/object:Gem::Dependency
304
298
  name: ed25519
305
299
  requirement: !ruby/object:Gem::Requirement
@@ -348,6 +342,20 @@ dependencies:
348
342
  - - "<"
349
343
  - !ruby/object:Gem::Version
350
344
  version: '3'
345
+ - !ruby/object:Gem::Dependency
346
+ name: tty-prompt
347
+ requirement: !ruby/object:Gem::Requirement
348
+ requirements:
349
+ - - "~>"
350
+ - !ruby/object:Gem::Version
351
+ version: '0.21'
352
+ type: :runtime
353
+ prerelease: false
354
+ version_requirements: !ruby/object:Gem::Requirement
355
+ requirements:
356
+ - - "~>"
357
+ - !ruby/object:Gem::Version
358
+ version: '0.21'
351
359
  - !ruby/object:Gem::Dependency
352
360
  name: tty-screen
353
361
  requirement: !ruby/object:Gem::Requirement
@@ -394,36 +402,42 @@ dependencies:
394
402
  name: diff-lcs
395
403
  requirement: !ruby/object:Gem::Requirement
396
404
  requirements:
397
- - - "~>"
398
- - !ruby/object:Gem::Version
399
- version: '1.2'
400
405
  - - ">="
401
406
  - !ruby/object:Gem::Version
402
407
  version: 1.2.4
408
+ - - "<"
409
+ - !ruby/object:Gem::Version
410
+ version: 1.4.0
403
411
  type: :runtime
404
412
  prerelease: false
405
413
  version_requirements: !ruby/object:Gem::Requirement
406
414
  requirements:
407
- - - "~>"
408
- - !ruby/object:Gem::Version
409
- version: '1.2'
410
415
  - - ">="
411
416
  - !ruby/object:Gem::Version
412
417
  version: 1.2.4
418
+ - - "<"
419
+ - !ruby/object:Gem::Version
420
+ version: 1.4.0
413
421
  - !ruby/object:Gem::Dependency
414
422
  name: ffi-libarchive
415
423
  requirement: !ruby/object:Gem::Requirement
416
424
  requirements:
425
+ - - "~>"
426
+ - !ruby/object:Gem::Version
427
+ version: '1.0'
417
428
  - - ">="
418
429
  - !ruby/object:Gem::Version
419
- version: '0'
430
+ version: 1.0.3
420
431
  type: :runtime
421
432
  prerelease: false
422
433
  version_requirements: !ruby/object:Gem::Requirement
423
434
  requirements:
435
+ - - "~>"
436
+ - !ruby/object:Gem::Version
437
+ version: '1.0'
424
438
  - - ">="
425
439
  - !ruby/object:Gem::Version
426
- version: '0'
440
+ version: 1.0.3
427
441
  - !ruby/object:Gem::Dependency
428
442
  name: chef-zero
429
443
  requirement: !ruby/object:Gem::Requirement
@@ -700,16 +714,22 @@ dependencies:
700
714
  name: iso8601
701
715
  requirement: !ruby/object:Gem::Requirement
702
716
  requirements:
703
- - - "~>"
717
+ - - ">="
704
718
  - !ruby/object:Gem::Version
705
719
  version: 0.12.1
720
+ - - "<"
721
+ - !ruby/object:Gem::Version
722
+ version: '0.14'
706
723
  type: :runtime
707
724
  prerelease: false
708
725
  version_requirements: !ruby/object:Gem::Requirement
709
726
  requirements:
710
- - - "~>"
727
+ - - ">="
711
728
  - !ruby/object:Gem::Version
712
729
  version: 0.12.1
730
+ - - "<"
731
+ - !ruby/object:Gem::Version
732
+ version: '0.14'
713
733
  - !ruby/object:Gem::Dependency
714
734
  name: win32-certstore
715
735
  requirement: !ruby/object:Gem::Requirement
@@ -766,7 +786,8 @@ files:
766
786
  - lib/chef/application/windows_service.rb
767
787
  - lib/chef/application/windows_service_manager.rb
768
788
  - lib/chef/applications.rb
769
- - lib/chef/blacklist.rb
789
+ - lib/chef/attribute_allowlist.rb
790
+ - lib/chef/attribute_blocklist.rb
770
791
  - lib/chef/chef_class.rb
771
792
  - lib/chef/chef_fs.rb
772
793
  - lib/chef/chef_fs/chef_fs_data_store.rb
@@ -1158,9 +1179,11 @@ files:
1158
1179
  - lib/chef/mash.rb
1159
1180
  - lib/chef/mixin/api_version_request_handling.rb
1160
1181
  - lib/chef/mixin/checksum.rb
1182
+ - lib/chef/mixin/chef_utils_wiring.rb
1161
1183
  - lib/chef/mixin/convert_to_class_name.rb
1162
1184
  - lib/chef/mixin/create_path.rb
1163
1185
  - lib/chef/mixin/deep_merge.rb
1186
+ - lib/chef/mixin/default_paths.rb
1164
1187
  - lib/chef/mixin/deprecation.rb
1165
1188
  - lib/chef/mixin/descendants_tracker.rb
1166
1189
  - lib/chef/mixin/enforce_ownership_and_permissions.rb
@@ -1406,9 +1429,10 @@ files:
1406
1429
  - lib/chef/resource/conditional.rb
1407
1430
  - lib/chef/resource/conditional_action_not_nothing.rb
1408
1431
  - lib/chef/resource/cookbook_file.rb
1409
- - lib/chef/resource/cron.rb
1432
+ - lib/chef/resource/cron/_cron_shared.rb
1433
+ - lib/chef/resource/cron/cron.rb
1434
+ - lib/chef/resource/cron/cron_d.rb
1410
1435
  - lib/chef/resource/cron_access.rb
1411
- - lib/chef/resource/cron_d.rb
1412
1436
  - lib/chef/resource/csh.rb
1413
1437
  - lib/chef/resource/directory.rb
1414
1438
  - lib/chef/resource/dmg_package.rb
@@ -1427,6 +1451,7 @@ files:
1427
1451
  - lib/chef/resource/homebrew_cask.rb
1428
1452
  - lib/chef/resource/homebrew_package.rb
1429
1453
  - lib/chef/resource/homebrew_tap.rb
1454
+ - lib/chef/resource/homebrew_update.rb
1430
1455
  - lib/chef/resource/hostname.rb
1431
1456
  - lib/chef/resource/http_request.rb
1432
1457
  - lib/chef/resource/ifconfig.rb
@@ -1512,6 +1537,7 @@ files:
1512
1537
  - lib/chef/resource/user_ulimit.rb
1513
1538
  - lib/chef/resource/whyrun_safe_ruby_block.rb
1514
1539
  - lib/chef/resource/windows_ad_join.rb
1540
+ - lib/chef/resource/windows_audit_policy.rb
1515
1541
  - lib/chef/resource/windows_auto_run.rb
1516
1542
  - lib/chef/resource/windows_certificate.rb
1517
1543
  - lib/chef/resource/windows_dfs_folder.rb
@@ -1523,6 +1549,7 @@ files:
1523
1549
  - lib/chef/resource/windows_feature.rb
1524
1550
  - lib/chef/resource/windows_feature_dism.rb
1525
1551
  - lib/chef/resource/windows_feature_powershell.rb
1552
+ - lib/chef/resource/windows_firewall_profile.rb
1526
1553
  - lib/chef/resource/windows_firewall_rule.rb
1527
1554
  - lib/chef/resource/windows_font.rb
1528
1555
  - lib/chef/resource/windows_package.rb
@@ -1604,7 +1631,6 @@ files:
1604
1631
  - lib/chef/version_constraint.rb
1605
1632
  - lib/chef/version_constraint/platform.rb
1606
1633
  - lib/chef/version_string.rb
1607
- - lib/chef/whitelist.rb
1608
1634
  - lib/chef/win32/api.rb
1609
1635
  - lib/chef/win32/api/command_line_helper.rb
1610
1636
  - lib/chef/win32/api/crypto.rb
@@ -2083,7 +2109,6 @@ files:
2083
2109
  - spec/functional/resource/aix_service_spec.rb
2084
2110
  - spec/functional/resource/aixinit_service_spec.rb
2085
2111
  - spec/functional/resource/apt_package_spec.rb
2086
- - spec/functional/resource/base.rb
2087
2112
  - spec/functional/resource/bash_spec.rb
2088
2113
  - spec/functional/resource/batch_spec.rb
2089
2114
  - spec/functional/resource/bff_spec.rb
@@ -2306,7 +2331,7 @@ files:
2306
2331
  - spec/unit/chef_fs/file_system/repository/base_file_spec.rb
2307
2332
  - spec/unit/chef_fs/file_system/repository/directory_spec.rb
2308
2333
  - spec/unit/chef_fs/file_system_spec.rb
2309
- - spec/unit/chef_fs/parallelizer.rb
2334
+ - spec/unit/chef_fs/parallelizer_spec.rb
2310
2335
  - spec/unit/chef_fs/path_util_spec.rb
2311
2336
  - spec/unit/chef_spec.rb
2312
2337
  - spec/unit/client_spec.rb
@@ -2483,19 +2508,18 @@ files:
2483
2508
  - spec/unit/knife_spec.rb
2484
2509
  - spec/unit/log/syslog_spec.rb
2485
2510
  - spec/unit/log/winevt_spec.rb
2486
- - spec/unit/log_spec.rb
2487
2511
  - spec/unit/lwrp_spec.rb
2488
2512
  - spec/unit/mixin/api_version_request_handling_spec.rb
2489
2513
  - spec/unit/mixin/checksum_spec.rb
2490
2514
  - spec/unit/mixin/convert_to_class_name_spec.rb
2491
2515
  - spec/unit/mixin/deep_merge_spec.rb
2516
+ - spec/unit/mixin/default_paths_spec.rb
2492
2517
  - spec/unit/mixin/deprecation_spec.rb
2493
2518
  - spec/unit/mixin/enforce_ownership_and_permissions_spec.rb
2494
2519
  - spec/unit/mixin/homebrew_user_spec.rb
2495
2520
  - spec/unit/mixin/lazy_module_include.rb
2496
2521
  - spec/unit/mixin/openssl_helper_spec.rb
2497
2522
  - spec/unit/mixin/params_validate_spec.rb
2498
- - spec/unit/mixin/path_sanity_spec.rb
2499
2523
  - spec/unit/mixin/powershell_exec_spec.rb
2500
2524
  - spec/unit/mixin/powershell_out_spec.rb
2501
2525
  - spec/unit/mixin/powershell_type_coercions_spec.rb
@@ -2531,6 +2555,7 @@ files:
2531
2555
  - spec/unit/provider/apt_preference_spec.rb
2532
2556
  - spec/unit/provider/apt_repository_spec.rb
2533
2557
  - spec/unit/provider/apt_update_spec.rb
2558
+ - spec/unit/provider/batch_spec.rb
2534
2559
  - spec/unit/provider/cookbook_file/content_spec.rb
2535
2560
  - spec/unit/provider/cookbook_file_spec.rb
2536
2561
  - spec/unit/provider/cron/unix_spec.rb
@@ -2702,6 +2727,7 @@ files:
2702
2727
  - spec/unit/resource/homebrew_cask_spec.rb
2703
2728
  - spec/unit/resource/homebrew_package_spec.rb
2704
2729
  - spec/unit/resource/homebrew_tap_spec.rb
2730
+ - spec/unit/resource/homebrew_update_spec.rb
2705
2731
  - spec/unit/resource/hostname_spec.rb
2706
2732
  - spec/unit/resource/http_request_spec.rb
2707
2733
  - spec/unit/resource/ifconfig_spec.rb
@@ -2773,6 +2799,7 @@ files:
2773
2799
  - spec/unit/resource/user_spec.rb
2774
2800
  - spec/unit/resource/user_ulimit_spec.rb
2775
2801
  - spec/unit/resource/windows_ad_join_spec.rb
2802
+ - spec/unit/resource/windows_audit_policy_spec.rb
2776
2803
  - spec/unit/resource/windows_auto_run_spec.rb
2777
2804
  - spec/unit/resource/windows_certificate_spec.rb
2778
2805
  - spec/unit/resource/windows_dfs_folder_spec.rb
@@ -2784,6 +2811,7 @@ files:
2784
2811
  - spec/unit/resource/windows_feature_dism_spec.rb
2785
2812
  - spec/unit/resource/windows_feature_powershell_spec.rb
2786
2813
  - spec/unit/resource/windows_feature_spec.rb
2814
+ - spec/unit/resource/windows_firewall_profile_spec.rb
2787
2815
  - spec/unit/resource/windows_firewall_rule_spec.rb
2788
2816
  - spec/unit/resource/windows_font_spec.rb
2789
2817
  - spec/unit/resource/windows_package_spec.rb