chef-dk 3.3.23 → 3.4.38

Sign up to get free protection for your applications and to get access to all the features.
Files changed (100) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +7 -7
  3. data/Gemfile.lock +91 -82
  4. data/lib/chef-dk/cli.rb +13 -13
  5. data/lib/chef-dk/command/base.rb +8 -8
  6. data/lib/chef-dk/command/clean_policy_cookbooks.rb +10 -10
  7. data/lib/chef-dk/command/clean_policy_revisions.rb +9 -9
  8. data/lib/chef-dk/command/delete_policy.rb +9 -9
  9. data/lib/chef-dk/command/delete_policy_group.rb +9 -9
  10. data/lib/chef-dk/command/diff.rb +35 -35
  11. data/lib/chef-dk/command/export.rb +11 -11
  12. data/lib/chef-dk/command/generate.rb +3 -3
  13. data/lib/chef-dk/command/generator_commands.rb +24 -24
  14. data/lib/chef-dk/command/generator_commands/build_cookbook.rb +3 -3
  15. data/lib/chef-dk/command/generator_commands/chef_exts/generator_desc_resource.rb +1 -1
  16. data/lib/chef-dk/command/generator_commands/cookbook.rb +3 -3
  17. data/lib/chef-dk/command/generator_commands/cookbook_file.rb +3 -3
  18. data/lib/chef-dk/command/generator_commands/generator_generator.rb +5 -5
  19. data/lib/chef-dk/command/generator_commands/template.rb +3 -3
  20. data/lib/chef-dk/command/install.rb +11 -11
  21. data/lib/chef-dk/command/provision.rb +32 -32
  22. data/lib/chef-dk/command/push.rb +9 -9
  23. data/lib/chef-dk/command/push_archive.rb +9 -9
  24. data/lib/chef-dk/command/shell_init.rb +21 -21
  25. data/lib/chef-dk/command/show_policy.rb +11 -11
  26. data/lib/chef-dk/command/undelete.rb +17 -17
  27. data/lib/chef-dk/command/update.rb +12 -12
  28. data/lib/chef-dk/command/verify.rb +63 -63
  29. data/lib/chef-dk/component_test.rb +3 -3
  30. data/lib/chef-dk/exceptions.rb +5 -5
  31. data/lib/chef-dk/generator.rb +61 -61
  32. data/lib/chef-dk/helpers.rb +1 -1
  33. data/lib/chef-dk/policyfile/cookbook_location_specification.rb +1 -1
  34. data/lib/chef-dk/policyfile/cookbook_locks.rb +1 -1
  35. data/lib/chef-dk/policyfile/git_lock_fetcher.rb +7 -7
  36. data/lib/chef-dk/policyfile/policyfile_location_specification.rb +1 -1
  37. data/lib/chef-dk/policyfile/uploader.rb +4 -4
  38. data/lib/chef-dk/policyfile_compiler.rb +1 -1
  39. data/lib/chef-dk/policyfile_services/export_repo.rb +49 -49
  40. data/lib/chef-dk/policyfile_services/install.rb +3 -3
  41. data/lib/chef-dk/policyfile_services/push_archive.rb +5 -5
  42. data/lib/chef-dk/policyfile_services/rm_policy_group.rb +1 -1
  43. data/lib/chef-dk/policyfile_services/update_attributes.rb +2 -2
  44. data/lib/chef-dk/service_exception_inspectors/http.rb +9 -9
  45. data/lib/chef-dk/skeletons/code_generator/recipes/recipe.rb +6 -6
  46. data/lib/chef-dk/version.rb +1 -1
  47. data/lib/kitchen/provisioner/policyfile_zero.rb +9 -9
  48. data/omnibus_overrides.rb +1 -1
  49. data/spec/spec_helper.rb +3 -3
  50. data/spec/unit/cli_spec.rb +9 -9
  51. data/spec/unit/command/base_spec.rb +25 -25
  52. data/spec/unit/command/clean_policy_cookbooks_spec.rb +6 -6
  53. data/spec/unit/command/clean_policy_revisions_spec.rb +6 -6
  54. data/spec/unit/command/delete_policy_group_spec.rb +6 -6
  55. data/spec/unit/command/delete_policy_spec.rb +6 -6
  56. data/spec/unit/command/export_spec.rb +10 -10
  57. data/spec/unit/command/generate_spec.rb +5 -5
  58. data/spec/unit/command/generator_commands/build_cookbook_spec.rb +15 -15
  59. data/spec/unit/command/generator_commands/cookbook_spec.rb +174 -174
  60. data/spec/unit/command/generator_commands/generator_generator_spec.rb +5 -5
  61. data/spec/unit/command/generator_commands/policyfile_spec.rb +15 -15
  62. data/spec/unit/command/generator_commands/repo_spec.rb +16 -16
  63. data/spec/unit/command/install_spec.rb +15 -15
  64. data/spec/unit/command/provision_spec.rb +25 -25
  65. data/spec/unit/command/push_spec.rb +12 -12
  66. data/spec/unit/command/shell_init_spec.rb +59 -59
  67. data/spec/unit/command/show_policy_spec.rb +6 -6
  68. data/spec/unit/command/undelete_spec.rb +6 -6
  69. data/spec/unit/command/update_spec.rb +30 -30
  70. data/spec/unit/fixtures/command/cli_test_command.rb +1 -1
  71. data/spec/unit/policyfile/chef_server_lock_fetcher_spec.rb +41 -41
  72. data/spec/unit/policyfile/comparison_base_spec.rb +38 -38
  73. data/spec/unit/policyfile/cookbook_locks_spec.rb +3 -3
  74. data/spec/unit/policyfile/differ_spec.rb +361 -361
  75. data/spec/unit/policyfile/git_lock_fetcher_spec.rb +34 -34
  76. data/spec/unit/policyfile/included_policies_cookbook_source_spec.rb +6 -6
  77. data/spec/unit/policyfile/local_lock_fetcher_spec.rb +35 -35
  78. data/spec/unit/policyfile/lock_applier_spec.rb +6 -6
  79. data/spec/unit/policyfile/reports/upload_spec.rb +5 -5
  80. data/spec/unit/policyfile/uploader_spec.rb +27 -27
  81. data/spec/unit/policyfile_demands_spec.rb +84 -84
  82. data/spec/unit/policyfile_evaluation_spec.rb +14 -14
  83. data/spec/unit/policyfile_includes_spec.rb +1 -1
  84. data/spec/unit/policyfile_install_with_includes_spec.rb +3 -3
  85. data/spec/unit/policyfile_lock_build_spec.rb +58 -58
  86. data/spec/unit/policyfile_lock_validation_spec.rb +108 -108
  87. data/spec/unit/policyfile_services/clean_policies_spec.rb +12 -12
  88. data/spec/unit/policyfile_services/clean_policy_cookbooks_spec.rb +9 -9
  89. data/spec/unit/policyfile_services/export_repo_spec.rb +64 -64
  90. data/spec/unit/policyfile_services/install_spec.rb +4 -4
  91. data/spec/unit/policyfile_services/push_archive_spec.rb +41 -41
  92. data/spec/unit/policyfile_services/push_spec.rb +38 -38
  93. data/spec/unit/policyfile_services/rm_policy_group_spec.rb +12 -12
  94. data/spec/unit/policyfile_services/rm_policy_spec.rb +6 -6
  95. data/spec/unit/policyfile_services/show_policy_spec.rb +161 -161
  96. data/spec/unit/policyfile_services/undelete_spec.rb +13 -13
  97. data/spec/unit/policyfile_services/update_attributes_spec.rb +6 -6
  98. data/spec/unit/policyfile_services/update_spec.rb +7 -7
  99. data/spec/unit/service_exception_inspectors/http_spec.rb +12 -12
  100. metadata +2 -2
