chef-dk 1.2.22 → 1.3.40

Sign up to get free protection for your applications and to get access to all the features.
Files changed (232) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +8 -12
  3. data/Gemfile.lock +120 -116
  4. data/README.md +4 -3
  5. data/Rakefile +54 -0
  6. data/acceptance/Gemfile.lock +36 -47
  7. data/bin/chef +1 -1
  8. data/chef-dk.gemspec +9 -9
  9. data/lib/chef-dk/authenticated_http.rb +6 -7
  10. data/lib/chef-dk/builtin_commands.rb +3 -4
  11. data/lib/chef-dk/chef_runner.rb +7 -8
  12. data/lib/chef-dk/cli.rb +11 -11
  13. data/lib/chef-dk/command/base.rb +4 -4
  14. data/lib/chef-dk/command/clean_policy_cookbooks.rb +4 -5
  15. data/lib/chef-dk/command/clean_policy_revisions.rb +4 -6
  16. data/lib/chef-dk/command/delete_policy.rb +4 -6
  17. data/lib/chef-dk/command/delete_policy_group.rb +6 -8
  18. data/lib/chef-dk/command/diff.rb +9 -10
  19. data/lib/chef-dk/command/env.rb +26 -27
  20. data/lib/chef-dk/command/exec.rb +5 -6
  21. data/lib/chef-dk/command/export.rb +8 -10
  22. data/lib/chef-dk/command/gem.rb +5 -5
  23. data/lib/chef-dk/command/generate.rb +19 -19
  24. data/lib/chef-dk/command/generator_commands.rb +8 -8
  25. data/lib/chef-dk/command/generator_commands/app.rb +2 -3
  26. data/lib/chef-dk/command/generator_commands/attribute.rb +2 -3
  27. data/lib/chef-dk/command/generator_commands/base.rb +13 -13
  28. data/lib/chef-dk/command/generator_commands/build_cookbook.rb +2 -2
  29. data/lib/chef-dk/command/generator_commands/chef_exts/generator_desc_resource.rb +2 -2
  30. data/lib/chef-dk/command/generator_commands/chef_exts/quieter_doc_formatter.rb +1 -2
  31. data/lib/chef-dk/command/generator_commands/chef_exts/recipe_dsl_ext.rb +1 -2
  32. data/lib/chef-dk/command/generator_commands/cookbook.rb +2 -2
  33. data/lib/chef-dk/command/generator_commands/cookbook_code_file.rb +3 -3
  34. data/lib/chef-dk/command/generator_commands/cookbook_file.rb +2 -2
  35. data/lib/chef-dk/command/generator_commands/generator_generator.rb +4 -7
  36. data/lib/chef-dk/command/generator_commands/lwrp.rb +2 -2
  37. data/lib/chef-dk/command/generator_commands/policyfile.rb +2 -3
  38. data/lib/chef-dk/command/generator_commands/recipe.rb +2 -2
  39. data/lib/chef-dk/command/generator_commands/repo.rb +1 -3
  40. data/lib/chef-dk/command/generator_commands/template.rb +2 -2
  41. data/lib/chef-dk/command/install.rb +4 -5
  42. data/lib/chef-dk/command/provision.rb +12 -14
  43. data/lib/chef-dk/command/push.rb +5 -6
  44. data/lib/chef-dk/command/push_archive.rb +4 -5
  45. data/lib/chef-dk/command/shell_init.rb +15 -16
  46. data/lib/chef-dk/command/show_policy.rb +5 -7
  47. data/lib/chef-dk/command/undelete.rb +6 -7
  48. data/lib/chef-dk/command/update.rb +5 -6
  49. data/lib/chef-dk/command/verify.rb +30 -31
  50. data/lib/chef-dk/commands_map.rb +1 -3
  51. data/lib/chef-dk/component_test.rb +13 -13
  52. data/lib/chef-dk/configurable.rb +2 -2
  53. data/lib/chef-dk/cookbook_metadata.rb +2 -2
  54. data/lib/chef-dk/cookbook_omnifetch.rb +7 -8
  55. data/lib/chef-dk/cookbook_profiler/git.rb +8 -8
  56. data/lib/chef-dk/cookbook_profiler/identifiers.rb +7 -7
  57. data/lib/chef-dk/cookbook_profiler/null_scm.rb +0 -1
  58. data/lib/chef-dk/exceptions.rb +1 -1
  59. data/lib/chef-dk/generator.rb +9 -7
  60. data/lib/chef-dk/helpers.rb +15 -15
  61. data/lib/chef-dk/pager.rb +2 -3
  62. data/lib/chef-dk/policyfile/chef_repo_cookbook_source.rb +4 -4
  63. data/lib/chef-dk/policyfile/chef_server_cookbook_source.rb +6 -6
  64. data/lib/chef-dk/policyfile/community_cookbook_source.rb +4 -5
  65. data/lib/chef-dk/policyfile/comparison_base.rb +3 -4
  66. data/lib/chef-dk/policyfile/cookbook_location_specification.rb +6 -6
  67. data/lib/chef-dk/policyfile/cookbook_locks.rb +11 -11
  68. data/lib/chef-dk/policyfile/cookbook_sources.rb +5 -5
  69. data/lib/chef-dk/policyfile/delivery_supermarket_source.rb +8 -9
  70. data/lib/chef-dk/policyfile/differ.rb +7 -10
  71. data/lib/chef-dk/policyfile/dsl.rb +10 -11
  72. data/lib/chef-dk/policyfile/lister.rb +3 -6
  73. data/lib/chef-dk/policyfile/null_cookbook_source.rb +3 -3
  74. data/lib/chef-dk/policyfile/read_cookbook_for_compat_mode_upload.rb +3 -3
  75. data/lib/chef-dk/policyfile/reports/install.rb +3 -4
  76. data/lib/chef-dk/policyfile/reports/table_printer.rb +0 -1
  77. data/lib/chef-dk/policyfile/reports/upload.rb +4 -4
  78. data/lib/chef-dk/policyfile/solution_dependencies.rb +22 -22
  79. data/lib/chef-dk/policyfile/source_uri.rb +2 -2
  80. data/lib/chef-dk/policyfile/storage_config.rb +4 -5
  81. data/lib/chef-dk/policyfile/undo_record.rb +6 -9
  82. data/lib/chef-dk/policyfile/undo_stack.rb +5 -7
  83. data/lib/chef-dk/policyfile/uploader.rb +8 -8
  84. data/lib/chef-dk/policyfile_compiler.rb +16 -20
  85. data/lib/chef-dk/policyfile_lock.rb +10 -11
  86. data/lib/chef-dk/policyfile_services/clean_policies.rb +3 -3
  87. data/lib/chef-dk/policyfile_services/clean_policy_cookbooks.rb +3 -5
  88. data/lib/chef-dk/policyfile_services/export_repo.rb +13 -14
  89. data/lib/chef-dk/policyfile_services/install.rb +6 -6
  90. data/lib/chef-dk/policyfile_services/push.rb +6 -8
  91. data/lib/chef-dk/policyfile_services/push_archive.rb +6 -10
  92. data/lib/chef-dk/policyfile_services/rm_policy.rb +4 -5
  93. data/lib/chef-dk/policyfile_services/rm_policy_group.rb +4 -5
  94. data/lib/chef-dk/policyfile_services/show_policy.rb +5 -6
  95. data/lib/chef-dk/policyfile_services/undelete.rb +3 -3
  96. data/lib/chef-dk/policyfile_services/update_attributes.rb +4 -6
  97. data/lib/chef-dk/service_exception_inspectors.rb +2 -3
  98. data/lib/chef-dk/service_exception_inspectors/base.rb +0 -1
  99. data/lib/chef-dk/service_exception_inspectors/http.rb +1 -3
  100. data/lib/chef-dk/service_exceptions.rb +1 -2
  101. data/lib/chef-dk/shell_out.rb +1 -1
  102. data/lib/chef-dk/skeletons/code_generator/files/default/build_cookbook/.kitchen.yml +2 -2
  103. data/lib/chef-dk/skeletons/code_generator/files/default/build_cookbook/README.md +2 -2
  104. data/lib/chef-dk/skeletons/code_generator/files/default/build_cookbook/test-fixture-recipe.rb +1 -0
  105. data/lib/chef-dk/skeletons/code_generator/files/default/repo/cookbooks/example/attributes/default.rb +1 -1
  106. data/lib/chef-dk/skeletons/code_generator/files/default/repo/cookbooks/example/recipes/default.rb +1 -1
  107. data/lib/chef-dk/skeletons/code_generator/metadata.rb +0 -1
  108. data/lib/chef-dk/skeletons/code_generator/recipes/app.rb +6 -6
  109. data/lib/chef-dk/skeletons/code_generator/recipes/attribute.rb +3 -3
  110. data/lib/chef-dk/skeletons/code_generator/recipes/build_cookbook.rb +43 -39
  111. data/lib/chef-dk/skeletons/code_generator/recipes/cookbook.rb +31 -22
  112. data/lib/chef-dk/skeletons/code_generator/recipes/cookbook_file.rb +5 -5
  113. data/lib/chef-dk/skeletons/code_generator/recipes/lwrp.rb +4 -4
  114. data/lib/chef-dk/skeletons/code_generator/recipes/policyfile.rb +1 -1
  115. data/lib/chef-dk/skeletons/code_generator/recipes/recipe.rb +8 -8
  116. data/lib/chef-dk/skeletons/code_generator/recipes/repo.rb +15 -15
  117. data/lib/chef-dk/skeletons/code_generator/recipes/template.rb +6 -6
  118. data/lib/chef-dk/skeletons/code_generator/templates/default/build_cookbook/Berksfile.erb +0 -2
  119. data/lib/chef-dk/skeletons/code_generator/templates/default/build_cookbook/metadata.rb.erb +1 -0
  120. data/lib/chef-dk/skeletons/code_generator/templates/default/inspec_default_test.rb.erb +4 -4
  121. data/lib/chef-dk/skeletons/code_generator/templates/default/kitchen.yml.erb +1 -1
  122. data/lib/chef-dk/skeletons/code_generator/templates/default/kitchen_policyfile.yml.erb +1 -1
  123. data/lib/chef-dk/skeletons/code_generator/templates/default/metadata.rb.erb +4 -3
  124. data/lib/chef-dk/skeletons/code_generator/templates/default/recipe_spec.rb.erb +4 -2
  125. data/lib/chef-dk/ui.rb +0 -1
  126. data/lib/chef-dk/version.rb +1 -1
  127. data/lib/kitchen/provisioner/policyfile_zero.rb +7 -7
  128. data/omnibus_overrides.rb +3 -3
  129. data/spec/shared/a_file_generator.rb +3 -3
  130. data/spec/shared/custom_generator_cookbook.rb +6 -6
  131. data/spec/shared/fixture_cookbook_checksums.rb +2 -3
  132. data/spec/shared/setup_git_committer_config.rb +1 -1
  133. data/spec/shared/setup_git_cookbooks.rb +2 -2
  134. data/spec/spec_helper.rb +5 -5
  135. data/spec/test_helpers.rb +2 -2
  136. data/spec/unit/chef_runner_spec.rb +5 -7
  137. data/spec/unit/cli_spec.rb +36 -37
  138. data/spec/unit/command/base_spec.rb +4 -5
  139. data/spec/unit/command/clean_policy_cookbooks_spec.rb +8 -9
  140. data/spec/unit/command/clean_policy_revisions_spec.rb +8 -9
  141. data/spec/unit/command/delete_policy_group_spec.rb +11 -12
  142. data/spec/unit/command/delete_policy_spec.rb +11 -12
  143. data/spec/unit/command/diff_spec.rb +5 -6
  144. data/spec/unit/command/env_spec.rb +5 -5
  145. data/spec/unit/command/exec_spec.rb +18 -19
  146. data/spec/unit/command/export_spec.rb +5 -6
  147. data/spec/unit/command/generate_spec.rb +10 -10
  148. data/spec/unit/command/generator_commands/app_spec.rb +6 -6
  149. data/spec/unit/command/generator_commands/attribute_spec.rb +3 -4
  150. data/spec/unit/command/generator_commands/base_spec.rb +46 -46
  151. data/spec/unit/command/generator_commands/build_cookbook_spec.rb +50 -16
  152. data/spec/unit/command/generator_commands/chef_exts/generator_desc_resource_spec.rb +9 -9
  153. data/spec/unit/command/generator_commands/chef_exts/recipe_dsl_ext_spec.rb +16 -16
  154. data/spec/unit/command/generator_commands/cookbook_file_spec.rb +3 -4
  155. data/spec/unit/command/generator_commands/cookbook_spec.rb +23 -26
  156. data/spec/unit/command/generator_commands/generator_generator_spec.rb +4 -6
  157. data/spec/unit/command/generator_commands/lwrp_spec.rb +3 -4
  158. data/spec/unit/command/generator_commands/policyfile_spec.rb +3 -5
  159. data/spec/unit/command/generator_commands/recipe_spec.rb +4 -4
  160. data/spec/unit/command/generator_commands/repo_spec.rb +11 -11
  161. data/spec/unit/command/generator_commands/template_spec.rb +3 -4
  162. data/spec/unit/command/install_spec.rb +6 -6
  163. data/spec/unit/command/provision_spec.rb +27 -30
  164. data/spec/unit/command/push_archive_spec.rb +3 -3
  165. data/spec/unit/command/push_spec.rb +5 -6
  166. data/spec/unit/command/shell_init_spec.rb +17 -19
  167. data/spec/unit/command/show_policy_spec.rb +11 -12
  168. data/spec/unit/command/undelete_spec.rb +12 -14
  169. data/spec/unit/command/update_spec.rb +8 -8
  170. data/spec/unit/command/verify_spec.rb +10 -10
  171. data/spec/unit/commands_map_spec.rb +4 -4
  172. data/spec/unit/component_test_spec.rb +3 -3
  173. data/spec/unit/configurable_spec.rb +7 -7
  174. data/spec/unit/cookbook_metadata_spec.rb +5 -7
  175. data/spec/unit/cookbook_profiler/git_spec.rb +6 -7
  176. data/spec/unit/cookbook_profiler/identifiers_spec.rb +5 -7
  177. data/spec/unit/fixtures/command/cli_test_command.rb +2 -2
  178. data/spec/unit/fixtures/configurable/test_configurable.rb +1 -1
  179. data/spec/unit/fixtures/cookbooks_api/update_fixtures.rb +13 -16
  180. data/spec/unit/fixtures/eg_omnibus_dir/valid/embedded/apps/berkshelf/verify_me +1 -1
  181. data/spec/unit/gemfile_util_spec.rb +4 -4
  182. data/spec/unit/generator_spec.rb +10 -10
  183. data/spec/unit/helpers_spec.rb +31 -31
  184. data/spec/unit/pager_spec.rb +5 -7
  185. data/spec/unit/policyfile/chef_repo_cookbook_source_spec.rb +11 -11
  186. data/spec/unit/policyfile/chef_server_cookbook_source_spec.rb +13 -13
  187. data/spec/unit/policyfile/community_cookbook_source_spec.rb +3 -4
  188. data/spec/unit/policyfile/comparison_base_spec.rb +3 -6
  189. data/spec/unit/policyfile/cookbook_location_specification_spec.rb +3 -3
  190. data/spec/unit/policyfile/cookbook_locks_spec.rb +7 -9
  191. data/spec/unit/policyfile/delivery_supermarket_source_spec.rb +16 -17
  192. data/spec/unit/policyfile/differ_spec.rb +4 -5
  193. data/spec/unit/policyfile/lister_spec.rb +31 -35
  194. data/spec/unit/policyfile/null_cookbook_source_spec.rb +2 -3
  195. data/spec/unit/policyfile/read_cookbook_for_compat_mode_upload_spec.rb +3 -3
  196. data/spec/unit/policyfile/reports/install_spec.rb +4 -5
  197. data/spec/unit/policyfile/reports/upload_spec.rb +4 -6
  198. data/spec/unit/policyfile/solution_dependencies_spec.rb +13 -13
  199. data/spec/unit/policyfile/source_uri_spec.rb +5 -5
  200. data/spec/unit/policyfile/storage_config_spec.rb +3 -7
  201. data/spec/unit/policyfile/undo_record_spec.rb +21 -23
  202. data/spec/unit/policyfile/undo_stack_spec.rb +5 -6
  203. data/spec/unit/policyfile/uploader_spec.rb +73 -75
  204. data/spec/unit/policyfile_demands_spec.rb +93 -99
  205. data/spec/unit/policyfile_evaluation_spec.rb +14 -14
  206. data/spec/unit/policyfile_lock_build_spec.rb +64 -65
  207. data/spec/unit/policyfile_lock_install_spec.rb +5 -6
  208. data/spec/unit/policyfile_lock_serialization_spec.rb +14 -15
  209. data/spec/unit/policyfile_lock_validation_spec.rb +17 -20
  210. data/spec/unit/policyfile_services/clean_policies_spec.rb +16 -16
  211. data/spec/unit/policyfile_services/clean_policy_cookbooks_spec.rb +26 -29
  212. data/spec/unit/policyfile_services/export_repo_spec.rb +3 -6
  213. data/spec/unit/policyfile_services/install_spec.rb +5 -7
  214. data/spec/unit/policyfile_services/push_archive_spec.rb +4 -8
  215. data/spec/unit/policyfile_services/push_spec.rb +3 -3
  216. data/spec/unit/policyfile_services/rm_policy_group_spec.rb +16 -20
  217. data/spec/unit/policyfile_services/rm_policy_spec.rb +14 -17
  218. data/spec/unit/policyfile_services/show_policy_spec.rb +78 -80
  219. data/spec/unit/policyfile_services/undelete_spec.rb +5 -7
  220. data/spec/unit/policyfile_services/update_attributes_spec.rb +34 -35
  221. data/spec/unit/service_exception_inspectors/base_spec.rb +2 -4
  222. data/spec/unit/service_exception_inspectors/http_spec.rb +9 -11
  223. data/spec/unit/shell_out_spec.rb +2 -2
  224. data/spec/unit/tasks/helpers_spec.rb +2 -2
  225. data/tasks/bin/bundle-platform +1 -1
  226. data/tasks/bundle_util.rb +1 -1
  227. data/tasks/dependencies.rb +21 -7
  228. data/tasks/gemfile_util.rb +1 -1
  229. data/tasks/helpers.rb +2 -2
  230. data/tasks/version.rb +26 -1
  231. data/version_policy.rb +6 -6
  232. metadata +3 -3
