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.
Files changed (98) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +4 -2
  3. data/Gemfile.lock +113 -17
  4. data/lib/chef-dk/builtin_commands.rb +3 -0
  5. data/lib/chef-dk/cli.rb +3 -1
  6. data/lib/chef-dk/command/clean_policy_cookbooks.rb +1 -0
  7. data/lib/chef-dk/command/clean_policy_revisions.rb +1 -0
  8. data/lib/chef-dk/command/delete_policy.rb +1 -0
  9. data/lib/chef-dk/command/delete_policy_group.rb +1 -0
  10. data/lib/chef-dk/command/describe_cookbook.rb +1 -0
  11. data/lib/chef-dk/command/diff.rb +5 -3
  12. data/lib/chef-dk/command/env.rb +6 -6
  13. data/lib/chef-dk/command/export.rb +1 -0
  14. data/lib/chef-dk/command/generate.rb +1 -0
  15. data/lib/chef-dk/command/generator_commands/chef_exts/quieter_doc_formatter.rb +2 -4
  16. data/lib/chef-dk/command/generator_commands/generator_generator.rb +1 -0
  17. data/lib/chef-dk/command/install.rb +1 -0
  18. data/lib/chef-dk/command/push.rb +1 -0
  19. data/lib/chef-dk/command/push_archive.rb +1 -1
  20. data/lib/chef-dk/command/shell_init.rb +3 -2
  21. data/lib/chef-dk/command/show_policy.rb +1 -0
  22. data/lib/chef-dk/command/undelete.rb +1 -0
  23. data/lib/chef-dk/command/update.rb +1 -0
  24. data/lib/chef-dk/command/verify.rb +1 -1
  25. data/lib/chef-dk/component_test.rb +2 -1
  26. data/lib/chef-dk/configurable.rb +3 -2
  27. data/lib/chef-dk/cookbook_profiler/null_scm.rb +1 -2
  28. data/lib/chef-dk/generator.rb +1 -1
  29. data/lib/chef-dk/helpers.rb +2 -1
  30. data/lib/chef-dk/policyfile/artifactory_cookbook_source.rb +1 -1
  31. data/lib/chef-dk/policyfile/attribute_merge_checker.rb +1 -1
  32. data/lib/chef-dk/policyfile/chef_repo_cookbook_source.rb +1 -1
  33. data/lib/chef-dk/policyfile/chef_server_cookbook_source.rb +3 -3
  34. data/lib/chef-dk/policyfile/chef_server_lock_fetcher.rb +5 -5
  35. data/lib/chef-dk/policyfile/community_cookbook_source.rb +1 -1
  36. data/lib/chef-dk/policyfile/comparison_base.rb +1 -0
  37. data/lib/chef-dk/policyfile/cookbook_location_specification.rb +4 -4
  38. data/lib/chef-dk/policyfile/cookbook_locks.rb +8 -5
  39. data/lib/chef-dk/policyfile/delivery_supermarket_source.rb +1 -1
  40. data/lib/chef-dk/policyfile/differ.rb +6 -2
  41. data/lib/chef-dk/policyfile/dsl.rb +4 -2
  42. data/lib/chef-dk/policyfile/git_lock_fetcher.rb +2 -2
  43. data/lib/chef-dk/policyfile/included_policies_cookbook_source.rb +1 -1
  44. data/lib/chef-dk/policyfile/lister.rb +2 -2
  45. data/lib/chef-dk/policyfile/local_lock_fetcher.rb +7 -5
  46. data/lib/chef-dk/policyfile/lock_applier.rb +1 -1
  47. data/lib/chef-dk/policyfile/null_cookbook_source.rb +1 -2
  48. data/lib/chef-dk/policyfile/policyfile_location_specification.rb +3 -3
  49. data/lib/chef-dk/policyfile/remote_lock_fetcher.rb +1 -1
  50. data/lib/chef-dk/policyfile/solution_dependencies.rb +13 -11
  51. data/lib/chef-dk/policyfile/storage_config.rb +1 -0
  52. data/lib/chef-dk/policyfile/undo_record.rb +10 -8
  53. data/lib/chef-dk/policyfile/uploader.rb +3 -1
  54. data/lib/chef-dk/policyfile_compiler.rb +17 -13
  55. data/lib/chef-dk/policyfile_lock.rb +17 -15
  56. data/lib/chef-dk/policyfile_services/clean_policies.rb +3 -3
  57. data/lib/chef-dk/policyfile_services/clean_policy_cookbooks.rb +2 -2
  58. data/lib/chef-dk/policyfile_services/export_repo.rb +4 -2
  59. data/lib/chef-dk/policyfile_services/install.rb +3 -1
  60. data/lib/chef-dk/policyfile_services/push.rb +6 -5
  61. data/lib/chef-dk/policyfile_services/push_archive.rb +6 -5
  62. data/lib/chef-dk/policyfile_services/rm_policy.rb +6 -2
  63. data/lib/chef-dk/policyfile_services/rm_policy_group.rb +2 -2
  64. data/lib/chef-dk/policyfile_services/show_policy.rb +2 -2
  65. data/lib/chef-dk/policyfile_services/undelete.rb +2 -2
  66. data/lib/chef-dk/version.rb +1 -1
  67. data/lib/kitchen/provisioner/policyfile_zero.rb +3 -6
  68. data/spec/unit/cli_spec.rb +6 -6
  69. data/spec/unit/command/base_spec.rb +1 -1
  70. data/spec/unit/command/env_spec.rb +1 -1
  71. data/spec/unit/command/exec_spec.rb +1 -1
  72. data/spec/unit/command/export_spec.rb +1 -1
  73. data/spec/unit/command/generator_commands/recipe_spec.rb +2 -1
  74. data/spec/unit/command/generator_commands/repo_spec.rb +6 -6
  75. data/spec/unit/command/verify_spec.rb +1 -1
  76. data/spec/unit/policyfile/attribute_merge_checker_spec.rb +10 -8
  77. data/spec/unit/policyfile/chef_server_lock_fetcher_spec.rb +4 -2
  78. data/spec/unit/policyfile/cookbook_locks_spec.rb +9 -9
  79. data/spec/unit/policyfile/git_lock_fetcher_spec.rb +5 -5
  80. data/spec/unit/policyfile/included_policies_cookbook_source_spec.rb +5 -3
  81. data/spec/unit/policyfile/lister_spec.rb +5 -5
  82. data/spec/unit/policyfile/local_lock_fetcher_spec.rb +1 -1
  83. data/spec/unit/policyfile/lock_applier_spec.rb +2 -2
  84. data/spec/unit/policyfile/reports/install_spec.rb +14 -14
  85. data/spec/unit/policyfile/reports/upload_spec.rb +3 -3
  86. data/spec/unit/policyfile/uploader_spec.rb +13 -12
  87. data/spec/unit/policyfile_demands_spec.rb +4 -4
  88. data/spec/unit/policyfile_includes_spec.rb +14 -7
  89. data/spec/unit/policyfile_install_with_includes_spec.rb +8 -7
  90. data/spec/unit/policyfile_lock_build_spec.rb +17 -18
  91. data/spec/unit/policyfile_services/clean_policy_cookbooks_spec.rb +5 -5
  92. data/spec/unit/policyfile_services/push_archive_spec.rb +6 -6
  93. data/spec/unit/policyfile_services/push_spec.rb +8 -8
  94. data/spec/unit/policyfile_services/rm_policy_group_spec.rb +5 -5
  95. data/spec/unit/policyfile_services/rm_policy_spec.rb +5 -5
  96. data/spec/unit/policyfile_services/update_attributes_spec.rb +2 -1
  97. data/spec/unit/service_exception_inspectors/http_spec.rb +7 -7
  98. 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
- chef_server_url: "https://localhost:10443",
64
- client_key: "/path/to/client/key.pem",
65
- node_name: "deuce")
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
- signing_key_filename: "/path/to/client/key.pem",
83
- client_name: "deuce")
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
- chef_server_url: "https://localhost:10443",
40
- client_key: "/path/to/client/key.pem",
41
- node_name: "deuce")
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
- signing_key_filename: "/path/to/client/key.pem",
59
- client_name: "deuce")
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).and_return(lock_applier)
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
- method: "POST",
41
- uri: nil,
42
- path: "/organizations/chef-oss-dev/cookbooks",
43
- body: request_body)
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
- code: "400",
59
- message: "Bad Request",
60
- body: response_body)
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.1.7
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-08 00:00:00.000000000 Z
13
+ date: 2019-07-12 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: mixlib-cli