chef 12.6.0 → 12.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +26 -19
- data/README.md +26 -23
- data/Rakefile +28 -17
- data/VERSION +1 -0
- data/acceptance/.gitignore +1 -0
- data/acceptance/.shared/kitchen_acceptance/.kitchen.digitalocean.yml +27 -0
- data/acceptance/.shared/kitchen_acceptance/.kitchen.ec2.yml +281 -0
- data/acceptance/.shared/kitchen_acceptance/.kitchen.vagrant.yml +49 -0
- data/acceptance/.shared/kitchen_acceptance/libraries/kitchen.rb +46 -0
- data/acceptance/.shared/kitchen_acceptance/metadata.rb +1 -0
- data/acceptance/Gemfile +11 -0
- data/acceptance/README.md +86 -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/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 +21 -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.git.yml +10 -0
- data/acceptance/top-cookbooks/.kitchen.learn-the-basics-rhel.yml +4 -0
- data/acceptance/top-cookbooks/.kitchen.learn-the-basics-ubuntu.yml +4 -0
- data/acceptance/top-cookbooks/.kitchen.learn-the-basics-windows.yml +4 -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 -1
- data/bin/chef-solo +4 -4
- data/bin/knife +4 -5
- data/chef-windows.gemspec +5 -2
- data/chef.gemspec +13 -13
- 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/lib-backcompat/chef/chef_fs/file_system/acl_entry.rb +5 -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/chef.rb +17 -17
- data/lib/chef/api_client.rb +31 -30
- data/lib/chef/api_client/registration.rb +34 -10
- data/lib/chef/api_client_v1.rb +36 -36
- data/lib/chef/application.rb +32 -23
- data/lib/chef/application/apply.rb +20 -20
- data/lib/chef/application/client.rb +63 -43
- data/lib/chef/application/knife.rb +21 -15
- data/lib/chef/application/solo.rb +52 -41
- data/lib/chef/application/windows_service.rb +25 -25
- data/lib/chef/application/windows_service_manager.rb +22 -22
- data/lib/chef/applications.rb +4 -4
- data/lib/chef/audit/audit_event_proxy.rb +3 -3
- data/lib/chef/audit/audit_reporter.rb +8 -10
- 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 +15 -14
- data/lib/chef/chef_class.rb +10 -7
- data/lib/chef/chef_fs.rb +51 -1
- data/lib/chef/chef_fs/chef_fs_data_store.rb +320 -125
- data/lib/chef/chef_fs/command_line.rb +8 -8
- data/lib/chef/chef_fs/config.rb +52 -23
- data/lib/chef/chef_fs/data_handler/acl_data_handler.rb +10 -10
- data/lib/chef/chef_fs/data_handler/client_data_handler.rb +12 -12
- data/lib/chef/chef_fs/data_handler/container_data_handler.rb +6 -6
- data/lib/chef/chef_fs/data_handler/cookbook_data_handler.rb +15 -15
- data/lib/chef/chef_fs/data_handler/data_bag_item_data_handler.rb +11 -11
- data/lib/chef/chef_fs/data_handler/data_handler_base.rb +8 -8
- data/lib/chef/chef_fs/data_handler/environment_data_handler.rb +14 -14
- data/lib/chef/chef_fs/data_handler/group_data_handler.rb +18 -18
- data/lib/chef/chef_fs/data_handler/node_data_handler.rb +14 -14
- data/lib/chef/chef_fs/data_handler/organization_data_handler.rb +9 -9
- 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 +30 -3
- data/lib/chef/chef_fs/data_handler/policy_group_data_handler.rb +27 -0
- data/lib/chef/chef_fs/data_handler/role_data_handler.rb +16 -16
- data/lib/chef/chef_fs/data_handler/user_data_handler.rb +12 -12
- data/lib/chef/chef_fs/file_pattern.rb +25 -25
- data/lib/chef/chef_fs/file_system.rb +10 -10
- data/lib/chef/chef_fs/file_system/already_exists_error.rb +3 -6
- data/lib/chef/chef_fs/file_system/base_fs_dir.rb +4 -4
- data/lib/chef/chef_fs/file_system/base_fs_object.rb +8 -8
- 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 +60 -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_repository_file_system_acls_dir.rb → chef_server/cookbook_artifact_dir.rb} +13 -12
- 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 +84 -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 +102 -0
- data/lib/chef/chef_fs/file_system/chef_server/data_bag_dir.rb +71 -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 +57 -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 +31 -0
- data/lib/chef/chef_fs/file_system/chef_server/organization_invites_entry.rb +61 -0
- data/lib/chef/chef_fs/file_system/chef_server/organization_members_entry.rb +60 -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 +137 -0
- data/lib/chef/chef_fs/file_system/chef_server/policy_groups_dir.rb +43 -0
- data/lib/chef/chef_fs/file_system/chef_server/policy_revision_entry.rb +34 -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 +187 -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/cookbook_frozen_error.rb +3 -6
- data/lib/chef/chef_fs/file_system/default_environment_cannot_be_modified_error.rb +3 -7
- data/lib/chef/chef_fs/file_system/file_system_error.rb +14 -3
- 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 +2 -2
- data/lib/chef/chef_fs/file_system/must_delete_recursively_error.rb +3 -6
- data/lib/chef/chef_fs/file_system/nonexistent_fs_object.rb +4 -4
- data/lib/chef/chef_fs/file_system/not_found_error.rb +3 -6
- data/lib/chef/chef_fs/file_system/operation_failed_error.rb +5 -5
- data/lib/chef/chef_fs/file_system/operation_not_allowed_error.rb +16 -18
- data/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_acls_dir.rb +39 -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/{chef_repository_file_system_policies_dir.rb → repository/chef_repository_file_system_cookbook_artifacts_dir.rb} +9 -13
- data/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_dir.rb +95 -0
- data/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_entry.rb +82 -0
- data/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbooks_dir.rb +84 -0
- data/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_data_bags_dir.rb +38 -0
- data/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_entry.rb +83 -0
- data/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_policies_dir.rb +38 -0
- data/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_root_dir.rb +210 -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/{chef_repository_file_system_data_bags_dir.rb → repository/chef_repository_file_system_versioned_cookbooks_dir.rb} +9 -11
- data/lib/chef/chef_fs/file_system/repository/file_system_entry.rb +117 -0
- data/lib/chef/chef_fs/file_system/{file_system_root_dir.rb → repository/file_system_root_dir.rb} +8 -6
- data/lib/chef/chef_fs/knife.rb +16 -16
- data/lib/chef/chef_fs/parallelizer.rb +3 -3
- data/lib/chef/chef_fs/parallelizer/flatten_enumerable.rb +1 -1
- data/lib/chef/chef_fs/parallelizer/parallel_enumerable.rb +3 -3
- data/lib/chef/chef_fs/path_utils.rb +11 -10
- data/lib/chef/client.rb +80 -71
- data/lib/chef/config.rb +10 -10
- data/lib/chef/config_fetcher.rb +12 -4
- data/lib/chef/constants.rb +2 -1
- data/lib/chef/cookbook/chefignore.rb +4 -5
- data/lib/chef/cookbook/cookbook_collection.rb +6 -6
- data/lib/chef/cookbook/cookbook_version_loader.rb +15 -15
- data/lib/chef/cookbook/file_system_file_vendor.rb +4 -4
- data/lib/chef/cookbook/file_vendor.rb +3 -4
- data/lib/chef/cookbook/metadata.rb +108 -107
- data/lib/chef/cookbook/remote_file_vendor.rb +7 -7
- data/lib/chef/cookbook/synchronizer.rb +11 -10
- data/lib/chef/cookbook/syntax_check.rb +14 -14
- data/lib/chef/cookbook_loader.rb +14 -14
- data/lib/chef/cookbook_manifest.rb +16 -15
- data/lib/chef/cookbook_site_streaming_uploader.rb +22 -22
- data/lib/chef/cookbook_uploader.rb +22 -21
- data/lib/chef/cookbook_version.rb +87 -87
- data/lib/chef/daemon.rb +6 -6
- data/lib/chef/data_bag.rb +32 -26
- data/lib/chef/data_bag_item.rb +43 -40
- data/lib/chef/delayed_evaluator.rb +1 -1
- data/lib/chef/deprecation/mixin/template.rb +4 -4
- data/lib/chef/deprecation/provider/cookbook_file.rb +2 -3
- data/lib/chef/deprecation/provider/file.rb +10 -10
- data/lib/chef/deprecation/provider/remote_directory.rb +5 -5
- data/lib/chef/deprecation/provider/remote_file.rb +3 -3
- data/lib/chef/deprecation/provider/template.rb +3 -3
- data/lib/chef/deprecation/warnings.rb +2 -2
- data/lib/chef/digester.rb +6 -6
- data/lib/chef/dsl.rb +6 -6
- data/lib/chef/dsl/audit.rb +4 -4
- data/lib/chef/dsl/chef_provisioning.rb +5 -5
- data/lib/chef/dsl/cheffish.rb +5 -5
- data/lib/chef/dsl/data_query.rb +10 -10
- data/lib/chef/dsl/declare_resource.rb +8 -8
- 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/platform_introspection.rb +8 -14
- data/lib/chef/dsl/powershell.rb +3 -3
- data/lib/chef/dsl/reboot_pending.rb +12 -13
- data/lib/chef/dsl/recipe.rb +20 -20
- data/lib/chef/dsl/registry_helper.rb +7 -3
- data/lib/chef/dsl/resources.rb +6 -5
- data/lib/chef/encrypted_data_bag_item.rb +10 -10
- 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/environment.rb +41 -34
- data/lib/chef/event_dispatch/base.rb +2 -2
- data/lib/chef/event_dispatch/dispatcher.rb +2 -2
- data/lib/chef/event_dispatch/dsl.rb +6 -5
- data/lib/chef/event_loggers/base.rb +3 -3
- data/lib/chef/event_loggers/windows_eventlog.rb +11 -11
- data/lib/chef/exceptions.rb +23 -34
- data/lib/chef/file_access_control.rb +6 -6
- data/lib/chef/file_access_control/unix.rb +5 -5
- data/lib/chef/file_access_control/windows.rb +5 -5
- data/lib/chef/file_cache.rb +21 -21
- data/lib/chef/file_content_management/content_base.rb +2 -2
- data/lib/chef/file_content_management/deploy.rb +5 -6
- data/lib/chef/file_content_management/deploy/cp.rb +2 -2
- data/lib/chef/file_content_management/deploy/mv_unix.rb +2 -3
- data/lib/chef/file_content_management/deploy/mv_windows.rb +4 -6
- data/lib/chef/file_content_management/tempfile.rb +3 -3
- data/lib/chef/formatters/base.rb +8 -9
- data/lib/chef/formatters/doc.rb +7 -7
- data/lib/chef/formatters/error_descriptor.rb +5 -5
- data/lib/chef/formatters/error_inspectors.rb +5 -5
- data/lib/chef/formatters/error_inspectors/api_error_formatting.rb +50 -15
- data/lib/chef/formatters/error_inspectors/compile_error_inspector.rb +11 -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 +8 -11
- data/lib/chef/formatters/error_inspectors/run_list_expansion_error_inspector.rb +15 -14
- data/lib/chef/formatters/error_mapper.rb +2 -2
- data/lib/chef/formatters/indentable_output_stream.rb +5 -5
- data/lib/chef/formatters/minimal.rb +7 -9
- data/lib/chef/guard_interpreter.rb +3 -3
- data/lib/chef/guard_interpreter/default_guard_interpreter.rb +3 -4
- data/lib/chef/guard_interpreter/resource_guard_interpreter.rb +9 -9
- data/lib/chef/handler.rb +4 -4
- data/lib/chef/handler/error_report.rb +4 -4
- data/lib/chef/handler/json_file.rb +5 -5
- data/lib/chef/http.rb +32 -35
- data/lib/chef/http/auth_credentials.rb +12 -12
- data/lib/chef/http/authenticator.rb +17 -12
- data/lib/chef/http/basic_client.rb +20 -20
- data/lib/chef/http/cookie_jar.rb +7 -7
- data/lib/chef/http/cookie_manager.rb +8 -8
- data/lib/chef/http/decompressor.rb +7 -9
- data/lib/chef/http/http_request.rb +31 -32
- 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 +56 -57
- data/lib/chef/http/ssl_policies.rb +9 -9
- data/lib/chef/http/validate_content_length.rb +12 -12
- data/lib/chef/json_compat.rb +6 -6
- data/lib/chef/key.rb +44 -42
- data/lib/chef/knife.rb +47 -44
- data/lib/chef/knife/bootstrap.rb +32 -32
- data/lib/chef/knife/bootstrap/chef_vault_handler.rb +16 -23
- data/lib/chef/knife/bootstrap/client_builder.rb +15 -13
- data/lib/chef/knife/bootstrap/templates/chef-full.erb +1 -1
- data/lib/chef/knife/client_bulk_delete.rb +5 -5
- data/lib/chef/knife/client_create.rb +5 -5
- data/lib/chef/knife/client_delete.rb +6 -6
- data/lib/chef/knife/client_edit.rb +5 -5
- 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 +14 -14
- data/lib/chef/knife/configure_client.rb +6 -6
- data/lib/chef/knife/cookbook_bulk_delete.rb +9 -10
- data/lib/chef/knife/cookbook_create.rb +12 -12
- 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 +8 -8
- data/lib/chef/knife/cookbook_metadata_from_file.rb +5 -5
- data/lib/chef/knife/cookbook_show.rb +14 -18
- data/lib/chef/knife/cookbook_site_download.rb +22 -22
- data/lib/chef/knife/cookbook_site_install.rb +10 -10
- data/lib/chef/knife/cookbook_site_list.rb +6 -10
- data/lib/chef/knife/cookbook_site_search.rb +5 -10
- data/lib/chef/knife/cookbook_site_share.rb +17 -18
- data/lib/chef/knife/cookbook_site_show.rb +7 -12
- data/lib/chef/knife/cookbook_site_unshare.rb +6 -6
- data/lib/chef/knife/cookbook_site_vendor.rb +5 -5
- data/lib/chef/knife/cookbook_test.rb +6 -7
- data/lib/chef/knife/cookbook_upload.rb +19 -20
- data/lib/chef/knife/core/bootstrap_context.rb +25 -21
- data/lib/chef/knife/core/cookbook_scm_repo.rb +11 -12
- data/lib/chef/knife/core/custom_manifest_loader.rb +2 -2
- data/lib/chef/knife/core/gem_glob_loader.rb +11 -11
- data/lib/chef/knife/core/generic_presenter.rb +33 -34
- data/lib/chef/knife/core/hashed_command_loader.rb +6 -6
- data/lib/chef/knife/core/node_editor.rb +59 -38
- data/lib/chef/knife/core/node_presenter.rb +13 -14
- data/lib/chef/knife/core/object_loader.rb +9 -9
- data/lib/chef/knife/core/status_presenter.rb +17 -17
- data/lib/chef/knife/core/subcommand_loader.rb +19 -20
- data/lib/chef/knife/core/text_formatter.rb +13 -14
- data/lib/chef/knife/core/ui.rb +17 -18
- 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 +8 -11
- data/lib/chef/knife/data_bag_from_file.rb +12 -11
- data/lib/chef/knife/data_bag_list.rb +4 -8
- data/lib/chef/knife/data_bag_secret_options.rb +6 -6
- data/lib/chef/knife/data_bag_show.rb +31 -31
- data/lib/chef/knife/delete.rb +6 -7
- data/lib/chef/knife/deps.rb +18 -18
- data/lib/chef/knife/diff.rb +8 -9
- data/lib/chef/knife/download.rb +11 -12
- data/lib/chef/knife/edit.rb +5 -6
- data/lib/chef/knife/environment_compare.rb +23 -23
- data/lib/chef/knife/environment_create.rb +5 -5
- 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 +4 -5
- data/lib/chef/knife/key_create.rb +5 -5
- data/lib/chef/knife/key_create_base.rb +1 -1
- data/lib/chef/knife/key_delete.rb +2 -2
- data/lib/chef/knife/key_edit.rb +5 -5
- 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 +14 -13
- data/lib/chef/knife/node_bulk_delete.rb +6 -12
- data/lib/chef/knife/node_create.rb +5 -8
- 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 +10 -10
- 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 +8 -8
- data/lib/chef/knife/node_run_list_set.rb +6 -6
- data/lib/chef/knife/node_show.rb +6 -7
- data/lib/chef/knife/osc_user_create.rb +5 -5
- data/lib/chef/knife/osc_user_delete.rb +5 -5
- data/lib/chef/knife/osc_user_edit.rb +5 -5
- 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 -5
- data/lib/chef/knife/raw.rb +18 -17
- data/lib/chef/knife/recipe_list.rb +4 -4
- data/lib/chef/knife/rehash.rb +9 -9
- data/lib/chef/knife/role_bulk_delete.rb +5 -10
- data/lib/chef/knife/role_create.rb +5 -7
- 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 +6 -11
- 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 +11 -11
- data/lib/chef/knife/serve.rb +10 -10
- data/lib/chef/knife/show.rb +4 -4
- data/lib/chef/knife/ssh.rb +34 -34
- data/lib/chef/knife/ssl_check.rb +12 -11
- data/lib/chef/knife/ssl_fetch.rb +13 -15
- data/lib/chef/knife/status.rb +10 -10
- 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 +10 -11
- data/lib/chef/knife/user_create.rb +6 -8
- data/lib/chef/knife/user_delete.rb +6 -7
- data/lib/chef/knife/user_edit.rb +6 -7
- 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 +22 -23
- data/lib/chef/local_mode.rb +13 -11
- data/lib/chef/log.rb +10 -10
- data/lib/chef/log/syslog.rb +5 -6
- data/lib/chef/log/winevt.rb +12 -12
- data/lib/chef/mash.rb +6 -5
- data/lib/chef/mixin/api_version_request_handling.rb +1 -1
- data/lib/chef/mixin/checksum.rb +4 -4
- data/lib/chef/mixin/command.rb +13 -13
- data/lib/chef/mixin/command/unix.rb +7 -7
- data/lib/chef/mixin/command/windows.rb +6 -7
- 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 +24 -25
- 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 +2 -3
- 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/params_validate.rb +38 -18
- data/lib/chef/mixin/path_sanity.rb +7 -7
- 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 +8 -8
- data/lib/chef/mixin/provides.rb +2 -2
- data/lib/chef/mixin/proxified_socket.rb +4 -4
- data/lib/chef/mixin/recipe_definition_dsl_core.rb +4 -4
- data/lib/chef/mixin/securable.rb +24 -27
- data/lib/chef/mixin/shell_out.rb +10 -10
- data/lib/chef/mixin/subclass_directive.rb +2 -2
- data/lib/chef/mixin/template.rb +8 -9
- data/lib/chef/mixin/unformatter.rb +1 -1
- data/lib/chef/mixin/uris.rb +2 -3
- data/lib/chef/mixin/which.rb +3 -3
- data/lib/chef/mixin/why_run.rb +6 -7
- data/lib/chef/mixin/wide_string.rb +7 -7
- data/lib/chef/mixin/windows_architecture_helper.rb +9 -10
- data/lib/chef/mixin/windows_env_helper.rb +10 -11
- data/lib/chef/mixin/xml_escape.rb +13 -13
- data/lib/chef/mixins.rb +13 -14
- data/lib/chef/monkey_patches/net-ssh-multi.rb +6 -6
- data/lib/chef/monkey_patches/net_http.rb +2 -2
- data/lib/chef/monkey_patches/webrick-utils.rb +6 -6
- data/lib/chef/monkey_patches/win32/registry.rb +6 -6
- data/lib/chef/monologger.rb +2 -4
- data/lib/chef/node.rb +66 -60
- data/lib/chef/node/attribute.rb +289 -289
- data/lib/chef/node/attribute_collections.rb +8 -8
- data/lib/chef/node/immutable_collections.rb +3 -3
- data/lib/chef/node_map.rb +11 -11
- data/lib/chef/null_logger.rb +3 -3
- data/lib/chef/org.rb +31 -30
- data/lib/chef/platform.rb +4 -4
- data/lib/chef/platform/handler_map.rb +2 -2
- 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 +33 -33
- data/lib/chef/platform/provider_priority_map.rb +2 -2
- data/lib/chef/platform/query_helpers.rb +10 -11
- data/lib/chef/platform/rebooter.rb +11 -11
- 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 +5 -5
- data/lib/chef/policy_builder.rb +5 -5
- data/lib/chef/policy_builder/dynamic.rb +10 -11
- data/lib/chef/policy_builder/expand_node_object.rb +24 -19
- data/lib/chef/policy_builder/policyfile.rb +13 -14
- data/lib/chef/property.rb +115 -49
- data/lib/chef/provider.rb +43 -43
- data/lib/chef/provider/apt_update.rb +79 -0
- data/lib/chef/provider/batch.rb +6 -6
- data/lib/chef/provider/breakpoint.rb +1 -1
- data/lib/chef/provider/cookbook_file.rb +5 -5
- data/lib/chef/provider/cookbook_file/content.rb +4 -4
- data/lib/chef/provider/cron.rb +8 -8
- 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/deploy.rb +7 -8
- data/lib/chef/provider/deploy/revision.rb +9 -9
- data/lib/chef/provider/deploy/timestamped.rb +1 -1
- data/lib/chef/provider/directory.rb +8 -8
- data/lib/chef/provider/dsc_resource.rb +33 -27
- data/lib/chef/provider/dsc_script.rb +17 -17
- data/lib/chef/provider/env.rb +8 -8
- data/lib/chef/provider/env/windows.rb +3 -3
- data/lib/chef/provider/erl_call.rb +5 -5
- data/lib/chef/provider/execute.rb +8 -8
- data/lib/chef/provider/file.rb +24 -24
- data/lib/chef/provider/file/content.rb +4 -4
- data/lib/chef/provider/git.rb +33 -35
- data/lib/chef/provider/group.rb +7 -7
- data/lib/chef/provider/group/aix.rb +6 -6
- data/lib/chef/provider/group/dscl.rb +11 -11
- data/lib/chef/provider/group/gpasswd.rb +3 -3
- data/lib/chef/provider/group/groupadd.rb +8 -8
- data/lib/chef/provider/group/groupmod.rb +3 -3
- data/lib/chef/provider/group/pw.rb +2 -2
- data/lib/chef/provider/group/suse.rb +5 -5
- data/lib/chef/provider/group/usermod.rb +8 -8
- data/lib/chef/provider/group/windows.rb +5 -5
- data/lib/chef/provider/http_request.rb +15 -15
- data/lib/chef/provider/ifconfig.rb +15 -14
- 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/link.rb +13 -13
- data/lib/chef/provider/log.rb +1 -1
- data/lib/chef/provider/lwrp_base.rb +8 -8
- data/lib/chef/provider/mdadm.rb +4 -4
- data/lib/chef/provider/mount.rb +13 -13
- data/lib/chef/provider/mount/aix.rb +14 -14
- data/lib/chef/provider/mount/mount.rb +18 -18
- data/lib/chef/provider/mount/solaris.rb +30 -30
- data/lib/chef/provider/mount/windows.rb +4 -4
- data/lib/chef/provider/ohai.rb +2 -2
- data/lib/chef/provider/osx_profile.rb +256 -0
- data/lib/chef/provider/package.rb +19 -19
- data/lib/chef/provider/package/aix.rb +8 -9
- data/lib/chef/provider/package/apt.rb +12 -12
- data/lib/chef/provider/package/chocolatey.rb +277 -0
- data/lib/chef/provider/package/dpkg.rb +7 -7
- data/lib/chef/provider/package/easy_install.rb +14 -15
- data/lib/chef/provider/package/freebsd/base.rb +7 -7
- data/lib/chef/provider/package/freebsd/pkg.rb +8 -8
- 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 +16 -16
- data/lib/chef/provider/package/ips.rb +8 -8
- data/lib/chef/provider/package/macports.rb +1 -0
- data/lib/chef/provider/package/openbsd.rb +13 -13
- data/lib/chef/provider/package/pacman.rb +6 -9
- data/lib/chef/provider/package/paludis.rb +7 -10
- data/lib/chef/provider/package/portage.rb +10 -13
- data/lib/chef/provider/package/rpm.rb +7 -8
- data/lib/chef/provider/package/rubygems.rb +64 -64
- data/lib/chef/provider/package/smartos.rb +7 -10
- data/lib/chef/provider/package/solaris.rb +6 -11
- data/lib/chef/provider/package/windows.rb +38 -29
- data/lib/chef/provider/package/windows/exe.rb +9 -21
- data/lib/chef/provider/package/windows/msi.rb +12 -12
- data/lib/chef/provider/package/windows/registry_uninstall_entry.rb +7 -7
- data/lib/chef/provider/package/yum-dump.py +1 -1
- data/lib/chef/provider/package/yum.rb +43 -44
- data/lib/chef/provider/package/zypper.rb +57 -47
- data/lib/chef/provider/powershell_script.rb +14 -14
- data/lib/chef/provider/reboot.rb +5 -5
- data/lib/chef/provider/registry_key.rb +16 -16
- data/lib/chef/provider/remote_directory.rb +15 -15
- data/lib/chef/provider/remote_file.rb +5 -5
- data/lib/chef/provider/remote_file/cache_control_data.rb +11 -12
- data/lib/chef/provider/remote_file/content.rb +11 -11
- data/lib/chef/provider/remote_file/fetcher.rb +2 -2
- data/lib/chef/provider/remote_file/ftp.rb +11 -11
- data/lib/chef/provider/remote_file/http.rb +9 -9
- 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/route.rb +188 -188
- data/lib/chef/provider/ruby_block.rb +3 -3
- data/lib/chef/provider/script.rb +5 -5
- data/lib/chef/provider/service.rb +30 -30
- data/lib/chef/provider/service/aix.rb +4 -4
- data/lib/chef/provider/service/aixinit.rb +12 -12
- data/lib/chef/provider/service/arch.rb +5 -5
- data/lib/chef/provider/service/debian.rb +12 -13
- data/lib/chef/provider/service/freebsd.rb +7 -7
- data/lib/chef/provider/service/gentoo.rb +5 -5
- data/lib/chef/provider/service/init.rb +4 -4
- data/lib/chef/provider/service/insserv.rb +4 -4
- data/lib/chef/provider/service/invokercd.rb +3 -3
- data/lib/chef/provider/service/macosx.rb +19 -19
- data/lib/chef/provider/service/openbsd.rb +14 -14
- data/lib/chef/provider/service/redhat.rb +6 -6
- data/lib/chef/provider/service/simple.rb +10 -9
- data/lib/chef/provider/service/solaris.rb +8 -8
- data/lib/chef/provider/service/systemd.rb +4 -4
- data/lib/chef/provider/service/upstart.rb +8 -8
- data/lib/chef/provider/service/windows.rb +32 -78
- data/lib/chef/provider/subversion.rb +13 -13
- data/lib/chef/provider/template.rb +7 -7
- data/lib/chef/provider/template/content.rb +4 -4
- data/lib/chef/provider/template_finder.rb +2 -1
- data/lib/chef/provider/user.rb +9 -10
- data/lib/chef/provider/user/aix.rb +4 -3
- data/lib/chef/provider/user/dscl.rb +39 -40
- data/lib/chef/provider/user/pw.rb +9 -9
- data/lib/chef/provider/user/solaris.rb +9 -9
- data/lib/chef/provider/user/useradd.rb +9 -9
- data/lib/chef/provider/user/windows.rb +13 -13
- data/lib/chef/provider/whyrun_safe_ruby_block.rb +1 -1
- data/lib/chef/provider/windows_script.rb +5 -5
- data/lib/chef/provider_resolver.rb +3 -3
- data/lib/chef/providers.rb +113 -110
- data/lib/chef/recipe.rb +13 -14
- data/lib/chef/request_id.rb +4 -4
- data/lib/chef/resource.rb +103 -93
- data/lib/chef/resource/action_class.rb +3 -3
- data/lib/chef/resource/apt_package.rb +6 -17
- data/lib/chef/{shell/shell_rest.rb → resource/apt_update.rb} +14 -9
- 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/chef_gem.rb +9 -25
- data/lib/chef/resource/chocolatey_package.rb +39 -0
- data/lib/chef/resource/conditional.rb +8 -8
- 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 +33 -33
- data/lib/chef/resource/csh.rb +5 -5
- data/lib/chef/resource/deploy.rb +76 -76
- data/lib/chef/resource/deploy_revision.rb +1 -1
- data/lib/chef/resource/directory.rb +12 -12
- data/lib/chef/resource/dpkg_package.rb +5 -6
- data/lib/chef/resource/dsc_resource.rb +121 -120
- data/lib/chef/resource/dsc_script.rb +25 -25
- data/lib/chef/resource/easy_install_package.rb +6 -25
- data/lib/chef/resource/env.rb +9 -9
- data/lib/chef/resource/erl_call.rb +15 -15
- data/lib/chef/resource/execute.rb +28 -28
- data/lib/chef/resource/file.rb +20 -87
- data/lib/chef/resource/file/verification.rb +11 -11
- data/lib/chef/resource/freebsd_package.rb +10 -9
- data/lib/chef/resource/gem_package.rb +8 -23
- data/lib/chef/resource/git.rb +4 -4
- data/lib/chef/resource/group.rb +18 -19
- data/lib/chef/resource/homebrew_package.rb +7 -18
- data/lib/chef/resource/http_request.rb +12 -12
- data/lib/chef/resource/ifconfig.rb +28 -28
- data/lib/chef/resource/ips_package.rb +5 -16
- data/lib/chef/resource/ksh.rb +3 -3
- data/lib/chef/resource/link.rb +18 -17
- data/lib/chef/resource/log.rb +9 -9
- data/lib/chef/resource/lwrp_base.rb +10 -10
- data/lib/chef/resource/macosx_service.rb +7 -7
- data/lib/chef/resource/macports_package.rb +3 -2
- data/lib/chef/resource/mdadm.rb +18 -19
- data/lib/chef/resource/mount.rb +34 -34
- data/lib/chef/resource/ohai.rb +7 -7
- data/lib/chef/resource/openbsd_package.rb +7 -6
- data/lib/chef/resource/osx_profile.rb +74 -0
- data/lib/chef/resource/package.rb +15 -69
- 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 +7 -7
- data/lib/chef/resource/python.rb +5 -5
- data/lib/chef/resource/reboot.rb +6 -6
- data/lib/chef/resource/registry_key.rb +15 -15
- data/lib/chef/resource/remote_directory.rb +23 -24
- data/lib/chef/resource/remote_file.rb +21 -21
- data/lib/chef/resource/resource_notification.rb +2 -2
- data/lib/chef/resource/route.rb +26 -26
- data/lib/chef/resource/rpm_package.rb +5 -15
- data/lib/chef/resource/ruby.rb +5 -5
- data/lib/chef/resource/ruby_block.rb +8 -8
- data/lib/chef/resource/scm.rb +36 -37
- data/lib/chef/resource/script.rb +13 -13
- data/lib/chef/resource/service.rb +32 -32
- data/lib/chef/resource/smartos_package.rb +4 -3
- data/lib/chef/resource/solaris_package.rb +4 -3
- data/lib/chef/resource/subversion.rb +6 -6
- data/lib/chef/resource/template.rb +19 -19
- data/lib/chef/resource/timestamped_deploy.rb +1 -1
- data/lib/chef/resource/user.rb +31 -31
- 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 +8 -8
- data/lib/chef/resource/windows_service.rb +9 -9
- data/lib/chef/resource/yum_package.rb +18 -42
- data/lib/chef/resource/zypper_package.rb +3 -2
- data/lib/chef/resource_builder.rb +4 -4
- data/lib/chef/resource_collection.rb +11 -11
- data/lib/chef/resource_collection/resource_collection_serialization.rb +5 -5
- data/lib/chef/resource_collection/resource_list.rb +6 -6
- data/lib/chef/resource_collection/resource_set.rb +6 -6
- data/lib/chef/resource_collection/stepable_iterator.rb +4 -4
- data/lib/chef/resource_definition.rb +7 -7
- data/lib/chef/resource_definition_list.rb +5 -5
- data/lib/chef/resource_reporter.rb +14 -15
- data/lib/chef/resource_resolver.rb +4 -5
- data/lib/chef/resources.rb +71 -68
- data/lib/chef/rest.rb +23 -23
- data/lib/chef/role.rb +49 -43
- data/lib/chef/run_context.rb +21 -23
- data/lib/chef/run_context/cookbook_compiler.rb +10 -13
- data/lib/chef/run_list.rb +17 -17
- data/lib/chef/run_list/run_list_expansion.rb +22 -26
- data/lib/chef/run_list/run_list_item.rb +8 -9
- data/lib/chef/run_list/versioned_recipe_list.rb +13 -13
- data/lib/chef/run_lock.rb +12 -12
- data/lib/chef/run_status.rb +3 -3
- data/lib/chef/runner.rb +11 -12
- data/lib/chef/scan_access_control.rb +7 -7
- data/lib/chef/search/query.rb +30 -16
- data/lib/chef/server_api.rb +42 -10
- data/lib/chef/shell.rb +24 -25
- data/lib/chef/shell/ext.rb +31 -31
- data/lib/chef/shell/model_wrapper.rb +7 -8
- data/lib/chef/shell/shell_session.rb +20 -19
- 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 +53 -58
- data/lib/chef/util/backup.rb +6 -6
- data/lib/chef/util/diff.rb +8 -8
- data/lib/chef/util/dsc/configuration_generator.rb +11 -11
- data/lib/chef/util/dsc/lcm_output_parser.rb +8 -8
- data/lib/chef/util/dsc/local_configuration_manager.rb +9 -9
- 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 +119 -119
- data/lib/chef/util/powershell/cmdlet_result.rb +36 -36
- data/lib/chef/util/powershell/ps_credential.rb +2 -2
- data/lib/chef/util/selinux.rb +6 -6
- data/lib/chef/util/threaded_job_queue.rb +2 -2
- data/lib/chef/util/windows.rb +1 -1
- data/lib/chef/util/windows/net_group.rb +84 -85
- data/lib/chef/util/windows/net_use.rb +6 -6
- data/lib/chef/util/windows/net_user.rb +9 -8
- data/lib/chef/util/windows/volume.rb +3 -3
- data/lib/chef/version.rb +2 -2
- data/lib/chef/version/platform.rb +5 -5
- data/lib/chef/version_class.rb +6 -6
- data/lib/chef/version_constraint.rb +13 -13
- data/lib/chef/version_constraint/platform.rb +3 -3
- data/lib/chef/whitelist.rb +2 -2
- data/lib/chef/win32/api.rb +13 -8
- data/lib/chef/win32/api/crypto.rb +63 -63
- data/lib/chef/win32/api/error.rb +11 -10
- data/lib/chef/win32/api/file.rb +17 -16
- 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 +111 -123
- 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 +4 -4
- data/lib/chef/win32/api/security.rb +51 -26
- data/lib/chef/win32/api/synchronization.rb +4 -4
- data/lib/chef/win32/api/system.rb +4 -4
- data/lib/chef/win32/api/unicode.rb +4 -4
- data/lib/chef/win32/crypto.rb +50 -50
- data/lib/chef/win32/error.rb +18 -15
- data/lib/chef/win32/eventlog.rb +2 -2
- data/lib/chef/win32/file.rb +14 -14
- data/lib/chef/win32/file/info.rb +3 -4
- data/lib/chef/win32/file/version_info.rb +4 -4
- data/lib/chef/win32/handle.rb +6 -6
- data/lib/chef/win32/memory.rb +4 -4
- data/lib/chef/win32/mutex.rb +4 -4
- data/lib/chef/win32/net.rb +26 -59
- data/lib/chef/win32/process.rb +7 -7
- data/lib/chef/win32/registry.rb +19 -33
- data/lib/chef/win32/security.rb +82 -20
- 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 +81 -43
- data/lib/chef/win32/security/token.rb +6 -6
- data/lib/chef/win32/system.rb +4 -4
- data/lib/chef/win32/unicode.rb +7 -7
- data/lib/chef/win32/version.rb +26 -26
- data/lib/chef/workstation_config_loader.rb +2 -2
- 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/copyright +2 -2
- data/spec/data/cookbooks/name-mismatch-versionnumber/recipes/default.rb +1 -1
- data/spec/data/cookbooks/supports-platform-constraints/metadata.rb +5 -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/functional/application_spec.rb +7 -7
- 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/audit/rspec_formatter_spec.rb +8 -8
- data/spec/functional/audit/runner_spec.rb +9 -9
- data/spec/functional/dsl/reboot_pending_spec.rb +10 -15
- data/spec/functional/dsl/registry_helper_spec.rb +8 -10
- data/spec/functional/event_loggers/windows_eventlog_spec.rb +27 -22
- data/spec/functional/file_content_management/deploy_strategies_spec.rb +9 -10
- data/spec/functional/http/simple_spec.rb +11 -11
- data/spec/functional/knife/configure_spec.rb +5 -10
- data/spec/functional/knife/cookbook_delete_spec.rb +11 -11
- data/spec/functional/knife/exec_spec.rb +6 -6
- data/spec/functional/knife/smoke_test.rb +11 -3
- data/spec/functional/knife/ssh_spec.rb +22 -22
- data/spec/functional/mixin/powershell_out_spec.rb +3 -3
- data/spec/functional/mixin/shell_out_spec.rb +12 -12
- data/spec/functional/notifications_spec.rb +6 -7
- data/spec/functional/provider/remote_file/cache_control_data_spec.rb +11 -12
- data/spec/functional/provider/whyrun_safe_ruby_block_spec.rb +4 -4
- data/spec/functional/rebooter_spec.rb +12 -12
- data/spec/functional/resource/aix_service_spec.rb +7 -8
- 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 +6 -6
- 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 +124 -0
- data/spec/functional/resource/cookbook_file_spec.rb +9 -9
- data/spec/functional/resource/cron_spec.rb +13 -13
- data/spec/functional/resource/deploy_revision_spec.rb +18 -18
- data/spec/functional/resource/directory_spec.rb +4 -4
- data/spec/functional/resource/dpkg_package_spec.rb +38 -38
- data/spec/functional/resource/dsc_resource_spec.rb +17 -22
- data/spec/functional/resource/dsc_script_spec.rb +104 -106
- data/spec/functional/resource/env_spec.rb +30 -30
- data/spec/functional/resource/execute_spec.rb +10 -10
- data/spec/functional/resource/file_spec.rb +12 -13
- data/spec/functional/resource/git_spec.rb +20 -20
- data/spec/functional/resource/group_spec.rb +21 -21
- data/spec/functional/resource/ifconfig_spec.rb +11 -11
- data/spec/functional/resource/link_spec.rb +140 -135
- data/spec/functional/resource/mount_spec.rb +17 -29
- data/spec/functional/resource/ohai_spec.rb +5 -8
- data/spec/functional/resource/package_spec.rb +11 -13
- data/spec/functional/resource/powershell_script_spec.rb +60 -60
- data/spec/functional/resource/reboot_spec.rb +12 -12
- data/spec/functional/resource/registry_spec.rb +71 -72
- data/spec/functional/resource/remote_directory_spec.rb +23 -23
- data/spec/functional/resource/remote_file_spec.rb +17 -17
- data/spec/functional/resource/rpm_spec.rb +14 -14
- data/spec/functional/resource/template_spec.rb +8 -8
- data/spec/functional/resource/user/dscl_spec.rb +3 -3
- data/spec/functional/resource/user/useradd_spec.rb +31 -37
- data/spec/functional/resource/user/windows_spec.rb +20 -20
- data/spec/functional/resource/windows_package_spec.rb +26 -35
- data/spec/functional/resource/windows_service_spec.rb +12 -8
- data/spec/functional/rest_spec.rb +6 -5
- data/spec/functional/run_lock_spec.rb +15 -14
- data/spec/functional/shell_spec.rb +11 -10
- data/spec/functional/tiny_server_spec.rb +18 -18
- data/spec/functional/util/path_helper_spec.rb +5 -5
- 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 +7 -10
- data/spec/functional/win32/registry_spec.rb +105 -107
- data/spec/functional/win32/security_spec.rb +17 -17
- data/spec/functional/win32/service_manager_spec.rb +7 -8
- data/spec/functional/win32/sid_spec.rb +13 -13
- data/spec/functional/win32/version_info_spec.rb +7 -7
- data/spec/functional/win32/versions_spec.rb +13 -13
- data/spec/integration/client/client_spec.rb +65 -66
- 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 +261 -261
- data/spec/integration/knife/chef_repository_file_system_spec.rb +84 -84
- data/spec/integration/knife/chefignore_spec.rb +82 -82
- 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/delete_spec.rb +262 -248
- data/spec/integration/knife/deps_spec.rb +301 -301
- data/spec/integration/knife/diff_spec.rb +237 -237
- data/spec/integration/knife/download_spec.rb +532 -401
- data/spec/integration/knife/list_spec.rb +310 -116
- data/spec/integration/knife/raw_spec.rb +39 -39
- data/spec/integration/knife/redirection_spec.rb +12 -12
- 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 +661 -550
- data/spec/integration/recipes/lwrp_inline_resources_spec.rb +18 -18
- data/spec/integration/recipes/lwrp_spec.rb +7 -7
- data/spec/integration/recipes/provider_choice.rb +3 -2
- data/spec/integration/recipes/recipe_dsl_spec.rb +151 -124
- data/spec/integration/recipes/remote_directory.rb +2 -2
- data/spec/integration/recipes/resource_action_spec.rb +439 -328
- data/spec/integration/recipes/resource_converge_if_changed_spec.rb +12 -11
- data/spec/integration/recipes/resource_load_spec.rb +35 -33
- data/spec/integration/solo/solo_spec.rb +31 -32
- data/spec/scripts/ssl-serve.rb +12 -17
- data/spec/spec_helper.rb +48 -43
- 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 +8 -8
- data/spec/support/chef_helpers.rb +5 -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 +4 -4
- data/spec/support/lib/chef/resource/one_two_three_four.rb +2 -2
- 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 +3 -3
- data/spec/support/mock/platform.rb +5 -5
- data/spec/support/platform_helpers.rb +36 -23
- 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 +3 -3
- data/spec/support/shared/context/client.rb +22 -14
- data/spec/support/shared/context/config.rb +3 -3
- data/spec/support/shared/context/win32.rb +9 -9
- 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 +8 -8
- data/spec/support/shared/functional/file_resource.rb +20 -23
- data/spec/support/shared/functional/http.rb +33 -34
- data/spec/support/shared/functional/knife.rb +3 -3
- data/spec/support/shared/functional/securable_resource.rb +48 -48
- data/spec/support/shared/functional/securable_resource_with_reporting.rb +8 -12
- data/spec/support/shared/functional/win32_service.rb +3 -5
- data/spec/support/shared/functional/windows_script.rb +13 -13
- data/spec/support/shared/integration/app_server_support.rb +7 -7
- data/spec/support/shared/integration/integration_helper.rb +21 -21
- data/spec/support/shared/integration/knife_support.rb +13 -13
- data/spec/support/shared/matchers/exit_with_code.rb +2 -2
- data/spec/support/shared/matchers/match_environment_variable.rb +2 -2
- data/spec/support/shared/unit/api_error_inspector.rb +3 -5
- data/spec/support/shared/unit/api_versioning.rb +8 -8
- data/spec/support/shared/unit/execute_resource.rb +4 -4
- 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 +5 -2
- data/spec/support/shared/unit/platform_introspector.rb +35 -37
- data/spec/support/shared/unit/provider/file.rb +29 -40
- data/spec/support/shared/unit/provider/useradd_based_user_provider.rb +50 -51
- data/spec/support/shared/unit/resource/static_provider_resolution.rb +2 -5
- data/spec/support/shared/unit/script_resource.rb +10 -10
- data/spec/support/shared/unit/user_and_client_shared.rb +5 -6
- data/spec/support/shared/unit/windows_script_resource.rb +6 -7
- data/spec/tiny_server.rb +24 -24
- data/spec/unit/api_client/registration_spec.rb +41 -38
- data/spec/unit/api_client_spec.rb +13 -16
- data/spec/unit/api_client_v1_spec.rb +17 -19
- data/spec/unit/application/apply_spec.rb +3 -3
- data/spec/unit/application/client_spec.rb +12 -9
- data/spec/unit/application/knife_spec.rb +69 -17
- data/spec/unit/application/solo_spec.rb +29 -48
- data/spec/unit/application_spec.rb +171 -151
- data/spec/unit/audit/audit_event_proxy_spec.rb +13 -13
- data/spec/unit/audit/audit_reporter_spec.rb +18 -25
- data/spec/unit/audit/control_group_data_spec.rb +16 -17
- 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 +5 -5
- data/spec/unit/chef_fs/config_spec.rb +14 -18
- data/spec/unit/chef_fs/data_handler/group_handler_spec.rb +17 -17
- data/spec/unit/chef_fs/diff_spec.rb +75 -75
- data/spec/unit/chef_fs/file_pattern_spec.rb +368 -369
- data/spec/unit/chef_fs/file_system/cookbook_subdir_spec.rb +9 -9
- data/spec/unit/chef_fs/file_system/operation_failed_error_spec.rb +9 -9
- data/spec/unit/chef_fs/file_system_spec.rb +74 -74
- data/spec/unit/chef_fs/parallelizer.rb +63 -66
- data/spec/unit/chef_fs/path_util_spec.rb +45 -45
- data/spec/unit/chef_spec.rb +3 -3
- data/spec/unit/client_spec.rb +44 -44
- data/spec/unit/config_fetcher_spec.rb +56 -28
- data/spec/unit/config_spec.rb +2 -2
- data/spec/unit/cookbook/chefignore_spec.rb +12 -12
- data/spec/unit/cookbook/cookbook_version_loader_spec.rb +5 -6
- data/spec/unit/cookbook/file_vendor_spec.rb +8 -9
- data/spec/unit/cookbook/metadata_spec.rb +73 -76
- data/spec/unit/cookbook/synchronizer_spec.rb +31 -32
- data/spec/unit/cookbook/syntax_check_spec.rb +22 -22
- data/spec/unit/cookbook_loader_spec.rb +9 -10
- data/spec/unit/cookbook_manifest_spec.rb +27 -28
- data/spec/unit/cookbook_site_streaming_uploader_spec.rb +24 -24
- data/spec/unit/cookbook_spec.rb +3 -3
- data/spec/unit/cookbook_uploader_spec.rb +10 -11
- data/spec/unit/cookbook_version_file_specificity_spec.rb +49 -50
- data/spec/unit/cookbook_version_spec.rb +45 -48
- data/spec/unit/daemon_spec.rb +5 -5
- data/spec/unit/data_bag_item_spec.rb +29 -30
- data/spec/unit/data_bag_spec.rb +47 -47
- data/spec/unit/deprecation_spec.rb +11 -11
- data/spec/unit/digester_spec.rb +5 -6
- data/spec/unit/dsl/audit_spec.rb +5 -5
- data/spec/unit/dsl/data_query_spec.rb +12 -12
- data/spec/unit/dsl/platform_introspection_spec.rb +19 -20
- data/spec/unit/dsl/reboot_pending_spec.rb +17 -17
- data/spec/unit/dsl/recipe_spec.rb +4 -6
- data/spec/unit/dsl/regsitry_helper_spec.rb +9 -12
- data/spec/unit/dsl/resources_spec.rb +13 -13
- data/spec/unit/encrypted_data_bag_item/check_encrypted_spec.rb +7 -7
- data/spec/unit/encrypted_data_bag_item_spec.rb +11 -11
- data/spec/unit/environment_spec.rb +53 -53
- data/spec/unit/event_dispatch/dispatcher_spec.rb +3 -4
- data/spec/unit/event_dispatch/dsl_spec.rb +16 -16
- data/spec/unit/exceptions_spec.rb +10 -10
- data/spec/unit/file_access_control_spec.rb +32 -32
- 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/formatters/base_spec.rb +29 -6
- data/spec/unit/formatters/doc_spec.rb +7 -7
- data/spec/unit/formatters/error_inspectors/api_error_formatting_spec.rb +9 -10
- data/spec/unit/formatters/error_inspectors/compile_error_inspector_spec.rb +11 -11
- 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 +9 -9
- 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 +7 -7
- data/spec/unit/http/authenticator_spec.rb +9 -7
- data/spec/unit/http/basic_client_spec.rb +3 -3
- 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 +9 -9
- data/spec/unit/http_spec.rb +18 -18
- data/spec/unit/json_compat_spec.rb +16 -9
- data/spec/unit/key_spec.rb +41 -44
- data/spec/unit/knife/bootstrap/chef_vault_handler_spec.rb +41 -42
- data/spec/unit/knife/bootstrap/client_builder_spec.rb +30 -28
- data/spec/unit/knife/bootstrap_spec.rb +75 -37
- data/spec/unit/knife/client_bulk_delete_spec.rb +6 -6
- data/spec/unit/knife/client_create_spec.rb +11 -12
- data/spec/unit/knife/client_delete_spec.rb +13 -13
- data/spec/unit/knife/client_edit_spec.rb +9 -9
- 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 +19 -20
- 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 +32 -32
- 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 +55 -55
- data/spec/unit/knife/cookbook_show_spec.rb +33 -34
- data/spec/unit/knife/cookbook_site_download_spec.rb +51 -53
- data/spec/unit/knife/cookbook_site_install_spec.rb +10 -8
- data/spec/unit/knife/cookbook_site_share_spec.rb +42 -42
- data/spec/unit/knife/cookbook_site_unshare_spec.rb +20 -20
- data/spec/unit/knife/cookbook_test_spec.rb +6 -6
- data/spec/unit/knife/cookbook_upload_spec.rb +69 -69
- data/spec/unit/knife/core/bootstrap_context_spec.rb +39 -33
- data/spec/unit/knife/core/cookbook_scm_repo_spec.rb +32 -32
- data/spec/unit/knife/core/custom_manifest_loader_spec.rb +3 -3
- data/spec/unit/knife/core/gem_glob_loader_spec.rb +23 -24
- data/spec/unit/knife/core/hashed_command_loader_spec.rb +8 -8
- 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 +10 -10
- data/spec/unit/knife/core/ui_spec.rb +45 -45
- data/spec/unit/knife/data_bag_create_spec.rb +14 -14
- data/spec/unit/knife/data_bag_edit_spec.rb +12 -12
- data/spec/unit/knife/data_bag_from_file_spec.rb +9 -9
- data/spec/unit/knife/data_bag_secret_options_spec.rb +6 -6
- data/spec/unit/knife/data_bag_show_spec.rb +19 -19
- data/spec/unit/knife/environment_compare_spec.rb +32 -32
- data/spec/unit/knife/environment_create_spec.rb +2 -2
- data/spec/unit/knife/environment_delete_spec.rb +2 -2
- data/spec/unit/knife/environment_edit_spec.rb +2 -2
- 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 +11 -12
- data/spec/unit/knife/key_delete_spec.rb +8 -10
- data/spec/unit/knife/key_edit_spec.rb +14 -17
- data/spec/unit/knife/key_helper.rb +2 -2
- data/spec/unit/knife/key_list_spec.rb +13 -13
- data/spec/unit/knife/key_show_spec.rb +11 -11
- 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 +4 -4
- data/spec/unit/knife/node_edit_spec.rb +17 -18
- data/spec/unit/knife/node_environment_set_spec.rb +4 -4
- data/spec/unit/knife/node_from_file_spec.rb +5 -5
- data/spec/unit/knife/node_list_spec.rb +5 -6
- data/spec/unit/knife/node_run_list_add_spec.rb +5 -8
- data/spec/unit/knife/node_run_list_remove_spec.rb +27 -27
- data/spec/unit/knife/node_run_list_set_spec.rb +4 -4
- data/spec/unit/knife/node_show_spec.rb +6 -6
- data/spec/unit/knife/osc_user_create_spec.rb +7 -7
- data/spec/unit/knife/osc_user_delete_spec.rb +7 -7
- data/spec/unit/knife/osc_user_edit_spec.rb +6 -6
- 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 +4 -4
- data/spec/unit/knife/role_create_spec.rb +4 -4
- data/spec/unit/knife/role_delete_spec.rb +4 -4
- data/spec/unit/knife/role_edit_spec.rb +4 -6
- data/spec/unit/knife/role_env_run_list_add_spec.rb +9 -9
- data/spec/unit/knife/role_env_run_list_clear_spec.rb +38 -44
- data/spec/unit/knife/role_env_run_list_remove_spec.rb +46 -52
- data/spec/unit/knife/role_env_run_list_replace_spec.rb +49 -52
- data/spec/unit/knife/role_env_run_list_set_spec.rb +17 -20
- data/spec/unit/knife/role_from_file_spec.rb +7 -7
- data/spec/unit/knife/role_list_spec.rb +5 -7
- data/spec/unit/knife/role_run_list_add_spec.rb +7 -7
- data/spec/unit/knife/role_run_list_clear_spec.rb +28 -34
- data/spec/unit/knife/role_run_list_remove_spec.rb +36 -42
- data/spec/unit/knife/role_run_list_replace_spec.rb +42 -45
- data/spec/unit/knife/role_run_list_set_spec.rb +6 -9
- data/spec/unit/knife/role_show_spec.rb +14 -14
- data/spec/unit/knife/ssh_spec.rb +36 -36
- data/spec/unit/knife/ssl_check_spec.rb +7 -7
- data/spec/unit/knife/ssl_fetch_spec.rb +8 -8
- data/spec/unit/knife/status_spec.rb +5 -5
- data/spec/unit/knife/tag_create_spec.rb +1 -1
- data/spec/unit/knife/tag_delete_spec.rb +1 -1
- data/spec/unit/knife/tag_list_spec.rb +2 -2
- data/spec/unit/knife/user_create_spec.rb +30 -30
- data/spec/unit/knife/user_delete_spec.rb +11 -11
- data/spec/unit/knife/user_edit_spec.rb +9 -9
- 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 +61 -61
- 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 +41 -43
- data/spec/unit/mash_spec.rb +8 -8
- data/spec/unit/mixin/api_version_request_handling_spec.rb +13 -14
- data/spec/unit/mixin/checksum_spec.rb +5 -6
- data/spec/unit/mixin/command_spec.rb +9 -9
- 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 +5 -5
- data/spec/unit/mixin/enforce_ownership_and_permissions_spec.rb +9 -9
- data/spec/unit/mixin/homebrew_user_spec.rb +13 -13
- data/spec/unit/mixin/params_validate_spec.rb +71 -71
- data/spec/unit/mixin/path_sanity_spec.rb +16 -16
- data/spec/unit/mixin/powershell_out_spec.rb +9 -9
- data/spec/unit/mixin/powershell_type_coercions_spec.rb +34 -23
- data/spec/unit/mixin/properties_spec.rb +27 -27
- data/spec/unit/mixin/proxified_socket_spec.rb +6 -6
- data/spec/unit/mixin/securable_spec.rb +37 -37
- data/spec/unit/mixin/shell_out_spec.rb +68 -68
- data/spec/unit/mixin/subclass_directive_spec.rb +2 -2
- data/spec/unit/mixin/template_spec.rb +15 -12
- 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 +14 -17
- data/spec/unit/mixin/xml_escape_spec.rb +3 -3
- 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 +203 -248
- data/spec/unit/node/immutable_collections_spec.rb +20 -21
- data/spec/unit/node_map_spec.rb +5 -5
- data/spec/unit/node_spec.rb +165 -135
- data/spec/unit/org_spec.rb +17 -17
- data/spec/unit/platform/query_helpers_spec.rb +23 -23
- data/spec/unit/platform_spec.rb +17 -17
- data/spec/unit/policy_builder/dynamic_spec.rb +8 -10
- data/spec/unit/policy_builder/expand_node_object_spec.rb +16 -14
- data/spec/unit/policy_builder/policyfile_spec.rb +30 -37
- data/spec/unit/policy_builder_spec.rb +4 -4
- data/spec/unit/property/state_spec.rb +58 -56
- data/spec/unit/property/validation_spec.rb +255 -216
- data/spec/unit/property_spec.rb +206 -129
- data/spec/unit/provider/apt_update_spec.rb +113 -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 +11 -11
- data/spec/unit/provider/cron/unix_spec.rb +7 -7
- data/spec/unit/provider/cron_spec.rb +67 -67
- 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 +24 -25
- data/spec/unit/provider/directory_spec.rb +12 -12
- data/spec/unit/provider/dsc_resource_spec.rb +29 -27
- data/spec/unit/provider/dsc_script_spec.rb +47 -48
- data/spec/unit/provider/env/windows_spec.rb +21 -21
- 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 +5 -5
- data/spec/unit/provider/file/content_spec.rb +4 -4
- data/spec/unit/provider/file_spec.rb +8 -9
- data/spec/unit/provider/git_spec.rb +64 -65
- data/spec/unit/provider/group/dscl_spec.rb +7 -7
- data/spec/unit/provider/group/gpasswd_spec.rb +3 -3
- data/spec/unit/provider/group/groupadd_spec.rb +9 -9
- data/spec/unit/provider/group/groupmod_spec.rb +12 -12
- data/spec/unit/provider/group/pw_spec.rb +3 -3
- data/spec/unit/provider/group/usermod_spec.rb +6 -6
- data/spec/unit/provider/group/windows_spec.rb +3 -3
- 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 +5 -5
- data/spec/unit/provider/link_spec.rb +12 -12
- data/spec/unit/provider/log_spec.rb +2 -2
- data/spec/unit/provider/mdadm_spec.rb +12 -12
- data/spec/unit/provider/mount/aix_spec.rb +7 -7
- data/spec/unit/provider/mount/mount_spec.rb +20 -20
- data/spec/unit/provider/mount/solaris_spec.rb +26 -26
- data/spec/unit/provider/mount/windows_spec.rb +8 -8
- data/spec/unit/provider/mount_spec.rb +7 -8
- data/spec/unit/provider/ohai_spec.rb +13 -13
- data/spec/unit/provider/osx_profile_spec.rb +249 -0
- data/spec/unit/provider/package/aix_spec.rb +5 -5
- data/spec/unit/provider/package/apt_spec.rb +49 -49
- data/spec/unit/provider/package/chocolatey_spec.rb +504 -0
- data/spec/unit/provider/package/dpkg_spec.rb +32 -36
- data/spec/unit/provider/package/easy_install_spec.rb +11 -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 +12 -19
- 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 +2 -2
- data/spec/unit/provider/package/rpm_spec.rb +7 -11
- data/spec/unit/provider/package/rubygems_spec.rb +386 -289
- 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 +17 -81
- data/spec/unit/provider/package/windows/msi_spec.rb +16 -16
- data/spec/unit/provider/package/windows_spec.rb +50 -40
- data/spec/unit/provider/package/yum_spec.rb +179 -181
- data/spec/unit/provider/package/zypper_spec.rb +53 -50
- data/spec/unit/provider/package_spec.rb +104 -104
- data/spec/unit/provider/powershell_script_spec.rb +20 -20
- data/spec/unit/provider/registry_key_spec.rb +3 -3
- data/spec/unit/provider/remote_directory_spec.rb +46 -46
- data/spec/unit/provider/remote_file/cache_control_data_spec.rb +9 -10
- data/spec/unit/provider/remote_file/content_spec.rb +5 -6
- data/spec/unit/provider/remote_file/fetcher_spec.rb +3 -3
- data/spec/unit/provider/remote_file/ftp_spec.rb +3 -3
- data/spec/unit/provider/remote_file/http_spec.rb +10 -12
- data/spec/unit/provider/remote_file/local_file_spec.rb +2 -2
- data/spec/unit/provider/remote_file/network_file_spec.rb +2 -2
- data/spec/unit/provider/remote_file_spec.rb +9 -11
- data/spec/unit/provider/route_spec.rb +26 -27
- data/spec/unit/provider/ruby_block_spec.rb +4 -5
- data/spec/unit/provider/script_spec.rb +11 -11
- data/spec/unit/provider/service/aix_service_spec.rb +5 -6
- 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 +37 -37
- data/spec/unit/provider/service/freebsd_service_spec.rb +9 -9
- data/spec/unit/provider/service/gentoo_service_spec.rb +4 -4
- 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 +26 -26
- data/spec/unit/provider/service/openbsd_service_spec.rb +26 -26
- data/spec/unit/provider/service/redhat_spec.rb +16 -16
- data/spec/unit/provider/service/simple_service_spec.rb +5 -5
- data/spec/unit/provider/service/solaris_smf_service_spec.rb +51 -51
- data/spec/unit/provider/service/systemd_service_spec.rb +4 -4
- data/spec/unit/provider/service/upstart_service_spec.rb +13 -13
- data/spec/unit/provider/service/windows_spec.rb +28 -37
- data/spec/unit/provider/service_spec.rb +2 -3
- data/spec/unit/provider/subversion_spec.rb +27 -28
- data/spec/unit/provider/template/content_spec.rb +21 -21
- data/spec/unit/provider/template_spec.rb +15 -16
- data/spec/unit/provider/user/dscl_spec.rb +36 -37
- data/spec/unit/provider/user/pw_spec.rb +12 -12
- data/spec/unit/provider/user/solaris_spec.rb +31 -31
- data/spec/unit/provider/user/useradd_spec.rb +10 -10
- data/spec/unit/provider/user/windows_spec.rb +9 -9
- data/spec/unit/provider/user_spec.rb +19 -20
- data/spec/unit/provider/whyrun_safe_ruby_block_spec.rb +3 -4
- data/spec/unit/provider_resolver_spec.rb +63 -62
- data/spec/unit/provider_spec.rb +7 -8
- data/spec/unit/pure_application_spec.rb +3 -3
- data/spec/unit/recipe_spec.rb +13 -16
- data/spec/unit/resource/apt_package_spec.rb +4 -4
- data/spec/unit/resource/apt_update_spec.rb +38 -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 +3 -3
- data/spec/unit/resource/chef_gem_spec.rb +5 -9
- 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 +12 -12
- data/spec/unit/resource/cookbook_file_spec.rb +23 -24
- data/spec/unit/resource/cron_spec.rb +4 -4
- data/spec/unit/resource/csh_spec.rb +3 -3
- data/spec/unit/resource/deploy_revision_spec.rb +3 -3
- data/spec/unit/resource/deploy_spec.rb +23 -24
- 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 +11 -11
- data/spec/unit/resource/dsc_script_spec.rb +15 -15
- data/spec/unit/resource/easy_install_package_spec.rb +3 -3
- 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 +11 -11
- data/spec/unit/resource/file_spec.rb +10 -10
- data/spec/unit/resource/freebsd_package_spec.rb +6 -9
- data/spec/unit/resource/gem_package_spec.rb +4 -4
- data/spec/unit/resource/git_spec.rb +3 -3
- data/spec/unit/resource/group_spec.rb +4 -4
- data/spec/unit/resource/homebrew_package_spec.rb +13 -13
- 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 +4 -4
- data/spec/unit/resource/ksh_spec.rb +2 -2
- 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 +3 -3
- data/spec/unit/resource/mdadm_spec.rb +3 -3
- data/spec/unit/resource/mount_spec.rb +7 -7
- 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 +61 -0
- data/spec/unit/resource/package_spec.rb +6 -6
- data/spec/unit/resource/pacman_package_spec.rb +3 -3
- data/spec/unit/resource/perl_spec.rb +3 -3
- data/spec/unit/resource/portage_package_spec.rb +2 -2
- data/spec/unit/resource/powershell_script_spec.rb +16 -16
- data/spec/unit/resource/python_spec.rb +3 -3
- data/spec/unit/resource/registry_key_spec.rb +21 -21
- data/spec/unit/resource/remote_directory_spec.rb +3 -3
- data/spec/unit/resource/remote_file_spec.rb +15 -15
- data/spec/unit/resource/resource_notification_spec.rb +18 -18
- data/spec/unit/resource/route_spec.rb +3 -3
- data/spec/unit/resource/rpm_package_spec.rb +4 -4
- 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 +4 -5
- data/spec/unit/resource/smartos_package_spec.rb +3 -3
- data/spec/unit/resource/solaris_package_spec.rb +3 -3
- data/spec/unit/resource/subversion_spec.rb +5 -5
- 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 +4 -4
- data/spec/unit/resource/windows_package_spec.rb +7 -7
- data/spec/unit/resource/windows_service_spec.rb +3 -3
- data/spec/unit/resource/yum_package_spec.rb +6 -6
- 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 +8 -9
- data/spec/unit/resource_definition_spec.rb +3 -3
- data/spec/unit/resource_reporter_spec.rb +56 -64
- data/spec/unit/resource_resolver_spec.rb +5 -6
- data/spec/unit/resource_spec.rb +80 -60
- data/spec/unit/rest/auth_credentials_spec.rb +39 -71
- data/spec/unit/rest_spec.rb +96 -90
- data/spec/unit/role_spec.rb +64 -68
- data/spec/unit/run_context/child_run_context_spec.rb +23 -23
- data/spec/unit/run_context/cookbook_compiler_spec.rb +5 -7
- data/spec/unit/run_context_spec.rb +19 -19
- data/spec/unit/run_list/run_list_expansion_spec.rb +24 -24
- data/spec/unit/run_list/run_list_item_spec.rb +28 -28
- data/spec/unit/run_list/versioned_recipe_list_spec.rb +22 -23
- data/spec/unit/run_list_spec.rb +37 -41
- data/spec/unit/run_lock_spec.rb +10 -10
- data/spec/unit/run_status_spec.rb +4 -5
- data/spec/unit/runner_spec.rb +8 -8
- data/spec/unit/scan_access_control_spec.rb +4 -5
- data/spec/unit/search/query_spec.rb +50 -46
- 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 +8 -9
- 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 +22 -23
- data/spec/unit/util/backup_spec.rb +17 -18
- data/spec/unit/util/diff_spec.rb +6 -9
- data/spec/unit/util/dsc/configuration_generator_spec.rb +48 -48
- data/spec/unit/util/dsc/lcm_output_parser_spec.rb +22 -22
- data/spec/unit/util/dsc/local_configuration_manager_spec.rb +30 -31
- data/spec/unit/util/dsc/resource_store.rb +22 -22
- data/spec/unit/util/editor_spec.rb +65 -65
- data/spec/unit/util/file_edit_spec.rb +7 -7
- data/spec/unit/util/powershell/cmdlet_spec.rb +27 -27
- data/spec/unit/util/powershell/ps_credential_spec.rb +13 -13
- 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 +25 -25
- data/spec/unit/windows_service_spec.rb +20 -20
- data/tasks/cbgb.rb +84 -0
- data/tasks/external_tests.rb +12 -11
- data/tasks/maintainers.rb +15 -15
- data/tasks/rspec.rb +18 -15
- metadata +250 -67
- data/lib/chef/chef_fs/file_system/acl_dir.rb +0 -63
- data/lib/chef/chef_fs/file_system/acl_entry.rb +0 -58
- data/lib/chef/chef_fs/file_system/acls_dir.rb +0 -72
- data/lib/chef/chef_fs/file_system/chef_repository_file_system_cookbook_dir.rb +0 -102
- data/lib/chef/chef_fs/file_system/chef_repository_file_system_cookbook_entry.rb +0 -80
- data/lib/chef/chef_fs/file_system/chef_repository_file_system_cookbooks_dir.rb +0 -82
- data/lib/chef/chef_fs/file_system/chef_repository_file_system_entry.rb +0 -81
- data/lib/chef/chef_fs/file_system/chef_repository_file_system_root_dir.rb +0 -196
- data/lib/chef/chef_fs/file_system/chef_server_root_dir.rb +0 -165
- 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 -59
- data/lib/chef/chef_fs/file_system/cookbooks_acl_dir.rb +0 -41
- data/lib/chef/chef_fs/file_system/cookbooks_dir.rb +0 -156
- 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 -71
- data/lib/chef/chef_fs/file_system/environments_dir.rb +0 -60
- data/lib/chef/chef_fs/file_system/file_system_entry.rb +0 -115
- data/lib/chef/chef_fs/file_system/memory_dir.rb +0 -51
- 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/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 -110
- data/lib/chef/chef_fs/file_system/rest_list_entry.rb +0 -185
@@ -1,6 +1,6 @@
|
|
1
1
|
#
|
2
|
-
# Author:: Adam Jacob (<adam@
|
3
|
-
# Copyright:: Copyright
|
2
|
+
# Author:: Adam Jacob (<adam@chef.io>)
|
3
|
+
# Copyright:: Copyright 2008-2016, Chef Software, Inc.
|
4
4
|
# License:: Apache License, Version 2.0
|
5
5
|
#
|
6
6
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -16,18 +16,18 @@
|
|
16
16
|
# limitations under the License.
|
17
17
|
#
|
18
18
|
|
19
|
-
require
|
20
|
-
require
|
19
|
+
require "spec_helper"
|
20
|
+
require "securerandom"
|
21
21
|
|
22
22
|
describe Chef::Provider::Package::Yum do
|
23
23
|
before(:each) do
|
24
24
|
@node = Chef::Node.new
|
25
25
|
@events = Chef::EventDispatch::Dispatcher.new
|
26
26
|
@run_context = Chef::RunContext.new(@node, {}, @events)
|
27
|
-
@new_resource = Chef::Resource::YumPackage.new(
|
27
|
+
@new_resource = Chef::Resource::YumPackage.new("cups")
|
28
28
|
@status = double("Status", :exitstatus => 0)
|
29
29
|
@yum_cache = double(
|
30
|
-
|
30
|
+
"Chef::Provider::Yum::YumCache",
|
31
31
|
:reload_installed => true,
|
32
32
|
:reset => true,
|
33
33
|
:installed_version => "1.2.4-11.18.el5",
|
@@ -36,7 +36,7 @@ describe Chef::Provider::Package::Yum do
|
|
36
36
|
:version_available? => true,
|
37
37
|
:allow_multi_install => [ "kernel" ],
|
38
38
|
:package_repository => "base",
|
39
|
-
:disable_extra_repo_control => true
|
39
|
+
:disable_extra_repo_control => true,
|
40
40
|
)
|
41
41
|
allow(Chef::Provider::Package::Yum::YumCache).to receive(:instance).and_return(@yum_cache)
|
42
42
|
allow(@yum_cache).to receive(:yum_binary=).with("yum")
|
@@ -77,15 +77,15 @@ describe Chef::Provider::Package::Yum do
|
|
77
77
|
|
78
78
|
describe "when source is provided" do
|
79
79
|
it "should set the candidate version" do
|
80
|
-
@new_resource = Chef::Resource::YumPackage.new(
|
80
|
+
@new_resource = Chef::Resource::YumPackage.new("testing.source")
|
81
81
|
@new_resource.source "chef-server-core-12.0.5-1.rpm"
|
82
82
|
@provider = Chef::Provider::Package::Yum.new(@new_resource, @run_context)
|
83
83
|
allow(File).to receive(:exists?).with(@new_resource.source).and_return(true)
|
84
84
|
allow(@yum_cache).to receive(:installed_version).and_return(nil)
|
85
|
-
shellout_double = double(:stdout =>
|
85
|
+
shellout_double = double(:stdout => "chef-server-core 12.0.5-1")
|
86
86
|
allow(@provider).to receive(:shell_out!).and_return(shellout_double)
|
87
87
|
@provider.load_current_resource
|
88
|
-
expect(@provider.candidate_version).to eql(
|
88
|
+
expect(@provider.candidate_version).to eql("12.0.5-1")
|
89
89
|
end
|
90
90
|
end
|
91
91
|
|
@@ -113,7 +113,7 @@ describe Chef::Provider::Package::Yum do
|
|
113
113
|
end
|
114
114
|
|
115
115
|
it "when the new_resource is a vanilla package class and yum-deprecated exists" do
|
116
|
-
@new_resource = Chef::Resource::Package.new(
|
116
|
+
@new_resource = Chef::Resource::Package.new("cups")
|
117
117
|
expect(File).to receive(:exist?).with("/usr/bin/yum-deprecated").and_return(true)
|
118
118
|
expect(@yum_cache).to receive(:yum_binary=).with("yum-deprecated")
|
119
119
|
@provider = Chef::Provider::Package::Yum.new(@new_resource, @run_context)
|
@@ -121,7 +121,7 @@ describe Chef::Provider::Package::Yum do
|
|
121
121
|
end
|
122
122
|
|
123
123
|
it "when the new_resource is a vanilla package class and yum-deprecated does not exist" do
|
124
|
-
@new_resource = Chef::Resource::Package.new(
|
124
|
+
@new_resource = Chef::Resource::Package.new("cups")
|
125
125
|
expect(File).to receive(:exist?).with("/usr/bin/yum-deprecated").and_return(false)
|
126
126
|
expect(@yum_cache).to receive(:yum_binary=).with("yum")
|
127
127
|
@provider = Chef::Provider::Package::Yum.new(@new_resource, @run_context)
|
@@ -131,9 +131,9 @@ describe Chef::Provider::Package::Yum do
|
|
131
131
|
|
132
132
|
describe "when arch in package_name" do
|
133
133
|
it "should set the arch if no existing package_name is found and new_package_name+new_arch is available" do
|
134
|
-
@new_resource = Chef::Resource::YumPackage.new(
|
134
|
+
@new_resource = Chef::Resource::YumPackage.new("testing.noarch")
|
135
135
|
@yum_cache = double(
|
136
|
-
|
136
|
+
"Chef::Provider::Yum::YumCache"
|
137
137
|
)
|
138
138
|
allow(@yum_cache).to receive(:installed_version) do |package_name, arch|
|
139
139
|
# nothing installed for package_name/new_package_name
|
@@ -157,7 +157,7 @@ describe Chef::Provider::Package::Yum do
|
|
157
157
|
expect(@provider.new_resource.arch).to eq("noarch")
|
158
158
|
expect(@provider.arch).to eq("noarch")
|
159
159
|
|
160
|
-
@new_resource = Chef::Resource::YumPackage.new(
|
160
|
+
@new_resource = Chef::Resource::YumPackage.new("testing.more.noarch")
|
161
161
|
@provider = Chef::Provider::Package::Yum.new(@new_resource, @run_context)
|
162
162
|
@provider.load_current_resource
|
163
163
|
expect(@provider.new_resource.package_name).to eq("testing.more")
|
@@ -167,12 +167,12 @@ describe Chef::Provider::Package::Yum do
|
|
167
167
|
|
168
168
|
describe "when version constraint in package_name" do
|
169
169
|
it "should set package_version if no existing package_name is found and new_package_name is available" do
|
170
|
-
@new_resource = Chef::Resource::Package.new(
|
170
|
+
@new_resource = Chef::Resource::Package.new("cups = 1.2.4-11.18.el5_2.3")
|
171
171
|
@provider = Chef::Provider::Package::Yum.new(@new_resource, @run_context)
|
172
|
-
allow(@yum_cache).to receive(:package_available?) { |pkg| pkg ==
|
172
|
+
allow(@yum_cache).to receive(:package_available?) { |pkg| pkg == "cups" ? true : false }
|
173
173
|
allow(@yum_cache).to receive(:packages_from_require) do |pkg|
|
174
174
|
[Chef::Provider::Package::Yum::RPMDbPackage.new("cups", "1.2.4-11.18.el5_2.3", "noarch", [], false, true, "base"),
|
175
|
-
Chef::Provider::Package::Yum::RPMDbPackage.new("cups", "1.2.4-11.18.el5_2.2", "noarch", [], false, true, "base")
|
175
|
+
Chef::Provider::Package::Yum::RPMDbPackage.new("cups", "1.2.4-11.18.el5_2.2", "noarch", [], false, true, "base")]
|
176
176
|
end
|
177
177
|
expect(Chef::Log).to receive(:debug).exactly(1).times.with(%r{checking yum info})
|
178
178
|
expect(Chef::Log).to receive(:debug).exactly(1).times.with(%r{installed version})
|
@@ -186,9 +186,9 @@ describe Chef::Provider::Package::Yum do
|
|
186
186
|
end
|
187
187
|
|
188
188
|
it "should not set the arch when an existing package_name is found" do
|
189
|
-
@new_resource = Chef::Resource::YumPackage.new(
|
189
|
+
@new_resource = Chef::Resource::YumPackage.new("testing.beta3")
|
190
190
|
@yum_cache = double(
|
191
|
-
|
191
|
+
"Chef::Provider::Yum::YumCache"
|
192
192
|
)
|
193
193
|
allow(@yum_cache).to receive(:installed_version) do |package_name, arch|
|
194
194
|
# installed for package_name
|
@@ -213,7 +213,7 @@ describe Chef::Provider::Package::Yum do
|
|
213
213
|
expect(@provider.new_resource.arch).to eq(nil)
|
214
214
|
expect(@provider.arch).to eq(nil)
|
215
215
|
|
216
|
-
@new_resource = Chef::Resource::YumPackage.new(
|
216
|
+
@new_resource = Chef::Resource::YumPackage.new("testing.beta3.more")
|
217
217
|
@provider = Chef::Provider::Package::Yum.new(@new_resource, @run_context)
|
218
218
|
@provider.load_current_resource
|
219
219
|
expect(@provider.new_resource.package_name).to eq("testing.beta3.more")
|
@@ -222,9 +222,9 @@ describe Chef::Provider::Package::Yum do
|
|
222
222
|
end
|
223
223
|
|
224
224
|
it "should not set the arch when no existing package_name or new_package_name+new_arch is found" do
|
225
|
-
@new_resource = Chef::Resource::YumPackage.new(
|
225
|
+
@new_resource = Chef::Resource::YumPackage.new("testing.beta3")
|
226
226
|
@yum_cache = double(
|
227
|
-
|
227
|
+
"Chef::Provider::Yum::YumCache"
|
228
228
|
)
|
229
229
|
allow(@yum_cache).to receive(:installed_version) do |package_name, arch|
|
230
230
|
# nothing installed for package_name/new_package_name
|
@@ -244,7 +244,7 @@ describe Chef::Provider::Package::Yum do
|
|
244
244
|
expect(@provider.new_resource.arch).to eq(nil)
|
245
245
|
expect(@provider.arch).to eq(nil)
|
246
246
|
|
247
|
-
@new_resource = Chef::Resource::YumPackage.new(
|
247
|
+
@new_resource = Chef::Resource::YumPackage.new("testing.beta3.more")
|
248
248
|
@provider = Chef::Provider::Package::Yum.new(@new_resource, @run_context)
|
249
249
|
@provider.load_current_resource
|
250
250
|
expect(@provider.new_resource.package_name).to eq("testing.beta3.more")
|
@@ -253,14 +253,14 @@ describe Chef::Provider::Package::Yum do
|
|
253
253
|
end
|
254
254
|
|
255
255
|
it "should ensure it doesn't clobber an existing arch if passed" do
|
256
|
-
@new_resource = Chef::Resource::YumPackage.new(
|
256
|
+
@new_resource = Chef::Resource::YumPackage.new("testing.i386")
|
257
257
|
@new_resource.arch("x86_64")
|
258
258
|
@yum_cache = double(
|
259
|
-
|
259
|
+
"Chef::Provider::Yum::YumCache"
|
260
260
|
)
|
261
|
-
|
262
|
-
|
263
|
-
|
261
|
+
allow(@yum_cache).to receive(:installed_version) do |package_name, arch|
|
262
|
+
# nothing installed for package_name/new_package_name
|
263
|
+
nil
|
264
264
|
end
|
265
265
|
allow(@yum_cache).to receive(:candidate_version) do |package_name, arch|
|
266
266
|
if package_name == "testing.noarch"
|
@@ -282,13 +282,13 @@ describe Chef::Provider::Package::Yum do
|
|
282
282
|
end
|
283
283
|
|
284
284
|
it "should flush the cache if :before is true" do
|
285
|
-
allow(@new_resource).to receive(:flush_cache).and_return({:after => false, :before => true})
|
285
|
+
allow(@new_resource).to receive(:flush_cache).and_return({ :after => false, :before => true })
|
286
286
|
expect(@yum_cache).to receive(:reload).once
|
287
287
|
@provider.load_current_resource
|
288
288
|
end
|
289
289
|
|
290
290
|
it "should flush the cache if :before is false" do
|
291
|
-
allow(@new_resource).to receive(:flush_cache).and_return({:after => false, :before => false})
|
291
|
+
allow(@new_resource).to receive(:flush_cache).and_return({ :after => false, :before => false })
|
292
292
|
expect(@yum_cache).not_to receive(:reload)
|
293
293
|
@provider.load_current_resource
|
294
294
|
end
|
@@ -313,14 +313,14 @@ describe Chef::Provider::Package::Yum do
|
|
313
313
|
|
314
314
|
context "when the package name isn't found" do
|
315
315
|
let(:yum_cache) { double(
|
316
|
-
|
316
|
+
"Chef::Provider::Yum::YumCache",
|
317
317
|
:reload_installed => true,
|
318
318
|
:reset => true,
|
319
319
|
:installed_version => "1.0.1.el5",
|
320
320
|
:candidate_version => "2.0.1.el5",
|
321
321
|
:package_available? => false,
|
322
322
|
:version_available? => true,
|
323
|
-
:disable_extra_repo_control => true
|
323
|
+
:disable_extra_repo_control => true,
|
324
324
|
)
|
325
325
|
}
|
326
326
|
|
@@ -334,71 +334,69 @@ describe Chef::Provider::Package::Yum do
|
|
334
334
|
it "should search provides then set package_name to match" do
|
335
335
|
@provider = Chef::Provider::Package::Yum.new(@new_resource, @run_context)
|
336
336
|
@provider.load_current_resource
|
337
|
-
expect(@new_resource.package_name).to eq(
|
337
|
+
expect(@new_resource.package_name).to eq("test-package")
|
338
338
|
expect(@new_resource.version).to eq(nil)
|
339
339
|
end
|
340
340
|
|
341
341
|
it "should search provides then set version to match if a requirement was passed in the package name" do
|
342
|
-
@new_resource = Chef::Resource::YumPackage.new(
|
342
|
+
@new_resource = Chef::Resource::YumPackage.new("test-package = 2.0.1.el5")
|
343
343
|
@provider = Chef::Provider::Package::Yum.new(@new_resource, @run_context)
|
344
344
|
@provider.load_current_resource
|
345
|
-
expect(@new_resource.package_name).to eq(
|
346
|
-
expect(@new_resource.version).to eq(
|
345
|
+
expect(@new_resource.package_name).to eq("test-package")
|
346
|
+
expect(@new_resource.version).to eq("2.0.1.el5")
|
347
347
|
end
|
348
348
|
|
349
|
-
|
350
349
|
it "should search provides then set version to match if a requirement was passed in the version" do
|
351
|
-
@new_resource = Chef::Resource::YumPackage.new(
|
352
|
-
@new_resource.version(
|
350
|
+
@new_resource = Chef::Resource::YumPackage.new("test-package")
|
351
|
+
@new_resource.version("= 2.0.1.el5")
|
353
352
|
@provider = Chef::Provider::Package::Yum.new(@new_resource, @run_context)
|
354
353
|
@provider.load_current_resource
|
355
|
-
expect(@new_resource.package_name).to eq(
|
356
|
-
expect(@new_resource.version).to eq(
|
354
|
+
expect(@new_resource.package_name).to eq("test-package")
|
355
|
+
expect(@new_resource.version).to eq("2.0.1.el5")
|
357
356
|
end
|
358
357
|
|
359
|
-
|
360
358
|
it "should search provides and not set the version to match if a specific version was requested" do
|
361
|
-
@new_resource = Chef::Resource::YumPackage.new(
|
362
|
-
@new_resource.version(
|
359
|
+
@new_resource = Chef::Resource::YumPackage.new("test-package")
|
360
|
+
@new_resource.version("3.0.1.el5")
|
363
361
|
@provider = Chef::Provider::Package::Yum.new(@new_resource, @run_context)
|
364
362
|
@provider.load_current_resource
|
365
|
-
expect(@new_resource.package_name).to eq(
|
366
|
-
expect(@new_resource.version).to eq(
|
363
|
+
expect(@new_resource.package_name).to eq("test-package")
|
364
|
+
expect(@new_resource.version).to eq("3.0.1.el5")
|
367
365
|
end
|
368
366
|
|
369
367
|
it "should search provides then set versions to match if requirements were passed in the package name as an array" do
|
370
|
-
@new_resource = Chef::Resource::YumPackage.new([
|
368
|
+
@new_resource = Chef::Resource::YumPackage.new(["test-package = 2.0.1.el5"])
|
371
369
|
@provider = Chef::Provider::Package::Yum.new(@new_resource, @run_context)
|
372
370
|
@provider.load_current_resource
|
373
|
-
expect(@new_resource.package_name).to eq([
|
374
|
-
expect(@new_resource.version).to eq([
|
371
|
+
expect(@new_resource.package_name).to eq(["test-package"])
|
372
|
+
expect(@new_resource.version).to eq(["2.0.1.el5"])
|
375
373
|
end
|
376
374
|
|
377
375
|
it "should search provides and not set the versions to match if specific versions were requested in an array" do
|
378
|
-
@new_resource = Chef::Resource::YumPackage.new([
|
379
|
-
@new_resource.version([
|
376
|
+
@new_resource = Chef::Resource::YumPackage.new(["test-package"])
|
377
|
+
@new_resource.version(["3.0.1.el5"])
|
380
378
|
@provider = Chef::Provider::Package::Yum.new(@new_resource, @run_context)
|
381
379
|
@provider.load_current_resource
|
382
|
-
expect(@new_resource.package_name).to eq([
|
383
|
-
expect(@new_resource.version).to eq([
|
380
|
+
expect(@new_resource.package_name).to eq(["test-package"])
|
381
|
+
expect(@new_resource.version).to eq(["3.0.1.el5"])
|
384
382
|
end
|
385
383
|
|
386
384
|
end
|
387
385
|
|
388
386
|
it "should not return an error if no version number is specified in the resource" do
|
389
|
-
@new_resource = Chef::Resource::YumPackage.new(
|
387
|
+
@new_resource = Chef::Resource::YumPackage.new("test-package")
|
390
388
|
@yum_cache = double(
|
391
|
-
|
389
|
+
"Chef::Provider::Yum::YumCache",
|
392
390
|
:reload_installed => true,
|
393
391
|
:reset => true,
|
394
392
|
:installed_version => "1.0.1.el5",
|
395
393
|
:candidate_version => "2.0.1.el5",
|
396
394
|
:package_available? => false,
|
397
395
|
:version_available? => true,
|
398
|
-
:disable_extra_repo_control => true
|
396
|
+
:disable_extra_repo_control => true,
|
399
397
|
)
|
400
398
|
allow(Chef::Provider::Package::Yum::YumCache).to receive(:instance).and_return(@yum_cache)
|
401
|
-
|
399
|
+
allow(@yum_cache).to receive(:yum_binary=).with("yum")
|
402
400
|
pkg = Chef::Provider::Package::Yum::RPMPackage.new("test-package", "2.0.1.el5", "x86_64", [])
|
403
401
|
expect(@yum_cache).to receive(:packages_from_require).and_return([pkg])
|
404
402
|
@provider = Chef::Provider::Package::Yum.new(@new_resource, @run_context)
|
@@ -408,39 +406,39 @@ describe Chef::Provider::Package::Yum do
|
|
408
406
|
end
|
409
407
|
|
410
408
|
it "should give precedence to the version attribute when both a requirement in the resource name and a version attribute are specified" do
|
411
|
-
@new_resource = Chef::Resource::YumPackage.new(
|
409
|
+
@new_resource = Chef::Resource::YumPackage.new("test-package")
|
412
410
|
@yum_cache = double(
|
413
|
-
|
411
|
+
"Chef::Provider::Yum::YumCache",
|
414
412
|
:reload_installed => true,
|
415
413
|
:reset => true,
|
416
414
|
:installed_version => "1.2.4-11.18.el5",
|
417
415
|
:candidate_version => "1.2.4-11.18.el5",
|
418
416
|
:package_available? => false,
|
419
417
|
:version_available? => true,
|
420
|
-
:disable_extra_repo_control => true
|
418
|
+
:disable_extra_repo_control => true,
|
421
419
|
)
|
422
420
|
allow(Chef::Provider::Package::Yum::YumCache).to receive(:instance).and_return(@yum_cache)
|
423
|
-
|
421
|
+
allow(@yum_cache).to receive(:yum_binary=).with("yum")
|
424
422
|
pkg = Chef::Provider::Package::Yum::RPMPackage.new("test-package", "2.0.1.el5", "x86_64", [])
|
425
423
|
expect(@yum_cache).to receive(:packages_from_require).and_return([pkg])
|
426
|
-
@new_resource = Chef::Resource::YumPackage.new(
|
427
|
-
@new_resource.version(
|
424
|
+
@new_resource = Chef::Resource::YumPackage.new("test-package = 2.0.1.el5")
|
425
|
+
@new_resource.version("3.0.1.el5")
|
428
426
|
@provider = Chef::Provider::Package::Yum.new(@new_resource, @run_context)
|
429
427
|
@provider.load_current_resource
|
430
|
-
expect(@new_resource.package_name).to eq(
|
431
|
-
expect(@new_resource.version).to eq(
|
428
|
+
expect(@new_resource.package_name).to eq("test-package")
|
429
|
+
expect(@new_resource.version).to eq("3.0.1.el5")
|
432
430
|
end
|
433
431
|
|
434
432
|
it "should correctly detect the installed states of an array of package names and version numbers" do
|
435
433
|
@yum_cache = double(
|
436
|
-
|
434
|
+
"Chef::Provider::Yum::YumCache",
|
437
435
|
:reload_installed => true,
|
438
436
|
:reset => true,
|
439
437
|
:installed_version => "1.0.1.el5",
|
440
438
|
:candidate_version => "2.0.1.el5",
|
441
439
|
:package_available? => false,
|
442
440
|
:version_available? => true,
|
443
|
-
:disable_extra_repo_control => true
|
441
|
+
:disable_extra_repo_control => true,
|
444
442
|
)
|
445
443
|
allow(Chef::Provider::Package::Yum::YumCache).to receive(:instance).and_return(@yum_cache)
|
446
444
|
allow(@yum_cache).to receive(:yum_binary=).with("yum")
|
@@ -448,24 +446,24 @@ describe Chef::Provider::Package::Yum do
|
|
448
446
|
expect(@yum_cache).to receive(:packages_from_require).exactly(4).times.and_return([])
|
449
447
|
expect(@yum_cache).to receive(:reload_provides).twice
|
450
448
|
|
451
|
-
@new_resource = Chef::Resource::YumPackage.new([
|
452
|
-
@new_resource.version([
|
449
|
+
@new_resource = Chef::Resource::YumPackage.new(["test-package", "test-package2"])
|
450
|
+
@new_resource.version(["2.0.1.el5", "3.0.1.el5"])
|
453
451
|
@provider = Chef::Provider::Package::Yum.new(@new_resource, @run_context)
|
454
452
|
@provider.load_current_resource
|
455
|
-
expect(@new_resource.package_name).to eq([
|
456
|
-
expect(@new_resource.version).to eq([
|
453
|
+
expect(@new_resource.package_name).to eq(["test-package", "test-package2"])
|
454
|
+
expect(@new_resource.version).to eq(["2.0.1.el5", "3.0.1.el5"])
|
457
455
|
end
|
458
456
|
|
459
457
|
it "should search provides if no package is available - if no match in installed provides then load the complete set" do
|
460
458
|
@yum_cache = double(
|
461
|
-
|
459
|
+
"Chef::Provider::Yum::YumCache",
|
462
460
|
:reload_installed => true,
|
463
461
|
:reset => true,
|
464
462
|
:installed_version => "1.2.4-11.18.el5",
|
465
463
|
:candidate_version => "1.2.4-11.18.el5",
|
466
464
|
:package_available? => false,
|
467
465
|
:version_available? => true,
|
468
|
-
:disable_extra_repo_control => true
|
466
|
+
:disable_extra_repo_control => true,
|
469
467
|
)
|
470
468
|
allow(Chef::Provider::Package::Yum::YumCache).to receive(:instance).and_return(@yum_cache)
|
471
469
|
allow(@yum_cache).to receive(:yum_binary=).with("yum")
|
@@ -478,14 +476,14 @@ describe Chef::Provider::Package::Yum do
|
|
478
476
|
|
479
477
|
it "should search provides if no package is available and not load the complete set if action is :remove or :purge" do
|
480
478
|
@yum_cache = double(
|
481
|
-
|
479
|
+
"Chef::Provider::Yum::YumCache",
|
482
480
|
:reload_installed => true,
|
483
481
|
:reset => true,
|
484
482
|
:installed_version => "1.2.4-11.18.el5",
|
485
483
|
:candidate_version => "1.2.4-11.18.el5",
|
486
484
|
:package_available? => false,
|
487
485
|
:version_available? => true,
|
488
|
-
:disable_extra_repo_control => true
|
486
|
+
:disable_extra_repo_control => true,
|
489
487
|
)
|
490
488
|
allow(Chef::Provider::Package::Yum::YumCache).to receive(:instance).and_return(@yum_cache)
|
491
489
|
allow(@yum_cache).to receive(:yum_binary=).with("yum")
|
@@ -502,7 +500,7 @@ describe Chef::Provider::Package::Yum do
|
|
502
500
|
|
503
501
|
it "should search provides if no package is available - if no match in provides leave the name intact" do
|
504
502
|
@yum_cache = double(
|
505
|
-
|
503
|
+
"Chef::Provider::Yum::YumCache",
|
506
504
|
:reload_provides => true,
|
507
505
|
:reload_installed => true,
|
508
506
|
:reset => true,
|
@@ -510,7 +508,7 @@ describe Chef::Provider::Package::Yum do
|
|
510
508
|
:candidate_version => "1.2.4-11.18.el5",
|
511
509
|
:package_available? => false,
|
512
510
|
:version_available? => true,
|
513
|
-
:disable_extra_repo_control => true
|
511
|
+
:disable_extra_repo_control => true,
|
514
512
|
)
|
515
513
|
allow(Chef::Provider::Package::Yum::YumCache).to receive(:instance).and_return(@yum_cache)
|
516
514
|
allow(@yum_cache).to receive(:yum_binary=).with("yum")
|
@@ -562,7 +560,7 @@ describe Chef::Provider::Package::Yum do
|
|
562
560
|
|
563
561
|
it "installs the package with the options given in the resource" do
|
564
562
|
@provider.load_current_resource
|
565
|
-
allow(@provider).to receive(:candidate_version).and_return(
|
563
|
+
allow(@provider).to receive(:candidate_version).and_return("11")
|
566
564
|
allow(@new_resource).to receive(:options).and_return("--disablerepo epmd")
|
567
565
|
allow(Chef::Provider::Package::Yum::RPMUtils).to receive(:rpmvercmp).and_return(-1)
|
568
566
|
expect(@provider).to receive(:yum_command).with(
|
@@ -573,14 +571,14 @@ describe Chef::Provider::Package::Yum do
|
|
573
571
|
|
574
572
|
it "should raise an exception if the package is not available" do
|
575
573
|
@yum_cache = double(
|
576
|
-
|
574
|
+
"Chef::Provider::Yum::YumCache",
|
577
575
|
:reload_from_cache => true,
|
578
576
|
:reset => true,
|
579
577
|
:installed_version => "1.2.4-11.18.el5",
|
580
578
|
:candidate_version => "1.2.4-11.18.el5_2.3",
|
581
579
|
:package_available? => true,
|
582
580
|
:version_available? => nil,
|
583
|
-
:disable_extra_repo_control => true
|
581
|
+
:disable_extra_repo_control => true,
|
584
582
|
)
|
585
583
|
allow(Chef::Provider::Package::Yum::YumCache).to receive(:instance).and_return(@yum_cache)
|
586
584
|
allow(@yum_cache).to receive(:yum_binary=).with("yum")
|
@@ -591,7 +589,7 @@ describe Chef::Provider::Package::Yum do
|
|
591
589
|
it "should raise an exception if candidate version is older than the installed version and allow_downgrade is false" do
|
592
590
|
allow(@new_resource).to receive(:allow_downgrade).and_return(false)
|
593
591
|
@yum_cache = double(
|
594
|
-
|
592
|
+
"Chef::Provider::Yum::YumCache",
|
595
593
|
:reload_installed => true,
|
596
594
|
:reset => true,
|
597
595
|
:installed_version => "1.2.4-11.18.el5",
|
@@ -599,7 +597,7 @@ describe Chef::Provider::Package::Yum do
|
|
599
597
|
:package_available? => true,
|
600
598
|
:version_available? => true,
|
601
599
|
:allow_multi_install => [ "kernel" ],
|
602
|
-
:disable_extra_repo_control => true
|
600
|
+
:disable_extra_repo_control => true,
|
603
601
|
)
|
604
602
|
allow(Chef::Provider::Package::Yum::YumCache).to receive(:instance).and_return(@yum_cache)
|
605
603
|
allow(@yum_cache).to receive(:yum_binary=).with("yum")
|
@@ -610,7 +608,7 @@ describe Chef::Provider::Package::Yum do
|
|
610
608
|
|
611
609
|
it "should not raise an exception if candidate version is older than the installed version and the package is list in yum's installonlypkg option" do
|
612
610
|
@yum_cache = double(
|
613
|
-
|
611
|
+
"Chef::Provider::Yum::YumCache",
|
614
612
|
:reload_installed => true,
|
615
613
|
:reset => true,
|
616
614
|
:installed_version => "1.2.4-11.18.el5",
|
@@ -619,7 +617,7 @@ describe Chef::Provider::Package::Yum do
|
|
619
617
|
:version_available? => true,
|
620
618
|
:allow_multi_install => [ "cups" ],
|
621
619
|
:package_repository => "base",
|
622
|
-
:disable_extra_repo_control => true
|
620
|
+
:disable_extra_repo_control => true,
|
623
621
|
)
|
624
622
|
allow(Chef::Provider::Package::Yum::YumCache).to receive(:instance).and_return(@yum_cache)
|
625
623
|
allow(@yum_cache).to receive(:yum_binary=).with("yum")
|
@@ -634,7 +632,7 @@ describe Chef::Provider::Package::Yum do
|
|
634
632
|
it "should run yum downgrade if candidate version is older than the installed version and allow_downgrade is true" do
|
635
633
|
allow(@new_resource).to receive(:allow_downgrade).and_return(true)
|
636
634
|
@yum_cache = double(
|
637
|
-
|
635
|
+
"Chef::Provider::Yum::YumCache",
|
638
636
|
:reload_installed => true,
|
639
637
|
:reset => true,
|
640
638
|
:installed_version => "1.2.4-11.18.el5",
|
@@ -643,7 +641,7 @@ describe Chef::Provider::Package::Yum do
|
|
643
641
|
:version_available? => true,
|
644
642
|
:allow_multi_install => [],
|
645
643
|
:package_repository => "base",
|
646
|
-
:disable_extra_repo_control => true
|
644
|
+
:disable_extra_repo_control => true,
|
647
645
|
)
|
648
646
|
allow(Chef::Provider::Package::Yum::YumCache).to receive(:instance).and_return(@yum_cache)
|
649
647
|
allow(@yum_cache).to receive(:yum_binary=).with("yum")
|
@@ -656,7 +654,7 @@ describe Chef::Provider::Package::Yum do
|
|
656
654
|
end
|
657
655
|
|
658
656
|
it "should run yum install then flush the cache if :after is true" do
|
659
|
-
allow(@new_resource).to receive(:flush_cache).and_return({:after => true, :before => false})
|
657
|
+
allow(@new_resource).to receive(:flush_cache).and_return({ :after => true, :before => false })
|
660
658
|
@provider.load_current_resource
|
661
659
|
allow(Chef::Provider::Package::Yum::RPMUtils).to receive(:rpmvercmp).and_return(-1)
|
662
660
|
expect(@provider).to receive(:yum_command).with(
|
@@ -667,7 +665,7 @@ describe Chef::Provider::Package::Yum do
|
|
667
665
|
end
|
668
666
|
|
669
667
|
it "should run yum install then not flush the cache if :after is false" do
|
670
|
-
allow(@new_resource).to receive(:flush_cache).and_return({:after => false, :before => false})
|
668
|
+
allow(@new_resource).to receive(:flush_cache).and_return({ :after => false, :before => false })
|
671
669
|
@provider.load_current_resource
|
672
670
|
allow(Chef::Provider::Package::Yum::RPMUtils).to receive(:rpmvercmp).and_return(-1)
|
673
671
|
expect(@provider).to receive(:yum_command).with(
|
@@ -681,7 +679,7 @@ describe Chef::Provider::Package::Yum do
|
|
681
679
|
describe "when upgrading a package" do
|
682
680
|
it "should run yum install if the package is installed and a version is given" do
|
683
681
|
@provider.load_current_resource
|
684
|
-
allow(@provider).to receive(:candidate_version).and_return(
|
682
|
+
allow(@provider).to receive(:candidate_version).and_return("11")
|
685
683
|
allow(Chef::Provider::Package::Yum::RPMUtils).to receive(:rpmvercmp).and_return(-1)
|
686
684
|
expect(@provider).to receive(:yum_command).with(
|
687
685
|
"-d0 -e0 -y install cups-11"
|
@@ -691,8 +689,8 @@ describe Chef::Provider::Package::Yum do
|
|
691
689
|
|
692
690
|
it "should run yum install if the package is not installed" do
|
693
691
|
@provider.load_current_resource
|
694
|
-
@current_resource = Chef::Resource::Package.new(
|
695
|
-
allow(@provider).to receive(:candidate_version).and_return(
|
692
|
+
@current_resource = Chef::Resource::Package.new("cups")
|
693
|
+
allow(@provider).to receive(:candidate_version).and_return("11")
|
696
694
|
allow(Chef::Provider::Package::Yum::RPMUtils).to receive(:rpmvercmp).and_return(-1)
|
697
695
|
expect(@provider).to receive(:yum_command).with(
|
698
696
|
"-d0 -e0 -y install cups-11"
|
@@ -702,7 +700,7 @@ describe Chef::Provider::Package::Yum do
|
|
702
700
|
|
703
701
|
it "should raise an exception if candidate version is older than the installed version" do
|
704
702
|
@yum_cache = double(
|
705
|
-
|
703
|
+
"Chef::Provider::Yum::YumCache",
|
706
704
|
:reload_installed => true,
|
707
705
|
:reset => true,
|
708
706
|
:installed_version => "1.2.4-11.18.el5",
|
@@ -710,7 +708,7 @@ describe Chef::Provider::Package::Yum do
|
|
710
708
|
:package_available? => true,
|
711
709
|
:version_available? => true,
|
712
710
|
:allow_multi_install => [ "kernel" ],
|
713
|
-
:disable_extra_repo_control => true
|
711
|
+
:disable_extra_repo_control => true,
|
714
712
|
)
|
715
713
|
allow(Chef::Provider::Package::Yum::YumCache).to receive(:instance).and_return(@yum_cache)
|
716
714
|
allow(@yum_cache).to receive(:yum_binary=).with("yum")
|
@@ -722,18 +720,18 @@ describe Chef::Provider::Package::Yum do
|
|
722
720
|
# Test our little workaround, some crossover into Chef::Provider::Package territory
|
723
721
|
it "should call action_upgrade in the parent if the current resource version is nil" do
|
724
722
|
allow(@yum_cache).to receive(:installed_version).and_return(nil)
|
725
|
-
@current_resource = Chef::Resource::Package.new(
|
726
|
-
allow(@provider).to receive(:candidate_version).and_return(
|
723
|
+
@current_resource = Chef::Resource::Package.new("cups")
|
724
|
+
allow(@provider).to receive(:candidate_version).and_return("11")
|
727
725
|
expect(@provider).to receive(:upgrade_package).with(
|
728
726
|
"cups",
|
729
|
-
"11"
|
727
|
+
"11",
|
730
728
|
)
|
731
729
|
@provider.run_action(:upgrade)
|
732
730
|
end
|
733
731
|
|
734
732
|
it "should call action_upgrade in the parent if the candidate version is nil" do
|
735
733
|
@provider.load_current_resource
|
736
|
-
@current_resource = Chef::Resource::Package.new(
|
734
|
+
@current_resource = Chef::Resource::Package.new("cups")
|
737
735
|
allow(@provider).to receive(:candidate_version).and_return(nil)
|
738
736
|
expect(@provider).not_to receive(:upgrade_package)
|
739
737
|
@provider.run_action(:upgrade)
|
@@ -741,11 +739,11 @@ describe Chef::Provider::Package::Yum do
|
|
741
739
|
|
742
740
|
it "should call action_upgrade in the parent if the candidate is newer" do
|
743
741
|
@provider.load_current_resource
|
744
|
-
@current_resource = Chef::Resource::Package.new(
|
745
|
-
allow(@provider).to receive(:candidate_version).and_return(
|
742
|
+
@current_resource = Chef::Resource::Package.new("cups")
|
743
|
+
allow(@provider).to receive(:candidate_version).and_return("11")
|
746
744
|
expect(@provider).to receive(:upgrade_package).with(
|
747
745
|
"cups",
|
748
|
-
"11"
|
746
|
+
"11",
|
749
747
|
)
|
750
748
|
@provider.run_action(:upgrade)
|
751
749
|
end
|
@@ -753,8 +751,8 @@ describe Chef::Provider::Package::Yum do
|
|
753
751
|
it "should not call action_upgrade in the parent if the candidate is older" do
|
754
752
|
allow(@yum_cache).to receive(:installed_version).and_return("12")
|
755
753
|
@provider.load_current_resource
|
756
|
-
@current_resource = Chef::Resource::Package.new(
|
757
|
-
allow(@provider).to receive(:candidate_version).and_return(
|
754
|
+
@current_resource = Chef::Resource::Package.new("cups")
|
755
|
+
allow(@provider).to receive(:candidate_version).and_return("11")
|
758
756
|
expect(@provider).not_to receive(:upgrade_package)
|
759
757
|
@provider.run_action(:upgrade)
|
760
758
|
end
|
@@ -792,7 +790,7 @@ describe Chef::Provider::Package::Yum do
|
|
792
790
|
allow(@provider).to receive(:shell_out).and_return(@status)
|
793
791
|
expect(@provider).to receive(:shell_out).once.with(
|
794
792
|
"yum -d0 -e0 -y install emacs-1.0",
|
795
|
-
{:timeout => Chef::Config[:yum_timeout]}
|
793
|
+
{ :timeout => Chef::Config[:yum_timeout] },
|
796
794
|
)
|
797
795
|
@provider.yum_command("-d0 -e0 -y install emacs-1.0")
|
798
796
|
end
|
@@ -802,18 +800,18 @@ describe Chef::Provider::Package::Yum do
|
|
802
800
|
allow(@provider).to receive(:shell_out).and_return(@status)
|
803
801
|
expect(@provider).to receive(:shell_out).once.with(
|
804
802
|
"yum -d0 -e0 -y install emacs-1.0",
|
805
|
-
{:timeout => Chef::Config[:yum_timeout]}
|
803
|
+
{ :timeout => Chef::Config[:yum_timeout] },
|
806
804
|
)
|
807
805
|
expect { @provider.yum_command("-d0 -e0 -y install emacs-1.0") }.to raise_error(Chef::Exceptions::Exec)
|
808
806
|
end
|
809
807
|
|
810
808
|
it "should run yum once if it exits with a return code of 1 and %pre scriptlet failures" do
|
811
809
|
@status = double("Status", :exitstatus => 1, :stdout => "error: %pre(demo-1-1.el5.centos.x86_64) scriptlet failed, exit status 2",
|
812
|
-
|
810
|
+
:stderr => "")
|
813
811
|
allow(@provider).to receive(:shell_out).and_return(@status)
|
814
812
|
expect(@provider).to receive(:shell_out).once.with(
|
815
813
|
"yum -d0 -e0 -y install emacs-1.0",
|
816
|
-
{:timeout => Chef::Config[:yum_timeout]}
|
814
|
+
{ :timeout => Chef::Config[:yum_timeout] },
|
817
815
|
)
|
818
816
|
# will still raise an exception, can't stub out the subsequent call
|
819
817
|
expect { @provider.yum_command("-d0 -e0 -y install emacs-1.0") }.to raise_error(Chef::Exceptions::Exec)
|
@@ -821,11 +819,11 @@ describe Chef::Provider::Package::Yum do
|
|
821
819
|
|
822
820
|
it "should run yum twice if it exits with a return code of 1 and %post scriptlet failures" do
|
823
821
|
@status = double("Status", :exitstatus => 1, :stdout => "error: %post(demo-1-1.el5.centos.x86_64) scriptlet failed, exit status 2",
|
824
|
-
|
822
|
+
:stderr => "")
|
825
823
|
allow(@provider).to receive(:shell_out).and_return(@status)
|
826
824
|
expect(@provider).to receive(:shell_out).twice.with(
|
827
825
|
"yum -d0 -e0 -y install emacs-1.0",
|
828
|
-
{:timeout => Chef::Config[:yum_timeout]}
|
826
|
+
{ :timeout => Chef::Config[:yum_timeout] },
|
829
827
|
)
|
830
828
|
# will still raise an exception, can't stub out the subsequent call
|
831
829
|
expect { @provider.yum_command("-d0 -e0 -y install emacs-1.0") }.to raise_error(Chef::Exceptions::Exec)
|
@@ -839,7 +837,7 @@ describe Chef::Provider::Package::Yum do
|
|
839
837
|
allow(@provider).to receive(:shell_out).and_return(@status)
|
840
838
|
expect(@provider).to receive(:shell_out).once.with(
|
841
839
|
"yum-deprecated -d0 -e0 -y install emacs-1.0",
|
842
|
-
{:timeout => Chef::Config[:yum_timeout]}
|
840
|
+
{ :timeout => Chef::Config[:yum_timeout] },
|
843
841
|
)
|
844
842
|
@provider.yum_command("-d0 -e0 -y install emacs-1.0")
|
845
843
|
end
|
@@ -856,7 +854,7 @@ describe Chef::Provider::Package::Yum::RPMUtils do
|
|
856
854
|
[
|
857
855
|
[ "0:3.3", [ 0, "3.3", nil ] ],
|
858
856
|
[ "9:1.7.3", [ 9, "1.7.3", nil ] ],
|
859
|
-
[ "15:20020927", [ 15, "20020927", nil ] ]
|
857
|
+
[ "15:20020927", [ 15, "20020927", nil ] ],
|
860
858
|
].each do |x, y|
|
861
859
|
expect(@rpmutils.version_parse(x)).to eq(y)
|
862
860
|
end
|
@@ -866,7 +864,7 @@ describe Chef::Provider::Package::Yum::RPMUtils do
|
|
866
864
|
[
|
867
865
|
[ ":3.3", [ 0, "3.3", nil ] ],
|
868
866
|
[ "-1:1.7.3", [ nil, nil, "1:1.7.3" ] ],
|
869
|
-
[ "-:20020927", [ nil, nil, ":20020927" ] ]
|
867
|
+
[ "-:20020927", [ nil, nil, ":20020927" ] ],
|
870
868
|
].each do |x, y|
|
871
869
|
expect(@rpmutils.version_parse(x)).to eq(y)
|
872
870
|
end
|
@@ -876,7 +874,7 @@ describe Chef::Provider::Package::Yum::RPMUtils do
|
|
876
874
|
[
|
877
875
|
[ "3.3", [ nil, "3.3", nil ] ],
|
878
876
|
[ "1.7.3", [ nil, "1.7.3", nil ] ],
|
879
|
-
[ "20020927", [ nil, "20020927", nil ] ]
|
877
|
+
[ "20020927", [ nil, "20020927", nil ] ],
|
880
878
|
].each do |x, y|
|
881
879
|
expect(@rpmutils.version_parse(x)).to eq(y)
|
882
880
|
end
|
@@ -886,7 +884,7 @@ describe Chef::Provider::Package::Yum::RPMUtils do
|
|
886
884
|
[
|
887
885
|
[ "3..3", [ nil, "3..3", nil ] ],
|
888
886
|
[ "0001.7.3", [ nil, "0001.7.3", nil ] ],
|
889
|
-
[ "20020927,3", [ nil, "20020927,3", nil ] ]
|
887
|
+
[ "20020927,3", [ nil, "20020927,3", nil ] ],
|
890
888
|
].each do |x, y|
|
891
889
|
expect(@rpmutils.version_parse(x)).to eq(y)
|
892
890
|
end
|
@@ -896,7 +894,7 @@ describe Chef::Provider::Package::Yum::RPMUtils do
|
|
896
894
|
[
|
897
895
|
[ "3.3-0.pre3.1.60.el5_5.1", [ nil, "3.3", "0.pre3.1.60.el5_5.1" ] ],
|
898
896
|
[ "1.7.3-1jpp.2.el5", [ nil, "1.7.3", "1jpp.2.el5" ] ],
|
899
|
-
[ "20020927-46.el5", [ nil, "20020927", "46.el5" ] ]
|
897
|
+
[ "20020927-46.el5", [ nil, "20020927", "46.el5" ] ],
|
900
898
|
].each do |x, y|
|
901
899
|
expect(@rpmutils.version_parse(x)).to eq(y)
|
902
900
|
end
|
@@ -906,7 +904,7 @@ describe Chef::Provider::Package::Yum::RPMUtils do
|
|
906
904
|
[
|
907
905
|
[ "3.3-", [ nil, "3.3", nil ] ],
|
908
906
|
[ "-1jpp.2.el5", [ nil, nil, "1jpp.2.el5" ] ],
|
909
|
-
[ "-0020020927-46.el5", [ nil, "-0020020927", "46.el5" ] ]
|
907
|
+
[ "-0020020927-46.el5", [ nil, "-0020020927", "46.el5" ] ],
|
910
908
|
].each do |x, y|
|
911
909
|
expect(@rpmutils.version_parse(x)).to eq(y)
|
912
910
|
end
|
@@ -965,7 +963,7 @@ describe Chef::Provider::Package::Yum::RPMUtils do
|
|
965
963
|
[ "0.0.1aa", "0.0.1aa", 0 ],
|
966
964
|
[ "0.0.1a", "0.0.1aa", -1 ],
|
967
965
|
].each do |x, y, result|
|
968
|
-
expect(@rpmutils.rpmvercmp(x,y)).to eq(result)
|
966
|
+
expect(@rpmutils.rpmvercmp(x, y)).to eq(result)
|
969
967
|
end
|
970
968
|
end
|
971
969
|
|
@@ -982,44 +980,44 @@ describe Chef::Provider::Package::Yum::RPMUtils do
|
|
982
980
|
[ nil, "1.0.1", -1 ],
|
983
981
|
[ "1.0.1", "", 1 ],
|
984
982
|
[ "", "", 0 ],
|
985
|
-
[ "", "1.0.1", -1 ]
|
983
|
+
[ "", "1.0.1", -1 ],
|
986
984
|
].each do |x, y, result|
|
987
|
-
expect(@rpmutils.rpmvercmp(x,y)).to eq(result)
|
985
|
+
expect(@rpmutils.rpmvercmp(x, y)).to eq(result)
|
988
986
|
end
|
989
987
|
end
|
990
988
|
|
991
989
|
it "tests isalnum good input" do
|
992
|
-
[
|
990
|
+
[ "a", "z", "A", "Z", "0", "9" ].each do |t|
|
993
991
|
expect(@rpmutils.isalnum(t)).to eq(true)
|
994
992
|
end
|
995
993
|
end
|
996
994
|
|
997
995
|
it "tests isalnum bad input" do
|
998
|
-
[
|
996
|
+
[ "-", ".", "!", "^", ":", "_" ].each do |t|
|
999
997
|
expect(@rpmutils.isalnum(t)).to eq(false)
|
1000
998
|
end
|
1001
999
|
end
|
1002
1000
|
|
1003
1001
|
it "tests isalpha good input" do
|
1004
|
-
[
|
1002
|
+
[ "a", "z", "A", "Z" ].each do |t|
|
1005
1003
|
expect(@rpmutils.isalpha(t)).to eq(true)
|
1006
1004
|
end
|
1007
1005
|
end
|
1008
1006
|
|
1009
1007
|
it "tests isalpha bad input" do
|
1010
|
-
[
|
1008
|
+
[ "0", "9", "-", ".", "!", "^", ":", "_" ].each do |t|
|
1011
1009
|
expect(@rpmutils.isalpha(t)).to eq(false)
|
1012
1010
|
end
|
1013
1011
|
end
|
1014
1012
|
|
1015
1013
|
it "tests isdigit good input" do
|
1016
|
-
[
|
1014
|
+
[ "0", "9" ].each do |t|
|
1017
1015
|
expect(@rpmutils.isdigit(t)).to eq(true)
|
1018
1016
|
end
|
1019
1017
|
end
|
1020
1018
|
|
1021
1019
|
it "tests isdigit bad input" do
|
1022
|
-
[
|
1020
|
+
[ "A", "z", "-", ".", "!", "^", ":", "_" ].each do |t|
|
1023
1021
|
expect(@rpmutils.isdigit(t)).to eq(false)
|
1024
1022
|
end
|
1025
1023
|
end
|
@@ -1102,7 +1100,7 @@ describe Chef::Provider::Package::Yum::RPMVersion do
|
|
1102
1100
|
[ "0:1.4.10-7.20090624svn.el5",
|
1103
1101
|
"0:1.4.10-7.20090625svn.el5" ],
|
1104
1102
|
[ "0:2.3.4-2.el5",
|
1105
|
-
"0:2.3.4-2.el6" ]
|
1103
|
+
"0:2.3.4-2.el6" ],
|
1106
1104
|
].each do |smaller, larger|
|
1107
1105
|
sm = Chef::Provider::Package::Yum::RPMVersion.new(smaller)
|
1108
1106
|
lg = Chef::Provider::Package::Yum::RPMVersion.new(larger)
|
@@ -1128,7 +1126,7 @@ describe Chef::Provider::Package::Yum::RPMVersion do
|
|
1128
1126
|
[ "0:1.9",
|
1129
1127
|
"3:1.9" ],
|
1130
1128
|
[ "2.3-2.el5",
|
1131
|
-
"2.3-2.el6" ]
|
1129
|
+
"2.3-2.el6" ],
|
1132
1130
|
].each do |smaller, larger|
|
1133
1131
|
sm = Chef::Provider::Package::Yum::RPMVersion.new(smaller)
|
1134
1132
|
lg = Chef::Provider::Package::Yum::RPMVersion.new(larger)
|
@@ -1145,7 +1143,7 @@ describe Chef::Provider::Package::Yum::RPMVersion do
|
|
1145
1143
|
[ "0:2.3-15.el5",
|
1146
1144
|
"0:2.3-15.el5" ],
|
1147
1145
|
[ "0:alpha9.8-27.2",
|
1148
|
-
"0:alpha9.8-27.2" ]
|
1146
|
+
"0:alpha9.8-27.2" ],
|
1149
1147
|
].each do |smaller, larger|
|
1150
1148
|
sm = Chef::Provider::Package::Yum::RPMVersion.new(smaller)
|
1151
1149
|
lg = Chef::Provider::Package::Yum::RPMVersion.new(larger)
|
@@ -1160,7 +1158,7 @@ describe Chef::Provider::Package::Yum::RPMVersion do
|
|
1160
1158
|
[ "2.3-15.el5",
|
1161
1159
|
"2.3-15.el5" ],
|
1162
1160
|
[ "alpha9.8-3",
|
1163
|
-
"alpha9.8-3" ]
|
1161
|
+
"alpha9.8-3" ],
|
1164
1162
|
].each do |smaller, larger|
|
1165
1163
|
sm = Chef::Provider::Package::Yum::RPMVersion.new(smaller)
|
1166
1164
|
lg = Chef::Provider::Package::Yum::RPMVersion.new(larger)
|
@@ -1460,7 +1458,7 @@ describe Chef::Provider::Package::Yum::RPMDependency do
|
|
1460
1458
|
[ "=", :== ],
|
1461
1459
|
[ "==", :== ],
|
1462
1460
|
[ "<=", :<= ],
|
1463
|
-
[ "<", :< ]
|
1461
|
+
[ "<", :< ],
|
1464
1462
|
].each do |before, after|
|
1465
1463
|
@rpmdep = Chef::Provider::Package::Yum::RPMDependency.parse("testing #{before} 1:1.1-1")
|
1466
1464
|
expect(@rpmdep.flag).to eq(after)
|
@@ -1474,7 +1472,7 @@ describe Chef::Provider::Package::Yum::RPMDependency do
|
|
1474
1472
|
[ ">>", :== ],
|
1475
1473
|
[ "<<", :== ],
|
1476
1474
|
[ "!", :== ],
|
1477
|
-
[ "~", :== ]
|
1475
|
+
[ "~", :== ],
|
1478
1476
|
].each do |before, after|
|
1479
1477
|
@rpmdep = Chef::Provider::Package::Yum::RPMDependency.parse("testing #{before} 1:1.1-1")
|
1480
1478
|
expect(@rpmdep.name).to eq("testing #{before} 1:1.1-1")
|
@@ -1549,12 +1547,12 @@ describe Chef::Provider::Package::Yum::RPMDb do
|
|
1549
1547
|
# name, version, arch, installed, available
|
1550
1548
|
deps_v = [
|
1551
1549
|
Chef::Provider::Package::Yum::RPMDependency.parse("libz.so.1()(64bit)"),
|
1552
|
-
Chef::Provider::Package::Yum::RPMDependency.parse("test-package-a = 0:1.6.5-9.36.el5")
|
1550
|
+
Chef::Provider::Package::Yum::RPMDependency.parse("test-package-a = 0:1.6.5-9.36.el5"),
|
1553
1551
|
]
|
1554
1552
|
deps_z = [
|
1555
1553
|
Chef::Provider::Package::Yum::RPMDependency.parse("libz.so.1()(64bit)"),
|
1556
1554
|
Chef::Provider::Package::Yum::RPMDependency.parse("config(test) = 0:1.6.5-9.36.el5"),
|
1557
|
-
Chef::Provider::Package::Yum::RPMDependency.parse("test-package-c = 0:1.6.5-9.36.el5")
|
1555
|
+
Chef::Provider::Package::Yum::RPMDependency.parse("test-package-c = 0:1.6.5-9.36.el5"),
|
1558
1556
|
]
|
1559
1557
|
@rpm_v = Chef::Provider::Package::Yum::RPMDbPackage.new("test-package-a", "0:1.6.5-9.36.el5", "i386", deps_v, true, false, "base")
|
1560
1558
|
@rpm_w = Chef::Provider::Package::Yum::RPMDbPackage.new("test-package-b", "0:1.6.5-9.36.el5", "i386", [], true, true, "extras")
|
@@ -1840,19 +1838,19 @@ EOF
|
|
1840
1838
|
end
|
1841
1839
|
|
1842
1840
|
it "should return the default python if the yum-executable doesn't start with #!" do
|
1843
|
-
allow(::File).to receive(:open).with("/usr/bin/yum", "r") { |&b| r = b.call(bin_exe); bin_exe.rewind; r}
|
1841
|
+
allow(::File).to receive(:open).with("/usr/bin/yum", "r") { |&b| r = b.call(bin_exe); bin_exe.rewind; r }
|
1844
1842
|
expect(@yc.python_bin).to eq("/usr/bin/python")
|
1845
1843
|
end
|
1846
1844
|
|
1847
1845
|
it "should return /usr/bin/python if the interpreter is /bin/bash" do
|
1848
1846
|
other = StringIO.new("#!/bin/bash\n# The yum executable redirecting to dnf from dnf-yum compatible package.")
|
1849
|
-
allow(::File).to receive(:open).with("/usr/bin/yum", "r") { |&b| r = b.call(other); other.rewind; r}
|
1847
|
+
allow(::File).to receive(:open).with("/usr/bin/yum", "r") { |&b| r = b.call(other); other.rewind; r }
|
1850
1848
|
expect(@yc.python_bin).to eq("/usr/bin/python")
|
1851
1849
|
end
|
1852
1850
|
|
1853
1851
|
it "should return the interpreter for yum" do
|
1854
1852
|
other = StringIO.new("#!/usr/bin/super_python\n\nlasjdfdsaljf\nlasdjfs")
|
1855
|
-
allow(::File).to receive(:open).with("/usr/bin/yum", "r") { |&b| r = b.call(other); other.rewind; r}
|
1853
|
+
allow(::File).to receive(:open).with("/usr/bin/yum", "r") { |&b| r = b.call(other); other.rewind; r }
|
1856
1854
|
expect(@yc.python_bin).to eq("/usr/bin/super_python")
|
1857
1855
|
end
|
1858
1856
|
end
|
@@ -1867,32 +1865,32 @@ EOF
|
|
1867
1865
|
|
1868
1866
|
it "should run yum-dump.py using the system python when next_refresh is for :all" do
|
1869
1867
|
@yc.reload
|
1870
|
-
expect(@yc).to receive(:shell_out!).with(%r{^/usr/bin/python .*/yum-dump.py --options --installed-provides --yum-lock-timeout 30$}, :timeout=>Chef::Config[:yum_timeout])
|
1868
|
+
expect(@yc).to receive(:shell_out!).with(%r{^/usr/bin/python .*/yum-dump.py --options --installed-provides --yum-lock-timeout 30$}, :timeout => Chef::Config[:yum_timeout])
|
1871
1869
|
@yc.refresh
|
1872
1870
|
end
|
1873
1871
|
|
1874
1872
|
it "should run yum-dump.py with the installed flag when next_refresh is for :installed" do
|
1875
1873
|
@yc.reload_installed
|
1876
|
-
expect(@yc).to receive(:shell_out!).with(%r{^/usr/bin/python .*/yum-dump.py --installed --yum-lock-timeout 30$}, :timeout=>Chef::Config[:yum_timeout])
|
1874
|
+
expect(@yc).to receive(:shell_out!).with(%r{^/usr/bin/python .*/yum-dump.py --installed --yum-lock-timeout 30$}, :timeout => Chef::Config[:yum_timeout])
|
1877
1875
|
@yc.refresh
|
1878
1876
|
end
|
1879
1877
|
|
1880
1878
|
it "should run yum-dump.py with the all-provides flag when next_refresh is for :provides" do
|
1881
1879
|
@yc.reload_provides
|
1882
|
-
expect(@yc).to receive(:shell_out!).with(%r{^/usr/bin/python .*/yum-dump.py --options --all-provides --yum-lock-timeout 30$}, :timeout=>Chef::Config[:yum_timeout])
|
1880
|
+
expect(@yc).to receive(:shell_out!).with(%r{^/usr/bin/python .*/yum-dump.py --options --all-provides --yum-lock-timeout 30$}, :timeout => Chef::Config[:yum_timeout])
|
1883
1881
|
@yc.refresh
|
1884
1882
|
end
|
1885
1883
|
|
1886
1884
|
it "should pass extra_repo_control args to yum-dump.py" do
|
1887
1885
|
@yc.enable_extra_repo_control("--enablerepo=foo --disablerepo=bar")
|
1888
|
-
expect(@yc).to receive(:shell_out!).with(%r{^/usr/bin/python .*/yum-dump.py --options --installed-provides --enablerepo=foo --disablerepo=bar --yum-lock-timeout 30$}, :timeout=>Chef::Config[:yum_timeout])
|
1886
|
+
expect(@yc).to receive(:shell_out!).with(%r{^/usr/bin/python .*/yum-dump.py --options --installed-provides --enablerepo=foo --disablerepo=bar --yum-lock-timeout 30$}, :timeout => Chef::Config[:yum_timeout])
|
1889
1887
|
@yc.refresh
|
1890
1888
|
end
|
1891
1889
|
|
1892
1890
|
it "should pass extra_repo_control args and configured yum lock timeout to yum-dump.py" do
|
1893
1891
|
Chef::Config[:yum_lock_timeout] = 999
|
1894
1892
|
@yc.enable_extra_repo_control("--enablerepo=foo --disablerepo=bar")
|
1895
|
-
expect(@yc).to receive(:shell_out!).with(%r{^/usr/bin/python .*/yum-dump.py --options --installed-provides --enablerepo=foo --disablerepo=bar --yum-lock-timeout 999$}, :timeout=>Chef::Config[:yum_timeout])
|
1893
|
+
expect(@yc).to receive(:shell_out!).with(%r{^/usr/bin/python .*/yum-dump.py --options --installed-provides --enablerepo=foo --disablerepo=bar --yum-lock-timeout 999$}, :timeout => Chef::Config[:yum_timeout])
|
1896
1894
|
@yc.refresh
|
1897
1895
|
end
|
1898
1896
|
|
@@ -1920,7 +1918,7 @@ EOF
|
|
1920
1918
|
it "should raise exception yum-dump.py exits with a non zero status" do
|
1921
1919
|
@status = double("Status", :exitstatus => 1, :stdin => @stdin, :stdout => @stdout_no_output, :stderr => @stderr)
|
1922
1920
|
allow(@yc).to receive(:shell_out!).and_return(@status)
|
1923
|
-
expect { @yc.refresh}.to raise_error(Chef::Exceptions::Package, %r{CentOS-Base.repo, line: 12})
|
1921
|
+
expect { @yc.refresh }.to raise_error(Chef::Exceptions::Package, %r{CentOS-Base.repo, line: 12})
|
1924
1922
|
end
|
1925
1923
|
|
1926
1924
|
it "should parse type 'i' into an installed state for a package" do
|
@@ -2115,19 +2113,19 @@ describe "Chef::Provider::Package::Yum - Multi" do
|
|
2115
2113
|
@node = Chef::Node.new
|
2116
2114
|
@events = Chef::EventDispatch::Dispatcher.new
|
2117
2115
|
@run_context = Chef::RunContext.new(@node, {}, @events)
|
2118
|
-
@new_resource = Chef::Resource::Package.new([
|
2116
|
+
@new_resource = Chef::Resource::Package.new(["cups", "vim"])
|
2119
2117
|
@status = double("Status", :exitstatus => 0)
|
2120
2118
|
@yum_cache = double(
|
2121
|
-
|
2119
|
+
"Chef::Provider::Yum::YumCache",
|
2122
2120
|
:reload_installed => true,
|
2123
2121
|
:reset => true,
|
2124
|
-
:installed_version =>
|
2125
|
-
:candidate_version =>
|
2122
|
+
:installed_version => "XXXX",
|
2123
|
+
:candidate_version => "YYYY",
|
2126
2124
|
:package_available? => true,
|
2127
2125
|
:version_available? => true,
|
2128
|
-
:allow_multi_install => [
|
2129
|
-
:package_repository =>
|
2130
|
-
:disable_extra_repo_control => true
|
2126
|
+
:allow_multi_install => [ "kernel" ],
|
2127
|
+
:package_repository => "base",
|
2128
|
+
:disable_extra_repo_control => true,
|
2131
2129
|
)
|
2132
2130
|
allow(Chef::Provider::Package::Yum::YumCache).to receive(:instance).and_return(@yum_cache)
|
2133
2131
|
allow(@yum_cache).to receive(:yum_binary=).with("yum")
|
@@ -2139,12 +2137,12 @@ describe "Chef::Provider::Package::Yum - Multi" do
|
|
2139
2137
|
describe "when loading the current system state" do
|
2140
2138
|
it "should create a current resource with the name of the new_resource" do
|
2141
2139
|
@provider.load_current_resource
|
2142
|
-
expect(@provider.current_resource.name).to eq(
|
2140
|
+
expect(@provider.current_resource.name).to eq("cups, vim")
|
2143
2141
|
end
|
2144
2142
|
|
2145
2143
|
it "should set the current resources package name to the new resources package name" do
|
2146
2144
|
@provider.load_current_resource
|
2147
|
-
expect(@provider.current_resource.package_name).to eq([
|
2145
|
+
expect(@provider.current_resource.package_name).to eq(["cups", "vim"])
|
2148
2146
|
end
|
2149
2147
|
|
2150
2148
|
it "should set the installed version to nil on the current resource if no installed package" do
|
@@ -2154,21 +2152,21 @@ describe "Chef::Provider::Package::Yum - Multi" do
|
|
2154
2152
|
end
|
2155
2153
|
|
2156
2154
|
it "should set the installed version if yum has one" do
|
2157
|
-
allow(@yum_cache).to receive(:installed_version).with(
|
2158
|
-
allow(@yum_cache).to receive(:installed_version).with(
|
2159
|
-
allow(@yum_cache).to receive(:candidate_version).with(
|
2160
|
-
allow(@yum_cache).to receive(:candidate_version).with(
|
2155
|
+
allow(@yum_cache).to receive(:installed_version).with("cups", nil).and_return("1.2.4-11.18.el5")
|
2156
|
+
allow(@yum_cache).to receive(:installed_version).with("vim", nil).and_return("1.0")
|
2157
|
+
allow(@yum_cache).to receive(:candidate_version).with("cups", nil).and_return("1.2.4-11.18.el5_2.3")
|
2158
|
+
allow(@yum_cache).to receive(:candidate_version).with("vim", nil).and_return("1.5")
|
2161
2159
|
@provider.load_current_resource
|
2162
|
-
expect(@provider.current_resource.version).to eq([
|
2160
|
+
expect(@provider.current_resource.version).to eq(["1.2.4-11.18.el5", "1.0"])
|
2163
2161
|
end
|
2164
2162
|
|
2165
2163
|
it "should set the candidate version if yum info has one" do
|
2166
|
-
allow(@yum_cache).to receive(:installed_version).with(
|
2167
|
-
allow(@yum_cache).to receive(:installed_version).with(
|
2168
|
-
allow(@yum_cache).to receive(:candidate_version).with(
|
2169
|
-
allow(@yum_cache).to receive(:candidate_version).with(
|
2164
|
+
allow(@yum_cache).to receive(:installed_version).with("cups", nil).and_return("1.2.4-11.18.el5")
|
2165
|
+
allow(@yum_cache).to receive(:installed_version).with("vim", nil).and_return("1.0")
|
2166
|
+
allow(@yum_cache).to receive(:candidate_version).with("cups", nil).and_return("1.2.4-11.18.el5_2.3")
|
2167
|
+
allow(@yum_cache).to receive(:candidate_version).with("vim", nil).and_return("1.5")
|
2170
2168
|
@provider.load_current_resource
|
2171
|
-
expect(@provider.candidate_version).to eql([
|
2169
|
+
expect(@provider.candidate_version).to eql(["1.2.4-11.18.el5_2.3", "1.5"])
|
2172
2170
|
end
|
2173
2171
|
|
2174
2172
|
it "should return the current resouce" do
|
@@ -2177,20 +2175,20 @@ describe "Chef::Provider::Package::Yum - Multi" do
|
|
2177
2175
|
|
2178
2176
|
describe "when version constraint in package_name" do
|
2179
2177
|
it "should set package_version if no existing package_name is found and new_package_name is available" do
|
2180
|
-
@new_resource = Chef::Resource::Package.new([
|
2178
|
+
@new_resource = Chef::Resource::Package.new(["cups = 1.2.4-11.18.el5_2.3", "emacs = 24.4"])
|
2181
2179
|
@provider = Chef::Provider::Package::Yum.new(@new_resource, @run_context)
|
2182
|
-
allow(@yum_cache).to receive(:package_available?) { |pkg| %w
|
2180
|
+
allow(@yum_cache).to receive(:package_available?) { |pkg| %w{cups emacs}.include?(pkg) ? true : false }
|
2183
2181
|
allow(@yum_cache).to receive(:candidate_version) do |pkg|
|
2184
|
-
if pkg ==
|
2182
|
+
if pkg == "cups"
|
2185
2183
|
"1.2.4-11.18.el5_2.3"
|
2186
|
-
elsif pkg ==
|
2184
|
+
elsif pkg == "emacs"
|
2187
2185
|
"24.4"
|
2188
2186
|
end
|
2189
2187
|
end
|
2190
2188
|
allow(@yum_cache).to receive(:packages_from_require) do |pkg|
|
2191
|
-
if pkg.name ==
|
2189
|
+
if pkg.name == "cups"
|
2192
2190
|
[Chef::Provider::Package::Yum::RPMDbPackage.new("cups", "1.2.4-11.18.el5_2.3", "noarch", [], false, true, "base")]
|
2193
|
-
elsif pkg.name ==
|
2191
|
+
elsif pkg.name == "emacs"
|
2194
2192
|
[Chef::Provider::Package::Yum::RPMDbPackage.new("emacs", "24.4", "noarch", [], false, true, "base")]
|
2195
2193
|
end
|
2196
2194
|
end
|
@@ -2210,12 +2208,12 @@ describe "Chef::Provider::Package::Yum - Multi" do
|
|
2210
2208
|
it "should run yum install with the package name and version" do
|
2211
2209
|
@provider.load_current_resource
|
2212
2210
|
allow(Chef::Provider::Package::Yum::RPMUtils).to receive(:rpmvercmp).and_return(-1)
|
2213
|
-
allow(@yum_cache).to receive(:installed_version).with(
|
2214
|
-
allow(@yum_cache).to receive(:installed_version).with(
|
2211
|
+
allow(@yum_cache).to receive(:installed_version).with("cups", nil).and_return("1.2.4-11.18.el5")
|
2212
|
+
allow(@yum_cache).to receive(:installed_version).with("vim", nil).and_return("0.9")
|
2215
2213
|
expect(@provider).to receive(:yum_command).with(
|
2216
2214
|
"-d0 -e0 -y install cups-1.2.4-11.19.el5 vim-1.0"
|
2217
2215
|
)
|
2218
|
-
@provider.install_package(["cups", "vim"], ["1.2.4-11.19.el5",
|
2216
|
+
@provider.install_package(["cups", "vim"], ["1.2.4-11.19.el5", "1.0"])
|
2219
2217
|
end
|
2220
2218
|
|
2221
2219
|
it "should run yum install with the package name, version and arch" do
|
@@ -2231,17 +2229,17 @@ describe "Chef::Provider::Package::Yum - Multi" do
|
|
2231
2229
|
it "installs the package with the options given in the resource" do
|
2232
2230
|
@provider.load_current_resource
|
2233
2231
|
allow(Chef::Provider::Package::Yum::RPMUtils).to receive(:rpmvercmp).and_return(-1)
|
2234
|
-
allow(@yum_cache).to receive(:installed_version).with(
|
2235
|
-
allow(@yum_cache).to receive(:installed_version).with(
|
2232
|
+
allow(@yum_cache).to receive(:installed_version).with("cups", nil).and_return("1.2.4-11.18.el5")
|
2233
|
+
allow(@yum_cache).to receive(:installed_version).with("vim", nil).and_return("0.9")
|
2236
2234
|
expect(@provider).to receive(:yum_command).with(
|
2237
2235
|
"-d0 -e0 -y --disablerepo epmd install cups-1.2.4-11.19.el5 vim-1.0"
|
2238
2236
|
)
|
2239
2237
|
allow(@new_resource).to receive(:options).and_return("--disablerepo epmd")
|
2240
|
-
@provider.install_package(["cups", "vim"], ["1.2.4-11.19.el5",
|
2238
|
+
@provider.install_package(["cups", "vim"], ["1.2.4-11.19.el5", "1.0"])
|
2241
2239
|
end
|
2242
2240
|
|
2243
2241
|
it "should run yum install with the package name and version when name has arch" do
|
2244
|
-
@new_resource = Chef::Resource::Package.new([
|
2242
|
+
@new_resource = Chef::Resource::Package.new(["cups.x86_64", "vim"])
|
2245
2243
|
@provider = Chef::Provider::Package::Yum.new(@new_resource, @run_context)
|
2246
2244
|
allow(Chef::Provider::Package::Yum::RPMUtils).to receive(:rpmvercmp).and_return(-1)
|
2247
2245
|
|
@@ -2249,20 +2247,20 @@ describe "Chef::Provider::Package::Yum - Multi" do
|
|
2249
2247
|
# and we need to craft the right response. The default mock setup above
|
2250
2248
|
# will just return valid versions all the time which won't work for this
|
2251
2249
|
# test.
|
2252
|
-
allow(@yum_cache).to receive(:installed_version).with(
|
2253
|
-
allow(@yum_cache).to receive(:candidate_version).with(
|
2254
|
-
allow(@yum_cache).to receive(:installed_version).with(
|
2255
|
-
allow(@yum_cache).to receive(:candidate_version).with(
|
2250
|
+
allow(@yum_cache).to receive(:installed_version).with("cups", "x86_64").and_return("XXXX")
|
2251
|
+
allow(@yum_cache).to receive(:candidate_version).with("cups", "x86_64").and_return("1.2.4-11.18.el5")
|
2252
|
+
allow(@yum_cache).to receive(:installed_version).with("cups.x86_64").and_return(nil)
|
2253
|
+
allow(@yum_cache).to receive(:candidate_version).with("cups.x86_64").and_return(nil)
|
2256
2254
|
|
2257
2255
|
# Normal mock's for the idempotency check
|
2258
|
-
allow(@yum_cache).to receive(:installed_version).with(
|
2259
|
-
allow(@yum_cache).to receive(:installed_version).with(
|
2256
|
+
allow(@yum_cache).to receive(:installed_version).with("cups", nil).and_return("1.2.4-11.18.el5")
|
2257
|
+
allow(@yum_cache).to receive(:installed_version).with("vim", nil).and_return("0.9")
|
2260
2258
|
|
2261
2259
|
@provider.load_current_resource
|
2262
2260
|
expect(@provider).to receive(:yum_command).with(
|
2263
2261
|
"-d0 -e0 -y install cups-1.2.4-11.19.el5.x86_64 vim-1.0"
|
2264
2262
|
)
|
2265
|
-
@provider.install_package(["cups", "vim"], ["1.2.4-11.19.el5",
|
2263
|
+
@provider.install_package(["cups", "vim"], ["1.2.4-11.19.el5", "1.0"])
|
2266
2264
|
end
|
2267
2265
|
|
2268
2266
|
end
|