@@ -15,8 +15,8 @@
15
15
  # limitations under the License.
16
16
  #
17
17
 
18
- require 'spec_helper'
19
- require 'chef-dk/policyfile_services/export_repo'
18
+ require "spec_helper"
19
+ require "chef-dk/policyfile_services/export_repo"
20
20
 
21
21
  describe ChefDK::PolicyfileServices::ExportRepo do
22
22
 
@@ -94,7 +94,7 @@ describe ChefDK::PolicyfileServices::ExportRepo do
94
94
 
95
95
  context "and the lockfile is semantically invalid" do
96
96
 
97
- let(:lockfile_content) { '{ }' }
97
+ let(:lockfile_content) { "{ }" }
98
98
 
99
99
  it "errors out" do
100
100
  expect { export_service.run }.to raise_error(ChefDK::PolicyfileExportRepoError, /Invalid lockfile data/)
@@ -475,7 +475,4 @@ CONFIG
475
475
 
476
476
  end
477
477
 
478
-
479
-
480
478
  end
481
-
@@ -15,8 +15,8 @@
15
15
  # limitations under the License.
16
16
  #
17
17
 
18
- require 'spec_helper'
19
- require 'chef-dk/policyfile_services/install'
18
+ require "spec_helper"
19
+ require "chef-dk/policyfile_services/install"
20
20
 
