chef-dk 0.10.0 → 0.11.0
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 +5 -0
- data/README.md +19 -4
- data/Rakefile +9 -0
- data/chef-dk.gemspec +3 -1
- data/lib/chef-dk/chef_runner.rb +9 -0
- data/lib/chef-dk/command/export.rb +6 -0
- data/lib/chef-dk/command/generator_commands.rb +3 -3
- data/lib/chef-dk/command/generator_commands/base.rb +27 -0
- data/lib/chef-dk/command/update.rb +19 -0
- data/lib/chef-dk/configurable.rb +13 -1
- data/lib/chef-dk/exceptions.rb +3 -0
- data/lib/chef-dk/policyfile/cookbook_location_specification.rb +13 -0
- data/lib/chef-dk/policyfile/cookbook_locks.rb +1 -1
- data/lib/chef-dk/policyfile/dsl.rb +40 -2
- data/lib/chef-dk/policyfile_compiler.rb +43 -4
- data/lib/chef-dk/policyfile_services/export_repo.rb +156 -51
- data/lib/chef-dk/policyfile_services/install.rb +1 -0
- data/lib/chef-dk/policyfile_services/push_archive.rb +33 -2
- data/lib/chef-dk/skeletons/code_generator/files/default/chefignore +7 -5
- data/lib/chef-dk/skeletons/code_generator/files/default/repo/policies/README.md +1 -1
- data/lib/chef-dk/version.rb +1 -1
- data/lib/kitchen/provisioner/policyfile_zero.rb +8 -3
- data/spec/shared/custom_generator_cookbook.rb +15 -2
- data/spec/unit/chef_runner_spec.rb +28 -0
- data/spec/unit/command/export_spec.rb +11 -0
- data/spec/unit/command/generator_commands/base_spec.rb +136 -0
- data/spec/unit/command/update_spec.rb +24 -0
- data/spec/unit/configurable_spec.rb +41 -0
- data/spec/unit/fixtures/configurable/test_config_loader.rb +5 -0
- data/spec/unit/fixtures/configurable/test_configurable.rb +10 -0
- data/spec/unit/policyfile/cookbook_location_specification_spec.rb +21 -1
- data/spec/unit/policyfile/cookbook_locks_spec.rb +1 -1
- data/spec/unit/policyfile_demands_spec.rb +206 -0
- data/spec/unit/policyfile_evaluation_spec.rb +85 -0
- data/spec/unit/policyfile_lock_serialization_spec.rb +1 -1
- data/spec/unit/policyfile_services/export_repo_spec.rb +78 -36
- data/spec/unit/policyfile_services/install_spec.rb +20 -0
- data/spec/unit/policyfile_services/push_archive_spec.rb +41 -8
- metadata +27 -11
@@ -88,6 +88,91 @@ E
|
|
88
88
|
end
|
89
89
|
end
|
90
90
|
|
91
|
+
context "when given an invalid run list item" do
|
92
|
+
|
93
|
+
context "when there is only one colon between cookbook and recipe name" do
|
94
|
+
|
95
|
+
let(:policyfile_rb) do
|
96
|
+
<<-EOH
|
97
|
+
name "hello"
|
98
|
+
|
99
|
+
# Should be "foo::bar" (missing a colon)
|
100
|
+
run_list "foo:bar"
|
101
|
+
EOH
|
102
|
+
end
|
103
|
+
|
104
|
+
it "has an error message with the offending run list item" do
|
105
|
+
expect(policyfile.errors).to_not be_empty
|
106
|
+
expected_message = "Run List Item 'foo:bar' has invalid cookbook name 'foo:bar'.\n" +
|
107
|
+
"Cookbook names can only contain alphanumerics, hyphens, and underscores.\n" +
|
108
|
+
"Did you mean 'foo::bar'?"
|
109
|
+
expect(policyfile.errors.first).to eq(expected_message)
|
110
|
+
end
|
111
|
+
end
|
112
|
+
|
113
|
+
context "when there is only one colon between cookbook and recipe name in fully qualified form" do
|
114
|
+
|
115
|
+
let(:policyfile_rb) do
|
116
|
+
<<-EOH
|
117
|
+
name "hello"
|
118
|
+
|
119
|
+
# Should be "foo::bar" (missing a colon)
|
120
|
+
run_list "recipe[foo:bar]"
|
121
|
+
EOH
|
122
|
+
end
|
123
|
+
|
124
|
+
it "has an error message with the offending run list item" do
|
125
|
+
expect(policyfile.errors).to_not be_empty
|
126
|
+
expected_message = "Run List Item 'recipe[foo:bar]' has invalid cookbook name 'foo:bar'.\n" +
|
127
|
+
"Cookbook names can only contain alphanumerics, hyphens, and underscores.\n" +
|
128
|
+
"Did you mean 'recipe[foo::bar]'?"
|
129
|
+
expect(policyfile.errors.first).to eq(expected_message)
|
130
|
+
end
|
131
|
+
end
|
132
|
+
|
133
|
+
context "when the recipe name is empty" do
|
134
|
+
|
135
|
+
let(:policyfile_rb) do
|
136
|
+
<<-EOH
|
137
|
+
name "hello"
|
138
|
+
|
139
|
+
# Should be "foo::default" or just "foo"
|
140
|
+
run_list "foo::"
|
141
|
+
EOH
|
142
|
+
end
|
143
|
+
|
144
|
+
it "has an error message with the offending run list item" do
|
145
|
+
expect(policyfile.errors).to_not be_empty
|
146
|
+
expected_message = "Run List Item 'foo::' has invalid recipe name ''.\nRecipe names can only contain alphanumerics, hyphens, and underscores."
|
147
|
+
expect(policyfile.errors.first).to eq(expected_message)
|
148
|
+
end
|
149
|
+
|
150
|
+
end
|
151
|
+
|
152
|
+
context "with an invalid run list item in a named run list" do
|
153
|
+
|
154
|
+
let(:policyfile_rb) do
|
155
|
+
<<-EOH
|
156
|
+
name "hello"
|
157
|
+
|
158
|
+
# this one is valid:
|
159
|
+
run_list "foo"
|
160
|
+
|
161
|
+
named_run_list :oops, "foo:bar"
|
162
|
+
EOH
|
163
|
+
end
|
164
|
+
|
165
|
+
it "has an error message with the offending run list item" do
|
166
|
+
expect(policyfile.errors).to_not be_empty
|
167
|
+
expected_message = "Named Run List 'oops' Item 'foo:bar' has invalid cookbook name 'foo:bar'.\n" +
|
168
|
+
"Cookbook names can only contain alphanumerics, hyphens, and underscores.\n" +
|
169
|
+
"Did you mean 'foo::bar'?"
|
170
|
+
expect(policyfile.errors.first).to eq(expected_message)
|
171
|
+
end
|
172
|
+
|
173
|
+
end
|
174
|
+
end
|
175
|
+
|
91
176
|
context "when policyfile evaluation is aborted by user signal" do
|
92
177
|
|
93
178
|
let(:policyfile_rb) { "raise Interrupt" }
|
@@ -412,7 +412,7 @@ describe ChefDK::PolicyfileLock, "when reading a Policyfile.lock" do
|
|
412
412
|
cb_foo = locks["foo"]
|
413
413
|
expect(cb_foo).to be_a(ChefDK::Policyfile::ArchivedCookbook)
|
414
414
|
|
415
|
-
expected_path = File.join(storage_config.relative_paths_root, "
|
415
|
+
expected_path = File.join(storage_config.relative_paths_root, "cookbook_artifacts", "foo-68c13b136a49b4e66cfe9d8aa2b5a85167b5bf9b")
|
416
416
|
|
417
417
|
expect(cb_foo.cookbook_path).to eq(expected_path)
|
418
418
|
expect(cb_foo.dotted_decimal_identifier).to eq("111.222.333")
|
@@ -106,9 +106,12 @@ describe ChefDK::PolicyfileServices::ExportRepo do
|
|
106
106
|
|
107
107
|
let(:local_cookbook_path) { File.join(fixtures_path, "local_path_cookbooks/local-cookbook") }
|
108
108
|
|
109
|
+
let(:revision_id) { "60e5ad638dce219d8f87d589463ec4a9884007ba5e2adbb4c0a7021d67204f1a" }
|
110
|
+
|
109
111
|
let(:lockfile_content) do
|
110
112
|
<<-E
|
111
113
|
{
|
114
|
+
"revision_id": "#{revision_id}",
|
112
115
|
"name": "install-example",
|
113
116
|
"run_list": [
|
114
117
|
"recipe[local-cookbook::default]"
|
@@ -204,12 +207,17 @@ E
|
|
204
207
|
let(:expected_files_relative) do
|
205
208
|
metadata_rb = Pathname.new("metadata.rb")
|
206
209
|
expected = cookbook_files.delete_if { |p| p == metadata_rb }
|
210
|
+
|
211
|
+
# Berksfile is chefignored
|
212
|
+
berksfile = Pathname.new("Berksfile")
|
213
|
+
expected = expected.delete_if { |p| p == berksfile }
|
214
|
+
|
207
215
|
expected << Pathname.new("metadata.json")
|
208
216
|
end
|
209
217
|
|
210
|
-
let(:cookbook_with_version) { "local-cookbook-
|
218
|
+
let(:cookbook_with_version) { "local-cookbook-fab501cfaf747901bd82c1bc706beae7dc3a350c" }
|
211
219
|
|
212
|
-
let(:exported_cookbook_root) { Pathname.new(File.join(export_dir, "
|
220
|
+
let(:exported_cookbook_root) { Pathname.new(File.join(export_dir, "cookbook_artifacts", cookbook_with_version)) }
|
213
221
|
|
214
222
|
let(:expected_files) do
|
215
223
|
expected_files_relative.map do |file_rel_path|
|
@@ -223,20 +231,28 @@ E
|
|
223
231
|
end
|
224
232
|
end
|
225
233
|
|
226
|
-
#
|
227
|
-
#
|
228
|
-
#
|
229
|
-
# in metadata.rb issue
|
234
|
+
# Using JSON form of metadata ensures that we don't rely on anything
|
235
|
+
# in the ruby code in metadata.rb; commonly folks will do things like
|
236
|
+
# shell out to git for the version number, etc.
|
230
237
|
it "writes metadata.json in the exported cookbook, removing metadata.rb" do
|
231
238
|
metadata_json_path = File.join(exported_cookbook_root, "metadata.json")
|
232
239
|
metadata_json = FFI_Yajl::Parser.parse(IO.read(metadata_json_path))
|
233
|
-
expect(metadata_json["version"]).to eq("
|
240
|
+
expect(metadata_json["version"]).to eq("2.3.4")
|
234
241
|
end
|
235
242
|
|
236
|
-
it "copies the policyfile lock
|
237
|
-
|
238
|
-
|
239
|
-
expect(
|
243
|
+
it "copies the policyfile lock to policies/POLICY_NAME.json" do
|
244
|
+
exported_policy_path = File.join(export_dir, "policies", "install-example-#{revision_id}.json")
|
245
|
+
exported_policy_json = IO.read(exported_policy_path)
|
246
|
+
expect(exported_policy_json).to eq(FFI_Yajl::Encoder.encode(export_service.policyfile_lock.to_lock, pretty: true))
|
247
|
+
end
|
248
|
+
|
249
|
+
it "creates a policy_group file for the local policy group with the revision id of the exported policy" do
|
250
|
+
exported_policy_group_path = File.join(export_dir, "policy_groups", "local.json")
|
251
|
+
exported_policy_group_data = FFI_Yajl::Parser.parse(IO.read(exported_policy_group_path))
|
252
|
+
|
253
|
+
expected_data = { "policies" => { "install-example" => { "revision_id" => revision_id } } }
|
254
|
+
|
255
|
+
expect(exported_policy_group_data).to eq(expected_data)
|
240
256
|
end
|
241
257
|
|
242
258
|
it "copies the policyfile lock in standard format to Policyfile.lock.json" do
|
@@ -257,23 +273,39 @@ E
|
|
257
273
|
# The settings in this file will configure chef to apply the exported policy in
|
258
274
|
# this directory. To use it, run:
|
259
275
|
#
|
260
|
-
# chef-client -
|
276
|
+
# chef-client -z
|
261
277
|
#
|
262
278
|
|
263
|
-
|
279
|
+
policy_name 'install-example'
|
280
|
+
policy_group 'local'
|
264
281
|
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
282
|
+
use_policyfile true
|
283
|
+
policy_document_native_api true
|
284
|
+
|
285
|
+
# In order to use this repo, you need a version of Chef Client and Chef Zero
|
286
|
+
# that supports policyfile "native mode" APIs:
|
287
|
+
current_version = Gem::Version.new(Chef::VERSION)
|
288
|
+
unless Gem::Requirement.new(">= 12.7").satisfied_by?(current_version)
|
289
|
+
puts("!" * 80)
|
290
|
+
puts(<<-MESSAGE)
|
291
|
+
This Chef Repo requires features introduced in Chef 12.7, but you are using
|
292
|
+
Chef \#{Chef::VERSION}. Please upgrade to Chef 12.7 or later.
|
293
|
+
MESSAGE
|
294
|
+
puts("!" * 80)
|
295
|
+
exit!(1)
|
296
|
+
end
|
270
297
|
|
271
298
|
CONFIG
|
272
|
-
config_path = File.join(export_dir, "
|
299
|
+
config_path = File.join(export_dir, ".chef", "config.rb")
|
273
300
|
expect(File).to exist(config_path)
|
274
301
|
expect(IO.read(config_path)).to eq(expected_config_text)
|
275
302
|
end
|
276
303
|
|
304
|
+
it "generates a README.md in the exported repo" do
|
305
|
+
readme_path = File.join(export_dir, "README.md")
|
306
|
+
expect(File).to exist(readme_path)
|
307
|
+
end
|
308
|
+
|
277
309
|
end
|
278
310
|
|
279
311
|
context "when the export dir is empty" do
|
@@ -315,8 +347,9 @@ CONFIG
|
|
315
347
|
expect(File).to exist(file_in_export_dir)
|
316
348
|
expect(File).to exist(extra_data_bag_item)
|
317
349
|
|
318
|
-
expect(File).to be_directory(File.join(export_dir, "
|
319
|
-
expect(File).to be_directory(File.join(export_dir, "
|
350
|
+
expect(File).to be_directory(File.join(export_dir, "cookbook_artifacts"))
|
351
|
+
expect(File).to be_directory(File.join(export_dir, "policies"))
|
352
|
+
expect(File).to be_directory(File.join(export_dir, "policy_groups"))
|
320
353
|
end
|
321
354
|
|
322
355
|
include_examples "successful_export"
|
@@ -327,32 +360,39 @@ CONFIG
|
|
327
360
|
|
328
361
|
let(:non_conflicting_file_in_export_dir) { File.join(export_dir, "some_random_cruft") }
|
329
362
|
|
330
|
-
let(:
|
363
|
+
let(:cookbook_artifacts_dir) { File.join(export_dir, "cookbook_artifacts") }
|
364
|
+
|
365
|
+
let(:file_in_cookbook_artifacts_dir) { File.join(cookbook_artifacts_dir, "some_random_cruft") }
|
366
|
+
|
367
|
+
let(:policies_dir) { File.join(export_dir, "policies") }
|
331
368
|
|
332
|
-
let(:
|
369
|
+
let(:policy_groups_dir) { File.join(export_dir, "policy_groups") }
|
333
370
|
|
334
|
-
let(:
|
371
|
+
let(:extra_policy_item) { File.join(policies_dir, "leftover-policy.json") }
|
335
372
|
|
336
|
-
let(:
|
373
|
+
let(:extra_policy_group_item) { File.join(policy_groups_dir, "leftover-policy-group.json") }
|
337
374
|
|
338
375
|
let(:conflicting_policyfile_lock) { File.join(export_dir, "Policyfile.lock.json") }
|
339
376
|
|
340
377
|
before do
|
341
378
|
FileUtils.mkdir_p(export_dir)
|
342
|
-
FileUtils.mkdir_p(
|
343
|
-
FileUtils.mkdir_p(
|
379
|
+
FileUtils.mkdir_p(cookbook_artifacts_dir)
|
380
|
+
FileUtils.mkdir_p(policies_dir)
|
381
|
+
FileUtils.mkdir_p(policy_groups_dir)
|
344
382
|
File.open(non_conflicting_file_in_export_dir, "wb+") { |f| f.print "some random cruft" }
|
345
|
-
File.open(
|
346
|
-
File.open(
|
383
|
+
File.open(file_in_cookbook_artifacts_dir, "wb+") { |f| f.print "some random cruft" }
|
384
|
+
File.open(extra_policy_item, "wb+") { |f| f.print "some random cruft" }
|
385
|
+
File.open(extra_policy_group_item, "wb+") { |f| f.print "some random cruft" }
|
347
386
|
File.open(conflicting_policyfile_lock, "wb+") { |f| f.print "some random cruft" }
|
348
387
|
end
|
349
388
|
|
350
389
|
it "raises a PolicyfileExportRepoError" do
|
351
|
-
message = "Export dir (#{export_dir}) not clean. Refusing to export. (Conflicting files: #{
|
390
|
+
message = "Export dir (#{export_dir}) not clean. Refusing to export. (Conflicting files: #{file_in_cookbook_artifacts_dir}, #{extra_policy_item}, #{extra_policy_group_item}, #{conflicting_policyfile_lock})"
|
352
391
|
expect { export_service.run }.to raise_error(ChefDK::ExportDirNotEmpty, message)
|
353
392
|
expect(File).to exist(non_conflicting_file_in_export_dir)
|
354
|
-
expect(File).to exist(
|
355
|
-
expect(File).to exist(
|
393
|
+
expect(File).to exist(file_in_cookbook_artifacts_dir)
|
394
|
+
expect(File).to exist(extra_policy_item)
|
395
|
+
expect(File).to exist(extra_policy_group_item)
|
356
396
|
end
|
357
397
|
|
358
398
|
context "and the force option is set" do
|
@@ -362,13 +402,15 @@ CONFIG
|
|
362
402
|
it "clears the export dir and exports" do
|
363
403
|
export_service.run
|
364
404
|
|
365
|
-
expect(File).to_not exist(
|
366
|
-
expect(File).to_not exist(
|
405
|
+
expect(File).to_not exist(file_in_cookbook_artifacts_dir)
|
406
|
+
expect(File).to_not exist(extra_policy_item)
|
407
|
+
expect(File).to_not exist(extra_policy_group_item)
|
367
408
|
|
368
409
|
expect(File).to exist(non_conflicting_file_in_export_dir)
|
369
410
|
|
370
|
-
expect(File).to be_directory(File.join(export_dir, "
|
371
|
-
expect(File).to be_directory(File.join(export_dir, "
|
411
|
+
expect(File).to be_directory(File.join(export_dir, "cookbook_artifacts"))
|
412
|
+
expect(File).to be_directory(File.join(export_dir, "policies"))
|
413
|
+
expect(File).to be_directory(File.join(export_dir, "policy_groups"))
|
372
414
|
end
|
373
415
|
|
374
416
|
end
|
@@ -111,6 +111,26 @@ E
|
|
111
111
|
expect(generated_lock.cookbook_locks).to have_key("local-cookbook")
|
112
112
|
end
|
113
113
|
|
114
|
+
it "prints the policy name" do
|
115
|
+
install_service.run
|
116
|
+
expect(ui.output).to include("Building policy install-example")
|
117
|
+
end
|
118
|
+
|
119
|
+
it "prints the expanded run list" do
|
120
|
+
install_service.run
|
121
|
+
expect(ui.output).to include("Expanded run list: recipe[local-cookbook]")
|
122
|
+
end
|
123
|
+
|
124
|
+
it "prints the lockfile path" do
|
125
|
+
install_service.run
|
126
|
+
expect(ui.output).to include("Lockfile written to #{working_dir}/Policyfile.lock.json")
|
127
|
+
end
|
128
|
+
|
129
|
+
it "prints the lockfile's revision id" do
|
130
|
+
install_service.run
|
131
|
+
expect(ui.output).to include("Policy revision id: 60e5ad638dce219d8f87d589463ec4a9884007ba5e2adbb4c0a7021d67204f1a")
|
132
|
+
end
|
133
|
+
|
114
134
|
end
|
115
135
|
|
116
136
|
context "and a lockfile exists and `overwrite` is specified" do
|
@@ -221,7 +221,7 @@ E
|
|
221
221
|
|
222
222
|
end
|
223
223
|
|
224
|
-
context "when the archive has no
|
224
|
+
context "when the archive has no cookbook_artifacts/ directory" do
|
225
225
|
|
226
226
|
let(:archive_files) { [ FileToTar.new("Policyfile.lock.json", "") ] }
|
227
227
|
|
@@ -229,14 +229,14 @@ E
|
|
229
229
|
expect(exception).to_not be_nil
|
230
230
|
expect(exception.message).to eq("Failed to publish archived policy")
|
231
231
|
expect(exception_cause).to be_a(ChefDK::InvalidPolicyArchive)
|
232
|
-
expect(exception_cause.message).to eq("Archive does not contain a
|
232
|
+
expect(exception_cause.message).to eq("Archive does not contain a cookbook_artifacts directory")
|
233
233
|
end
|
234
234
|
|
235
235
|
end
|
236
236
|
|
237
237
|
context "when the archive has the correct files but the lockfile is invalid" do
|
238
238
|
|
239
|
-
let(:archive_dirs) { ["
|
239
|
+
let(:archive_dirs) { ["cookbook_artifacts"] }
|
240
240
|
|
241
241
|
let(:archive_files) { [ FileToTar.new("Policyfile.lock.json", lockfile_content) ] }
|
242
242
|
|
@@ -279,6 +279,39 @@ E
|
|
279
279
|
end
|
280
280
|
|
281
281
|
end
|
282
|
+
|
283
|
+
# `chef export` previously generated Chef repos designed for
|
284
|
+
# compatibility mode Policyfile usage. We don't intend to be backwards
|
285
|
+
# compatible, but we want to kindly explain what's going on.
|
286
|
+
context "when the archive is in the old format" do
|
287
|
+
|
288
|
+
let(:lockfile_content) { valid_lockfile }
|
289
|
+
|
290
|
+
let(:archive_dirs) { %w{ cookbooks data_bags } }
|
291
|
+
|
292
|
+
let(:archive_files) do
|
293
|
+
[
|
294
|
+
FileToTar.new("Policyfile.lock.json", lockfile_content),
|
295
|
+
FileToTar.new("client.rb", "#content"),
|
296
|
+
]
|
297
|
+
end
|
298
|
+
|
299
|
+
it "errors out, explaining the compatibility issue" do
|
300
|
+
expect(exception).to_not be_nil
|
301
|
+
expect(exception.message).to eq("Failed to publish archived policy")
|
302
|
+
expect(exception_cause).to be_a(ChefDK::InvalidPolicyArchive)
|
303
|
+
|
304
|
+
msg = <<-MESSAGE
|
305
|
+
This archive is in an unsupported format.
|
306
|
+
|
307
|
+
This archive was created with an older version of ChefDK. This version of
|
308
|
+
ChefDK does not support archives in the older format. Re-create the archive
|
309
|
+
with a newer version of ChefDK or downgrade ChefDK.
|
310
|
+
MESSAGE
|
311
|
+
expect(exception_cause.message).to eq(msg)
|
312
|
+
end
|
313
|
+
|
314
|
+
end
|
282
315
|
end
|
283
316
|
end
|
284
317
|
|
@@ -290,18 +323,18 @@ E
|
|
290
323
|
|
291
324
|
let(:cookbook_name) { "local-cookbook" }
|
292
325
|
|
293
|
-
let(:
|
326
|
+
let(:identifier) { "fab501cfaf747901bd82c1bc706beae7dc3a350c" }
|
294
327
|
|
295
|
-
let(:
|
328
|
+
let(:cookbook_artifact_dir) { File.join("cookbook_artifacts", "#{cookbook_name}-#{identifier}") }
|
296
329
|
|
297
|
-
let(:recipes_dir) { File.join(
|
330
|
+
let(:recipes_dir) { File.join(cookbook_artifact_dir, "recipes") }
|
298
331
|
|
299
|
-
let(:archive_dirs) { ["
|
332
|
+
let(:archive_dirs) { ["cookbook_artifacts", cookbook_artifact_dir, recipes_dir] }
|
300
333
|
|
301
334
|
let(:archive_files) do
|
302
335
|
[
|
303
336
|
FileToTar.new("Policyfile.lock.json", lockfile_content),
|
304
|
-
FileToTar.new(File.join(
|
337
|
+
FileToTar.new(File.join(cookbook_artifact_dir, "metadata.rb"), "name 'local-cookbook'"),
|
305
338
|
FileToTar.new(File.join(recipes_dir, "default.rb"), "puts 'hello'")
|
306
339
|
]
|
307
340
|
end
|
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: 0.
|
4
|
+
version: 0.11.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:
|
13
|
+
date: 2016-02-19 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: mixlib-cli
|
@@ -80,20 +80,14 @@ dependencies:
|
|
80
80
|
requirements:
|
81
81
|
- - "~>"
|
82
82
|
- !ruby/object:Gem::Version
|
83
|
-
version: '12.
|
84
|
-
- - ">="
|
85
|
-
- !ruby/object:Gem::Version
|
86
|
-
version: 12.2.1
|
83
|
+
version: '12.5'
|
87
84
|
type: :runtime
|
88
85
|
prerelease: false
|
89
86
|
version_requirements: !ruby/object:Gem::Requirement
|
90
87
|
requirements:
|
91
88
|
- - "~>"
|
92
89
|
- !ruby/object:Gem::Version
|
93
|
-
version: '12.
|
94
|
-
- - ">="
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: 12.2.1
|
90
|
+
version: '12.5'
|
97
91
|
- !ruby/object:Gem::Dependency
|
98
92
|
name: solve
|
99
93
|
requirement: !ruby/object:Gem::Requirement
|
@@ -176,6 +170,20 @@ dependencies:
|
|
176
170
|
- - "~>"
|
177
171
|
- !ruby/object:Gem::Version
|
178
172
|
version: '1.2'
|
173
|
+
- !ruby/object:Gem::Dependency
|
174
|
+
name: github_changelog_generator
|
175
|
+
requirement: !ruby/object:Gem::Requirement
|
176
|
+
requirements:
|
177
|
+
- - ">="
|
178
|
+
- !ruby/object:Gem::Version
|
179
|
+
version: '0'
|
180
|
+
type: :development
|
181
|
+
prerelease: false
|
182
|
+
version_requirements: !ruby/object:Gem::Requirement
|
183
|
+
requirements:
|
184
|
+
- - ">="
|
185
|
+
- !ruby/object:Gem::Version
|
186
|
+
version: '0'
|
179
187
|
- !ruby/object:Gem::Dependency
|
180
188
|
name: rspec-core
|
181
189
|
requirement: !ruby/object:Gem::Requirement
|
@@ -402,6 +410,7 @@ files:
|
|
402
410
|
- spec/unit/command/generate_spec.rb
|
403
411
|
- spec/unit/command/generator_commands/app_spec.rb
|
404
412
|
- spec/unit/command/generator_commands/attribute_spec.rb
|
413
|
+
- spec/unit/command/generator_commands/base_spec.rb
|
405
414
|
- spec/unit/command/generator_commands/cookbook_file_spec.rb
|
406
415
|
- spec/unit/command/generator_commands/cookbook_spec.rb
|
407
416
|
- spec/unit/command/generator_commands/generator_generator_spec.rb
|
@@ -421,6 +430,7 @@ files:
|
|
421
430
|
- spec/unit/command/verify_spec.rb
|
422
431
|
- spec/unit/commands_map_spec.rb
|
423
432
|
- spec/unit/component_test_spec.rb
|
433
|
+
- spec/unit/configurable_spec.rb
|
424
434
|
- spec/unit/cookbook_metadata_spec.rb
|
425
435
|
- spec/unit/cookbook_profiler/git_spec.rb
|
426
436
|
- spec/unit/cookbook_profiler/identifiers_spec.rb
|
@@ -428,6 +438,8 @@ files:
|
|
428
438
|
- spec/unit/fixtures/chef-runner-cookbooks/test_cookbook/recipes/recipe_two.rb
|
429
439
|
- spec/unit/fixtures/command/cli_test_command.rb
|
430
440
|
- spec/unit/fixtures/command/explicit_path_example.rb
|
441
|
+
- spec/unit/fixtures/configurable/test_config_loader.rb
|
442
|
+
- spec/unit/fixtures/configurable/test_configurable.rb
|
431
443
|
- spec/unit/fixtures/cookbook_cache/baz-f59ee7a5bca6a4e606b67f7f856b768d847c39bb/.kitchen.yml
|
432
444
|
- spec/unit/fixtures/cookbook_cache/baz-f59ee7a5bca6a4e606b67f7f856b768d847c39bb/Berksfile
|
433
445
|
- spec/unit/fixtures/cookbook_cache/baz-f59ee7a5bca6a4e606b67f7f856b768d847c39bb/README.md
|
@@ -577,7 +589,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
577
589
|
version: '0'
|
578
590
|
requirements: []
|
579
591
|
rubyforge_project:
|
580
|
-
rubygems_version: 2.4.
|
592
|
+
rubygems_version: 2.4.5
|
581
593
|
signing_key:
|
582
594
|
specification_version: 4
|
583
595
|
summary: A streamlined development and deployment workflow for Chef platform.
|
@@ -604,6 +616,7 @@ test_files:
|
|
604
616
|
- spec/unit/command/generate_spec.rb
|
605
617
|
- spec/unit/command/generator_commands/app_spec.rb
|
606
618
|
- spec/unit/command/generator_commands/attribute_spec.rb
|
619
|
+
- spec/unit/command/generator_commands/base_spec.rb
|
607
620
|
- spec/unit/command/generator_commands/cookbook_file_spec.rb
|
608
621
|
- spec/unit/command/generator_commands/cookbook_spec.rb
|
609
622
|
- spec/unit/command/generator_commands/generator_generator_spec.rb
|
@@ -623,6 +636,7 @@ test_files:
|
|
623
636
|
- spec/unit/command/verify_spec.rb
|
624
637
|
- spec/unit/commands_map_spec.rb
|
625
638
|
- spec/unit/component_test_spec.rb
|
639
|
+
- spec/unit/configurable_spec.rb
|
626
640
|
- spec/unit/cookbook_metadata_spec.rb
|
627
641
|
- spec/unit/cookbook_profiler/git_spec.rb
|
628
642
|
- spec/unit/cookbook_profiler/identifiers_spec.rb
|
@@ -630,6 +644,8 @@ test_files:
|
|
630
644
|
- spec/unit/fixtures/chef-runner-cookbooks/test_cookbook/recipes/recipe_two.rb
|
631
645
|
- spec/unit/fixtures/command/cli_test_command.rb
|
632
646
|
- spec/unit/fixtures/command/explicit_path_example.rb
|
647
|
+
- spec/unit/fixtures/configurable/test_config_loader.rb
|
648
|
+
- spec/unit/fixtures/configurable/test_configurable.rb
|
633
649
|
- spec/unit/fixtures/cookbook_cache/baz-f59ee7a5bca6a4e606b67f7f856b768d847c39bb/.kitchen.yml
|
634
650
|
- spec/unit/fixtures/cookbook_cache/baz-f59ee7a5bca6a4e606b67f7f856b768d847c39bb/Berksfile
|
635
651
|
- spec/unit/fixtures/cookbook_cache/baz-f59ee7a5bca6a4e606b67f7f856b768d847c39bb/README.md
|