chef-dk 4.1.7 → 4.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +4 -2
- data/Gemfile.lock +113 -17
- data/lib/chef-dk/builtin_commands.rb +3 -0
- data/lib/chef-dk/cli.rb +3 -1
- data/lib/chef-dk/command/clean_policy_cookbooks.rb +1 -0
- data/lib/chef-dk/command/clean_policy_revisions.rb +1 -0
- data/lib/chef-dk/command/delete_policy.rb +1 -0
- data/lib/chef-dk/command/delete_policy_group.rb +1 -0
- data/lib/chef-dk/command/describe_cookbook.rb +1 -0
- data/lib/chef-dk/command/diff.rb +5 -3
- data/lib/chef-dk/command/env.rb +6 -6
- data/lib/chef-dk/command/export.rb +1 -0
- data/lib/chef-dk/command/generate.rb +1 -0
- data/lib/chef-dk/command/generator_commands/chef_exts/quieter_doc_formatter.rb +2 -4
- data/lib/chef-dk/command/generator_commands/generator_generator.rb +1 -0
- data/lib/chef-dk/command/install.rb +1 -0
- data/lib/chef-dk/command/push.rb +1 -0
- data/lib/chef-dk/command/push_archive.rb +1 -1
- data/lib/chef-dk/command/shell_init.rb +3 -2
- data/lib/chef-dk/command/show_policy.rb +1 -0
- data/lib/chef-dk/command/undelete.rb +1 -0
- data/lib/chef-dk/command/update.rb +1 -0
- data/lib/chef-dk/command/verify.rb +1 -1
- data/lib/chef-dk/component_test.rb +2 -1
- data/lib/chef-dk/configurable.rb +3 -2
- data/lib/chef-dk/cookbook_profiler/null_scm.rb +1 -2
- data/lib/chef-dk/generator.rb +1 -1
- data/lib/chef-dk/helpers.rb +2 -1
- data/lib/chef-dk/policyfile/artifactory_cookbook_source.rb +1 -1
- data/lib/chef-dk/policyfile/attribute_merge_checker.rb +1 -1
- data/lib/chef-dk/policyfile/chef_repo_cookbook_source.rb +1 -1
- data/lib/chef-dk/policyfile/chef_server_cookbook_source.rb +3 -3
- data/lib/chef-dk/policyfile/chef_server_lock_fetcher.rb +5 -5
- data/lib/chef-dk/policyfile/community_cookbook_source.rb +1 -1
- data/lib/chef-dk/policyfile/comparison_base.rb +1 -0
- data/lib/chef-dk/policyfile/cookbook_location_specification.rb +4 -4
- data/lib/chef-dk/policyfile/cookbook_locks.rb +8 -5
- data/lib/chef-dk/policyfile/delivery_supermarket_source.rb +1 -1
- data/lib/chef-dk/policyfile/differ.rb +6 -2
- data/lib/chef-dk/policyfile/dsl.rb +4 -2
- data/lib/chef-dk/policyfile/git_lock_fetcher.rb +2 -2
- data/lib/chef-dk/policyfile/included_policies_cookbook_source.rb +1 -1
- data/lib/chef-dk/policyfile/lister.rb +2 -2
- data/lib/chef-dk/policyfile/local_lock_fetcher.rb +7 -5
- data/lib/chef-dk/policyfile/lock_applier.rb +1 -1
- data/lib/chef-dk/policyfile/null_cookbook_source.rb +1 -2
- data/lib/chef-dk/policyfile/policyfile_location_specification.rb +3 -3
- data/lib/chef-dk/policyfile/remote_lock_fetcher.rb +1 -1
- data/lib/chef-dk/policyfile/solution_dependencies.rb +13 -11
- data/lib/chef-dk/policyfile/storage_config.rb +1 -0
- data/lib/chef-dk/policyfile/undo_record.rb +10 -8
- data/lib/chef-dk/policyfile/uploader.rb +3 -1
- data/lib/chef-dk/policyfile_compiler.rb +17 -13
- data/lib/chef-dk/policyfile_lock.rb +17 -15
- data/lib/chef-dk/policyfile_services/clean_policies.rb +3 -3
- data/lib/chef-dk/policyfile_services/clean_policy_cookbooks.rb +2 -2
- data/lib/chef-dk/policyfile_services/export_repo.rb +4 -2
- data/lib/chef-dk/policyfile_services/install.rb +3 -1
- data/lib/chef-dk/policyfile_services/push.rb +6 -5
- data/lib/chef-dk/policyfile_services/push_archive.rb +6 -5
- data/lib/chef-dk/policyfile_services/rm_policy.rb +6 -2
- data/lib/chef-dk/policyfile_services/rm_policy_group.rb +2 -2
- data/lib/chef-dk/policyfile_services/show_policy.rb +2 -2
- data/lib/chef-dk/policyfile_services/undelete.rb +2 -2
- data/lib/chef-dk/version.rb +1 -1
- data/lib/kitchen/provisioner/policyfile_zero.rb +3 -6
- data/spec/unit/cli_spec.rb +6 -6
- data/spec/unit/command/base_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/export_spec.rb +1 -1
- data/spec/unit/command/generator_commands/recipe_spec.rb +2 -1
- data/spec/unit/command/generator_commands/repo_spec.rb +6 -6
- data/spec/unit/command/verify_spec.rb +1 -1
- data/spec/unit/policyfile/attribute_merge_checker_spec.rb +10 -8
- data/spec/unit/policyfile/chef_server_lock_fetcher_spec.rb +4 -2
- data/spec/unit/policyfile/cookbook_locks_spec.rb +9 -9
- data/spec/unit/policyfile/git_lock_fetcher_spec.rb +5 -5
- data/spec/unit/policyfile/included_policies_cookbook_source_spec.rb +5 -3
- data/spec/unit/policyfile/lister_spec.rb +5 -5
- data/spec/unit/policyfile/local_lock_fetcher_spec.rb +1 -1
- data/spec/unit/policyfile/lock_applier_spec.rb +2 -2
- data/spec/unit/policyfile/reports/install_spec.rb +14 -14
- data/spec/unit/policyfile/reports/upload_spec.rb +3 -3
- data/spec/unit/policyfile/uploader_spec.rb +13 -12
- data/spec/unit/policyfile_demands_spec.rb +4 -4
- data/spec/unit/policyfile_includes_spec.rb +14 -7
- data/spec/unit/policyfile_install_with_includes_spec.rb +8 -7
- data/spec/unit/policyfile_lock_build_spec.rb +17 -18
- data/spec/unit/policyfile_services/clean_policy_cookbooks_spec.rb +5 -5
- data/spec/unit/policyfile_services/push_archive_spec.rb +6 -6
- data/spec/unit/policyfile_services/push_spec.rb +8 -8
- data/spec/unit/policyfile_services/rm_policy_group_spec.rb +5 -5
- data/spec/unit/policyfile_services/rm_policy_spec.rb +5 -5
- data/spec/unit/policyfile_services/update_attributes_spec.rb +2 -1
- data/spec/unit/service_exception_inspectors/http_spec.rb +7 -7
- metadata +2 -2
@@ -60,9 +60,9 @@ describe ChefDK::PolicyfileServices::RmPolicyGroup do
|
|
60
60
|
|
61
61
|
let(:chef_config) do
|
62
62
|
double("Chef::Config",
|
63
|
-
|
64
|
-
|
65
|
-
|
63
|
+
chef_server_url: "https://localhost:10443",
|
64
|
+
client_key: "/path/to/client/key.pem",
|
65
|
+
node_name: "deuce")
|
66
66
|
end
|
67
67
|
|
68
68
|
subject(:rm_policy_group_service) do
|
@@ -79,8 +79,8 @@ describe ChefDK::PolicyfileServices::RmPolicyGroup do
|
|
79
79
|
|
80
80
|
it "configures an HTTP client" do
|
81
81
|
expect(Chef::ServerAPI).to receive(:new).with("https://localhost:10443",
|
82
|
-
|
83
|
-
|
82
|
+
signing_key_filename: "/path/to/client/key.pem",
|
83
|
+
client_name: "deuce")
|
84
84
|
rm_policy_group_service.http_client
|
85
85
|
end
|
86
86
|
|
@@ -36,9 +36,9 @@ describe ChefDK::PolicyfileServices::RmPolicy do
|
|
36
36
|
|
37
37
|
let(:chef_config) do
|
38
38
|
double("Chef::Config",
|
39
|
-
|
40
|
-
|
41
|
-
|
39
|
+
chef_server_url: "https://localhost:10443",
|
40
|
+
client_key: "/path/to/client/key.pem",
|
41
|
+
node_name: "deuce")
|
42
42
|
end
|
43
43
|
|
44
44
|
subject(:rm_policy_service) do
|
@@ -55,8 +55,8 @@ describe ChefDK::PolicyfileServices::RmPolicy do
|
|
55
55
|
|
56
56
|
it "configures an HTTP client" do
|
57
57
|
expect(Chef::ServerAPI).to receive(:new).with("https://localhost:10443",
|
58
|
-
|
59
|
-
|
58
|
+
signing_key_filename: "/path/to/client/key.pem",
|
59
|
+
client_name: "deuce")
|
60
60
|
rm_policy_service.http_client
|
61
61
|
end
|
62
62
|
|
@@ -174,7 +174,8 @@ describe ChefDK::PolicyfileServices::UpdateAttributes do
|
|
174
174
|
|
175
175
|
it "locks the included policyfile" do
|
176
176
|
expect(ChefDK::Policyfile::LockApplier).to receive(:new).with(
|
177
|
-
update_attrs_service.policyfile_lock, update_attrs_service.policyfile_compiler
|
177
|
+
update_attrs_service.policyfile_lock, update_attrs_service.policyfile_compiler
|
178
|
+
).and_return(lock_applier)
|
178
179
|
expect(lock_applier).not_to receive(:with_unlocked_policies)
|
179
180
|
expect(lock_applier).to receive(:apply!)
|
180
181
|
|
@@ -37,10 +37,10 @@ describe ChefDK::ServiceExceptionInspectors::HTTP do
|
|
37
37
|
|
38
38
|
let(:request) do
|
39
39
|
r = instance_double(Net::HTTP::Post,
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
40
|
+
method: "POST",
|
41
|
+
uri: nil,
|
42
|
+
path: "/organizations/chef-oss-dev/cookbooks",
|
43
|
+
body: request_body)
|
44
44
|
stub = allow(r).to(receive(:each_header))
|
45
45
|
request_headers.each { |k, v| stub.and_yield(k, v) }
|
46
46
|
r
|
@@ -55,9 +55,9 @@ describe ChefDK::ServiceExceptionInspectors::HTTP do
|
|
55
55
|
|
56
56
|
let(:response) do
|
57
57
|
r = instance_double(Net::HTTPClientError,
|
58
|
-
|
59
|
-
|
60
|
-
|
58
|
+
code: "400",
|
59
|
+
message: "Bad Request",
|
60
|
+
body: response_body)
|
61
61
|
stub = allow(r).to(receive(:each_header))
|
62
62
|
response_headers.each { |k, v| stub.and_yield(k, v) }
|
63
63
|
r
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chef-dk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel DeLeo
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2019-07-
|
13
|
+
date: 2019-07-12 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: mixlib-cli
|