21
21
  describe ChefDK::PolicyfileServices::Install do
22
22
 
@@ -107,7 +107,7 @@ E
107
107
  it "solves the Policyfile demands, installs cookbooks, emits a lockfile" do
108
108
  install_service.run
109
109
  generated_lock = result_policyfile_lock
110
- expect(generated_lock.name).to eq('install-example')
110
+ expect(generated_lock.name).to eq("install-example")
111
111
  expect(generated_lock.cookbook_locks).to have_key("local-cookbook")
112
112
  end
113
113
 
@@ -144,7 +144,7 @@ E
144
144
  it "solves the Policyfile demands, installs cookbooks, emits a lockfile" do
145
145
  install_service.run
146
146
  generated_lock = result_policyfile_lock
147
- expect(generated_lock.name).to eq('install-example')
147
+ expect(generated_lock.name).to eq("install-example")
148
148
  expect(generated_lock.cookbook_locks).to have_key("local-cookbook")
149
149
  end
150
150
 
@@ -159,7 +159,7 @@ E
159
159
  it "reads the policyfile lock from disk" do
160
160
  lock = install_service.policyfile_lock
161
161
  expect(lock).to be_an_instance_of(ChefDK::PolicyfileLock)
162
- expect(lock.name).to eq('install-example')
162
+ expect(lock.name).to eq("install-example")
163
163
  expect(lock.cookbook_locks).to have_key("local-cookbook")
