chef-cli 5.6.23 → 6.1.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +20 -12
- data/Rakefile +13 -17
- data/bin/chef-cli +1 -1
- data/chef-cli.gemspec +6 -4
- data/lib/chef-cli/authenticated_http.rb +1 -1
- data/lib/chef-cli/builtin_commands.rb +7 -6
- 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 +1 -1
- data/lib/chef-cli/command/clean_policy_cookbooks.rb +1 -1
- data/lib/chef-cli/command/clean_policy_revisions.rb +1 -1
- data/lib/chef-cli/command/delete_policy.rb +3 -3
- data/lib/chef-cli/command/delete_policy_group.rb +3 -3
- data/lib/chef-cli/command/describe_cookbook.rb +1 -1
- data/lib/chef-cli/command/diff.rb +5 -5
- data/lib/chef-cli/command/env.rb +38 -13
- data/lib/chef-cli/command/exec.rb +3 -2
- data/lib/chef-cli/command/export.rb +1 -1
- data/lib/chef-cli/command/gem.rb +2 -2
- 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/input.rb +1 -1
- data/lib/chef-cli/command/generator_commands/policyfile.rb +1 -1
- data/lib/chef-cli/command/generator_commands/profile.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/waiver.rb +1 -1
- data/lib/chef-cli/command/generator_commands.rb +1 -1
- data/lib/chef-cli/command/install.rb +1 -1
- data/lib/chef-cli/command/license.rb +111 -0
- data/lib/chef-cli/command/push.rb +5 -5
- data/lib/chef-cli/command/push_archive.rb +1 -1
- data/lib/chef-cli/command/shell_init.rb +7 -2
- data/lib/chef-cli/command/show_policy.rb +7 -7
- data/lib/chef-cli/command/undelete.rb +3 -3
- data/lib/chef-cli/command/update.rb +1 -1
- data/lib/chef-cli/commands_map.rb +1 -1
- data/lib/chef-cli/completions/bash.sh.erb +1 -1
- data/lib/chef-cli/completions/chef.fish.erb +1 -1
- data/lib/chef-cli/completions/zsh.zsh.erb +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 +3 -3
- data/lib/chef-cli/cookbook_profiler/git.rb +1 -1
- 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/dist.rb +6 -0
- data/lib/chef-cli/exceptions.rb +1 -1
- data/lib/chef-cli/generator.rb +1 -1
- data/lib/chef-cli/helpers.rb +100 -5
- data/lib/chef-cli/licensing/base.rb +42 -0
- data/lib/chef-cli/licensing/config.rb +26 -0
- 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 +3 -2
- 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/dsl.rb +7 -5
- data/lib/chef-cli/policyfile/git_lock_fetcher.rb +2 -2
- 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 +5 -2
- 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/export_repo.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/files/default/cookbook_readmes/README.md +3 -0
- data/lib/chef-cli/skeletons/code_generator/recipes/cookbook.rb +5 -5
- data/lib/chef-cli/skeletons/code_generator/recipes/profile.rb +1 -1
- data/lib/chef-cli/ui.rb +1 -1
- data/lib/chef-cli/version.rb +2 -2
- data/lib/chef-cli.rb +1 -1
- data/lib/kitchen/provisioner/chef_zero_capture.rb +2 -2
- data/lib/kitchen/provisioner/policyfile_zero.rb +2 -2
- 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/test_helpers.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 +3 -1
- data/spec/unit/command/base_spec.rb +1 -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 +132 -2
- data/spec/unit/command/exec_spec.rb +2 -1
- data/spec/unit/command/export_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 +1 -1
- 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/input_spec.rb +1 -1
- data/spec/unit/command/generator_commands/policyfile_spec.rb +1 -1
- data/spec/unit/command/generator_commands/profile_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/generator_commands/waiver_spec.rb +1 -1
- data/spec/unit/command/install_spec.rb +1 -1
- data/spec/unit/command/license_spec.rb +162 -0
- 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 +99 -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_metadata_spec.rb +1 -1
- data/spec/unit/cookbook_omnifetch.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 +35 -2
- data/spec/unit/kitchen/provisioner/chef_zero_capture_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 +7 -7
- 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 +3 -1
- data/spec/unit/policyfile_evaluation_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 +3 -3
- 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 +53 -26
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#
|
|
2
|
-
# Copyright:: Copyright (c)
|
|
2
|
+
# Copyright:: Copyright (c) 2019-2025 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
|
|
3
3
|
# License:: Apache License, Version 2.0
|
|
4
4
|
#
|
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -110,14 +110,13 @@ module ChefCLI
|
|
|
110
110
|
else
|
|
111
111
|
{}
|
|
112
112
|
end
|
|
113
|
-
|
|
114
113
|
constraint = version_and_source_opts.first || ">= 0.0.0"
|
|
115
114
|
spec = CookbookLocationSpecification.new(name, constraint, source_options, storage_config)
|
|
116
115
|
|
|
117
116
|
if ( existing_source = @cookbook_location_specs[name] )
|
|
118
117
|
err = "Cookbook '#{name}' assigned to conflicting sources\n\n"
|
|
119
|
-
err << "Previous source:
|
|
120
|
-
err << "Conflicts with:
|
|
118
|
+
err << "Previous source: {" + existing_source.source_options.map { |k, v| "#{k.inspect}=>#{v.inspect}" }.join(", ") + "}\n"
|
|
119
|
+
err << "Conflicts with: {" + source_options.map { |k, v| "#{k.inspect}=>#{v.inspect}" }.join(", ") + "}\n"
|
|
121
120
|
@errors << err
|
|
122
121
|
else
|
|
123
122
|
@cookbook_location_specs[name] = spec
|
|
@@ -179,8 +178,11 @@ module ChefCLI
|
|
|
179
178
|
error_message << " #{error_context(policyfile_string, policyfile_filename, e)}\n\n"
|
|
180
179
|
unless trace.empty?
|
|
181
180
|
error_message << " Backtrace:\n"
|
|
181
|
+
normalized_trace = trace.map do |line|
|
|
182
|
+
line.gsub(/:in ['"]?(?:.*[#.]?)?(eval_policyfile)['"]?/, ":in `\\1'")
|
|
183
|
+
end
|
|
182
184
|
# TODO: need a way to disable filtering
|
|
183
|
-
error_message <<
|
|
185
|
+
error_message << normalized_trace.inject("") { |formatted_trace, line| formatted_trace << " #{line}\n" }
|
|
184
186
|
end
|
|
185
187
|
@errors << error_message
|
|
186
188
|
end
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#
|
|
2
|
-
#
|
|
2
|
+
# Copyright (c) 2019-2025 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
|
|
3
3
|
# License:: Apache License, Version 2.0
|
|
4
4
|
#
|
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -116,7 +116,7 @@ module ChefCLI
|
|
|
116
116
|
opt["tag"] = tag unless opt.key?("tag") || branch.nil?
|
|
117
117
|
opt["ref"] = ref unless opt.key?("ref") || ref.nil?
|
|
118
118
|
|
|
119
|
-
path_keys = %w{path rel}.
|
|
119
|
+
path_keys = %w{path rel}.select { |path_key| opt.key?(path_key) }
|
|
120
120
|
|
|
121
121
|
path_keys.each do |name|
|
|
122
122
|
# We can safely grab the entire cookbook when the Policyfile defines a cookbook path of itself (".")
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#
|
|
2
|
-
#
|
|
2
|
+
# Copyright (c) 2019-2025 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
|
|
3
3
|
# License:: Apache License, Version 2.0
|
|
4
4
|
#
|
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -194,7 +194,10 @@ module ChefCLI
|
|
|
194
194
|
unless missing_recipes_by_cb_spec.empty?
|
|
195
195
|
message = "The installed cookbooks do not contain all the recipes required by your run list(s):\n"
|
|
196
196
|
missing_recipes_by_cb_spec.each do |spec, missing_items|
|
|
197
|
-
|
|
197
|
+
formatted_opts = "{" + spec.source_options.map { |k, v| "#{k.inspect}=>#{v.inspect}" }.join(", ") + "}"
|
|
198
|
+
message << "Cookbook '#{spec.name}' = #{spec.version} #{formatted_opts}\n"
|
|
199
|
+
message << "is missing the following required recipes:\n"
|
|
200
|
+
|
|
198
201
|
missing_items.each { |_cb, recipe| message << "* #{recipe}\n" }
|
|
199
202
|
end
|
|
200
203
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#
|
|
2
|
-
# Copyright:: Copyright (c)
|
|
2
|
+
# Copyright:: Copyright (c) 2019-2025 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
|
|
3
3
|
# License:: Apache License, Version 2.0
|
|
4
4
|
#
|
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
data/lib/chef-cli/shell_out.rb
CHANGED
|
@@ -64,3 +64,6 @@ knife cookbook site download COOKBOOK
|
|
|
64
64
|
```
|
|
65
65
|
|
|
66
66
|
This creates the COOKBOOK.tar.gz from in the current directory (e.g., `~/chef-repo`). We recommend following a workflow similar to the above for your version control tool.
|
|
67
|
+
|
|
68
|
+
# Copyright
|
|
69
|
+
See [COPYRIGHT.md](./../../../../../../../COPYRIGHT.md).
|
|
@@ -166,11 +166,11 @@ if context.vscode_dir
|
|
|
166
166
|
|
|
167
167
|
file "#{cookbook_dir}/.vscode/extensions.json" do
|
|
168
168
|
content <<~CONTENT
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
169
|
+
{
|
|
170
|
+
"recommendations": [
|
|
171
|
+
"chef-software.chef"
|
|
172
|
+
]
|
|
173
|
+
}
|
|
174
174
|
CONTENT
|
|
175
175
|
end
|
|
176
176
|
end
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
context = ChefCLI::Generator.context
|
|
2
2
|
cookbook_dir = File.join(context.cookbook_root, context.cookbook_name)
|
|
3
|
-
profile_dir = File.join(cookbook_dir, 'compliance', 'profiles',
|
|
3
|
+
profile_dir = File.join(cookbook_dir, 'compliance', 'profiles', context.new_file_basename.to_s)
|
|
4
4
|
control_dir = File.join(profile_dir, 'controls')
|
|
5
5
|
|
|
6
6
|
directory control_dir do
|
data/lib/chef-cli/ui.rb
CHANGED
data/lib/chef-cli/version.rb
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#
|
|
2
|
-
#
|
|
2
|
+
# Copyright (c) 2019-2025 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
|
|
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 = "
|
|
19
|
+
VERSION = "6.1.27".freeze
|
|
20
20
|
end
|
data/lib/chef-cli.rb
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#
|
|
2
2
|
# Author:: Marc Paradise <marc@chef.io>
|
|
3
3
|
#
|
|
4
|
-
# Copyright (
|
|
4
|
+
# Copyright (c) 2019-2025 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
|
|
5
5
|
#
|
|
6
6
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
7
|
# you may not use this file except in compliance with the License.
|
|
@@ -77,7 +77,7 @@ module Kitchen
|
|
|
77
77
|
def default_config_rb
|
|
78
78
|
cfg = super
|
|
79
79
|
# Need to tell chef-zero about our additional config.
|
|
80
|
-
root = config[:root_path].gsub("$env:TEMP", "
|
|
80
|
+
root = config[:root_path].gsub("$env:TEMP", "#{ENV['TEMP']}")
|
|
81
81
|
cfg[:policies_path] = remote_path_join(root, config[:policies_path])
|
|
82
82
|
cfg[:policy_groups_path] = remote_path_join(root, config[:policy_groups_path])
|
|
83
83
|
cfg[:cookbook_artifacts_path] = remote_path_join(root, config[:cookbook_artifacts_path])
|
|
@@ -151,8 +151,8 @@ module Kitchen
|
|
|
151
151
|
# Must force this because TK by default copies the current cookbook to the sandbox
|
|
152
152
|
# See ChefCLI::PolicyfileServices::ExportRepo#assert_export_dir_clean!
|
|
153
153
|
@policy_exporter ||= ChefCLI::PolicyfileServices::ExportRepo.new(policyfile: config[:policyfile],
|
|
154
|
-
|
|
155
|
-
|
|
154
|
+
export_dir: sandbox_path,
|
|
155
|
+
force: true)
|
|
156
156
|
end
|
|
157
157
|
|
|
158
158
|
# Writes a fake (but valid) validation.pem into the sandbox directory.
|
data/spec/spec_helper.rb
CHANGED
data/spec/test_helpers.rb
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#
|
|
2
|
-
# Copyright:: Copyright (c)
|
|
2
|
+
# Copyright:: Copyright (c) 2019-2025 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
|
|
3
3
|
# License:: Apache License, Version 2.0
|
|
4
4
|
#
|
|
5
5
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
data/spec/unit/cli_spec.rb
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Copyright (c) 2019-2025 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
|
|
2
2
|
# License:: Apache License, Version 2.0
|
|
3
3
|
#
|
|
4
4
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -89,6 +89,8 @@ describe ChefCLI::CLI do
|
|
|
89
89
|
|
|
90
90
|
commands_map.builtin "example", :TestCommand, require_path: "unit/fixtures/command/cli_test_command",
|
|
91
91
|
desc: "Example subcommand for testing"
|
|
92
|
+
|
|
93
|
+
allow(ChefCLI::Licensing::Base).to receive(:validate).and_return(true)
|
|
92
94
|
end
|
|
93
95
|
|
|
94
96
|
context "given no arguments or options" do
|