chef-cli 5.3.0 → 5.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +1 -1
- data/chef-cli.gemspec +2 -2
- data/lib/chef-cli/authenticated_http.rb +1 -1
- data/lib/chef-cli/builtin_commands.rb +1 -1
- data/lib/chef-cli/chef_runner.rb +1 -1
- data/lib/chef-cli/chef_server_api_multi.rb +1 -1
- data/lib/chef-cli/cli.rb +1 -1
- data/lib/chef-cli/command/base.rb +12 -1
- data/lib/chef-cli/command/clean_policy_cookbooks.rb +1 -12
- data/lib/chef-cli/command/clean_policy_revisions.rb +1 -12
- data/lib/chef-cli/command/delete_policy.rb +1 -12
- data/lib/chef-cli/command/delete_policy_group.rb +1 -12
- data/lib/chef-cli/command/describe_cookbook.rb +17 -0
- data/lib/chef-cli/command/diff.rb +1 -12
- data/lib/chef-cli/command/env.rb +1 -1
- data/lib/chef-cli/command/exec.rb +1 -1
- data/lib/chef-cli/command/gem.rb +1 -1
- data/lib/chef-cli/command/generate.rb +1 -1
- data/lib/chef-cli/command/generator_commands/attribute.rb +1 -1
- data/lib/chef-cli/command/generator_commands/base.rb +1 -1
- data/lib/chef-cli/command/generator_commands/chef_exts/generator_desc_resource.rb +1 -1
- data/lib/chef-cli/command/generator_commands/chef_exts/quieter_doc_formatter.rb +1 -1
- data/lib/chef-cli/command/generator_commands/chef_exts/recipe_dsl_ext.rb +1 -1
- data/lib/chef-cli/command/generator_commands/cookbook.rb +1 -1
- data/lib/chef-cli/command/generator_commands/cookbook_code_file.rb +1 -1
- data/lib/chef-cli/command/generator_commands/cookbook_file.rb +1 -1
- data/lib/chef-cli/command/generator_commands/generator_generator.rb +1 -1
- data/lib/chef-cli/command/generator_commands/helpers.rb +1 -1
- data/lib/chef-cli/command/generator_commands/policyfile.rb +1 -1
- data/lib/chef-cli/command/generator_commands/recipe.rb +1 -1
- data/lib/chef-cli/command/generator_commands/repo.rb +1 -1
- data/lib/chef-cli/command/generator_commands/resource.rb +1 -1
- data/lib/chef-cli/command/generator_commands/template.rb +1 -1
- data/lib/chef-cli/command/generator_commands.rb +1 -1
- data/lib/chef-cli/command/install.rb +1 -12
- data/lib/chef-cli/command/provision.rb +1 -1
- data/lib/chef-cli/command/push.rb +1 -12
- data/lib/chef-cli/command/push_archive.rb +1 -12
- data/lib/chef-cli/command/shell_init.rb +1 -1
- data/lib/chef-cli/command/show_policy.rb +1 -12
- data/lib/chef-cli/command/undelete.rb +1 -12
- data/lib/chef-cli/command/update.rb +1 -1
- data/lib/chef-cli/commands_map.rb +1 -1
- data/lib/chef-cli/configurable.rb +1 -1
- data/lib/chef-cli/cookbook_metadata.rb +1 -1
- data/lib/chef-cli/cookbook_omnifetch.rb +1 -1
- data/lib/chef-cli/cookbook_profiler/git.rb +3 -3
- data/lib/chef-cli/cookbook_profiler/identifiers.rb +1 -1
- data/lib/chef-cli/cookbook_profiler/null_scm.rb +1 -1
- data/lib/chef-cli/exceptions.rb +1 -1
- data/lib/chef-cli/generator.rb +1 -1
- data/lib/chef-cli/helpers.rb +1 -1
- data/lib/chef-cli/pager.rb +1 -1
- data/lib/chef-cli/policyfile/artifactory_cookbook_source.rb +1 -1
- data/lib/chef-cli/policyfile/attribute_merge_checker.rb +1 -1
- data/lib/chef-cli/policyfile/chef_repo_cookbook_source.rb +1 -1
- data/lib/chef-cli/policyfile/chef_server_cookbook_source.rb +1 -1
- data/lib/chef-cli/policyfile/chef_server_lock_fetcher.rb +1 -1
- data/lib/chef-cli/policyfile/community_cookbook_source.rb +1 -1
- data/lib/chef-cli/policyfile/comparison_base.rb +1 -1
- data/lib/chef-cli/policyfile/cookbook_location_specification.rb +1 -1
- data/lib/chef-cli/policyfile/cookbook_locks.rb +1 -1
- data/lib/chef-cli/policyfile/cookbook_sources.rb +1 -1
- data/lib/chef-cli/policyfile/delivery_supermarket_source.rb +1 -1
- data/lib/chef-cli/policyfile/differ.rb +1 -1
- data/lib/chef-cli/policyfile/git_lock_fetcher.rb +1 -1
- data/lib/chef-cli/policyfile/included_policies_cookbook_source.rb +1 -1
- data/lib/chef-cli/policyfile/lister.rb +1 -1
- data/lib/chef-cli/policyfile/local_lock_fetcher.rb +1 -1
- data/lib/chef-cli/policyfile/lock_applier.rb +1 -1
- data/lib/chef-cli/policyfile/lock_fetcher_mixin.rb +1 -1
- data/lib/chef-cli/policyfile/null_cookbook_source.rb +1 -1
- data/lib/chef-cli/policyfile/policyfile_location_specification.rb +1 -1
- data/lib/chef-cli/policyfile/read_cookbook_for_compat_mode_upload.rb +1 -1
- data/lib/chef-cli/policyfile/remote_lock_fetcher.rb +1 -1
- data/lib/chef-cli/policyfile/reports/install.rb +1 -1
- data/lib/chef-cli/policyfile/reports/table_printer.rb +1 -1
- data/lib/chef-cli/policyfile/reports/upload.rb +1 -1
- data/lib/chef-cli/policyfile/solution_dependencies.rb +1 -1
- data/lib/chef-cli/policyfile/source_uri.rb +1 -1
- data/lib/chef-cli/policyfile/storage_config.rb +1 -1
- data/lib/chef-cli/policyfile/undo_record.rb +1 -1
- data/lib/chef-cli/policyfile/undo_stack.rb +1 -1
- data/lib/chef-cli/policyfile/uploader.rb +1 -1
- data/lib/chef-cli/policyfile_compiler.rb +1 -1
- data/lib/chef-cli/policyfile_lock.rb +1 -1
- data/lib/chef-cli/policyfile_services/clean_policies.rb +1 -1
- data/lib/chef-cli/policyfile_services/clean_policy_cookbooks.rb +1 -1
- data/lib/chef-cli/policyfile_services/install.rb +1 -1
- data/lib/chef-cli/policyfile_services/push.rb +1 -1
- data/lib/chef-cli/policyfile_services/push_archive.rb +1 -1
- data/lib/chef-cli/policyfile_services/rm_policy.rb +1 -1
- data/lib/chef-cli/policyfile_services/rm_policy_group.rb +1 -1
- data/lib/chef-cli/policyfile_services/show_policy.rb +1 -1
- data/lib/chef-cli/policyfile_services/undelete.rb +1 -1
- data/lib/chef-cli/policyfile_services/update_attributes.rb +1 -1
- data/lib/chef-cli/service_exception_inspectors/base.rb +1 -1
- data/lib/chef-cli/service_exception_inspectors/http.rb +1 -1
- data/lib/chef-cli/service_exception_inspectors.rb +1 -1
- data/lib/chef-cli/service_exceptions.rb +1 -1
- data/lib/chef-cli/shell_out.rb +1 -1
- data/lib/chef-cli/skeletons/code_generator/metadata.rb +1 -1
- data/lib/chef-cli/skeletons/code_generator/templates/default/inspec_default_test.rb.erb +1 -1
- data/lib/chef-cli/skeletons/code_generator/templates/default/kitchen.yml.erb +1 -1
- data/lib/chef-cli/skeletons/code_generator/templates/default/kitchen_dokken.yml.erb +1 -1
- data/lib/chef-cli/skeletons/code_generator/templates/default/kitchen_policyfile.yml.erb +3 -4
- data/lib/chef-cli/skeletons/code_generator/templates/default/metadata.rb.erb +1 -1
- data/lib/chef-cli/skeletons/code_generator/templates/default/recipe_spec.rb.erb +2 -2
- data/lib/chef-cli/ui.rb +1 -1
- data/lib/chef-cli/version.rb +2 -2
- data/lib/chef-cli.rb +1 -1
- data/spec/shared/fixture_cookbook_checksums.rb +1 -1
- data/spec/shared/setup_git_committer_config.rb +1 -1
- data/spec/shared/setup_git_cookbooks.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- data/spec/unit/chef_runner_spec.rb +1 -1
- data/spec/unit/chef_server_api_multi_spec.rb +1 -1
- data/spec/unit/cli_spec.rb +1 -1
- data/spec/unit/command/base_spec.rb +6 -1
- data/spec/unit/command/clean_policy_cookbooks_spec.rb +1 -1
- data/spec/unit/command/clean_policy_revisions_spec.rb +1 -1
- data/spec/unit/command/delete_policy_group_spec.rb +1 -1
- data/spec/unit/command/delete_policy_spec.rb +1 -1
- data/spec/unit/command/diff_spec.rb +1 -1
- data/spec/unit/command/env_spec.rb +1 -1
- data/spec/unit/command/exec_spec.rb +1 -1
- data/spec/unit/command/generate_spec.rb +1 -1
- data/spec/unit/command/generator_commands/attribute_spec.rb +1 -1
- data/spec/unit/command/generator_commands/base_spec.rb +1 -1
- data/spec/unit/command/generator_commands/chef_exts/generator_desc_resource_spec.rb +1 -1
- data/spec/unit/command/generator_commands/chef_exts/recipe_dsl_ext_spec.rb +1 -1
- data/spec/unit/command/generator_commands/cookbook_file_spec.rb +1 -1
- data/spec/unit/command/generator_commands/cookbook_spec.rb +4 -5
- data/spec/unit/command/generator_commands/generator_generator_spec.rb +1 -1
- data/spec/unit/command/generator_commands/helpers_spec.rb +1 -1
- data/spec/unit/command/generator_commands/policyfile_spec.rb +1 -1
- data/spec/unit/command/generator_commands/recipe_spec.rb +1 -1
- data/spec/unit/command/generator_commands/repo_spec.rb +1 -1
- data/spec/unit/command/generator_commands/resource_spec.rb +1 -1
- data/spec/unit/command/generator_commands/template_spec.rb +1 -1
- data/spec/unit/command/install_spec.rb +1 -1
- data/spec/unit/command/push_archive_spec.rb +1 -1
- data/spec/unit/command/push_spec.rb +1 -1
- data/spec/unit/command/shell_init_spec.rb +1 -1
- data/spec/unit/command/show_policy_spec.rb +1 -1
- data/spec/unit/command/undelete_spec.rb +1 -1
- data/spec/unit/command/update_spec.rb +1 -1
- data/spec/unit/commands_map_spec.rb +1 -1
- data/spec/unit/configurable_spec.rb +1 -1
- data/spec/unit/cookbook_profiler/git_spec.rb +1 -1
- data/spec/unit/cookbook_profiler/identifiers_spec.rb +1 -1
- data/spec/unit/generator_spec.rb +1 -1
- data/spec/unit/helpers_spec.rb +1 -1
- data/spec/unit/pager_spec.rb +1 -1
- data/spec/unit/policyfile/artifactory_cookbook_source_spec.rb +1 -1
- data/spec/unit/policyfile/attribute_merge_checker_spec.rb +1 -1
- data/spec/unit/policyfile/chef_repo_cookbook_source_spec.rb +1 -1
- data/spec/unit/policyfile/chef_server_cookbook_source_spec.rb +1 -1
- data/spec/unit/policyfile/chef_server_lock_fetcher_spec.rb +1 -1
- data/spec/unit/policyfile/community_cookbook_source_spec.rb +1 -1
- data/spec/unit/policyfile/comparison_base_spec.rb +1 -1
- data/spec/unit/policyfile/cookbook_location_specification_spec.rb +1 -1
- data/spec/unit/policyfile/cookbook_locks_spec.rb +1 -1
- data/spec/unit/policyfile/delivery_supermarket_source_spec.rb +1 -1
- data/spec/unit/policyfile/differ_spec.rb +1 -1
- data/spec/unit/policyfile/git_lock_fetcher_spec.rb +1 -1
- data/spec/unit/policyfile/included_policies_cookbook_source_spec.rb +1 -1
- data/spec/unit/policyfile/lister_spec.rb +1 -1
- data/spec/unit/policyfile/local_lock_fetcher_spec.rb +1 -1
- data/spec/unit/policyfile/lock_applier_spec.rb +1 -1
- data/spec/unit/policyfile/lock_fetcher_mixin_spec.rb +1 -1
- data/spec/unit/policyfile/null_cookbook_source_spec.rb +1 -1
- data/spec/unit/policyfile/read_cookbook_for_compat_mode_upload_spec.rb +1 -1
- data/spec/unit/policyfile/remote_lock_fetcher_spec.rb +1 -1
- data/spec/unit/policyfile/reports/install_spec.rb +1 -1
- data/spec/unit/policyfile/reports/upload_spec.rb +1 -1
- data/spec/unit/policyfile/solution_dependencies_spec.rb +1 -1
- data/spec/unit/policyfile/source_uri_spec.rb +1 -1
- data/spec/unit/policyfile/storage_config_spec.rb +1 -1
- data/spec/unit/policyfile/undo_record_spec.rb +1 -1
- data/spec/unit/policyfile/undo_stack_spec.rb +1 -1
- data/spec/unit/policyfile/uploader_spec.rb +1 -1
- data/spec/unit/policyfile_demands_spec.rb +1 -1
- data/spec/unit/policyfile_includes_dsl_spec.rb +1 -1
- data/spec/unit/policyfile_includes_spec.rb +1 -1
- data/spec/unit/policyfile_install_with_includes_spec.rb +1 -1
- data/spec/unit/policyfile_lock_build_spec.rb +1 -1
- data/spec/unit/policyfile_lock_install_spec.rb +1 -1
- data/spec/unit/policyfile_lock_serialization_spec.rb +1 -1
- data/spec/unit/policyfile_lock_validation_spec.rb +1 -1
- data/spec/unit/policyfile_services/clean_policies_spec.rb +1 -1
- data/spec/unit/policyfile_services/clean_policy_cookbooks_spec.rb +1 -1
- data/spec/unit/policyfile_services/export_repo_spec.rb +1 -1
- data/spec/unit/policyfile_services/install_spec.rb +1 -1
- data/spec/unit/policyfile_services/push_archive_spec.rb +1 -1
- data/spec/unit/policyfile_services/push_spec.rb +1 -1
- data/spec/unit/policyfile_services/rm_policy_group_spec.rb +1 -1
- data/spec/unit/policyfile_services/rm_policy_spec.rb +1 -1
- data/spec/unit/policyfile_services/show_policy_spec.rb +1 -1
- data/spec/unit/policyfile_services/undelete_spec.rb +1 -1
- data/spec/unit/policyfile_services/update_attributes_spec.rb +1 -1
- data/spec/unit/policyfile_services/update_spec.rb +1 -1
- data/spec/unit/service_exception_inspectors/base_spec.rb +1 -1
- data/spec/unit/service_exception_inspectors/http_spec.rb +1 -1
- data/spec/unit/shell_out_spec.rb +1 -1
- metadata +6 -6
data/lib/chef-cli/helpers.rb
CHANGED
data/lib/chef-cli/pager.rb
CHANGED
data/lib/chef-cli/shell_out.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# InSpec test for recipe <%= cookbook_name %>::<%= recipe_name %>
|
1
|
+
# Chef InSpec test for recipe <%= cookbook_name %>::<%= recipe_name %>
|
2
2
|
|
3
3
|
# The Chef InSpec reference, with examples and extensive documentation, can be
|
4
4
|
# found at https://docs.chef.io/inspec/resources/
|
@@ -19,7 +19,7 @@ provisioner:
|
|
19
19
|
## product_name and product_version specifies a specific Chef product and version to install.
|
20
20
|
## see the Chef documentation for more details: https://docs.chef.io/workstation/config_yml_kitchen/
|
21
21
|
# product_name: chef
|
22
|
-
# product_version:
|
22
|
+
# product_version: 17
|
23
23
|
|
24
24
|
verifier:
|
25
25
|
name: inspec
|
@@ -13,7 +13,7 @@ verifier:
|
|
13
13
|
name: inspec
|
14
14
|
|
15
15
|
platforms:
|
16
|
-
# @see https://github.com/chef-cookbooks/testing_examples/blob/
|
16
|
+
# @see https://github.com/chef-cookbooks/testing_examples/blob/main/kitchen.dokken.yml
|
17
17
|
# @see https://hub.docker.com/u/dokken
|
18
18
|
- name: ubuntu-20.04
|
19
19
|
driver:
|
@@ -2,8 +2,8 @@
|
|
2
2
|
driver:
|
3
3
|
name: vagrant
|
4
4
|
|
5
|
-
## The forwarded_port port feature lets you connect to ports on the VM guest
|
6
|
-
## localhost on the host.
|
5
|
+
## The forwarded_port port feature lets you connect to ports on the VM guest
|
6
|
+
## via localhost on the host.
|
7
7
|
## see also: https://www.vagrantup.com/docs/networking/forwarded_ports
|
8
8
|
|
9
9
|
# network:
|
@@ -15,7 +15,7 @@ provisioner:
|
|
15
15
|
## product_name and product_version specifies a specific Chef product and version to install.
|
16
16
|
## see the Chef documentation for more details: https://docs.chef.io/workstation/config_yml_kitchen/
|
17
17
|
# product_name: chef
|
18
|
-
# product_version:
|
18
|
+
# product_version: 17
|
19
19
|
|
20
20
|
verifier:
|
21
21
|
name: inspec
|
@@ -29,4 +29,3 @@ suites:
|
|
29
29
|
verifier:
|
30
30
|
inspec_tests:
|
31
31
|
- test/integration/default
|
32
|
-
attributes:
|
@@ -4,7 +4,7 @@ maintainer_email '<%= email %>'
|
|
4
4
|
license '<%= @spdx_license %>'
|
5
5
|
description 'Installs/Configures <%= cookbook_name %>'
|
6
6
|
version '0.1.0'
|
7
|
-
chef_version '>=
|
7
|
+
chef_version '>= 16.0'
|
8
8
|
|
9
9
|
# The `issues_url` points to the location where issues for this cookbook are
|
10
10
|
# tracked. A `View Issues` link will be displayed on this cookbook's page when
|
@@ -9,7 +9,7 @@ require 'spec_helper'
|
|
9
9
|
describe '<%= cookbook_name %>::<%= recipe_name %>' do
|
10
10
|
context 'When all attributes are default, on Ubuntu 20.04' do
|
11
11
|
# for a complete list of available platforms and versions see:
|
12
|
-
# https://github.com/chefspec/fauxhai/blob/
|
12
|
+
# https://github.com/chefspec/fauxhai/blob/main/PLATFORMS.md
|
13
13
|
platform 'ubuntu', '20.04'
|
14
14
|
|
15
15
|
it 'converges successfully' do
|
@@ -19,7 +19,7 @@ describe '<%= cookbook_name %>::<%= recipe_name %>' do
|
|
19
19
|
|
20
20
|
context 'When all attributes are default, on CentOS 8' do
|
21
21
|
# for a complete list of available platforms and versions see:
|
22
|
-
# https://github.com/chefspec/fauxhai/blob/
|
22
|
+
# https://github.com/chefspec/fauxhai/blob/main/PLATFORMS.md
|
23
23
|
platform 'centos', '8'
|
24
24
|
|
25
25
|
it 'converges successfully' do
|
data/lib/chef-cli/ui.rb
CHANGED
data/lib/chef-cli/version.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# Copyright::
|
2
|
+
# Copyright:: Chef Software Inc.
|
3
3
|
# License:: Apache License, Version 2.0
|
4
4
|
#
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -16,5 +16,5 @@
|
|
16
16
|
#
|
17
17
|
|
18
18
|
module ChefCLI
|
19
|
-
VERSION = "5.
|
19
|
+
VERSION = "5.5.0".freeze
|
20
20
|
end
|
data/lib/chef-cli.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
data/spec/unit/cli_spec.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#
|
2
|
-
# Copyright::
|
2
|
+
# Copyright:: Chef Software Inc.
|
3
3
|
# License:: Apache License, Version 2.0
|
4
4
|
#
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
@@ -16,6 +16,7 @@
|
|
16
16
|
#
|
17
17
|
|
18
18
|
require "spec_helper"
|
19
|
+
require "chef-cli/command/base"
|
19
20
|
|
20
21
|
describe ChefCLI::Command::Base do
|
21
22
|
class TestCommand < ChefCLI::Command::Base
|
@@ -126,6 +127,8 @@ describe ChefCLI::Command::Base do
|
|
126
127
|
use me please
|
127
128
|
-a, --arg ARG An option with a required argument
|
128
129
|
--chef-license ACCEPTANCE Accept the license for this product and any contained products ('accept', 'accept-no-persist', or 'accept-silent')
|
130
|
+
-c, --config CONFIG_FILE Path to configuration file
|
131
|
+
-D, --debug Enable stacktraces and other debug output
|
129
132
|
-h, --help Show this message
|
130
133
|
-u, --user If the user exists
|
131
134
|
-v, --version Show #{ChefCLI::Dist::PRODUCT} version
|
@@ -147,6 +150,8 @@ describe ChefCLI::Command::Base do
|
|
147
150
|
use me please
|
148
151
|
-a, --arg ARG An option with a required argument
|
149
152
|
--chef-license ACCEPTANCE Accept the license for this product and any contained products ('accept', 'accept-no-persist', or 'accept-silent')
|
153
|
+
-c, --config CONFIG_FILE Path to configuration file
|
154
|
+
-D, --debug Enable stacktraces and other debug output
|
150
155
|
-h, --help Show this message
|
151
156
|
-u, --user If the user exists
|
152
157
|
-v, --version Show #{ChefCLI::Dist::PRODUCT} version
|