164
164
  end
165
165
 
@@ -178,7 +178,6 @@ E
178
178
  expect { install_service.run }.to raise_error(ChefDK::PolicyfileInstallError)
179
179
  end
180
180
 
181
-
182
181
  end
183
182
 
184
183
  context "and the Policyfile has updated dependendencies" do
@@ -208,4 +207,3 @@ E
208
207
  end
209
208
 
210
209
  end
211
-
@@ -15,8 +15,8 @@
15
15
  # limitations under the License.
16
16
  #
17
17
 
18
- require 'spec_helper'
19
- require 'chef-dk/policyfile_services/push_archive'
18
+ require "spec_helper"
19
+ require "chef-dk/policyfile_services/push_archive"
20
20
 
21
21
  describe ChefDK::PolicyfileServices::PushArchive do
22
22
 
@@ -26,7 +26,6 @@ describe ChefDK::PolicyfileServices::PushArchive do
26
26
  Zlib::GzipWriter.open(archive_file_path) do |gz_file|
27
27
  Archive::Tar::Minitar::Writer.open(gz_file) do |tar|
28
28
 
29
-
30
29
  archive_dirs.each do |dir|
31
30
  tar.mkdir(dir, mode: 0755)
32
31
  end
@@ -184,7 +183,6 @@ E
184
183
  end
185
184
  end
186
185
 
187
-
188
186
  context "when the archive is a gzip file of a very malformed tar archive" do
189
187
 
190
188
  before do
@@ -254,7 +252,7 @@ E
254
252
 
255
253
  context "when the lockfile is semantically invalid" do
256
254
 
257
- let(:lockfile_content) { '{ }' }
255
+ let(:lockfile_content) { "{ }" }
258
256
 
259
257
  it "errors out" do
260
258
  expect(exception).to_not be_nil
@@ -264,7 +262,6 @@ E
264
262
 
265
263
  end
266
264
 
267
-
268
265
  context "when the archive does not have all the necessary cookbooks" do
269
266
 
270
267
  let(:lockfile_content) { valid_lockfile }
@@ -335,7 +332,7 @@ MESSAGE
335
332
  [
336
333
  FileToTar.new("Policyfile.lock.json", lockfile_content),
337
334
  FileToTar.new(File.join(cookbook_artifact_dir, "metadata.rb"), "name 'local-cookbook'"),
338
- FileToTar.new(File.join(recipes_dir, "default.rb"), "puts 'hello'")
335
+ FileToTar.new(File.join(recipes_dir, "default.rb"), "puts 'hello'"),
339
336
  ]
340
337
  end
341
338
 
@@ -375,4 +372,3 @@ MESSAGE
375
372
  end
376
373
 
377
374
  end
378
-
@@ -15,8 +15,8 @@
15
15
  # limitations under the License.
16
16
  #
17
17
 
18
- require 'spec_helper'
19
- require 'chef-dk/policyfile_services/push'
18
+ require "spec_helper"
19
+ require "chef-dk/policyfile_services/push"
20
20
 
21
21
  describe ChefDK::PolicyfileServices::Push do
22
22
 
@@ -129,7 +129,7 @@ describe ChefDK::PolicyfileServices::Push do
129
129
 
130
130
  context "and the lockfile is semantically invalid" do
131
131
 
132
- let(:lockfile_content) { '{ }' }
132
+ let(:lockfile_content) { "{ }" }
133
133
 
134
134
  it "errors out" do
135
135
  expect { push_service.run }.to raise_error(ChefDK::PolicyfilePushError)
@@ -15,8 +15,8 @@
15
15
  # limitations under the License.
16
16
  #
17
17
 
18
- require 'spec_helper'
19
- require 'chef-dk/policyfile_services/rm_policy_group'
18
+ require "spec_helper"
19
+ require "chef-dk/policyfile_services/rm_policy_group"
20
20
 
21
21
  describe ChefDK::PolicyfileServices::RmPolicyGroup do
22
22
 
@@ -33,29 +33,28 @@ describe ChefDK::PolicyfileServices::RmPolicyGroup do
33
33
  "policies" => {
34
34
  "appserver" => { "revision_id" => "1111111111111111111111111111111111111111111111111111111111111111" },
35
35
  "load-balancer" => { "revision_id" => "5555555555555555555555555555555555555555555555555555555555555555" },
36
- "db" => { "revision_id" => "9999999999999999999999999999999999999999999999999999999999999999" }
37
- }
36
+ "db" => { "revision_id" => "9999999999999999999999999999999999999999999999999999999999999999" },
37
+ },
38
38
  },
