chef 14.15.6 → 18.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +50 -32
- data/README.md +18 -206
- data/Rakefile +57 -22
- data/chef-universal-mingw-ucrt.gemspec +23 -0
- data/chef.gemspec +54 -30
- data/lib/chef/action_collection.rb +255 -0
- data/lib/chef/api_client/registration.rb +14 -13
- data/lib/chef/api_client.rb +11 -11
- data/lib/chef/api_client_v1.rb +22 -13
- data/lib/chef/application/apply.rb +61 -39
- data/lib/chef/application/base.rb +480 -0
- data/lib/chef/application/client.rb +43 -424
- data/lib/chef/application/exit_code.rb +22 -34
- data/lib/chef/application/solo.rb +31 -275
- data/lib/chef/application.rb +100 -87
- data/lib/chef/applications.rb +3 -4
- data/lib/chef/{whitelist.rb → attribute_allowlist.rb} +13 -13
- data/lib/chef/{blacklist.rb → attribute_blocklist.rb} +12 -12
- data/lib/chef/chef_class.rb +12 -18
- data/lib/chef/chef_fs/chef_fs_data_store.rb +80 -72
- data/lib/chef/chef_fs/command_line.rb +20 -12
- data/lib/chef/chef_fs/config.rb +8 -7
- data/lib/chef/chef_fs/data_handler/acl_data_handler.rb +1 -1
- data/lib/chef/chef_fs/data_handler/client_data_handler.rb +2 -2
- data/lib/chef/chef_fs/data_handler/client_key_data_handler.rb +2 -2
- data/lib/chef/chef_fs/data_handler/container_data_handler.rb +2 -2
- data/lib/chef/chef_fs/data_handler/cookbook_data_handler.rb +3 -3
- data/lib/chef/chef_fs/data_handler/data_bag_item_data_handler.rb +5 -5
- data/lib/chef/chef_fs/data_handler/data_handler_base.rb +1 -1
- data/lib/chef/chef_fs/data_handler/environment_data_handler.rb +2 -2
- data/lib/chef/chef_fs/data_handler/group_data_handler.rb +2 -2
- data/lib/chef/chef_fs/data_handler/node_data_handler.rb +2 -2
- data/lib/chef/chef_fs/data_handler/organization_data_handler.rb +3 -4
- data/lib/chef/chef_fs/data_handler/organization_invites_data_handler.rb +1 -1
- data/lib/chef/chef_fs/data_handler/organization_members_data_handler.rb +1 -1
- data/lib/chef/chef_fs/data_handler/policy_data_handler.rb +3 -3
- data/lib/chef/chef_fs/data_handler/policy_group_data_handler.rb +1 -1
- data/lib/chef/chef_fs/data_handler/role_data_handler.rb +2 -2
- data/lib/chef/chef_fs/data_handler/user_data_handler.rb +1 -1
- data/lib/chef/chef_fs/file_pattern.rb +21 -15
- data/lib/chef/chef_fs/file_system/base_fs_dir.rb +3 -3
- data/lib/chef/chef_fs/file_system/base_fs_object.rb +17 -10
- data/lib/chef/chef_fs/file_system/chef_server/acl_dir.rb +4 -4
- data/lib/chef/chef_fs/file_system/chef_server/acl_entry.rb +13 -13
- data/lib/chef/chef_fs/file_system/chef_server/acls_dir.rb +8 -8
- data/lib/chef/chef_fs/file_system/chef_server/chef_server_root_dir.rb +26 -26
- data/lib/chef/chef_fs/file_system/chef_server/cookbook_artifact_dir.rb +2 -2
- data/lib/chef/chef_fs/file_system/chef_server/cookbook_artifacts_dir.rb +7 -7
- data/lib/chef/chef_fs/file_system/chef_server/cookbook_dir.rb +16 -13
- data/lib/chef/chef_fs/file_system/chef_server/cookbook_file.rb +6 -6
- data/lib/chef/chef_fs/file_system/chef_server/cookbook_subdir.rb +3 -3
- data/lib/chef/chef_fs/file_system/chef_server/cookbooks_acl_dir.rb +2 -2
- data/lib/chef/chef_fs/file_system/chef_server/cookbooks_dir.rb +26 -13
- data/lib/chef/chef_fs/file_system/chef_server/data_bag_dir.rb +8 -7
- data/lib/chef/chef_fs/file_system/chef_server/data_bag_entry.rb +2 -2
- data/lib/chef/chef_fs/file_system/chef_server/data_bags_dir.rb +3 -3
- data/lib/chef/chef_fs/file_system/chef_server/environments_dir.rb +8 -6
- data/lib/chef/chef_fs/file_system/chef_server/nodes_dir.rb +5 -5
- data/lib/chef/chef_fs/file_system/chef_server/org_entry.rb +2 -2
- data/lib/chef/chef_fs/file_system/chef_server/organization_invites_entry.rb +11 -11
- data/lib/chef/chef_fs/file_system/chef_server/organization_members_entry.rb +11 -11
- data/lib/chef/chef_fs/file_system/chef_server/policies_acl_dir.rb +2 -2
- data/lib/chef/chef_fs/file_system/chef_server/policies_dir.rb +6 -5
- data/lib/chef/chef_fs/file_system/chef_server/policy_group_entry.rb +8 -7
- data/lib/chef/chef_fs/file_system/chef_server/policy_groups_dir.rb +5 -5
- data/lib/chef/chef_fs/file_system/chef_server/policy_revision_entry.rb +2 -2
- data/lib/chef/chef_fs/file_system/chef_server/rest_list_dir.rb +6 -5
- data/lib/chef/chef_fs/file_system/chef_server/rest_list_entry.rb +12 -8
- data/lib/chef/chef_fs/file_system/chef_server/versioned_cookbook_dir.rb +3 -3
- data/lib/chef/chef_fs/file_system/chef_server/versioned_cookbooks_dir.rb +7 -7
- data/lib/chef/chef_fs/file_system/exceptions.rb +1 -1
- data/lib/chef/chef_fs/file_system/memory/memory_dir.rb +3 -3
- data/lib/chef/chef_fs/file_system/memory/memory_file.rb +1 -1
- data/lib/chef/chef_fs/file_system/memory/memory_root.rb +1 -1
- data/lib/chef/chef_fs/file_system/multiplexed_dir.rb +3 -3
- data/lib/chef/chef_fs/file_system/nonexistent_fs_object.rb +3 -3
- data/lib/chef/chef_fs/file_system/repository/acl.rb +4 -4
- data/lib/chef/chef_fs/file_system/repository/acls_dir.rb +6 -6
- data/lib/chef/chef_fs/file_system/repository/acls_sub_dir.rb +4 -4
- data/lib/chef/chef_fs/file_system/repository/base_file.rb +5 -3
- data/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_artifact_dir.rb +4 -4
- data/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_dir.rb +22 -12
- data/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_entry.rb +16 -13
- data/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_root_dir.rb +56 -54
- data/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_versioned_cookbook_dir.rb +5 -4
- data/lib/chef/chef_fs/file_system/repository/client.rb +3 -3
- data/lib/chef/chef_fs/file_system/repository/client_key.rb +3 -3
- data/lib/chef/chef_fs/file_system/repository/client_keys_dir.rb +4 -4
- data/lib/chef/chef_fs/file_system/repository/client_keys_sub_dir.rb +4 -4
- data/lib/chef/chef_fs/file_system/repository/clients_dir.rb +4 -4
- data/lib/chef/chef_fs/file_system/repository/container.rb +3 -3
- data/lib/chef/chef_fs/file_system/repository/containers_dir.rb +4 -4
- data/lib/chef/chef_fs/file_system/repository/cookbook_artifacts_dir.rb +3 -3
- data/lib/chef/chef_fs/file_system/repository/cookbooks_dir.rb +4 -4
- data/lib/chef/chef_fs/file_system/repository/data_bag.rb +3 -3
- data/lib/chef/chef_fs/file_system/repository/data_bag_item.rb +3 -3
- data/lib/chef/chef_fs/file_system/repository/data_bags_dir.rb +3 -3
- data/lib/chef/chef_fs/file_system/repository/directory.rb +9 -5
- data/lib/chef/chef_fs/file_system/repository/environment.rb +3 -3
- data/lib/chef/chef_fs/file_system/repository/environments_dir.rb +4 -4
- data/lib/chef/chef_fs/file_system/repository/file_system_entry.rb +11 -9
- data/lib/chef/chef_fs/file_system/repository/group.rb +3 -3
- data/lib/chef/chef_fs/file_system/repository/groups_dir.rb +4 -4
- data/lib/chef/chef_fs/file_system/repository/node.rb +3 -3
- data/lib/chef/chef_fs/file_system/repository/nodes_dir.rb +6 -6
- data/lib/chef/chef_fs/file_system/repository/policies_dir.rb +4 -4
- data/lib/chef/chef_fs/file_system/repository/policy.rb +3 -3
- data/lib/chef/chef_fs/file_system/repository/policy_group.rb +3 -3
- data/lib/chef/chef_fs/file_system/repository/policy_groups_dir.rb +4 -4
- data/lib/chef/chef_fs/file_system/repository/role.rb +3 -3
- data/lib/chef/chef_fs/file_system/repository/roles_dir.rb +4 -4
- data/lib/chef/chef_fs/file_system/repository/user.rb +3 -3
- data/lib/chef/chef_fs/file_system/repository/users_dir.rb +4 -4
- data/lib/chef/chef_fs/file_system/repository/versioned_cookbooks_dir.rb +3 -3
- data/lib/chef/chef_fs/file_system.rb +36 -22
- data/lib/chef/chef_fs/file_system_cache.rb +4 -3
- data/lib/chef/chef_fs/path_utils.rb +13 -10
- data/lib/chef/chef_fs.rb +2 -2
- data/lib/chef/client.rb +327 -273
- data/lib/chef/compliance/default_attributes.rb +110 -0
- data/lib/chef/compliance/fetcher/automate.rb +73 -0
- data/lib/chef/compliance/fetcher/chef_server.rb +134 -0
- data/lib/chef/compliance/input.rb +115 -0
- data/lib/chef/compliance/input_collection.rb +139 -0
- data/lib/chef/compliance/profile.rb +122 -0
- data/lib/chef/compliance/profile_collection.rb +108 -0
- data/lib/chef/compliance/reporter/automate.rb +211 -0
- data/lib/chef/compliance/reporter/chef_server_automate.rb +99 -0
- data/lib/chef/compliance/reporter/cli.rb +77 -0
- data/lib/chef/compliance/reporter/compliance_enforcer.rb +24 -0
- data/lib/chef/compliance/reporter/json_file.rb +26 -0
- data/lib/chef/compliance/runner.rb +409 -0
- data/lib/chef/compliance/waiver.rb +115 -0
- data/lib/chef/compliance/waiver_collection.rb +143 -0
- data/lib/chef/config.rb +7 -6
- data/lib/chef/config_fetcher.rb +4 -4
- data/lib/chef/constants.rb +1 -1
- data/lib/chef/cookbook/chefignore.rb +19 -15
- data/lib/chef/cookbook/cookbook_collection.rb +3 -4
- data/lib/chef/cookbook/cookbook_version_loader.rb +91 -71
- data/lib/chef/cookbook/file_system_file_vendor.rb +4 -4
- data/lib/chef/cookbook/file_vendor.rb +2 -2
- data/lib/chef/cookbook/gem_installer.rb +12 -9
- data/lib/chef/cookbook/manifest_v0.rb +4 -3
- data/lib/chef/cookbook/manifest_v2.rb +3 -3
- data/lib/chef/cookbook/metadata.rb +92 -118
- data/lib/chef/cookbook/remote_file_vendor.rb +6 -8
- data/lib/chef/cookbook/synchronizer.rb +31 -14
- data/lib/chef/cookbook/syntax_check.rb +20 -16
- data/lib/chef/cookbook_loader.rb +130 -115
- data/lib/chef/cookbook_manifest.rb +14 -11
- data/lib/chef/cookbook_uploader.rb +16 -15
- data/lib/chef/cookbook_version.rb +104 -32
- data/lib/chef/daemon.rb +4 -4
- data/lib/chef/data_bag.rb +19 -19
- data/lib/chef/data_bag_item.rb +31 -19
- data/lib/chef/data_collector/config_validation.rb +140 -0
- data/lib/chef/data_collector/error_handlers.rb +116 -0
- data/lib/chef/data_collector/message_helpers.rb +50 -0
- data/lib/chef/data_collector/run_end_message.rb +191 -0
- data/lib/chef/data_collector/run_start_message.rb +60 -0
- data/lib/chef/data_collector.rb +189 -464
- data/lib/chef/decorator/lazy.rb +2 -2
- data/lib/chef/decorator/lazy_array.rb +4 -4
- data/lib/chef/decorator.rb +5 -6
- data/lib/chef/delayed_evaluator.rb +5 -1
- data/lib/chef/deprecated.rb +48 -20
- data/lib/chef/deprecation/warnings.rb +4 -3
- data/lib/chef/digester.rb +8 -7
- data/lib/chef/dsl/chef_vault.rb +84 -0
- data/lib/chef/dsl/cheffish.rb +1 -1
- data/lib/chef/{knife/environment_edit.rb → dsl/compliance.rb} +13 -19
- data/lib/chef/dsl/data_query.rb +7 -7
- data/lib/chef/dsl/declare_resource.rb +25 -26
- data/lib/chef/dsl/include_attribute.rb +2 -2
- data/lib/chef/dsl/include_recipe.rb +2 -8
- data/lib/chef/dsl/platform_introspection.rb +26 -30
- data/lib/chef/dsl/powershell.rb +2 -2
- data/lib/chef/{knife/node_from_file.rb → dsl/reader_helpers.rb} +24 -24
- data/lib/chef/dsl/reboot_pending.rb +9 -10
- data/lib/chef/dsl/recipe.rb +16 -21
- data/lib/chef/dsl/registry_helper.rb +1 -1
- data/lib/chef/dsl/render_helpers.rb +44 -0
- data/lib/chef/dsl/resources.rb +5 -7
- data/lib/chef/dsl/rest_resource.rb +77 -0
- data/lib/chef/dsl/secret.rb +170 -0
- data/lib/chef/dsl/toml.rb +116 -0
- data/lib/chef/dsl/universal.rb +19 -16
- data/lib/chef/dsl.rb +7 -6
- data/lib/chef/encrypted_data_bag_item/assertions.rb +4 -4
- data/lib/chef/encrypted_data_bag_item/check_encrypted.rb +3 -2
- data/lib/chef/encrypted_data_bag_item/decryption_failure.rb +1 -1
- data/lib/chef/encrypted_data_bag_item/decryptor.rb +52 -45
- data/lib/chef/encrypted_data_bag_item/encryptor.rb +11 -10
- data/lib/chef/encrypted_data_bag_item/unacceptable_encrypted_data_bag_item_format.rb +1 -1
- data/lib/chef/encrypted_data_bag_item/unsupported_cipher.rb +1 -1
- data/lib/chef/encrypted_data_bag_item/unsupported_encrypted_data_bag_item_format.rb +1 -1
- data/lib/chef/encrypted_data_bag_item.rb +13 -10
- data/lib/chef/environment.rb +19 -17
- data/lib/chef/event_dispatch/base.rb +145 -196
- data/lib/chef/event_dispatch/dispatcher.rb +50 -16
- data/lib/chef/event_dispatch/dsl.rb +3 -3
- data/lib/chef/event_loggers/base.rb +4 -3
- data/lib/chef/event_loggers/windows_eventlog.rb +8 -7
- data/lib/chef/exceptions.rb +65 -35
- data/lib/chef/file_access_control/unix.rb +9 -6
- data/lib/chef/file_access_control/windows.rb +32 -22
- data/lib/chef/file_access_control.rb +5 -5
- data/lib/chef/file_cache.rb +13 -12
- data/lib/chef/file_content_management/content_base.rb +1 -1
- data/lib/chef/file_content_management/deploy/cp.rb +1 -1
- data/lib/chef/file_content_management/deploy/mv_unix.rb +2 -2
- data/lib/chef/file_content_management/deploy/mv_windows.rb +4 -4
- data/lib/chef/file_content_management/deploy.rb +7 -7
- data/lib/chef/file_content_management/tempfile.rb +13 -13
- data/lib/chef/formatters/base.rb +11 -12
- data/lib/chef/formatters/doc.rb +91 -96
- data/lib/chef/formatters/error_description.rb +2 -2
- data/lib/chef/formatters/error_inspectors/api_error_formatting.rb +17 -15
- data/lib/chef/formatters/error_inspectors/compile_error_inspector.rb +4 -4
- data/lib/chef/formatters/error_inspectors/cookbook_resolve_error_inspector.rb +7 -6
- data/lib/chef/formatters/error_inspectors/cookbook_sync_error_inspector.rb +2 -2
- data/lib/chef/formatters/error_inspectors/node_load_error_inspector.rb +11 -10
- data/lib/chef/formatters/error_inspectors/registration_error_inspector.rb +24 -23
- data/lib/chef/formatters/error_inspectors/resource_failure_inspector.rb +31 -30
- data/lib/chef/formatters/error_inspectors/run_list_expansion_error_inspector.rb +11 -10
- data/lib/chef/formatters/error_inspectors.rb +7 -7
- data/lib/chef/formatters/error_mapper.rb +3 -3
- data/lib/chef/formatters/indentable_output_stream.rb +11 -20
- data/lib/chef/formatters/minimal.rb +31 -48
- data/lib/chef/group.rb +75 -0
- data/lib/chef/guard_interpreter/default_guard_interpreter.rb +5 -6
- data/lib/chef/guard_interpreter/resource_guard_interpreter.rb +32 -43
- data/lib/chef/guard_interpreter.rb +3 -3
- data/lib/chef/handler/error_report.rb +3 -3
- data/lib/chef/handler/json_file.rb +4 -4
- data/lib/chef/handler/slow_report.rb +66 -0
- data/lib/chef/handler.rb +52 -13
- data/lib/chef/http/api_versions.rb +4 -5
- data/lib/chef/http/auth_credentials.rb +8 -3
- data/lib/chef/http/authenticator.rb +176 -7
- data/lib/chef/http/basic_client.rb +23 -13
- data/lib/chef/http/cookie_jar.rb +2 -2
- data/lib/chef/http/cookie_manager.rb +2 -2
- data/lib/chef/http/decompressor.rb +5 -4
- data/lib/chef/http/http_request.rb +13 -9
- data/lib/chef/http/json_input.rb +2 -2
- data/lib/chef/http/json_output.rb +7 -6
- data/lib/chef/http/json_to_model_output.rb +3 -3
- data/lib/chef/http/remote_request_id.rb +3 -4
- data/lib/chef/http/simple.rb +6 -6
- data/lib/chef/http/simple_json.rb +6 -6
- data/lib/chef/http/socketless_chef_zero_client.rb +17 -12
- data/lib/chef/http/ssl_policies.rb +58 -18
- data/lib/chef/http/validate_content_length.rb +5 -5
- data/lib/chef/http.rb +72 -56
- data/lib/chef/json_compat.rb +8 -13
- data/lib/chef/key.rb +15 -13
- data/lib/chef/local_mode.rb +8 -10
- data/lib/chef/log/syslog.rb +6 -5
- data/lib/chef/log/winevt.rb +7 -7
- data/lib/chef/log.rb +12 -7
- data/lib/chef/mash.rb +21 -232
- data/lib/chef/mixin/api_version_request_handling.rb +8 -8
- data/lib/chef/mixin/checksum.rb +8 -3
- data/lib/chef/{knife/cookbook_create.rb → mixin/chef_utils_wiring.rb} +20 -9
- data/lib/chef/mixin/convert_to_class_name.rb +2 -57
- data/lib/chef/mixin/create_path.rb +11 -11
- data/lib/chef/mixin/deep_merge.rb +41 -24
- data/lib/chef/{resource/user/dscl_user.rb → mixin/default_paths.rb} +9 -8
- data/lib/chef/mixin/deprecation.rb +1 -1
- data/lib/chef/mixin/enforce_ownership_and_permissions.rb +2 -2
- data/lib/chef/mixin/file_class.rb +3 -3
- data/lib/chef/mixin/from_file.rb +3 -3
- data/lib/chef/mixin/get_source_from_package.rb +3 -2
- data/lib/chef/mixin/homebrew_user.rb +6 -5
- data/lib/chef/mixin/lazy_module_include.rb +1 -1
- data/lib/chef/mixin/notifying_block.rb +1 -1
- data/lib/chef/mixin/openssl_helper.rb +69 -23
- data/lib/chef/mixin/params_validate.rb +26 -18
- data/lib/chef/mixin/path_sanity.rb +5 -40
- data/lib/chef/mixin/powershell_exec.rb +17 -16
- data/lib/chef/mixin/powershell_out.rb +16 -9
- data/lib/chef/mixin/powershell_type_coercions.rb +3 -3
- data/lib/chef/mixin/properties.rb +75 -18
- data/lib/chef/mixin/provides.rb +1 -1
- data/lib/chef/mixin/proxified_socket.rb +1 -1
- data/lib/chef/mixin/securable.rb +12 -12
- data/lib/chef/mixin/shell_out.rb +5 -235
- data/lib/chef/mixin/subclass_directive.rb +1 -1
- data/lib/chef/mixin/template.rb +8 -6
- data/lib/chef/mixin/unformatter.rb +2 -2
- data/lib/chef/mixin/uris.rb +5 -3
- data/lib/chef/mixin/user_context.rb +4 -4
- data/lib/chef/mixin/versioned_api.rb +2 -3
- data/lib/chef/mixin/which.rb +13 -26
- data/lib/chef/mixin/why_run.rb +9 -3
- data/lib/chef/mixin/wide_string.rb +1 -1
- data/lib/chef/mixin/windows_architecture_helper.rb +12 -12
- data/lib/chef/mixin/windows_env_helper.rb +10 -10
- data/lib/chef/mixin/xml_escape.rb +8 -8
- data/lib/chef/mixins.rb +13 -12
- data/lib/chef/monkey_patches/webrick-utils.rb +16 -14
- data/lib/chef/monkey_patches/win32/registry.rb +4 -30
- data/lib/chef/monologger.rb +1 -1
- data/lib/chef/node/attribute.rb +178 -146
- data/lib/chef/node/attribute_collections.rb +25 -56
- data/lib/chef/node/common_api.rb +12 -4
- data/lib/chef/node/immutable_collections.rb +32 -7
- data/lib/chef/node/mixin/deep_merge_cache.rb +22 -18
- data/lib/chef/node/mixin/immutablize_array.rb +148 -143
- data/lib/chef/node/mixin/immutablize_hash.rb +137 -131
- data/lib/chef/node/mixin/mashy_array.rb +68 -0
- data/lib/chef/node/mixin/state_tracking.rb +1 -1
- data/lib/chef/node.rb +147 -61
- data/lib/chef/node_map.rb +66 -50
- data/lib/chef/null_logger.rb +9 -17
- data/lib/chef/org.rb +10 -9
- data/lib/chef/platform/priority_map.rb +6 -6
- data/lib/chef/platform/provider_handler_map.rb +3 -3
- data/lib/chef/platform/provider_mapping.rb +6 -6
- data/lib/chef/platform/provider_priority_map.rb +2 -2
- data/lib/chef/platform/query_helpers.rb +16 -39
- data/lib/chef/platform/rebooter.rb +7 -7
- data/lib/chef/platform/resource_handler_map.rb +3 -3
- data/lib/chef/platform/resource_priority_map.rb +2 -2
- data/lib/chef/platform/service_helpers.rb +27 -92
- data/lib/chef/platform.rb +3 -3
- data/lib/chef/policy_builder/dynamic.rb +11 -8
- data/lib/chef/policy_builder/expand_node_object.rb +45 -37
- data/lib/chef/policy_builder/policyfile.rb +112 -66
- data/lib/chef/policy_builder.rb +4 -4
- data/lib/chef/powershell.rb +34 -10
- data/lib/chef/property.rb +69 -23
- data/lib/chef/provider/batch.rb +5 -12
- data/lib/chef/provider/cookbook_file/content.rb +3 -3
- data/lib/chef/provider/cookbook_file.rb +3 -2
- data/lib/chef/provider/cron/aix.rb +11 -4
- data/lib/chef/provider/cron/solaris.rb +2 -2
- data/lib/chef/provider/cron/unix.rb +4 -5
- data/lib/chef/provider/cron.rb +75 -45
- data/lib/chef/provider/directory.rb +16 -16
- data/lib/chef/provider/dsc_resource.rb +19 -32
- data/lib/chef/provider/dsc_script.rb +23 -27
- data/lib/chef/provider/execute.rb +11 -15
- data/lib/chef/provider/file/content.rb +3 -3
- data/lib/chef/provider/file.rb +41 -33
- data/lib/chef/provider/git.rb +108 -42
- data/lib/chef/provider/group/aix.rb +3 -1
- data/lib/chef/provider/group/dscl.rb +10 -7
- data/lib/chef/provider/group/gpasswd.rb +2 -2
- data/lib/chef/provider/group/groupadd.rb +5 -4
- data/lib/chef/provider/group/groupmod.rb +4 -4
- data/lib/chef/provider/group/pw.rb +5 -5
- data/lib/chef/provider/group/solaris.rb +62 -0
- data/lib/chef/provider/group/usermod.rb +5 -10
- data/lib/chef/provider/group/windows.rb +16 -5
- data/lib/chef/provider/group.rb +28 -18
- data/lib/chef/provider/http_request.rb +21 -19
- data/lib/chef/provider/ifconfig/aix.rb +3 -2
- data/lib/chef/provider/ifconfig/debian.rb +42 -25
- data/lib/chef/provider/ifconfig/redhat.rb +56 -20
- data/lib/chef/provider/ifconfig.rb +38 -35
- data/lib/chef/provider/launchd.rb +57 -81
- data/lib/chef/provider/link.rb +17 -26
- data/lib/chef/provider/lwrp_base.rb +6 -7
- data/lib/chef/provider/mount/aix.rb +12 -12
- data/lib/chef/provider/mount/linux.rb +86 -0
- data/lib/chef/provider/mount/mount.rb +61 -54
- data/lib/chef/provider/mount/solaris.rb +9 -10
- data/lib/chef/provider/mount/windows.rb +6 -6
- data/lib/chef/provider/mount.rb +37 -16
- data/lib/chef/provider/noop.rb +2 -2
- data/lib/chef/provider/package/apt.rb +42 -30
- data/lib/chef/provider/package/bff.rb +5 -4
- data/lib/chef/provider/package/cab.rb +15 -14
- data/lib/chef/provider/package/chocolatey.rb +39 -39
- data/lib/chef/provider/package/deb.rb +131 -0
- data/lib/chef/provider/package/dnf/dnf_helper.py +107 -30
- data/lib/chef/provider/package/dnf/python_helper.rb +97 -49
- data/lib/chef/provider/package/dnf/version.rb +6 -2
- data/lib/chef/provider/package/dnf.rb +109 -26
- data/lib/chef/provider/package/dpkg.rb +15 -38
- data/lib/chef/provider/package/freebsd/base.rb +10 -7
- data/lib/chef/provider/package/freebsd/pkgng.rb +7 -5
- data/lib/chef/provider/package/freebsd/port.rb +2 -6
- data/lib/chef/provider/package/habitat.rb +168 -0
- data/lib/chef/provider/package/homebrew.rb +110 -47
- data/lib/chef/provider/package/ips.rb +4 -4
- data/lib/chef/provider/package/macports.rb +1 -2
- data/lib/chef/provider/package/msu.rb +15 -10
- data/lib/chef/provider/package/openbsd.rb +6 -6
- data/lib/chef/provider/package/pacman.rb +27 -36
- data/lib/chef/provider/package/paludis.rb +4 -3
- data/lib/chef/provider/package/portage.rb +11 -10
- data/lib/chef/provider/package/powershell.rb +29 -17
- data/lib/chef/provider/package/rpm.rb +6 -5
- data/lib/chef/provider/package/rubygems.rb +84 -57
- data/lib/chef/provider/package/smartos.rb +4 -3
- data/lib/chef/provider/package/snap.rb +427 -0
- data/lib/chef/provider/package/solaris.rb +6 -6
- data/lib/chef/provider/package/windows/exe.rb +7 -7
- data/lib/chef/provider/package/windows/msi.rb +14 -13
- data/lib/chef/provider/package/windows/registry_uninstall_entry.rb +14 -11
- data/lib/chef/provider/package/windows.rb +40 -61
- data/lib/chef/provider/package/yum/python_helper.rb +126 -46
- data/lib/chef/provider/package/yum/rpm_utils.rb +13 -23
- data/lib/chef/provider/package/yum/version.rb +5 -1
- data/lib/chef/provider/package/yum/yum_cache.rb +5 -5
- data/lib/chef/provider/package/yum/yum_helper.py +72 -91
- data/lib/chef/provider/package/yum.rb +57 -40
- data/lib/chef/provider/package/zypper/version.rb +60 -0
- data/lib/chef/provider/package/zypper.rb +147 -75
- data/lib/chef/provider/package.rb +141 -159
- data/lib/chef/provider/powershell_script.rb +48 -61
- data/lib/chef/provider/registry_key.rb +22 -20
- data/lib/chef/provider/remote_directory.rb +18 -18
- data/lib/chef/provider/remote_file/cache_control_data.rb +6 -6
- data/lib/chef/provider/remote_file/content.rb +8 -5
- data/lib/chef/provider/remote_file/fetcher.rb +4 -3
- data/lib/chef/provider/remote_file/ftp.rb +10 -7
- data/lib/chef/provider/remote_file/http.rb +9 -6
- data/lib/chef/provider/remote_file/local_file.rb +7 -6
- data/lib/chef/provider/remote_file/network_file.rb +4 -4
- data/lib/chef/provider/remote_file/sftp.rb +10 -7
- data/lib/chef/provider/remote_file.rb +12 -11
- data/lib/chef/provider/route.rb +55 -55
- data/lib/chef/provider/ruby_block.rb +3 -3
- data/lib/chef/provider/script.rb +7 -82
- data/lib/chef/provider/service/aix.rb +2 -2
- data/lib/chef/provider/service/aixinit.rb +5 -5
- data/lib/chef/provider/service/arch.rb +7 -6
- data/lib/chef/provider/service/debian.rb +53 -49
- data/lib/chef/provider/service/freebsd.rb +19 -25
- data/lib/chef/provider/service/gentoo.rb +5 -5
- data/lib/chef/provider/service/init.rb +4 -4
- data/lib/chef/provider/service/insserv.rb +6 -6
- data/lib/chef/provider/service/invokercd.rb +5 -5
- data/lib/chef/provider/service/macosx.rb +32 -26
- data/lib/chef/provider/service/openbsd.rb +11 -14
- data/lib/chef/provider/service/redhat.rb +13 -13
- data/lib/chef/provider/service/simple.rb +7 -6
- data/lib/chef/provider/service/solaris.rb +3 -3
- data/lib/chef/provider/service/systemd.rb +62 -32
- data/lib/chef/provider/service/upstart.rb +11 -21
- data/lib/chef/provider/service/windows.rb +56 -64
- data/lib/chef/provider/service.rb +29 -26
- data/lib/chef/provider/subversion.rb +50 -29
- data/lib/chef/provider/support/yum_repo.erb +2 -2
- data/lib/chef/provider/support/zypper_repo.erb +4 -2
- data/lib/chef/provider/systemd_unit.rb +68 -41
- data/lib/chef/provider/template/content.rb +7 -10
- data/lib/chef/provider/template.rb +5 -4
- data/lib/chef/provider/template_finder.rb +3 -11
- data/lib/chef/provider/user/aix.rb +13 -5
- data/lib/chef/provider/user/dscl.rb +66 -141
- data/lib/chef/provider/user/linux.rb +41 -6
- data/lib/chef/provider/user/mac.rb +677 -0
- data/lib/chef/provider/user/pw.rb +4 -3
- data/lib/chef/provider/user/solaris.rb +6 -4
- data/lib/chef/provider/user/windows.rb +19 -13
- data/lib/chef/provider/user.rb +78 -30
- data/lib/chef/provider/whyrun_safe_ruby_block.rb +1 -1
- data/lib/chef/provider/windows_script.rb +91 -29
- data/lib/chef/provider/yum_repository.rb +46 -51
- data/lib/chef/provider/zypper_repository.rb +70 -55
- data/lib/chef/provider.rb +121 -47
- data/lib/chef/provider_resolver.rb +11 -5
- data/lib/chef/providers.rb +111 -120
- data/lib/chef/pwsh.rb +72 -0
- data/lib/chef/recipe.rb +43 -21
- data/lib/chef/request_id.rb +3 -3
- data/lib/chef/resource/_rest_resource.rb +389 -0
- data/lib/chef/resource/action_class.rb +28 -26
- data/lib/chef/resource/alternatives.rb +209 -0
- data/lib/chef/resource/apt_package.rb +50 -10
- data/lib/chef/resource/apt_preference.rb +109 -14
- data/lib/chef/resource/apt_repository.rb +426 -27
- data/lib/chef/resource/apt_update.rb +73 -6
- data/lib/chef/resource/archive_file.rb +206 -0
- data/lib/chef/resource/bash.rb +124 -4
- data/lib/chef/resource/batch.rb +8 -5
- data/lib/chef/resource/bff_package.rb +33 -4
- data/lib/chef/resource/breakpoint.rb +64 -6
- data/lib/chef/resource/build_essential.rb +102 -62
- data/lib/chef/resource/cab_package.rb +48 -13
- data/lib/chef/resource/chef_client_config.rb +341 -0
- data/lib/chef/resource/chef_client_cron.rb +234 -0
- data/lib/chef/resource/chef_client_launchd.rb +194 -0
- data/lib/chef/resource/chef_client_scheduled_task.rb +259 -0
- data/lib/chef/resource/chef_client_systemd_timer.rb +186 -0
- data/lib/chef/resource/chef_client_trusted_certificate.rb +101 -0
- data/lib/chef/resource/chef_gem.rb +69 -34
- data/lib/chef/resource/chef_handler.rb +165 -19
- data/lib/chef/resource/chef_sleep.rb +70 -0
- data/lib/chef/resource/chef_vault_secret.rb +129 -0
- data/lib/chef/resource/chocolatey_config.rb +28 -14
- data/lib/chef/resource/chocolatey_feature.rb +92 -0
- data/lib/chef/resource/chocolatey_package.rb +45 -13
- data/lib/chef/resource/chocolatey_source.rb +81 -13
- data/lib/chef/resource/conditional.rb +3 -3
- data/lib/chef/resource/cookbook_file.rb +12 -10
- data/lib/chef/resource/cron/_cron_shared.rb +98 -0
- data/lib/chef/resource/cron/cron.rb +119 -0
- data/lib/chef/resource/cron/cron_d.rb +201 -0
- data/lib/chef/resource/cron_access.rb +44 -15
- data/lib/chef/resource/csh.rb +8 -6
- data/lib/chef/resource/directory.rb +9 -8
- data/lib/chef/resource/dmg_package.rb +71 -43
- data/lib/chef/resource/dnf_package.rb +28 -31
- data/lib/chef/resource/dpkg_package.rb +18 -5
- data/lib/chef/resource/dsc_resource.rb +14 -13
- data/lib/chef/resource/dsc_script.rb +23 -10
- data/lib/chef/resource/execute.rb +520 -46
- data/lib/chef/resource/file/verification/json.rb +50 -0
- data/lib/chef/resource/file/verification/systemd_unit.rb +3 -2
- data/lib/chef/resource/file/verification/yaml.rb +52 -0
- data/lib/chef/resource/file/verification.rb +11 -6
- data/lib/chef/resource/file.rb +26 -20
- data/lib/chef/resource/freebsd_package.rb +10 -29
- data/lib/chef/resource/gem_package.rb +59 -15
- data/lib/chef/resource/group.rb +40 -14
- data/lib/chef/{knife/recipe_list.rb → resource/habitat/_habitat_shared.rb} +13 -17
- data/lib/chef/resource/habitat/habitat_package.rb +128 -0
- data/lib/chef/resource/habitat/habitat_sup.rb +328 -0
- data/lib/chef/resource/habitat/habitat_sup_systemd.rb +67 -0
- data/lib/chef/resource/habitat/habitat_sup_windows.rb +90 -0
- data/lib/chef/resource/habitat_config.rb +106 -0
- data/lib/chef/resource/habitat_install.rb +246 -0
- data/lib/chef/resource/habitat_service.rb +450 -0
- data/lib/chef/resource/habitat_user_toml.rb +91 -0
- data/lib/chef/resource/helpers/cron_validations.rb +101 -0
- data/lib/chef/resource/homebrew_cask.rb +46 -36
- data/lib/chef/resource/homebrew_package.rb +39 -7
- data/lib/chef/resource/homebrew_tap.rb +27 -31
- data/lib/chef/resource/homebrew_update.rb +108 -0
- data/lib/chef/resource/hostname.rb +128 -88
- data/lib/chef/resource/http_request.rb +5 -5
- data/lib/chef/resource/ifconfig.rb +83 -35
- data/lib/chef/resource/inspec_input.rb +126 -0
- data/lib/chef/resource/inspec_waiver.rb +183 -0
- data/lib/chef/resource/inspec_waiver_file_entry.rb +155 -0
- data/lib/chef/resource/ips_package.rb +15 -8
- data/lib/chef/resource/kernel_module.rb +80 -36
- data/lib/chef/resource/ksh.rb +9 -6
- data/lib/chef/resource/launchd.rb +114 -110
- data/lib/chef/resource/link.rb +18 -40
- data/lib/chef/resource/locale.rb +145 -57
- data/lib/chef/resource/log.rb +21 -8
- data/lib/chef/resource/lwrp_base.rb +31 -16
- data/lib/chef/resource/macos_userdefaults.rb +112 -83
- data/lib/chef/resource/macosx_service.rb +4 -8
- data/lib/chef/resource/macports_package.rb +13 -4
- data/lib/chef/resource/mdadm.rb +122 -17
- data/lib/chef/resource/mount.rb +37 -28
- data/lib/chef/resource/msu_package.rb +28 -12
- data/lib/chef/resource/notify_group.rb +72 -0
- data/lib/chef/resource/ohai.rb +66 -9
- data/lib/chef/resource/ohai_hint.rb +46 -23
- data/lib/chef/resource/openbsd_package.rb +31 -8
- data/lib/chef/resource/openssl_dhparam.rb +53 -23
- data/lib/chef/resource/openssl_ec_private_key.rb +49 -27
- data/lib/chef/resource/openssl_ec_public_key.rb +37 -20
- data/lib/chef/resource/openssl_rsa_private_key.rb +47 -27
- data/lib/chef/resource/openssl_rsa_public_key.rb +38 -19
- data/lib/chef/resource/openssl_x509_certificate.rb +139 -98
- data/lib/chef/resource/openssl_x509_crl.rb +46 -30
- data/lib/chef/resource/openssl_x509_request.rb +84 -52
- data/lib/chef/resource/osx_profile.rb +297 -11
- data/lib/chef/resource/package.rb +13 -21
- data/lib/chef/resource/pacman_package.rb +5 -3
- data/lib/chef/resource/paludis_package.rb +16 -8
- data/lib/chef/resource/perl.rb +8 -6
- data/lib/chef/resource/plist.rb +226 -0
- data/lib/chef/resource/portage_package.rb +17 -6
- data/lib/chef/resource/powershell_package.rb +11 -14
- data/lib/chef/resource/powershell_package_source.rb +246 -83
- data/lib/chef/resource/powershell_script.rb +46 -22
- data/lib/chef/resource/python.rb +8 -6
- data/lib/chef/resource/reboot.rb +84 -10
- data/lib/chef/resource/registry_key.rb +128 -47
- data/lib/chef/resource/remote_directory.rb +44 -45
- data/lib/chef/resource/remote_file.rb +141 -27
- data/lib/chef/resource/resource_notification.rb +6 -5
- data/lib/chef/resource/rhsm_errata.rb +28 -12
- data/lib/chef/resource/rhsm_errata_level.rb +25 -16
- data/lib/chef/resource/rhsm_register.rb +122 -41
- data/lib/chef/resource/rhsm_repo.rb +25 -14
- data/lib/chef/resource/rhsm_subscription.rb +16 -20
- data/lib/chef/resource/route.rb +30 -17
- data/lib/chef/resource/rpm_package.rb +15 -4
- data/lib/chef/resource/ruby.rb +6 -8
- data/lib/chef/resource/ruby_block.rb +109 -8
- data/lib/chef/resource/scm/_scm.rb +48 -0
- data/lib/chef/resource/scm/git.rb +142 -0
- data/lib/chef/resource/scm/subversion.rb +71 -0
- data/lib/chef/resource/script.rb +13 -9
- data/lib/chef/resource/selinux/common_helpers.rb +47 -0
- data/lib/chef/resource/selinux/selinux_debian.erb +18 -0
- data/lib/chef/resource/selinux/selinux_default.erb +15 -0
- data/lib/chef/resource/selinux_boolean.rb +101 -0
- data/lib/chef/resource/selinux_fcontext.rb +160 -0
- data/lib/chef/resource/selinux_install.rb +107 -0
- data/lib/chef/resource/selinux_module.rb +143 -0
- data/lib/chef/resource/selinux_permissive.rb +64 -0
- data/lib/chef/resource/selinux_port.rb +118 -0
- data/lib/chef/resource/selinux_state.rb +166 -0
- data/lib/chef/resource/service.rb +64 -162
- data/lib/chef/resource/smartos_package.rb +13 -4
- data/lib/chef/{knife/data_bag_list.rb → resource/snap_package.rb} +14 -17
- data/lib/chef/resource/solaris_package.rb +13 -6
- data/lib/chef/resource/ssh_known_hosts_entry.rb +47 -33
- data/lib/chef/resource/sudo.rb +92 -60
- data/lib/chef/resource/support/HabService.dll.config.erb +19 -0
- data/lib/chef/resource/support/client.erb +77 -0
- 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/sup.toml.erb +179 -0
- data/lib/chef/resource/support/ulimit.erb +41 -0
- data/lib/chef/resource/swap_file.rb +35 -21
- data/lib/chef/resource/sysctl.rb +115 -38
- data/lib/chef/resource/systemd_unit.rb +60 -17
- data/lib/chef/resource/template.rb +15 -14
- data/lib/chef/resource/timezone.rb +128 -88
- data/lib/chef/resource/user/aix_user.rb +2 -3
- data/lib/chef/resource/user/linux_user.rb +2 -3
- data/lib/chef/resource/user/mac_user.rb +121 -0
- data/lib/chef/resource/user/pw_user.rb +2 -3
- data/lib/chef/resource/user/solaris_user.rb +2 -3
- data/lib/chef/resource/user/windows_user.rb +9 -5
- data/lib/chef/resource/user.rb +55 -127
- data/lib/chef/resource/user_ulimit.rb +116 -0
- data/lib/chef/resource/whyrun_safe_ruby_block.rb +1 -0
- data/lib/chef/resource/windows_ad_join.rb +149 -33
- data/lib/chef/resource/windows_audit_policy.rb +230 -0
- data/lib/chef/resource/windows_auto_run.rb +26 -18
- data/lib/chef/resource/windows_certificate.rb +319 -120
- data/lib/chef/resource/windows_defender.rb +162 -0
- data/lib/chef/resource/windows_defender_exclusion.rb +124 -0
- data/lib/chef/resource/windows_dfs_folder.rb +72 -0
- data/lib/chef/resource/windows_dfs_namespace.rb +110 -0
- data/lib/chef/resource/windows_dfs_server.rb +77 -0
- data/lib/chef/resource/windows_dns_record.rb +90 -0
- data/lib/chef/resource/windows_dns_zone.rb +79 -0
- data/lib/chef/resource/windows_env.rb +190 -9
- data/lib/chef/resource/windows_feature.rb +77 -25
- data/lib/chef/resource/windows_feature_dism.rb +57 -53
- data/lib/chef/resource/windows_feature_powershell.rb +88 -110
- data/lib/chef/resource/windows_firewall_profile.rb +194 -0
- data/lib/chef/resource/windows_firewall_rule.rb +193 -62
- data/lib/chef/resource/windows_font.rb +24 -17
- data/lib/chef/resource/windows_package.rb +129 -18
- data/lib/chef/resource/windows_pagefile.rb +147 -75
- data/lib/chef/resource/windows_path.rb +59 -6
- data/lib/chef/resource/windows_printer.rb +122 -84
- data/lib/chef/resource/windows_printer_port.rb +93 -81
- data/lib/chef/resource/windows_script.rb +7 -22
- data/lib/chef/resource/windows_security_policy.rb +167 -0
- data/lib/chef/resource/windows_service.rb +173 -58
- data/lib/chef/resource/windows_share.rb +87 -74
- data/lib/chef/resource/windows_shortcut.rb +26 -18
- data/lib/chef/resource/windows_task.rb +833 -90
- data/lib/chef/resource/windows_uac.rb +113 -0
- data/lib/chef/resource/windows_update_settings.rb +258 -0
- data/lib/chef/resource/windows_user_privilege.rb +232 -0
- data/lib/chef/resource/windows_workgroup.rb +42 -26
- data/lib/chef/resource/yum_package.rb +120 -37
- data/lib/chef/resource/yum_repository.rb +85 -59
- data/lib/chef/resource/zypper_package.rb +41 -11
- data/lib/chef/resource/zypper_repository.rb +68 -36
- data/lib/chef/resource.rb +172 -126
- data/lib/chef/resource_builder.rb +21 -6
- data/lib/chef/resource_collection/resource_collection_serialization.rb +6 -5
- data/lib/chef/resource_collection/resource_list.rb +10 -8
- data/lib/chef/resource_collection/resource_set.rb +20 -20
- data/lib/chef/resource_collection/stepable_iterator.rb +2 -2
- data/lib/chef/resource_collection.rb +12 -10
- data/lib/chef/resource_definition.rb +8 -6
- data/lib/chef/resource_definition_list.rb +4 -4
- data/lib/chef/resource_inspector.rb +95 -77
- data/lib/chef/resource_reporter.rb +47 -141
- data/lib/chef/resource_resolver.rb +11 -18
- data/lib/chef/resources.rb +176 -130
- data/lib/chef/role.rb +21 -20
- data/lib/chef/run_context/cookbook_compiler.rb +176 -65
- data/lib/chef/run_context.rb +127 -36
- data/lib/chef/run_list/run_list_expansion.rb +9 -8
- data/lib/chef/run_list/run_list_item.rb +6 -6
- data/lib/chef/run_list/versioned_recipe_list.rb +4 -4
- data/lib/chef/run_list.rb +10 -9
- data/lib/chef/run_lock.rb +14 -13
- data/lib/chef/run_status.rb +5 -8
- data/lib/chef/runner.rb +10 -10
- data/lib/chef/scan_access_control.rb +2 -2
- data/lib/chef/search/query.rb +15 -17
- data/lib/chef/secret_fetcher/akeyless_vault.rb +57 -0
- data/lib/chef/secret_fetcher/aws_secrets_manager.rb +65 -0
- data/lib/chef/secret_fetcher/azure_key_vault.rb +134 -0
- data/lib/chef/secret_fetcher/base.rb +76 -0
- data/lib/chef/secret_fetcher/example.rb +46 -0
- data/lib/chef/secret_fetcher/hashi_vault.rb +134 -0
- data/lib/chef/secret_fetcher.rb +60 -0
- data/lib/chef/server_api.rb +11 -15
- data/lib/chef/server_api_versions.rb +6 -2
- data/lib/chef/shell/ext.rb +29 -30
- data/lib/chef/shell/model_wrapper.rb +5 -4
- data/lib/chef/shell/shell_session.rb +16 -13
- data/lib/chef/shell.rb +105 -47
- data/lib/chef/{audit/logger.rb → train_transport.rb} +8 -15
- data/lib/chef/user.rb +14 -15
- data/lib/chef/user_v1.rb +26 -25
- data/lib/chef/util/backup.rb +4 -4
- data/lib/chef/util/diff.rb +24 -22
- data/lib/chef/util/dsc/configuration_generator.rb +59 -17
- data/lib/chef/util/dsc/lcm_output_parser.rb +13 -16
- data/lib/chef/util/dsc/local_configuration_manager.rb +23 -20
- data/lib/chef/util/dsc/resource_store.rb +7 -13
- data/lib/chef/util/editor.rb +1 -1
- data/lib/chef/util/file_edit.rb +4 -3
- data/lib/chef/util/path_helper.rb +1 -1
- data/lib/chef/util/powershell/ps_credential.rb +20 -16
- data/lib/chef/util/selinux.rb +5 -5
- data/lib/chef/util/threaded_job_queue.rb +2 -4
- data/lib/chef/util/windows/logon_session.rb +8 -8
- data/lib/chef/util/windows/net_group.rb +2 -2
- data/lib/chef/util/windows/net_use.rb +4 -4
- data/lib/chef/util/windows/net_user.rb +8 -7
- data/lib/chef/util/windows/volume.rb +3 -3
- data/lib/chef/version/platform.rb +1 -1
- data/lib/chef/version.rb +4 -4
- data/lib/chef/version_class.rb +2 -2
- data/lib/chef/version_constraint/platform.rb +2 -2
- data/lib/chef/version_constraint.rb +4 -4
- data/lib/chef/version_string.rb +3 -126
- data/lib/chef/win32/api/command_line_helper.rb +89 -0
- data/lib/chef/win32/api/crypto.rb +13 -13
- data/lib/chef/win32/api/error.rb +9 -7
- data/lib/chef/win32/api/file.rb +66 -62
- data/lib/chef/win32/api/installer.rb +8 -8
- data/lib/chef/win32/api/memory.rb +6 -6
- data/lib/chef/win32/api/net.rb +42 -41
- data/lib/chef/win32/api/process.rb +4 -4
- data/lib/chef/win32/api/psapi.rb +3 -3
- data/lib/chef/win32/api/registry.rb +5 -5
- data/lib/chef/win32/api/security.rb +95 -89
- data/lib/chef/win32/api/synchronization.rb +7 -7
- data/lib/chef/win32/api/system.rb +9 -9
- data/lib/chef/win32/api/unicode.rb +5 -5
- data/lib/chef/win32/api.rb +15 -8
- data/lib/chef/win32/crypto.rb +6 -6
- data/lib/chef/win32/error.rb +6 -6
- data/lib/chef/win32/eventlog.rb +4 -4
- data/lib/chef/win32/file/info.rb +3 -2
- data/lib/chef/win32/file/version_info.rb +22 -21
- data/lib/chef/win32/file.rb +19 -24
- data/lib/chef/win32/handle.rb +11 -12
- data/lib/chef/win32/memory.rb +4 -4
- data/lib/chef/win32/mutex.rb +5 -5
- data/lib/chef/win32/net.rb +13 -8
- data/lib/chef/win32/process.rb +8 -8
- data/lib/chef/win32/registry.rb +24 -15
- data/lib/chef/win32/security/ace.rb +5 -5
- data/lib/chef/win32/security/acl.rb +6 -5
- data/lib/chef/win32/security/securable_object.rb +4 -4
- data/lib/chef/win32/security/security_descriptor.rb +8 -6
- data/lib/chef/win32/security/sid.rb +20 -19
- data/lib/chef/win32/security/token.rb +8 -6
- data/lib/chef/win32/security.rb +61 -18
- data/lib/chef/win32/system.rb +4 -4
- data/lib/chef/win32/unicode.rb +4 -4
- data/lib/chef/win32/version.rb +10 -8
- data/lib/chef/workstation_config_loader.rb +1 -1
- data/lib/chef.rb +15 -15
- data/spec/data/archive_file/test_archive.tar.gz +0 -0
- data/spec/data/chef_guid +1 -0
- data/spec/data/cookbooks/apache2/metadata.json +33 -0
- data/spec/data/cookbooks/irssi/files/default/irssi.response +2 -0
- data/spec/data/cookbooks/java/metadata.json +33 -0
- data/spec/data/cookbooks/openldap/libraries/openldap.rb +1 -1
- data/spec/data/cookbooks/starter/chefignore +8 -0
- data/spec/data/cookbooks/starter/files/sample.txt +1 -0
- data/spec/data/cookbooks/starter/metadata.rb +2 -0
- data/spec/data/cookbooks/starter/recipes/default.rb +4 -0
- data/spec/data/cookbooks/wget/files/default/wget.response +2 -0
- data/spec/data/lwrp/providers/buck_passer.rb +1 -1
- data/spec/data/lwrp/providers/buck_passer_2.rb +1 -1
- data/spec/data/lwrp/providers/embedded_resource_accesses_providers_scope.rb +1 -1
- data/spec/data/lwrp/resources/bar.rb +2 -0
- data/spec/data/lwrp/resources/buck_passer.rb +1 -0
- data/spec/data/lwrp/resources/buck_passer_2.rb +1 -0
- data/spec/data/lwrp/resources/embedded_resource_accesses_providers_scope.rb +1 -0
- data/spec/data/lwrp/resources/foo.rb +2 -0
- data/spec/data/lwrp/resources/inline_compiler.rb +1 -0
- data/spec/data/lwrp/resources/monkey_name_printer.rb +1 -0
- data/spec/data/lwrp/resources/paint_drying_watcher.rb +1 -0
- data/spec/data/lwrp/resources/thumb_twiddler.rb +1 -0
- data/spec/data/lwrp/resources_with_default_attributes/nodeattr.rb +2 -0
- data/spec/data/lwrp_const_scoping/resources/conflict.rb +1 -0
- data/spec/data/lwrp_override/resources/foo.rb +1 -0
- data/spec/data/nodes/mcwfhpowell.json +3 -0
- data/spec/data/rubygems.org/latest_specs.4.8.gz +0 -0
- data/spec/data/rubygems.org/nonexistent_gem +0 -0
- data/spec/data/rubygems.org/nonexistent_gem-info +1 -0
- data/spec/data/rubygems.org/sexp_processor +0 -0
- data/spec/data/rubygems.org/sexp_processor-4.15.1.gemspec.rz +0 -0
- data/spec/data/rubygems.org/sexp_processor-info +50 -0
- data/spec/data/run_context/cookbooks/circular-dep1/resources/resource.rb +1 -0
- data/spec/data/run_context/cookbooks/circular-dep2/resources/resource.rb +1 -0
- data/spec/data/run_context/cookbooks/dependency1/attributes/unparsed_file +1 -0
- data/spec/data/run_context/cookbooks/dependency1/definitions/unparsed_file +1 -0
- data/spec/data/run_context/cookbooks/dependency1/libraries/unparsed_file +1 -0
- data/spec/data/run_context/cookbooks/dependency1/providers/unparsed_file +1 -0
- data/spec/data/run_context/cookbooks/dependency1/recipes/unparsed_file +1 -0
- data/spec/data/run_context/cookbooks/dependency1/resources/resource.rb +1 -0
- data/spec/data/run_context/cookbooks/dependency1/resources/unparsed_file +1 -0
- data/spec/data/run_context/cookbooks/dependency2/resources/resource.rb +1 -0
- data/spec/data/run_context/cookbooks/no-default-attr/resources/resource.rb +1 -0
- data/spec/data/run_context/cookbooks/test/resources/resource.rb +2 -0
- data/spec/data/run_context/cookbooks/test-with-circular-deps/resources/resource.rb +2 -0
- data/spec/data/run_context/cookbooks/test-with-deps/resources/resource.rb +1 -0
- data/spec/data/shef-config.rb +2 -2
- data/spec/data/snap_package/async_result_success.json +6 -0
- data/spec/data/snap_package/change_id_result.json +175 -0
- data/spec/data/snap_package/find_result_failure.json +10 -0
- data/spec/data/snap_package/find_result_success.json +70 -0
- data/spec/data/snap_package/get_by_name_result_failure.json +10 -0
- data/spec/data/snap_package/get_by_name_result_success.json +38 -0
- data/spec/data/snap_package/get_conf_success.json +10 -0
- data/spec/data/snap_package/result_failure.json +9 -0
- data/spec/data/ssl/binary/chef-rspec-der.cert +0 -0
- data/spec/data/ssl/binary/chef-rspec-der.key +0 -0
- data/spec/data/ssl/chef-rspec.cert +15 -15
- data/spec/data/windows_certificates/base64_test.cer +18 -20
- data/spec/data/windows_certificates/othertest.cer +0 -0
- data/spec/data/windows_certificates/test.cer +0 -0
- data/spec/data/windows_certificates/test.p7b +0 -0
- data/spec/data/windows_certificates/test.pem +18 -19
- data/spec/data/windows_certificates/test.pfx +0 -0
- data/spec/functional/application_spec.rb +1 -1
- data/spec/functional/assets/inittest +8 -7
- data/spec/functional/assets/yumrepo-empty/repodata/01a3b489a465bcac22a43492163df43451dc6ce47d27f66de289756b91635523-filelists.sqlite.bz2 +0 -0
- data/spec/functional/assets/yumrepo-empty/repodata/401dc19bda88c82c403423fb835844d64345f7e95f5b9835888189c03834cc93-filelists.xml.gz +0 -0
- data/spec/functional/assets/yumrepo-empty/repodata/5dc1e6e73c84803f059bb3065e684e56adfc289a7e398946574d79dac6643945-primary.sqlite.bz2 +0 -0
- data/spec/functional/assets/yumrepo-empty/repodata/6bf9672d0862e8ef8b8ff05a2fd0208a922b1f5978e6589d87944c88259cb670-other.xml.gz +0 -0
- data/spec/functional/assets/yumrepo-empty/repodata/7c36572015e075add2b38b900837bcdbb8a504130ddff49b2351a7fc0affa3d4-other.sqlite.bz2 +0 -0
- data/spec/functional/assets/yumrepo-empty/repodata/dabe2ce5481d23de1f4f52bdcfee0f9af98316c9e0de2ce8123adeefa0dd08b9-primary.xml.gz +0 -0
- data/spec/functional/assets/yumrepo-empty/repodata/repomd.xml +55 -0
- data/spec/functional/dsl/reboot_pending_spec.rb +6 -6
- data/spec/functional/dsl/registry_helper_spec.rb +3 -3
- data/spec/functional/event_loggers/windows_eventlog_spec.rb +9 -8
- data/spec/functional/file_content_management/deploy_strategies_spec.rb +4 -4
- data/spec/functional/http/simple_spec.rb +1 -1
- data/spec/functional/mixin/from_file_spec.rb +13 -2
- data/spec/functional/mixin/powershell_out_spec.rb +12 -4
- data/spec/functional/mixin/shell_out_spec.rb +1 -31
- data/spec/functional/mixin/user_context_spec.rb +3 -3
- data/spec/functional/provider/remote_file/cache_control_data_spec.rb +1 -1
- data/spec/functional/provider/whyrun_safe_ruby_block_spec.rb +1 -1
- data/spec/functional/rebooter_spec.rb +1 -1
- data/spec/functional/resource/aix_service_spec.rb +12 -5
- data/spec/functional/resource/aixinit_service_spec.rb +17 -18
- data/spec/functional/resource/apt_package_spec.rb +6 -9
- data/spec/functional/resource/archive_file_spec.rb +88 -0
- data/spec/functional/resource/bash_spec.rb +4 -3
- data/spec/functional/resource/batch_spec.rb +1 -1
- data/spec/functional/resource/bff_spec.rb +4 -4
- data/spec/functional/resource/chocolatey_package_spec.rb +68 -4
- data/spec/functional/resource/cookbook_file_spec.rb +4 -4
- data/spec/functional/resource/cron_spec.rb +35 -36
- data/spec/functional/resource/directory_spec.rb +1 -1
- data/spec/functional/resource/dnf_package_spec.rb +1305 -362
- data/spec/functional/resource/dpkg_package_spec.rb +17 -1
- data/spec/functional/resource/dsc_resource_spec.rb +2 -2
- data/spec/functional/resource/dsc_script_spec.rb +11 -15
- data/spec/functional/resource/execute_spec.rb +2 -2
- data/spec/functional/resource/file_spec.rb +1 -1
- data/spec/functional/resource/git_spec.rb +208 -136
- data/spec/functional/resource/group_spec.rb +44 -57
- data/spec/functional/resource/ifconfig_spec.rb +10 -2
- data/spec/functional/resource/insserv_spec.rb +10 -10
- data/spec/functional/resource/launchd_spec.rb +232 -0
- data/spec/functional/resource/link_spec.rb +33 -28
- data/spec/functional/resource/locale_spec.rb +108 -0
- data/spec/functional/resource/macos_userdefaults_spec.rb +139 -0
- data/spec/functional/resource/mount_spec.rb +20 -4
- data/spec/functional/resource/msu_package_spec.rb +15 -6
- data/spec/functional/resource/ohai_spec.rb +3 -11
- data/spec/functional/resource/plist_spec.rb +25 -0
- data/spec/functional/resource/powershell_package_source_spec.rb +106 -0
- data/spec/functional/resource/powershell_script_spec.rb +84 -96
- data/spec/functional/resource/registry_spec.rb +90 -90
- data/spec/functional/resource/remote_directory_spec.rb +1 -1
- data/spec/functional/resource/remote_file_spec.rb +11 -17
- data/spec/functional/resource/rpm_spec.rb +4 -4
- data/spec/functional/resource/template_spec.rb +3 -3
- data/spec/functional/resource/timezone_spec.rb +3 -1
- data/spec/functional/resource/user/linux_user_spec.rb +127 -0
- data/spec/functional/resource/user/{dscl_spec.rb → mac_user_spec.rb} +31 -19
- data/spec/functional/resource/user/windows_spec.rb +1 -1
- data/spec/functional/resource/windows_certificate_spec.rb +266 -382
- data/spec/functional/resource/windows_env_spec.rb +4 -4
- data/spec/functional/resource/windows_firewall_rule_spec.rb +93 -0
- data/spec/functional/resource/windows_font_spec.rb +52 -0
- data/spec/functional/resource/windows_hostname_spec.rb +91 -0
- data/spec/functional/resource/windows_package_spec.rb +37 -12
- data/spec/functional/resource/windows_pagefile_spec.rb +125 -0
- data/spec/functional/resource/windows_path_spec.rb +5 -1
- data/spec/functional/resource/windows_security_policy_spec.rb +86 -0
- data/spec/functional/resource/windows_share_spec.rb +103 -0
- data/spec/functional/resource/windows_task_spec.rb +64 -63
- data/spec/functional/resource/windows_user_privilege_spec.rb +192 -0
- data/spec/functional/resource/yum_package_spec.rb +1212 -432
- data/spec/functional/resource/zypper_package_spec.rb +35 -2
- data/spec/functional/run_lock_spec.rb +27 -26
- data/spec/functional/shell_spec.rb +13 -10
- data/spec/functional/tiny_server_spec.rb +1 -1
- data/spec/functional/util/path_helper_spec.rb +1 -1
- data/spec/functional/version_spec.rb +7 -6
- data/spec/functional/win32/crypto_spec.rb +3 -3
- data/spec/functional/win32/registry_spec.rb +18 -24
- data/spec/functional/win32/security_spec.rb +24 -2
- data/spec/functional/win32/sid_spec.rb +2 -2
- data/spec/functional/win32/version_info_spec.rb +2 -2
- data/spec/functional/win32/versions_spec.rb +3 -3
- data/spec/integration/client/client_spec.rb +326 -83
- data/spec/integration/client/exit_code_spec.rb +4 -30
- data/spec/integration/client/fips_spec.rb +20 -0
- data/spec/integration/client/ipv6_spec.rb +4 -3
- data/spec/integration/compliance/compliance_spec.rb +143 -0
- data/spec/integration/ohai/ohai_spec.rb +62 -0
- data/spec/integration/recipes/accumulator_spec.rb +15 -2
- data/spec/integration/recipes/lwrp_inline_resources_spec.rb +11 -6
- data/spec/integration/recipes/lwrp_spec.rb +5 -2
- data/spec/integration/recipes/noop_resource_spec.rb +1 -1
- data/spec/integration/recipes/notifies_spec.rb +67 -23
- data/spec/integration/recipes/notifying_block_spec.rb +13 -8
- data/spec/integration/recipes/provider_choice.rb +4 -2
- data/spec/integration/recipes/recipe_dsl_spec.rb +61 -153
- data/spec/integration/recipes/remote_directory.rb +2 -2
- data/spec/integration/recipes/resource_action_spec.rb +35 -15
- data/spec/integration/recipes/resource_converge_if_changed_spec.rb +22 -20
- data/spec/integration/recipes/resource_load_spec.rb +137 -14
- data/spec/integration/recipes/unified_mode_spec.rb +73 -2
- data/spec/integration/recipes/use_partial_spec.rb +116 -0
- data/spec/integration/solo/solo_spec.rb +13 -11
- data/spec/spec_helper.rb +62 -45
- data/spec/stress/win32/file_spec.rb +2 -2
- data/spec/stress/win32/memory_spec.rb +1 -1
- data/spec/stress/win32/security_spec.rb +1 -1
- data/spec/support/chef_helpers.rb +7 -43
- data/spec/support/key_helpers.rb +1 -3
- data/spec/support/lib/chef/provider/easy.rb +1 -1
- data/spec/support/lib/chef/provider/openldap_includer.rb +1 -1
- data/spec/support/lib/chef/provider/snakeoil.rb +1 -1
- data/spec/support/lib/chef/resource/cat.rb +2 -2
- data/spec/support/lib/chef/resource/one_two_three_four.rb +1 -1
- data/spec/support/lib/chef/resource/openldap_includer.rb +1 -1
- data/spec/support/lib/chef/resource/with_state.rb +1 -2
- data/spec/support/lib/chef/resource/zen_follower.rb +3 -2
- data/spec/support/lib/chef/resource/zen_master.rb +1 -2
- data/spec/support/matchers/leak.rb +8 -10
- data/spec/support/mock/platform.rb +25 -17
- data/spec/support/platform_helpers.rb +49 -71
- data/spec/support/platforms/prof/gc.rb +2 -2
- data/spec/support/platforms/prof/win32.rb +1 -1
- data/spec/support/platforms/win32/spec_service.rb +28 -26
- data/spec/support/recipe_dsl_helper.rb +83 -0
- data/spec/support/ruby_installer.rb +51 -0
- data/spec/support/shared/context/config.rb +0 -3
- data/spec/support/shared/context/win32.rb +1 -1
- data/spec/support/shared/functional/directory_resource.rb +2 -2
- data/spec/support/shared/functional/execute_resource.rb +3 -3
- data/spec/support/shared/functional/file_resource.rb +24 -25
- data/spec/support/shared/functional/http.rb +12 -12
- data/spec/support/shared/functional/knife.rb +1 -1
- data/spec/support/shared/functional/securable_resource.rb +111 -31
- data/spec/support/shared/functional/securable_resource_with_reporting.rb +0 -1
- data/spec/support/shared/functional/windows_script.rb +11 -24
- data/spec/support/shared/integration/integration_helper.rb +23 -56
- data/spec/support/shared/integration/knife_support.rb +12 -16
- data/spec/support/shared/unit/api_error_inspector.rb +1 -1
- data/spec/support/shared/unit/api_versioning.rb +1 -1
- data/spec/support/shared/unit/application_dot_d.rb +6 -5
- data/spec/support/shared/unit/execute_resource.rb +2 -4
- data/spec/support/shared/unit/file_system_support.rb +1 -1
- data/spec/support/shared/unit/knife_shared.rb +2 -2
- data/spec/support/shared/unit/mock_shellout.rb +1 -1
- data/spec/support/shared/unit/platform_introspector.rb +1 -1
- data/spec/support/shared/unit/provider/file.rb +46 -23
- data/spec/support/shared/unit/provider/package/package_shared.rb +95 -0
- data/spec/support/shared/unit/provider/useradd_based_user_provider.rb +22 -14
- data/spec/support/shared/unit/resource/static_provider_resolution.rb +1 -1
- data/spec/support/shared/unit/script_resource.rb +14 -30
- data/spec/support/shared/unit/user_and_client_shared.rb +2 -2
- data/spec/support/shared/unit/windows_script_resource.rb +17 -32
- data/spec/tiny_server.rb +1 -2
- data/spec/unit/{log_spec.rb → action_collection_spec.rb} +3 -8
- data/spec/unit/api_client/registration_spec.rb +1 -1
- data/spec/unit/api_client_spec.rb +1 -1
- data/spec/unit/api_client_v1_spec.rb +1 -1
- data/spec/unit/application/apply_spec.rb +3 -0
- data/spec/unit/application/base_spec.rb +40 -0
- data/spec/unit/application/client_spec.rb +122 -93
- data/spec/unit/application/exit_code_spec.rb +12 -12
- data/spec/unit/application/solo_spec.rb +9 -16
- data/spec/unit/application_spec.rb +115 -14
- data/spec/unit/chef_class_spec.rb +1 -1
- data/spec/unit/chef_fs/config_spec.rb +4 -4
- data/spec/unit/chef_fs/data_handler/data_bag_item_data_handler.rb +2 -2
- data/spec/unit/chef_fs/data_handler/data_handler_base_spec.rb +1 -1
- data/spec/unit/chef_fs/data_handler/group_handler_spec.rb +1 -1
- data/spec/unit/chef_fs/diff_spec.rb +10 -10
- data/spec/unit/chef_fs/file_pattern_spec.rb +3 -3
- data/spec/unit/chef_fs/file_system/cookbook_subdir_spec.rb +1 -1
- data/spec/unit/chef_fs/file_system/operation_failed_error_spec.rb +3 -5
- data/spec/unit/chef_fs/file_system/repository/base_file_spec.rb +1 -1
- data/spec/unit/chef_fs/file_system/repository/directory_spec.rb +2 -2
- data/spec/unit/chef_fs/file_system_spec.rb +4 -2
- data/spec/unit/chef_fs/path_util_spec.rb +4 -4
- data/spec/unit/chef_spec.rb +1 -1
- data/spec/unit/client_spec.rb +349 -71
- data/spec/unit/compliance/fetcher/automate_spec.rb +126 -0
- data/spec/unit/compliance/fetcher/chef_server_spec.rb +93 -0
- data/spec/unit/compliance/input_spec.rb +104 -0
- data/spec/unit/compliance/profile_spec.rb +120 -0
- data/spec/unit/compliance/reporter/automate_spec.rb +451 -0
- data/spec/unit/compliance/reporter/chef_server_automate_spec.rb +197 -0
- data/spec/unit/compliance/reporter/compliance_enforcer_spec.rb +49 -0
- data/spec/unit/compliance/runner_spec.rb +346 -0
- data/spec/unit/compliance/waiver_spec.rb +104 -0
- data/spec/unit/cookbook/chefignore_spec.rb +32 -12
- data/spec/unit/cookbook/cookbook_version_loader_spec.rb +10 -7
- data/spec/unit/cookbook/file_vendor_spec.rb +2 -2
- data/spec/unit/cookbook/gem_installer_spec.rb +7 -6
- data/spec/unit/cookbook/manifest_v0_spec.rb +1 -1
- data/spec/unit/cookbook/manifest_v2_spec.rb +1 -1
- data/spec/unit/cookbook/metadata_spec.rb +39 -321
- data/spec/unit/cookbook/synchronizer_spec.rb +28 -25
- data/spec/unit/cookbook/syntax_check_spec.rb +5 -2
- data/spec/unit/cookbook_loader_spec.rb +21 -58
- data/spec/unit/cookbook_manifest_spec.rb +1 -1
- data/spec/unit/cookbook_spec.rb +3 -3
- data/spec/unit/cookbook_uploader_spec.rb +8 -2
- data/spec/unit/cookbook_version_file_specificity_spec.rb +1 -1
- data/spec/unit/cookbook_version_spec.rb +55 -3
- data/spec/unit/daemon_spec.rb +2 -6
- data/spec/unit/data_bag_item_spec.rb +2 -7
- data/spec/unit/data_bag_spec.rb +8 -5
- data/spec/unit/data_collector/config_validation_spec.rb +208 -0
- data/spec/unit/data_collector_spec.rb +769 -673
- data/spec/unit/decorator/lazy_array_spec.rb +1 -1
- data/spec/unit/decorator/lazy_spec.rb +1 -1
- data/spec/unit/decorator_spec.rb +24 -24
- data/spec/unit/deprecated_spec.rb +4 -4
- data/spec/unit/deprecation_spec.rb +1 -1
- data/spec/unit/digester_spec.rb +1 -1
- data/spec/unit/dsl/data_query_spec.rb +1 -1
- data/spec/unit/dsl/declare_resource_spec.rb +2 -2
- data/spec/unit/dsl/platform_introspection_spec.rb +32 -1
- data/spec/unit/dsl/reboot_pending_spec.rb +6 -6
- data/spec/unit/dsl/recipe_spec.rb +1 -1
- data/spec/unit/dsl/registry_helper_spec.rb +8 -8
- data/spec/unit/dsl/render_helpers_spec.rb +102 -0
- data/spec/unit/dsl/secret_spec.rb +175 -0
- data/spec/unit/encrypted_data_bag_item/check_encrypted_spec.rb +2 -2
- data/spec/unit/encrypted_data_bag_item_spec.rb +3 -3
- data/spec/unit/environment_spec.rb +16 -10
- data/spec/unit/event_dispatch/dispatcher_spec.rb +54 -4
- data/spec/unit/exceptions_spec.rb +1 -1
- data/spec/unit/file_access_control_spec.rb +4 -4
- data/spec/unit/file_cache_spec.rb +1 -1
- data/spec/unit/file_content_management/deploy/cp_spec.rb +1 -1
- data/spec/unit/file_content_management/deploy/mv_unix_spec.rb +2 -2
- data/spec/unit/file_content_management/deploy/mv_windows_spec.rb +3 -3
- data/spec/unit/file_content_management/tempfile_spec.rb +2 -2
- data/spec/unit/formatters/base_spec.rb +2 -2
- data/spec/unit/formatters/doc_spec.rb +2 -2
- data/spec/unit/formatters/error_description_spec.rb +1 -1
- data/spec/unit/formatters/error_inspectors/api_error_formatting_spec.rb +1 -1
- data/spec/unit/formatters/error_inspectors/compile_error_inspector_spec.rb +1 -1
- data/spec/unit/formatters/error_inspectors/cookbook_resolve_error_inspector_spec.rb +3 -3
- data/spec/unit/formatters/error_inspectors/cookbook_sync_error_inspector_spec.rb +1 -1
- data/spec/unit/formatters/error_inspectors/node_load_error_inspector_spec.rb +1 -1
- data/spec/unit/formatters/error_inspectors/registration_error_inspector_spec.rb +1 -1
- data/spec/unit/formatters/error_inspectors/resource_failure_inspector_spec.rb +3 -3
- data/spec/unit/formatters/error_inspectors/run_list_expansion_error_inspector_spec.rb +1 -1
- data/spec/unit/guard_interpreter/resource_guard_interpreter_spec.rb +12 -12
- data/spec/unit/guard_interpreter_spec.rb +2 -2
- data/spec/unit/handler/json_file_spec.rb +1 -1
- data/spec/unit/handler_spec.rb +9 -3
- data/spec/unit/http/api_versions_spec.rb +21 -3
- data/spec/unit/http/authenticator_spec.rb +69 -1
- data/spec/unit/http/basic_client_spec.rb +30 -0
- data/spec/unit/http/http_request_spec.rb +1 -1
- data/spec/unit/http/json_input_spec.rb +1 -1
- data/spec/unit/http/simple_spec.rb +1 -1
- data/spec/unit/http/socketless_chef_zero_client_spec.rb +1 -1
- data/spec/unit/http/ssl_policies_spec.rb +126 -67
- data/spec/unit/http/validate_content_length_spec.rb +1 -1
- data/spec/unit/http_spec.rb +10 -4
- data/spec/unit/json_compat_spec.rb +2 -2
- data/spec/unit/key_spec.rb +2 -2
- data/spec/unit/log/syslog_spec.rb +7 -11
- data/spec/unit/log/winevt_spec.rb +22 -14
- data/spec/unit/lwrp_spec.rb +17 -14
- data/spec/unit/mixin/api_version_request_handling_spec.rb +1 -1
- data/spec/unit/mixin/checksum_spec.rb +29 -1
- data/spec/unit/mixin/deep_merge_spec.rb +15 -0
- data/spec/unit/mixin/{path_sanity_spec.rb → default_paths_spec.rb} +18 -18
- data/spec/unit/mixin/deprecation_spec.rb +1 -1
- data/spec/unit/mixin/enforce_ownership_and_permissions_spec.rb +1 -1
- data/spec/unit/mixin/homebrew_user_spec.rb +1 -1
- data/spec/unit/mixin/lazy_module_include.rb +1 -1
- data/spec/unit/mixin/openssl_helper_spec.rb +48 -13
- data/spec/unit/mixin/params_validate_spec.rb +5 -4
- data/spec/unit/mixin/powershell_exec_spec.rb +51 -4
- data/spec/unit/mixin/powershell_out_spec.rb +17 -5
- data/spec/unit/mixin/powershell_type_coercions_spec.rb +2 -2
- data/spec/unit/mixin/proxified_socket_spec.rb +1 -1
- data/spec/unit/mixin/securable_spec.rb +6 -7
- data/spec/unit/mixin/shell_out_spec.rb +47 -189
- data/spec/unit/mixin/subclass_directive_spec.rb +3 -3
- data/spec/unit/mixin/template_spec.rb +34 -34
- data/spec/unit/mixin/unformatter_spec.rb +3 -3
- data/spec/unit/mixin/uris_spec.rb +2 -2
- data/spec/unit/mixin/user_context_spec.rb +4 -12
- data/spec/unit/mixin/versioned_api_spec.rb +1 -1
- data/spec/unit/mixin/which.rb +10 -2
- data/spec/unit/mixin/why_run_spec.rb +53 -0
- data/spec/unit/mixin/windows_architecture_helper_spec.rb +5 -5
- data/spec/unit/mixin/xml_escape_spec.rb +1 -1
- data/spec/unit/monologger_spec.rb +1 -1
- data/spec/unit/node/attribute_spec.rb +60 -14
- data/spec/unit/node/immutable_collections_spec.rb +77 -146
- data/spec/unit/node/vivid_mash_spec.rb +109 -4
- data/spec/unit/node_map_spec.rb +50 -16
- data/spec/unit/node_spec.rb +212 -31
- data/spec/unit/org_group_spec.rb +45 -0
- data/spec/unit/org_spec.rb +1 -1
- data/spec/unit/platform/query_helpers_spec.rb +3 -162
- data/spec/unit/policy_builder/dynamic_spec.rb +1 -18
- data/spec/unit/policy_builder/expand_node_object_spec.rb +3 -3
- data/spec/unit/policy_builder/policyfile_spec.rb +145 -57
- data/spec/unit/policy_builder_spec.rb +1 -1
- data/spec/unit/property/state_spec.rb +12 -7
- data/spec/unit/property/validation_spec.rb +55 -1
- data/spec/unit/property_spec.rb +130 -33
- data/spec/unit/provider/apt_preference_spec.rb +16 -12
- data/spec/unit/provider/apt_repository_spec.rb +45 -42
- data/spec/unit/provider/apt_update_spec.rb +16 -13
- data/spec/unit/provider/batch_spec.rb +130 -0
- data/spec/unit/provider/cookbook_file/content_spec.rb +1 -1
- data/spec/unit/provider/cookbook_file_spec.rb +5 -5
- data/spec/unit/provider/cron/unix_spec.rb +1 -1
- data/spec/unit/provider/cron_spec.rb +202 -34
- data/spec/unit/provider/directory_spec.rb +5 -16
- data/spec/unit/provider/dsc_resource_spec.rb +31 -64
- data/spec/unit/provider/dsc_script_spec.rb +20 -20
- data/spec/unit/provider/execute_spec.rb +3 -10
- data/spec/unit/provider/file/content_spec.rb +1 -1
- data/spec/unit/provider/file_spec.rb +6 -5
- data/spec/unit/provider/git_spec.rb +48 -8
- data/spec/unit/provider/group/dscl_spec.rb +1 -1
- data/spec/unit/provider/group/gpasswd_spec.rb +3 -3
- data/spec/unit/provider/group/groupadd_spec.rb +3 -2
- data/spec/unit/provider/group/groupmod_spec.rb +3 -3
- data/spec/unit/provider/group/pw_spec.rb +3 -3
- data/spec/unit/provider/group/solaris_spec.rb +106 -0
- data/spec/unit/provider/group/usermod_spec.rb +5 -8
- data/spec/unit/provider/group/windows_spec.rb +6 -0
- data/spec/unit/provider/group_spec.rb +3 -3
- data/spec/unit/provider/http_request_spec.rb +61 -73
- data/spec/unit/provider/ifconfig/aix_spec.rb +15 -15
- data/spec/unit/provider/ifconfig/debian_spec.rb +1 -1
- data/spec/unit/provider/ifconfig/redhat_spec.rb +1 -1
- data/spec/unit/provider/ifconfig_spec.rb +6 -5
- data/spec/unit/provider/launchd_spec.rb +8 -50
- data/spec/unit/provider/link_spec.rb +18 -13
- data/spec/unit/provider/log_spec.rb +4 -4
- data/spec/unit/provider/mdadm_spec.rb +4 -6
- data/spec/unit/provider/mount/aix_spec.rb +2 -2
- data/spec/unit/provider/mount/linux_spec.rb +130 -0
- data/spec/unit/provider/mount/mount_spec.rb +74 -11
- data/spec/unit/provider/mount/solaris_spec.rb +2 -2
- data/spec/unit/provider/mount/windows_spec.rb +1 -0
- data/spec/unit/provider/mount_spec.rb +32 -1
- data/spec/unit/provider/package/apt_spec.rb +111 -23
- data/spec/unit/provider/package/bff_spec.rb +2 -1
- data/spec/unit/provider/package/cab_spec.rb +2 -2
- data/spec/unit/provider/package/chocolatey_spec.rb +59 -41
- data/spec/unit/provider/package/deb_spec.rb +135 -0
- data/spec/unit/provider/package/dnf/python_helper_spec.rb +11 -4
- data/spec/unit/provider/package/dpkg_spec.rb +28 -1
- data/spec/unit/provider/package/freebsd/pkgng_spec.rb +1 -2
- data/spec/unit/provider/package/freebsd/port_spec.rb +2 -14
- data/spec/unit/provider/package/homebrew_spec.rb +281 -175
- data/spec/unit/provider/package/ips_spec.rb +1 -1
- data/spec/unit/provider/package/macports_spec.rb +1 -1
- data/spec/unit/provider/package/msu_spec.rb +5 -5
- data/spec/unit/provider/package/openbsd_spec.rb +1 -1
- data/spec/unit/provider/package/pacman_spec.rb +63 -148
- data/spec/unit/provider/package/paludis_spec.rb +1 -1
- data/spec/unit/provider/package/portage_spec.rb +3 -3
- data/spec/unit/provider/package/powershell_spec.rb +198 -134
- data/spec/unit/provider/package/rpm_spec.rb +21 -10
- data/spec/unit/provider/package/rubygems_spec.rb +273 -67
- data/spec/unit/provider/package/smartos_spec.rb +1 -1
- data/spec/unit/provider/package/snap_spec.rb +208 -0
- data/spec/unit/provider/package/solaris_spec.rb +3 -2
- data/spec/unit/provider/package/windows/exe_spec.rb +3 -3
- data/spec/unit/provider/package/windows/msi_spec.rb +1 -1
- data/spec/unit/provider/package/windows/registry_uninstall_entry_spec.rb +3 -3
- data/spec/unit/provider/package/windows_spec.rb +33 -56
- data/spec/unit/provider/package/yum/python_helper_spec.rb +2 -1
- data/spec/unit/provider/package/yum/yum_cache_spec.rb +1 -1
- data/spec/unit/provider/package/zypper_spec.rb +51 -44
- data/spec/unit/provider/package_spec.rb +6 -228
- data/spec/unit/provider/powershell_script_spec.rb +22 -77
- data/spec/unit/provider/registry_key_spec.rb +5 -5
- data/spec/unit/provider/remote_directory_spec.rb +9 -9
- data/spec/unit/provider/remote_file/cache_control_data_spec.rb +4 -4
- data/spec/unit/provider/remote_file/content_spec.rb +1 -1
- data/spec/unit/provider/remote_file/fetcher_spec.rb +2 -2
- data/spec/unit/provider/remote_file/http_spec.rb +11 -1
- data/spec/unit/provider/remote_file/local_file_spec.rb +1 -1
- data/spec/unit/provider/remote_file/network_file_spec.rb +2 -2
- data/spec/unit/provider/remote_file_spec.rb +4 -5
- data/spec/unit/provider/route_spec.rb +0 -2
- data/spec/unit/provider/script_spec.rb +20 -110
- data/spec/unit/provider/service/aix_service_spec.rb +1 -1
- data/spec/unit/provider/service/aixinit_service_spec.rb +1 -1
- data/spec/unit/provider/service/arch_service_spec.rb +7 -5
- data/spec/unit/provider/service/debian_service_spec.rb +37 -14
- data/spec/unit/provider/service/gentoo_service_spec.rb +12 -11
- data/spec/unit/provider/service/init_service_spec.rb +1 -1
- data/spec/unit/provider/service/insserv_service_spec.rb +1 -1
- data/spec/unit/provider/service/invokercd_service_spec.rb +1 -1
- data/spec/unit/provider/service/macosx_spec.rb +211 -214
- data/spec/unit/provider/service/redhat_spec.rb +7 -4
- data/spec/unit/provider/service/simple_service_spec.rb +6 -4
- data/spec/unit/provider/service/solaris_smf_service_spec.rb +1 -1
- data/spec/unit/provider/service/systemd_service_spec.rb +151 -36
- data/spec/unit/provider/service/upstart_service_spec.rb +6 -35
- data/spec/unit/provider/service/windows_spec.rb +167 -109
- data/spec/unit/provider/service_spec.rb +1 -1
- data/spec/unit/provider/subversion_spec.rb +13 -14
- data/spec/unit/provider/systemd_unit_spec.rb +108 -85
- data/spec/unit/provider/template/content_spec.rb +1 -1
- data/spec/unit/provider/template_spec.rb +6 -7
- data/spec/unit/provider/user/aix_spec.rb +2 -2
- data/spec/unit/provider/user/linux_spec.rb +97 -3
- data/spec/unit/provider/user/mac_spec.rb +38 -0
- data/spec/unit/provider/user/pw_spec.rb +1 -1
- data/spec/unit/provider/user/solaris_spec.rb +2 -2
- data/spec/unit/provider/user_spec.rb +56 -30
- data/spec/unit/provider/windows_env_spec.rb +23 -38
- data/spec/unit/provider/windows_path_spec.rb +7 -12
- data/spec/unit/provider/windows_task_spec.rb +8 -7
- data/spec/unit/provider/yum_repository_spec.rb +1 -1
- data/spec/unit/provider/zypper_repository_spec.rb +82 -39
- data/spec/unit/provider_spec.rb +25 -9
- data/spec/unit/recipe_spec.rb +69 -6
- data/spec/unit/resource/alternatives_spec.rb +120 -0
- data/spec/unit/resource/apt_package_spec.rb +11 -1
- data/spec/unit/resource/apt_preference_spec.rb +1 -19
- data/spec/unit/resource/apt_repository_spec.rb +1 -19
- data/spec/unit/resource/apt_update_spec.rb +1 -19
- data/spec/unit/resource/archive_file_spec.rb +466 -0
- data/spec/unit/resource/bash_spec.rb +1 -1
- data/spec/unit/resource/batch_spec.rb +7 -7
- data/spec/unit/resource/bff_package_spec.rb +1 -1
- data/spec/unit/resource/breakpoint_spec.rb +2 -2
- data/spec/unit/resource/build_essential_spec.rb +36 -2
- data/spec/unit/resource/cab_package_spec.rb +1 -1
- data/spec/unit/resource/chef_client_config_spec.rb +145 -0
- data/spec/unit/resource/chef_client_cron_spec.rb +161 -0
- data/spec/unit/resource/chef_client_launchd_spec.rb +132 -0
- data/spec/unit/resource/chef_client_scheduled_task_spec.rb +186 -0
- data/spec/unit/resource/chef_client_systemd_timer_spec.rb +108 -0
- data/spec/unit/resource/chef_client_trusted_certificate_spec.rb +68 -0
- data/spec/unit/resource/chef_gem_spec.rb +1 -4
- data/spec/unit/resource/chef_handler_spec.rb +1 -1
- data/spec/unit/{audit/rspec_formatter_spec.rb → resource/chef_sleep_spec.rb} +10 -9
- data/spec/unit/resource/chef_vault_secret_spec.rb +40 -0
- data/spec/unit/resource/chocolatey_config_spec.rb +2 -7
- data/spec/unit/resource/chocolatey_feature_spec.rb +89 -0
- data/spec/unit/resource/chocolatey_package_spec.rb +18 -3
- data/spec/unit/resource/chocolatey_source_spec.rb +57 -8
- data/spec/unit/resource/conditional_spec.rb +5 -5
- data/spec/unit/resource/cookbook_file_spec.rb +4 -4
- data/spec/unit/resource/cron_access_spec.rb +1 -1
- data/spec/unit/resource/cron_d_spec.rb +34 -40
- data/spec/unit/resource/cron_spec.rb +7 -13
- data/spec/unit/resource/csh_spec.rb +1 -1
- data/spec/unit/resource/directory_spec.rb +1 -1
- data/spec/unit/resource/dmg_package_spec.rb +1 -1
- data/spec/unit/resource/dnf_package_spec.rb +1 -1
- data/spec/unit/resource/dpkg_package_spec.rb +23 -1
- data/spec/unit/resource/dsc_resource_spec.rb +1 -1
- data/spec/unit/resource/dsc_script_spec.rb +1 -1
- data/spec/unit/resource/execute_spec.rb +124 -119
- data/spec/unit/resource/file/verification/json_spec.rb +72 -0
- data/spec/unit/resource/file/verification/systemd_unit_spec.rb +1 -1
- data/spec/unit/resource/file/verification/yaml_spec.rb +67 -0
- data/spec/unit/resource/file/verification_spec.rb +3 -2
- data/spec/unit/resource/file_spec.rb +1 -1
- data/spec/unit/resource/freebsd_package_spec.rb +2 -28
- data/spec/unit/resource/gem_package_spec.rb +4 -4
- data/spec/unit/resource/group_spec.rb +1 -1
- data/spec/unit/resource/helpers/cron_validations_spec.rb +81 -0
- data/spec/unit/resource/homebrew_cask_spec.rb +30 -12
- data/spec/unit/resource/homebrew_package_spec.rb +1 -1
- data/spec/unit/resource/homebrew_tap_spec.rb +1 -1
- data/spec/unit/resource/homebrew_update_spec.rb +30 -0
- data/spec/unit/resource/hostname_spec.rb +1 -1
- data/spec/unit/resource/http_request_spec.rb +1 -1
- data/spec/unit/resource/ifconfig_spec.rb +2 -10
- data/spec/unit/resource/inspec_input_spec.rb +300 -0
- data/spec/unit/resource/inspec_waiver_file_entry_spec.rb +80 -0
- data/spec/unit/resource/inspec_waiver_spec.rb +312 -0
- data/spec/unit/resource/ips_package_spec.rb +1 -1
- data/spec/unit/resource/kernel_module_spec.rb +4 -7
- data/spec/unit/resource/ksh_spec.rb +1 -1
- data/spec/unit/resource/launchd_spec.rb +8 -0
- data/spec/unit/resource/link_spec.rb +1 -5
- data/spec/unit/resource/locale_spec.rb +154 -25
- data/spec/unit/resource/log_spec.rb +1 -1
- data/spec/unit/resource/macos_user_defaults_spec.rb +50 -9
- data/spec/unit/{knife/osc_user_list_spec.rb → resource/macosx_service.rb} +14 -14
- data/spec/unit/resource/macports_package_spec.rb +1 -1
- data/spec/unit/resource/mount_spec.rb +29 -6
- data/spec/unit/resource/msu_package_spec.rb +5 -1
- data/spec/unit/{knife/user_list_spec.rb → resource/notify_group_spec.rb} +11 -13
- data/spec/unit/resource/ohai_hint_spec.rb +1 -1
- data/spec/unit/resource/ohai_spec.rb +56 -6
- data/spec/unit/resource/openbsd_package_spec.rb +1 -1
- data/spec/unit/resource/{openssl_dhparam.rb → openssl_dhparam_spec.rb} +1 -1
- data/spec/unit/resource/openssl_ec_private_key_spec.rb +1 -1
- data/spec/unit/resource/openssl_ec_public_key_spec.rb +1 -1
- data/spec/unit/resource/openssl_rsa_private_key_spec.rb +1 -1
- data/spec/unit/resource/openssl_rsa_public_key_spec.rb +1 -1
- data/spec/unit/resource/openssl_x509_certificate_spec.rb +1 -1
- data/spec/unit/resource/openssl_x509_crl_spec.rb +1 -1
- data/spec/unit/resource/openssl_x509_request.rb +1 -1
- data/spec/unit/resource/osx_profile_spec.rb +299 -0
- data/spec/unit/resource/package_spec.rb +1 -11
- data/spec/unit/resource/pacman_package_spec.rb +1 -1
- data/spec/unit/resource/paludis_package_spec.rb +1 -1
- data/spec/unit/resource/perl_spec.rb +1 -1
- data/spec/unit/resource/plist_spec.rb +130 -0
- data/spec/unit/resource/portage_package_spec.rb +1 -1
- data/spec/unit/resource/powershell_package_source_spec.rb +64 -63
- data/spec/unit/resource/powershell_package_spec.rb +1 -1
- data/spec/unit/resource/powershell_script_spec.rb +15 -91
- data/spec/unit/resource/python_spec.rb +1 -1
- data/spec/unit/resource/reboot_spec.rb +1 -1
- data/spec/unit/resource/registry_key_spec.rb +11 -11
- data/spec/unit/resource/remote_directory_spec.rb +23 -10
- data/spec/unit/resource/remote_file_spec.rb +6 -6
- data/spec/unit/resource/resource_notification_spec.rb +1 -1
- data/spec/unit/resource/rest_resource_spec.rb +381 -0
- data/spec/unit/resource/rhsm_errata_level_spec.rb +1 -1
- data/spec/unit/resource/rhsm_errata_spec.rb +1 -1
- data/spec/unit/resource/rhsm_register_spec.rb +120 -16
- data/spec/unit/resource/rhsm_repo_spec.rb +7 -1
- data/spec/unit/resource/rhsm_subscription_spec.rb +51 -4
- data/spec/unit/resource/route_spec.rb +7 -2
- data/spec/unit/resource/ruby_block_spec.rb +1 -1
- data/spec/unit/resource/ruby_spec.rb +1 -1
- data/spec/unit/resource/{git_spec.rb → scm/git_spec.rb} +51 -3
- data/spec/unit/resource/{scm_spec.rb → scm/scm.rb} +2 -53
- data/spec/unit/resource/{subversion_spec.rb → scm/subversion_spec.rb} +3 -4
- data/spec/unit/resource/script_spec.rb +7 -2
- data/spec/unit/resource/selinux_boolean_spec.rb +92 -0
- data/spec/unit/resource/selinux_fcontext_spec.rb +65 -0
- data/spec/unit/resource/selinux_install_spec.rb +60 -0
- data/spec/unit/resource/selinux_module_spec.rb +55 -0
- data/spec/unit/resource/selinux_permissive_spec.rb +39 -0
- data/spec/unit/resource/selinux_port_spec.rb +42 -0
- data/spec/unit/resource/selinux_state_spec.rb +46 -0
- data/spec/unit/resource/service_spec.rb +82 -85
- data/spec/unit/resource/smartos_package_spec.rb +1 -1
- data/spec/unit/resource/snap_package_spec.rb +60 -0
- data/spec/unit/resource/solaris_package_spec.rb +9 -11
- data/spec/unit/resource/ssh_known_hosts_entry_spec.rb +1 -6
- data/spec/unit/resource/sudo_spec.rb +1 -1
- data/spec/unit/resource/swap_file_spec.rb +1 -1
- data/spec/unit/resource/sysctl_spec.rb +23 -1
- data/spec/unit/resource/systemd_unit_spec.rb +1 -1
- data/spec/unit/resource/template_spec.rb +1 -1
- data/spec/unit/resource/timezone_spec.rb +102 -0
- data/spec/unit/resource/user/linux_user_spec.rb +42 -0
- data/spec/{functional/knife/configure_spec.rb → unit/resource/user/windows_user_spec.rb} +13 -10
- data/spec/unit/resource/user_spec.rb +22 -23
- data/spec/unit/resource/user_ulimit_spec.rb +66 -0
- data/spec/unit/resource/windows_ad_join_spec.rb +5 -1
- data/spec/unit/resource/windows_audit_policy_spec.rb +64 -0
- data/spec/unit/resource/windows_auto_run_spec.rb +2 -2
- data/spec/unit/resource/{windows_certificate.rb → windows_certificate_spec.rb} +13 -1
- data/spec/unit/resource/windows_defender_exclusion_spec.rb +62 -0
- data/spec/unit/resource/windows_defender_spec.rb +71 -0
- data/spec/unit/resource/windows_dfs_folder_spec.rb +39 -0
- data/spec/unit/resource/windows_dfs_namespace_spec.rb +39 -0
- data/spec/unit/{knife/client_list_spec.rb → resource/windows_dfs_server_spec.rb} +12 -12
- data/spec/unit/resource/windows_dns_record_spec.rb +55 -0
- data/spec/unit/resource/windows_dns_zone_spec.rb +51 -0
- data/spec/unit/resource/{windows_feature_dism.rb → windows_feature_dism_spec.rb} +3 -18
- data/spec/unit/resource/{windows_feature_powershell.rb → windows_feature_powershell_spec.rb} +28 -17
- data/spec/unit/resource/{windows_feature.rb → windows_feature_spec.rb} +1 -1
- data/spec/unit/resource/windows_firewall_profile_spec.rb +77 -0
- data/spec/unit/resource/windows_firewall_rule_spec.rb +156 -47
- data/spec/unit/resource/windows_font_spec.rb +1 -1
- data/spec/unit/resource/windows_package_spec.rb +27 -7
- data/spec/unit/resource/windows_pagefile_spec.rb +5 -10
- data/spec/unit/resource/windows_path_spec.rb +1 -1
- data/spec/unit/resource/windows_printer_port_spec.rb +1 -1
- data/spec/unit/resource/windows_printer_spec.rb +1 -1
- data/spec/unit/resource/windows_service_spec.rb +43 -14
- data/spec/unit/resource/{windows_share.rb → windows_share_spec.rb} +10 -1
- data/spec/unit/resource/windows_shortcut_spec.rb +1 -1
- data/spec/unit/resource/windows_task_spec.rb +6 -6
- data/spec/unit/resource/windows_uac_spec.rb +50 -0
- data/spec/unit/resource/windows_update_settings_spec.rb +64 -0
- data/spec/unit/resource/windows_user_privilege_spec.rb +55 -0
- data/spec/unit/resource/windows_workgroup_spec.rb +3 -3
- data/spec/unit/resource/yum_package_spec.rb +1 -1
- data/spec/unit/resource/yum_repository_spec.rb +26 -22
- data/spec/unit/resource/zypper_package_spec.rb +1 -1
- data/spec/unit/resource/zypper_repository_spec.rb +2 -2
- data/spec/unit/resource_collection/resource_list_spec.rb +1 -1
- data/spec/unit/resource_collection/resource_set_spec.rb +1 -1
- data/spec/unit/resource_collection_spec.rb +1 -1
- data/spec/unit/resource_definition_spec.rb +1 -1
- data/spec/unit/resource_inspector_spec.rb +11 -6
- data/spec/unit/resource_reporter_spec.rb +227 -203
- data/spec/unit/resource_spec.rb +219 -16
- data/spec/unit/role_spec.rb +33 -28
- data/spec/unit/run_context/child_run_context_spec.rb +1 -8
- data/spec/unit/run_context/cookbook_compiler_spec.rb +14 -2
- data/spec/unit/run_context_spec.rb +18 -2
- data/spec/unit/run_list/run_list_expansion_spec.rb +1 -1
- data/spec/unit/run_list/run_list_item_spec.rb +1 -1
- data/spec/unit/run_list/versioned_recipe_list_spec.rb +2 -2
- data/spec/unit/run_list_spec.rb +1 -1
- data/spec/unit/run_lock_spec.rb +7 -3
- data/spec/unit/run_status_spec.rb +1 -1
- data/spec/unit/runner_spec.rb +2 -3
- data/spec/unit/scan_access_control_spec.rb +2 -2
- data/spec/unit/search/query_spec.rb +10 -3
- data/spec/unit/secret_fetcher/akeyless_vault_spec.rb +37 -0
- data/spec/unit/secret_fetcher/aws_secrets_manager_spec.rb +70 -0
- data/spec/unit/secret_fetcher/azure_key_vault_spec.rb +149 -0
- data/spec/unit/secret_fetcher/hashi_vault_spec.rb +126 -0
- data/spec/unit/secret_fetcher_spec.rb +82 -0
- data/spec/unit/server_api_spec.rb +43 -16
- data/spec/unit/server_api_versions_spec.rb +1 -1
- data/spec/unit/shell/model_wrapper_spec.rb +1 -1
- data/spec/unit/shell/shell_ext_spec.rb +47 -4
- data/spec/unit/shell/shell_session_spec.rb +35 -64
- data/spec/unit/shell_spec.rb +19 -22
- data/spec/unit/train_transport_spec.rb +85 -0
- data/spec/unit/user_spec.rb +2 -2
- data/spec/unit/user_v1_spec.rb +16 -14
- data/spec/unit/util/backup_spec.rb +3 -3
- data/spec/unit/util/diff_spec.rb +3 -17
- data/spec/unit/util/dsc/configuration_generator_spec.rb +81 -2
- data/spec/unit/util/dsc/lcm_output_parser_spec.rb +1 -1
- data/spec/unit/util/dsc/local_configuration_manager_spec.rb +28 -36
- data/spec/unit/util/dsc/resource_store.rb +2 -2
- data/spec/unit/util/file_edit_spec.rb +2 -2
- data/spec/unit/util/powershell/ps_credential_spec.rb +3 -3
- data/spec/unit/util/selinux_spec.rb +7 -4
- data/spec/unit/util/threaded_job_queue_spec.rb +10 -1
- data/spec/unit/util/windows/logon_session_spec.rb +2 -2
- data/spec/unit/version_class_spec.rb +1 -1
- data/spec/unit/version_constraint_spec.rb +1 -1
- data/spec/unit/win32/error_spec.rb +2 -2
- data/spec/unit/win32/link_spec.rb +5 -5
- data/spec/unit/win32/registry_spec.rb +5 -5
- data/spec/unit/win32/security_spec.rb +6 -5
- data/tasks/rspec.rb +23 -26
- metadata +469 -584
- data/bin/chef-apply +0 -24
- data/bin/chef-client +0 -25
- data/bin/chef-resource-inspector +0 -26
- data/bin/chef-shell +0 -31
- data/bin/chef-solo +0 -24
- data/bin/knife +0 -24
- data/chef-universal-mingw32.gemspec +0 -24
- data/lib/chef/application/knife.rb +0 -221
- data/lib/chef/application/windows_service.rb +0 -337
- data/lib/chef/application/windows_service_manager.rb +0 -204
- data/lib/chef/audit/audit_event_proxy.rb +0 -93
- data/lib/chef/audit/audit_reporter.rb +0 -176
- data/lib/chef/audit/control_group_data.rb +0 -145
- data/lib/chef/audit/rspec_formatter.rb +0 -37
- data/lib/chef/audit/runner.rb +0 -196
- data/lib/chef/chef_fs/knife.rb +0 -161
- data/lib/chef/chef_fs/parallelizer/flatten_enumerable.rb +0 -35
- data/lib/chef/chef_fs/parallelizer/parallel_enumerable.rb +0 -277
- data/lib/chef/chef_fs/parallelizer.rb +0 -103
- data/lib/chef/cookbook_site_streaming_uploader.rb +0 -241
- data/lib/chef/data_collector/messages/helpers.rb +0 -159
- data/lib/chef/data_collector/messages.rb +0 -100
- data/lib/chef/data_collector/resource_report.rb +0 -123
- data/lib/chef/dsl/audit.rb +0 -51
- data/lib/chef/dsl/chef_provisioning.rb +0 -57
- data/lib/chef/dsl/core.rb +0 -52
- data/lib/chef/knife/bootstrap/chef_vault_handler.rb +0 -159
- data/lib/chef/knife/bootstrap/client_builder.rb +0 -208
- data/lib/chef/knife/bootstrap/templates/README.md +0 -11
- data/lib/chef/knife/bootstrap/templates/chef-full.erb +0 -243
- data/lib/chef/knife/bootstrap.rb +0 -525
- data/lib/chef/knife/client_bulk_delete.rb +0 -103
- data/lib/chef/knife/client_create.rb +0 -110
- data/lib/chef/knife/client_delete.rb +0 -62
- data/lib/chef/knife/client_edit.rb +0 -52
- data/lib/chef/knife/client_key_create.rb +0 -70
- data/lib/chef/knife/client_key_delete.rb +0 -77
- data/lib/chef/knife/client_key_edit.rb +0 -80
- data/lib/chef/knife/client_key_list.rb +0 -70
- data/lib/chef/knife/client_key_show.rb +0 -77
- data/lib/chef/knife/client_list.rb +0 -41
- data/lib/chef/knife/client_reregister.rb +0 -58
- data/lib/chef/knife/client_show.rb +0 -48
- data/lib/chef/knife/config_get.rb +0 -127
- data/lib/chef/knife/config_get_profile.rb +0 -37
- data/lib/chef/knife/config_list_profiles.rb +0 -121
- data/lib/chef/knife/config_use_profile.rb +0 -50
- data/lib/chef/knife/configure.rb +0 -147
- data/lib/chef/knife/configure_client.rb +0 -48
- data/lib/chef/knife/cookbook_bulk_delete.rb +0 -71
- data/lib/chef/knife/cookbook_delete.rb +0 -151
- data/lib/chef/knife/cookbook_download.rb +0 -142
- data/lib/chef/knife/cookbook_list.rb +0 -47
- data/lib/chef/knife/cookbook_metadata.rb +0 -106
- data/lib/chef/knife/cookbook_metadata_from_file.rb +0 -43
- data/lib/chef/knife/cookbook_show.rb +0 -98
- data/lib/chef/knife/cookbook_site_download.rb +0 -40
- data/lib/chef/knife/cookbook_site_install.rb +0 -40
- data/lib/chef/knife/cookbook_site_list.rb +0 -40
- data/lib/chef/knife/cookbook_site_search.rb +0 -40
- data/lib/chef/knife/cookbook_site_share.rb +0 -41
- data/lib/chef/knife/cookbook_site_show.rb +0 -40
- data/lib/chef/knife/cookbook_site_unshare.rb +0 -41
- data/lib/chef/knife/cookbook_test.rb +0 -95
- data/lib/chef/knife/cookbook_upload.rb +0 -308
- data/lib/chef/knife/core/bootstrap_context.rb +0 -273
- data/lib/chef/knife/core/cookbook_scm_repo.rb +0 -159
- data/lib/chef/knife/core/gem_glob_loader.rb +0 -138
- data/lib/chef/knife/core/generic_presenter.rb +0 -231
- data/lib/chef/knife/core/hashed_command_loader.rb +0 -99
- data/lib/chef/knife/core/node_editor.rb +0 -130
- data/lib/chef/knife/core/node_presenter.rb +0 -158
- data/lib/chef/knife/core/object_loader.rb +0 -115
- data/lib/chef/knife/core/status_presenter.rb +0 -172
- data/lib/chef/knife/core/subcommand_loader.rb +0 -183
- data/lib/chef/knife/core/text_formatter.rb +0 -85
- data/lib/chef/knife/core/ui.rb +0 -286
- data/lib/chef/knife/data_bag_create.rb +0 -80
- data/lib/chef/knife/data_bag_delete.rb +0 -49
- data/lib/chef/knife/data_bag_edit.rb +0 -74
- data/lib/chef/knife/data_bag_from_file.rb +0 -113
- data/lib/chef/knife/data_bag_secret_options.rb +0 -142
- data/lib/chef/knife/data_bag_show.rb +0 -69
- data/lib/chef/knife/delete.rb +0 -125
- data/lib/chef/knife/deps.rb +0 -154
- data/lib/chef/knife/diff.rb +0 -84
- data/lib/chef/knife/download.rb +0 -84
- data/lib/chef/knife/edit.rb +0 -88
- data/lib/chef/knife/environment_compare.rb +0 -127
- data/lib/chef/knife/environment_create.rb +0 -52
- data/lib/chef/knife/environment_delete.rb +0 -44
- data/lib/chef/knife/environment_from_file.rb +0 -84
- data/lib/chef/knife/environment_list.rb +0 -41
- data/lib/chef/knife/environment_show.rb +0 -47
- data/lib/chef/knife/exec.rb +0 -87
- data/lib/chef/knife/key_create.rb +0 -112
- data/lib/chef/knife/key_create_base.rb +0 -50
- data/lib/chef/knife/key_delete.rb +0 -55
- data/lib/chef/knife/key_edit.rb +0 -118
- data/lib/chef/knife/key_edit_base.rb +0 -55
- data/lib/chef/knife/key_list.rb +0 -88
- data/lib/chef/knife/key_list_base.rb +0 -45
- data/lib/chef/knife/key_show.rb +0 -53
- data/lib/chef/knife/list.rb +0 -172
- data/lib/chef/knife/node_bulk_delete.rb +0 -74
- data/lib/chef/knife/node_create.rb +0 -47
- data/lib/chef/knife/node_delete.rb +0 -46
- data/lib/chef/knife/node_edit.rb +0 -70
- data/lib/chef/knife/node_environment_set.rb +0 -54
- data/lib/chef/knife/node_list.rb +0 -44
- data/lib/chef/knife/node_policy_set.rb +0 -79
- data/lib/chef/knife/node_run_list_add.rb +0 -104
- data/lib/chef/knife/node_run_list_remove.rb +0 -67
- data/lib/chef/knife/node_run_list_set.rb +0 -66
- data/lib/chef/knife/node_show.rb +0 -61
- data/lib/chef/knife/null.rb +0 -10
- data/lib/chef/knife/osc_user_create.rb +0 -97
- data/lib/chef/knife/osc_user_delete.rb +0 -51
- data/lib/chef/knife/osc_user_edit.rb +0 -58
- data/lib/chef/knife/osc_user_list.rb +0 -47
- data/lib/chef/knife/osc_user_reregister.rb +0 -64
- data/lib/chef/knife/osc_user_show.rb +0 -53
- data/lib/chef/knife/raw.rb +0 -124
- data/lib/chef/knife/rehash.rb +0 -65
- data/lib/chef/knife/role_bulk_delete.rb +0 -65
- data/lib/chef/knife/role_create.rb +0 -53
- data/lib/chef/knife/role_delete.rb +0 -46
- data/lib/chef/knife/role_edit.rb +0 -45
- data/lib/chef/knife/role_env_run_list_add.rb +0 -87
- data/lib/chef/knife/role_env_run_list_clear.rb +0 -55
- data/lib/chef/knife/role_env_run_list_remove.rb +0 -57
- data/lib/chef/knife/role_env_run_list_replace.rb +0 -60
- data/lib/chef/knife/role_env_run_list_set.rb +0 -70
- data/lib/chef/knife/role_from_file.rb +0 -51
- data/lib/chef/knife/role_list.rb +0 -42
- data/lib/chef/knife/role_run_list_add.rb +0 -87
- data/lib/chef/knife/role_run_list_clear.rb +0 -55
- data/lib/chef/knife/role_run_list_remove.rb +0 -56
- data/lib/chef/knife/role_run_list_replace.rb +0 -60
- data/lib/chef/knife/role_run_list_set.rb +0 -69
- data/lib/chef/knife/role_show.rb +0 -48
- data/lib/chef/knife/search.rb +0 -194
- data/lib/chef/knife/serve.rb +0 -64
- data/lib/chef/knife/show.rb +0 -72
- data/lib/chef/knife/ssh.rb +0 -640
- data/lib/chef/knife/ssl_check.rb +0 -283
- data/lib/chef/knife/ssl_fetch.rb +0 -161
- data/lib/chef/knife/status.rb +0 -110
- data/lib/chef/knife/supermarket_download.rb +0 -122
- data/lib/chef/knife/supermarket_install.rb +0 -193
- data/lib/chef/knife/supermarket_list.rb +0 -65
- data/lib/chef/knife/supermarket_search.rb +0 -53
- data/lib/chef/knife/supermarket_share.rb +0 -166
- data/lib/chef/knife/supermarket_show.rb +0 -67
- data/lib/chef/knife/supermarket_unshare.rb +0 -61
- data/lib/chef/knife/tag_create.rb +0 -52
- data/lib/chef/knife/tag_delete.rb +0 -60
- data/lib/chef/knife/tag_list.rb +0 -47
- data/lib/chef/knife/upload.rb +0 -86
- data/lib/chef/knife/user_create.rb +0 -151
- data/lib/chef/knife/user_delete.rb +0 -96
- data/lib/chef/knife/user_edit.rb +0 -82
- data/lib/chef/knife/user_key_create.rb +0 -70
- data/lib/chef/knife/user_key_delete.rb +0 -77
- data/lib/chef/knife/user_key_edit.rb +0 -80
- data/lib/chef/knife/user_key_list.rb +0 -70
- data/lib/chef/knife/user_key_show.rb +0 -77
- data/lib/chef/knife/user_list.rb +0 -44
- data/lib/chef/knife/user_reregister.rb +0 -90
- data/lib/chef/knife/user_show.rb +0 -79
- data/lib/chef/knife/xargs.rb +0 -282
- data/lib/chef/knife.rb +0 -630
- data/lib/chef/monkey_patches/net_http.rb +0 -64
- data/lib/chef/nil_argument.rb +0 -3
- data/lib/chef/provider/apt_preference.rb +0 -94
- data/lib/chef/provider/apt_repository.rb +0 -360
- data/lib/chef/provider/apt_update.rb +0 -80
- data/lib/chef/provider/group/suse.rb +0 -83
- 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/provider/osx_profile.rb +0 -251
- data/lib/chef/provider/package/freebsd/pkg.rb +0 -114
- data/lib/chef/provider/package/yum/simplejson/LICENSE.txt +0 -79
- data/lib/chef/provider/package/yum/simplejson/__init__.py +0 -318
- data/lib/chef/provider/package/yum/simplejson/__init__.pyc +0 -0
- data/lib/chef/provider/package/yum/simplejson/decoder.py +0 -354
- data/lib/chef/provider/package/yum/simplejson/decoder.pyc +0 -0
- data/lib/chef/provider/package/yum/simplejson/encoder.py +0 -440
- data/lib/chef/provider/package/yum/simplejson/encoder.pyc +0 -0
- data/lib/chef/provider/package/yum/simplejson/scanner.py +0 -65
- data/lib/chef/provider/package/yum/simplejson/scanner.pyc +0 -0
- data/lib/chef/provider/package/yum/simplejson/tool.py +0 -37
- data/lib/chef/provider/reboot.rb +0 -78
- data/lib/chef/provider/user/useradd.rb +0 -161
- data/lib/chef/provider/windows_env.rb +0 -207
- data/lib/chef/provider/windows_path.rb +0 -61
- data/lib/chef/provider/windows_task.rb +0 -635
- data/lib/chef/resource/cron.rb +0 -174
- data/lib/chef/resource/cron_d.rb +0 -238
- data/lib/chef/resource/git.rb +0 -35
- data/lib/chef/resource/scm.rb +0 -75
- data/lib/chef/resource/subversion.rb +0 -55
- data/lib/chef/util/powershell/cmdlet.rb +0 -173
- data/lib/chef/util/powershell/cmdlet_result.rb +0 -61
- data/spec/data/mac_users/10.7-8.plist.xml +0 -559
- data/spec/data/mac_users/10.7-8.shadow.xml +0 -11
- data/spec/data/mac_users/10.7.plist.xml +0 -559
- data/spec/data/mac_users/10.7.shadow.xml +0 -11
- data/spec/data/mac_users/10.8.plist.xml +0 -559
- data/spec/data/mac_users/10.8.shadow.xml +0 -21
- data/spec/functional/audit/rspec_formatter_spec.rb +0 -54
- data/spec/functional/audit/runner_spec.rb +0 -121
- data/spec/functional/knife/cookbook_delete_spec.rb +0 -156
- data/spec/functional/knife/exec_spec.rb +0 -55
- data/spec/functional/knife/rehash_spec.rb +0 -39
- data/spec/functional/knife/smoke_test.rb +0 -42
- data/spec/functional/knife/ssh_spec.rb +0 -359
- data/spec/functional/resource/base.rb +0 -28
- data/spec/functional/resource/windows_service_spec.rb +0 -102
- data/spec/functional/util/powershell/cmdlet_spec.rb +0 -111
- data/spec/functional/win32/service_manager_spec.rb +0 -220
- data/spec/integration/knife/chef_fs_data_store_spec.rb +0 -556
- data/spec/integration/knife/chef_repo_path_spec.rb +0 -961
- data/spec/integration/knife/chef_repository_file_system_spec.rb +0 -199
- data/spec/integration/knife/chefignore_spec.rb +0 -300
- data/spec/integration/knife/client_bulk_delete_spec.rb +0 -130
- data/spec/integration/knife/client_create_spec.rb +0 -69
- data/spec/integration/knife/client_delete_spec.rb +0 -63
- data/spec/integration/knife/client_key_create_spec.rb +0 -65
- data/spec/integration/knife/client_key_delete_spec.rb +0 -42
- data/spec/integration/knife/client_key_list_spec.rb +0 -60
- data/spec/integration/knife/client_key_show_spec.rb +0 -44
- data/spec/integration/knife/client_list_spec.rb +0 -48
- data/spec/integration/knife/client_show_spec.rb +0 -36
- data/spec/integration/knife/common_options_spec.rb +0 -173
- data/spec/integration/knife/config_get_profile_spec.rb +0 -112
- data/spec/integration/knife/config_get_spec.rb +0 -190
- data/spec/integration/knife/config_list_profiles_spec.rb +0 -189
- data/spec/integration/knife/config_use_profile_spec.rb +0 -100
- data/spec/integration/knife/cookbook_api_ipv6_spec.rb +0 -112
- data/spec/integration/knife/cookbook_bulk_delete_spec.rb +0 -64
- data/spec/integration/knife/cookbook_download_spec.rb +0 -71
- data/spec/integration/knife/cookbook_list_spec.rb +0 -54
- data/spec/integration/knife/cookbook_show_spec.rb +0 -148
- data/spec/integration/knife/cookbook_upload_spec.rb +0 -90
- data/spec/integration/knife/data_bag_create_spec.rb +0 -124
- data/spec/integration/knife/data_bag_delete_spec.rb +0 -58
- data/spec/integration/knife/data_bag_edit_spec.rb +0 -104
- data/spec/integration/knife/data_bag_from_file_spec.rb +0 -115
- data/spec/integration/knife/data_bag_list_spec.rb +0 -43
- data/spec/integration/knife/data_bag_show_spec.rb +0 -94
- data/spec/integration/knife/delete_spec.rb +0 -1017
- data/spec/integration/knife/deps_spec.rb +0 -702
- data/spec/integration/knife/diff_spec.rb +0 -602
- data/spec/integration/knife/download_spec.rb +0 -1333
- data/spec/integration/knife/environment_compare_spec.rb +0 -74
- data/spec/integration/knife/environment_create_spec.rb +0 -40
- data/spec/integration/knife/environment_delete_spec.rb +0 -36
- data/spec/integration/knife/environment_from_file_spec.rb +0 -115
- data/spec/integration/knife/environment_list_spec.rb +0 -41
- data/spec/integration/knife/environment_show_spec.rb +0 -76
- data/spec/integration/knife/list_spec.rb +0 -1059
- data/spec/integration/knife/node_bulk_delete_spec.rb +0 -51
- data/spec/integration/knife/node_create_spec.rb +0 -46
- data/spec/integration/knife/node_delete_spec.rb +0 -47
- data/spec/integration/knife/node_environment_set_spec.rb +0 -45
- data/spec/integration/knife/node_from_file_spec.rb +0 -58
- data/spec/integration/knife/node_list_spec.rb +0 -44
- data/spec/integration/knife/node_run_list_add_spec.rb +0 -53
- data/spec/integration/knife/node_run_list_remove_spec.rb +0 -35
- data/spec/integration/knife/node_run_list_set_spec.rb +0 -40
- data/spec/integration/knife/node_show_spec.rb +0 -35
- data/spec/integration/knife/raw_spec.rb +0 -248
- data/spec/integration/knife/redirection_spec.rb +0 -54
- data/spec/integration/knife/role_bulk_delete_spec.rb +0 -51
- data/spec/integration/knife/role_create_spec.rb +0 -40
- data/spec/integration/knife/role_delete_spec.rb +0 -47
- data/spec/integration/knife/role_from_file_spec.rb +0 -95
- data/spec/integration/knife/role_list_spec.rb +0 -44
- data/spec/integration/knife/role_show_spec.rb +0 -50
- data/spec/integration/knife/search_node_spec.rb +0 -39
- data/spec/integration/knife/serve_spec.rb +0 -93
- data/spec/integration/knife/show_spec.rb +0 -167
- data/spec/integration/knife/upload_spec.rb +0 -1540
- data/spec/scripts/ssl-serve.rb +0 -47
- data/spec/support/mock/constant.rb +0 -52
- data/spec/support/shared/context/client.rb +0 -306
- data/spec/support/shared/examples/client.rb +0 -104
- data/spec/support/shared/functional/win32_service.rb +0 -57
- data/spec/support/shared/integration/app_server_support.rb +0 -39
- data/spec/unit/application/knife_spec.rb +0 -228
- data/spec/unit/audit/audit_event_proxy_spec.rb +0 -325
- data/spec/unit/audit/audit_reporter_spec.rb +0 -444
- data/spec/unit/audit/control_group_data_spec.rb +0 -487
- data/spec/unit/audit/logger_spec.rb +0 -42
- data/spec/unit/audit/runner_spec.rb +0 -144
- data/spec/unit/chef_fs/parallelizer.rb +0 -477
- data/spec/unit/cookbook_site_streaming_uploader_spec.rb +0 -198
- data/spec/unit/data_collector/messages/helpers_spec.rb +0 -202
- data/spec/unit/data_collector/messages_spec.rb +0 -329
- data/spec/unit/data_collector/resource_report_spec.rb +0 -145
- data/spec/unit/dsl/audit_spec.rb +0 -43
- data/spec/unit/knife/bootstrap/chef_vault_handler_spec.rb +0 -152
- data/spec/unit/knife/bootstrap/client_builder_spec.rb +0 -207
- data/spec/unit/knife/bootstrap_spec.rb +0 -976
- data/spec/unit/knife/client_bulk_delete_spec.rb +0 -166
- data/spec/unit/knife/client_create_spec.rb +0 -186
- data/spec/unit/knife/client_delete_spec.rb +0 -99
- data/spec/unit/knife/client_edit_spec.rb +0 -53
- data/spec/unit/knife/client_reregister_spec.rb +0 -62
- data/spec/unit/knife/client_show_spec.rb +0 -52
- data/spec/unit/knife/configure_client_spec.rb +0 -81
- data/spec/unit/knife/configure_spec.rb +0 -190
- data/spec/unit/knife/cookbook_bulk_delete_spec.rb +0 -87
- data/spec/unit/knife/cookbook_create_spec.rb +0 -42
- data/spec/unit/knife/cookbook_delete_spec.rb +0 -239
- data/spec/unit/knife/cookbook_download_spec.rb +0 -255
- data/spec/unit/knife/cookbook_list_spec.rb +0 -88
- data/spec/unit/knife/cookbook_metadata_from_file_spec.rb +0 -65
- data/spec/unit/knife/cookbook_metadata_spec.rb +0 -182
- data/spec/unit/knife/cookbook_show_spec.rb +0 -254
- data/spec/unit/knife/cookbook_test_spec.rb +0 -84
- data/spec/unit/knife/cookbook_upload_spec.rb +0 -333
- data/spec/unit/knife/core/bootstrap_context_spec.rb +0 -324
- data/spec/unit/knife/core/cookbook_scm_repo_spec.rb +0 -187
- data/spec/unit/knife/core/gem_glob_loader_spec.rb +0 -209
- data/spec/unit/knife/core/hashed_command_loader_spec.rb +0 -112
- data/spec/unit/knife/core/node_editor_spec.rb +0 -211
- data/spec/unit/knife/core/object_loader_spec.rb +0 -81
- data/spec/unit/knife/core/subcommand_loader_spec.rb +0 -64
- data/spec/unit/knife/core/ui_spec.rb +0 -639
- data/spec/unit/knife/data_bag_create_spec.rb +0 -175
- data/spec/unit/knife/data_bag_edit_spec.rb +0 -126
- data/spec/unit/knife/data_bag_from_file_spec.rb +0 -174
- data/spec/unit/knife/data_bag_secret_options_spec.rb +0 -165
- data/spec/unit/knife/data_bag_show_spec.rb +0 -139
- data/spec/unit/knife/environment_compare_spec.rb +0 -112
- data/spec/unit/knife/environment_create_spec.rb +0 -91
- data/spec/unit/knife/environment_delete_spec.rb +0 -71
- data/spec/unit/knife/environment_edit_spec.rb +0 -79
- data/spec/unit/knife/environment_from_file_spec.rb +0 -90
- data/spec/unit/knife/environment_list_spec.rb +0 -54
- data/spec/unit/knife/environment_show_spec.rb +0 -52
- data/spec/unit/knife/key_create_spec.rb +0 -223
- data/spec/unit/knife/key_delete_spec.rb +0 -133
- data/spec/unit/knife/key_edit_spec.rb +0 -264
- data/spec/unit/knife/key_helper.rb +0 -74
- data/spec/unit/knife/key_list_spec.rb +0 -216
- data/spec/unit/knife/key_show_spec.rb +0 -126
- data/spec/unit/knife/node_bulk_delete_spec.rb +0 -94
- data/spec/unit/knife/node_delete_spec.rb +0 -77
- data/spec/unit/knife/node_edit_spec.rb +0 -116
- data/spec/unit/knife/node_environment_set_spec.rb +0 -56
- data/spec/unit/knife/node_from_file_spec.rb +0 -59
- data/spec/unit/knife/node_list_spec.rb +0 -62
- data/spec/unit/knife/node_policy_set_spec.rb +0 -122
- data/spec/unit/knife/node_run_list_add_spec.rb +0 -145
- data/spec/unit/knife/node_run_list_remove_spec.rb +0 -106
- data/spec/unit/knife/node_run_list_set_spec.rb +0 -115
- data/spec/unit/knife/node_show_spec.rb +0 -65
- data/spec/unit/knife/osc_user_create_spec.rb +0 -93
- data/spec/unit/knife/osc_user_delete_spec.rb +0 -44
- data/spec/unit/knife/osc_user_edit_spec.rb +0 -52
- data/spec/unit/knife/osc_user_reregister_spec.rb +0 -58
- data/spec/unit/knife/osc_user_show_spec.rb +0 -46
- data/spec/unit/knife/raw_spec.rb +0 -43
- data/spec/unit/knife/role_bulk_delete_spec.rb +0 -80
- data/spec/unit/knife/role_create_spec.rb +0 -80
- data/spec/unit/knife/role_delete_spec.rb +0 -67
- data/spec/unit/knife/role_edit_spec.rb +0 -77
- data/spec/unit/knife/role_env_run_list_add_spec.rb +0 -217
- data/spec/unit/knife/role_env_run_list_clear_spec.rb +0 -94
- data/spec/unit/knife/role_env_run_list_remove_spec.rb +0 -102
- data/spec/unit/knife/role_env_run_list_replace_spec.rb +0 -105
- data/spec/unit/knife/role_env_run_list_set_spec.rb +0 -99
- data/spec/unit/knife/role_from_file_spec.rb +0 -69
- data/spec/unit/knife/role_list_spec.rb +0 -54
- data/spec/unit/knife/role_run_list_add_spec.rb +0 -179
- data/spec/unit/knife/role_run_list_clear_spec.rb +0 -84
- data/spec/unit/knife/role_run_list_remove_spec.rb +0 -92
- data/spec/unit/knife/role_run_list_replace_spec.rb +0 -98
- data/spec/unit/knife/role_run_list_set_spec.rb +0 -89
- data/spec/unit/knife/role_show_spec.rb +0 -59
- data/spec/unit/knife/ssh_spec.rb +0 -506
- data/spec/unit/knife/ssl_check_spec.rb +0 -256
- data/spec/unit/knife/ssl_fetch_spec.rb +0 -222
- data/spec/unit/knife/status_spec.rb +0 -112
- data/spec/unit/knife/supermarket_download_spec.rb +0 -152
- data/spec/unit/knife/supermarket_install_spec.rb +0 -202
- data/spec/unit/knife/supermarket_share_spec.rb +0 -209
- data/spec/unit/knife/supermarket_unshare_spec.rb +0 -78
- data/spec/unit/knife/tag_create_spec.rb +0 -23
- data/spec/unit/knife/tag_delete_spec.rb +0 -25
- data/spec/unit/knife/tag_list_spec.rb +0 -23
- data/spec/unit/knife/user_create_spec.rb +0 -214
- data/spec/unit/knife/user_delete_spec.rb +0 -65
- data/spec/unit/knife/user_edit_spec.rb +0 -66
- data/spec/unit/knife/user_reregister_spec.rb +0 -74
- data/spec/unit/knife/user_show_spec.rb +0 -65
- data/spec/unit/knife_spec.rb +0 -589
- data/spec/unit/mash_spec.rb +0 -51
- data/spec/unit/monkey_patches/uri_spec.rb +0 -34
- data/spec/unit/provider/group/suse_spec.rb +0 -90
- data/spec/unit/provider/ohai_spec.rb +0 -84
- data/spec/unit/provider/osx_profile_spec.rb +0 -255
- data/spec/unit/provider/package/freebsd/pkg_spec.rb +0 -274
- data/spec/unit/provider/user/dscl_spec.rb +0 -920
- data/spec/unit/provider_resolver_spec.rb +0 -923
- data/spec/unit/resource/timezone.rb +0 -39
- data/spec/unit/util/powershell/cmdlet_spec.rb +0 -106
- data/spec/unit/windows_service_spec.rb +0 -118
- data/tasks/announce.rb +0 -51
- data/tasks/bin/run_external_test +0 -29
- data/tasks/dependencies.rb +0 -58
- data/tasks/templates/release.md.erb +0 -34
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2116a9a16e93030ed9aa85235426085567d3ef63e0c603bffa3a5a1614bb439e
|
4
|
+
data.tar.gz: cc9dcbc47ddcb72e3fe920f9da13a788a607b66d628331b23a03ea8dbad53c30
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d14c879526c8da207c572690f7e5c0a066c8ff89d33412053f6eaf3635ae2231d1f0c2c3478b1ebae30219ac0cbf86ee8c2381239eda50b937f853c2b7a77028
|
7
|
+
data.tar.gz: 1bfb25d57117e4cc93655ab55573cebcffd9854402a59606f79e5a6e05bc8660d18c2ccc85d2a09c007789509dd23abee90a1a3d26a07bc6d93ba8fff12d0b58
|
data/Gemfile
CHANGED
@@ -1,71 +1,89 @@
|
|
1
1
|
source "https://rubygems.org"
|
2
2
|
|
3
|
-
# Note we do not use the gemspec DSL which restricts to the
|
4
|
-
# gemspec for the current platform and filters out other platforms
|
5
|
-
# during a bundle lock operation. We actually want dependencies from
|
6
|
-
# both of our gemspecs. Also note this this mimics gemspec behavior
|
7
|
-
# of bundler versions prior to 1.12.0 (https://github.com/bundler/bundler/commit/193a14fe5e0d56294c7b370a0e59f93b2c216eed)
|
8
3
|
gem "chef", path: "."
|
9
4
|
|
10
|
-
gem "
|
11
|
-
|
5
|
+
gem "ohai", git: "https://github.com/chef/ohai.git", branch: "main"
|
6
|
+
|
7
|
+
# Nwed to file a bug with rest-client. In the meantime, we can use this until they accept the update.
|
8
|
+
gem "rest-client", git: "https://github.com/chef/rest-client", branch: "jfm/ucrt_update1"
|
9
|
+
|
10
|
+
gem "ffi", ">= 1.15.5"
|
11
|
+
gem "chef-utils", path: File.expand_path("chef-utils", __dir__) if File.exist?(File.expand_path("chef-utils", __dir__))
|
12
|
+
gem "chef-config", path: File.expand_path("chef-config", __dir__) if File.exist?(File.expand_path("chef-config", __dir__))
|
13
|
+
|
14
|
+
if File.exist?(File.expand_path("chef-bin", __dir__))
|
15
|
+
# bundling in a git checkout
|
16
|
+
gem "chef-bin", path: File.expand_path("chef-bin", __dir__)
|
17
|
+
else
|
18
|
+
# bundling in omnibus
|
19
|
+
gem "chef-bin" # rubocop:disable Bundler/DuplicatedGem
|
20
|
+
end
|
21
|
+
|
22
|
+
gem "cheffish", ">= 17"
|
12
23
|
|
13
24
|
group(:omnibus_package) do
|
14
|
-
gem "appbundler"
|
25
|
+
gem "appbundler"
|
15
26
|
gem "rb-readline"
|
16
|
-
gem "inspec-core", "
|
27
|
+
gem "inspec-core-bin", ">= 5" # need to provide the binaries for inspec
|
17
28
|
gem "chef-vault"
|
18
29
|
end
|
19
30
|
|
20
31
|
group(:omnibus_package, :pry) do
|
21
|
-
|
22
|
-
|
23
|
-
gem "pry
|
32
|
+
# Locked because pry-byebug is broken with 13+.
|
33
|
+
# some work is ongoing? https://github.com/deivid-rodriguez/pry-byebug/issues/343
|
34
|
+
gem "pry", "= 0.13.0"
|
35
|
+
# byebug does not install on freebsd on ruby 3.0
|
36
|
+
gem "pry-byebug" unless RUBY_PLATFORM.match?(/freebsd/i)
|
24
37
|
gem "pry-stack_explorer"
|
25
38
|
end
|
26
39
|
|
27
|
-
|
28
|
-
|
29
|
-
end
|
30
|
-
|
31
|
-
# Everything except AIX
|
32
|
-
group(:ruby_prof) do
|
33
|
-
gem "ruby-prof", "< 0.18.0" # 0.18 breaks appveyor tests
|
34
|
-
end
|
40
|
+
# proxifier gem is busted on ruby 3.1 and seems abandoned so use git fork of gem
|
41
|
+
gem "proxifier", git: "https://github.com/chef/ruby-proxifier", branch: "lcg/ruby-3"
|
35
42
|
|
36
43
|
# Everything except AIX and Windows
|
37
44
|
group(:ruby_shadow) do
|
38
|
-
|
45
|
+
# if ruby-shadow does a release that supports ruby-3.0 this can be removed
|
46
|
+
gem "ruby-shadow", git: "https://github.com/chef/ruby-shadow", branch: "lcg/ruby-3.0", platforms: :ruby unless RUBY_PLATFORM == "x64-mingw-ucrt"
|
47
|
+
end
|
48
|
+
|
49
|
+
# deps that cannot be put in the knife gem because they require a compiler and fail on windows nodes
|
50
|
+
group(:knife_windows_deps) do
|
51
|
+
gem "ed25519", "~> 1.2" # ed25519 ssh key support
|
39
52
|
end
|
40
53
|
|
41
54
|
group(:development, :test) do
|
42
|
-
|
43
|
-
|
44
|
-
# two rake gems installed again
|
45
|
-
gem "rake", "<= 12.3.0"
|
46
|
-
gem "simplecov"
|
55
|
+
gem "rake"
|
56
|
+
gem "rspec"
|
47
57
|
gem "webmock"
|
48
|
-
|
49
|
-
# for testing new chefstyle rules
|
50
|
-
gem "chefstyle", "=0.11.2"
|
58
|
+
gem "fauxhai-ng" # for chef-utils gem
|
51
59
|
end
|
52
60
|
|
61
|
+
gem "chefstyle"
|
62
|
+
# group(:chefstyle) do
|
63
|
+
# # for testing new chefstyle rules
|
64
|
+
# gem "chefstyle", git: "https://github.com/chef/chefstyle.git", branch: "main"
|
65
|
+
# end
|
66
|
+
|
53
67
|
instance_eval(ENV["GEMFILE_MOD"]) if ENV["GEMFILE_MOD"]
|
54
68
|
|
55
69
|
# If you want to load debugging tools into the bundle exec sandbox,
|
56
70
|
# add these additional dependencies into Gemfile.local
|
57
|
-
eval_gemfile(
|
71
|
+
eval_gemfile("./Gemfile.local") if File.exist?("./Gemfile.local")
|
58
72
|
|
59
73
|
# These lines added for Windows development only.
|
60
74
|
# For FFI to call into PowerShell we need the binaries and assemblies located
|
61
75
|
# in the Ruby bindir.
|
76
|
+
# The Powershell DLL source lives here: https://github.com/chef/chef-powershell-shim
|
77
|
+
# Every merge into that repo triggers a Habitat build and promotion. Running
|
78
|
+
# the rake :update_chef_exec_dll task in this (chef/chef) repo will pull down
|
79
|
+
# the built packages and copy the binaries to distro/ruby_bin_folder.
|
62
80
|
#
|
63
81
|
# We copy (and overwrite) these files every time "bundle <exec|install>" is
|
64
82
|
# executed, just in case they have changed.
|
65
|
-
if RUBY_PLATFORM
|
83
|
+
if RUBY_PLATFORM.match?(/mswin|mingw|windows/)
|
66
84
|
instance_eval do
|
67
85
|
ruby_exe_dir = RbConfig::CONFIG["bindir"]
|
68
|
-
assemblies = Dir.glob(File.expand_path("distro/ruby_bin_folder",
|
86
|
+
assemblies = Dir.glob(File.expand_path("distro/ruby_bin_folder/#{ENV["PROCESSOR_ARCHITECTURE"]}", __dir__) + "**/*")
|
69
87
|
FileUtils.cp_r assemblies, ruby_exe_dir, verbose: false unless ENV["_BUNDLER_WINDOWS_DLLS_COPIED"]
|
70
88
|
ENV["_BUNDLER_WINDOWS_DLLS_COPIED"] = "1"
|
71
89
|
end
|
data/README.md
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
# Chef Infra
|
2
2
|
[![Code Climate](https://codeclimate.com/github/chef/chef.svg)](https://codeclimate.com/github/chef/chef)
|
3
|
-
[![Build Status](https://badge.buildkite.com/
|
3
|
+
[![Build Status](https://badge.buildkite.com/c82093430ceec7d27af05febb9dcafe3aa331fff9d74c0ab9d.svg?branch=main)](https://buildkite.com/chef-oss/chef-chef-main-verify)
|
4
4
|
[![Gem Version](https://badge.fury.io/rb/chef.svg)](https://badge.fury.io/rb/chef)
|
5
|
-
[![](https://img.shields.io/badge/Release%20Policy-Cadence%20Release-brightgreen.svg)](https://github.com/chef/chef/blob/
|
5
|
+
[![](https://img.shields.io/badge/Release%20Policy-Cadence%20Release-brightgreen.svg)](https://github.com/chef/chef/blob/main/docs/dev/design_documents/client_release_cadence.md)
|
6
6
|
|
7
|
-
**Umbrella Project**: [Chef Infra](https://github.com/chef/chef-oss-practices/blob/
|
7
|
+
**Umbrella Project**: [Chef Infra](https://github.com/chef/chef-oss-practices/blob/main/projects/chef-infra.md)
|
8
8
|
|
9
|
-
**Project State**: [Active](https://github.com/chef/chef-oss-practices/blob/
|
9
|
+
**Project State**: [Active](https://github.com/chef/chef-oss-practices/blob/main/repo-management/repo-states.md#active)
|
10
10
|
|
11
|
-
**Issues [Response Time Maximum](https://github.com/chef/chef-oss-practices/blob/
|
11
|
+
**Issues [Response Time Maximum](https://github.com/chef/chef-oss-practices/blob/main/repo-management/repo-states.md)**: 14 days
|
12
12
|
|
13
|
-
**Pull Request [Response Time Maximum](https://github.com/chef/chef-oss-practices/blob/
|
13
|
+
**Pull Request [Response Time Maximum](https://github.com/chef/chef-oss-practices/blob/main/repo-management/repo-states.md)**: 14 days
|
14
14
|
|
15
15
|
## Getting Started
|
16
16
|
|
@@ -18,223 +18,35 @@ Chef Infra is a configuration management tool designed to bring automation to yo
|
|
18
18
|
|
19
19
|
### Want to try Chef Infra?
|
20
20
|
|
21
|
-
For Chef Infra usage, please refer to
|
21
|
+
For Chef Infra usage, please refer to [Learn Chef](https://learn.chef.io/), our self-paced, entirely free learning platform. Learn Chef also includes module-based training for Chef Infra, as well as Chef Automate, Chef Habitat, and Chef InSpec.
|
22
22
|
|
23
23
|
Other useful resources for Chef Infra users:
|
24
24
|
|
25
|
-
- Documentation: <https://docs.chef.io
|
26
|
-
- Source: <https://github.com/chef/chef/tree/
|
25
|
+
- Documentation: <https://docs.chef.io/>
|
26
|
+
- Source: <https://github.com/chef/chef/tree/main>
|
27
27
|
- Tickets/Issues: <https://github.com/chef/chef/issues>
|
28
28
|
- Slack: [Chef Community Slack](https://community-slack.chef.io/)
|
29
|
-
- Mailing list: <https://discourse.chef.io>
|
30
|
-
|
31
|
-
Chef is a configuration management tool designed to bring automation to your
|
32
|
-
entire infrastructure.
|
33
|
-
|
34
|
-
This README focuses on developers who want to modify Chef source code.
|
35
|
-
If you just want to use Chef, check out these resources:
|
36
|
-
|
37
|
-
- [learnchef](https://learn.chef.io): Getting started guide
|
38
|
-
- [docs.chef.io](https://docs.chef.io): Comprehensive User Docs
|
39
|
-
- [Installer Downloads](https://downloads.chef.io/chef/): Install Chef as a complete package
|
40
|
-
- [chef/chef](https://hub.docker.com/r/chef/chef/): Docker image for use with [kitchen-dokken](https://github.com/someara/kitchen-dokken/)
|
29
|
+
- Mailing list/Forum: <https://discourse.chef.io>
|
41
30
|
|
42
31
|
## Reporting Issues
|
43
32
|
|
44
33
|
Issues can be reported by using [GitHub Issues](https://github.com/chef/chef/issues).
|
45
34
|
|
46
|
-
|
47
|
-
|
48
|
-
Note that this repository is primarily for reporting chef-client issues.
|
49
|
-
For reporting issues against other Chef projects, please look up the appropriate repository
|
50
|
-
to report issues against in the Chef docs in the
|
51
|
-
[community contributions section](https://docs.chef.io/community_contributions.html#issues-and-bug-reports).
|
52
|
-
If you can't determine the appropriate place to report an issue, then please open it
|
53
|
-
against the repository you think best fits and it will be directed to the appropriate project.
|
54
|
-
|
55
|
-
## Installing From Git for Developers
|
56
|
-
|
57
|
-
**NOTE:** As a Chef user, please download the [Chef](https://downloads.chef.io/chef) or [Chef-DK](https://downloads.chef.io/chef) packages, which provide Ruby and other necessary libraries for running Chef.
|
58
|
-
|
59
|
-
We do not recommend end users install Chef from gems or build from source. The following instructions apply only to those doing software development on Chef.
|
60
|
-
|
61
|
-
### Prerequisites
|
62
|
-
|
63
|
-
Install:
|
64
|
-
|
65
|
-
- git
|
66
|
-
- C compiler, header files, etc.
|
67
|
-
- Ruby 2.4 or later
|
68
|
-
- bundler gem
|
69
|
-
|
70
|
-
**NOTE:** Chef supports a large number of platforms, and there are many different ways to manage Ruby installs on each of those platforms. We assume you will install Ruby in a way appropriate for your development platform, but do not provide instructions for setting up Ruby.
|
71
|
-
|
72
|
-
### Chef Installation
|
73
|
-
|
74
|
-
Once you have your development environment configured you can clone the Chef repository and install Chef:
|
75
|
-
|
76
|
-
```bash
|
77
|
-
git clone https://github.com/chef/chef.git
|
78
|
-
cd chef
|
79
|
-
bundle install
|
80
|
-
bundle exec rake install
|
81
|
-
```
|
82
|
-
|
83
|
-
## Contributing/Development
|
84
|
-
|
85
|
-
Please read our [Community Contributions Guidelines](https://docs.chef.io/community_contributions.html), and ensure you are signing all your commits with DCO sign-off.
|
86
|
-
|
87
|
-
The general development process is:
|
88
|
-
|
89
|
-
1. Fork this repo and clone it to your workstation.
|
90
|
-
2. Create a feature branch for your change.
|
91
|
-
3. Write code and tests.
|
92
|
-
4. Push your feature branch to GitHub and open a pull request against master.
|
93
|
-
|
94
|
-
Once your repository is set up, you can start working on the code. We do utilize RSpec for test driven development, so you'll need to get a development environment running. Follow the above procedure ("Installing from Git") to get your local copy of the source running.
|
95
|
-
|
96
|
-
## Testing
|
97
|
-
|
98
|
-
This repository uses rspec for testing.
|
99
|
-
|
100
|
-
```bash
|
101
|
-
# all tests
|
102
|
-
bundle exec rspec
|
103
|
-
|
104
|
-
# single test
|
105
|
-
bundle exec rspec spec/PATH/TO/FILE_spec.rb
|
106
|
-
|
107
|
-
# all tests under a subdir
|
108
|
-
bundle exec rspec spec/PATH/TO/DIR
|
109
|
-
```
|
110
|
-
|
111
|
-
When you submit a PR rspec tests will run automatically on [Travis-CI](https://travis-ci.org/) and [AppVeyor](https://www.appveyor.com/).
|
112
|
-
|
113
|
-
## Building the Full Package
|
114
|
-
|
115
|
-
To build Chef as a standalone package, we use the [omnibus](omnibus/README.md) packaging system.
|
116
|
-
|
117
|
-
To build:
|
118
|
-
|
119
|
-
```bash
|
120
|
-
git clone https://github.com/chef/chef.git
|
121
|
-
cd chef/omnibus
|
122
|
-
bundle install
|
123
|
-
bundle exec omnibus build chef
|
124
|
-
```
|
125
|
-
|
126
|
-
The prerequisites necessary to run omnibus itself are not documented in this repository. See the [Omnibus repository](https://github.com/chef/omnibus) for additional details.
|
127
|
-
|
128
|
-
## Updating Dependencies
|
129
|
-
|
130
|
-
If you want to change our constraints (change which packages and versions we accept in the chef), there are several places to do so:
|
131
|
-
|
132
|
-
* [Gemfile](Gemfile) and [Gemfile.lock](Gemfile.lock): All gem version constraints (update with `bundle update`)
|
133
|
-
* [omnibus_overrides.rb](omnibus_overrides_rb): Pinned versions of omnibus packages.
|
134
|
-
* [omnibus/Gemfile](omnibus/Gemfile) and [omnibus/Gemfile.lock](omnibus/Gemfile.lock): Gems for the omnibus build system itself.
|
135
|
-
|
136
|
-
In addition there are several places versions are pinned for CI tasks:
|
137
|
-
|
138
|
-
* [kitchen-tests/Gemfile](kitchen-tests/Gemfile) and [kitchen-tests/Gemfile.lock](kitchen-tests/Gemfile.lock): Gems for test-kitchen tests (travis)
|
139
|
-
|
140
|
-
In order to update everything run `rake dependencies`. Note that the [Gemfile.lock](Gemfile.lock) pins windows platforms and to fully regenerate the lockfile
|
141
|
-
you must use the following commands or run `rake dependencies:update_gemfile_lock`:
|
142
|
-
|
143
|
-
```bash
|
144
|
-
bundle lock --update --add-platform ruby
|
145
|
-
bundle lock --update --add-platform x64-mingw32
|
146
|
-
bundle lock --update --add-platform x86-mingw32
|
147
|
-
```
|
148
|
-
|
149
|
-
# How Chef Builds and Versions
|
150
|
-
|
151
|
-
Chef is an amalgam of many components. These components update all the time, necessitating new builds. This is an overview of the process of versioning, building and releasing Chef.
|
152
|
-
|
153
|
-
## Chef Packages
|
154
|
-
|
155
|
-
Chef is distributed as packages for debian, rhel, ubuntu, windows, solaris, aix, and macos. It includes a large number of components from various sources, and these are versioned and maintained separately from the chef project, which bundles them all together conveniently for the user.
|
156
|
-
|
157
|
-
These packages go through several milestones:
|
158
|
-
- `master`: When code is checked in to master, the patch version of chef is bumped (e.g. 14.5.1 -> 14.5.2) and a build is kicked off automatically to create and test the packages in Chef's internal CI cluster.
|
159
|
-
- `unstable`: When a package is built, it enters the unstable channel. When all packages for all OS's have successfully built, the test phase is kicked off in Jenkins across all supported OS's. These builds are password-protected and generally only available to the test systems.
|
160
|
-
- `current`: If the packages pass all the tests on all supported OS's, it is promoted as a unit to `current`, and is available by running `curl https://www.chef.io/chef/install.sh | sudo bash -s -- -c current -P chef` or at <https://downloads.chef.io/chef/current>
|
161
|
-
- `stable`: Periodically, Chef will pick a release to "bless" for folks who would like a slower update schedule than "every time a build passes the tests." When this happens, it is manually promoted to stable and an announcement is sent to the list. It can be reached at <https://downloads.chef.io> or installed using the `curl` command without specifying `-c current`. Packages in `stable` are no longer available in `current`.
|
162
|
-
|
163
|
-
Additionally, periodically Chef will update the desired versions of chef components and check that in to `master`, triggering a new build with the updated components in it.
|
164
|
-
|
165
|
-
## Automated Version Bumping
|
166
|
-
|
167
|
-
Whenever a change is checked in to `master`, the patch version of `chef` is bumped. To do this, the `chef-ci` bot listens to GitHub for merged PRs, and when it finds one, takes these actions:
|
168
|
-
|
169
|
-
1. Bumps the patch version (e.g. 14.1.14 -> 14.1.15) by running ./ci/version_bump.sh
|
170
|
-
2. Updates the changelog with the new pull request and current point release
|
171
|
-
3. Pushes to `master` and submits a new build to Chef's Jenkins cluster.
|
172
|
-
|
173
|
-
## Bumping the minor version of Chef
|
174
|
-
|
175
|
-
After each "official" stable release we need to bump the minor version. To do this:
|
176
|
-
|
177
|
-
1. Run `bundle exec rake version:bump_minor`
|
178
|
-
|
179
|
-
Submit a PR with the changes made by the above.
|
180
|
-
|
181
|
-
## Branch Structure
|
182
|
-
|
183
|
-
We develop and ship the current release of Chef off the master branch of this repository. Our goal is that master should always be in a shipable state. Previous stable releases of Chef are developed on their own branches named by the major version (ex: chef-13 or chef-12). We do not perform direct development on these stable branches except to resolve build failures. Instead we backport fixes from our master branch to these stable branches. Stable branches receive critical bugfixes and security releases and stable Chef releases are made as necessary for security purposes.
|
184
|
-
|
185
|
-
## Backporting Fixes to Stable Releases
|
186
|
-
|
187
|
-
If there is a critical fix you believe should be backported from master to a stable branch please follow these steps to backport your change:
|
188
|
-
|
189
|
-
1. Ask in the #chef-dev channel on [Chef Community Slack](https://community-slack.chef.io/) if this is an appropriate change to backport.
|
190
|
-
3. Inspect the Git history and find the `SHA`(s) associated with the fix.
|
191
|
-
4. Backport the fix to a branch via cherry-pick:
|
192
|
-
1. Check out the stable release branch: `git checkout chef-13`
|
193
|
-
1. Create a branch for your backport: `git checkout -b my_great_bug_packport`
|
194
|
-
2. Cherry Pick the SHA with the fix: `git cherry-pick SHA`
|
195
|
-
3. Address any conflicts (if necessary)
|
196
|
-
5. Push the new branch to your origin: `git push origin`
|
197
|
-
5. Open a PR for your backport
|
198
|
-
1. The PR title should be `Backport: ORIGINAL_PR_TEXT`
|
199
|
-
2. The description should link to the original PR and include a description of why it needs to be backported
|
200
|
-
|
201
|
-
## Component Versions
|
202
|
-
|
203
|
-
Chef has two sorts of component: ruby components like `berkshelf` and `test-kitchen`, and binary components like `openssl` and even `ruby` itself.
|
204
|
-
|
205
|
-
In general, you can find all chef desired versions in the [Gemfile](Gemfile) and [omnibus_overrides.rb](omnibus_overrides.rb) files. The [Gemfile.lock](Gemfile.lock) is the locked version of the Gemfile.
|
206
|
-
|
207
|
-
### Binary Components
|
208
|
-
|
209
|
-
The versions of binary components (as well as rubygems and bundler, which can't be versioned in a Gemfile) are stored in [omnibus_overrides.rb](omnibus_overrides.rb).
|
210
|
-
|
211
|
-
These have software definitions either in [omnibus/config/software](omnibus/config/software) or, more often, in the [omnibus-software](https://github.com/chef/omnibus-software/tree/master/config/software) project.
|
212
|
-
|
213
|
-
### Rubygems Components
|
214
|
-
|
215
|
-
Our rubygems component versions are locked down with `Gemfile.lock`, and can be updated with `bundle update` or `rake dependencies:update_gemfile_lock`.
|
216
|
-
|
217
|
-
### Build Tooling Versions
|
35
|
+
Note that this repository is primarily for reporting issues in the chef-client itself. For reporting issues against other Chef projects, please look up the appropriate repository. If you're unsure where to submit an issue, please ask in the #chef-dev channel in [Chef Community Slack](https://community-slack.chef.io/).
|
218
36
|
|
219
|
-
|
220
|
-
of utilities on a suitably recent distribution and be able to build an omnibus package, but the necessary prerequisites will not be documented here. In most
|
221
|
-
cases a recent MacOS with Xcode and a few homebrew packages or a recent Ubuntu distribution with packages like `build-essentials` should suffice.
|
37
|
+
## How We Build & Release Chef
|
222
38
|
|
223
|
-
|
39
|
+
For information on how a contribution goes from PR to released package, see [How Chef Infra Is Built](docs/dev/design_documents/how_chef_is_tested_and_built.md)
|
224
40
|
|
225
|
-
|
41
|
+
To learn more about our monthly feature releases and yearly major releases, see [Chef Infra Release and Support Schedule](./docs/dev/policy/release_and_support_schedule.md).
|
226
42
|
|
227
|
-
|
43
|
+
## Getting Involved
|
228
44
|
|
229
|
-
|
45
|
+
We'd love to have your help developing Chef Infra. See our [Contributing Document](./CONTRIBUTING.md) for more information on getting started.
|
230
46
|
|
231
|
-
|
47
|
+
## License and Copyright
|
232
48
|
|
233
|
-
|
234
|
-
|:---------------------|:-----------------------------------------|
|
235
|
-
| **Author:** | Adam Jacob (<adam@chef.io>)
|
236
|
-
| **Copyright:** | Copyright 2008-2018, Chef Software, Inc.
|
237
|
-
| **License:** | Apache License, Version 2.0
|
49
|
+
Copyright 2008-2020, Chef Software, Inc.
|
238
50
|
|
239
51
|
```
|
240
52
|
Licensed under the Apache License, Version 2.0 (the "License");
|
data/Rakefile
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#
|
2
2
|
# Author:: Adam Jacob (<adam@chef.io>)
|
3
3
|
# Author:: Daniel DeLeo (<dan@chef.io>)
|
4
|
-
# Copyright:: Copyright
|
4
|
+
# Copyright:: Copyright, Chef Software Inc.
|
5
5
|
# License:: Apache License, Version 2.0
|
6
6
|
#
|
7
7
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -17,27 +17,74 @@
|
|
17
17
|
# limitations under the License.
|
18
18
|
#
|
19
19
|
|
20
|
+
# we need this to resolve files required by lib/chef/dist
|
21
|
+
$LOAD_PATH.unshift(File.expand_path("chef-config/lib", __dir__))
|
22
|
+
|
20
23
|
begin
|
21
24
|
require_relative "tasks/rspec"
|
22
25
|
require_relative "tasks/dependencies"
|
23
|
-
require_relative "tasks/
|
26
|
+
require_relative "tasks/docs"
|
27
|
+
require_relative "tasks/spellcheck"
|
28
|
+
require_relative "chef-utils/lib/chef-utils/dist" unless defined?(ChefUtils::Dist)
|
24
29
|
rescue LoadError => e
|
25
30
|
puts "Skipping missing rake dep: #{e}"
|
26
31
|
end
|
27
32
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
Dir.chdir(chef_config_path)
|
32
|
-
sh("rake install")
|
33
|
-
end
|
33
|
+
require "bundler/gem_helper"
|
34
|
+
|
35
|
+
ENV["CHEF_LICENSE"] = "accept-no-persist"
|
34
36
|
|
35
|
-
|
37
|
+
namespace :pre_install do
|
38
|
+
desc "Runs 'rake install' for the gems that live in subdirectories in this repo"
|
39
|
+
task :install_gems_from_dirs do
|
40
|
+
%w{chef-utils chef-config}.each do |gem|
|
41
|
+
path = ::File.join(::File.dirname(__FILE__), gem)
|
42
|
+
Dir.chdir(path) do
|
43
|
+
system "rake install"
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
desc "Renders the powershell extensions with distro flavoring"
|
49
|
+
task :render_powershell_extension do
|
50
|
+
require "erb"
|
51
|
+
template_file = ::File.join(::File.dirname(__FILE__), "distro", "templates", "powershell", "chef", "chef.psm1.erb")
|
52
|
+
psm1_path = ::File.join(::File.dirname(__FILE__), "distro", "powershell", "chef")
|
53
|
+
FileUtils.mkdir_p psm1_path
|
54
|
+
template = ERB.new(IO.read(template_file))
|
55
|
+
chef_psm1 = template.result
|
56
|
+
File.open(::File.join(psm1_path, "chef.psm1"), "w") { |f| f.write(chef_psm1) }
|
57
|
+
end
|
36
58
|
|
59
|
+
task all: ["pre_install:install_gems_from_dirs", "pre_install:render_powershell_extension"]
|
60
|
+
end
|
61
|
+
|
62
|
+
# hack in all the preinstall tasks to occur before the traditional install task
|
63
|
+
task install: "pre_install:all"
|
37
64
|
# make sure we build the correct gemspec on windows
|
38
|
-
gemspec = Gem.win_platform? ? "chef-universal-
|
65
|
+
gemspec = Gem.win_platform? ? "chef-universal-mingw-ucrt" : "chef"
|
66
|
+
|
39
67
|
Bundler::GemHelper.install_tasks name: gemspec
|
40
68
|
|
69
|
+
# this gets appended to the normal bundler install helper
|
70
|
+
task :install do
|
71
|
+
chef_bin_path = ::File.join(::File.dirname(__FILE__), "chef-bin")
|
72
|
+
Dir.chdir(chef_bin_path) do
|
73
|
+
system "rake install:force"
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
namespace :install do
|
78
|
+
task local: "pre_install:all"
|
79
|
+
|
80
|
+
task :local do
|
81
|
+
chef_bin_path = ::File.join(::File.dirname(__FILE__), "chef-bin")
|
82
|
+
Dir.chdir(chef_bin_path) do
|
83
|
+
system "rake install:local"
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
41
88
|
task :pedant, :chef_zero_spec
|
42
89
|
|
43
90
|
task :build_eventlog do
|
@@ -61,15 +108,3 @@ begin
|
|
61
108
|
rescue LoadError
|
62
109
|
puts "chefstyle/rubocop is not available. bundle install first to make sure all dependencies are installed."
|
63
110
|
end
|
64
|
-
|
65
|
-
begin
|
66
|
-
require "yard"
|
67
|
-
DOC_FILES = [ "spec/tiny_server.rb", "lib/**/*.rb" ].freeze
|
68
|
-
|
69
|
-
YARD::Rake::YardocTask.new(:docs) do |t|
|
70
|
-
t.files = DOC_FILES
|
71
|
-
t.options = ["--format", "html"]
|
72
|
-
end
|
73
|
-
rescue LoadError
|
74
|
-
puts "yard is not available. bundle install first to make sure all dependencies are installed."
|
75
|
-
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
gemspec = instance_eval(File.read(File.expand_path("chef.gemspec", __dir__)))
|
2
|
+
|
3
|
+
gemspec.platform = Gem::Platform.new(%w{x64-mingw-ucrt})
|
4
|
+
|
5
|
+
gemspec.add_dependency "win32-api", "~> 1.10.0"
|
6
|
+
gemspec.add_dependency "win32-event", "~> 0.6.1"
|
7
|
+
# TODO: Relax this pin and make the necessary updaets. The issue originally
|
8
|
+
# leading to this pin has been fixed in 0.6.5.
|
9
|
+
gemspec.add_dependency "win32-eventlog", "0.6.3"
|
10
|
+
gemspec.add_dependency "win32-mmap", "~> 0.4.1"
|
11
|
+
gemspec.add_dependency "win32-mutex", "~> 0.4.2"
|
12
|
+
gemspec.add_dependency "win32-process", "~> 0.9"
|
13
|
+
gemspec.add_dependency "win32-service", ">= 2.1.5", "< 3.0"
|
14
|
+
gemspec.add_dependency "wmi-lite", "~> 1.0"
|
15
|
+
gemspec.add_dependency "win32-taskscheduler", "~> 2.0"
|
16
|
+
gemspec.add_dependency "iso8601", ">= 0.12.1", "< 0.14" # validate 0.14 when it comes out
|
17
|
+
gemspec.add_dependency "win32-certstore", "~> 0.6.15" # 0.5+ required for specifying user vs. system store
|
18
|
+
gemspec.add_dependency "chef-powershell", "~> 1.0.12" # The guts of the powershell_exec code have been moved to its own gem, chef-powershell. It's part of the chef-powershell-shim repo.
|
19
|
+
|
20
|
+
gemspec.extensions << "ext/win32-eventlog/Rakefile"
|
21
|
+
gemspec.files += Dir.glob("{distro,ext}/**/*")
|
22
|
+
|
23
|
+
gemspec
|
data/chef.gemspec
CHANGED
@@ -1,4 +1,13 @@
|
|
1
1
|
$:.unshift(File.dirname(__FILE__) + "/lib")
|
2
|
+
vs_path = File.expand_path("chef-utils/lib/chef-utils/version_string.rb", __dir__)
|
3
|
+
|
4
|
+
if File.exist?(vs_path)
|
5
|
+
# this is the moral equivalent of a require_relative since bundler makes require_relative here fail hard
|
6
|
+
eval(IO.read(vs_path))
|
7
|
+
else
|
8
|
+
# if the path doesn't exist then we're just in the wild gem and not in the git repo
|
9
|
+
require "chef-utils/version_string"
|
10
|
+
end
|
2
11
|
require "chef/version"
|
3
12
|
|
4
13
|
Gem::Specification.new do |s|
|
@@ -13,50 +22,65 @@ Gem::Specification.new do |s|
|
|
13
22
|
s.email = "adam@chef.io"
|
14
23
|
s.homepage = "https://www.chef.io"
|
15
24
|
|
16
|
-
|
25
|
+
if RUBY_PLATFORM =~ /aix/
|
26
|
+
s.required_ruby_version = ">= 3.0.3"
|
27
|
+
else
|
28
|
+
s.required_ruby_version = ">= 3.1.0"
|
29
|
+
end
|
17
30
|
|
18
31
|
s.add_dependency "chef-config", "= #{Chef::VERSION}"
|
32
|
+
s.add_dependency "chef-utils", "= #{Chef::VERSION}"
|
33
|
+
s.add_dependency "train-core", "~> 3.10" # 3.2.28 fixes sudo prompts. See https://github.com/chef/chef/pull/9635
|
34
|
+
s.add_dependency "train-winrm", ">= 0.2.5"
|
35
|
+
s.add_dependency "train-rest", ">= 0.4.1" # target mode with rest APIs
|
19
36
|
|
20
|
-
s.add_dependency "
|
37
|
+
s.add_dependency "license-acceptance", ">= 1.0.5", "< 3"
|
38
|
+
s.add_dependency "mixlib-cli", ">= 2.1.1", "< 3.0"
|
21
39
|
s.add_dependency "mixlib-log", ">= 2.0.3", "< 4.0"
|
22
|
-
s.add_dependency "mixlib-authentication", "
|
23
|
-
s.add_dependency "mixlib-shellout", ">=
|
40
|
+
s.add_dependency "mixlib-authentication", ">= 2.1", "< 4"
|
41
|
+
s.add_dependency "mixlib-shellout", ">= 3.1.1", "< 4.0"
|
24
42
|
s.add_dependency "mixlib-archive", ">= 0.4", "< 2.0"
|
25
|
-
s.add_dependency "ohai", "~>
|
43
|
+
s.add_dependency "ohai", "~> 18.0"
|
44
|
+
s.add_dependency "inspec-core", ">= 5"
|
26
45
|
|
27
|
-
s.add_dependency "ffi", "
|
46
|
+
s.add_dependency "ffi", ">= 1.15.5"
|
28
47
|
s.add_dependency "ffi-yajl", "~> 2.2"
|
29
|
-
s.add_dependency "net-
|
30
|
-
s.add_dependency "net-
|
31
|
-
s.add_dependency "
|
32
|
-
s.add_dependency "
|
33
|
-
s.add_dependency "
|
34
|
-
s.add_dependency "
|
48
|
+
s.add_dependency "net-sftp", ">= 2.1.2", "< 5.0" # remote_file resource
|
49
|
+
s.add_dependency "net-ftp" # remote_file resource
|
50
|
+
s.add_dependency "erubis", "~> 2.7" # template resource / cookbook syntax check
|
51
|
+
s.add_dependency "diff-lcs", ">= 1.2.4", "!= 1.4.0", "< 1.6.0" # 1.4 breaks output. Used in lib/chef/util/diff
|
52
|
+
s.add_dependency "ffi-libarchive", "~> 1.0", ">= 1.0.3" # archive_file resource
|
53
|
+
s.add_dependency "chef-zero", ">= 14.0.11"
|
54
|
+
s.add_dependency "chef-vault" # chef-vault resources and helpers
|
35
55
|
|
36
|
-
s.add_dependency "
|
37
|
-
|
38
|
-
s.add_dependency "plist", "~> 3.2"
|
39
|
-
s.add_dependency "iniparse", "~> 1.4"
|
56
|
+
s.add_dependency "plist", "~> 3.2" # launchd, dscl/mac user, macos_userdefaults, osx_profile and plist resources
|
57
|
+
s.add_dependency "iniparse", "~> 1.4" # systemd_unit resource
|
40
58
|
s.add_dependency "addressable"
|
41
|
-
|
42
|
-
# Audit mode requires these, so they are non-developmental dependencies now
|
43
|
-
%w{rspec-core rspec-expectations rspec-mocks}.each { |gem| s.add_dependency gem, "~> 3.5" }
|
44
|
-
s.add_dependency "rspec_junit_formatter", "~> 0.2.0"
|
45
|
-
s.add_dependency "serverspec", "~> 2.7"
|
46
|
-
s.add_dependency "specinfra", "~> 2.10"
|
47
|
-
|
48
59
|
s.add_dependency "syslog-logger", "~> 1.6"
|
49
|
-
s.add_dependency "uuidtools", "
|
60
|
+
s.add_dependency "uuidtools", ">= 2.1.5", "< 3.0" # osx_profile resource
|
61
|
+
s.add_dependency "unf_ext", ">= 0.0.8.2" # This is ruby31 compatible ucrt gem version
|
62
|
+
s.add_dependency "corefoundation", "~> 0.3.4" # macos_userdefaults resource
|
50
63
|
|
51
64
|
s.add_dependency "proxifier", "~> 1.0"
|
52
65
|
|
53
|
-
|
54
|
-
|
55
|
-
s.add_dependency "
|
56
|
-
|
66
|
+
s.add_dependency "aws-sdk-s3", "~> 1.91" # s3 recipe-url support
|
67
|
+
s.add_dependency "aws-sdk-secretsmanager", "~> 1.46"
|
68
|
+
s.add_dependency "vault", "~> 0.16" # hashi vault official client gem
|
57
69
|
s.bindir = "bin"
|
58
|
-
s.executables = %w{
|
70
|
+
s.executables = %w{ }
|
59
71
|
|
60
72
|
s.require_paths = %w{ lib }
|
61
|
-
s.files = %w{Gemfile Rakefile LICENSE README.md} +
|
73
|
+
s.files = %w{Gemfile Rakefile LICENSE README.md} +
|
74
|
+
Dir.glob("{lib,spec}/**/*", File::FNM_DOTMATCH).reject { |f| File.directory?(f) } +
|
75
|
+
Dir.glob("*.gemspec") +
|
76
|
+
Dir.glob("tasks/rspec.rb")
|
77
|
+
|
78
|
+
s.metadata = {
|
79
|
+
"bug_tracker_uri" => "https://github.com/chef/chef/issues",
|
80
|
+
"changelog_uri" => "https://github.com/chef/chef/blob/main/CHANGELOG.md",
|
81
|
+
"documentation_uri" => "https://docs.chef.io/",
|
82
|
+
"homepage_uri" => "https://www.chef.io",
|
83
|
+
"mailing_list_uri" => "https://discourse.chef.io/",
|
84
|
+
"source_code_uri" => "https://github.com/chef/chef/",
|
85
|
+
}
|
62
86
|
end
|