@@ -64,15 +64,15 @@ describe ChefDK::PolicyfileCompiler do
64
64
 
65
65
  it "has an error message with code context" do
66
66
  expect(policyfile.errors.size).to eq(1)
67
- expected_message = <<-E
68
- Evaluation of policyfile 'TestPolicyfile.rb' raised an exception
69
- Exception: RuntimeError "oops"
67
+ expected_message = <<~E
68
+ Evaluation of policyfile 'TestPolicyfile.rb' raised an exception
69
+ Exception: RuntimeError "oops"
70
70
 
71
- Relevant Code:
72
- 1: raise 'oops'
71
+ Relevant Code:
72
+ 1: raise 'oops'
73
73
 
74
- Backtrace:
75
- TestPolicyfile.rb:1:in `eval_policyfile'
74
+ Backtrace:
75
+ TestPolicyfile.rb:1:in `eval_policyfile'
76
76
  E
77
77
  expect(policyfile.errors.first).to eq(expected_message)
78
78
  end
@@ -466,9 +466,9 @@ E
466
466
  end
467
467
 
468
468
  it "emits an error" do
469
- err = <<-MESSAGE
470
- Multiple sources are marked as the preferred source for some cookbooks. Only one source can be preferred for a cookbook.
471
- supermarket(https://supermarket.chef.io) and supermarket(https://mart.example) are both set as the preferred source for cookbook(s) 'foo'
469
+ err = <<~MESSAGE
470
+ Multiple sources are marked as the preferred source for some cookbooks. Only one source can be preferred for a cookbook.
471
+ supermarket(https://supermarket.chef.io) and supermarket(https://mart.example) are both set as the preferred source for cookbook(s) 'foo'
472
472
  MESSAGE
473
473
  expect(policyfile.errors).to eq([err])
474
474
  end
@@ -543,11 +543,11 @@ MESSAGE
543
543
  end
544
544
 
545
545
  it "has a conflicting sources error" do
546
- expected = <<-EOH
547
- Cookbook 'foo' assigned to conflicting sources
546
+ expected = <<~EOH
547
+ Cookbook 'foo' assigned to conflicting sources
548
548
 
549
- Previous source: {:path=>"local_cookbooks/foo"}
550
- Conflicts with: {:chef_server=>"https://mychefserver.example.com"}
549
+ Previous source: {:path=>"local_cookbooks/foo"}
550
+ Conflicts with: {:chef_server=>"https://mychefserver.example.com"}
551
551
  EOH
552
552
  expect(policyfile.errors.size).to eq(1)
553
553
  expect(policyfile.errors.first).to eq(expected)
@@ -125,7 +125,7 @@ describe ChefDK::PolicyfileCompiler, "including upstream policy locks" do
125
125
  end
126
126
  end
127
127
 
128
- let(:lock_source_options) { { :path => "somelocation" } }
128
+ let(:lock_source_options) { { path: "somelocation" } }
129
129
  let(:included_policy_lock_spec) do
130
130
  ChefDK::Policyfile::PolicyfileLocationSpecification.new(included_policy_lock_name, lock_source_options, nil).tap do |spec|
131
131
  allow(spec).to receive(:valid?).and_return(true)
@@ -118,7 +118,7 @@ describe ChefDK::PolicyfileLock, "installing cookbooks from included policies" d
118
118
  end
119
119
  end
120
120
 
121
- let(:lock_source_options) { { :path => "somelocation" } }
121
+ let(:lock_source_options) { { path: "somelocation" } }
122
122
 
123
123
  let(:included_policy_lock_name) { "included" }
124
124
 
@@ -141,8 +141,8 @@ describe ChefDK::PolicyfileLock, "installing cookbooks from included policies" d
141
141
 
142
142
  allow(policyfile.dsl).to receive(:default_source).and_return([default_source_obj])
143
143
 
144
- allow(default_source_obj).to receive(:universe_graph).
145
- and_return(external_cookbook_universe)
144
+ allow(default_source_obj).to receive(:universe_graph)
145
+ .and_return(external_cookbook_universe)
146
146
 
147
147
  allow(default_source_obj).to receive(:null?).and_return(false)
148
148
  allow(default_source_obj).to receive(:preferred_cookbooks).and_return([])
@@ -202,12 +202,12 @@ describe ChefDK::PolicyfileLock, "building a lockfile" do
202
202
  end
203
203
 
204
204
  let(:expected_canonical_revision_string) do
205
- <<-REVISION_STRING
206
- name:minimal_policyfile
207
- run-list-item:recipe[foo]
208
- cookbook:foo;id:467dc855408ce8b74f991c5dc2fd72a6aa369b60
209
- default_attributes:{}
210
- override_attributes:{}
205
+ <<~REVISION_STRING
206
+ name:minimal_policyfile
207
+ run-list-item:recipe[foo]
208
+ cookbook:foo;id:467dc855408ce8b74f991c5dc2fd72a6aa369b60
209
+ default_attributes:{}
210
+ override_attributes:{}
211
211
  REVISION_STRING
212
212
  end
213
213
 
@@ -289,12 +289,12 @@ REVISION_STRING
289
289
  end
290
290
 
291
291
  let(:expected_canonical_revision_string) do
292
- <<-REVISION_STRING
293
- name:minimal_policyfile
294
- run-list-item:recipe[foo]
295
- cookbook:foo;id:467dc855408ce8b74f991c5dc2fd72a6aa369b60
296
- default_attributes:{"aaa":"aaa","bbb":null,"ccc":false,"ddd":true,"e":1.2,"f":5,"foo":"bar","g":1e+15,"nested":{"a":"b"}}
297
- override_attributes:{"foo2":"baz"}
292
+ <<~REVISION_STRING
293
+ name:minimal_policyfile
294
+ run-list-item:recipe[foo]
295
+ cookbook:foo;id:467dc855408ce8b74f991c5dc2fd72a6aa369b60
296
+ default_attributes:{"aaa":"aaa","bbb":null,"ccc":false,"ddd":true,"e":1.2,"f":5,"foo":"bar","g":1e+15,"nested":{"a":"b"}}
297
+ override_attributes:{"foo2":"baz"}
298
298
  REVISION_STRING
299
299
  end
300
300
 
@@ -380,12 +380,12 @@ REVISION_STRING
380
380
  end
381
381
 
382
382
  let(:expected_canonical_revision_string) do
383
- <<-REVISION_STRING
384
- name:dev_cookbook
385
- run-list-item:recipe[bar]
386
- cookbook:bar;id:#{cookbook_bar_cksum}
387
- default_attributes:{}
388
- override_attributes:{}
383
+ <<~REVISION_STRING
384
+ name:dev_cookbook
385
+ run-list-item:recipe[bar]
386
+ cookbook:bar;id:#{cookbook_bar_cksum}
387
+ default_attributes:{}
388
+ override_attributes:{}
389
389
  REVISION_STRING
390
390
  end
391
391
 
@@ -480,13 +480,13 @@ REVISION_STRING
480
480
  end
481
481
 
482
482
  let(:expected_canonical_revision_string) do
483
- <<-REVISION_STRING
484
- name:custom_identifier
485
- run-list-item:recipe[foo]
486
- cookbook:bar;id:0.1.0
487
- cookbook:foo;id:1.0.0
488
- default_attributes:{}
489
- override_attributes:{}
483
+ <<~REVISION_STRING
484
+ name:custom_identifier
485
+ run-list-item:recipe[foo]
486
+ cookbook:bar;id:0.1.0
487
+ cookbook:foo;id:1.0.0
488
+ default_attributes:{}
489
+ override_attributes:{}
490
490
  REVISION_STRING
491
491
  end
492
492
 
@@ -603,17 +603,17 @@ REVISION_STRING
603
603
  end
604
604
 
605
605
  let(:expected_canonical_revision_string) do
606
- <<-REVISION_STRING
607
- name:basic_example
608
- run-list-item:recipe[foo]
609
- run-list-item:recipe[bar]
610
- run-list-item:recipe[baz::non_default]
611
- cookbook:bar;id:#{cookbook_bar_cksum}
612
- cookbook:baz;id:#{cookbook_baz_cksum}
613
- cookbook:dep_of_bar;id:#{cookbook_dep_of_bar_cksum}
614
- cookbook:foo;id:#{cookbook_foo_cksum}
615
- default_attributes:{}
616
- override_attributes:{}
606
+ <<~REVISION_STRING
607
+ name:basic_example
608
+ run-list-item:recipe[foo]
609
+ run-list-item:recipe[bar]
610
+ run-list-item:recipe[baz::non_default]
611
+ cookbook:bar;id:#{cookbook_bar_cksum}
612
+ cookbook:baz;id:#{cookbook_baz_cksum}
613
+ cookbook:dep_of_bar;id:#{cookbook_dep_of_bar_cksum}
614
+ cookbook:foo;id:#{cookbook_foo_cksum}
615
+ default_attributes:{}
616
+ override_attributes:{}
617
617
  REVISION_STRING
618
618
  end
619
619
 
@@ -735,12 +735,12 @@ REVISION_STRING
735
735
  end
736
736
 
737
737
  let(:expected_canonical_revision_string) do
738
- <<-REVISION_STRING
739
- name:minimal_policyfile
740
- run-list-item:recipe[foo]
741
- cookbook:foo;id:#{cookbook_foo_cksum}
742
- default_attributes:{}
743
- override_attributes:{}
738
+ <<~REVISION_STRING
739
+ name:minimal_policyfile
740
+ run-list-item:recipe[foo]
741
+ cookbook:foo;id:#{cookbook_foo_cksum}
742
+ default_attributes:{}
743
+ override_attributes:{}
744
744
  REVISION_STRING
745
745
  end
746
746
 
@@ -805,13 +805,13 @@ REVISION_STRING
805
805
  end
806
806
 
807
807
  let(:expected_canonical_revision_string) do
808
- <<-REVISION_STRING
809
- name:minimal_policyfile
810
- run-list-item:recipe[foo]
811
- named-run-list:rl2;run-list-item:recipe[foo::bar]
812
- cookbook:foo;id:#{cookbook_foo_cksum}
813
- default_attributes:{}
814
- override_attributes:{}
808
+ <<~REVISION_STRING
809
+ name:minimal_policyfile
810
+ run-list-item:recipe[foo]
811
+ named-run-list:rl2;run-list-item:recipe[foo::bar]
812
+ cookbook:foo;id:#{cookbook_foo_cksum}
813
+ default_attributes:{}
814
+ override_attributes:{}
815
815
  REVISION_STRING
816
816
  end
817
817
 
@@ -949,15 +949,15 @@ REVISION_STRING
949
949
  end
950
950
 
951
951
  let(:expected_canonical_revision_string) do
952
- <<-REVISION_STRING
953
- name:my-policyfile
954
- run-list-item:recipe[foo::default]
955
- run-list-item:recipe[bar::default]
956
- named-run-list:rl2;run-list-item:recipe[bar::default]
957
- cookbook:bar;id:#{cookbook_bar_cksum}
958
- cookbook:foo;id:#{cookbook_foo_cksum}
959
- default_attributes:#{canonicalized_default_attrs}
960
- override_attributes:#{canonicalized_override_attrs}
952
+ <<~REVISION_STRING
953
+ name:my-policyfile
954
+ run-list-item:recipe[foo::default]
955
+ run-list-item:recipe[bar::default]
956
+ named-run-list:rl2;run-list-item:recipe[bar::default]
957
+ cookbook:bar;id:#{cookbook_bar_cksum}
958
+ cookbook:foo;id:#{cookbook_foo_cksum}
959
+ default_attributes:#{canonicalized_default_attrs}
960
+ override_attributes:#{canonicalized_override_attrs}
961
961
  REVISION_STRING
962
962
  end
963
963
 
@@ -114,14 +114,14 @@ describe ChefDK::PolicyfileLock, "validating locked cookbooks" do
114
114
  # Validate the metadata is correct, so we know the test setup code
115
115
  # hasn't done something wrong.
116
116
  def ensure_metadata_as_expected!
117
- expected_metadata_rb = <<-E
118
- name 'local-cookbook'
119
- maintainer ''
120
- maintainer_email ''
121
- license ''
122
- description 'Installs/Configures local-cookbook'
123
- long_description 'Installs/Configures local-cookbook'
124
- version '2.3.4'
117
+ expected_metadata_rb = <<~E
118
+ name 'local-cookbook'
119
+ maintainer ''
120
+ maintainer_email ''
121
+ license ''
122
+ description 'Installs/Configures local-cookbook'
123
+ long_description 'Installs/Configures local-cookbook'
124
+ version '2.3.4'
125
125
 
126
126
  E
127
127
  expect(IO.read(metadata_path)).to eq(expected_metadata_rb)
@@ -145,14 +145,14 @@ E
145
145
  context "when the cookbook has an incorrect name" do
146
146
 
147
147
  let(:new_metadata) do
148
- <<-E
149
- name 'WRONG'
150
- maintainer ''
151
- maintainer_email ''
152
- license ''
153
- description 'Installs/Configures local-cookbook'
154
- long_description 'Installs/Configures local-cookbook'
155
- version '2.3.4'
148
+ <<~E
149
+ name 'WRONG'
150
+ maintainer ''
151
+ maintainer_email ''
152
+ license ''
153
+ description 'Installs/Configures local-cookbook'
154
+ long_description 'Installs/Configures local-cookbook'
155
+ version '2.3.4'
156
156
 
157
157
  E
158
158
  end
@@ -174,14 +174,14 @@ E
174
174
  context "when the cookbook has an updated version that violates no dependency constraints" do
175
175
 
176
176
  let(:new_metadata) do
177
- <<-E
178
- name 'local-cookbook'
179
- maintainer ''
180
- maintainer_email ''
181
- license ''
182
- description 'Installs/Configures local-cookbook'
183
- long_description 'Installs/Configures local-cookbook'
184
- version '2.3.5' # changed from 2.3.4
177
+ <<~E
178
+ name 'local-cookbook'
179
+ maintainer ''
180
+ maintainer_email ''
181
+ license ''
182
+ description 'Installs/Configures local-cookbook'
183
+ long_description 'Installs/Configures local-cookbook'
184
+ version '2.3.5' # changed from 2.3.4
185
185
 
186
186
  E
187
187
  end
@@ -221,14 +221,14 @@ E
221
221
  end
222
222
 
223
223
  let(:new_metadata) do
224
- <<-E
225
- name 'local-cookbook'
226
- maintainer ''
227
- maintainer_email ''
228
- license ''
229
- description 'Installs/Configures local-cookbook'
230
- long_description 'Installs/Configures local-cookbook'
231
- version '3.0.0' # changed from 2.3.4, violates `~> 2.0` constraint
224
+ <<~E
225
+ name 'local-cookbook'
226
+ maintainer ''
227
+ maintainer_email ''
228
+ license ''
229
+ description 'Installs/Configures local-cookbook'
230
+ long_description 'Installs/Configures local-cookbook'
231
+ version '3.0.0' # changed from 2.3.4, violates `~> 2.0` constraint
232
232
 
233
233
  E
234
234
  end
@@ -250,9 +250,9 @@ E
250
250
  let(:recipe_path) { File.join(local_cookbook_path, "recipes/default.rb") }
251
251
 
252
252
  let(:new_recipe) do
253
- <<-E
254
- # This is totally new code,
255
- # it is different than the old code
253
+ <<~E
254
+ # This is totally new code,
255
+ # it is different than the old code
256
256
 
257
257
  E
258
258
  end
@@ -281,16 +281,16 @@ E
281
281
  context "when a :path source cookbook has added a dependency satisfied by the current cookbook set" do
282
282
 
283
283
  let(:new_metadata) do
284
- <<-E
285
- name 'local-cookbook'
286
- maintainer ''
287
- maintainer_email ''
288
- license ''
289
- description 'Installs/Configures local-cookbook'
290
- long_description 'Installs/Configures local-cookbook'
291
- version '2.3.4'
284
+ <<~E
285
+ name 'local-cookbook'
286
+ maintainer ''
287
+ maintainer_email ''
288
+ license ''
289
+ description 'Installs/Configures local-cookbook'
290
+ long_description 'Installs/Configures local-cookbook'
291
+ version '2.3.4'
292
292
 
293
- depends "foo", "=1.0.0"
293
+ depends "foo", "=1.0.0"
294
294
 
295
295
  E
296
296
  end
@@ -328,16 +328,16 @@ E
328
328
  context "when a :path source cookbook has added a dependency not satisfied by the current cookbook set" do
329
329
 
330
330
  let(:new_metadata) do
331
- <<-E
332
- name 'local-cookbook'
333
- maintainer ''
334
- maintainer_email ''
335
- license ''
336
- description 'Installs/Configures local-cookbook'
337
- long_description 'Installs/Configures local-cookbook'
338
- version '2.3.4'
331
+ <<~E
332
+ name 'local-cookbook'
333
+ maintainer ''
334
+ maintainer_email ''
335
+ license ''
336
+ description 'Installs/Configures local-cookbook'
337
+ long_description 'Installs/Configures local-cookbook'
338
+ version '2.3.4'
339
339
 
340
- depends "not-a-thing"
340
+ depends "not-a-thing"
341
341
 
342
342
  E
343
343
  end
@@ -368,16 +368,16 @@ E
368
368
  end
369
369
 
370
370
  let(:new_metadata) do
371
- <<-E
372
- name 'local-cookbook'
373
- maintainer ''
374
- maintainer_email ''
375
- license ''
376
- description 'Installs/Configures local-cookbook'
377
- long_description 'Installs/Configures local-cookbook'
378
- version '2.3.4'
371
+ <<~E
372
+ name 'local-cookbook'
373
+ maintainer ''
374
+ maintainer_email ''
375
+ license ''
376
+ description 'Installs/Configures local-cookbook'
377
+ long_description 'Installs/Configures local-cookbook'
378
+ version '2.3.4'
379
379
 
380
- depends "foo", ">= 1.0.0"
380
+ depends "foo", ">= 1.0.0"
381
381
 
382
382
  E
383
383
  end
@@ -402,16 +402,16 @@ E
402
402
  context "when a :path source cookbook has modified a dep constraint and the new constraint is not satisfied" do
403
403
 
404
404
  let(:new_metadata) do
405
- <<-E
406
- name 'local-cookbook'
407
- maintainer ''
408
- maintainer_email ''
409
- license ''
410
- description 'Installs/Configures local-cookbook'
411
- long_description 'Installs/Configures local-cookbook'
412
- version '2.3.4'
405
+ <<~E
406
+ name 'local-cookbook'
407
+ maintainer ''
408
+ maintainer_email ''
409
+ license ''
410
+ description 'Installs/Configures local-cookbook'
411
+ long_description 'Installs/Configures local-cookbook'
412
+ version '2.3.4'
413
413
 
414
- depends "foo", "~> 2.0"
414
+ depends "foo", "~> 2.0"
415
415
 
416
416
  E
417
417
  end
@@ -475,30 +475,30 @@ E
475
475
  end
476
476
 
477
477
  let(:new_metadata_local_cookbook) do
478
- <<-E
479
- name 'local-cookbook'
480
- maintainer ''
481
- maintainer_email ''
482
- license ''
483
- description 'Installs/Configures local-cookbook'
484
- long_description 'Installs/Configures local-cookbook'
485
- version '3.0.0' # changed from 2.3.4
478
+ <<~E
479
+ name 'local-cookbook'
480
+ maintainer ''
481
+ maintainer_email ''
482
+ license ''
483
+ description 'Installs/Configures local-cookbook'
484
+ long_description 'Installs/Configures local-cookbook'
485
+ version '3.0.0' # changed from 2.3.4
486
486
 
487
487
  E
488
488
  end
489
489
 
490
490
  let(:new_metadata_another_local_cookbook) do
491
- <<-E
492
- name 'another-local-cookbook'
493
- maintainer ''
494
- maintainer_email ''
495
- license ''
496
- description 'Installs/Configures another-local-cookbook'
497
- long_description 'Installs/Configures another-local-cookbook'
498
- version '0.1.0'
499
-
500
- # This dep now requires the updated version of 'local-cookbook'
501
- depends 'local-cookbook', '= 3.0.0'
491
+ <<~E
492
+ name 'another-local-cookbook'
493
+ maintainer ''
494
+ maintainer_email ''
495
+ license ''
496
+ description 'Installs/Configures another-local-cookbook'
497
+ long_description 'Installs/Configures another-local-cookbook'
498
+ version '0.1.0'
499
+
500
+ # This dep now requires the updated version of 'local-cookbook'
501
+ depends 'local-cookbook', '= 3.0.0'
502
502
  E
503
503
  end
504
504
 
@@ -541,14 +541,14 @@ E
541
541
  # Validate the metadata is correct, so we know the test setup code
542
542
  # hasn't done something wrong.
543
543
  def ensure_metadata_as_expected!
544
- expected_metadata_rb = <<-E
545
- name 'foo'
546
- maintainer ''
547
- maintainer_email ''
548
- license ''
549
- description 'Installs/Configures foo'
550
- long_description 'Installs/Configures foo'
551
- version '1.0.0'
544
+ expected_metadata_rb = <<~E
545
+ name 'foo'
546
+ maintainer ''
547
+ maintainer_email ''
548
+ license ''
549
+ description 'Installs/Configures foo'
550
+ long_description 'Installs/Configures foo'
551
+ version '1.0.0'
552
552
 
553
553
  E
554
554
  expect(IO.read(metadata_path)).to eq(expected_metadata_rb)
@@ -580,16 +580,16 @@ E
580
580
  # function to let the user recover.
581
581
 
582
582
  let(:new_metadata) do
583
- <<-E
584
- # This is a cached copy of an upstream cookbook, I should not be editing it but
585
- # YOLO
586
- name 'foo'
587
- maintainer ''
588
- maintainer_email ''
589
- license ''
590
- description 'Installs/Configures foo'
591
- long_description 'Installs/Configures foo'
592
- version '1.0.0'
583
+ <<~E
584
+ # This is a cached copy of an upstream cookbook, I should not be editing it but
585
+ # YOLO
586
+ name 'foo'
587
+ maintainer ''
588
+ maintainer_email ''
589
+ license ''
590
+ description 'Installs/Configures foo'
591
+ long_description 'Installs/Configures foo'
592
+ version '1.0.0'
593
593
  E
594
594
  end
595
595