39
39
  "preprod" => {
40
40
  "uri" => "https://chef.example/organizations/testorg/policy_groups/preprod",
41
41
  "policies" => {
42
42
  "appserver" => { "revision_id" => "2222222222222222222222222222222222222222222222222222222222222222" },
43
43
  "load-balancer" => { "revision_id" => "5555555555555555555555555555555555555555555555555555555555555555" },
44
- "db" => { "revision_id" => "9999999999999999999999999999999999999999999999999999999999999999" }
45
- }
46
- }
44
+ "db" => { "revision_id" => "9999999999999999999999999999999999999999999999999999999999999999" },
45
+ },
46
+ },
47
47
  }
48
48
  end
49
49
 
50
-
51
50
  let(:empty_policy_groups) do
52
51
  {
53
52
  "dev" => {
54
- "uri" => "https://chef.example/organizations/testorg/policy_groups/dev"
53
+ "uri" => "https://chef.example/organizations/testorg/policy_groups/dev",
55
54
  },
56
55
  "preprod" => {
57
- "uri" => "https://chef.example/organizations/testorg/policy_groups/preprod"
58
- }
56
+ "uri" => "https://chef.example/organizations/testorg/policy_groups/preprod",
57
+ },
59
58
  }
60
59
  end
61
60
 
@@ -78,7 +77,6 @@ describe ChefDK::PolicyfileServices::RmPolicyGroup do
78
77
  rm_policy_group_service.undo_stack
79
78
  end
80
79
 
81
-
82
80
  it "configures an HTTP client" do
83
81
  expect(ChefDK::AuthenticatedHTTP).to receive(:new).with("https://localhost:10443",
84
82
  signing_key_filename: "/path/to/client/key.pem",
@@ -133,7 +131,6 @@ describe ChefDK::PolicyfileServices::RmPolicyGroup do
133
131
 
134
132
  end
135
133
 
136
-
137
134
  end
138
135
 
139
136
  context "when the given group doesn't exist" do
@@ -180,21 +177,21 @@ describe ChefDK::PolicyfileServices::RmPolicyGroup do
180
177
  let(:policy_appserver_2) do
181
178
  {
182
179
  "name" => "appserver",
183
- "revision_id" => "2222222222222222222222222222222222222222222222222222222222222222"
180
+ "revision_id" => "2222222222222222222222222222222222222222222222222222222222222222",
184
181
  }
185
182
  end
186
183
 
187
184
  let(:policy_load_balancer_5) do
188
185
  {
189
186
  "name" => "load-balancer",
190
- "revision_id" => "5555555555555555555555555555555555555555555555555555555555555555"
187
+ "revision_id" => "5555555555555555555555555555555555555555555555555555555555555555",
191
188
  }
192
189
  end
193
190
 
194
191
  let(:policy_db_9) do
195
192
  {
196
193
  "name" => "db",
197
- "revision_id" => "9999999999999999999999999999999999999999999999999999999999999999"
194
+ "revision_id" => "9999999999999999999999999999999999999999999999999999999999999999",
198
195
  }
199
196
  end
200
197
 
@@ -227,9 +224,9 @@ describe ChefDK::PolicyfileServices::RmPolicyGroup do
227
224
 
228
225
  expected_policy_revision_undo_data =
229
226
  [
230
- { policy_name: "appserver", policy_group: "preprod", data: policy_appserver_2},
231
- { policy_name: "load-balancer", policy_group: "preprod", data: policy_load_balancer_5},
232
- { policy_name: "db", policy_group: "preprod", data: policy_db_9}
227
+ { policy_name: "appserver", policy_group: "preprod", data: policy_appserver_2 },
228
+ { policy_name: "load-balancer", policy_group: "preprod", data: policy_load_balancer_5 },
229
+ { policy_name: "db", policy_group: "preprod", data: policy_db_9 },
233
230
  ]
234
231
 
235
232
  expect(undo_record.policy_revisions.map(&:to_h)).to match_array(expected_policy_revision_undo_data)
@@ -238,4 +235,3 @@ describe ChefDK::PolicyfileServices::RmPolicyGroup do
238
235
  end
239
236
 
240
237
  end
241
-
@@ -15,8 +15,8 @@
15
15
  # limitations under the License.
16
16
  #
17
17
 
18
- require 'spec_helper'
19
- require 'chef-dk/policyfile_services/rm_policy'
18
+ require "spec_helper"
19
+ require "chef-dk/policyfile_services/rm_policy"
20
20
 
21
21
  describe ChefDK::PolicyfileServices::RmPolicy do
22
22
 
@@ -28,7 +28,7 @@ describe ChefDK::PolicyfileServices::RmPolicy do
28
28
  {
29
29
  "revisions" => {
30
30
  "2222222222222222222222222222222222222222222222222222222222222222" => {},
31
- }
31
+ },
32
32
  }
33
33
  end
34
34
 
@@ -53,7 +53,6 @@ describe ChefDK::PolicyfileServices::RmPolicy do
53
53
  rm_policy_service.undo_stack
54
54
  end
55
55
 
56
-
57
56
  it "configures an HTTP client" do
58
57
  expect(ChefDK::AuthenticatedHTTP).to receive(:new).with("https://localhost:10443",
59
58
  signing_key_filename: "/path/to/client/key.pem",
@@ -96,7 +95,6 @@ describe ChefDK::PolicyfileServices::RmPolicy do
96
95
 
97
96
  end
98
97
 
99
-
100
98
  end
101
99
 
102
100
  context "when the given policy doesn't exist" do
@@ -163,18 +161,18 @@ describe ChefDK::PolicyfileServices::RmPolicy do
163
161
  let(:policy_appserver_2) do
164
162
  {
165
163
  "name" => "appserver",
166
- "revision_id" => "2222222222222222222222222222222222222222222222222222222222222222"
164
+ "revision_id" => "2222222222222222222222222222222222222222222222222222222222222222",
167
165
  }
168
166
  end
169
167
 
170
168
  let(:policy_group_data) do
171
169
  {
172
170
  "dev" => {
173
- "uri" => "https://chef.example/organizations/testorg/policy_groups/dev"
171
+ "uri" => "https://chef.example/organizations/testorg/policy_groups/dev",
174
172
  },
175
173
  "preprod" => {
176
- "uri" => "https://chef.example/organizations/testorg/policy_groups/preprod"
177
- }
174
+ "uri" => "https://chef.example/organizations/testorg/policy_groups/preprod",
175
+ },
178
176
  }
