chef 12.4.3 → 12.16.42
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CONTRIBUTING.md +95 -156
- data/Gemfile +94 -0
- data/README.md +201 -41
- data/Rakefile +35 -128
- data/VERSION +1 -0
- data/acceptance/.gitignore +3 -0
- data/acceptance/.shared/kitchen_acceptance/.kitchen.digitalocean.yml +33 -0
- data/acceptance/.shared/kitchen_acceptance/.kitchen.ec2.yml +282 -0
- data/acceptance/.shared/kitchen_acceptance/.kitchen.vagrant.yml +59 -0
- data/acceptance/.shared/kitchen_acceptance/libraries/kitchen.rb +68 -0
- data/acceptance/.shared/kitchen_acceptance/metadata.rb +1 -0
- data/acceptance/Gemfile +16 -0
- data/acceptance/Gemfile.lock +248 -0
- data/acceptance/README.md +137 -0
- data/acceptance/basics/.acceptance/acceptance-cookbook/.gitignore +2 -0
- data/acceptance/basics/.acceptance/acceptance-cookbook/metadata.rb +3 -0
- data/acceptance/basics/.acceptance/acceptance-cookbook/recipes/destroy.rb +1 -0
- data/acceptance/basics/.acceptance/acceptance-cookbook/recipes/provision.rb +1 -0
- data/acceptance/basics/.acceptance/acceptance-cookbook/recipes/verify.rb +1 -0
- data/acceptance/basics/.kitchen.yml +4 -0
- data/acceptance/basics/test/integration/chef-current-install/serverspec/chef_client_spec.rb +19 -0
- data/acceptance/basics/test/integration/chef-current-install/serverspec/spec_helper.rb +6 -0
- data/acceptance/basics/test/integration/helpers/serverspec/Gemfile +8 -0
- data/acceptance/data-collector/.acceptance/acceptance-cookbook/.gitignore +2 -0
- data/acceptance/data-collector/.acceptance/acceptance-cookbook/metadata.rb +3 -0
- data/acceptance/data-collector/.acceptance/acceptance-cookbook/recipes/destroy.rb +2 -0
- data/acceptance/data-collector/.acceptance/acceptance-cookbook/recipes/provision.rb +2 -0
- data/acceptance/data-collector/.acceptance/acceptance-cookbook/recipes/verify.rb +2 -0
- data/acceptance/data-collector/.acceptance/data-collector-test/.gitignore +16 -0
- data/acceptance/data-collector/.acceptance/data-collector-test/Berksfile +3 -0
- data/acceptance/data-collector/.acceptance/data-collector-test/files/default/api.rb +85 -0
- data/acceptance/data-collector/.acceptance/data-collector-test/files/default/apigemfile +3 -0
- data/acceptance/data-collector/.acceptance/data-collector-test/files/default/client-rb-both-mode.rb +4 -0
- data/acceptance/data-collector/.acceptance/data-collector-test/files/default/client-rb-client-mode.rb +4 -0
- data/acceptance/data-collector/.acceptance/data-collector-test/files/default/client-rb-no-endpoint.rb +2 -0
- data/acceptance/data-collector/.acceptance/data-collector-test/files/default/client-rb-solo-mode.rb +4 -0
- data/acceptance/data-collector/.acceptance/data-collector-test/files/default/config.ru +2 -0
- data/acceptance/data-collector/.acceptance/data-collector-test/metadata.rb +7 -0
- data/acceptance/data-collector/.acceptance/data-collector-test/recipes/default.rb +38 -0
- data/acceptance/data-collector/.kitchen.yml +9 -0
- data/acceptance/data-collector/Berksfile +3 -0
- data/acceptance/data-collector/test/integration/default/serverspec/default_spec.rb +204 -0
- data/acceptance/data-collector/test/integration/helpers/serverspec/Gemfile +8 -0
- data/acceptance/fips/.acceptance/acceptance-cookbook/.gitignore +2 -0
- data/acceptance/fips/.acceptance/acceptance-cookbook/metadata.rb +2 -0
- data/acceptance/fips/.acceptance/acceptance-cookbook/recipes/destroy.rb +1 -0
- data/acceptance/fips/.acceptance/acceptance-cookbook/recipes/provision.rb +1 -0
- data/acceptance/fips/.acceptance/acceptance-cookbook/recipes/verify.rb +1 -0
- data/acceptance/fips/.kitchen.yml +8 -0
- data/acceptance/fips/test/integration/fips-integration/serverspec/Gemfile +9 -0
- data/acceptance/fips/test/integration/fips-integration/serverspec/fips-integration_spec.rb +52 -0
- data/acceptance/fips/test/integration/fips-unit-functional/serverspec/Gemfile +7 -0
- data/acceptance/fips/test/integration/fips-unit-functional/serverspec/fips-unit-functional_spec.rb +56 -0
- data/acceptance/omnitruck/.acceptance/acceptance-cookbook/.gitignore +2 -0
- data/acceptance/omnitruck/.acceptance/acceptance-cookbook/metadata.rb +1 -0
- data/acceptance/omnitruck/.acceptance/acceptance-cookbook/recipes/destroy.rb +1 -0
- data/acceptance/omnitruck/.acceptance/acceptance-cookbook/recipes/provision.rb +1 -0
- data/acceptance/omnitruck/.acceptance/acceptance-cookbook/recipes/verify.rb +61 -0
- data/acceptance/top-cookbooks/.acceptance/acceptance-cookbook/.gitignore +2 -0
- data/acceptance/top-cookbooks/.acceptance/acceptance-cookbook/libraries/cookbook_kitchen.rb +43 -0
- data/acceptance/top-cookbooks/.acceptance/acceptance-cookbook/libraries/top_cookbooks.rb +45 -0
- data/acceptance/top-cookbooks/.acceptance/acceptance-cookbook/metadata.rb +3 -0
- data/acceptance/top-cookbooks/.acceptance/acceptance-cookbook/recipes/destroy.rb +1 -0
- data/acceptance/top-cookbooks/.acceptance/acceptance-cookbook/recipes/provision.rb +1 -0
- data/acceptance/top-cookbooks/.acceptance/acceptance-cookbook/recipes/verify.rb +1 -0
- data/acceptance/top-cookbooks/.gitignore +1 -0
- data/acceptance/top-cookbooks/.kitchen.chocolatey.yml +6 -0
- data/acceptance/top-cookbooks/.kitchen.docker.yml +9 -0
- data/acceptance/top-cookbooks/.kitchen.git.yml +11 -0
- data/acceptance/top-cookbooks/.kitchen.iis.yml +4 -0
- data/acceptance/top-cookbooks/.kitchen.learn-the-basics-rhel.yml +7 -0
- data/acceptance/top-cookbooks/.kitchen.learn-the-basics-ubuntu.yml +7 -0
- data/acceptance/top-cookbooks/.kitchen.learn-the-basics-windows.yml +7 -0
- data/acceptance/top-cookbooks/.kitchen.powershell.yml +4 -0
- data/acceptance/top-cookbooks/.kitchen.sql_server.yml +5 -0
- data/acceptance/top-cookbooks/.kitchen.winbox.yml +8 -0
- data/acceptance/top-cookbooks/.kitchen.windows.yml +38 -0
- data/acceptance/trivial/.acceptance/acceptance-cookbook/.gitignore +2 -0
- data/acceptance/trivial/.acceptance/acceptance-cookbook/metadata.rb +2 -0
- data/acceptance/trivial/.acceptance/acceptance-cookbook/recipes/destroy.rb +1 -0
- data/acceptance/trivial/.acceptance/acceptance-cookbook/recipes/provision.rb +1 -0
- data/acceptance/trivial/.acceptance/acceptance-cookbook/recipes/verify.rb +1 -0
- data/acceptance/trivial/.kitchen.yml +7 -0
- data/acceptance/trivial/test/integration/chef-current-install/inspec/chef_client_spec.rb +5 -0
- data/acceptance/windows-service/.acceptance/acceptance-cookbook/.gitignore +2 -0
- data/acceptance/windows-service/.acceptance/acceptance-cookbook/metadata.rb +2 -0
- data/acceptance/windows-service/.acceptance/acceptance-cookbook/recipes/destroy.rb +1 -0
- data/acceptance/windows-service/.acceptance/acceptance-cookbook/recipes/provision.rb +1 -0
- data/acceptance/windows-service/.acceptance/acceptance-cookbook/recipes/verify.rb +1 -0
- data/acceptance/windows-service/.kitchen.yml +7 -0
- data/acceptance/windows-service/test/integration/chef-windows-service/inspec/chef_windows_service_spec.rb +58 -0
- data/bin/chef-apply +3 -3
- data/bin/chef-client +5 -5
- data/bin/chef-shell +1 -4
- data/bin/chef-solo +4 -4
- data/bin/knife +4 -5
- data/chef-universal-mingw32.gemspec +24 -0
- data/chef.gemspec +61 -0
- data/distro/common/html/_static/basic.css +1 -1
- data/distro/common/html/_static/doctools.js +1 -1
- data/distro/common/html/_static/searchtools.js +1 -1
- data/distro/common/html/_static/websupport.js +1 -1
- data/distro/common/html/knife_bootstrap.html +1 -1
- data/distro/common/html/knife_cookbook_site.html +18 -18
- data/distro/common/man/man1/README.md +2 -2
- data/distro/common/man/man1/knife-client.1 +1 -1
- data/distro/common/man/man1/knife-cookbook-site.1 +11 -11
- data/distro/common/markdown/man8/chef-client.mkd +2 -0
- data/lib/chef/api_client/registration.rb +42 -13
- data/lib/chef/api_client.rb +26 -25
- data/lib/chef/api_client_v1.rb +30 -30
- data/lib/chef/application/apply.rb +54 -29
- data/lib/chef/application/client.rb +135 -77
- data/lib/chef/application/exit_code.rb +235 -0
- data/lib/chef/application/knife.rb +33 -19
- data/lib/chef/application/solo.rb +113 -47
- data/lib/chef/application/windows_service.rb +49 -34
- data/lib/chef/application/windows_service_manager.rb +40 -34
- data/lib/chef/application.rb +78 -115
- data/lib/chef/applications.rb +4 -4
- data/lib/chef/audit/audit_event_proxy.rb +4 -4
- data/lib/chef/audit/audit_reporter.rb +13 -11
- data/lib/chef/audit/control_group_data.rb +9 -10
- data/lib/chef/audit/logger.rb +3 -3
- data/lib/chef/audit/rspec_formatter.rb +2 -2
- data/lib/chef/audit/runner.rb +17 -15
- data/lib/chef/chef_class.rb +45 -5
- data/lib/chef/chef_fs/chef_fs_data_store.rb +493 -103
- data/lib/chef/chef_fs/command_line.rb +50 -42
- data/lib/chef/chef_fs/config.rb +74 -45
- data/lib/chef/chef_fs/data_handler/acl_data_handler.rb +9 -9
- data/lib/chef/chef_fs/data_handler/client_data_handler.rb +13 -11
- data/lib/chef/chef_fs/data_handler/client_key_data_handler.rb +11 -0
- data/lib/chef/chef_fs/data_handler/container_data_handler.rb +13 -7
- data/lib/chef/chef_fs/data_handler/cookbook_data_handler.rb +13 -13
- data/lib/chef/chef_fs/data_handler/data_bag_item_data_handler.rb +18 -12
- data/lib/chef/chef_fs/data_handler/data_handler_base.rb +24 -21
- data/lib/chef/chef_fs/data_handler/environment_data_handler.rb +13 -13
- data/lib/chef/chef_fs/data_handler/group_data_handler.rb +18 -18
- data/lib/chef/chef_fs/data_handler/node_data_handler.rb +13 -13
- data/lib/chef/chef_fs/data_handler/organization_data_handler.rb +16 -10
- data/lib/chef/chef_fs/data_handler/organization_invites_data_handler.rb +2 -2
- data/lib/chef/chef_fs/data_handler/organization_members_data_handler.rb +2 -2
- data/lib/chef/chef_fs/data_handler/policy_data_handler.rb +36 -3
- data/lib/chef/chef_fs/data_handler/policy_group_data_handler.rb +33 -0
- data/lib/chef/chef_fs/data_handler/role_data_handler.rb +15 -15
- data/lib/chef/chef_fs/data_handler/user_data_handler.rb +11 -11
- data/lib/chef/chef_fs/file_pattern.rb +36 -47
- data/lib/chef/chef_fs/file_system/base_fs_dir.rb +4 -9
- data/lib/chef/chef_fs/file_system/base_fs_object.rb +19 -12
- data/lib/chef/chef_fs/file_system/chef_server/acl_dir.rb +65 -0
- data/lib/chef/chef_fs/file_system/chef_server/acl_entry.rb +67 -0
- data/lib/chef/chef_fs/file_system/chef_server/acls_dir.rb +75 -0
- data/lib/chef/chef_fs/file_system/chef_server/chef_server_root_dir.rb +196 -0
- data/lib/chef/chef_fs/file_system/chef_server/cookbook_artifact_dir.rb +38 -0
- data/lib/chef/chef_fs/file_system/chef_server/cookbook_artifacts_dir.rb +102 -0
- data/lib/chef/chef_fs/file_system/chef_server/cookbook_dir.rb +222 -0
- data/lib/chef/chef_fs/file_system/chef_server/cookbook_file.rb +80 -0
- data/lib/chef/chef_fs/file_system/chef_server/cookbook_subdir.rb +61 -0
- data/lib/chef/chef_fs/file_system/chef_server/cookbooks_acl_dir.rb +42 -0
- data/lib/chef/chef_fs/file_system/chef_server/cookbooks_dir.rb +101 -0
- data/lib/chef/chef_fs/file_system/chef_server/data_bag_dir.rb +76 -0
- data/lib/chef/chef_fs/file_system/chef_server/data_bag_entry.rb +19 -0
- data/lib/chef/chef_fs/file_system/chef_server/data_bags_dir.rb +69 -0
- data/lib/chef/chef_fs/file_system/chef_server/environments_dir.rb +56 -0
- data/lib/chef/chef_fs/file_system/chef_server/nodes_dir.rb +53 -0
- data/lib/chef/chef_fs/file_system/chef_server/org_entry.rb +35 -0
- data/lib/chef/chef_fs/file_system/chef_server/organization_invites_entry.rb +65 -0
- data/lib/chef/chef_fs/file_system/chef_server/organization_members_entry.rb +64 -0
- data/lib/chef/chef_fs/file_system/chef_server/policies_acl_dir.rb +41 -0
- data/lib/chef/chef_fs/file_system/chef_server/policies_dir.rb +160 -0
- data/lib/chef/chef_fs/file_system/chef_server/policy_group_entry.rb +135 -0
- data/lib/chef/chef_fs/file_system/{operation_not_allowed_error.rb → chef_server/policy_groups_dir.rb} +16 -21
- data/lib/chef/chef_fs/file_system/chef_server/policy_revision_entry.rb +38 -0
- data/lib/chef/chef_fs/file_system/chef_server/rest_list_dir.rb +178 -0
- data/lib/chef/chef_fs/file_system/chef_server/rest_list_entry.rb +197 -0
- data/lib/chef/chef_fs/file_system/chef_server/versioned_cookbook_dir.rb +45 -0
- data/lib/chef/chef_fs/file_system/chef_server/versioned_cookbooks_dir.rb +107 -0
- data/lib/chef/chef_fs/file_system/exceptions.rb +105 -0
- data/lib/chef/chef_fs/file_system/memory/memory_dir.rb +53 -0
- data/lib/chef/chef_fs/file_system/memory/memory_file.rb +20 -0
- data/lib/chef/chef_fs/file_system/memory/memory_root.rb +23 -0
- data/lib/chef/chef_fs/file_system/multiplexed_dir.rb +18 -3
- data/lib/chef/chef_fs/file_system/nonexistent_fs_object.rb +4 -8
- data/lib/chef/chef_fs/file_system/{operation_failed_error.rb → repository/acl.rb} +17 -14
- data/lib/chef/chef_fs/file_system/repository/acls_dir.rb +50 -0
- data/lib/chef/chef_fs/file_system/repository/acls_sub_dir.rb +38 -0
- data/lib/chef/chef_fs/file_system/repository/base_file.rb +155 -0
- data/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_artifact_dir.rb +41 -0
- data/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_dir.rb +146 -0
- data/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_entry.rb +181 -0
- data/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_root_dir.rb +218 -0
- data/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_versioned_cookbook_dir.rb +42 -0
- data/lib/chef/chef_fs/file_system/repository/client.rb +38 -0
- data/lib/chef/chef_fs/file_system/repository/client_key.rb +38 -0
- data/lib/chef/chef_fs/file_system/{chef_repository_file_system_data_bags_dir.rb → repository/client_keys_dir.rb} +16 -10
- data/lib/chef/chef_fs/file_system/repository/client_keys_sub_dir.rb +38 -0
- data/lib/chef/chef_fs/file_system/repository/clients_dir.rb +37 -0
- data/lib/chef/chef_fs/file_system/repository/container.rb +38 -0
- data/lib/chef/chef_fs/file_system/repository/containers_dir.rb +37 -0
- data/lib/chef/chef_fs/file_system/repository/cookbook_artifacts_dir.rb +36 -0
- data/lib/chef/chef_fs/file_system/repository/cookbooks_dir.rb +51 -0
- data/lib/chef/chef_fs/file_system/repository/data_bag.rb +39 -0
- data/lib/chef/chef_fs/file_system/repository/data_bag_item.rb +38 -0
- data/lib/chef/chef_fs/file_system/repository/data_bags_dir.rb +39 -0
- data/lib/chef/chef_fs/file_system/repository/directory.rb +167 -0
- data/lib/chef/chef_fs/file_system/repository/environment.rb +38 -0
- data/lib/chef/chef_fs/file_system/repository/environments_dir.rb +37 -0
- data/lib/chef/chef_fs/file_system/repository/file_system_entry.rb +151 -0
- data/lib/chef/chef_fs/file_system/repository/group.rb +38 -0
- data/lib/chef/chef_fs/file_system/repository/groups_dir.rb +37 -0
- data/lib/chef/chef_fs/file_system/{file_system_error.rb → repository/node.rb} +14 -9
- data/lib/chef/chef_fs/file_system/{default_environment_cannot_be_modified_error.rb → repository/nodes_dir.rb} +11 -10
- data/lib/chef/chef_fs/file_system/{chef_repository_file_system_policies_dir.rb → repository/policies_dir.rb} +15 -11
- data/lib/chef/chef_fs/file_system/repository/policy.rb +38 -0
- data/lib/chef/chef_fs/file_system/repository/policy_group.rb +38 -0
- data/lib/chef/chef_fs/file_system/repository/policy_groups_dir.rb +37 -0
- data/lib/chef/chef_fs/file_system/{already_exists_error.rb → repository/role.rb} +13 -6
- data/lib/chef/chef_fs/file_system/repository/roles_dir.rb +37 -0
- data/lib/chef/chef_fs/file_system/repository/user.rb +38 -0
- data/lib/chef/chef_fs/file_system/repository/users_dir.rb +37 -0
- data/lib/chef/chef_fs/file_system/repository/versioned_cookbooks_dir.rb +34 -0
- data/lib/chef/chef_fs/file_system.rb +161 -159
- data/lib/chef/chef_fs/file_system_cache.rb +80 -0
- data/lib/chef/chef_fs/knife.rb +49 -21
- data/lib/chef/chef_fs/parallelizer/flatten_enumerable.rb +2 -2
- data/lib/chef/chef_fs/parallelizer/parallel_enumerable.rb +7 -11
- data/lib/chef/chef_fs/parallelizer.rb +4 -4
- data/lib/chef/chef_fs/path_utils.rb +70 -38
- data/lib/chef/chef_fs.rb +51 -1
- data/lib/chef/client.rb +120 -78
- data/lib/chef/config.rb +42 -10
- data/lib/chef/config_fetcher.rb +18 -10
- data/lib/chef/{shell/shell_rest.rb → constants.rb} +11 -11
- data/lib/chef/cookbook/chefignore.rb +4 -5
- data/lib/chef/cookbook/cookbook_collection.rb +24 -6
- data/lib/chef/cookbook/cookbook_version_loader.rb +82 -26
- data/lib/chef/cookbook/file_system_file_vendor.rb +11 -12
- data/lib/chef/cookbook/file_vendor.rb +3 -4
- data/lib/chef/cookbook/gem_installer.rb +84 -0
- data/lib/chef/cookbook/metadata.rb +248 -93
- data/lib/chef/cookbook/remote_file_vendor.rb +8 -8
- data/lib/chef/cookbook/synchronizer.rb +19 -14
- data/lib/chef/cookbook/syntax_check.rb +15 -15
- data/lib/chef/cookbook_loader.rb +36 -18
- data/lib/chef/cookbook_manifest.rb +14 -13
- data/lib/chef/cookbook_site_streaming_uploader.rb +25 -26
- data/lib/chef/cookbook_uploader.rb +22 -21
- data/lib/chef/cookbook_version.rb +111 -97
- data/lib/chef/daemon.rb +8 -8
- data/lib/chef/data_bag.rb +36 -29
- data/lib/chef/data_bag_item.rb +46 -43
- data/lib/chef/data_collector/messages/helpers.rb +161 -0
- data/lib/chef/data_collector/messages.rb +97 -0
- data/lib/chef/data_collector/resource_report.rb +95 -0
- data/lib/chef/data_collector.rb +472 -0
- data/lib/chef/decorator/lazy.rb +60 -0
- data/lib/chef/decorator/lazy_array.rb +59 -0
- data/lib/chef/decorator/unchain.rb +59 -0
- data/lib/chef/decorator.rb +81 -0
- data/lib/chef/delayed_evaluator.rb +21 -0
- data/lib/chef/deprecation/mixin/template.rb +5 -6
- data/lib/chef/deprecation/provider/cookbook_file.rb +3 -4
- data/lib/chef/deprecation/provider/file.rb +11 -11
- data/lib/chef/deprecation/provider/remote_directory.rb +52 -0
- data/lib/chef/deprecation/provider/remote_file.rb +6 -7
- data/lib/chef/deprecation/provider/template.rb +4 -4
- data/lib/chef/deprecation/warnings.rb +5 -7
- data/lib/chef/digester.rb +11 -7
- data/lib/chef/dsl/audit.rb +4 -4
- data/lib/chef/dsl/chef_provisioning.rb +57 -0
- data/lib/chef/dsl/cheffish.rb +65 -0
- data/lib/chef/dsl/core.rb +52 -0
- data/lib/chef/dsl/data_query.rb +10 -10
- data/lib/chef/dsl/declare_resource.rb +295 -0
- data/lib/chef/dsl/definitions.rb +1 -2
- data/lib/chef/dsl/include_attribute.rb +4 -6
- data/lib/chef/dsl/include_recipe.rb +4 -4
- data/lib/chef/dsl/method_missing.rb +75 -0
- data/lib/chef/dsl/platform_introspection.rb +27 -17
- data/lib/chef/dsl/powershell.rb +3 -3
- data/lib/chef/dsl/reboot_pending.rb +12 -12
- data/lib/chef/dsl/recipe.rb +51 -141
- data/lib/chef/dsl/registry_helper.rb +7 -3
- data/lib/chef/dsl/resources.rb +31 -4
- data/lib/chef/dsl/universal.rb +50 -0
- data/lib/chef/dsl.rb +6 -6
- data/lib/chef/encrypted_data_bag_item/assertions.rb +4 -4
- data/lib/chef/encrypted_data_bag_item/check_encrypted.rb +3 -3
- data/lib/chef/encrypted_data_bag_item/decryption_failure.rb +2 -2
- data/lib/chef/encrypted_data_bag_item/decryptor.rb +16 -14
- data/lib/chef/encrypted_data_bag_item/encrypted_data_bag_item_assertions.rb +1 -1
- data/lib/chef/encrypted_data_bag_item/encryption_failure.rb +1 -1
- data/lib/chef/encrypted_data_bag_item/encryptor.rb +20 -20
- data/lib/chef/encrypted_data_bag_item/unacceptable_encrypted_data_bag_item_format.rb +2 -2
- data/lib/chef/encrypted_data_bag_item/unsupported_cipher.rb +2 -2
- data/lib/chef/encrypted_data_bag_item/unsupported_encrypted_data_bag_item_format.rb +2 -2
- data/lib/chef/encrypted_data_bag_item.rb +10 -10
- data/lib/chef/environment.rb +45 -38
- data/lib/chef/event_dispatch/base.rb +86 -25
- data/lib/chef/event_dispatch/dispatcher.rb +27 -7
- data/lib/chef/event_dispatch/dsl.rb +65 -0
- data/lib/chef/event_dispatch/events_output_stream.rb +8 -0
- data/lib/chef/event_loggers/base.rb +5 -5
- data/lib/chef/event_loggers/windows_eventlog.rb +9 -9
- data/lib/chef/exceptions.rb +82 -21
- data/lib/chef/file_access_control/unix.rb +21 -21
- data/lib/chef/file_access_control/windows.rb +10 -10
- data/lib/chef/file_access_control.rb +6 -6
- data/lib/chef/file_cache.rb +20 -20
- data/lib/chef/file_content_management/content_base.rb +2 -2
- data/lib/chef/file_content_management/deploy/cp.rb +4 -4
- data/lib/chef/file_content_management/deploy/mv_unix.rb +6 -7
- data/lib/chef/file_content_management/deploy/mv_windows.rb +5 -7
- data/lib/chef/file_content_management/deploy.rb +5 -6
- data/lib/chef/file_content_management/tempfile.rb +17 -6
- data/lib/chef/formatters/base.rb +21 -12
- data/lib/chef/formatters/doc.rb +104 -12
- data/lib/chef/formatters/{error_descriptor.rb → error_description.rb} +7 -5
- data/lib/chef/formatters/error_inspectors/api_error_formatting.rb +50 -15
- data/lib/chef/formatters/error_inspectors/compile_error_inspector.rb +47 -11
- data/lib/chef/formatters/error_inspectors/cookbook_resolve_error_inspector.rb +8 -8
- data/lib/chef/formatters/error_inspectors/cookbook_sync_error_inspector.rb +8 -6
- data/lib/chef/formatters/error_inspectors/node_load_error_inspector.rb +14 -13
- data/lib/chef/formatters/error_inspectors/registration_error_inspector.rb +19 -17
- data/lib/chef/formatters/error_inspectors/resource_failure_inspector.rb +9 -12
- data/lib/chef/formatters/error_inspectors/run_list_expansion_error_inspector.rb +15 -14
- data/lib/chef/formatters/error_inspectors.rb +5 -5
- data/lib/chef/formatters/error_mapper.rb +2 -2
- data/lib/chef/formatters/indentable_output_stream.rb +10 -5
- data/lib/chef/formatters/minimal.rb +9 -11
- data/lib/chef/guard_interpreter/default_guard_interpreter.rb +3 -4
- data/lib/chef/guard_interpreter/resource_guard_interpreter.rb +13 -11
- data/lib/chef/guard_interpreter.rb +3 -3
- data/lib/chef/handler/error_report.rb +4 -4
- data/lib/chef/handler/json_file.rb +5 -5
- data/lib/chef/handler.rb +37 -4
- data/lib/chef/http/auth_credentials.rb +12 -12
- data/lib/chef/http/authenticator.rb +19 -14
- data/lib/chef/http/basic_client.rb +40 -51
- data/lib/chef/http/cookie_jar.rb +7 -7
- data/lib/chef/http/cookie_manager.rb +8 -8
- data/lib/chef/http/decompressor.rb +9 -11
- data/lib/chef/http/http_request.rb +34 -35
- data/lib/chef/http/json_input.rb +9 -9
- data/lib/chef/http/json_output.rb +9 -9
- data/lib/chef/http/json_to_model_output.rb +4 -4
- data/lib/chef/http/remote_request_id.rb +6 -6
- data/lib/chef/http/simple.rb +23 -5
- data/lib/chef/http/simple_json.rb +43 -0
- data/lib/chef/http/socketless_chef_zero_client.rb +62 -61
- data/lib/chef/http/ssl_policies.rb +13 -13
- data/lib/chef/http/validate_content_length.rb +16 -12
- data/lib/chef/http.rb +136 -61
- data/lib/chef/json_compat.rb +8 -7
- data/lib/chef/key.rb +76 -75
- data/lib/chef/knife/bootstrap/chef_vault_handler.rb +16 -22
- data/lib/chef/knife/bootstrap/client_builder.rb +30 -12
- data/lib/chef/knife/bootstrap/templates/README.md +3 -4
- data/lib/chef/knife/bootstrap/templates/chef-full.erb +7 -2
- data/lib/chef/knife/bootstrap.rb +133 -38
- data/lib/chef/knife/client_bulk_delete.rb +6 -6
- data/lib/chef/knife/client_create.rb +9 -9
- data/lib/chef/knife/client_delete.rb +7 -7
- data/lib/chef/knife/client_edit.rb +6 -6
- data/lib/chef/knife/client_key_create.rb +6 -6
- data/lib/chef/knife/client_key_delete.rb +6 -6
- data/lib/chef/knife/client_key_edit.rb +8 -9
- data/lib/chef/knife/client_key_list.rb +5 -5
- data/lib/chef/knife/client_key_show.rb +5 -5
- data/lib/chef/knife/client_list.rb +5 -5
- data/lib/chef/knife/client_reregister.rb +5 -5
- data/lib/chef/knife/client_show.rb +5 -5
- data/lib/chef/knife/configure.rb +16 -16
- data/lib/chef/knife/configure_client.rb +6 -6
- data/lib/chef/knife/cookbook_bulk_delete.rb +10 -11
- data/lib/chef/knife/cookbook_create.rb +47 -33
- data/lib/chef/knife/cookbook_delete.rb +10 -10
- data/lib/chef/knife/cookbook_download.rb +8 -10
- data/lib/chef/knife/cookbook_list.rb +5 -5
- data/lib/chef/knife/cookbook_metadata.rb +9 -10
- data/lib/chef/knife/cookbook_metadata_from_file.rb +5 -5
- data/lib/chef/knife/cookbook_show.rb +15 -23
- data/lib/chef/knife/cookbook_site_download.rb +31 -24
- data/lib/chef/knife/cookbook_site_install.rb +23 -15
- data/lib/chef/knife/cookbook_site_list.rb +14 -11
- data/lib/chef/knife/cookbook_site_search.rb +13 -11
- data/lib/chef/knife/cookbook_site_share.rb +34 -34
- data/lib/chef/knife/cookbook_site_show.rb +19 -13
- data/lib/chef/knife/cookbook_site_unshare.rb +15 -8
- data/lib/chef/knife/cookbook_site_vendor.rb +5 -5
- data/lib/chef/knife/cookbook_test.rb +7 -8
- data/lib/chef/knife/cookbook_upload.rb +22 -25
- data/lib/chef/knife/core/bootstrap_context.rb +83 -27
- data/lib/chef/knife/core/cookbook_scm_repo.rb +11 -12
- data/lib/chef/knife/core/custom_manifest_loader.rb +69 -0
- data/lib/chef/knife/core/gem_glob_loader.rb +138 -0
- data/lib/chef/knife/core/generic_presenter.rb +53 -44
- data/lib/chef/knife/core/hashed_command_loader.rb +99 -0
- data/lib/chef/knife/core/node_editor.rb +60 -39
- data/lib/chef/knife/core/node_presenter.rb +38 -16
- data/lib/chef/knife/core/object_loader.rb +9 -8
- data/lib/chef/knife/core/status_presenter.rb +17 -17
- data/lib/chef/knife/core/subcommand_loader.rb +143 -153
- data/lib/chef/knife/core/text_formatter.rb +13 -14
- data/lib/chef/knife/core/ui.rb +31 -23
- data/lib/chef/knife/data_bag_create.rb +11 -10
- data/lib/chef/knife/data_bag_delete.rb +6 -8
- data/lib/chef/knife/data_bag_edit.rb +11 -14
- data/lib/chef/knife/data_bag_from_file.rb +13 -12
- data/lib/chef/knife/data_bag_list.rb +4 -8
- data/lib/chef/knife/data_bag_secret_options.rb +8 -8
- data/lib/chef/knife/data_bag_show.rb +31 -31
- data/lib/chef/knife/delete.rb +7 -8
- data/lib/chef/knife/deps.rb +20 -20
- data/lib/chef/knife/diff.rb +8 -9
- data/lib/chef/knife/download.rb +12 -13
- data/lib/chef/knife/edit.rb +8 -9
- data/lib/chef/knife/environment_compare.rb +23 -23
- data/lib/chef/knife/environment_create.rb +6 -6
- data/lib/chef/knife/environment_delete.rb +5 -5
- data/lib/chef/knife/environment_edit.rb +5 -5
- data/lib/chef/knife/environment_from_file.rb +4 -5
- data/lib/chef/knife/environment_list.rb +5 -5
- data/lib/chef/knife/environment_show.rb +5 -5
- data/lib/chef/knife/exec.rb +7 -7
- data/lib/chef/knife/help.rb +7 -9
- data/lib/chef/knife/index_rebuild.rb +6 -7
- data/lib/chef/knife/key_create.rb +10 -6
- data/lib/chef/knife/key_create_base.rb +1 -1
- data/lib/chef/knife/key_delete.rb +3 -3
- data/lib/chef/knife/key_edit.rb +10 -6
- data/lib/chef/knife/key_edit_base.rb +1 -1
- data/lib/chef/knife/key_list.rb +12 -12
- data/lib/chef/knife/key_list_base.rb +1 -1
- data/lib/chef/knife/key_show.rb +4 -4
- data/lib/chef/knife/list.rb +15 -15
- data/lib/chef/knife/node_bulk_delete.rb +6 -12
- data/lib/chef/knife/node_create.rb +6 -9
- data/lib/chef/knife/node_delete.rb +5 -6
- data/lib/chef/knife/node_edit.rb +6 -8
- data/lib/chef/knife/node_environment_set.rb +4 -4
- data/lib/chef/knife/node_from_file.rb +11 -11
- data/lib/chef/knife/node_list.rb +5 -7
- data/lib/chef/knife/node_run_list_add.rb +8 -8
- data/lib/chef/knife/node_run_list_remove.rb +19 -8
- data/lib/chef/knife/node_run_list_set.rb +6 -6
- data/lib/chef/knife/node_show.rb +6 -12
- data/lib/chef/knife/null.rb +10 -0
- data/lib/chef/knife/osc_user_create.rb +7 -7
- data/lib/chef/knife/osc_user_delete.rb +5 -5
- data/lib/chef/knife/osc_user_edit.rb +7 -7
- data/lib/chef/knife/osc_user_list.rb +5 -5
- data/lib/chef/knife/osc_user_reregister.rb +5 -5
- data/lib/chef/knife/osc_user_show.rb +5 -6
- data/lib/chef/knife/raw.rb +22 -21
- data/lib/chef/knife/recipe_list.rb +4 -4
- data/lib/chef/knife/rehash.rb +65 -0
- data/lib/chef/knife/role_bulk_delete.rb +5 -10
- data/lib/chef/knife/role_create.rb +6 -8
- data/lib/chef/knife/role_delete.rb +5 -6
- data/lib/chef/knife/role_edit.rb +5 -8
- data/lib/chef/knife/role_env_run_list_add.rb +9 -9
- data/lib/chef/knife/role_env_run_list_clear.rb +4 -4
- data/lib/chef/knife/role_env_run_list_remove.rb +13 -13
- data/lib/chef/knife/role_env_run_list_replace.rb +6 -6
- data/lib/chef/knife/role_env_run_list_set.rb +6 -6
- data/lib/chef/knife/role_from_file.rb +7 -12
- data/lib/chef/knife/role_list.rb +5 -6
- data/lib/chef/knife/role_run_list_add.rb +9 -9
- data/lib/chef/knife/role_run_list_clear.rb +4 -4
- data/lib/chef/knife/role_run_list_remove.rb +13 -13
- data/lib/chef/knife/role_run_list_replace.rb +6 -6
- data/lib/chef/knife/role_run_list_set.rb +6 -6
- data/lib/chef/knife/role_show.rb +5 -8
- data/lib/chef/knife/search.rb +18 -18
- data/lib/chef/knife/serve.rb +11 -11
- data/lib/chef/knife/show.rb +4 -4
- data/lib/chef/knife/ssh.rb +143 -101
- data/lib/chef/knife/ssl_check.rb +22 -16
- data/lib/chef/knife/ssl_fetch.rb +23 -20
- data/lib/chef/knife/status.rb +28 -15
- data/lib/chef/knife/supermarket_download.rb +33 -0
- data/lib/chef/knife/supermarket_install.rb +33 -0
- data/lib/chef/knife/supermarket_list.rb +33 -0
- data/lib/chef/knife/supermarket_search.rb +33 -0
- data/lib/chef/knife/supermarket_share.rb +33 -0
- data/lib/chef/knife/supermarket_show.rb +33 -0
- data/lib/chef/knife/supermarket_unshare.rb +33 -0
- data/lib/chef/knife/tag_create.rb +5 -5
- data/lib/chef/knife/tag_delete.rb +5 -5
- data/lib/chef/knife/tag_list.rb +5 -5
- data/lib/chef/knife/upload.rb +12 -13
- data/lib/chef/knife/user_create.rb +9 -11
- data/lib/chef/knife/user_delete.rb +6 -7
- data/lib/chef/knife/user_edit.rb +8 -10
- data/lib/chef/knife/user_key_create.rb +7 -7
- data/lib/chef/knife/user_key_delete.rb +6 -6
- data/lib/chef/knife/user_key_edit.rb +8 -9
- data/lib/chef/knife/user_key_list.rb +5 -5
- data/lib/chef/knife/user_key_show.rb +5 -5
- data/lib/chef/knife/user_list.rb +5 -5
- data/lib/chef/knife/user_reregister.rb +6 -7
- data/lib/chef/knife/user_show.rb +6 -6
- data/lib/chef/knife/xargs.rb +26 -27
- data/lib/chef/knife.rb +169 -139
- data/lib/chef/local_mode.rb +16 -9
- data/lib/chef/log/syslog.rb +5 -6
- data/lib/chef/log/winevt.rb +7 -7
- data/lib/chef/log.rb +28 -10
- data/lib/chef/mash.rb +6 -5
- data/lib/chef/mixin/api_version_request_handling.rb +1 -1
- data/lib/chef/mixin/checksum.rb +9 -4
- data/lib/chef/mixin/command/unix.rb +10 -10
- data/lib/chef/mixin/command/windows.rb +6 -7
- data/lib/chef/mixin/command.rb +16 -15
- data/lib/chef/mixin/convert_to_class_name.rb +11 -11
- data/lib/chef/mixin/create_path.rb +3 -3
- data/lib/chef/mixin/deep_merge.rb +3 -3
- data/lib/chef/mixin/deprecation.rb +30 -31
- data/lib/chef/mixin/descendants_tracker.rb +2 -3
- data/lib/chef/mixin/enforce_ownership_and_permissions.rb +3 -3
- data/lib/chef/mixin/file_class.rb +9 -11
- data/lib/chef/mixin/from_file.rb +3 -3
- data/lib/chef/mixin/get_source_from_package.rb +8 -4
- data/lib/chef/mixin/homebrew_user.rb +6 -6
- data/lib/chef/mixin/language.rb +5 -5
- data/lib/chef/mixin/language_include_attribute.rb +4 -5
- data/lib/chef/mixin/language_include_recipe.rb +4 -5
- data/lib/chef/mixin/lazy_module_include.rb +77 -0
- data/lib/chef/mixin/notifying_block.rb +53 -0
- data/lib/chef/mixin/params_validate.rb +384 -137
- data/lib/chef/mixin/path_sanity.rb +8 -8
- data/lib/chef/mixin/powershell_out.rb +5 -5
- data/lib/chef/mixin/powershell_type_coercions.rb +12 -10
- data/lib/chef/mixin/properties.rb +306 -0
- data/lib/chef/mixin/provides.rb +3 -2
- data/lib/chef/mixin/proxified_socket.rb +42 -0
- data/lib/chef/mixin/recipe_definition_dsl_core.rb +4 -4
- data/lib/chef/mixin/securable.rb +20 -23
- data/lib/chef/mixin/shell_out.rb +45 -26
- data/lib/chef/mixin/subclass_directive.rb +37 -0
- data/lib/chef/mixin/template.rb +56 -9
- data/lib/chef/mixin/unformatter.rb +1 -1
- data/lib/chef/mixin/uris.rb +4 -4
- data/lib/chef/mixin/which.rb +5 -5
- data/lib/chef/mixin/why_run.rb +8 -9
- data/lib/chef/mixin/wide_string.rb +72 -0
- data/lib/chef/mixin/windows_architecture_helper.rb +27 -53
- data/lib/chef/mixin/windows_env_helper.rb +14 -12
- data/lib/chef/mixin/xml_escape.rb +18 -18
- data/lib/chef/mixins.rb +13 -14
- data/lib/chef/monkey_patches/net-ssh-multi.rb +8 -7
- data/lib/chef/monkey_patches/net_http.rb +2 -2
- data/lib/chef/monkey_patches/webrick-utils.rb +51 -0
- data/lib/chef/monkey_patches/win32/registry.rb +86 -0
- data/lib/chef/monologger.rb +5 -7
- data/lib/chef/node/attribute.rb +347 -324
- data/lib/chef/node/attribute_collections.rb +58 -150
- data/lib/chef/node/common_api.rb +123 -0
- data/lib/chef/node/immutable_collections.rb +40 -78
- data/lib/chef/node/mixin/deep_merge_cache.rb +61 -0
- data/lib/chef/node/mixin/immutablize_array.rb +67 -0
- data/lib/chef/node/mixin/immutablize_hash.rb +54 -0
- data/lib/chef/node/mixin/state_tracking.rb +93 -0
- data/lib/chef/node.rb +204 -100
- data/lib/chef/node_map.rb +13 -13
- data/lib/chef/null_logger.rb +3 -3
- data/lib/chef/org.rb +31 -30
- data/lib/chef/platform/handler_map.rb +2 -7
- data/lib/chef/platform/priority_map.rb +2 -2
- data/lib/chef/platform/provider_handler_map.rb +3 -3
- data/lib/chef/platform/provider_mapping.rb +41 -39
- data/lib/chef/platform/provider_priority_map.rb +2 -2
- data/lib/chef/platform/query_helpers.rb +64 -12
- data/lib/chef/platform/rebooter.rb +23 -12
- 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 +41 -61
- data/lib/chef/platform.rb +4 -4
- data/lib/chef/policy_builder/dynamic.rb +185 -0
- data/lib/chef/policy_builder/expand_node_object.rb +65 -38
- data/lib/chef/policy_builder/policyfile.rb +174 -39
- data/lib/chef/policy_builder.rb +5 -12
- data/lib/chef/property.rb +696 -0
- data/lib/chef/provider/apt_repository.rb +253 -0
- data/lib/chef/provider/apt_update.rb +87 -0
- data/lib/chef/provider/batch.rb +14 -6
- data/lib/chef/provider/breakpoint.rb +1 -1
- data/lib/chef/provider/cookbook_file/content.rb +4 -4
- data/lib/chef/provider/cookbook_file.rb +5 -5
- data/lib/chef/provider/cron/aix.rb +1 -1
- data/lib/chef/provider/cron/solaris.rb +1 -1
- data/lib/chef/provider/cron/unix.rb +7 -7
- data/lib/chef/provider/cron.rb +11 -12
- data/lib/chef/provider/deploy/revision.rb +11 -11
- data/lib/chef/provider/deploy/timestamped.rb +1 -1
- data/lib/chef/provider/deploy.rb +12 -15
- data/lib/chef/provider/directory.rb +40 -12
- data/lib/chef/provider/dsc_resource.rb +74 -41
- data/lib/chef/provider/dsc_script.rb +20 -20
- data/lib/chef/provider/env/windows.rb +3 -3
- data/lib/chef/provider/env.rb +8 -8
- data/lib/chef/provider/erl_call.rb +5 -5
- data/lib/chef/provider/execute.rb +32 -11
- data/lib/chef/provider/file/content.rb +4 -4
- data/lib/chef/provider/file.rb +24 -29
- data/lib/chef/provider/git.rb +67 -67
- data/lib/chef/provider/group/aix.rb +6 -6
- data/lib/chef/provider/group/dscl.rb +12 -12
- data/lib/chef/provider/group/gpasswd.rb +3 -3
- data/lib/chef/provider/group/groupadd.rb +10 -9
- data/lib/chef/provider/group/groupmod.rb +4 -4
- data/lib/chef/provider/group/pw.rb +3 -3
- data/lib/chef/provider/group/suse.rb +30 -9
- data/lib/chef/provider/group/usermod.rb +9 -9
- data/lib/chef/provider/group/windows.rb +24 -11
- data/lib/chef/provider/group.rb +16 -9
- data/lib/chef/provider/http_request.rb +10 -10
- data/lib/chef/provider/ifconfig/aix.rb +5 -4
- data/lib/chef/provider/ifconfig/debian.rb +6 -6
- data/lib/chef/provider/ifconfig/redhat.rb +3 -3
- data/lib/chef/provider/ifconfig.rb +14 -13
- data/lib/chef/provider/launchd.rb +208 -0
- data/lib/chef/provider/link.rb +28 -21
- data/lib/chef/provider/log.rb +2 -2
- data/lib/chef/provider/lwrp_base.rb +9 -83
- data/lib/chef/provider/mdadm.rb +5 -4
- data/lib/chef/provider/mount/aix.rb +14 -14
- data/lib/chef/provider/mount/mount.rb +22 -22
- data/lib/chef/provider/mount/solaris.rb +30 -30
- data/lib/chef/provider/mount/windows.rb +10 -4
- data/lib/chef/provider/mount.rb +13 -13
- data/lib/chef/provider/noop.rb +37 -0
- data/lib/chef/provider/ohai.rb +2 -2
- data/lib/chef/provider/osx_profile.rb +255 -0
- data/lib/chef/provider/package/aix.rb +13 -10
- data/lib/chef/provider/package/apt.rb +119 -105
- data/lib/chef/provider/package/cab.rb +150 -0
- data/lib/chef/provider/package/chocolatey.rb +274 -0
- data/lib/chef/provider/package/dpkg.rb +156 -79
- data/lib/chef/provider/package/easy_install.rb +16 -15
- data/lib/chef/provider/package/freebsd/base.rb +7 -7
- data/lib/chef/provider/package/freebsd/pkg.rb +9 -9
- data/lib/chef/provider/package/freebsd/pkgng.rb +6 -6
- data/lib/chef/provider/package/freebsd/port.rb +4 -4
- data/lib/chef/provider/package/homebrew.rb +17 -17
- data/lib/chef/provider/package/ips.rb +9 -9
- data/lib/chef/provider/package/macports.rb +6 -5
- data/lib/chef/provider/package/openbsd.rb +17 -19
- data/lib/chef/provider/package/pacman.rb +7 -10
- data/lib/chef/provider/package/paludis.rb +9 -12
- data/lib/chef/provider/package/portage.rb +15 -18
- data/lib/chef/provider/package/rpm.rb +10 -11
- data/lib/chef/provider/package/rubygems.rb +80 -75
- data/lib/chef/provider/package/smartos.rb +7 -10
- data/lib/chef/provider/package/solaris.rb +8 -11
- data/lib/chef/provider/package/windows/exe.rb +115 -0
- data/lib/chef/provider/package/windows/msi.rb +42 -17
- data/lib/chef/provider/package/windows/registry_uninstall_entry.rb +87 -0
- data/lib/chef/provider/package/windows.rb +132 -31
- data/lib/chef/provider/package/yum/rpm_utils.rb +642 -0
- data/lib/chef/provider/package/{yum-dump.py → yum/yum-dump.py} +1 -1
- data/lib/chef/provider/package/yum/yum_cache.rb +376 -0
- data/lib/chef/provider/package/yum.rb +55 -969
- data/lib/chef/provider/package/zypper.rb +80 -50
- data/lib/chef/provider/package.rb +179 -67
- data/lib/chef/provider/powershell_script.rb +73 -34
- data/lib/chef/provider/reboot.rb +4 -4
- data/lib/chef/provider/registry_key.rb +51 -24
- data/lib/chef/provider/remote_directory.rb +197 -107
- data/lib/chef/provider/remote_file/cache_control_data.rb +46 -14
- data/lib/chef/provider/remote_file/content.rb +12 -12
- data/lib/chef/provider/remote_file/fetcher.rb +4 -2
- data/lib/chef/provider/remote_file/ftp.rb +15 -26
- data/lib/chef/provider/remote_file/http.rb +31 -13
- data/lib/chef/provider/remote_file/local_file.rb +5 -5
- data/lib/chef/provider/remote_file/network_file.rb +4 -4
- data/lib/chef/provider/remote_file/sftp.rb +105 -0
- data/lib/chef/provider/remote_file.rb +5 -5
- data/lib/chef/provider/route.rb +188 -188
- data/lib/chef/provider/ruby_block.rb +3 -3
- data/lib/chef/provider/script.rb +6 -5
- data/lib/chef/provider/service/aix.rb +5 -5
- data/lib/chef/provider/service/aixinit.rb +14 -14
- data/lib/chef/provider/service/arch.rb +8 -8
- data/lib/chef/provider/service/debian.rb +17 -20
- data/lib/chef/provider/service/freebsd.rb +9 -9
- data/lib/chef/provider/service/gentoo.rb +9 -9
- data/lib/chef/provider/service/init.rb +6 -6
- data/lib/chef/provider/service/insserv.rb +6 -8
- data/lib/chef/provider/service/invokercd.rb +4 -6
- data/lib/chef/provider/service/macosx.rb +24 -20
- data/lib/chef/provider/service/openbsd.rb +18 -17
- data/lib/chef/provider/service/redhat.rb +59 -17
- data/lib/chef/provider/service/simple.rb +15 -13
- data/lib/chef/provider/service/solaris.rb +53 -22
- data/lib/chef/provider/service/systemd.rb +64 -17
- data/lib/chef/provider/service/upstart.rb +47 -30
- data/lib/chef/provider/service/windows.rb +31 -77
- data/lib/chef/provider/service.rb +100 -40
- data/lib/chef/provider/subversion.rb +39 -21
- data/lib/chef/provider/support/yum_repo.erb +125 -0
- data/lib/chef/provider/systemd_unit.rb +238 -0
- data/lib/chef/provider/template/content.rb +20 -10
- data/lib/chef/provider/template.rb +8 -8
- data/lib/chef/provider/template_finder.rb +3 -2
- data/lib/chef/provider/user/aix.rb +9 -5
- data/lib/chef/provider/user/dscl.rb +147 -131
- data/lib/chef/provider/user/linux.rb +128 -0
- data/lib/chef/provider/user/pw.rb +12 -11
- data/lib/chef/provider/user/solaris.rb +46 -9
- data/lib/chef/provider/user/useradd.rb +15 -18
- data/lib/chef/provider/user/windows.rb +18 -16
- data/lib/chef/provider/user.rb +44 -33
- data/lib/chef/provider/whyrun_safe_ruby_block.rb +1 -1
- data/lib/chef/provider/windows_script.rb +13 -12
- data/lib/chef/provider/yum_repository.rb +121 -0
- data/lib/chef/provider.rb +261 -50
- data/lib/chef/provider_resolver.rb +5 -5
- data/lib/chef/providers.rb +121 -110
- data/lib/chef/recipe.rb +10 -31
- data/lib/chef/request_id.rb +4 -4
- data/lib/chef/resource/action_class.rb +94 -0
- data/lib/chef/resource/apt_package.rb +6 -17
- data/lib/chef/resource/apt_repository.rb +47 -0
- data/lib/chef/{chef_fs/file_system/cookbook_frozen_error.rb → resource/apt_update.rb} +12 -10
- data/lib/chef/resource/bash.rb +5 -5
- data/lib/chef/resource/batch.rb +4 -4
- data/lib/chef/resource/bff_package.rb +3 -3
- data/lib/chef/resource/breakpoint.rb +3 -4
- data/lib/chef/resource/cab_package.rb +44 -0
- data/lib/chef/resource/chef_gem.rb +12 -28
- data/lib/chef/resource/chocolatey_package.rb +39 -0
- data/lib/chef/resource/conditional.rb +17 -9
- data/lib/chef/resource/conditional_action_not_nothing.rb +1 -1
- data/lib/chef/resource/cookbook_file.rb +10 -10
- data/lib/chef/resource/cron.rb +20 -20
- data/lib/chef/resource/csh.rb +5 -5
- data/lib/chef/resource/deploy.rb +52 -46
- data/lib/chef/resource/deploy_revision.rb +1 -1
- data/lib/chef/resource/directory.rb +10 -10
- data/lib/chef/resource/dpkg_package.rb +5 -5
- data/lib/chef/resource/dsc_resource.rb +121 -82
- data/lib/chef/resource/dsc_script.rb +17 -15
- data/lib/chef/resource/easy_install_package.rb +6 -25
- data/lib/chef/resource/env.rb +6 -6
- data/lib/chef/resource/erl_call.rb +10 -10
- data/lib/chef/resource/execute.rb +25 -17
- data/lib/chef/resource/file/verification.rb +14 -8
- data/lib/chef/resource/file.rb +25 -87
- data/lib/chef/resource/freebsd_package.rb +11 -10
- data/lib/chef/resource/gem_package.rb +8 -23
- data/lib/chef/resource/git.rb +3 -3
- data/lib/chef/resource/group.rb +13 -14
- data/lib/chef/resource/homebrew_package.rb +7 -18
- data/lib/chef/resource/http_request.rb +9 -9
- data/lib/chef/resource/ifconfig.rb +16 -16
- data/lib/chef/resource/ips_package.rb +5 -16
- data/lib/chef/{chef_fs/file_system/not_found_error.rb → resource/ksh.rb} +10 -9
- data/lib/chef/resource/launchd.rb +104 -0
- data/lib/chef/resource/link.rb +13 -12
- data/lib/chef/resource/log.rb +7 -7
- data/lib/chef/resource/lwrp_base.rb +15 -25
- data/lib/chef/resource/macosx_service.rb +5 -5
- data/lib/chef/resource/macports_package.rb +3 -2
- data/lib/chef/resource/mdadm.rb +19 -11
- data/lib/chef/resource/mount.rb +21 -21
- data/lib/chef/resource/ohai.rb +5 -5
- data/lib/chef/resource/openbsd_package.rb +7 -6
- data/lib/chef/resource/osx_profile.rb +74 -0
- data/lib/chef/resource/package.rb +16 -71
- data/lib/chef/resource/pacman_package.rb +3 -2
- data/lib/chef/resource/paludis_package.rb +5 -7
- data/lib/chef/resource/perl.rb +5 -5
- data/lib/chef/resource/portage_package.rb +5 -4
- data/lib/chef/resource/powershell_script.rb +6 -6
- data/lib/chef/resource/python.rb +5 -5
- data/lib/chef/resource/reboot.rb +6 -6
- data/lib/chef/resource/registry_key.rb +16 -16
- data/lib/chef/resource/remote_directory.rb +15 -16
- data/lib/chef/resource/remote_file.rb +27 -18
- data/lib/chef/resource/resource_notification.rb +16 -3
- data/lib/chef/resource/route.rb +15 -15
- data/lib/chef/resource/rpm_package.rb +6 -16
- data/lib/chef/resource/ruby.rb +5 -5
- data/lib/chef/resource/ruby_block.rb +8 -8
- data/lib/chef/resource/scm.rb +20 -27
- data/lib/chef/resource/script.rb +11 -11
- data/lib/chef/resource/service.rb +49 -21
- data/lib/chef/resource/smartos_package.rb +4 -3
- data/lib/chef/resource/solaris_package.rb +4 -3
- data/lib/chef/resource/subversion.rb +10 -5
- data/lib/chef/resource/systemd_unit.rb +63 -0
- data/lib/chef/resource/template.rb +14 -14
- data/lib/chef/resource/timestamped_deploy.rb +1 -1
- data/lib/chef/{mixin/wstring.rb → resource/user/aix_user.rb} +10 -10
- data/lib/chef/{chef_fs/file_system/file_system_root_dir.rb → resource/user/dscl_user.rb} +9 -9
- data/lib/chef/resource/user/linux_user.rb +41 -0
- data/lib/chef/resource/user/pw_user.rb +31 -0
- data/lib/chef/resource/user/solaris_user.rb +31 -0
- data/lib/chef/resource/user/windows_user.rb +31 -0
- data/lib/chef/resource/user.rb +33 -19
- data/lib/chef/resource/whyrun_safe_ruby_block.rb +1 -1
- data/lib/chef/resource/windows_package.rb +21 -66
- data/lib/chef/resource/windows_script.rb +11 -7
- data/lib/chef/resource/windows_service.rb +6 -6
- data/lib/chef/resource/yum_package.rb +22 -36
- data/lib/chef/resource/yum_repository.rb +79 -0
- data/lib/chef/resource/zypper_package.rb +3 -2
- data/lib/chef/resource.rb +473 -204
- data/lib/chef/resource_builder.rb +24 -12
- data/lib/chef/resource_collection/resource_collection_serialization.rb +5 -5
- data/lib/chef/resource_collection/resource_list.rb +18 -7
- data/lib/chef/resource_collection/resource_set.rb +20 -17
- data/lib/chef/resource_collection/stepable_iterator.rb +5 -7
- data/lib/chef/resource_collection.rb +61 -14
- data/lib/chef/resource_definition.rb +7 -7
- data/lib/chef/resource_definition_list.rb +5 -5
- data/lib/chef/resource_reporter.rb +25 -20
- data/lib/chef/resource_resolver.rb +7 -8
- data/lib/chef/resources.rb +82 -74
- data/lib/chef/rest.rb +25 -24
- data/lib/chef/role.rb +50 -44
- data/lib/chef/run_context/cookbook_compiler.rb +14 -15
- data/lib/chef/run_context.rb +481 -110
- data/lib/chef/run_list/run_list_expansion.rb +57 -14
- data/lib/chef/run_list/run_list_item.rb +8 -9
- data/lib/chef/run_list/versioned_recipe_list.rb +27 -12
- data/lib/chef/run_list.rb +23 -21
- data/lib/chef/run_lock.rb +40 -31
- data/lib/chef/run_status.rb +3 -3
- data/lib/chef/runner.rb +47 -21
- data/lib/chef/scan_access_control.rb +7 -7
- data/lib/chef/search/query.rb +56 -25
- data/lib/chef/server_api.rb +43 -11
- data/lib/chef/shell/ext.rb +33 -33
- data/lib/chef/shell/model_wrapper.rb +9 -9
- data/lib/chef/shell/shell_session.rb +24 -23
- data/lib/chef/shell.rb +30 -26
- data/lib/chef/shell_out.rb +2 -2
- data/lib/chef/tasks/chef_repo.rake +62 -63
- data/lib/chef/user.rb +38 -37
- data/lib/chef/user_v1.rb +54 -59
- data/lib/chef/util/backup.rb +6 -6
- data/lib/chef/util/diff.rb +10 -10
- data/lib/chef/util/dsc/configuration_generator.rb +13 -13
- data/lib/chef/util/dsc/lcm_output_parser.rb +9 -9
- data/lib/chef/util/dsc/local_configuration_manager.rb +15 -15
- data/lib/chef/util/dsc/resource_info.rb +15 -15
- data/lib/chef/util/dsc/resource_store.rb +73 -74
- data/lib/chef/util/editor.rb +1 -2
- data/lib/chef/util/file_edit.rb +5 -5
- data/lib/chef/util/path_helper.rb +2 -2
- data/lib/chef/util/powershell/cmdlet.rb +125 -122
- data/lib/chef/util/powershell/cmdlet_result.rb +36 -36
- data/lib/chef/util/powershell/ps_credential.rb +5 -2
- data/lib/chef/util/selinux.rb +7 -7
- data/lib/chef/util/threaded_job_queue.rb +2 -2
- data/lib/chef/util/windows/net_group.rb +34 -56
- data/lib/chef/util/windows/net_use.rb +37 -73
- data/lib/chef/util/windows/net_user.rb +18 -17
- data/lib/chef/util/windows/volume.rb +21 -21
- data/lib/chef/util/windows.rb +1 -33
- data/lib/chef/version/platform.rb +5 -5
- data/lib/chef/version.rb +5 -5
- data/lib/chef/version_class.rb +14 -9
- data/lib/chef/version_constraint/platform.rb +3 -3
- data/lib/chef/version_constraint.rb +15 -15
- data/lib/chef/whitelist.rb +2 -2
- data/lib/chef/win32/api/crypto.rb +63 -63
- data/lib/chef/win32/api/error.rb +46 -14
- data/lib/chef/win32/api/file.rb +93 -19
- data/lib/chef/win32/api/installer.rb +15 -16
- data/lib/chef/win32/api/memory.rb +4 -4
- data/lib/chef/win32/api/net.rb +216 -108
- data/lib/chef/win32/api/process.rb +4 -4
- data/lib/chef/win32/api/psapi.rb +4 -4
- data/lib/chef/win32/api/registry.rb +51 -0
- data/lib/chef/win32/api/security.rb +53 -28
- data/lib/chef/win32/api/synchronization.rb +4 -4
- data/lib/chef/win32/api/system.rb +27 -4
- data/lib/chef/win32/api/unicode.rb +4 -47
- data/lib/chef/win32/api.rb +14 -8
- data/lib/chef/win32/crypto.rb +50 -49
- data/lib/chef/win32/error.rb +30 -17
- data/lib/chef/win32/eventlog.rb +4 -4
- data/lib/chef/win32/file/info.rb +3 -4
- data/lib/chef/win32/file/version_info.rb +93 -0
- data/lib/chef/win32/file.rb +50 -20
- data/lib/chef/win32/handle.rb +6 -6
- data/lib/chef/win32/memory.rb +4 -4
- data/lib/chef/win32/mutex.rb +5 -6
- data/lib/chef/win32/net.rb +170 -49
- data/lib/chef/win32/process.rb +20 -7
- data/lib/chef/win32/registry.rb +53 -60
- data/lib/chef/win32/security/ace.rb +6 -6
- data/lib/chef/win32/security/acl.rb +8 -8
- data/lib/chef/win32/security/securable_object.rb +5 -5
- data/lib/chef/win32/security/security_descriptor.rb +5 -5
- data/lib/chef/win32/security/sid.rb +85 -47
- data/lib/chef/win32/security/token.rb +7 -7
- data/lib/chef/win32/security.rb +82 -20
- data/lib/chef/win32/system.rb +62 -0
- data/lib/chef/win32/unicode.rb +13 -8
- data/lib/chef/win32/version.rb +28 -32
- data/lib/chef/workstation_config_loader.rb +4 -159
- data/lib/chef.rb +17 -17
- data/lib-backcompat/chef/chef_fs/file_system/acl_entry.rb +5 -0
- data/lib-backcompat/chef/chef_fs/file_system/already_exists_error.rb +20 -0
- data/lib-backcompat/chef/chef_fs/file_system/chef_repository_file_system_root_dir.rb +5 -0
- data/lib-backcompat/chef/chef_fs/file_system/chef_server_root_dir.rb +5 -0
- data/lib-backcompat/chef/chef_fs/file_system/cookbook_frozen_error.rb +20 -0
- data/lib-backcompat/chef/chef_fs/file_system/default_environment_cannot_be_modified_error.rb +20 -0
- data/lib-backcompat/chef/chef_fs/file_system/file_system_error.rb +20 -0
- data/lib-backcompat/chef/chef_fs/file_system/must_delete_recursively_error.rb +20 -0
- data/lib-backcompat/chef/chef_fs/file_system/not_found_error.rb +20 -0
- data/lib-backcompat/chef/chef_fs/file_system/operation_failed_error.rb +20 -0
- data/lib-backcompat/chef/chef_fs/file_system/operation_not_allowed_error.rb +20 -0
- data/lib-backcompat/chef/chef_fs/file_system/repository/chef_repository_file_system_acls_dir.rb +5 -0
- data/lib-backcompat/chef/chef_fs/file_system/repository/chef_repository_file_system_client_keys_dir.rb +5 -0
- data/lib-backcompat/chef/chef_fs/file_system/repository/chef_repository_file_system_entry.rb +6 -0
- data/lib-backcompat/chef/chef_fs/file_system/repository/chef_repository_file_system_policies_dir.rb +5 -0
- data/lib-backcompat/chef/chef_fs/file_system/repository/file_system_root_dir.rb +34 -0
- data/spec/data/apt/chef-integration-test-1.0/debian/copyright +2 -2
- data/spec/data/apt/chef-integration-test-1.1/debian/copyright +2 -2
- data/spec/data/apt/chef-integration-test2-1.0/debian/changelog +5 -0
- data/spec/data/apt/chef-integration-test2-1.0/debian/chef-integration-test2/DEBIAN/conffiles +1 -0
- data/spec/data/apt/chef-integration-test2-1.0/debian/chef-integration-test2/DEBIAN/control +10 -0
- data/spec/data/apt/chef-integration-test2-1.0/debian/chef-integration-test2/DEBIAN/md5sums +1 -0
- data/spec/data/apt/chef-integration-test2-1.0/debian/chef-integration-test2.debhelper.log +45 -0
- data/spec/data/apt/chef-integration-test2-1.0/debian/chef-integration-test2.substvars +1 -0
- data/spec/data/apt/chef-integration-test2-1.0/debian/compat +1 -0
- data/spec/data/apt/chef-integration-test2-1.0/debian/conffiles +1 -0
- data/spec/data/apt/chef-integration-test2-1.0/debian/control +13 -0
- data/spec/data/apt/chef-integration-test2-1.0/debian/copyright +34 -0
- data/spec/data/apt/chef-integration-test2-1.0/debian/files +1 -0
- data/spec/data/apt/chef-integration-test2-1.0/debian/rules +13 -0
- data/spec/data/apt/chef-integration-test2-1.0/debian/source/format +1 -0
- data/spec/data/apt/chef-integration-test2_1.0-1.debian.tar.gz +0 -0
- data/spec/data/apt/chef-integration-test2_1.0-1.dsc +18 -0
- data/spec/data/apt/chef-integration-test2_1.0-1_amd64.build +91 -0
- data/spec/data/apt/chef-integration-test2_1.0-1_amd64.changes +31 -0
- data/spec/data/apt/chef-integration-test2_1.0-1_amd64.deb +0 -0
- data/spec/data/apt/chef-integration-test2_1.0.orig.tar.gz +0 -0
- data/spec/data/client.d_00/00-foo.rb +2 -0
- data/spec/data/client.d_00/01-bar.rb +1 -0
- data/spec/data/client.d_00/bar +1 -0
- data/spec/data/client.d_01/foo/bar.rb +1 -0
- data/spec/data/client.d_02/foo.rb/foo.txt +1 -0
- data/spec/data/cookbooks/name-mismatch-versionnumber/recipes/default.rb +1 -1
- data/spec/{unit/provider/package_spec.rbe → data/cookbooks/openldap/.root_dotfile} +0 -0
- data/spec/data/cookbooks/openldap/spec/spec_helper.rb +0 -0
- data/spec/data/cookbooks/openldap/templates/default/helpers.erb +14 -0
- data/spec/data/cookbooks/openldap/templates/default/nested_openldap_partials.erb +1 -0
- data/spec/data/cookbooks/openldap/templates/default/nested_partial.erb +1 -0
- data/spec/data/cookbooks/supports-platform-constraints/metadata.rb +5 -0
- data/spec/data/dsc_lcm.pfx +0 -0
- data/spec/data/incomplete-metadata-chef-repo/incomplete-metadata/recipes/default.rb +1 -1
- data/spec/data/invalid-metadata-chef-repo/invalid-metadata/metadata.rb +1 -2
- data/spec/data/invalid-metadata-chef-repo/invalid-metadata/recipes/default.rb +1 -1
- data/spec/data/run_context/cookbooks/circular-dep1/attributes/default.rb +2 -4
- data/spec/data/run_context/cookbooks/circular-dep2/attributes/default.rb +2 -3
- data/spec/data/run_context/cookbooks/dependency1/attributes/aa_first.rb +2 -2
- data/spec/data/run_context/cookbooks/dependency1/attributes/default.rb +2 -2
- data/spec/data/run_context/cookbooks/dependency1/attributes/zz_last.rb +2 -3
- data/spec/data/run_context/cookbooks/dependency2/attributes/default.rb +2 -3
- data/spec/data/run_context/cookbooks/include/recipes/default.rb +24 -0
- data/spec/data/run_context/cookbooks/include/recipes/includee.rb +3 -0
- data/spec/data/run_context/cookbooks/no-default-attr/attributes/server.rb +2 -3
- data/spec/data/run_context/cookbooks/test-with-circular-deps/attributes/default.rb +2 -3
- data/spec/data/run_context/cookbooks/test-with-deps/attributes/default.rb +2 -3
- data/spec/data/templates/chef-seattle20160930-4388-1crv7ef.txt +1 -0
- data/spec/data/templates/chef-seattle20160930-4388-jjfoae.txt +1 -0
- data/spec/data/templates/chef-seattle20160930-4388-umeq2c.txt +1 -0
- data/spec/data/trusted_certs/example_no_cn.crt +36 -0
- data/spec/functional/application_spec.rb +8 -8
- data/spec/functional/assets/chocolatey_feed/test-A.1.0.nupkg +0 -0
- data/spec/functional/assets/chocolatey_feed/test-A.1.5.nupkg +0 -0
- data/spec/functional/assets/chocolatey_feed/test-A.2.0.nupkg +0 -0
- data/spec/functional/assets/chocolatey_feed/test-B.1.0.nupkg +0 -0
- data/spec/functional/assets/testchefsubsys +2 -3
- data/spec/functional/audit/rspec_formatter_spec.rb +8 -8
- data/spec/functional/audit/runner_spec.rb +13 -9
- data/spec/functional/dsl/reboot_pending_spec.rb +37 -52
- data/spec/functional/dsl/registry_helper_spec.rb +8 -10
- data/spec/functional/event_loggers/windows_eventlog_spec.rb +36 -28
- data/spec/functional/file_content_management/deploy_strategies_spec.rb +10 -11
- data/spec/functional/http/simple_spec.rb +13 -13
- data/spec/functional/knife/configure_spec.rb +5 -10
- data/spec/functional/knife/cookbook_delete_spec.rb +55 -56
- data/spec/functional/knife/exec_spec.rb +12 -12
- data/spec/functional/knife/rehash_spec.rb +39 -0
- data/spec/functional/knife/smoke_test.rb +11 -3
- data/spec/functional/knife/ssh_spec.rb +47 -31
- data/spec/functional/mixin/powershell_out_spec.rb +5 -5
- data/spec/functional/mixin/shell_out_spec.rb +12 -12
- data/spec/functional/notifications_spec.rb +78 -9
- data/spec/functional/provider/remote_file/cache_control_data_spec.rb +11 -12
- data/spec/functional/provider/whyrun_safe_ruby_block_spec.rb +6 -6
- data/spec/functional/rebooter_spec.rb +18 -18
- data/spec/functional/resource/aix_service_spec.rb +9 -10
- data/spec/functional/resource/aixinit_service_spec.rb +20 -20
- data/spec/functional/resource/base.rb +1 -3
- data/spec/functional/resource/bash_spec.rb +10 -10
- data/spec/functional/resource/batch_spec.rb +5 -5
- data/spec/functional/resource/bff_spec.rb +10 -12
- data/spec/functional/resource/chocolatey_package_spec.rb +125 -0
- data/spec/functional/resource/cookbook_file_spec.rb +10 -10
- data/spec/functional/resource/cron_spec.rb +22 -15
- data/spec/functional/resource/deploy_revision_spec.rb +22 -22
- data/spec/functional/resource/directory_spec.rb +4 -4
- data/spec/functional/resource/dpkg_package_spec.rb +339 -0
- data/spec/functional/resource/dsc_resource_spec.rb +23 -26
- data/spec/functional/resource/dsc_script_spec.rb +217 -114
- data/spec/functional/resource/env_spec.rb +34 -34
- data/spec/functional/resource/execute_spec.rb +14 -14
- data/spec/functional/resource/file_spec.rb +12 -13
- data/spec/functional/resource/git_spec.rb +23 -25
- data/spec/functional/resource/group_spec.rb +131 -87
- data/spec/functional/resource/ifconfig_spec.rb +20 -12
- data/spec/functional/resource/link_spec.rb +179 -145
- data/spec/functional/resource/mount_spec.rb +20 -29
- data/spec/functional/resource/ohai_spec.rb +11 -14
- data/spec/functional/resource/package_spec.rb +12 -14
- data/spec/functional/resource/{powershell_spec.rb → powershell_script_spec.rb} +164 -75
- data/spec/functional/resource/reboot_spec.rb +14 -14
- data/spec/functional/resource/registry_spec.rb +192 -77
- data/spec/functional/resource/remote_directory_spec.rb +23 -23
- data/spec/functional/resource/remote_file_spec.rb +32 -23
- data/spec/functional/resource/rpm_spec.rb +14 -14
- data/spec/functional/resource/template_spec.rb +12 -12
- data/spec/functional/resource/user/dscl_spec.rb +8 -8
- data/spec/functional/resource/user/useradd_spec.rb +62 -67
- data/spec/functional/resource/user/windows_spec.rb +25 -17
- data/spec/functional/resource/windows_package_spec.rb +168 -0
- data/spec/functional/resource/windows_service_spec.rb +27 -23
- data/spec/functional/rest_spec.rb +8 -7
- data/spec/functional/run_lock_spec.rb +385 -198
- data/spec/functional/shell_spec.rb +12 -11
- data/spec/functional/tiny_server_spec.rb +25 -24
- data/spec/functional/util/path_helper_spec.rb +6 -6
- data/spec/functional/util/powershell/cmdlet_spec.rb +24 -27
- data/spec/functional/version_spec.rb +6 -6
- data/spec/functional/win32/crypto_spec.rb +8 -11
- data/spec/functional/win32/{registry_helper_spec.rb → registry_spec.rb} +118 -126
- data/spec/functional/win32/security_spec.rb +25 -25
- data/spec/functional/win32/service_manager_spec.rb +14 -15
- data/spec/functional/win32/sid_spec.rb +13 -13
- data/spec/functional/win32/version_info_spec.rb +50 -0
- data/spec/functional/win32/versions_spec.rb +15 -15
- data/spec/integration/client/client_spec.rb +189 -57
- data/spec/integration/client/exit_code_spec.rb +245 -0
- data/spec/integration/client/ipv6_spec.rb +15 -16
- data/spec/integration/knife/chef_fs_data_store_spec.rb +432 -246
- data/spec/integration/knife/chef_repo_path_spec.rb +332 -261
- data/spec/integration/knife/chef_repository_file_system_spec.rb +88 -84
- data/spec/integration/knife/chefignore_spec.rb +82 -82
- data/spec/integration/knife/client_bulk_delete_spec.rb +130 -0
- data/spec/integration/knife/client_create_spec.rb +69 -0
- data/spec/integration/knife/client_delete_spec.rb +63 -0
- data/spec/integration/knife/client_key_create_spec.rb +65 -0
- data/spec/integration/knife/client_key_delete_spec.rb +42 -0
- data/spec/integration/knife/client_key_list_spec.rb +60 -0
- data/spec/integration/knife/client_key_show_spec.rb +44 -0
- data/spec/integration/knife/client_list_spec.rb +48 -0
- data/spec/integration/knife/client_show_spec.rb +36 -0
- data/spec/integration/knife/common_options_spec.rb +41 -41
- data/spec/integration/knife/cookbook_api_ipv6_spec.rb +9 -9
- data/spec/integration/knife/cookbook_bulk_delete_spec.rb +64 -0
- data/spec/integration/knife/cookbook_download_spec.rb +95 -0
- data/spec/integration/knife/cookbook_list_spec.rb +54 -0
- data/spec/integration/knife/cookbook_show_spec.rb +159 -0
- data/spec/integration/knife/cookbook_upload_spec.rb +90 -0
- data/spec/integration/knife/data_bag_create_spec.rb +55 -0
- data/spec/integration/knife/data_bag_delete_spec.rb +58 -0
- data/spec/integration/knife/data_bag_from_file_spec.rb +115 -0
- data/spec/integration/knife/data_bag_list_spec.rb +43 -0
- data/spec/integration/knife/data_bag_show_spec.rb +53 -0
- data/spec/integration/knife/delete_spec.rb +262 -248
- data/spec/integration/knife/deps_spec.rb +284 -284
- data/spec/integration/knife/diff_spec.rb +237 -237
- data/spec/integration/knife/download_spec.rb +555 -392
- data/spec/integration/knife/environment_compare_spec.rb +74 -0
- data/spec/integration/knife/environment_create_spec.rb +40 -0
- data/spec/integration/knife/environment_delete_spec.rb +36 -0
- data/spec/integration/knife/environment_from_file_spec.rb +115 -0
- data/spec/integration/knife/environment_list_spec.rb +41 -0
- data/spec/integration/knife/environment_show_spec.rb +76 -0
- data/spec/integration/knife/list_spec.rb +316 -122
- data/spec/integration/knife/node_bulk_delete_spec.rb +51 -0
- data/spec/integration/knife/node_create_spec.rb +46 -0
- data/spec/integration/knife/node_delete_spec.rb +47 -0
- data/spec/integration/knife/node_environment_set_spec.rb +45 -0
- data/spec/integration/knife/node_from_file_spec.rb +58 -0
- data/spec/integration/knife/node_list_spec.rb +44 -0
- data/spec/integration/knife/node_run_list_add_spec.rb +53 -0
- data/spec/integration/knife/node_run_list_remove_spec.rb +35 -0
- data/spec/integration/knife/node_run_list_set_spec.rb +40 -0
- data/spec/integration/knife/node_show_spec.rb +35 -0
- data/spec/integration/knife/raw_spec.rb +41 -39
- data/spec/integration/knife/redirection_spec.rb +12 -12
- data/spec/integration/knife/role_bulk_delete_spec.rb +51 -0
- data/spec/integration/knife/role_create_spec.rb +40 -0
- data/spec/integration/knife/role_delete_spec.rb +47 -0
- data/spec/integration/knife/role_from_file_spec.rb +95 -0
- data/spec/integration/knife/role_list_spec.rb +44 -0
- data/spec/integration/knife/role_show_spec.rb +50 -0
- data/spec/integration/knife/serve_spec.rb +12 -12
- data/spec/integration/knife/show_spec.rb +59 -59
- data/spec/integration/knife/upload_spec.rb +700 -543
- data/spec/integration/recipes/accumulator_spec.rb +232 -0
- data/spec/integration/recipes/lwrp_inline_resources_spec.rb +124 -27
- data/spec/integration/recipes/lwrp_spec.rb +7 -7
- data/spec/integration/recipes/noop_resource_spec.rb +24 -0
- data/spec/integration/recipes/notifies_spec.rb +334 -0
- data/spec/integration/recipes/notifying_block_spec.rb +111 -0
- data/spec/integration/recipes/provider_choice.rb +5 -4
- data/spec/integration/recipes/recipe_dsl_spec.rb +417 -404
- data/spec/integration/recipes/remote_directory.rb +74 -0
- data/spec/integration/recipes/resource_action_spec.rb +581 -0
- data/spec/integration/recipes/resource_converge_if_changed_spec.rb +496 -0
- data/spec/integration/recipes/resource_load_spec.rb +208 -0
- data/spec/integration/solo/solo_spec.rb +78 -54
- data/spec/scripts/ssl-serve.rb +12 -17
- data/spec/spec_helper.rb +82 -48
- data/spec/stress/win32/file_spec.rb +5 -5
- data/spec/stress/win32/memory_spec.rb +4 -4
- data/spec/stress/win32/security_spec.rb +14 -14
- data/spec/support/chef_helpers.rb +27 -6
- data/spec/support/key_helpers.rb +2 -2
- data/spec/support/lib/chef/provider/easy.rb +2 -2
- data/spec/support/lib/chef/provider/openldap_includer.rb +2 -2
- data/spec/support/lib/chef/provider/snakeoil.rb +2 -2
- data/spec/support/lib/chef/resource/cat.rb +5 -5
- data/spec/support/lib/chef/resource/one_two_three_four.rb +3 -3
- data/spec/support/lib/chef/resource/openldap_includer.rb +2 -3
- data/spec/support/lib/chef/resource/with_state.rb +4 -4
- data/spec/support/lib/chef/resource/zen_follower.rb +4 -4
- data/spec/support/lib/chef/resource/zen_master.rb +5 -6
- data/spec/support/lib/library_load_order.rb +0 -2
- data/spec/support/matchers/leak.rb +7 -5
- data/spec/support/mock/constant.rb +5 -5
- data/spec/support/mock/platform.rb +6 -6
- data/spec/support/platform_helpers.rb +65 -31
- data/spec/support/platforms/prof/gc.rb +2 -3
- data/spec/support/platforms/prof/win32.rb +3 -4
- data/spec/support/platforms/win32/spec_service.rb +4 -4
- data/spec/support/shared/context/client.rb +33 -15
- data/spec/support/shared/context/config.rb +3 -3
- data/spec/support/shared/context/win32.rb +34 -0
- data/spec/support/shared/examples/client.rb +4 -4
- data/spec/support/shared/functional/diff_disabled.rb +1 -1
- data/spec/support/shared/functional/directory_resource.rb +10 -10
- data/spec/support/shared/functional/file_resource.rb +29 -31
- data/spec/support/shared/functional/http.rb +47 -48
- data/spec/support/shared/functional/knife.rb +3 -3
- data/spec/support/shared/functional/securable_resource.rb +54 -54
- data/spec/support/shared/functional/securable_resource_with_reporting.rb +8 -12
- data/spec/support/shared/functional/win32_service.rb +8 -11
- data/spec/support/shared/functional/windows_script.rb +68 -31
- data/spec/support/shared/integration/app_server_support.rb +8 -10
- data/spec/support/shared/integration/integration_helper.rb +27 -21
- data/spec/support/shared/integration/knife_support.rb +29 -17
- data/spec/support/shared/matchers/exit_with_code.rb +3 -3
- data/spec/support/shared/matchers/match_environment_variable.rb +2 -2
- data/spec/support/shared/shared_examples.rb +2 -2
- data/spec/support/shared/unit/api_error_inspector.rb +3 -5
- data/spec/support/shared/unit/api_versioning.rb +10 -10
- data/spec/support/shared/unit/application_dot_d.rb +73 -0
- data/spec/support/shared/unit/execute_resource.rb +11 -6
- data/spec/support/shared/unit/file_system_support.rb +12 -13
- data/spec/support/shared/unit/knife_shared.rb +1 -2
- data/spec/support/shared/unit/mock_shellout.rb +49 -0
- data/spec/support/shared/unit/platform_introspector.rb +39 -34
- data/spec/support/shared/unit/provider/file.rb +33 -38
- data/spec/support/shared/unit/provider/useradd_based_user_provider.rb +86 -118
- data/spec/support/shared/unit/resource/static_provider_resolution.rb +4 -7
- data/spec/support/shared/unit/script_resource.rb +17 -17
- data/spec/support/shared/unit/user_and_client_shared.rb +12 -13
- data/spec/support/shared/unit/windows_script_resource.rb +7 -8
- data/spec/tiny_server.rb +69 -80
- data/spec/unit/api_client/registration_spec.rb +46 -42
- data/spec/unit/api_client_spec.rb +13 -16
- data/spec/unit/api_client_v1_spec.rb +18 -20
- data/spec/unit/application/apply_spec.rb +10 -7
- data/spec/unit/application/client_spec.rb +184 -69
- data/spec/unit/application/exit_code_spec.rb +241 -0
- data/spec/unit/application/knife_spec.rb +71 -19
- data/spec/unit/application/solo_spec.rb +149 -102
- data/spec/unit/application_spec.rb +170 -303
- data/spec/unit/audit/audit_event_proxy_spec.rb +44 -37
- data/spec/unit/audit/audit_reporter_spec.rb +43 -41
- data/spec/unit/audit/control_group_data_spec.rb +34 -30
- data/spec/unit/audit/logger_spec.rb +5 -5
- data/spec/unit/audit/rspec_formatter_spec.rb +4 -4
- data/spec/unit/audit/runner_spec.rb +11 -12
- data/spec/unit/chef_class_spec.rb +30 -11
- data/spec/unit/chef_fs/config_spec.rb +140 -15
- data/spec/unit/chef_fs/data_handler/group_handler_spec.rb +18 -18
- data/spec/unit/chef_fs/diff_spec.rb +79 -79
- data/spec/unit/chef_fs/file_pattern_spec.rb +368 -369
- data/spec/unit/chef_fs/file_system/cookbook_subdir_spec.rb +34 -0
- data/spec/unit/chef_fs/file_system/operation_failed_error_spec.rb +13 -13
- data/spec/unit/chef_fs/file_system/repository/base_file_spec.rb +126 -0
- data/spec/unit/chef_fs/file_system/repository/directory_spec.rb +175 -0
- data/spec/unit/chef_fs/file_system_spec.rb +75 -75
- data/spec/unit/chef_fs/parallelizer.rb +71 -76
- data/spec/unit/chef_fs/path_util_spec.rb +108 -0
- data/spec/unit/chef_spec.rb +3 -3
- data/spec/unit/client_spec.rb +51 -46
- data/spec/unit/config_fetcher_spec.rb +57 -29
- data/spec/unit/config_spec.rb +31 -0
- data/spec/unit/cookbook/chefignore_spec.rb +12 -12
- data/spec/unit/cookbook/cookbook_version_loader_spec.rb +17 -6
- data/spec/unit/cookbook/file_vendor_spec.rb +23 -9
- data/spec/unit/cookbook/metadata_spec.rb +345 -161
- data/spec/unit/cookbook/synchronizer_spec.rb +40 -34
- data/spec/unit/cookbook/syntax_check_spec.rb +28 -23
- data/spec/unit/cookbook_loader_spec.rb +43 -35
- data/spec/unit/cookbook_manifest_spec.rb +27 -28
- data/spec/unit/cookbook_site_streaming_uploader_spec.rb +28 -24
- data/spec/unit/cookbook_spec.rb +5 -5
- data/spec/unit/cookbook_uploader_spec.rb +10 -11
- data/spec/unit/cookbook_version_file_specificity_spec.rb +74 -52
- data/spec/unit/cookbook_version_spec.rb +143 -128
- data/spec/unit/daemon_spec.rb +6 -6
- data/spec/unit/data_bag_item_spec.rb +110 -46
- data/spec/unit/data_bag_spec.rb +51 -51
- data/spec/unit/data_collector/messages/helpers_spec.rb +186 -0
- data/spec/unit/data_collector/messages_spec.rb +192 -0
- data/spec/unit/data_collector_spec.rb +695 -0
- data/spec/unit/decorator/lazy_array_spec.rb +58 -0
- data/spec/unit/decorator/lazy_spec.rb +39 -0
- data/spec/unit/decorator_spec.rb +142 -0
- data/spec/unit/deprecation_spec.rb +14 -17
- data/spec/unit/digester_spec.rb +5 -6
- data/spec/unit/dsl/audit_spec.rb +7 -7
- data/spec/unit/dsl/data_query_spec.rb +15 -14
- data/spec/unit/dsl/declare_resource_spec.rb +365 -0
- data/spec/unit/dsl/platform_introspection_spec.rb +19 -20
- data/spec/unit/dsl/reboot_pending_spec.rb +29 -23
- data/spec/unit/dsl/recipe_spec.rb +17 -6
- data/spec/unit/dsl/{regsitry_helper_spec.rb → registry_helper_spec.rb} +10 -13
- data/spec/unit/dsl/resources_spec.rb +14 -14
- data/spec/unit/encrypted_data_bag_item/check_encrypted_spec.rb +11 -10
- data/spec/unit/encrypted_data_bag_item_spec.rb +17 -16
- data/spec/unit/environment_spec.rb +65 -65
- data/spec/unit/event_dispatch/dispatcher_spec.rb +69 -8
- data/spec/unit/event_dispatch/dsl_spec.rb +83 -0
- data/spec/unit/exceptions_spec.rb +12 -10
- data/spec/unit/file_access_control_spec.rb +35 -35
- data/spec/unit/file_cache_spec.rb +19 -19
- data/spec/unit/file_content_management/deploy/cp_spec.rb +3 -5
- data/spec/unit/file_content_management/deploy/mv_unix_spec.rb +3 -5
- data/spec/unit/file_content_management/deploy/mv_windows_spec.rb +5 -12
- data/spec/unit/file_content_management/tempfile_spec.rb +115 -0
- data/spec/unit/formatters/base_spec.rb +29 -6
- data/spec/unit/formatters/doc_spec.rb +53 -7
- data/spec/unit/formatters/error_description_spec.rb +96 -0
- data/spec/unit/formatters/error_inspectors/api_error_formatting_spec.rb +11 -12
- data/spec/unit/formatters/error_inspectors/compile_error_inspector_spec.rb +36 -10
- data/spec/unit/formatters/error_inspectors/cookbook_resolve_error_inspector_spec.rb +4 -7
- data/spec/unit/formatters/error_inspectors/cookbook_sync_error_inspector_spec.rb +3 -3
- data/spec/unit/formatters/error_inspectors/node_load_error_inspector_spec.rb +3 -4
- data/spec/unit/formatters/error_inspectors/registration_error_inspector_spec.rb +3 -4
- data/spec/unit/formatters/error_inspectors/resource_failure_inspector_spec.rb +4 -6
- data/spec/unit/formatters/error_inspectors/run_list_expansion_error_inspector_spec.rb +5 -7
- data/spec/unit/guard_interpreter/resource_guard_interpreter_spec.rb +11 -11
- data/spec/unit/guard_interpreter_spec.rb +3 -3
- data/spec/unit/handler/json_file_spec.rb +11 -12
- data/spec/unit/handler_spec.rb +94 -7
- data/spec/unit/http/authenticator_spec.rb +9 -7
- data/spec/unit/http/basic_client_spec.rb +28 -85
- data/spec/unit/http/http_request_spec.rb +22 -22
- data/spec/unit/http/json_input_spec.rb +7 -7
- data/spec/unit/http/simple_spec.rb +3 -3
- data/spec/unit/http/socketless_chef_zero_client_spec.rb +3 -4
- data/spec/unit/http/ssl_policies_spec.rb +18 -19
- data/spec/unit/http/validate_content_length_spec.rb +37 -22
- data/spec/unit/http_spec.rb +146 -18
- data/spec/unit/json_compat_spec.rb +18 -10
- data/spec/unit/key_spec.rb +40 -43
- data/spec/unit/knife/bootstrap/chef_vault_handler_spec.rb +43 -44
- data/spec/unit/knife/bootstrap/client_builder_spec.rb +57 -28
- data/spec/unit/knife/bootstrap_spec.rb +229 -46
- data/spec/unit/knife/client_bulk_delete_spec.rb +16 -16
- data/spec/unit/knife/client_create_spec.rb +13 -14
- data/spec/unit/knife/client_delete_spec.rb +14 -14
- data/spec/unit/knife/client_edit_spec.rb +12 -12
- data/spec/unit/knife/client_list_spec.rb +5 -5
- data/spec/unit/knife/client_reregister_spec.rb +13 -13
- data/spec/unit/knife/client_show_spec.rb +12 -12
- data/spec/unit/knife/configure_client_spec.rb +21 -22
- data/spec/unit/knife/configure_spec.rb +37 -39
- data/spec/unit/knife/cookbook_bulk_delete_spec.rb +17 -19
- data/spec/unit/knife/cookbook_create_spec.rb +79 -78
- data/spec/unit/knife/cookbook_delete_spec.rb +79 -79
- data/spec/unit/knife/cookbook_download_spec.rb +84 -85
- data/spec/unit/knife/cookbook_list_spec.rb +26 -26
- data/spec/unit/knife/cookbook_metadata_from_file_spec.rb +5 -5
- data/spec/unit/knife/cookbook_metadata_spec.rb +59 -59
- data/spec/unit/knife/cookbook_show_spec.rb +102 -104
- data/spec/unit/knife/cookbook_site_download_spec.rb +52 -53
- data/spec/unit/knife/cookbook_site_install_spec.rb +17 -12
- data/spec/unit/knife/cookbook_site_share_spec.rb +47 -47
- data/spec/unit/knife/cookbook_site_unshare_spec.rb +20 -20
- data/spec/unit/knife/cookbook_test_spec.rb +8 -8
- data/spec/unit/knife/cookbook_upload_spec.rb +77 -75
- data/spec/unit/knife/core/bootstrap_context_spec.rb +64 -34
- data/spec/unit/knife/core/cookbook_scm_repo_spec.rb +32 -32
- data/spec/unit/knife/core/custom_manifest_loader_spec.rb +41 -0
- data/spec/unit/knife/core/gem_glob_loader_spec.rb +209 -0
- data/spec/unit/knife/core/hashed_command_loader_spec.rb +110 -0
- data/spec/unit/knife/core/node_editor_spec.rb +211 -0
- data/spec/unit/knife/core/object_loader_spec.rb +12 -12
- data/spec/unit/knife/core/subcommand_loader_spec.rb +25 -195
- data/spec/unit/knife/core/ui_spec.rb +92 -54
- data/spec/unit/knife/data_bag_create_spec.rb +14 -14
- data/spec/unit/knife/data_bag_edit_spec.rb +13 -13
- data/spec/unit/knife/data_bag_from_file_spec.rb +13 -12
- data/spec/unit/knife/data_bag_secret_options_spec.rb +6 -6
- data/spec/unit/knife/data_bag_show_spec.rb +22 -21
- data/spec/unit/knife/environment_compare_spec.rb +33 -33
- data/spec/unit/knife/environment_create_spec.rb +3 -3
- data/spec/unit/knife/environment_delete_spec.rb +2 -2
- data/spec/unit/knife/environment_edit_spec.rb +4 -4
- data/spec/unit/knife/environment_from_file_spec.rb +5 -5
- data/spec/unit/knife/environment_list_spec.rb +4 -4
- data/spec/unit/knife/environment_show_spec.rb +2 -2
- data/spec/unit/knife/index_rebuild_spec.rb +14 -17
- data/spec/unit/knife/key_create_spec.rb +27 -28
- data/spec/unit/knife/key_delete_spec.rb +10 -12
- data/spec/unit/knife/key_edit_spec.rb +32 -35
- data/spec/unit/knife/key_helper.rb +2 -2
- data/spec/unit/knife/key_list_spec.rb +19 -19
- data/spec/unit/knife/key_show_spec.rb +15 -15
- data/spec/unit/knife/knife_help.rb +2 -2
- data/spec/unit/knife/node_bulk_delete_spec.rb +10 -13
- data/spec/unit/knife/node_delete_spec.rb +5 -5
- data/spec/unit/knife/node_edit_spec.rb +17 -18
- data/spec/unit/knife/node_environment_set_spec.rb +5 -29
- data/spec/unit/knife/node_from_file_spec.rb +6 -6
- data/spec/unit/knife/node_list_spec.rb +6 -7
- data/spec/unit/knife/node_run_list_add_spec.rb +6 -9
- data/spec/unit/knife/node_run_list_remove_spec.rb +38 -21
- data/spec/unit/knife/node_run_list_set_spec.rb +4 -29
- data/spec/unit/knife/node_show_spec.rb +7 -7
- data/spec/unit/knife/osc_user_create_spec.rb +9 -9
- data/spec/unit/knife/osc_user_delete_spec.rb +7 -7
- data/spec/unit/knife/osc_user_edit_spec.rb +7 -7
- data/spec/unit/knife/osc_user_list_spec.rb +3 -3
- data/spec/unit/knife/osc_user_reregister_spec.rb +10 -10
- data/spec/unit/knife/osc_user_show_spec.rb +8 -8
- data/spec/unit/knife/raw_spec.rb +6 -6
- data/spec/unit/knife/role_bulk_delete_spec.rb +5 -5
- data/spec/unit/knife/role_create_spec.rb +6 -6
- data/spec/unit/knife/role_delete_spec.rb +5 -5
- data/spec/unit/knife/role_edit_spec.rb +7 -9
- data/spec/unit/knife/role_env_run_list_add_spec.rb +10 -10
- data/spec/unit/knife/role_env_run_list_clear_spec.rb +40 -46
- data/spec/unit/knife/role_env_run_list_remove_spec.rb +47 -53
- data/spec/unit/knife/role_env_run_list_replace_spec.rb +50 -53
- data/spec/unit/knife/role_env_run_list_set_spec.rb +18 -21
- data/spec/unit/knife/role_from_file_spec.rb +8 -8
- data/spec/unit/knife/role_list_spec.rb +6 -8
- data/spec/unit/knife/role_run_list_add_spec.rb +8 -8
- data/spec/unit/knife/role_run_list_clear_spec.rb +29 -35
- data/spec/unit/knife/role_run_list_remove_spec.rb +37 -43
- data/spec/unit/knife/role_run_list_replace_spec.rb +43 -46
- data/spec/unit/knife/role_run_list_set_spec.rb +7 -10
- data/spec/unit/knife/role_show_spec.rb +14 -14
- data/spec/unit/knife/ssh_spec.rb +54 -36
- data/spec/unit/knife/ssl_check_spec.rb +34 -10
- data/spec/unit/knife/ssl_fetch_spec.rb +48 -10
- data/spec/unit/knife/status_spec.rb +19 -18
- data/spec/unit/knife/tag_create_spec.rb +1 -1
- data/spec/unit/knife/tag_delete_spec.rb +2 -2
- data/spec/unit/knife/tag_list_spec.rb +2 -2
- data/spec/unit/knife/user_create_spec.rb +35 -35
- data/spec/unit/knife/user_delete_spec.rb +11 -11
- data/spec/unit/knife/user_edit_spec.rb +10 -10
- data/spec/unit/knife/user_list_spec.rb +3 -3
- data/spec/unit/knife/user_reregister_spec.rb +13 -13
- data/spec/unit/knife/user_show_spec.rb +12 -12
- data/spec/unit/knife_spec.rb +126 -63
- data/spec/unit/lib_backcompat_spec.rb +34 -0
- data/spec/unit/log/syslog_spec.rb +3 -3
- data/spec/unit/log/winevt_spec.rb +3 -3
- data/spec/unit/log_spec.rb +5 -5
- data/spec/unit/lwrp_spec.rb +103 -47
- data/spec/unit/mash_spec.rb +8 -8
- data/spec/unit/mixin/api_version_request_handling_spec.rb +15 -16
- data/spec/unit/mixin/checksum_spec.rb +19 -6
- data/spec/unit/mixin/command_spec.rb +17 -14
- data/spec/unit/mixin/convert_to_class_name_spec.rb +2 -2
- data/spec/unit/mixin/deep_merge_spec.rb +107 -107
- data/spec/unit/mixin/deprecation_spec.rb +6 -6
- data/spec/unit/mixin/enforce_ownership_and_permissions_spec.rb +15 -15
- data/spec/unit/mixin/homebrew_user_spec.rb +15 -15
- data/spec/unit/mixin/lazy_module_include.rb +71 -0
- data/spec/unit/mixin/params_validate_spec.rb +140 -137
- data/spec/unit/mixin/path_sanity_spec.rb +22 -16
- data/spec/unit/mixin/powershell_out_spec.rb +32 -8
- data/spec/unit/mixin/powershell_type_coercions_spec.rb +35 -24
- data/spec/unit/mixin/properties_spec.rb +97 -0
- data/spec/unit/mixin/proxified_socket_spec.rb +97 -0
- data/spec/unit/mixin/securable_spec.rb +37 -37
- data/spec/unit/mixin/shell_out_spec.rb +67 -63
- data/spec/unit/mixin/subclass_directive_spec.rb +45 -0
- data/spec/unit/mixin/template_spec.rb +20 -13
- data/spec/unit/mixin/unformatter_spec.rb +3 -3
- data/spec/unit/mixin/uris_spec.rb +8 -8
- data/spec/unit/mixin/windows_architecture_helper_spec.rb +22 -20
- data/spec/unit/mixin/xml_escape_spec.rb +6 -6
- data/spec/unit/monkey_patches/uri_spec.rb +3 -3
- data/spec/unit/monologger_spec.rb +4 -4
- data/spec/unit/node/attribute_spec.rb +284 -264
- data/spec/unit/node/immutable_collections_spec.rb +25 -22
- data/spec/unit/node/vivid_mash_spec.rb +342 -0
- data/spec/unit/node_map_spec.rb +5 -5
- data/spec/unit/node_spec.rb +644 -136
- data/spec/unit/org_spec.rb +17 -17
- data/spec/unit/platform/query_helpers_spec.rb +153 -10
- data/spec/unit/platform_spec.rb +11 -11
- data/spec/unit/policy_builder/dynamic_spec.rb +273 -0
- data/spec/unit/policy_builder/expand_node_object_spec.rb +53 -52
- data/spec/unit/policy_builder/policyfile_spec.rb +295 -80
- data/spec/unit/policy_builder_spec.rb +4 -4
- data/spec/unit/property/state_spec.rb +508 -0
- data/spec/unit/property/validation_spec.rb +720 -0
- data/spec/unit/property_spec.rb +1227 -0
- data/spec/unit/provider/apt_repository_spec.rb +183 -0
- data/spec/unit/provider/apt_update_spec.rb +114 -0
- data/spec/unit/provider/breakpoint_spec.rb +2 -3
- data/spec/unit/provider/cookbook_file/content_spec.rb +9 -10
- data/spec/unit/provider/cookbook_file_spec.rb +15 -15
- data/spec/unit/provider/cron/unix_spec.rb +11 -11
- data/spec/unit/provider/cron_spec.rb +85 -85
- data/spec/unit/provider/deploy/revision_spec.rb +6 -7
- data/spec/unit/provider/deploy/timestamped_spec.rb +2 -2
- data/spec/unit/provider/deploy_spec.rb +37 -38
- data/spec/unit/provider/directory_spec.rb +51 -13
- data/spec/unit/provider/dsc_resource_spec.rb +121 -37
- data/spec/unit/provider/dsc_script_spec.rb +56 -57
- data/spec/unit/provider/env/windows_spec.rb +27 -27
- data/spec/unit/provider/env_spec.rb +5 -5
- data/spec/unit/provider/erl_call_spec.rb +3 -4
- data/spec/unit/provider/execute_spec.rb +100 -33
- data/spec/unit/provider/file/content_spec.rb +14 -14
- data/spec/unit/provider/file_spec.rb +12 -13
- data/spec/unit/provider/git_spec.rb +132 -74
- data/spec/unit/provider/group/dscl_spec.rb +9 -9
- data/spec/unit/provider/group/gpasswd_spec.rb +3 -3
- data/spec/unit/provider/group/groupadd_spec.rb +121 -102
- data/spec/unit/provider/group/groupmod_spec.rb +12 -12
- data/spec/unit/provider/group/pw_spec.rb +7 -7
- data/spec/unit/provider/group/suse_spec.rb +90 -0
- data/spec/unit/provider/group/usermod_spec.rb +8 -8
- data/spec/unit/provider/group/windows_spec.rb +13 -5
- data/spec/unit/provider/group_spec.rb +16 -16
- data/spec/unit/provider/http_request_spec.rb +7 -7
- data/spec/unit/provider/ifconfig/aix_spec.rb +4 -5
- data/spec/unit/provider/ifconfig/debian_spec.rb +6 -6
- data/spec/unit/provider/ifconfig/redhat_spec.rb +3 -3
- data/spec/unit/provider/ifconfig_spec.rb +27 -7
- data/spec/unit/provider/launchd_spec.rb +190 -0
- data/spec/unit/provider/link_spec.rb +167 -12
- data/spec/unit/provider/log_spec.rb +16 -2
- data/spec/unit/provider/mdadm_spec.rb +21 -12
- data/spec/unit/provider/mount/aix_spec.rb +7 -7
- data/spec/unit/provider/mount/mount_spec.rb +26 -26
- data/spec/unit/provider/mount/solaris_spec.rb +75 -75
- data/spec/unit/provider/mount/windows_spec.rb +17 -5
- data/spec/unit/provider/mount_spec.rb +7 -16
- data/spec/unit/provider/ohai_spec.rb +14 -14
- data/spec/unit/provider/osx_profile_spec.rb +255 -0
- data/spec/unit/provider/package/aix_spec.rb +18 -5
- data/spec/unit/provider/package/apt_spec.rb +135 -50
- data/spec/unit/provider/package/cab_spec.rb +218 -0
- data/spec/unit/provider/package/chocolatey_spec.rb +489 -0
- data/spec/unit/provider/package/dpkg_spec.rb +194 -102
- data/spec/unit/provider/package/easy_install_spec.rb +17 -15
- data/spec/unit/provider/package/freebsd/pkg_spec.rb +10 -10
- data/spec/unit/provider/package/freebsd/pkgng_spec.rb +12 -19
- data/spec/unit/provider/package/freebsd/port_spec.rb +16 -23
- data/spec/unit/provider/package/homebrew_spec.rb +139 -139
- data/spec/unit/provider/package/ips_spec.rb +10 -11
- data/spec/unit/provider/package/macports_spec.rb +3 -3
- data/spec/unit/provider/package/openbsd_spec.rb +38 -38
- data/spec/unit/provider/package/pacman_spec.rb +8 -9
- data/spec/unit/provider/package/paludis_spec.rb +9 -10
- data/spec/unit/provider/package/portage_spec.rb +8 -2
- data/spec/unit/provider/package/rpm_spec.rb +25 -12
- data/spec/unit/provider/package/rubygems_spec.rb +461 -304
- data/spec/unit/provider/package/smartos_spec.rb +8 -10
- data/spec/unit/provider/package/solaris_spec.rb +4 -4
- data/spec/unit/provider/package/windows/exe_spec.rb +201 -0
- data/spec/unit/provider/package/windows/msi_spec.rb +108 -15
- data/spec/unit/provider/package/windows_spec.rb +313 -36
- data/spec/unit/provider/package/yum/yum_cache_spec.rb +27 -0
- data/spec/unit/provider/package/yum_spec.rb +351 -255
- data/spec/unit/provider/package/zypper_spec.rb +132 -49
- data/spec/unit/provider/package_spec.rb +572 -372
- data/spec/unit/provider/powershell_script_spec.rb +106 -0
- data/spec/unit/provider/registry_key_spec.rb +144 -20
- data/spec/unit/provider/remote_directory_spec.rb +63 -49
- data/spec/unit/provider/remote_file/cache_control_data_spec.rb +70 -45
- data/spec/unit/provider/remote_file/content_spec.rb +7 -7
- data/spec/unit/provider/remote_file/fetcher_spec.rb +3 -3
- data/spec/unit/provider/remote_file/ftp_spec.rb +8 -10
- data/spec/unit/provider/remote_file/http_spec.rb +31 -12
- data/spec/unit/provider/remote_file/local_file_spec.rb +6 -4
- data/spec/unit/provider/remote_file/network_file_spec.rb +2 -2
- data/spec/unit/provider/remote_file/sftp_spec.rb +150 -0
- data/spec/unit/provider/remote_file_spec.rb +13 -15
- data/spec/unit/provider/route_spec.rb +27 -28
- data/spec/unit/provider/ruby_block_spec.rb +4 -5
- data/spec/unit/provider/script_spec.rb +17 -17
- data/spec/unit/provider/service/aix_service_spec.rb +8 -9
- data/spec/unit/provider/service/aixinit_service_spec.rb +26 -23
- data/spec/unit/provider/service/arch_service_spec.rb +15 -15
- data/spec/unit/provider/service/debian_service_spec.rb +41 -41
- data/spec/unit/provider/service/freebsd_service_spec.rb +26 -22
- data/spec/unit/provider/service/gentoo_service_spec.rb +7 -7
- data/spec/unit/provider/service/init_service_spec.rb +9 -9
- data/spec/unit/provider/service/insserv_service_spec.rb +3 -3
- data/spec/unit/provider/service/invokercd_service_spec.rb +9 -9
- data/spec/unit/provider/service/macosx_spec.rb +29 -29
- data/spec/unit/provider/service/openbsd_service_spec.rb +51 -45
- data/spec/unit/provider/service/redhat_spec.rb +115 -21
- data/spec/unit/provider/service/simple_service_spec.rb +5 -5
- data/spec/unit/provider/service/solaris_smf_service_spec.rb +115 -44
- data/spec/unit/provider/service/systemd_service_spec.rb +123 -32
- data/spec/unit/provider/service/upstart_service_spec.rb +77 -32
- data/spec/unit/provider/service/windows_spec.rb +242 -240
- data/spec/unit/provider/service_spec.rb +2 -3
- data/spec/unit/provider/subversion_spec.rb +140 -68
- data/spec/unit/provider/systemd_unit_spec.rb +885 -0
- data/spec/unit/provider/template/content_spec.rb +104 -13
- data/spec/unit/provider/template_spec.rb +23 -24
- data/spec/unit/provider/user/dscl_spec.rb +114 -96
- data/spec/unit/provider/user/linux_spec.rb +106 -0
- data/spec/unit/provider/user/pw_spec.rb +17 -18
- data/spec/unit/provider/user/solaris_spec.rb +126 -28
- data/spec/unit/provider/user/windows_spec.rb +14 -14
- data/spec/unit/provider/user_spec.rb +36 -22
- data/spec/unit/provider/whyrun_safe_ruby_block_spec.rb +3 -4
- data/spec/unit/provider/yum_repository_spec.rb +35 -0
- data/spec/unit/provider_resolver_spec.rb +772 -696
- data/spec/unit/provider_spec.rb +8 -11
- data/spec/unit/pure_application_spec.rb +3 -3
- data/spec/unit/recipe_spec.rb +95 -49
- data/spec/unit/resource/apt_package_spec.rb +5 -5
- data/spec/unit/resource/apt_repository_spec.rb +50 -0
- data/spec/unit/resource/apt_update_spec.rb +58 -0
- data/spec/unit/resource/bash_spec.rb +3 -3
- data/spec/unit/resource/batch_spec.rb +5 -5
- data/spec/unit/resource/breakpoint_spec.rb +4 -4
- data/spec/unit/resource/cab_package_spec.rb +38 -0
- data/spec/unit/resource/chef_gem_spec.rb +9 -13
- data/spec/unit/resource/chocolatey_package_spec.rb +67 -0
- data/spec/unit/resource/conditional_action_not_nothing_spec.rb +2 -2
- data/spec/unit/resource/conditional_spec.rb +58 -12
- data/spec/unit/resource/cookbook_file_spec.rb +23 -24
- data/spec/unit/resource/cron_spec.rb +8 -8
- data/spec/unit/resource/csh_spec.rb +3 -3
- data/spec/unit/resource/deploy_revision_spec.rb +5 -5
- data/spec/unit/resource/deploy_spec.rb +31 -26
- data/spec/unit/resource/directory_spec.rb +4 -4
- data/spec/unit/resource/dpkg_package_spec.rb +5 -5
- data/spec/unit/resource/dsc_resource_spec.rb +32 -21
- data/spec/unit/resource/dsc_script_spec.rb +23 -19
- data/spec/unit/resource/easy_install_package_spec.rb +4 -4
- data/spec/unit/resource/env_spec.rb +5 -5
- data/spec/unit/resource/erl_call_spec.rb +3 -3
- data/spec/unit/resource/execute_spec.rb +4 -4
- data/spec/unit/resource/file/verification_spec.rb +40 -12
- data/spec/unit/resource/file_spec.rb +10 -10
- data/spec/unit/resource/freebsd_package_spec.rb +12 -15
- data/spec/unit/resource/gem_package_spec.rb +5 -5
- data/spec/unit/resource/git_spec.rb +4 -4
- data/spec/unit/resource/group_spec.rb +13 -8
- data/spec/unit/resource/homebrew_package_spec.rb +14 -14
- data/spec/unit/resource/http_request_spec.rb +5 -5
- data/spec/unit/resource/ifconfig_spec.rb +9 -9
- data/spec/unit/resource/ips_package_spec.rb +5 -5
- data/spec/unit/resource/ksh_spec.rb +40 -0
- data/spec/unit/resource/launchd_spec.rb +32 -0
- data/spec/unit/resource/link_spec.rb +6 -6
- data/spec/unit/resource/log_spec.rb +3 -3
- data/spec/unit/resource/macports_package_spec.rb +4 -4
- data/spec/unit/resource/mdadm_spec.rb +12 -7
- data/spec/unit/resource/mount_spec.rb +10 -10
- data/spec/unit/resource/ohai_spec.rb +2 -3
- data/spec/unit/resource/openbsd_package_spec.rb +5 -6
- data/spec/unit/resource/osx_profile_spec.rb +62 -0
- data/spec/unit/resource/package_spec.rb +6 -6
- data/spec/unit/resource/pacman_package_spec.rb +4 -4
- data/spec/unit/resource/perl_spec.rb +3 -3
- data/spec/unit/resource/portage_package_spec.rb +2 -2
- data/spec/unit/resource/{powershell_spec.rb → powershell_script_spec.rb} +31 -27
- data/spec/unit/resource/python_spec.rb +3 -3
- data/spec/unit/resource/registry_key_spec.rb +44 -28
- data/spec/unit/resource/remote_directory_spec.rb +3 -3
- data/spec/unit/resource/remote_file_spec.rb +21 -21
- data/spec/unit/resource/resource_notification_spec.rb +47 -48
- data/spec/unit/resource/route_spec.rb +3 -3
- data/spec/unit/resource/rpm_package_spec.rb +3 -3
- data/spec/unit/resource/ruby_block_spec.rb +4 -4
- data/spec/unit/resource/ruby_spec.rb +3 -3
- data/spec/unit/resource/scm_spec.rb +8 -8
- data/spec/unit/resource/script_spec.rb +4 -4
- data/spec/unit/resource/service_spec.rb +20 -21
- data/spec/unit/resource/smartos_package_spec.rb +4 -4
- data/spec/unit/resource/solaris_package_spec.rb +4 -4
- data/spec/unit/resource/subversion_spec.rb +10 -6
- data/spec/unit/resource/systemd_unit_spec.rb +133 -0
- data/spec/unit/resource/template_spec.rb +7 -8
- data/spec/unit/resource/timestamped_deploy_spec.rb +4 -4
- data/spec/unit/resource/user_spec.rb +5 -5
- data/spec/unit/resource/windows_package_spec.rb +6 -6
- data/spec/unit/resource/windows_service_spec.rb +2 -2
- data/spec/unit/resource/yum_package_spec.rb +15 -6
- data/spec/unit/resource/yum_repository_spec.rb +49 -0
- data/spec/unit/resource_collection/resource_list_spec.rb +7 -7
- data/spec/unit/resource_collection/resource_set_spec.rb +9 -9
- data/spec/unit/resource_collection/stepable_iterator_spec.rb +6 -6
- data/spec/unit/resource_collection_spec.rb +113 -14
- data/spec/unit/resource_definition_spec.rb +14 -14
- data/spec/unit/resource_reporter_spec.rb +65 -66
- data/spec/unit/resource_resolver_spec.rb +11 -12
- data/spec/unit/resource_spec.rb +344 -289
- data/spec/unit/rest/auth_credentials_spec.rb +101 -137
- data/spec/unit/rest_spec.rb +97 -91
- data/spec/unit/role_spec.rb +67 -71
- data/spec/unit/run_context/child_run_context_spec.rb +133 -0
- data/spec/unit/run_context/cookbook_compiler_spec.rb +48 -8
- data/spec/unit/run_context_spec.rb +25 -18
- data/spec/unit/run_list/run_list_expansion_spec.rb +37 -22
- data/spec/unit/run_list/run_list_item_spec.rb +28 -28
- data/spec/unit/run_list/versioned_recipe_list_spec.rb +31 -27
- data/spec/unit/run_list_spec.rb +38 -42
- data/spec/unit/run_lock_spec.rb +10 -10
- data/spec/unit/run_status_spec.rb +4 -5
- data/spec/unit/runner_spec.rb +9 -9
- data/spec/unit/scan_access_control_spec.rb +4 -5
- data/spec/unit/search/query_spec.rb +87 -64
- data/spec/unit/server_api_spec.rb +50 -0
- data/spec/unit/shell/model_wrapper_spec.rb +12 -13
- data/spec/unit/shell/shell_ext_spec.rb +5 -5
- data/spec/unit/shell/shell_session_spec.rb +9 -10
- data/spec/unit/shell_out_spec.rb +1 -1
- data/spec/unit/shell_spec.rb +9 -9
- data/spec/unit/user_spec.rb +14 -15
- data/spec/unit/user_v1_spec.rb +29 -30
- data/spec/unit/util/backup_spec.rb +17 -18
- data/spec/unit/util/diff_spec.rb +10 -13
- data/spec/unit/util/dsc/configuration_generator_spec.rb +60 -60
- data/spec/unit/util/dsc/lcm_output_parser_spec.rb +30 -30
- data/spec/unit/util/dsc/local_configuration_manager_spec.rb +52 -44
- data/spec/unit/util/dsc/resource_store.rb +30 -28
- data/spec/unit/util/editor_spec.rb +71 -71
- data/spec/unit/util/file_edit_spec.rb +7 -7
- data/spec/unit/util/powershell/cmdlet_spec.rb +37 -37
- data/spec/unit/util/powershell/ps_credential_spec.rb +17 -10
- data/spec/unit/util/selinux_spec.rb +8 -9
- data/spec/unit/util/threaded_job_queue_spec.rb +2 -2
- data/spec/unit/version/platform_spec.rb +5 -6
- data/spec/unit/version_class_spec.rb +8 -9
- data/spec/unit/version_constraint/platform_spec.rb +3 -4
- data/spec/unit/version_constraint_spec.rb +19 -19
- data/spec/unit/win32/registry_spec.rb +394 -0
- data/spec/unit/windows_service_spec.rb +85 -40
- data/tasks/bin/bundle-platform +20 -0
- data/tasks/bin/bundle-platform.bat +2 -0
- data/tasks/bin/bundler_patch.rb +27 -0
- data/tasks/bin/create-override-gemfile +110 -0
- data/tasks/bin/gem-version-diff +37 -0
- data/tasks/bin/run_external_test +47 -0
- data/tasks/bundle.rb +97 -0
- data/tasks/bundle_util.rb +110 -0
- data/tasks/cbgb.rb +84 -0
- data/tasks/changelog.rb +13 -0
- data/tasks/dependencies.rb +135 -0
- data/tasks/gemfile_util.rb +390 -0
- data/tasks/maintainers.rb +162 -20
- data/tasks/rspec.rb +20 -16
- metadata +542 -129
- data/lib/chef/chef_fs/file_system/acl_dir.rb +0 -64
- data/lib/chef/chef_fs/file_system/acl_entry.rb +0 -58
- data/lib/chef/chef_fs/file_system/acls_dir.rb +0 -68
- data/lib/chef/chef_fs/file_system/chef_repository_file_system_acls_dir.rb +0 -37
- data/lib/chef/chef_fs/file_system/chef_repository_file_system_cookbook_dir.rb +0 -109
- data/lib/chef/chef_fs/file_system/chef_repository_file_system_cookbook_entry.rb +0 -87
- data/lib/chef/chef_fs/file_system/chef_repository_file_system_cookbooks_dir.rb +0 -89
- data/lib/chef/chef_fs/file_system/chef_repository_file_system_entry.rb +0 -92
- data/lib/chef/chef_fs/file_system/chef_repository_file_system_root_dir.rb +0 -192
- data/lib/chef/chef_fs/file_system/chef_server_root_dir.rb +0 -159
- data/lib/chef/chef_fs/file_system/cookbook_dir.rb +0 -224
- data/lib/chef/chef_fs/file_system/cookbook_file.rb +0 -82
- data/lib/chef/chef_fs/file_system/cookbook_subdir.rb +0 -54
- data/lib/chef/chef_fs/file_system/cookbooks_acl_dir.rb +0 -41
- data/lib/chef/chef_fs/file_system/cookbooks_dir.rb +0 -164
- data/lib/chef/chef_fs/file_system/data_bag_dir.rb +0 -69
- data/lib/chef/chef_fs/file_system/data_bags_dir.rb +0 -73
- data/lib/chef/chef_fs/file_system/environments_dir.rb +0 -60
- data/lib/chef/chef_fs/file_system/file_system_entry.rb +0 -108
- data/lib/chef/chef_fs/file_system/memory_dir.rb +0 -52
- data/lib/chef/chef_fs/file_system/memory_file.rb +0 -17
- data/lib/chef/chef_fs/file_system/memory_root.rb +0 -21
- data/lib/chef/chef_fs/file_system/must_delete_recursively_error.rb +0 -31
- data/lib/chef/chef_fs/file_system/nodes_dir.rb +0 -55
- data/lib/chef/chef_fs/file_system/org_entry.rb +0 -34
- data/lib/chef/chef_fs/file_system/organization_invites_entry.rb +0 -59
- data/lib/chef/chef_fs/file_system/organization_members_entry.rb +0 -58
- data/lib/chef/chef_fs/file_system/rest_list_dir.rb +0 -115
- data/lib/chef/chef_fs/file_system/rest_list_entry.rb +0 -185
- data/lib/chef/knife/bootstrap/templates/archlinux-gems.erb +0 -76
- data/lib/chef/knife/bootstrap/templates/chef-aix.erb +0 -72
- data/spec/support/pedant/Gemfile +0 -3
- data/spec/support/pedant/pedant_config.rb +0 -129
- data/spec/support/pedant/run_pedant.rb +0 -63
- data/spec/support/pedant/stickywicket.pem +0 -27
- data/spec/unit/provider/powershell_spec.rb +0 -80
- data/spec/unit/provider/user/useradd_spec.rb +0 -51
- data/spec/unit/registry_helper_spec.rb +0 -376
- data/spec/unit/workstation_config_loader_spec.rb +0 -283
- data/tasks/external_tests.rb +0 -29
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 340c1cbda2004926c5f046f561e56586829a141c
|
4
|
+
data.tar.gz: efed35187da59fd2a49ea092312be922d11f90db
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f0e9083844b5a3553acf79a476daab28277cbd3ef1f4d7da0354d88bf28afbe98e967e3470e5967ccaf5139864d11a9fffd58f3a3d733c07b81e8dbc6c7d11d
|
7
|
+
data.tar.gz: c97b133f8aa935250e57a66ef73af2288563547dcfec3cc9031531c0f2205ee52fbc8d8091e3b2d57dc9825f852cb7f7ff4e8332b1c733aae8b4ae3d0ecc7a68
|
data/CONTRIBUTING.md
CHANGED
@@ -1,212 +1,151 @@
|
|
1
|
-
# Contributing to Chef
|
1
|
+
# Contributing to Chef Projects
|
2
2
|
|
3
|
-
We
|
3
|
+
We're glad you want to contribute to a Chef project! This document will help answer common questions you may have during your first contribution.
|
4
4
|
|
5
|
-
|
5
|
+
## Submitting Issues
|
6
6
|
|
7
|
-
|
8
|
-
2. Adding features or fixing bugs yourself and contributing your code to Chef.
|
7
|
+
Not every contribution comes in the form of code. Submitting, confirming, and triaging issues is an important task for any project. At Chef we use Github to track all project issues.
|
9
8
|
|
10
|
-
|
11
|
-
|
12
|
-
We have a 3 step process that utilizes **Github Issues**:
|
13
|
-
|
14
|
-
1. Sign or be added to an existing [Contributor License Agreement (CLA)](https://supermarket.getchef.com/become-a-contributor).
|
15
|
-
2. Create a Github Pull Request.
|
16
|
-
3. Do [Code Review](#cr) with the **Chef Engineering Team** or **Chef Core Committers** on the pull request.
|
17
|
-
|
18
|
-
### <a name="pulls"></a> Chef Pull Requests
|
19
|
-
|
20
|
-
Chef is built to last. We strive to ensure high quality throughout the Chef experience. In order to ensure
|
21
|
-
this, we require a couple of things for all pull requests to Chef:
|
22
|
-
|
23
|
-
1. **Tests:** To ensure high quality code and protect against future regressions, we require all the
|
24
|
-
code in Chef to have at least unit test coverage. See the [spec/unit](https://github.com/opscode/chef/tree/master/spec/unit)
|
25
|
-
directory for the existing tests and use ```bundle exec rake spec``` to run them.
|
26
|
-
2. **Green Travis Run:** We use [Travis CI](https://travis-ci.org/) in order to run our tests
|
27
|
-
continuously on all the pull requests. We require the Travis runs to succeed on every pull
|
28
|
-
request before being merged.
|
29
|
-
|
30
|
-
In addition to this it would be nice to include the description of the problem you are solving
|
31
|
-
with your change. You can use [Chef Issue Template](#issuetemplate) in the description section
|
32
|
-
of the pull request.
|
33
|
-
|
34
|
-
### <a name="cr"></a> Chef Code Review Process
|
9
|
+
If you are familiar with Chef and know the component, that is causing you a problem, you can file an issue in the corresponding Github project. All of our Open Source Software can be found in our [Github organization](https://github.com/chef/). All projects include Github issue templates to help gather information needed for a thorough review.
|
35
10
|
|
36
|
-
|
37
|
-
[this article](https://help.github.com/articles/using-pull-requests) if you're not
|
38
|
-
familiar with Github Pull Requests.
|
11
|
+
We ask you not to submit security concerns via Github. For details on submitting potential security issues please see <https://www.chef.io/security/>
|
39
12
|
|
40
|
-
|
41
|
-
and respond to you with any feedback they might have. The process at this point is as follows:
|
13
|
+
In addition to Github issues, we also utilize a feedback site that helps our product team track and rank feature requests. If you have a feature request, this is an excellent place to start <https://feedback.chef.io>
|
42
14
|
|
43
|
-
|
44
|
-
2. When ready, your pull request will be tagged with label `Ready For Merge`.
|
45
|
-
3. Your patch will be merged into `master` including necessary documentation updates
|
46
|
-
and you will be included in `CHANGELOG.md`. Our goal is to have patches merged in 2 weeks
|
47
|
-
after they are marked to be merged.
|
15
|
+
## Contribution Process
|
48
16
|
|
49
|
-
|
50
|
-
[Chef Release Process](#release).
|
17
|
+
We have a 3 step process for contributions:
|
51
18
|
|
52
|
-
|
19
|
+
1. Commit changes to a git branch, making sure to sign-off those changes for the [Developer Certificate of Origin](#developer-certification-of-origin-dco).
|
20
|
+
2. Create a Github Pull Request for your change, following the instructions in the pull request template.
|
21
|
+
3. Perform a [Code Review](#code-review-process) with the project maintainers on the pull request.
|
53
22
|
|
54
|
-
|
55
|
-
ask questions about contributing, or just hang out with Chef Software employees. The regularly scheduled Chef hangouts occur on Mondays and Wednesdays at 3pm Eastern / Noon Pacific.
|
23
|
+
### Pull Request Requirements
|
56
24
|
|
57
|
-
|
58
|
-
and posted in the #chef IRC channel on irc.freenode.net when the hangout is about to start.
|
25
|
+
Chef Projects are built to last. We strive to ensure high quality throughout the experience. In order to ensure this, we require that all pull requests to Chef projects meet these specifications:
|
59
26
|
|
60
|
-
|
27
|
+
1. **Tests:** To ensure high quality code and protect against future regressions, we require all the code in Chef Projects to have at least unit test coverage. We use [RSpec](http://rspec.info/) for unit testing.
|
28
|
+
2. **Green CI Tests:** We use [Travis CI](https://travis-ci.org/) and/or [AppVeyor](https://www.appveyor.com/) CI systems to test all pull requests. We require these test runs to succeed on every pull request before being merged.
|
61
29
|
|
62
|
-
###
|
63
|
-
Licensing is very important to open source projects. It helps ensure the
|
64
|
-
software continues to be available under the terms that the author desired.
|
30
|
+
### Code Review Process
|
65
31
|
|
66
|
-
|
67
|
-
to strike a balance between open contribution and allowing you to use the
|
68
|
-
software however you would like to.
|
32
|
+
Code review takes place in Github pull requests. See [this article](https://help.github.com/articles/about-pull-requests/) if you're not familiar with Github Pull Requests.
|
69
33
|
|
70
|
-
|
71
|
-
It is important that the contributor fully understands what rights they are
|
72
|
-
licensing and agrees to them. Sometimes the copyright holder isn't the contributor,
|
73
|
-
most often when the contributor is doing work for a company.
|
34
|
+
Once you open a pull request, project maintainers will review your code and respond to your pull request with any feedback they might have. The process at this point is as follows:
|
74
35
|
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
prevent the inclusion of works in the projects that the contributor does not hold the rights
|
79
|
-
to share.
|
36
|
+
1. Two thumbs-up (:+1:) are required from project maintainers. See the master maintainers document for Chef projects at <https://github.com/chef/chef/blob/master/MAINTAINERS.md>.
|
37
|
+
2. When ready, your pull request will be tagged with label `Ready For Merge`.
|
38
|
+
3. Your change will be merged into the project's `master` branch and will be noted in the project's `CHANGELOG.md` at the time of release.
|
80
39
|
|
81
|
-
|
40
|
+
If you would like to learn about when your code will be available in a release of Chef, read more about [Chef Release Cycles](#release-cycles).
|
82
41
|
|
83
|
-
|
84
|
-
[Individual CLA](https://supermarket.getchef.com/icla-signatures/new) online.
|
85
|
-
If you're contributing on behalf of your employer and they retain the copyright for your works,
|
86
|
-
have your employer fill out our
|
87
|
-
[Corporate CLA](https://supermarket.getchef.com/ccla-signatures/new) instead.
|
42
|
+
### Developer Certification of Origin (DCO)
|
88
43
|
|
89
|
-
|
44
|
+
Licensing is very important to open source projects. It helps ensure the software continues to be available under the terms that the author desired.
|
90
45
|
|
91
|
-
|
92
|
-
to not be considered intellectual property, can be submitted by a contributor as a patch,
|
93
|
-
without a CLA.
|
46
|
+
Chef uses [the Apache 2.0 license](https://github.com/chef/chef/blob/master/LICENSE) to strike a balance between open contribution and allowing you to use the software however you would like to.
|
94
47
|
|
95
|
-
|
96
|
-
or creative thinking. As long as the change does not affect functionality, some likely
|
97
|
-
examples include the following:
|
48
|
+
The license tells you what rights you have that are provided by the copyright holder. It is important that the contributor fully understands what rights they are licensing and agrees to them. Sometimes the copyright holder isn't the contributor, such as when the contributor is doing work on behalf of a company.
|
98
49
|
|
99
|
-
|
100
|
-
* Typo correction, white space and formatting changes
|
101
|
-
* Comment clean up
|
102
|
-
* Bug fixes that change default return values or error codes stored in constants
|
103
|
-
* Adding logging messages or debugging output
|
104
|
-
* Changes to ‘metadata’ files like Gemfile, .gitignore, build scripts, etc.
|
105
|
-
* Moving source files from one directory or package to another
|
50
|
+
To make a good faith effort to ensure these criteria are met, Chef requires the Developer Certificate of Origin (DCO) process to be followed.
|
106
51
|
|
107
|
-
|
52
|
+
The DCO is an attestation attached to every contribution made by every developer. In the commit message of the contribution, the developer simply adds a Signed-off-by statement and thereby agrees to the DCO, which you can find below or at <http://developercertificate.org/>.
|
108
53
|
|
109
54
|
```
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
55
|
+
Developer's Certificate of Origin 1.1
|
56
|
+
|
57
|
+
By making a contribution to this project, I certify that:
|
58
|
+
|
59
|
+
(a) The contribution was created in whole or in part by me and I
|
60
|
+
have the right to submit it under the open source license
|
61
|
+
indicated in the file; or
|
62
|
+
|
63
|
+
(b) The contribution is based upon previous work that, to the
|
64
|
+
best of my knowledge, is covered under an appropriate open
|
65
|
+
source license and I have the right under that license to
|
66
|
+
submit that work with modifications, whether created in whole
|
67
|
+
or in part by me, under the same open source license (unless
|
68
|
+
I am permitted to submit under a different license), as
|
69
|
+
Indicated in the file; or
|
70
|
+
|
71
|
+
(c) The contribution was provided directly to me by some other
|
72
|
+
person who certified (a), (b) or (c) and I have not modified
|
73
|
+
it.
|
74
|
+
|
75
|
+
(d) I understand and agree that this project and the contribution
|
76
|
+
are public and that a record of the contribution (including
|
77
|
+
all personal information I submit with it, including my
|
78
|
+
sign-off) is maintained indefinitely and may be redistributed
|
79
|
+
consistent with this project or the open source license(s)
|
80
|
+
involved.
|
120
81
|
```
|
121
82
|
|
122
|
-
|
123
|
-
|
124
|
-
Chef Issue Tracking is handled using Github Issues.
|
83
|
+
For more information on the change see the Chef Blog post [Introducing Developer Certificate of Origin](https://blog.chef.io/2016/09/19/introducing-developer-certificate-of-origin/)
|
125
84
|
|
126
|
-
|
127
|
-
have a feature request on a specific component you can file an issue in the corresponding
|
128
|
-
Github project. All of our Open Source Software can be found in our
|
129
|
-
[Github organization](https://github.com/opscode/).
|
85
|
+
#### DCO Sign-Off Methods
|
130
86
|
|
131
|
-
|
132
|
-
found in the Chef docs in the [community contributions section](https://docs.chef.io/community_contributions.html#issues-and-bug-reports).
|
87
|
+
The DCO requires a sign-off message in the following format appear on each commit in the pull request:
|
133
88
|
|
134
|
-
Otherwise you can file your issue in the [Chef project](https://github.com/opscode/chef/issues)
|
135
|
-
and we will make sure it gets filed against the appropriate project.
|
136
|
-
|
137
|
-
In order to decrease the back and forth an issues and help us get to the bottom of them quickly
|
138
|
-
we use below issue template. You can copy paste this code into the issue you are opening and
|
139
|
-
edit it accordingly.
|
140
|
-
|
141
|
-
<a name="issuetemplate"></a>
|
142
89
|
```
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
### Environment: [Details about the environment such as the Operating System, cookbook details, etc...]
|
147
|
-
|
148
|
-
### Scenario:
|
149
|
-
[What you are trying to achieve and you can't?]
|
90
|
+
Signed-off-by: Julia Child <juliachild@chef.io>
|
91
|
+
```
|
150
92
|
|
93
|
+
The DCO text can either be manually added to your commit body, or you can add either **-s** or **--signoff** to your usual git commit commands. If you forget to add the sign-off you can also amend a previous commit with the sign-off by running **git commit –-amend -s**. If you've pushed your changes to Github already you'll need to force push your branch after this with **git push -f**.
|
151
94
|
|
95
|
+
### Chef Obvious Fix Policy
|
152
96
|
|
153
|
-
|
154
|
-
[If you are filing an issue what are the things we need to do in order to repro your problem?]
|
97
|
+
Small contributions, such as fixing spelling errors, where the content is small enough to not be considered intellectual property, can be submitted without signing the contribution for the DCO.
|
155
98
|
|
99
|
+
As a rule of thumb, changes are obvious fixes if they do not introduce any new functionality or creative thinking. Assuming the change does not affect functionality, some common obvious fix examples include the following:
|
156
100
|
|
157
|
-
|
158
|
-
|
101
|
+
- Spelling / grammar fixes
|
102
|
+
- Typo correction, white space and formatting changes
|
103
|
+
- Comment clean up
|
104
|
+
- Bug fixes that change default return values or error codes stored in constants
|
105
|
+
- Adding logging messages or debugging output
|
106
|
+
- Changes to 'metadata' files like Gemfile, .gitignore, build scripts, etc.
|
107
|
+
- Moving source files from one directory or package to another
|
159
108
|
|
109
|
+
**Whenever you invoke the "obvious fix" rule, please say so in your commit message:**
|
160
110
|
|
161
|
-
### Actual Result:
|
162
|
-
[What actually happens after the reproduction steps?]
|
163
111
|
```
|
112
|
+
------------------------------------------------------------------------
|
113
|
+
commit 370adb3f82d55d912b0cf9c1d1e99b132a8ed3b5
|
114
|
+
Author: Julia Child <juliachild@chef.io>
|
115
|
+
Date: Wed Sep 18 11:44:40 2015 -0700
|
164
116
|
|
165
|
-
|
166
|
-
|
167
|
-
Contributions go through a review process to improve code quality and avoid regressions. Managing a large number of contributions requires a workflow to provide queues for work such as triage, code review, and merging. A semi-formal process has evolved over the life of the project. Chef maintains this process pending community development and acceptance of an [RFC](https://github.com/opscode/chef-rfc). These queries will help track contributions through this process:
|
117
|
+
Fix typo in the README.
|
168
118
|
|
169
|
-
|
170
|
-
* [Untriaged Issues](https://github.com/opscode/chef/issues?q=is%3Aopen+is%3Aissue+-label%3ABug+-label%3AEnhancement+-label%3A%22Tech+Cleanup%22+-label%3A%22Ready+For+Merge%22)
|
171
|
-
* [PRs to be Reviewed](https://github.com/opscode/chef/labels/Pending%20Maintainer%20Review)
|
172
|
-
* [Suitable for First Contribution](https://github.com/opscode/chef/labels/Easy)
|
119
|
+
Obvious fix.
|
173
120
|
|
174
|
-
|
121
|
+
------------------------------------------------------------------------
|
122
|
+
```
|
175
123
|
|
176
|
-
|
177
|
-
all the requirements of Chef. We call these [Omnibus packages](https://github.com/opscode/omnibus-ruby)
|
124
|
+
## Release Cycles
|
178
125
|
|
179
|
-
|
180
|
-
recommend using Chef packages since they are the only combination of native libraries &
|
181
|
-
gems required by Chef that we test throughly.
|
126
|
+
Our primary shipping vehicle is operating system specific packages that includes all the requirements of Chef. We call these [Omnibus packages](https://github.com/chef/omnibus)
|
182
127
|
|
183
|
-
|
184
|
-
standard version numbers look like X.Y.Z which mean:
|
128
|
+
We also release our software as gems to [Rubygems](https://rubygems.org/) but we strongly recommend using Chef packages since they are the only combination of native libraries & gems required by Chef that we test throughly.
|
185
129
|
|
186
|
-
|
187
|
-
* Y is a minor release, which adds both new features and bug fixes
|
188
|
-
* Z is a patch release, which adds just bug fixes
|
130
|
+
Our version numbering roughly follows [Semantic Versioning](http://semver.org/) standard. Our standard version numbers look like X.Y.Z which mean:
|
189
131
|
|
190
|
-
|
191
|
-
|
192
|
-
|
132
|
+
- X is a major release, which may not be fully compatible with prior major releases
|
133
|
+
- Y is a minor release, which adds both new features and bug fixes
|
134
|
+
- Z is a patch release, which adds just bug fixes
|
193
135
|
|
194
|
-
We do a `Minor` release approximately every
|
195
|
-
basis for regressions, significant bugs, and security issues.
|
136
|
+
After shipping a release of Chef we bump the `Minor` version by one to start development of the next minor release. All merges to master trigger an increment of the `Patch` version, and a build through our internal testing pipeline. We do a `Minor` release approximately every month, which consist of shipping one of the already auto-incremented and tested `Patch` versions. For example after shiping 12.10.24, we incremented Chef to 12.11.0\. From there 18 commits where merged bringing the version to 12.11.18, which we shipped as an omnibus package.
|
196
137
|
|
197
|
-
Announcements of releases are
|
198
|
-
available.
|
138
|
+
Announcements of releases are made to the [chef mailing list](https://discourse.chef.io/c/chef-release) when they are available.
|
199
139
|
|
200
140
|
## Chef Community
|
201
141
|
|
202
|
-
Chef is made possible by a strong community of developers and system administrators. If you have
|
203
|
-
any questions or if you would like to get involved in the Chef community you can check out:
|
142
|
+
Chef is made possible by a strong community of developers and system administrators. If you have any questions or if you would like to get involved in the Chef community you can check out:
|
204
143
|
|
205
|
-
|
206
|
-
|
144
|
+
- [Chef Mailing List](https://discourse.chef.io/)
|
145
|
+
- [Chef Community Slack](https://community-slack.chef.io/)
|
207
146
|
|
208
147
|
Also here are some additional pointers to some awesome Chef content:
|
209
148
|
|
210
|
-
|
211
|
-
|
212
|
-
|
149
|
+
- [Chef Docs](https://docs.chef.io/)
|
150
|
+
- [Learn Chef](https://learn.chef.io/)
|
151
|
+
- [Chef Website](https://www.chef.io/)
|
data/Gemfile
ADDED
@@ -0,0 +1,94 @@
|
|
1
|
+
# This buys us the ability to be included in other Gemfiles
|
2
|
+
require_relative "tasks/gemfile_util"
|
3
|
+
extend GemfileUtil
|
4
|
+
|
5
|
+
source "https://rubygems.org"
|
6
|
+
|
7
|
+
# Note we do not use the gemspec DSL which restricts to the
|
8
|
+
# gemspec for the current platform and filters out other platforms
|
9
|
+
# during a bundle lock operation. We actually want dependencies from
|
10
|
+
# both of our gemspecs. Also note this this mimics gemspec behavior
|
11
|
+
# of bundler versions prior to 1.12.0 (https://github.com/bundler/bundler/commit/193a14fe5e0d56294c7b370a0e59f93b2c216eed)
|
12
|
+
gem "chef", path: "."
|
13
|
+
|
14
|
+
gem "chef-config", path: File.expand_path("../chef-config", __FILE__) if File.exist?(File.expand_path("../chef-config", __FILE__))
|
15
|
+
# Ensure that we can always install rake, regardless of gem groups
|
16
|
+
gem "rake", group: [ :default, :omnibus_package, :development ]
|
17
|
+
gem "bundler"
|
18
|
+
gem "cheffish"
|
19
|
+
|
20
|
+
group(:omnibus_package) do
|
21
|
+
gem "appbundler"
|
22
|
+
gem "rb-readline"
|
23
|
+
gem "nokogiri"
|
24
|
+
end
|
25
|
+
|
26
|
+
group(:omnibus_package, :pry) do
|
27
|
+
gem "pry"
|
28
|
+
gem "pry-byebug"
|
29
|
+
gem "pry-remote"
|
30
|
+
gem "pry-stack_explorer"
|
31
|
+
end
|
32
|
+
# These are used for external tests
|
33
|
+
group(:integration) do
|
34
|
+
gem "chef-provisioning"
|
35
|
+
gem "chef-provisioning-aws"
|
36
|
+
gem "chef-sugar"
|
37
|
+
gem "chefspec"
|
38
|
+
gem "halite"
|
39
|
+
gem "poise"
|
40
|
+
gem "poise-boiler"
|
41
|
+
gem "knife-windows"
|
42
|
+
gem "foodcritic"
|
43
|
+
|
44
|
+
# We pin this so nobody brings in a cucumber-core incompatible with cucumber latest
|
45
|
+
gem "cucumber", ">= 2.4.0"
|
46
|
+
# We pin oc-chef-pedant to prevent it from updating out of lockstep with chef-zero
|
47
|
+
gem "oc-chef-pedant", git: "https://github.com/chef/chef-server"
|
48
|
+
end
|
49
|
+
|
50
|
+
group(:docgen) do
|
51
|
+
gem "yard"
|
52
|
+
end
|
53
|
+
|
54
|
+
group(:maintenance) do
|
55
|
+
gem "tomlrb"
|
56
|
+
|
57
|
+
# To sync maintainers with github
|
58
|
+
gem "octokit"
|
59
|
+
gem "netrc"
|
60
|
+
end
|
61
|
+
|
62
|
+
# Everything except AIX
|
63
|
+
group(:linux, :bsd, :mac_os_x, :solaris, :windows) do
|
64
|
+
# may need to disable this in insolation on fussy builds like AIX, RHEL4, etc
|
65
|
+
gem "ruby-prof"
|
66
|
+
end
|
67
|
+
# Everything except AIX and Windows
|
68
|
+
group(:linux, :bsd, :mac_os_x, :solaris) do
|
69
|
+
gem "ruby-shadow", platforms: :ruby
|
70
|
+
end
|
71
|
+
|
72
|
+
group(:development, :test) do
|
73
|
+
gem "simplecov"
|
74
|
+
|
75
|
+
# for testing new chefstyle rules
|
76
|
+
# gem 'chefstyle', github: 'chef/chefstyle'
|
77
|
+
gem "chefstyle", git: "https://github.com/chef/chefstyle.git", branch: "master"
|
78
|
+
end
|
79
|
+
|
80
|
+
group(:changelog) do
|
81
|
+
gem "github_changelog_generator"
|
82
|
+
end
|
83
|
+
|
84
|
+
group(:travis) do
|
85
|
+
# See `bundler-audit` in .travis.yml
|
86
|
+
gem "bundler-audit", git: "https://github.com/rubysec/bundler-audit.git"
|
87
|
+
gem "travis"
|
88
|
+
end
|
89
|
+
|
90
|
+
instance_eval(ENV["GEMFILE_MOD"]) if ENV["GEMFILE_MOD"]
|
91
|
+
|
92
|
+
# If you want to load debugging tools into the bundle exec sandbox,
|
93
|
+
# add these additional dependencies into chef/Gemfile.local
|
94
|
+
eval(IO.read(__FILE__ + ".local"), binding) if File.exist?(__FILE__ + ".local")
|