chef 15.17.4 → 16.0.257
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +14 -20
- data/README.md +6 -6
- data/Rakefile +18 -23
- data/chef-universal-mingw32.gemspec +4 -4
- data/chef.gemspec +10 -26
- data/lib/chef/action_collection.rb +16 -5
- data/lib/chef/api_client/registration.rb +2 -2
- data/lib/chef/application.rb +33 -54
- data/lib/chef/application/apply.rb +20 -3
- data/lib/chef/application/base.rb +8 -3
- data/lib/chef/application/exit_code.rb +2 -2
- data/lib/chef/application/knife.rb +1 -1
- data/lib/chef/chef_class.rb +4 -4
- data/lib/chef/chef_fs/chef_fs_data_store.rb +3 -3
- data/lib/chef/chef_fs/file_system/chef_server/policies_dir.rb +1 -1
- data/lib/chef/chef_fs/file_system/chef_server/rest_list_dir.rb +1 -1
- data/lib/chef/chef_fs/file_system/chef_server/rest_list_entry.rb +6 -2
- data/lib/chef/chef_fs/file_system/multiplexed_dir.rb +1 -1
- data/lib/chef/chef_fs/file_system/repository/base_file.rb +0 -1
- data/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_dir.rb +2 -2
- data/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_entry.rb +1 -1
- data/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_root_dir.rb +5 -5
- data/lib/chef/chef_fs/file_system/repository/directory.rb +1 -1
- data/lib/chef/chef_fs/file_system/repository/file_system_entry.rb +1 -1
- data/lib/chef/chef_fs/path_utils.rb +3 -3
- data/lib/chef/client.rb +16 -14
- data/lib/chef/config.rb +1 -1
- data/lib/chef/cookbook/file_system_file_vendor.rb +1 -1
- data/lib/chef/cookbook/gem_installer.rb +1 -1
- data/lib/chef/cookbook/metadata.rb +45 -22
- data/lib/chef/cookbook_version.rb +40 -5
- data/lib/chef/data_bag.rb +2 -2
- data/lib/chef/data_collector/error_handlers.rb +1 -1
- data/lib/chef/data_collector/run_end_message.rb +7 -1
- data/lib/chef/deprecated.rb +1 -9
- data/lib/chef/dist.rb +8 -0
- data/lib/chef/dsl/chef_vault.rb +84 -0
- data/lib/chef/dsl/declare_resource.rb +7 -5
- data/lib/chef/dsl/platform_introspection.rb +2 -3
- data/lib/chef/dsl/recipe.rb +7 -12
- data/lib/chef/dsl/universal.rb +3 -7
- data/lib/chef/environment.rb +2 -2
- data/lib/chef/event_dispatch/base.rb +3 -0
- data/lib/chef/exceptions.rb +0 -3
- data/lib/chef/formatters/doc.rb +1 -1
- data/lib/chef/formatters/error_inspectors/node_load_error_inspector.rb +2 -2
- data/lib/chef/formatters/error_inspectors/registration_error_inspector.rb +7 -7
- data/lib/chef/formatters/indentable_output_stream.rb +7 -16
- data/lib/chef/http.rb +1 -2
- data/lib/chef/http/http_request.rb +3 -2
- data/lib/chef/knife.rb +1 -3
- data/lib/chef/knife/acl_add.rb +57 -0
- data/lib/chef/knife/acl_base.rb +183 -0
- data/lib/chef/knife/acl_bulk_add.rb +78 -0
- data/lib/chef/knife/acl_bulk_remove.rb +83 -0
- data/lib/chef/knife/acl_remove.rb +62 -0
- data/lib/chef/knife/acl_show.rb +56 -0
- data/lib/chef/knife/bootstrap.rb +93 -97
- data/lib/chef/knife/bootstrap/chef_vault_handler.rb +1 -1
- data/lib/chef/knife/bootstrap/client_builder.rb +1 -1
- data/lib/chef/knife/bootstrap/templates/chef-full.erb +20 -20
- data/lib/chef/knife/bootstrap/templates/windows-chef-client-msi.erb +13 -15
- data/lib/chef/knife/bootstrap/train_connector.rb +0 -1
- data/lib/chef/knife/cookbook_download.rb +1 -1
- data/lib/chef/knife/cookbook_metadata.rb +1 -1
- data/lib/chef/knife/core/bootstrap_context.rb +63 -60
- data/lib/chef/knife/core/gem_glob_loader.rb +1 -1
- data/lib/chef/knife/core/generic_presenter.rb +4 -3
- data/lib/chef/knife/core/hashed_command_loader.rb +2 -3
- data/lib/chef/knife/core/node_presenter.rb +2 -2
- data/lib/chef/knife/core/status_presenter.rb +5 -5
- data/lib/chef/knife/core/subcommand_loader.rb +1 -1
- data/lib/chef/knife/core/ui.rb +17 -1
- data/lib/chef/knife/core/windows_bootstrap_context.rb +45 -58
- data/lib/chef/knife/data_bag_secret_options.rb +18 -45
- data/lib/chef/knife/environment_compare.rb +1 -1
- data/lib/chef/knife/exec.rb +2 -2
- data/lib/chef/knife/group_add.rb +55 -0
- data/lib/chef/knife/{cookbook_site_download.rb → group_create.rb} +21 -12
- data/lib/chef/knife/group_destroy.rb +53 -0
- data/lib/chef/knife/{cookbook_site_list.rb → group_list.rb} +14 -11
- data/lib/chef/knife/group_remove.rb +56 -0
- data/lib/chef/knife/{cookbook_site_install.rb → group_show.rb} +21 -12
- data/lib/chef/knife/list.rb +1 -1
- data/lib/chef/knife/ssh.rb +12 -50
- data/lib/chef/knife/status.rb +3 -3
- data/lib/chef/knife/supermarket_download.rb +1 -2
- data/lib/chef/knife/supermarket_install.rb +1 -2
- data/lib/chef/knife/supermarket_list.rb +1 -2
- data/lib/chef/knife/supermarket_search.rb +1 -2
- data/lib/chef/knife/supermarket_share.rb +1 -2
- data/lib/chef/knife/supermarket_show.rb +1 -2
- data/lib/chef/knife/supermarket_unshare.rb +1 -2
- data/lib/chef/knife/{cookbook_site_show.rb → user_dissociate.rb} +15 -13
- data/lib/chef/knife/{cookbook_site_search.rb → user_invite_add.rb} +16 -13
- data/lib/chef/knife/user_invite_list.rb +34 -0
- data/lib/chef/knife/user_invite_recind.rb +63 -0
- data/lib/chef/knife/yaml_convert.rb +91 -0
- data/lib/chef/log.rb +1 -1
- data/lib/chef/mixin/create_path.rb +8 -8
- data/lib/chef/mixin/openssl_helper.rb +3 -26
- data/lib/chef/mixin/powershell_exec.rb +10 -1
- data/lib/chef/mixin/powershell_out.rb +1 -1
- data/lib/chef/mixin/properties.rb +13 -1
- data/lib/chef/mixin/shell_out.rb +0 -4
- data/lib/chef/mixin/template.rb +0 -1
- data/lib/chef/monkey_patches/net_http.rb +0 -4
- data/lib/chef/node.rb +18 -6
- data/lib/chef/node/mixin/deep_merge_cache.rb +7 -7
- data/lib/chef/node/mixin/immutablize_array.rb +4 -0
- data/lib/chef/node/mixin/immutablize_hash.rb +3 -0
- data/lib/chef/node_map.rb +7 -36
- data/lib/chef/platform/priority_map.rb +4 -4
- data/lib/chef/platform/query_helpers.rb +6 -34
- data/lib/chef/powershell.rb +14 -0
- data/lib/chef/property.rb +22 -4
- data/lib/chef/provider.rb +40 -6
- data/lib/chef/provider/cron.rb +2 -2
- data/lib/chef/provider/directory.rb +2 -2
- data/lib/chef/provider/dsc_resource.rb +1 -1
- data/lib/chef/provider/dsc_script.rb +1 -1
- data/lib/chef/provider/execute.rb +2 -8
- data/lib/chef/provider/file.rb +5 -5
- data/lib/chef/provider/git.rb +84 -27
- data/lib/chef/provider/group.rb +4 -4
- data/lib/chef/provider/http_request.rb +6 -6
- data/lib/chef/provider/ifconfig.rb +4 -4
- data/lib/chef/provider/launchd.rb +36 -51
- data/lib/chef/provider/link.rb +2 -2
- data/lib/chef/provider/mount.rb +5 -5
- data/lib/chef/provider/mount/solaris.rb +1 -0
- data/lib/chef/provider/osx_profile.rb +7 -3
- data/lib/chef/provider/package.rb +2 -2
- data/lib/chef/provider/package/cab.rb +3 -4
- data/lib/chef/provider/package/chocolatey.rb +1 -3
- data/lib/chef/provider/package/dnf.rb +66 -10
- data/lib/chef/provider/package/dnf/dnf_helper.py +84 -30
- data/lib/chef/provider/package/dnf/python_helper.rb +79 -36
- data/lib/chef/provider/package/dnf/version.rb +5 -1
- data/lib/chef/provider/package/freebsd/pkgng.rb +1 -3
- data/lib/chef/provider/package/homebrew.rb +106 -42
- data/lib/chef/provider/package/msu.rb +3 -1
- data/lib/chef/provider/package/pacman.rb +25 -34
- data/lib/chef/provider/package/powershell.rb +2 -6
- data/lib/chef/provider/package/rubygems.rb +29 -2
- data/lib/chef/provider/package/snap.rb +27 -96
- data/lib/chef/provider/package/windows.rb +3 -2
- data/lib/chef/provider/package/windows/msi.rb +2 -2
- data/lib/chef/provider/package/yum.rb +0 -8
- data/lib/chef/provider/package/yum/yum_helper.py +0 -4
- data/lib/chef/provider/package/zypper.rb +1 -1
- data/lib/chef/provider/powershell_script.rb +4 -10
- data/lib/chef/provider/registry_key.rb +4 -4
- data/lib/chef/provider/remote_directory.rb +3 -3
- data/lib/chef/provider/remote_file/ftp.rb +3 -2
- data/lib/chef/provider/remote_file/local_file.rb +2 -1
- data/lib/chef/provider/remote_file/sftp.rb +3 -2
- data/lib/chef/provider/route.rb +5 -3
- data/lib/chef/provider/ruby_block.rb +1 -1
- data/lib/chef/provider/script.rb +2 -2
- data/lib/chef/provider/service.rb +8 -8
- data/lib/chef/provider/service/aixinit.rb +1 -1
- data/lib/chef/provider/service/arch.rb +2 -2
- data/lib/chef/provider/service/debian.rb +31 -29
- data/lib/chef/provider/service/gentoo.rb +2 -2
- data/lib/chef/provider/service/macosx.rb +7 -12
- data/lib/chef/provider/service/openbsd.rb +1 -1
- data/lib/chef/provider/service/redhat.rb +2 -2
- data/lib/chef/provider/service/simple.rb +3 -3
- data/lib/chef/provider/service/systemd.rb +12 -12
- data/lib/chef/provider/service/upstart.rb +1 -1
- data/lib/chef/provider/service/windows.rb +5 -11
- data/lib/chef/provider/subversion.rb +25 -5
- data/lib/chef/provider/systemd_unit.rb +26 -25
- data/lib/chef/provider/user.rb +6 -6
- data/lib/chef/provider/user/dscl.rb +3 -3
- data/lib/chef/provider/user/mac.rb +10 -9
- data/lib/chef/provider/whyrun_safe_ruby_block.rb +1 -1
- data/lib/chef/provider/windows_env.rb +3 -3
- data/lib/chef/provider/windows_script.rb +2 -2
- data/lib/chef/provider/windows_task.rb +7 -9
- data/lib/chef/provider/yum_repository.rb +1 -1
- data/lib/chef/provider/zypper_repository.rb +11 -31
- data/lib/chef/providers.rb +0 -6
- data/lib/chef/recipe.rb +36 -0
- data/lib/chef/resource.rb +41 -56
- data/lib/chef/resource/action_class.rb +24 -22
- data/lib/chef/resource/alternatives.rb +149 -0
- data/lib/chef/resource/apt_package.rb +2 -1
- data/lib/chef/resource/apt_preference.rb +69 -2
- data/lib/chef/resource/apt_repository.rb +337 -5
- data/lib/chef/resource/apt_update.rb +52 -1
- data/lib/chef/resource/archive_file.rb +9 -29
- data/lib/chef/resource/bash.rb +2 -0
- data/lib/chef/resource/bff_package.rb +9 -1
- data/lib/chef/resource/breakpoint.rb +0 -1
- data/lib/chef/resource/build_essential.rb +42 -48
- data/lib/chef/resource/cab_package.rb +8 -1
- data/lib/chef/resource/chef_client_cron.rb +225 -0
- data/lib/chef/resource/chef_client_scheduled_task.rb +198 -0
- data/lib/chef/resource/chef_client_systemd_timer.rb +177 -0
- data/lib/chef/resource/chef_gem.rb +9 -16
- data/lib/chef/resource/chef_handler.rb +2 -1
- data/lib/chef/resource/chef_sleep.rb +0 -1
- data/lib/chef/resource/chef_vault_secret.rb +135 -0
- data/lib/chef/resource/chocolatey_config.rb +3 -1
- data/lib/chef/resource/chocolatey_feature.rb +2 -1
- data/lib/chef/resource/chocolatey_package.rb +2 -1
- data/lib/chef/resource/chocolatey_source.rb +2 -1
- data/lib/chef/resource/cookbook_file.rb +1 -1
- data/lib/chef/resource/cron.rb +22 -68
- data/lib/chef/resource/cron_access.rb +8 -15
- data/lib/chef/resource/cron_d.rb +9 -75
- data/lib/chef/resource/csh.rb +2 -0
- data/lib/chef/resource/directory.rb +2 -2
- data/lib/chef/resource/dmg_package.rb +4 -4
- data/lib/chef/resource/dnf_package.rb +2 -3
- data/lib/chef/resource/dpkg_package.rb +2 -1
- data/lib/chef/resource/dsc_resource.rb +6 -4
- data/lib/chef/resource/dsc_script.rb +3 -2
- data/lib/chef/resource/execute.rb +13 -12
- data/lib/chef/resource/file.rb +3 -1
- data/lib/chef/resource/freebsd_package.rb +2 -1
- data/lib/chef/resource/gem_package.rb +14 -6
- data/lib/chef/resource/group.rb +4 -1
- data/lib/chef/resource/helpers/cron_validations.rb +98 -0
- data/lib/chef/resource/homebrew_cask.rb +5 -4
- data/lib/chef/resource/homebrew_package.rb +4 -2
- data/lib/chef/resource/homebrew_tap.rb +2 -1
- data/lib/chef/resource/hostname.rb +41 -36
- data/lib/chef/resource/http_request.rb +0 -1
- data/lib/chef/resource/ifconfig.rb +1 -1
- data/lib/chef/resource/ips_package.rb +10 -2
- data/lib/chef/resource/kernel_module.rb +29 -29
- data/lib/chef/resource/ksh.rb +2 -0
- data/lib/chef/resource/launchd.rb +6 -6
- data/lib/chef/resource/link.rb +1 -23
- data/lib/chef/resource/locale.rb +58 -24
- data/lib/chef/resource/log.rb +12 -1
- data/lib/chef/resource/lwrp_base.rb +1 -8
- data/lib/chef/resource/macos_userdefaults.rb +9 -6
- data/lib/chef/resource/macosx_service.rb +2 -1
- data/lib/chef/resource/macports_package.rb +10 -2
- data/lib/chef/resource/mdadm.rb +62 -2
- data/lib/chef/resource/mount.rb +3 -0
- data/lib/chef/resource/msu_package.rb +13 -1
- data/lib/chef/resource/notify_group.rb +8 -3
- data/lib/chef/resource/ohai.rb +19 -3
- data/lib/chef/resource/ohai_hint.rb +3 -12
- data/lib/chef/resource/openbsd_package.rb +9 -1
- data/lib/chef/resource/openssl_dhparam.rb +10 -1
- data/lib/chef/resource/openssl_ec_private_key.rb +23 -1
- data/lib/chef/resource/openssl_ec_public_key.rb +21 -1
- data/lib/chef/resource/openssl_rsa_private_key.rb +20 -1
- data/lib/chef/resource/openssl_rsa_public_key.rb +22 -1
- data/lib/chef/resource/openssl_x509_certificate.rb +37 -1
- data/lib/chef/resource/openssl_x509_crl.rb +12 -1
- data/lib/chef/resource/openssl_x509_request.rb +37 -1
- data/lib/chef/resource/osx_profile.rb +3 -2
- data/lib/chef/resource/package.rb +2 -1
- data/lib/chef/resource/pacman_package.rb +2 -1
- data/lib/chef/resource/paludis_package.rb +12 -3
- data/lib/chef/resource/perl.rb +2 -0
- data/lib/chef/resource/plist.rb +207 -0
- data/lib/chef/resource/portage_package.rb +13 -3
- data/lib/chef/resource/powershell_package.rb +1 -3
- data/lib/chef/resource/powershell_package_source.rb +3 -1
- data/lib/chef/resource/powershell_script.rb +7 -17
- data/lib/chef/resource/python.rb +2 -0
- data/lib/chef/resource/reboot.rb +0 -1
- data/lib/chef/resource/registry_key.rb +1 -2
- data/lib/chef/resource/remote_directory.rb +2 -0
- data/lib/chef/resource/remote_file.rb +2 -0
- data/lib/chef/resource/rhsm_errata.rb +0 -1
- data/lib/chef/resource/rhsm_errata_level.rb +0 -1
- data/lib/chef/resource/rhsm_register.rb +2 -1
- data/lib/chef/resource/rhsm_repo.rb +3 -1
- data/lib/chef/resource/rhsm_subscription.rb +4 -1
- data/lib/chef/resource/route.rb +5 -1
- data/lib/chef/resource/rpm_package.rb +9 -2
- data/lib/chef/resource/ruby.rb +2 -0
- data/lib/chef/resource/ruby_block.rb +1 -1
- data/lib/chef/resource/scm/_scm.rb +48 -0
- data/lib/chef/resource/{scm.rb → scm/git.rb} +16 -30
- data/lib/chef/resource/{subversion.rb → scm/subversion.rb} +8 -5
- data/lib/chef/resource/script.rb +6 -3
- data/lib/chef/resource/service.rb +6 -7
- data/lib/chef/resource/smartos_package.rb +9 -1
- data/lib/chef/resource/snap_package.rb +3 -1
- data/lib/chef/resource/solaris_package.rb +9 -1
- data/lib/chef/resource/ssh_known_hosts_entry.rb +6 -3
- data/lib/chef/resource/sudo.rb +9 -9
- data/lib/chef/resource/support/cron.d.erb +1 -1
- data/lib/chef/resource/support/cron_access.erb +1 -1
- data/lib/chef/resource/support/sudoer.erb +1 -2
- data/lib/chef/resource/support/ulimit.erb +41 -0
- data/lib/chef/resource/swap_file.rb +5 -3
- data/lib/chef/resource/sysctl.rb +2 -2
- data/lib/chef/resource/systemd_unit.rb +4 -2
- data/lib/chef/resource/template.rb +0 -1
- data/lib/chef/resource/timezone.rb +7 -18
- data/lib/chef/resource/user.rb +1 -3
- data/lib/chef/resource/user/aix_user.rb +0 -2
- data/lib/chef/resource/user/dscl_user.rb +1 -1
- data/lib/chef/resource/user/linux_user.rb +0 -2
- data/lib/chef/resource/user/mac_user.rb +1 -1
- data/lib/chef/resource/user/pw_user.rb +0 -2
- data/lib/chef/resource/user/solaris_user.rb +0 -2
- data/lib/chef/resource/user/windows_user.rb +0 -2
- data/lib/chef/resource/user_ulimit.rb +114 -0
- data/lib/chef/resource/whyrun_safe_ruby_block.rb +1 -0
- data/lib/chef/resource/windows_ad_join.rb +19 -6
- data/lib/chef/resource/windows_auto_run.rb +0 -1
- data/lib/chef/resource/windows_certificate.rb +1 -1
- data/lib/chef/resource/windows_dfs_folder.rb +0 -1
- data/lib/chef/resource/windows_dfs_namespace.rb +0 -1
- data/lib/chef/resource/windows_dfs_server.rb +0 -1
- data/lib/chef/resource/windows_dns_record.rb +0 -1
- data/lib/chef/resource/windows_dns_zone.rb +0 -1
- data/lib/chef/resource/windows_env.rb +2 -3
- data/lib/chef/resource/windows_feature.rb +2 -2
- data/lib/chef/resource/windows_feature_dism.rb +9 -22
- data/lib/chef/resource/windows_feature_powershell.rb +17 -82
- data/lib/chef/resource/windows_firewall_rule.rb +119 -10
- data/lib/chef/resource/windows_font.rb +1 -3
- data/lib/chef/resource/windows_package.rb +13 -4
- data/lib/chef/resource/windows_pagefile.rb +0 -1
- data/lib/chef/resource/windows_path.rb +0 -1
- data/lib/chef/resource/windows_printer.rb +0 -1
- data/lib/chef/resource/windows_printer_port.rb +0 -1
- data/lib/chef/resource/windows_script.rb +3 -4
- data/lib/chef/resource/windows_security_policy.rb +90 -0
- data/lib/chef/resource/windows_service.rb +45 -31
- data/lib/chef/resource/windows_share.rb +3 -7
- data/lib/chef/resource/windows_shortcut.rb +0 -1
- data/lib/chef/resource/windows_task.rb +14 -15
- data/lib/chef/resource/windows_uac.rb +0 -1
- data/lib/chef/resource/windows_user_privilege.rb +157 -0
- data/lib/chef/resource/windows_workgroup.rb +0 -1
- data/lib/chef/resource/yum_package.rb +3 -1
- data/lib/chef/resource/yum_repository.rb +2 -1
- data/lib/chef/resource/zypper_package.rb +3 -2
- data/lib/chef/resource/zypper_repository.rb +2 -1
- data/lib/chef/resource_builder.rb +8 -0
- data/lib/chef/resource_inspector.rb +6 -6
- data/lib/chef/resource_resolver.rb +7 -14
- data/lib/chef/resources.rb +11 -3
- data/lib/chef/role.rb +2 -2
- data/lib/chef/run_context/cookbook_compiler.rb +29 -5
- data/lib/chef/shell.rb +23 -32
- data/lib/chef/shell/shell_session.rb +0 -2
- data/lib/chef/util/diff.rb +1 -1
- data/lib/chef/util/dsc/configuration_generator.rb +1 -1
- data/lib/chef/util/dsc/lcm_output_parser.rb +3 -3
- data/lib/chef/util/powershell/cmdlet.rb +1 -1
- data/lib/chef/version.rb +2 -2
- data/lib/chef/version_string.rb +1 -1
- data/lib/chef/win32/api/file.rb +18 -18
- data/lib/chef/win32/api/security.rb +6 -0
- data/lib/chef/win32/file.rb +3 -11
- data/lib/chef/win32/process.rb +2 -2
- data/lib/chef/win32/security.rb +40 -2
- data/spec/functional/assets/inittest +8 -7
- data/spec/functional/knife/ssh_spec.rb +27 -23
- data/spec/functional/resource/aix_service_spec.rb +1 -0
- data/spec/functional/resource/aixinit_service_spec.rb +8 -7
- data/spec/functional/resource/apt_package_spec.rb +1 -0
- data/spec/functional/resource/bff_spec.rb +2 -2
- data/spec/functional/resource/cookbook_file_spec.rb +1 -1
- data/spec/functional/resource/cron_spec.rb +11 -29
- data/spec/functional/resource/dnf_package_spec.rb +441 -156
- data/spec/functional/resource/dsc_resource_spec.rb +1 -1
- data/spec/functional/resource/git_spec.rb +184 -134
- data/spec/functional/resource/insserv_spec.rb +6 -5
- data/spec/functional/resource/link_spec.rb +17 -17
- data/spec/functional/resource/locale_spec.rb +13 -2
- data/spec/functional/resource/powershell_script_spec.rb +7 -68
- data/spec/functional/resource/rpm_spec.rb +2 -2
- data/spec/functional/resource/user/dscl_spec.rb +2 -2
- data/spec/functional/resource/user/mac_user_spec.rb +2 -2
- data/spec/functional/resource/windows_certificate_spec.rb +3 -3
- data/spec/functional/resource/windows_security_policy_spec.rb +90 -0
- data/spec/functional/resource/windows_task_spec.rb +8 -8
- data/spec/functional/resource/windows_user_privilege_spec.rb +193 -0
- data/spec/functional/run_lock_spec.rb +1 -2
- data/spec/functional/shell_spec.rb +6 -6
- data/spec/functional/util/powershell/cmdlet_spec.rb +1 -1
- data/spec/functional/version_spec.rb +1 -1
- data/spec/functional/win32/registry_spec.rb +0 -6
- data/spec/functional/win32/security_spec.rb +22 -0
- data/spec/functional/win32/service_manager_spec.rb +1 -1
- data/spec/integration/client/client_spec.rb +123 -2
- data/spec/integration/knife/cookbook_show_spec.rb +28 -26
- data/spec/integration/knife/data_bag_show_spec.rb +1 -1
- data/spec/integration/knife/raw_spec.rb +30 -2
- data/spec/integration/knife/show_spec.rb +32 -3
- data/spec/integration/recipes/accumulator_spec.rb +1 -1
- data/spec/integration/recipes/lwrp_inline_resources_spec.rb +5 -5
- data/spec/integration/recipes/lwrp_spec.rb +1 -1
- data/spec/integration/recipes/noop_resource_spec.rb +1 -1
- data/spec/integration/recipes/notifies_spec.rb +50 -21
- data/spec/integration/recipes/notifying_block_spec.rb +9 -6
- data/spec/integration/recipes/provider_choice.rb +2 -0
- data/spec/integration/recipes/recipe_dsl_spec.rb +46 -144
- data/spec/integration/recipes/resource_action_spec.rb +16 -11
- data/spec/integration/recipes/resource_converge_if_changed_spec.rb +1 -3
- data/spec/integration/recipes/resource_load_spec.rb +133 -13
- data/spec/integration/recipes/unified_mode_spec.rb +1 -1
- data/spec/integration/recipes/use_partial_spec.rb +112 -0
- data/spec/integration/solo/solo_spec.rb +3 -3
- data/spec/scripts/ssl-serve.rb +1 -1
- data/spec/spec_helper.rb +11 -14
- data/spec/support/chef_helpers.rb +2 -2
- data/spec/support/lib/chef/resource/zen_follower.rb +2 -0
- data/spec/support/platform_helpers.rb +44 -19
- data/spec/support/platforms/win32/spec_service.rb +1 -1
- data/spec/support/recipe_dsl_helper.rb +83 -0
- data/spec/support/shared/functional/directory_resource.rb +1 -1
- data/spec/support/shared/functional/execute_resource.rb +1 -1
- data/spec/support/shared/functional/file_resource.rb +3 -3
- data/spec/support/shared/functional/win32_service.rb +1 -1
- data/spec/support/shared/functional/windows_script.rb +5 -18
- data/spec/support/shared/integration/knife_support.rb +14 -8
- data/spec/unit/application/apply_spec.rb +3 -0
- data/spec/unit/application/client_spec.rb +5 -1
- data/spec/unit/application_spec.rb +1 -9
- data/spec/unit/chef_fs/file_system/operation_failed_error_spec.rb +4 -2
- data/spec/unit/client_spec.rb +7 -5
- data/spec/unit/cookbook/gem_installer_spec.rb +3 -4
- data/spec/unit/cookbook/metadata_spec.rb +38 -19
- data/spec/unit/data_bag_spec.rb +1 -1
- data/spec/unit/data_collector_spec.rb +38 -17
- data/spec/unit/dsl/platform_introspection_spec.rb +0 -1
- data/spec/unit/environment_spec.rb +7 -7
- data/spec/unit/event_dispatch/dispatcher_spec.rb +0 -3
- data/spec/unit/file_access_control_spec.rb +1 -1
- data/spec/unit/knife/bootstrap/chef_vault_handler_spec.rb +15 -15
- data/spec/unit/knife/bootstrap/client_builder_spec.rb +9 -9
- data/spec/unit/knife/bootstrap_spec.rb +36 -54
- data/spec/unit/knife/cookbook_download_spec.rb +4 -4
- data/spec/unit/knife/cookbook_metadata_from_file_spec.rb +1 -1
- data/spec/unit/knife/cookbook_show_spec.rb +1 -0
- data/spec/unit/knife/cookbook_upload_spec.rb +6 -5
- data/spec/unit/knife/core/bootstrap_context_spec.rb +23 -43
- data/spec/unit/knife/core/hashed_command_loader_spec.rb +3 -3
- data/spec/unit/knife/core/ui_spec.rb +16 -0
- data/spec/unit/knife/core/windows_bootstrap_context_spec.rb +8 -68
- data/spec/unit/knife/data_bag_secret_options_spec.rb +22 -14
- data/spec/unit/knife/role_env_run_list_add_spec.rb +6 -6
- data/spec/unit/knife/role_env_run_list_clear_spec.rb +4 -4
- data/spec/unit/knife/role_env_run_list_remove_spec.rb +4 -4
- data/spec/unit/knife/role_env_run_list_replace_spec.rb +4 -4
- data/spec/unit/knife/role_env_run_list_set_spec.rb +4 -4
- data/spec/unit/knife/role_run_list_add_spec.rb +6 -6
- data/spec/unit/knife/role_run_list_clear_spec.rb +4 -4
- data/spec/unit/knife/role_run_list_remove_spec.rb +4 -4
- data/spec/unit/knife/role_run_list_replace_spec.rb +4 -4
- data/spec/unit/knife/role_run_list_set_spec.rb +4 -4
- data/spec/unit/knife/ssh_spec.rb +10 -113
- data/spec/unit/knife/status_spec.rb +1 -1
- data/spec/unit/knife/supermarket_share_spec.rb +3 -5
- data/spec/unit/knife_spec.rb +18 -0
- data/spec/unit/lwrp_spec.rb +4 -4
- data/spec/unit/mixin/powershell_exec_spec.rb +10 -0
- data/spec/unit/mixin/securable_spec.rb +1 -0
- data/spec/unit/mixin/user_context_spec.rb +9 -1
- data/spec/unit/node/attribute_spec.rb +2 -2
- data/spec/unit/node_spec.rb +24 -0
- data/spec/unit/platform/query_helpers_spec.rb +0 -143
- data/spec/unit/property/state_spec.rb +12 -7
- data/spec/unit/property/validation_spec.rb +25 -1
- data/spec/unit/property_spec.rb +18 -15
- data/spec/unit/provider/apt_preference_spec.rb +14 -10
- data/spec/unit/provider/apt_repository_spec.rb +9 -11
- data/spec/unit/provider/apt_update_spec.rb +12 -11
- data/spec/unit/provider/cookbook_file_spec.rb +4 -4
- data/spec/unit/provider/cron_spec.rb +2 -2
- data/spec/unit/provider/directory_spec.rb +4 -15
- data/spec/unit/provider/file_spec.rb +4 -4
- data/spec/unit/provider/git_spec.rb +44 -4
- data/spec/unit/provider/link_spec.rb +0 -1
- data/spec/unit/provider/log_spec.rb +3 -3
- data/spec/unit/provider/mdadm_spec.rb +3 -3
- data/spec/unit/provider/osx_profile_spec.rb +2 -2
- data/spec/unit/provider/package/dnf/python_helper_spec.rb +2 -2
- data/spec/unit/provider/package/freebsd/pkgng_spec.rb +1 -1
- data/spec/unit/provider/package/homebrew_spec.rb +280 -174
- data/spec/unit/provider/package/msu_spec.rb +3 -3
- data/spec/unit/provider/package/pacman_spec.rb +65 -147
- data/spec/unit/provider/package/powershell_spec.rb +88 -96
- data/spec/unit/provider/package/rubygems_spec.rb +221 -31
- data/spec/unit/provider/package/snap_spec.rb +1 -1
- data/spec/unit/provider/package/windows/exe_spec.rb +1 -1
- data/spec/unit/provider/package/windows_spec.rb +53 -30
- data/spec/unit/provider/powershell_script_spec.rb +21 -61
- data/spec/unit/provider/remote_file_spec.rb +3 -4
- data/spec/unit/provider/service/arch_service_spec.rb +2 -3
- data/spec/unit/provider/service/debian_service_spec.rb +35 -14
- data/spec/unit/provider/service/gentoo_service_spec.rb +8 -8
- data/spec/unit/provider/service/macosx_spec.rb +210 -214
- data/spec/unit/provider/service/redhat_spec.rb +2 -2
- data/spec/unit/provider/service/systemd_service_spec.rb +23 -23
- data/spec/unit/provider/service/upstart_service_spec.rb +3 -3
- data/spec/unit/provider/service/windows_spec.rb +6 -2
- data/spec/unit/provider/subversion_spec.rb +4 -2
- data/spec/unit/provider/systemd_unit_spec.rb +24 -28
- data/spec/unit/provider/template_spec.rb +3 -4
- data/spec/unit/provider/zypper_repository_spec.rb +25 -75
- data/spec/unit/provider_resolver_spec.rb +11 -11
- data/spec/unit/provider_spec.rb +0 -1
- data/spec/unit/recipe_spec.rb +68 -0
- data/spec/unit/resource/alternatives_spec.rb +120 -0
- data/spec/unit/resource/apt_preference_spec.rb +0 -18
- data/spec/unit/resource/apt_repository_spec.rb +0 -18
- data/spec/unit/resource/apt_update_spec.rb +0 -18
- data/spec/unit/resource/archive_file_spec.rb +2 -11
- data/spec/unit/resource/chef_client_cron_spec.rb +119 -0
- data/spec/unit/resource/chef_client_scheduled_task_spec.rb +102 -0
- data/spec/unit/resource/chef_client_systemd_timer_spec.rb +70 -0
- data/spec/unit/resource/chef_vault_secret_spec.rb +40 -0
- data/spec/unit/resource/chocolatey_source_spec.rb +2 -1
- data/spec/unit/resource/cron_d_spec.rb +6 -48
- data/spec/unit/resource/cron_spec.rb +4 -10
- data/spec/unit/resource/gem_package_spec.rb +3 -3
- data/spec/unit/resource/helpers/cron_validations_spec.rb +77 -0
- data/spec/unit/resource/link_spec.rb +0 -4
- data/spec/unit/resource/locale_spec.rb +0 -34
- data/spec/unit/resource/ohai_spec.rb +56 -2
- data/spec/unit/resource/plist_spec.rb +130 -0
- data/spec/unit/resource/powershell_script_spec.rb +0 -5
- data/spec/unit/resource/{git_spec.rb → scm/git_spec.rb} +50 -2
- data/spec/unit/resource/{scm_spec.rb → scm/scm.rb} +1 -52
- data/spec/unit/resource/{subversion_spec.rb → scm/subversion_spec.rb} +2 -3
- data/spec/unit/resource/service_spec.rb +4 -0
- data/spec/unit/resource/user_spec.rb +2 -2
- data/spec/unit/resource/user_ulimit_spec.rb +53 -0
- data/spec/unit/resource/windows_dns_record_spec.rb +3 -3
- data/spec/unit/resource/windows_dns_zone_spec.rb +2 -2
- data/spec/unit/resource/windows_feature_dism_spec.rb +2 -17
- data/spec/unit/resource/windows_feature_powershell_spec.rb +6 -47
- data/spec/unit/resource/windows_firewall_rule_spec.rb +88 -41
- data/spec/unit/resource/windows_package_spec.rb +4 -1
- data/spec/unit/resource/windows_service_spec.rb +9 -0
- data/spec/unit/resource/windows_task_spec.rb +1 -1
- data/spec/unit/resource/windows_uac_spec.rb +2 -2
- data/spec/unit/resource/yum_repository_spec.rb +21 -21
- data/spec/unit/resource_reporter_spec.rb +1 -5
- data/spec/unit/resource_spec.rb +11 -4
- data/spec/unit/role_spec.rb +11 -11
- data/spec/unit/run_context/cookbook_compiler_spec.rb +1 -1
- data/spec/unit/run_context_spec.rb +1 -1
- data/spec/unit/search/query_spec.rb +1 -1
- data/spec/unit/util/threaded_job_queue_spec.rb +0 -9
- data/spec/unit/win32/security_spec.rb +3 -4
- data/tasks/rspec.rb +1 -1
- metadata +110 -75
- data/lib/chef/dsl/core.rb +0 -52
- data/lib/chef/knife/cookbook_site_share.rb +0 -41
- data/lib/chef/knife/cookbook_site_unshare.rb +0 -41
- data/lib/chef/provider/apt_preference.rb +0 -93
- data/lib/chef/provider/apt_repository.rb +0 -358
- data/lib/chef/provider/apt_update.rb +0 -79
- data/lib/chef/provider/log.rb +0 -43
- data/lib/chef/provider/mdadm.rb +0 -85
- data/lib/chef/provider/ohai.rb +0 -45
- data/lib/chef/resource/git.rb +0 -37
- data/spec/functional/resource/windows_font_spec.rb +0 -49
- 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
|
data/spec/unit/resource_spec.rb
CHANGED
@@ -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,
|
1192
|
-
klass.
|
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
|
|
data/spec/unit/role_spec.rb
CHANGED
@@ -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(:
|
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(:
|
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(:
|
284
|
-
expect(File).not_to receive(:
|
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(:
|
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(:
|
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(:
|
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(:
|
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(:
|
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(:
|
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(:
|
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("
|
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
|
-
|
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
|
-
|
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
|
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
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:
|
4
|
+
version: 16.0.257
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Jacob
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
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:
|
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:
|
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:
|
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:
|
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: '
|
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: '
|
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: '
|
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: '
|
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:
|
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:
|
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
|
@@ -711,8 +727,8 @@ files:
|
|
711
727
|
- lib/chef/digester.rb
|
712
728
|
- lib/chef/dist.rb
|
713
729
|
- lib/chef/dsl.rb
|
730
|
+
- lib/chef/dsl/chef_vault.rb
|
714
731
|
- lib/chef/dsl/cheffish.rb
|
715
|
-
- lib/chef/dsl/core.rb
|
716
732
|
- lib/chef/dsl/data_query.rb
|
717
733
|
- lib/chef/dsl/declare_resource.rb
|
718
734
|
- lib/chef/dsl/definitions.rb
|
@@ -796,6 +812,12 @@ files:
|
|
796
812
|
- lib/chef/json_compat.rb
|
797
813
|
- lib/chef/key.rb
|
798
814
|
- lib/chef/knife.rb
|
815
|
+
- lib/chef/knife/acl_add.rb
|
816
|
+
- lib/chef/knife/acl_base.rb
|
817
|
+
- lib/chef/knife/acl_bulk_add.rb
|
818
|
+
- lib/chef/knife/acl_bulk_remove.rb
|
819
|
+
- lib/chef/knife/acl_remove.rb
|
820
|
+
- lib/chef/knife/acl_show.rb
|
799
821
|
- lib/chef/knife/bootstrap.rb
|
800
822
|
- lib/chef/knife/bootstrap/chef_vault_handler.rb
|
801
823
|
- lib/chef/knife/bootstrap/client_builder.rb
|
@@ -828,13 +850,6 @@ files:
|
|
828
850
|
- lib/chef/knife/cookbook_metadata.rb
|
829
851
|
- lib/chef/knife/cookbook_metadata_from_file.rb
|
830
852
|
- lib/chef/knife/cookbook_show.rb
|
831
|
-
- lib/chef/knife/cookbook_site_download.rb
|
832
|
-
- lib/chef/knife/cookbook_site_install.rb
|
833
|
-
- lib/chef/knife/cookbook_site_list.rb
|
834
|
-
- lib/chef/knife/cookbook_site_search.rb
|
835
|
-
- lib/chef/knife/cookbook_site_share.rb
|
836
|
-
- lib/chef/knife/cookbook_site_show.rb
|
837
|
-
- lib/chef/knife/cookbook_site_unshare.rb
|
838
853
|
- lib/chef/knife/cookbook_upload.rb
|
839
854
|
- lib/chef/knife/core/bootstrap_context.rb
|
840
855
|
- lib/chef/knife/core/cookbook_scm_repo.rb
|
@@ -869,6 +884,12 @@ files:
|
|
869
884
|
- lib/chef/knife/environment_list.rb
|
870
885
|
- lib/chef/knife/environment_show.rb
|
871
886
|
- lib/chef/knife/exec.rb
|
887
|
+
- lib/chef/knife/group_add.rb
|
888
|
+
- lib/chef/knife/group_create.rb
|
889
|
+
- lib/chef/knife/group_destroy.rb
|
890
|
+
- lib/chef/knife/group_list.rb
|
891
|
+
- lib/chef/knife/group_remove.rb
|
892
|
+
- lib/chef/knife/group_show.rb
|
872
893
|
- lib/chef/knife/key_create.rb
|
873
894
|
- lib/chef/knife/key_create_base.rb
|
874
895
|
- lib/chef/knife/key_delete.rb
|
@@ -931,7 +952,11 @@ files:
|
|
931
952
|
- lib/chef/knife/upload.rb
|
932
953
|
- lib/chef/knife/user_create.rb
|
933
954
|
- lib/chef/knife/user_delete.rb
|
955
|
+
- lib/chef/knife/user_dissociate.rb
|
934
956
|
- lib/chef/knife/user_edit.rb
|
957
|
+
- lib/chef/knife/user_invite_add.rb
|
958
|
+
- lib/chef/knife/user_invite_list.rb
|
959
|
+
- lib/chef/knife/user_invite_recind.rb
|
935
960
|
- lib/chef/knife/user_key_create.rb
|
936
961
|
- lib/chef/knife/user_key_delete.rb
|
937
962
|
- lib/chef/knife/user_key_edit.rb
|
@@ -941,6 +966,7 @@ files:
|
|
941
966
|
- lib/chef/knife/user_reregister.rb
|
942
967
|
- lib/chef/knife/user_show.rb
|
943
968
|
- lib/chef/knife/xargs.rb
|
969
|
+
- lib/chef/knife/yaml_convert.rb
|
944
970
|
- lib/chef/local_mode.rb
|
945
971
|
- lib/chef/log.rb
|
946
972
|
- lib/chef/log/syslog.rb
|
@@ -1018,9 +1044,6 @@ files:
|
|
1018
1044
|
- lib/chef/powershell.rb
|
1019
1045
|
- lib/chef/property.rb
|
1020
1046
|
- lib/chef/provider.rb
|
1021
|
-
- lib/chef/provider/apt_preference.rb
|
1022
|
-
- lib/chef/provider/apt_repository.rb
|
1023
|
-
- lib/chef/provider/apt_update.rb
|
1024
1047
|
- lib/chef/provider/batch.rb
|
1025
1048
|
- lib/chef/provider/cookbook_file.rb
|
1026
1049
|
- lib/chef/provider/cookbook_file/content.rb
|
@@ -1053,16 +1076,13 @@ files:
|
|
1053
1076
|
- lib/chef/provider/ifconfig/redhat.rb
|
1054
1077
|
- lib/chef/provider/launchd.rb
|
1055
1078
|
- lib/chef/provider/link.rb
|
1056
|
-
- lib/chef/provider/log.rb
|
1057
1079
|
- lib/chef/provider/lwrp_base.rb
|
1058
|
-
- lib/chef/provider/mdadm.rb
|
1059
1080
|
- lib/chef/provider/mount.rb
|
1060
1081
|
- lib/chef/provider/mount/aix.rb
|
1061
1082
|
- lib/chef/provider/mount/mount.rb
|
1062
1083
|
- lib/chef/provider/mount/solaris.rb
|
1063
1084
|
- lib/chef/provider/mount/windows.rb
|
1064
1085
|
- lib/chef/provider/noop.rb
|
1065
|
-
- lib/chef/provider/ohai.rb
|
1066
1086
|
- lib/chef/provider/osx_profile.rb
|
1067
1087
|
- lib/chef/provider/package.rb
|
1068
1088
|
- lib/chef/provider/package/apt.rb
|
@@ -1176,6 +1196,7 @@ files:
|
|
1176
1196
|
- lib/chef/reserved_names.rb
|
1177
1197
|
- lib/chef/resource.rb
|
1178
1198
|
- lib/chef/resource/action_class.rb
|
1199
|
+
- lib/chef/resource/alternatives.rb
|
1179
1200
|
- lib/chef/resource/apt_package.rb
|
1180
1201
|
- lib/chef/resource/apt_preference.rb
|
1181
1202
|
- lib/chef/resource/apt_repository.rb
|
@@ -1187,9 +1208,13 @@ files:
|
|
1187
1208
|
- lib/chef/resource/breakpoint.rb
|
1188
1209
|
- lib/chef/resource/build_essential.rb
|
1189
1210
|
- lib/chef/resource/cab_package.rb
|
1211
|
+
- lib/chef/resource/chef_client_cron.rb
|
1212
|
+
- lib/chef/resource/chef_client_scheduled_task.rb
|
1213
|
+
- lib/chef/resource/chef_client_systemd_timer.rb
|
1190
1214
|
- lib/chef/resource/chef_gem.rb
|
1191
1215
|
- lib/chef/resource/chef_handler.rb
|
1192
1216
|
- lib/chef/resource/chef_sleep.rb
|
1217
|
+
- lib/chef/resource/chef_vault_secret.rb
|
1193
1218
|
- lib/chef/resource/chocolatey_config.rb
|
1194
1219
|
- lib/chef/resource/chocolatey_feature.rb
|
1195
1220
|
- lib/chef/resource/chocolatey_package.rb
|
@@ -1213,8 +1238,8 @@ files:
|
|
1213
1238
|
- lib/chef/resource/file/verification/systemd_unit.rb
|
1214
1239
|
- lib/chef/resource/freebsd_package.rb
|
1215
1240
|
- lib/chef/resource/gem_package.rb
|
1216
|
-
- lib/chef/resource/git.rb
|
1217
1241
|
- lib/chef/resource/group.rb
|
1242
|
+
- lib/chef/resource/helpers/cron_validations.rb
|
1218
1243
|
- lib/chef/resource/homebrew_cask.rb
|
1219
1244
|
- lib/chef/resource/homebrew_package.rb
|
1220
1245
|
- lib/chef/resource/homebrew_tap.rb
|
@@ -1252,6 +1277,7 @@ files:
|
|
1252
1277
|
- lib/chef/resource/pacman_package.rb
|
1253
1278
|
- lib/chef/resource/paludis_package.rb
|
1254
1279
|
- lib/chef/resource/perl.rb
|
1280
|
+
- lib/chef/resource/plist.rb
|
1255
1281
|
- lib/chef/resource/portage_package.rb
|
1256
1282
|
- lib/chef/resource/powershell_package.rb
|
1257
1283
|
- lib/chef/resource/powershell_package_source.rb
|
@@ -1271,19 +1297,21 @@ files:
|
|
1271
1297
|
- lib/chef/resource/rpm_package.rb
|
1272
1298
|
- lib/chef/resource/ruby.rb
|
1273
1299
|
- lib/chef/resource/ruby_block.rb
|
1274
|
-
- lib/chef/resource/scm.rb
|
1300
|
+
- lib/chef/resource/scm/_scm.rb
|
1301
|
+
- lib/chef/resource/scm/git.rb
|
1302
|
+
- lib/chef/resource/scm/subversion.rb
|
1275
1303
|
- lib/chef/resource/script.rb
|
1276
1304
|
- lib/chef/resource/service.rb
|
1277
1305
|
- lib/chef/resource/smartos_package.rb
|
1278
1306
|
- lib/chef/resource/snap_package.rb
|
1279
1307
|
- lib/chef/resource/solaris_package.rb
|
1280
1308
|
- lib/chef/resource/ssh_known_hosts_entry.rb
|
1281
|
-
- lib/chef/resource/subversion.rb
|
1282
1309
|
- lib/chef/resource/sudo.rb
|
1283
1310
|
- lib/chef/resource/support/cron.d.erb
|
1284
1311
|
- lib/chef/resource/support/cron_access.erb
|
1285
1312
|
- lib/chef/resource/support/ssh_known_hosts.erb
|
1286
1313
|
- lib/chef/resource/support/sudoer.erb
|
1314
|
+
- lib/chef/resource/support/ulimit.erb
|
1287
1315
|
- lib/chef/resource/swap_file.rb
|
1288
1316
|
- lib/chef/resource/sysctl.rb
|
1289
1317
|
- lib/chef/resource/systemd_unit.rb
|
@@ -1297,6 +1325,7 @@ files:
|
|
1297
1325
|
- lib/chef/resource/user/pw_user.rb
|
1298
1326
|
- lib/chef/resource/user/solaris_user.rb
|
1299
1327
|
- lib/chef/resource/user/windows_user.rb
|
1328
|
+
- lib/chef/resource/user_ulimit.rb
|
1300
1329
|
- lib/chef/resource/whyrun_safe_ruby_block.rb
|
1301
1330
|
- lib/chef/resource/windows_ad_join.rb
|
1302
1331
|
- lib/chef/resource/windows_auto_run.rb
|
@@ -1318,11 +1347,13 @@ files:
|
|
1318
1347
|
- lib/chef/resource/windows_printer.rb
|
1319
1348
|
- lib/chef/resource/windows_printer_port.rb
|
1320
1349
|
- lib/chef/resource/windows_script.rb
|
1350
|
+
- lib/chef/resource/windows_security_policy.rb
|
1321
1351
|
- lib/chef/resource/windows_service.rb
|
1322
1352
|
- lib/chef/resource/windows_share.rb
|
1323
1353
|
- lib/chef/resource/windows_shortcut.rb
|
1324
1354
|
- lib/chef/resource/windows_task.rb
|
1325
1355
|
- lib/chef/resource/windows_uac.rb
|
1356
|
+
- lib/chef/resource/windows_user_privilege.rb
|
1326
1357
|
- lib/chef/resource/windows_workgroup.rb
|
1327
1358
|
- lib/chef/resource/yum_package.rb
|
1328
1359
|
- lib/chef/resource/yum_repository.rb
|
@@ -1904,11 +1935,12 @@ files:
|
|
1904
1935
|
- spec/functional/resource/user/windows_spec.rb
|
1905
1936
|
- spec/functional/resource/windows_certificate_spec.rb
|
1906
1937
|
- spec/functional/resource/windows_env_spec.rb
|
1907
|
-
- spec/functional/resource/windows_font_spec.rb
|
1908
1938
|
- spec/functional/resource/windows_package_spec.rb
|
1909
1939
|
- spec/functional/resource/windows_path_spec.rb
|
1940
|
+
- spec/functional/resource/windows_security_policy_spec.rb
|
1910
1941
|
- spec/functional/resource/windows_service_spec.rb
|
1911
1942
|
- spec/functional/resource/windows_task_spec.rb
|
1943
|
+
- spec/functional/resource/windows_user_privilege_spec.rb
|
1912
1944
|
- spec/functional/resource/yum_package_spec.rb
|
1913
1945
|
- spec/functional/resource/zypper_package_spec.rb
|
1914
1946
|
- spec/functional/root_alias_spec.rb
|
@@ -2004,6 +2036,7 @@ files:
|
|
2004
2036
|
- spec/integration/recipes/resource_converge_if_changed_spec.rb
|
2005
2037
|
- spec/integration/recipes/resource_load_spec.rb
|
2006
2038
|
- spec/integration/recipes/unified_mode_spec.rb
|
2039
|
+
- spec/integration/recipes/use_partial_spec.rb
|
2007
2040
|
- spec/integration/solo/solo_spec.rb
|
2008
2041
|
- spec/rcov.opts
|
2009
2042
|
- spec/scripts/ssl-serve.rb
|
@@ -2030,6 +2063,7 @@ files:
|
|
2030
2063
|
- spec/support/platforms/prof/gc.rb
|
2031
2064
|
- spec/support/platforms/prof/win32.rb
|
2032
2065
|
- spec/support/platforms/win32/spec_service.rb
|
2066
|
+
- spec/support/recipe_dsl_helper.rb
|
2033
2067
|
- spec/support/shared/context/config.rb
|
2034
2068
|
- spec/support/shared/context/win32.rb
|
2035
2069
|
- spec/support/shared/functional/diff_disabled.rb
|
@@ -2347,7 +2381,6 @@ files:
|
|
2347
2381
|
- spec/unit/provider/mount/solaris_spec.rb
|
2348
2382
|
- spec/unit/provider/mount/windows_spec.rb
|
2349
2383
|
- spec/unit/provider/mount_spec.rb
|
2350
|
-
- spec/unit/provider/ohai_spec.rb
|
2351
2384
|
- spec/unit/provider/osx_profile_spec.rb
|
2352
2385
|
- spec/unit/provider/package/apt_spec.rb
|
2353
2386
|
- spec/unit/provider/package/bff_spec.rb
|
@@ -2435,6 +2468,7 @@ files:
|
|
2435
2468
|
- spec/unit/provider_spec.rb
|
2436
2469
|
- spec/unit/pure_application_spec.rb
|
2437
2470
|
- spec/unit/recipe_spec.rb
|
2471
|
+
- spec/unit/resource/alternatives_spec.rb
|
2438
2472
|
- spec/unit/resource/apt_package_spec.rb
|
2439
2473
|
- spec/unit/resource/apt_preference_spec.rb
|
2440
2474
|
- spec/unit/resource/apt_repository_spec.rb
|
@@ -2446,9 +2480,13 @@ files:
|
|
2446
2480
|
- spec/unit/resource/breakpoint_spec.rb
|
2447
2481
|
- spec/unit/resource/build_essential_spec.rb
|
2448
2482
|
- spec/unit/resource/cab_package_spec.rb
|
2483
|
+
- spec/unit/resource/chef_client_cron_spec.rb
|
2484
|
+
- spec/unit/resource/chef_client_scheduled_task_spec.rb
|
2485
|
+
- spec/unit/resource/chef_client_systemd_timer_spec.rb
|
2449
2486
|
- spec/unit/resource/chef_gem_spec.rb
|
2450
2487
|
- spec/unit/resource/chef_handler_spec.rb
|
2451
2488
|
- spec/unit/resource/chef_sleep_spec.rb
|
2489
|
+
- spec/unit/resource/chef_vault_secret_spec.rb
|
2452
2490
|
- spec/unit/resource/chocolatey_config_spec.rb
|
2453
2491
|
- spec/unit/resource/chocolatey_feature_spec.rb
|
2454
2492
|
- spec/unit/resource/chocolatey_package_spec.rb
|
@@ -2474,8 +2512,8 @@ files:
|
|
2474
2512
|
- spec/unit/resource/file_spec.rb
|
2475
2513
|
- spec/unit/resource/freebsd_package_spec.rb
|
2476
2514
|
- spec/unit/resource/gem_package_spec.rb
|
2477
|
-
- spec/unit/resource/git_spec.rb
|
2478
2515
|
- spec/unit/resource/group_spec.rb
|
2516
|
+
- spec/unit/resource/helpers/cron_validations_spec.rb
|
2479
2517
|
- spec/unit/resource/homebrew_cask_spec.rb
|
2480
2518
|
- spec/unit/resource/homebrew_package_spec.rb
|
2481
2519
|
- spec/unit/resource/homebrew_tap_spec.rb
|
@@ -2512,6 +2550,7 @@ files:
|
|
2512
2550
|
- spec/unit/resource/pacman_package_spec.rb
|
2513
2551
|
- spec/unit/resource/paludis_package_spec.rb
|
2514
2552
|
- spec/unit/resource/perl_spec.rb
|
2553
|
+
- spec/unit/resource/plist_spec.rb
|
2515
2554
|
- spec/unit/resource/portage_package_spec.rb
|
2516
2555
|
- spec/unit/resource/powershell_package_source_spec.rb
|
2517
2556
|
- spec/unit/resource/powershell_package_spec.rb
|
@@ -2531,14 +2570,15 @@ files:
|
|
2531
2570
|
- spec/unit/resource/rpm_package_spec.rb
|
2532
2571
|
- spec/unit/resource/ruby_block_spec.rb
|
2533
2572
|
- spec/unit/resource/ruby_spec.rb
|
2534
|
-
- spec/unit/resource/
|
2573
|
+
- spec/unit/resource/scm/git_spec.rb
|
2574
|
+
- spec/unit/resource/scm/scm.rb
|
2575
|
+
- spec/unit/resource/scm/subversion_spec.rb
|
2535
2576
|
- spec/unit/resource/script_spec.rb
|
2536
2577
|
- spec/unit/resource/service_spec.rb
|
2537
2578
|
- spec/unit/resource/smartos_package_spec.rb
|
2538
2579
|
- spec/unit/resource/snap_package_spec.rb
|
2539
2580
|
- spec/unit/resource/solaris_package_spec.rb
|
2540
2581
|
- spec/unit/resource/ssh_known_hosts_entry_spec.rb
|
2541
|
-
- spec/unit/resource/subversion_spec.rb
|
2542
2582
|
- spec/unit/resource/sudo_spec.rb
|
2543
2583
|
- spec/unit/resource/swap_file_spec.rb
|
2544
2584
|
- spec/unit/resource/sysctl_spec.rb
|
@@ -2546,6 +2586,7 @@ files:
|
|
2546
2586
|
- spec/unit/resource/template_spec.rb
|
2547
2587
|
- spec/unit/resource/timezone_spec.rb
|
2548
2588
|
- spec/unit/resource/user_spec.rb
|
2589
|
+
- spec/unit/resource/user_ulimit_spec.rb
|
2549
2590
|
- spec/unit/resource/windows_ad_join_spec.rb
|
2550
2591
|
- spec/unit/resource/windows_auto_run_spec.rb
|
2551
2592
|
- spec/unit/resource/windows_certificate_spec.rb
|
@@ -2634,13 +2675,7 @@ files:
|
|
2634
2675
|
homepage: https://www.chef.io
|
2635
2676
|
licenses:
|
2636
2677
|
- Apache-2.0
|
2637
|
-
metadata:
|
2638
|
-
bug_tracker_uri: https://github.com/chef/chef/issues
|
2639
|
-
changelog_uri: https://github.com/chef/chef/blob/master/CHANGELOG.md
|
2640
|
-
documentation_uri: https://docs.chef.io/
|
2641
|
-
homepage_uri: https://www.chef.io
|
2642
|
-
mailing_list_uri: https://discourse.chef.io/
|
2643
|
-
source_code_uri: https://github.com/chef/chef/
|
2678
|
+
metadata: {}
|
2644
2679
|
post_install_message:
|
2645
2680
|
rdoc_options: []
|
2646
2681
|
require_paths:
|
@@ -2649,14 +2684,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
2649
2684
|
requirements:
|
2650
2685
|
- - ">="
|
2651
2686
|
- !ruby/object:Gem::Version
|
2652
|
-
version: 2.
|
2687
|
+
version: 2.6.0
|
2653
2688
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
2654
2689
|
requirements:
|
2655
2690
|
- - ">="
|
2656
2691
|
- !ruby/object:Gem::Version
|
2657
2692
|
version: '0'
|
2658
2693
|
requirements: []
|
2659
|
-
rubygems_version: 3.
|
2694
|
+
rubygems_version: 3.1.2
|
2660
2695
|
signing_key:
|
2661
2696
|
specification_version: 4
|
2662
2697
|
summary: A systems integration framework, built to bring the benefits of configuration
|