179
177
  end
180
178
 
@@ -218,25 +216,25 @@ describe ChefDK::PolicyfileServices::RmPolicy do
218
216
  "policies" => {
219
217
  "appserver" => { "revision_id" => "2222222222222222222222222222222222222222222222222222222222222222" },
220
218
  "load-balancer" => { "revision_id" => "5555555555555555555555555555555555555555555555555555555555555555" },
221
- "db" => { "revision_id" => "9999999999999999999999999999999999999999999999999999999999999999" }
222
- }
219
+ "db" => { "revision_id" => "9999999999999999999999999999999999999999999999999999999999999999" },
220
+ },
223
221
  },
224
222
  "preprod" => {
225
223
  "uri" => "https://chef.example/organizations/testorg/policy_groups/preprod",
226
224
  "policies" => {
227
225
  "appserver" => { "revision_id" => "2222222222222222222222222222222222222222222222222222222222222222" },
228
226
  "load-balancer" => { "revision_id" => "5555555555555555555555555555555555555555555555555555555555555555" },
229
- "db" => { "revision_id" => "9999999999999999999999999999999999999999999999999999999999999999" }
230
- }
227
+ "db" => { "revision_id" => "9999999999999999999999999999999999999999999999999999999999999999" },
228
+ },
231
229
  },
232
230
  "prod" => {
233
231
  "uri" => "https://chef.example/organizations/testorg/policy_groups/prod",
234
232
  "policies" => {
235
233
  "appserver" => { "revision_id" => "1111111111111111111111111111111111111111111111111111111111111111" },
236
234
  "load-balancer" => { "revision_id" => "5555555555555555555555555555555555555555555555555555555555555555" },
237
- "db" => { "revision_id" => "9999999999999999999999999999999999999999999999999999999999999999" }
238
- }
239
- }
235
+ "db" => { "revision_id" => "9999999999999999999999999999999999999999999999999999999999999999" },
236
+ },
237
+ },
240
238
  }
241
239
  end
242
240
 
@@ -263,4 +261,3 @@ describe ChefDK::PolicyfileServices::RmPolicy do
263
261
  end
264
262
 
265
263
  end
266
-
@@ -15,8 +15,8 @@
15
15
  # limitations under the License.
16
16
  #
17
17
 
18
- require 'spec_helper'
19
- require 'chef-dk/policyfile_services/show_policy'
18
+ require "spec_helper"
19
+ require "chef-dk/policyfile_services/show_policy"
20
20
 
21
21
  describe ChefDK::PolicyfileServices::ShowPolicy do
22
22
 
@@ -116,7 +116,7 @@ describe ChefDK::PolicyfileServices::ShowPolicy do
116
116
  {
117
117
  "appserver" => {
118
118
  "1111111111111111111111111111111111111111111111111111111111111111" => {},
119
- "2222222222222222222222222222222222222222222222222222222222222222" => {}
119
+ "2222222222222222222222222222222222222222222222222222222222222222" => {},
120
120
  },
121
121
  "load-balancer" => {
122
122
  "5555555555555555555555555555555555555555555555555555555555555555" => {},
@@ -124,8 +124,8 @@ describe ChefDK::PolicyfileServices::ShowPolicy do
124
124
  },
125
125
  "db" => {
126
126
  "9999999999999999999999999999999999999999999999999999999999999999" => {},
127
- "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" => {}
128
- }
127
+ "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" => {},
128
+ },
129
129
  }
130
130
  end
131
131
 
@@ -202,7 +202,7 @@ OUTPUT
202
202
  {
203
203
  "dev" => {},
204
204
  "staging" => {},
205
- "prod" => {}
205
+ "prod" => {},
206
206
  }
207
207
  end
208
208
 
@@ -218,7 +218,7 @@ OUTPUT
218
218
  {
219
219
  "appserver" => {
220
220
  "1111111111111111111111111111111111111111111111111111111111111111" => {},
221
- "2222222222222222222222222222222222222222222222222222222222222222" => {}
221
+ "2222222222222222222222222222222222222222222222222222222222222222" => {},
222
222
  },
223
223
  "load-balancer" => {
224
224
  "5555555555555555555555555555555555555555555555555555555555555555" => {},
@@ -226,8 +226,8 @@ OUTPUT
226
226
  },
227
227
  "db" => {
228
228
  "9999999999999999999999999999999999999999999999999999999999999999" => {},
229
- "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" => {}
230
- }
229
+ "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" => {},
230
+ },
231
231
  }
232
232
  end
233
233
 
@@ -236,18 +236,18 @@ OUTPUT
236
236
  "dev" => {
237
237
  "appserver" => "1111111111111111111111111111111111111111111111111111111111111111",
238
238
  "load-balancer" => "5555555555555555555555555555555555555555555555555555555555555555",
239
- "db" => "9999999999999999999999999999999999999999999999999999999999999999"
239
+ "db" => "9999999999999999999999999999999999999999999999999999999999999999",
240
240
  },
241
241
  "staging" => {
242
242
  "appserver" => "2222222222222222222222222222222222222222222222222222222222222222",
243
243
  "load-balancer" => "5555555555555555555555555555555555555555555555555555555555555555",
244
- "db" => "9999999999999999999999999999999999999999999999999999999999999999"
244
+ "db" => "9999999999999999999999999999999999999999999999999999999999999999",
245
245
  },
246
246
  "prod" => {
247
247
  "appserver" => "2222222222222222222222222222222222222222222222222222222222222222",
248
248
  "load-balancer" => "6666666666666666666666666666666666666666666666666666666666666666",
249
- "db" => "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
250
- }
249
+ "db" => "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
250
+ },
251
251
  }
252
252
  end
253
253
 
@@ -286,18 +286,18 @@ OUTPUT
286
286
  "appserver" => {
287
287
  "1111111111111111111111111111111111111111111111111111111111111111" => {},
288
288
  "2222222222222222222222222222222222222222222222222222222222222222" => {},
289
- "3333333333333333333333333333333333333333333333333333333333333333" => {}
289
+ "3333333333333333333333333333333333333333333333333333333333333333" => {},
290
290
  },
291
291
  "load-balancer" => {
292
292
  "5555555555555555555555555555555555555555555555555555555555555555" => {},
293
293
  "6666666666666666666666666666666666666666666666666666666666666666" => {},
294
- "7777777777777777777777777777777777777777777777777777777777777777" => {}
294
+ "7777777777777777777777777777777777777777777777777777777777777777" => {},
295
295
  },
296
296
  "db" => {
297
297
  "9999999999999999999999999999999999999999999999999999999999999999" => {},
298
298
  "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" => {},
299
- "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" => {}
300
- }
299
+ "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb" => {},
300
+ },
301
301
  }
302
302
  end
303
303
 
@@ -306,18 +306,18 @@ OUTPUT
306
306
  "dev" => {
307
307
  "appserver" => "1111111111111111111111111111111111111111111111111111111111111111",
308
308
  "load-balancer" => "5555555555555555555555555555555555555555555555555555555555555555",
309
- "db" => "9999999999999999999999999999999999999999999999999999999999999999"
309
+ "db" => "9999999999999999999999999999999999999999999999999999999999999999",
310
310
  },
311
311
  "staging" => {
312
312
  "appserver" => "2222222222222222222222222222222222222222222222222222222222222222",
313
313
  "load-balancer" => "5555555555555555555555555555555555555555555555555555555555555555",
314
- "db" => "9999999999999999999999999999999999999999999999999999999999999999"
314
+ "db" => "9999999999999999999999999999999999999999999999999999999999999999",
315
315
  },
316
316
  "prod" => {
317
317
  "appserver" => "2222222222222222222222222222222222222222222222222222222222222222",
318
318
  "load-balancer" => "6666666666666666666666666666666666666666666666666666666666666666",
319
- "db" => "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
320
- }
319
+ "db" => "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
320
+ },
321
321
  }
322
322
  end
323
323
 
@@ -402,7 +402,7 @@ OUTPUT
402
402
  {
403
403
  "appserver" => {
404
404
  "1111111111111111111111111111111111111111111111111111111111111111" => {},
405
- "2222222222222222222222222222222222222222222222222222222222222222" => {}
405
+ "2222222222222222222222222222222222222222222222222222222222222222" => {},
406
406
  },
407
407
  "load-balancer" => {
408
408
  "5555555555555555555555555555555555555555555555555555555555555555" => {},
@@ -410,11 +410,11 @@ OUTPUT
410
410
  },
411
411
  "db" => {
412
412
  "9999999999999999999999999999999999999999999999999999999999999999" => {},
413
- "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" => {}
413
+ "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" => {},
414
414
  },
415
415
  "memcache" => {
416
- "dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd" => {}
417
- }
416
+ "dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd" => {},
417
+ },
418
418
  }
419
419
  end
420
420
 
@@ -424,23 +424,22 @@ OUTPUT
424
424
  "appserver" => "1111111111111111111111111111111111111111111111111111111111111111",
425
425
  "load-balancer" => "5555555555555555555555555555555555555555555555555555555555555555",
426
426
  "db" => "9999999999999999999999999999999999999999999999999999999999999999",
427
- "memcache" => "dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd"
427
+ "memcache" => "dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd",
428
428
  },
429
429
  "staging" => {
430
430
  "appserver" => "2222222222222222222222222222222222222222222222222222222222222222",
431
431
  "load-balancer" => "5555555555555555555555555555555555555555555555555555555555555555",
432
432
  "db" => "9999999999999999999999999999999999999999999999999999999999999999",
433
- "memcache" => "dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd"
433
+ "memcache" => "dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd",
434
434
  },
435
435
  "prod" => {
436
436
  "appserver" => "2222222222222222222222222222222222222222222222222222222222222222",
437
437
  "load-balancer" => "6666666666666666666666666666666666666666666666666666666666666666",
438
- "db" => "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
439
- }
438
+ "db" => "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
439
+ },
440
440
  }
441
441
  end
442
442
 
443
-
444
443
  it "shows each policy name, followed by a list of group_name -> revision, omitting groups that don't have that policy" do
445
444
  expected_output = <<-OUTPUT
446
445
  appserver
@@ -532,11 +531,11 @@ OUTPUT
532
531
  },
533
532
  "db" => {
534
533
  "9999999999999999999999999999999999999999999999999999999999999999" => {},
535
- "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" => {}
534
+ "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" => {},
536
535
  },
537
536
  "memcache" => {
538
- "dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd" => {}
539
- }
537
+ "dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd" => {},
538
+ },
540
539
  }
541
540
  end
542
541
 
@@ -545,17 +544,17 @@ OUTPUT
545
544
  "dev" => {
546
545
  "load-balancer" => "5555555555555555555555555555555555555555555555555555555555555555",
547
546
  "db" => "9999999999999999999999999999999999999999999999999999999999999999",
548
- "memcache" => "dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd"
547
+ "memcache" => "dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd",
549
548
  },
550
549
  "staging" => {
551
550
  "load-balancer" => "5555555555555555555555555555555555555555555555555555555555555555",
552
551
  "db" => "9999999999999999999999999999999999999999999999999999999999999999",
553
- "memcache" => "dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd"
552
+ "memcache" => "dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd",
554
553
  },
555
554
  "prod" => {
556
555
  "load-balancer" => "6666666666666666666666666666666666666666666666666666666666666666",
557
- "db" => "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
558
- }
556
+ "db" => "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
557
+ },
559
558
  }
560
559
  end
561
560
 
@@ -579,8 +578,8 @@ OUTPUT
579
578
  "appserver" => {
580
579
  "1111111111111111111111111111111111111111111111111111111111111111" => {},
581
580
  "2222222222222222222222222222222222222222222222222222222222222222" => {},
582
- "3333333333333333333333333333333333333333333333333333333333333333" => {}
583
- }
581
+ "3333333333333333333333333333333333333333333333333333333333333333" => {},
582
+ },
584
583
  }
585
584
 
586
585
  end
@@ -609,8 +608,8 @@ OUTPUT
609
608
  "appserver" => {
610
609
  "1111111111111111111111111111111111111111111111111111111111111111" => {},
611
610
  "2222222222222222222222222222222222222222222222222222222222222222" => {},
612
- "3333333333333333333333333333333333333333333333333333333333333333" => {}
613
- }
611
+ "3333333333333333333333333333333333333333333333333333333333333333" => {},
612
+ },
614
613
  }
615
614
 
616
615
  end
@@ -618,14 +617,14 @@ OUTPUT
618
617
  let(:policies_by_group) do
619
618
  {
620
619
  "dev" => {
621
- "appserver" => "2222222222222222222222222222222222222222222222222222222222222222"
620
+ "appserver" => "2222222222222222222222222222222222222222222222222222222222222222",
622
621
  },
623
622
  "staging" => {
624
- "appserver" => "2222222222222222222222222222222222222222222222222222222222222222"
623
+ "appserver" => "2222222222222222222222222222222222222222222222222222222222222222",
625
624
  },
626
625
  "prod" => {
627
- "appserver" => "2222222222222222222222222222222222222222222222222222222222222222"
628
- }
626
+ "appserver" => "2222222222222222222222222222222222222222222222222222222222222222",
627
+ },
629
628
  }
630
629
  end
631
630
  it "lists each of the groups with the associated revision" do
@@ -650,8 +649,8 @@ OUTPUT
650
649
  "appserver" => {
651
650
  "1111111111111111111111111111111111111111111111111111111111111111" => {},
652
651
  "2222222222222222222222222222222222222222222222222222222222222222" => {},
653
- "3333333333333333333333333333333333333333333333333333333333333333" => {}
654
- }
652
+ "3333333333333333333333333333333333333333333333333333333333333333" => {},
653
+ },
655
654
  }
656
655
 
657
656
  end
@@ -659,14 +658,14 @@ OUTPUT
659
658
  let(:policies_by_group) do
660
659
  {
661
660
  "dev" => {
662
- "appserver" => "2222222222222222222222222222222222222222222222222222222222222222"
661
+ "appserver" => "2222222222222222222222222222222222222222222222222222222222222222",
663
662
  },
664
663
  "staging" => {
665
- "appserver" => "2222222222222222222222222222222222222222222222222222222222222222"
664
+ "appserver" => "2222222222222222222222222222222222222222222222222222222222222222",
666
665
  },
667
666
  "prod" => {
668
- "appserver" => "1111111111111111111111111111111111111111111111111111111111111111"
669
- }
667
+ "appserver" => "1111111111111111111111111111111111111111111111111111111111111111",
668
+ },
670
669
  }
671
670
  end
672
671
 
@@ -690,18 +689,18 @@ OUTPUT
690
689
  "cookbook_locks" => {
691
690
  "apache2" => {
692
691
  "version" => "2.1.3",
693
- "identifier" => "abcdef" + ("0" * 34)
692
+ "identifier" => "abcdef" + ("0" * 34),
694
693
  },
695
694
  "yum" => {
696
695
  "version" => "4.5.6",
697
- "identifier" => "123abc" + ("0" * 34)
696
+ "identifier" => "123abc" + ("0" * 34),
698
697
  },
699
698
  "apt" => {
700
699
  "version" => "10.0.0",
701
- "identifier" => "ffffff" + ("0" * 34)
702
- }
700
+ "identifier" => "ffffff" + ("0" * 34),
701
+ },
703
702
 
704
- }
703
+ },
705
704
  }
706
705
  end
707
706
 
@@ -710,21 +709,21 @@ OUTPUT
710
709
  "cookbook_locks" => {
711
710
  "apache2" => {
712
711
  "version" => "2.0.5",
713
- "identifier" => "aaa123" + ("0" * 34)
712
+ "identifier" => "aaa123" + ("0" * 34),
714
713
  },
715
714
  "yum" => {
716
715
  "version" => "4.5.2",
717
- "identifier" => "867530" + ("9" * 34)
716
+ "identifier" => "867530" + ("9" * 34),
718
717
  },
719
718
  "apt" => {
720
719
  "version" => "10.0.0",
721
- "identifier" => "ffffff" + ("0" * 34)
720
+ "identifier" => "ffffff" + ("0" * 34),
722
721
  },
723
722
  "other_cookbook" => {
724
723
  "version" => "9.8.7",
725
- "identifier" => "113113" + ("0" * 34)
726
- }
727
- }
724
+ "identifier" => "113113" + ("0" * 34),
725
+ },
726
+ },
728
727
  }
729
728
  end
730
729
 
@@ -733,7 +732,7 @@ OUTPUT
733
732
  "appserver" => {
734
733
  "1111111111111111111111111111111111111111111111111111111111111111" => appserver_lock_contents_111,
735
734
  "2222222222222222222222222222222222222222222222222222222222222222" => appserver_lock_contents_222,
736
- }
735
+ },
737
736
  }
738
737
  end
739
738
 
@@ -847,22 +846,22 @@ OUTPUT
847
846
  let(:policyfile_lock_data) do
848
847
  {
849
848
  "revision_id" => "cf5b8a020bdc1ba6914093a8a07a5514cce8a3a2979a967b1f32ea704a61785b",
850
- "name"=> "example",
851
- "run_list"=> [ "recipe[omnibus::default]" ],
852
- "cookbook_locks"=> {
853
- "omnibus"=> {
854
- "version"=> "2.2.0",
855
- "identifier"=> "64b3e64306cff223206348e46af545b19032b170",
856
- "dotted_decimal_identifier"=> "28345299219435506.9887234981653237.76628930769264",
857
- "cache_key"=> "omnibus-2cf98f9797cacce9c8688fc4e74858b858e2bc14",
858
- "origin"=> "git@github.com:opscode-cookbooks/omnibus.git",
859
- "source_options"=> {
860
- "git"=> "git@github.com:opscode-cookbooks/omnibus.git",
861
- "revision"=> "2cf98f9797cacce9c8688fc4e74858b858e2bc14",
862
- "branch"=> "master"
863
- }
864
- }
865
- }
849
+ "name" => "example",
850
+ "run_list" => [ "recipe[omnibus::default]" ],
851
+ "cookbook_locks" => {
852
+ "omnibus" => {
853
+ "version" => "2.2.0",
854
+ "identifier" => "64b3e64306cff223206348e46af545b19032b170",
855
+ "dotted_decimal_identifier" => "28345299219435506.9887234981653237.76628930769264",
856
+ "cache_key" => "omnibus-2cf98f9797cacce9c8688fc4e74858b858e2bc14",
857
+ "origin" => "git@github.com:opscode-cookbooks/omnibus.git",
858
+ "source_options" => {
859
+ "git" => "git@github.com:opscode-cookbooks/omnibus.git",
860
+ "revision" => "2cf98f9797cacce9c8688fc4e74858b858e2bc14",
861
+ "branch" => "master",
862
+ },
863
+ },
864
+ },
866
865
  }
867
866
  end
868
867
 
@@ -886,4 +885,3 @@ OUTPUT
886
885
  end
887
886
 
888
887
  end
889
-