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
@@ -188,9 +188,9 @@ describe ChefDK::Command::ShowPolicy do
188
188
  it "prints a debugging message and exits non-zero" do
189
189
  expect(command.run([])).to eq(1)
190
190
 
191
- expected_output = <<-E
192
- Error: Failed to list policies
193
- Reason: (StandardError) some operation failed
191
+ expected_output = <<~E
192
+ Error: Failed to list policies
193
+ Reason: (StandardError) some operation failed
194
194
 
195
195
  E
196
196
 
@@ -203,9 +203,9 @@ E
203
203
 
204
204
  command.run(%w{ -D })
205
205
 
206
- expected_output = <<-E
207
- Error: Failed to list policies
208
- Reason: (StandardError) some operation failed
206
+ expected_output = <<~E
207
+ Error: Failed to list policies
208
+ Reason: (StandardError) some operation failed
209
209
 
210
210
 
211
211
  E
@@ -196,9 +196,9 @@ describe ChefDK::Command::Undelete do
196
196
  it "prints a debugging message and exits non-zero" do
197
197
  expect(command.run(params)).to eq(1)
198
198
 
199
- expected_output = <<-E
200
- Error: Failed to undelete.
201
- Reason: (StandardError) some operation failed
199
+ expected_output = <<~E
200
+ Error: Failed to undelete.
201
+ Reason: (StandardError) some operation failed
202
202
 
203
203
  E
204
204
 
@@ -211,9 +211,9 @@ E
211
211
 
212
212
  command.run(params + %w{ -D })
213
213
 
214
- expected_output = <<-E
215
- Error: Failed to undelete.
216
- Reason: (StandardError) some operation failed
214
+ expected_output = <<~E
215
+ Error: Failed to undelete.
216
+ Reason: (StandardError) some operation failed
217
217
 
218
218
 
219
219
  E
@@ -63,9 +63,9 @@ describe ChefDK::Command::Update do
63
63
  end
64
64
 
65
65
  it "loads the config from the given path" do
66
- expect(Chef::WorkstationConfigLoader).to receive(:new).
67
- with("~/.chef/alternate_config.rb").
68
- and_return(chef_config_loader)
66
+ expect(Chef::WorkstationConfigLoader).to receive(:new)
67
+ .with("~/.chef/alternate_config.rb")
68
+ .and_return(chef_config_loader)
69
69
  expect(chef_config_loader).to receive(:load)
70
70
  expect(command.chef_config).to eq(Chef::Config)
71
71
  end
@@ -81,9 +81,9 @@ describe ChefDK::Command::Update do
81
81
  end
82
82
 
83
83
  it "creates an attributes update service object" do
84
- expect(ChefDK::PolicyfileServices::UpdateAttributes).to receive(:new).
85
- with(policyfile: nil, ui: command.ui, root_dir: Dir.pwd, chef_config: anything).
86
- and_return(update_attrs_service)
84
+ expect(ChefDK::PolicyfileServices::UpdateAttributes).to receive(:new)
85
+ .with(policyfile: nil, ui: command.ui, root_dir: Dir.pwd, chef_config: anything)
86
+ .and_return(update_attrs_service)
87
87
  expect(command.attributes_updater).to eq(update_attrs_service)
88
88
  end
89
89
  end
@@ -95,9 +95,9 @@ describe ChefDK::Command::Update do
95
95
  end
96
96
 
97
97
  it "creates the installer service with a `nil` policyfile path" do
98
- expect(ChefDK::PolicyfileServices::Install).to receive(:new).
99
- with(policyfile: nil, ui: command.ui, root_dir: Dir.pwd, config: Chef::Config, overwrite: true).
100
- and_return(install_service)
98
+ expect(ChefDK::PolicyfileServices::Install).to receive(:new)
99
+ .with(policyfile: nil, ui: command.ui, root_dir: Dir.pwd, config: Chef::Config, overwrite: true)
100
+ .and_return(install_service)
101
101
  expect(command.installer).to eq(install_service)
102
102
  end
103
103
 
@@ -112,9 +112,9 @@ describe ChefDK::Command::Update do
112
112
  end
113
113
 
114
114
  it "creates the installer service with the specified policyfile path" do
115
- expect(ChefDK::PolicyfileServices::Install).to receive(:new).
116
- with(policyfile: "MyPolicy.rb", ui: command.ui, root_dir: Dir.pwd, config: Chef::Config, overwrite: true).
117
- and_return(install_service)
115
+ expect(ChefDK::PolicyfileServices::Install).to receive(:new)
116
+ .with(policyfile: "MyPolicy.rb", ui: command.ui, root_dir: Dir.pwd, config: Chef::Config, overwrite: true)
117
+ .and_return(install_service)
118
118
  expect(command.installer).to eq(install_service)
119
119
  end
120
120
 
@@ -132,9 +132,9 @@ describe ChefDK::Command::Update do
132
132
  context "when the command is successful" do
133
133
  before do
134
134
  expect(install_service).to receive(:run)
135
- expect(ChefDK::PolicyfileServices::UpdateAttributes).to receive(:new).
136
- with(policyfile: nil, ui: command.ui, root_dir: Dir.pwd, chef_config: anything).
137
- and_return(update_attrs_service)
135
+ expect(ChefDK::PolicyfileServices::UpdateAttributes).to receive(:new)
136
+ .with(policyfile: nil, ui: command.ui, root_dir: Dir.pwd, chef_config: anything)
137
+ .and_return(update_attrs_service)
138
138
  expect(update_attrs_service).to receive(:run)
139
139
  end
140
140
 
@@ -159,9 +159,9 @@ describe ChefDK::Command::Update do
159
159
 
160
160
  before do
161
161
  expect(install_service).to receive(:run).and_raise(exception)
162
- expect(ChefDK::PolicyfileServices::UpdateAttributes).to receive(:new).
163
- with(policyfile: nil, ui: command.ui, root_dir: Dir.pwd, chef_config: anything).
164
- and_return(update_attrs_service)
162
+ expect(ChefDK::PolicyfileServices::UpdateAttributes).to receive(:new)
163
+ .with(policyfile: nil, ui: command.ui, root_dir: Dir.pwd, chef_config: anything)
164
+ .and_return(update_attrs_service)
165
165
  expect(update_attrs_service).to receive(:run)
166
166
  end
167
167
 
@@ -170,9 +170,9 @@ describe ChefDK::Command::Update do
170
170
  end
171
171
 
172
172
  it "displays the exception and cause" do
173
- expected_error_text = <<-E
174
- Error: install failed
175
- Reason: (StandardError) some operation failed
173
+ expected_error_text = <<~E
174
+ Error: install failed
175
+ Reason: (StandardError) some operation failed
176
176
 
177
177
  E
178
178
 
@@ -185,9 +185,9 @@ E
185
185
  let(:params) { ["-D"] }
186
186
 
187
187
  it "displays the exception and cause with backtrace" do
188
- expected_error_text = <<-E
189
- Error: install failed
190
- Reason: (StandardError) some operation failed
188
+ expected_error_text = <<~E
189
+ Error: install failed
190
+ Reason: (StandardError) some operation failed
191
191
 
192
192
 
193
193
  E
@@ -248,9 +248,9 @@ E
248
248
  end
249
249
 
250
250
  it "displays the exception and cause" do
251
- expected_error_text = <<-E
252
- Error: Failed to update Policyfile lock
253
- Reason: (StandardError) some operation failed
251
+ expected_error_text = <<~E
252
+ Error: Failed to update Policyfile lock
253
+ Reason: (StandardError) some operation failed
254
254
 
255
255
  E
256
256
 
@@ -263,9 +263,9 @@ E
263
263
  let(:params) { ["-a", "-D"] }
264
264
 
265
265
  it "displays the exception and cause with backtrace" do
266
- expected_error_text = <<-E
267
- Error: Failed to update Policyfile lock
268
- Reason: (StandardError) some operation failed
266
+ expected_error_text = <<~E
267
+ Error: Failed to update Policyfile lock
268
+ Reason: (StandardError) some operation failed
269
269
 
270
270
 
271
271
  E
@@ -17,7 +17,7 @@ module ChefDK
17
17
  end
18
18
 
19
19
  def run(params)
20
- self.class.test_result = { :status => :success, :params => params }
20
+ self.class.test_result = { status: :success, params: params }
21
21
  23
22
22
  end
23
23
 
@@ -23,42 +23,42 @@ describe ChefDK::Policyfile::ChefServerLockFetcher do
23
23
  let(:revision_id) { "6fe753184c8946052d3231bb4212116df28d89a3a5f7ae52832ad408419dd5eb" }
24
24
  let(:identifier) { "fab501cfaf747901bd82c1bc706beae7dc3a350c" }
25
25
  let(:minimal_lockfile_json) do
26
- <<-E
27
- {
28
- "revision_id": "#{revision_id}",
29
- "name": "install-example",
30
- "run_list": [
31
- "recipe[local-cookbook::default]"
32
- ],
33
- "cookbook_locks": {
34
- "local-cookbook": {
35
- "version": "2.3.4",
36
- "identifier": "#{identifier}",
37
- "dotted_decimal_identifier": "70567763561641081.489844270461035.258281553147148",
38
- "source": "cookbooks/local-cookbook",
39
- "cache_key": null,
40
- "scm_info": null,
41
- "source_options": {
42
- "path": "cookbooks/local-cookbook"
26
+ <<~E
27
+ {
28
+ "revision_id": "#{revision_id}",
29
+ "name": "install-example",
30
+ "run_list": [
31
+ "recipe[local-cookbook::default]"
32
+ ],
33
+ "cookbook_locks": {
34
+ "local-cookbook": {
35
+ "version": "2.3.4",
36
+ "identifier": "#{identifier}",
37
+ "dotted_decimal_identifier": "70567763561641081.489844270461035.258281553147148",
38
+ "source": "cookbooks/local-cookbook",
39
+ "cache_key": null,
40
+ "scm_info": null,
41
+ "source_options": {
42
+ "path": "cookbooks/local-cookbook"
43
+ }
44
+ }
45
+ },
46
+ "default_attributes": {},
47
+ "override_attributes": {},
48
+ "solution_dependencies": {
49
+ "Policyfile": [
50
+ [
51
+ "local-cookbook",
52
+ ">= 0.0.0"
53
+ ]
54
+ ],
55
+ "dependencies": {
56
+ "local-cookbook (2.3.4)": [
57
+
58
+ ]
59
+ }
60
+ }
43
61
  }
44
- }
45
- },
46
- "default_attributes": {},
47
- "override_attributes": {},
48
- "solution_dependencies": {
49
- "Policyfile": [
50
- [
51
- "local-cookbook",
52
- ">= 0.0.0"
53
- ]
54
- ],
55
- "dependencies": {
56
- "local-cookbook (2.3.4)": [
57
-
58
- ]
59
- }
60
- }
61
- }
62
62
  E
63
63
  end
64
64
 
@@ -104,8 +104,8 @@ E
104
104
  end
105
105
 
106
106
  it "calls the chef server to get the policy" do
107
- expect(http_client).to receive(:get).with("policies/#{policy_name}/revisions/#{policy_revision_id}").
108
- and_return(minimal_lockfile)
107
+ expect(http_client).to receive(:get).with("policies/#{policy_name}/revisions/#{policy_revision_id}")
108
+ .and_return(minimal_lockfile)
109
109
  expect(fetcher.lock_data).to eq(minimal_lockfile_modified)
110
110
  end
111
111
 
@@ -118,8 +118,8 @@ E
118
118
  end
119
119
 
120
120
  it "calls the chef server to get the policy with the dsl name" do
121
- expect(http_client).to receive(:get).with("policies/#{policy_name}/revisions/#{policy_revision_id}").
122
- and_return(minimal_lockfile)
121
+ expect(http_client).to receive(:get).with("policies/#{policy_name}/revisions/#{policy_revision_id}")
122
+ .and_return(minimal_lockfile)
123
123
  expect(fetcher.lock_data).to eq(minimal_lockfile_modified)
124
124
  end
125
125
  end
@@ -139,8 +139,8 @@ E
139
139
  end
140
140
 
141
141
  it "calls the chef server to get the policy" do
142
- expect(http_client).to receive(:get).with("policy_groups/#{policy_group}/policies/#{policy_name}").
143
- and_return(minimal_lockfile)
142
+ expect(http_client).to receive(:get).with("policy_groups/#{policy_group}/policies/#{policy_name}")
143
+ .and_return(minimal_lockfile)
144
144
  expect(fetcher.lock_data).to eq(minimal_lockfile_modified)
145
145
  end
146
146
 
@@ -21,42 +21,42 @@ require "chef-dk/policyfile/comparison_base"
21
21
  describe "Policyfile Comparison Bases" do
22
22
 
23
23
  let(:minimal_lockfile_json) do
24
- <<-E
25
- {
26
- "revision_id": "6fe753184c8946052d3231bb4212116df28d89a3a5f7ae52832ad408419dd5eb",
27
- "name": "install-example",
28
- "run_list": [
29
- "recipe[local-cookbook::default]"
30
- ],
31
- "cookbook_locks": {
32
- "local-cookbook": {
33
- "version": "2.3.4",
34
- "identifier": "fab501cfaf747901bd82c1bc706beae7dc3a350c",
35
- "dotted_decimal_identifier": "70567763561641081.489844270461035.258281553147148",
36
- "source": "cookbooks/local-cookbook",
37
- "cache_key": null,
38
- "scm_info": null,
39
- "source_options": {
40
- "path": "cookbooks/local-cookbook"
24
+ <<~E
25
+ {
26
+ "revision_id": "6fe753184c8946052d3231bb4212116df28d89a3a5f7ae52832ad408419dd5eb",
27
+ "name": "install-example",
28
+ "run_list": [
29
+ "recipe[local-cookbook::default]"
30
+ ],
31
+ "cookbook_locks": {
32
+ "local-cookbook": {
33
+ "version": "2.3.4",
34
+ "identifier": "fab501cfaf747901bd82c1bc706beae7dc3a350c",
35
+ "dotted_decimal_identifier": "70567763561641081.489844270461035.258281553147148",
36
+ "source": "cookbooks/local-cookbook",
37
+ "cache_key": null,
38
+ "scm_info": null,
39
+ "source_options": {
40
+ "path": "cookbooks/local-cookbook"
41
+ }
42
+ }
43
+ },
44
+ "default_attributes": {},
45
+ "override_attributes": {},
46
+ "solution_dependencies": {
47
+ "Policyfile": [
48
+ [
49
+ "local-cookbook",
50
+ ">= 0.0.0"
51
+ ]
52
+ ],
53
+ "dependencies": {
54
+ "local-cookbook (2.3.4)": [
55
+
56
+ ]
57
+ }
58
+ }
41
59
  }
42
- }
43
- },
44
- "default_attributes": {},
45
- "override_attributes": {},
46
- "solution_dependencies": {
47
- "Policyfile": [
48
- [
49
- "local-cookbook",
50
- ">= 0.0.0"
51
- ]
52
- ],
53
- "dependencies": {
54
- "local-cookbook (2.3.4)": [
55
-
56
- ]
57
- }
58
- }
59
- }
60
60
  E
61
61
  end
62
62
 
@@ -325,9 +325,9 @@ E
325
325
  context "when the policyfile lock is fetched from the server" do
326
326
 
327
327
  before do
328
- expect(http_client).to receive(:get).
329
- with("policy_groups/acceptance/policies/chatserver").
330
- and_return(minimal_lockfile)
328
+ expect(http_client).to receive(:get)
329
+ .with("policy_groups/acceptance/policies/chatserver")
330
+ .and_return(minimal_lockfile)
331
331
  end
332
332
 
333
333
  it "returns the policyfile lock data" do
@@ -74,7 +74,7 @@ shared_examples_for "Cookbook Lock" do
74
74
  cookbook_lock.identifier = "my-opaque-id"
75
75
  cookbook_lock.dotted_decimal_identifier = "123.456.789"
76
76
  cookbook_lock.version = "1.2.3"
77
- cookbook_lock.source_options = { :sourcekey => "location info" }
77
+ cookbook_lock.source_options = { sourcekey: "location info" }
78
78
  end
79
79
 
80
80
  it "includes the identifier in the lock data" do
@@ -90,7 +90,7 @@ shared_examples_for "Cookbook Lock" do
90
90
  end
91
91
 
92
92
  it "includes the source_options in lock data" do
93
- expect(cookbook_lock_data["source_options"]).to eq({ :sourcekey => "location info" })
93
+ expect(cookbook_lock_data["source_options"]).to eq({ sourcekey: "location info" })
94
94
  end
95
95
 
96
96
  it "creates a CookbookLocationSpecification with the source and version data" do
@@ -449,7 +449,7 @@ describe ChefDK::Policyfile::ArchivedCookbook do
449
449
  # when getting the cookbook location spec, source options needs to have
450
450
  # symbolic keys, so a round trip via LocalCookbook#build_from_lock_data
451
451
  # will result in this being a symbol
452
- :path => "../my_repo/nginx",
452
+ path: "../my_repo/nginx",
453
453
  },
454
454
  "cache_key" => nil,
455
455
  "scm_info" => {},
@@ -21,215 +21,215 @@ require "chef-dk/policyfile/differ"
21
21
  describe ChefDK::Policyfile::Differ do
22
22
 
23
23
  let(:old_lock_json) do
24
- <<-E
25
- {
26
- "revision_id": "cf4b8a020bdc1ba6914093a8a07a5514cce8a3a2979a967b1f32ea704a61785b",
27
- "name": "jenkins",
28
- "run_list": [
29
- "recipe[java::default]",
30
- "recipe[jenkins::master]",
31
- "recipe[policyfile_demo::whatever]",
32
- "recipe[policyfile_demo::default]"
33
- ],
34
- "named_run_lists": {
35
- "update_jenkins": [
36
- "recipe[jenkins::master]",
37
- "recipe[policyfile_demo::default]"
38
- ]
39
- },
40
- "cookbook_locks": {
41
- "policyfile_demo": {
42
- "version": "0.1.0",
43
- "identifier": "ea96c99da079db9ff3cb22601638fabd5df49599",
44
- "dotted_decimal_identifier": "66030937227426267.45022575077627448.275691232073113",
45
- "source": "cookbooks/policyfile_demo",
46
- "cache_key": null,
47
- "scm_info": {
48
- "scm": "git",
49
- "remote": "git@github.com:danielsdeleo/policyfile-jenkins-demo.git",
50
- "revision": "6f92fe8f24fd953a1c40ebb1d7cdb2a4fbbf4d4d",
51
- "working_tree_clean": false,
52
- "published": true,
53
- "synchronized_remote_branches": [
54
- "mine/master"
55
- ]
56
- },
57
- "source_options": {
58
- "path": "cookbooks/policyfile_demo"
59
- }
60
- },
61
- "apt": {
62
- "version": "2.7.0",
63
- "identifier": "16c57abbd056543f7d5a15dabbb03261024a9c5e",
64
- "dotted_decimal_identifier": "6409580415309396.17870749399956400.55392231660638",
65
- "cache_key": "apt-2.7.0-supermarket.chef.io",
66
- "origin": "https://supermarket.chef.io/api/v1/cookbooks/apt/versions/2.7.0/download",
67
- "source_options": {
68
- "artifactserver": "https://supermarket.chef.io/api/v1/cookbooks/apt/versions/2.7.0/download",
69
- "version": "2.7.0"
70
- }
71
- },
72
- "java": {
73
- "version": "1.31.0",
74
- "identifier": "9178a38ad3e3baa55b49c1b8d9f4bf6a43dbc358",
75
- "dotted_decimal_identifier": "40946515427189690.46543743498115572.210463125914456",
76
- "cache_key": "java-1.31.0-supermarket.chef.io",
77
- "origin": "https://supermarket.chef.io/api/v1/cookbooks/java/versions/1.31.0/download",
78
- "source_options": {
79
- "artifactserver": "https://supermarket.chef.io/api/v1/cookbooks/java/versions/1.31.0/download",
80
- "version": "1.31.0"
81
- }
82
- },
83
- "jenkins": {
84
- "version": "2.2.2",
85
- "identifier": "0be380429add00d189b4431059ac967a60052323",
86
- "dotted_decimal_identifier": "3346364756581632.58979677444790700.165452341125923",
87
- "cache_key": "jenkins-2.2.2-supermarket.chef.io",
88
- "origin": "https://supermarket.chef.io/api/v1/cookbooks/jenkins/versions/2.2.2/download",
89
- "source_options": {
90
- "artifactserver": "https://supermarket.chef.io/api/v1/cookbooks/jenkins/versions/2.2.2/download",
91
- "version": "2.2.2"
92
- }
93
- },
94
- "runit": {
95
- "version": "1.5.18",
96
- "identifier": "1a0aeb2c167a24e0c5120ca7b06ba8c4cff4610c",
97
- "dotted_decimal_identifier": "7330354567739940.63267076095586411.185563255955724",
98
- "cache_key": "runit-1.5.18-supermarket.chef.io",
99
- "origin": "https://supermarket.chef.io/api/v1/cookbooks/runit/versions/1.5.18/download",
100
- "source_options": {
101
- "artifactserver": "https://supermarket.chef.io/api/v1/cookbooks/runit/versions/1.5.18/download",
102
- "version": "1.5.18"
103
- }
104
- },
105
- "build-essential": {
106
- "version": "2.2.2",
107
- "identifier": "d8ce58401d154378599b0fead81d2c390615602b",
108
- "dotted_decimal_identifier": "61025473397593411.33875519727130653.48623426822187",
109
- "cache_key": "build-essential-2.2.2-supermarket.chef.io",
110
- "origin": "https://supermarket.chef.io/api/v1/cookbooks/build-essential/versions/2.2.2/download",
111
- "source_options": {
112
- "artifactserver": "https://supermarket.chef.io/api/v1/cookbooks/build-essential/versions/2.2.2/download",
113
- "version": "2.2.2"
114
- }
115
- },
116
- "yum": {
117
- "version": "3.5.4",
118
- "identifier": "f9c778c3cd3908071e0c55722682f96e653b5642",
119
- "dotted_decimal_identifier": "70306590695962888.2003363158959746.274252540106306",
120
- "cache_key": "yum-3.5.4-supermarket.chef.io",
121
- "origin": "https://supermarket.chef.io/api/v1/cookbooks/yum/versions/3.5.4/download",
122
- "source_options": {
123
- "artifactserver": "https://supermarket.chef.io/api/v1/cookbooks/yum/versions/3.5.4/download",
124
- "version": "3.5.4"
125
- }
126
- },
127
- "yum-epel": {
128
- "version": "0.6.0",
129
- "identifier": "cd74f541ba0341abcc168c74471c349ca68f77b7",
130
- "dotted_decimal_identifier": "57830966944203585.48356618235299612.57847413962679",
131
- "cache_key": "yum-epel-0.6.0-supermarket.chef.io",
132
- "origin": "https://supermarket.chef.io/api/v1/cookbooks/yum-epel/versions/0.6.0/download",
133
- "source_options": {
134
- "artifactserver": "https://supermarket.chef.io/api/v1/cookbooks/yum-epel/versions/0.6.0/download",
135
- "version": "0.6.0"
136
- }
137
- }
138
- },
139
- "default_attributes": {
140
- "greeting": "Attributes, f*** yeah"
141
- },
142
- "override_attributes": {
143
- "attr_only_updating": "use -a"
144
- },
145
- "solution_dependencies": {
146
- "Policyfile": [
147
- [
148
- "policyfile_demo",
149
- ">= 0.0.0"
150
- ],
151
- [
152
- "apt",
153
- "= 2.7.0"
154
- ],
155
- [
156
- "java",
157
- "= 1.31.0"
158
- ],
159
- [
160
- "jenkins",
161
- "= 2.2.2"
162
- ],
163
- [
164
- "runit",
165
- "= 1.5.18"
166
- ],
167
- [
168
- "build-essential",
169
- "= 2.2.2"
170
- ],
171
- [
172
- "yum",
173
- "= 3.5.4"
174
- ],
175
- [
176
- "yum-epel",
177
- "= 0.6.0"
178
- ]
179
- ],
180
- "dependencies": {
181
- "apt (2.7.0)": [
182
-
183
- ],
184
- "java (1.31.0)": [
185
-
186
- ],
187
- "jenkins (2.2.2)": [
188
- [
189
- "apt",
190
- "~> 2.0"
191
- ],
192
- [
193
- "runit",
194
- "~> 1.5"
195
- ],
196
- [
197
- "yum",
198
- "~> 3.0"
199
- ]
200
- ],
201
- "runit (1.5.18)": [
202
- [
203
- "build-essential",
204
- ">= 0.0.0"
205
- ],
206
- [
207
- "yum",
208
- "~> 3.0"
24
+ <<~E
25
+ {
26
+ "revision_id": "cf4b8a020bdc1ba6914093a8a07a5514cce8a3a2979a967b1f32ea704a61785b",
27
+ "name": "jenkins",
28
+ "run_list": [
29
+ "recipe[java::default]",
30
+ "recipe[jenkins::master]",
31
+ "recipe[policyfile_demo::whatever]",
32
+ "recipe[policyfile_demo::default]"
209
33
  ],
210
- [
211
- "yum-epel",
212
- ">= 0.0.0"
213
- ]
214
- ],
215
- "build-essential (2.2.2)": [
216
-
217
- ],
218
- "yum (3.5.4)": [
219
-
220
- ],
221
- "yum-epel (0.6.0)": [
222
- [
223
- "yum",
224
- "~> 3.0"
225
- ]
226
- ],
227
- "policyfile_demo (0.1.0)": [
228
-
229
- ]
230
- }
231
- }
232
- }
34
+ "named_run_lists": {
35
+ "update_jenkins": [
36
+ "recipe[jenkins::master]",
37
+ "recipe[policyfile_demo::default]"
38
+ ]
39
+ },
40
+ "cookbook_locks": {
41
+ "policyfile_demo": {
42
+ "version": "0.1.0",
43
+ "identifier": "ea96c99da079db9ff3cb22601638fabd5df49599",
44
+ "dotted_decimal_identifier": "66030937227426267.45022575077627448.275691232073113",
45
+ "source": "cookbooks/policyfile_demo",
46
+ "cache_key": null,
47
+ "scm_info": {
48
+ "scm": "git",
49
+ "remote": "git@github.com:danielsdeleo/policyfile-jenkins-demo.git",
50
+ "revision": "6f92fe8f24fd953a1c40ebb1d7cdb2a4fbbf4d4d",
51
+ "working_tree_clean": false,
52
+ "published": true,
53
+ "synchronized_remote_branches": [
54
+ "mine/master"
55
+ ]
56
+ },
57
+ "source_options": {
58
+ "path": "cookbooks/policyfile_demo"
59
+ }
60
+ },
61
+ "apt": {
62
+ "version": "2.7.0",
63
+ "identifier": "16c57abbd056543f7d5a15dabbb03261024a9c5e",
64
+ "dotted_decimal_identifier": "6409580415309396.17870749399956400.55392231660638",
65
+ "cache_key": "apt-2.7.0-supermarket.chef.io",
66
+ "origin": "https://supermarket.chef.io/api/v1/cookbooks/apt/versions/2.7.0/download",
67
+ "source_options": {
68
+ "artifactserver": "https://supermarket.chef.io/api/v1/cookbooks/apt/versions/2.7.0/download",
69
+ "version": "2.7.0"
70
+ }
71
+ },
72
+ "java": {
73
+ "version": "1.31.0",
74
+ "identifier": "9178a38ad3e3baa55b49c1b8d9f4bf6a43dbc358",
75
+ "dotted_decimal_identifier": "40946515427189690.46543743498115572.210463125914456",
76
+ "cache_key": "java-1.31.0-supermarket.chef.io",
77
+ "origin": "https://supermarket.chef.io/api/v1/cookbooks/java/versions/1.31.0/download",
78
+ "source_options": {
79
+ "artifactserver": "https://supermarket.chef.io/api/v1/cookbooks/java/versions/1.31.0/download",
80
+ "version": "1.31.0"
81
+ }
82
+ },
83
+ "jenkins": {
84
+ "version": "2.2.2",
85
+ "identifier": "0be380429add00d189b4431059ac967a60052323",
86
+ "dotted_decimal_identifier": "3346364756581632.58979677444790700.165452341125923",
87
+ "cache_key": "jenkins-2.2.2-supermarket.chef.io",
88
+ "origin": "https://supermarket.chef.io/api/v1/cookbooks/jenkins/versions/2.2.2/download",
89
+ "source_options": {
90
+ "artifactserver": "https://supermarket.chef.io/api/v1/cookbooks/jenkins/versions/2.2.2/download",
91
+ "version": "2.2.2"
92
+ }
93
+ },
94
+ "runit": {
95
+ "version": "1.5.18",
96
+ "identifier": "1a0aeb2c167a24e0c5120ca7b06ba8c4cff4610c",
97
+ "dotted_decimal_identifier": "7330354567739940.63267076095586411.185563255955724",
98
+ "cache_key": "runit-1.5.18-supermarket.chef.io",
99
+ "origin": "https://supermarket.chef.io/api/v1/cookbooks/runit/versions/1.5.18/download",
100
+ "source_options": {
101
+ "artifactserver": "https://supermarket.chef.io/api/v1/cookbooks/runit/versions/1.5.18/download",
102
+ "version": "1.5.18"
103
+ }
104
+ },
105
+ "build-essential": {
106
+ "version": "2.2.2",
107
+ "identifier": "d8ce58401d154378599b0fead81d2c390615602b",
108
+ "dotted_decimal_identifier": "61025473397593411.33875519727130653.48623426822187",
109
+ "cache_key": "build-essential-2.2.2-supermarket.chef.io",
110
+ "origin": "https://supermarket.chef.io/api/v1/cookbooks/build-essential/versions/2.2.2/download",
111
+ "source_options": {
112
+ "artifactserver": "https://supermarket.chef.io/api/v1/cookbooks/build-essential/versions/2.2.2/download",
113
+ "version": "2.2.2"
114
+ }
115
+ },
116
+ "yum": {
117
+ "version": "3.5.4",
118
+ "identifier": "f9c778c3cd3908071e0c55722682f96e653b5642",
119
+ "dotted_decimal_identifier": "70306590695962888.2003363158959746.274252540106306",
120
+ "cache_key": "yum-3.5.4-supermarket.chef.io",
121
+ "origin": "https://supermarket.chef.io/api/v1/cookbooks/yum/versions/3.5.4/download",
122
+ "source_options": {
123
+ "artifactserver": "https://supermarket.chef.io/api/v1/cookbooks/yum/versions/3.5.4/download",
124
+ "version": "3.5.4"
125
+ }
126
+ },
127
+ "yum-epel": {
128
+ "version": "0.6.0",
129
+ "identifier": "cd74f541ba0341abcc168c74471c349ca68f77b7",
130
+ "dotted_decimal_identifier": "57830966944203585.48356618235299612.57847413962679",
131
+ "cache_key": "yum-epel-0.6.0-supermarket.chef.io",
132
+ "origin": "https://supermarket.chef.io/api/v1/cookbooks/yum-epel/versions/0.6.0/download",
133
+ "source_options": {
134
+ "artifactserver": "https://supermarket.chef.io/api/v1/cookbooks/yum-epel/versions/0.6.0/download",
135
+ "version": "0.6.0"
136
+ }
137
+ }
138
+ },
139
+ "default_attributes": {
140
+ "greeting": "Attributes, f*** yeah"
141
+ },
142
+ "override_attributes": {
143
+ "attr_only_updating": "use -a"
144
+ },
145
+ "solution_dependencies": {
146
+ "Policyfile": [
147
+ [
148
+ "policyfile_demo",
149
+ ">= 0.0.0"
150
+ ],
151
+ [
152
+ "apt",
153
+ "= 2.7.0"
154
+ ],
155
+ [
156
+ "java",
157
+ "= 1.31.0"
158
+ ],
159
+ [
160
+ "jenkins",
161
+ "= 2.2.2"
162
+ ],
163
+ [
164
+ "runit",
165
+ "= 1.5.18"
166
+ ],
167
+ [
168
+ "build-essential",
169
+ "= 2.2.2"
170
+ ],
171
+ [
172
+ "yum",
173
+ "= 3.5.4"
174
+ ],
175
+ [
176
+ "yum-epel",
177
+ "= 0.6.0"
178
+ ]
179
+ ],
180
+ "dependencies": {
181
+ "apt (2.7.0)": [
182
+
183
+ ],
184
+ "java (1.31.0)": [
185
+
186
+ ],
187
+ "jenkins (2.2.2)": [
188
+ [
189
+ "apt",
190
+ "~> 2.0"
191
+ ],
192
+ [
193
+ "runit",
194
+ "~> 1.5"
195
+ ],
196
+ [
197
+ "yum",
198
+ "~> 3.0"
199
+ ]
200
+ ],
201
+ "runit (1.5.18)": [
202
+ [
203
+ "build-essential",
204
+ ">= 0.0.0"
205
+ ],
206
+ [
207
+ "yum",
208
+ "~> 3.0"
209
+ ],
210
+ [
211
+ "yum-epel",
212
+ ">= 0.0.0"
213
+ ]
214
+ ],
215
+ "build-essential (2.2.2)": [
216
+
217
+ ],
218
+ "yum (3.5.4)": [
219
+
220
+ ],
221
+ "yum-epel (0.6.0)": [
222
+ [
223
+ "yum",
224
+ "~> 3.0"
225
+ ]
226
+ ],
227
+ "policyfile_demo (0.1.0)": [
228
+
229
+ ]
230
+ }
231
+ }
232
+ }
233
233
  E
234
234
  end
235
235
 
@@ -283,8 +283,8 @@ describe ChefDK::Policyfile::Differ do
283
283
  end
284
284
 
285
285
  it "reports that there are no updates" do
286
- expected_message = <<-E
287
- No changes for policy lock 'jenkins' between 'git: HEAD' and 'local disk'
286
+ expected_message = <<~E
287
+ No changes for policy lock 'jenkins' between 'git: HEAD' and 'local disk'
288
288
  E
289
289
  differ.run_report
290
290
  expect(output).to include(expected_message)
@@ -312,27 +312,27 @@ E
312
312
  end
313
313
 
314
314
  it "reports the updated rev_id and run_list" do
315
- expected_message = <<-E
316
- Policy lock 'jenkins' differs between 'git: HEAD' and 'local disk':
315
+ expected_message = <<~E
316
+ Policy lock 'jenkins' differs between 'git: HEAD' and 'local disk':
317
317
 
318
- REVISION ID CHANGED
319
- ===================
318
+ REVISION ID CHANGED
319
+ ===================
320
320
 
321
- @@ -1,2 +1,2 @@
322
- -cf4b8a020bdc1ba6914093a8a07a5514cce8a3a2979a967b1f32ea704a61785b
323
- +304566f86a620aae85797a3c491a51fb8c6ecf996407e77b8063aa3ee59672c5
321
+ @@ -1,2 +1,2 @@
322
+ -cf4b8a020bdc1ba6914093a8a07a5514cce8a3a2979a967b1f32ea704a61785b
323
+ +304566f86a620aae85797a3c491a51fb8c6ecf996407e77b8063aa3ee59672c5
324
324
 
325
- RUN LIST CHANGED
326
- ================
325
+ RUN LIST CHANGED
326
+ ================
327
327
 
328
- @@ -1,5 +1,7 @@
329
- recipe[java::default]
330
- recipe[jenkins::master]
331
- -recipe[policyfile_demo::whatever]
332
- recipe[policyfile_demo::default]
333
- +recipe[one::one]
334
- +recipe[two::two]
335
- +recipe[three::three]
328
+ @@ -1,5 +1,7 @@
329
+ recipe[java::default]
330
+ recipe[jenkins::master]
331
+ -recipe[policyfile_demo::whatever]
332
+ recipe[policyfile_demo::default]
333
+ +recipe[one::one]
334
+ +recipe[two::two]
335
+ +recipe[three::three]
336
336
 
337
337
  E
338
338
  differ.run_report
@@ -363,33 +363,33 @@ E
363
363
  end
364
364
 
365
365
  it "prints the correct changes with context for the run list" do
366
- expected_message = <<-E
367
- Policy lock 'jenkins' differs between 'git: HEAD' and 'local disk':
368
-
369
- REVISION ID CHANGED
370
- ===================
371
-
372
- @@ -1,2 +1,2 @@
373
- -cf4b8a020bdc1ba6914093a8a07a5514cce8a3a2979a967b1f32ea704a61785b
374
- +304566f86a620aae85797a3c491a51fb8c6ecf996407e77b8063aa3ee59672c5
375
-
376
- RUN LIST CHANGED
377
- ================
378
-
379
- @@ -1,5 +1,4 @@
380
- recipe[a::default]
381
- -recipe[b::default]
382
- recipe[c::default]
383
- recipe[d::default]
384
- recipe[e::default]
385
- @@ -12,4 +11,8 @@
386
- recipe[l::default]
387
- recipe[m::default]
388
- recipe[n::default]
389
- +recipe[o::new]
390
- +recipe[p::new]
391
- +recipe[q::new]
392
- +recipe[r::new]
366
+ expected_message = <<~E
367
+ Policy lock 'jenkins' differs between 'git: HEAD' and 'local disk':
368
+
369
+ REVISION ID CHANGED
370
+ ===================
371
+
372
+ @@ -1,2 +1,2 @@
373
+ -cf4b8a020bdc1ba6914093a8a07a5514cce8a3a2979a967b1f32ea704a61785b
374
+ +304566f86a620aae85797a3c491a51fb8c6ecf996407e77b8063aa3ee59672c5
375
+
376
+ RUN LIST CHANGED
377
+ ================
378
+
379
+ @@ -1,5 +1,4 @@
380
+ recipe[a::default]
381
+ -recipe[b::default]
382
+ recipe[c::default]
383
+ recipe[d::default]
384
+ recipe[e::default]
385
+ @@ -12,4 +11,8 @@
386
+ recipe[l::default]
387
+ recipe[m::default]
388
+ recipe[n::default]
389
+ +recipe[o::new]
390
+ +recipe[p::new]
391
+ +recipe[q::new]
392
+ +recipe[r::new]
393
393
 
394
394
  E
395
395
  differ.run_report
@@ -422,34 +422,34 @@ E
422
422
  end
423
423
 
424
424
  it "reports the updated revision_id and removed cookbooks" do
425
- expected_message = <<-E
426
- Policy lock 'jenkins' differs between 'git: HEAD' and 'local disk':
427
-
428
- REVISION ID CHANGED
429
- ===================
430
-
431
- @@ -1,2 +1,2 @@
432
- -cf4b8a020bdc1ba6914093a8a07a5514cce8a3a2979a967b1f32ea704a61785b
433
- +304566f86a620aae85797a3c491a51fb8c6ecf996407e77b8063aa3ee59672c5
434
-
435
- REMOVED COOKBOOKS
436
- =================
437
-
438
- apt
439
- ---
440
-
441
- @@ -1,12 +1 @@
442
- -{
443
- - "version": "2.7.0",
444
- - "identifier": "16c57abbd056543f7d5a15dabbb03261024a9c5e",
445
- - "dotted_decimal_identifier": "6409580415309396.17870749399956400.55392231660638",
446
- - "cache_key": "apt-2.7.0-supermarket.chef.io",
447
- - "origin": "https://supermarket.chef.io/api/v1/cookbooks/apt/versions/2.7.0/download",
448
- - "source_options": {
449
- - "artifactserver": "https://supermarket.chef.io/api/v1/cookbooks/apt/versions/2.7.0/download",
450
- - "version": "2.7.0"
451
- - }
452
- -}
425
+ expected_message = <<~E
426
+ Policy lock 'jenkins' differs between 'git: HEAD' and 'local disk':
427
+
428
+ REVISION ID CHANGED
429
+ ===================
430
+
431
+ @@ -1,2 +1,2 @@
432
+ -cf4b8a020bdc1ba6914093a8a07a5514cce8a3a2979a967b1f32ea704a61785b
433
+ +304566f86a620aae85797a3c491a51fb8c6ecf996407e77b8063aa3ee59672c5
434
+
435
+ REMOVED COOKBOOKS
436
+ =================
437
+
438
+ apt
439
+ ---
440
+
441
+ @@ -1,12 +1 @@
442
+ -{
443
+ - "version": "2.7.0",
444
+ - "identifier": "16c57abbd056543f7d5a15dabbb03261024a9c5e",
445
+ - "dotted_decimal_identifier": "6409580415309396.17870749399956400.55392231660638",
446
+ - "cache_key": "apt-2.7.0-supermarket.chef.io",
447
+ - "origin": "https://supermarket.chef.io/api/v1/cookbooks/apt/versions/2.7.0/download",
448
+ - "source_options": {
449
+ - "artifactserver": "https://supermarket.chef.io/api/v1/cookbooks/apt/versions/2.7.0/download",
450
+ - "version": "2.7.0"
451
+ - }
452
+ -}
453
453
 
454
454
  E
455
455
  differ.run_report
@@ -495,34 +495,34 @@ E
495
495
  end
496
496
 
497
497
  it "reports the updated revision_id and added cookbook" do
498
- expected_message = <<-E
499
- Policy lock 'jenkins' differs between 'git: HEAD' and 'local disk':
500
-
501
- REVISION ID CHANGED
502
- ===================
503
-
504
- @@ -1,2 +1,2 @@
505
- -cf4b8a020bdc1ba6914093a8a07a5514cce8a3a2979a967b1f32ea704a61785b
506
- +304566f86a620aae85797a3c491a51fb8c6ecf996407e77b8063aa3ee59672c5
507
-
508
- ADDED COOKBOOKS
509
- ===============
510
-
511
- bluepill
512
- --------
513
-
514
- @@ -1 +1,12 @@
515
- +{
516
- + "version": "2.3.2",
517
- + "identifier": "9c6990944d9a347dec8bd375e707ba0aecdc17cd",
518
- + "dotted_decimal_identifier": "69437059924760478.24393100994078142.115593340606828",
519
- + "cache_key": "bluepill-2.3.2-supermarket.chef.io",
520
- + "origin": "https://supermarket.chef.io/api/v1/cookbooks/bluepill/versions/2.3.2/download",
521
- + "source_options": {
522
- + "artifactserver": "https://supermarket.chef.io/api/v1/cookbooks/bluepill/versions/2.3.2/download",
523
- + "version": "2.3.2"
524
- + }
525
- +}
498
+ expected_message = <<~E
499
+ Policy lock 'jenkins' differs between 'git: HEAD' and 'local disk':
500
+
501
+ REVISION ID CHANGED
502
+ ===================
503
+
504
+ @@ -1,2 +1,2 @@
505
+ -cf4b8a020bdc1ba6914093a8a07a5514cce8a3a2979a967b1f32ea704a61785b
506
+ +304566f86a620aae85797a3c491a51fb8c6ecf996407e77b8063aa3ee59672c5
507
+
508
+ ADDED COOKBOOKS
509
+ ===============
510
+
511
+ bluepill
512
+ --------
513
+
514
+ @@ -1 +1,12 @@
515
+ +{
516
+ + "version": "2.3.2",
517
+ + "identifier": "9c6990944d9a347dec8bd375e707ba0aecdc17cd",
518
+ + "dotted_decimal_identifier": "69437059924760478.24393100994078142.115593340606828",
519
+ + "cache_key": "bluepill-2.3.2-supermarket.chef.io",
520
+ + "origin": "https://supermarket.chef.io/api/v1/cookbooks/bluepill/versions/2.3.2/download",
521
+ + "source_options": {
522
+ + "artifactserver": "https://supermarket.chef.io/api/v1/cookbooks/bluepill/versions/2.3.2/download",
523
+ + "version": "2.3.2"
524
+ + }
525
+ +}
526
526
 
527
527
  E
528
528
  differ.run_report
@@ -557,32 +557,32 @@ E
557
557
  end
558
558
 
559
559
  it "reports the updated revision_id and modified policyfile_demo cookbook" do
560
- expected_message = <<-E
561
- Policy lock 'jenkins' differs between 'git: HEAD' and 'local disk':
560
+ expected_message = <<~E
561
+ Policy lock 'jenkins' differs between 'git: HEAD' and 'local disk':
562
562
 
563
- REVISION ID CHANGED
564
- ===================
563
+ REVISION ID CHANGED
564
+ ===================
565
565
 
566
- @@ -1,2 +1,2 @@
567
- -cf4b8a020bdc1ba6914093a8a07a5514cce8a3a2979a967b1f32ea704a61785b
568
- +304566f86a620aae85797a3c491a51fb8c6ecf996407e77b8063aa3ee59672c5
566
+ @@ -1,2 +1,2 @@
567
+ -cf4b8a020bdc1ba6914093a8a07a5514cce8a3a2979a967b1f32ea704a61785b
568
+ +304566f86a620aae85797a3c491a51fb8c6ecf996407e77b8063aa3ee59672c5
569
569
 
570
- MODIFIED COOKBOOKS
571
- ==================
570
+ MODIFIED COOKBOOKS
571
+ ==================
572
572
 
573
- policyfile_demo
574
- ---------------
573
+ policyfile_demo
574
+ ---------------
575
575
 
576
- @@ -1,7 +1,7 @@
577
- {
578
- "version": "0.1.0",
579
- - "identifier": "ea96c99da079db9ff3cb22601638fabd5df49599",
580
- - "dotted_decimal_identifier": "66030937227426267.45022575077627448.275691232073113",
581
- + "identifier": "f04cc40faf628253fe7d9566d66a1733fb1afbe9",
582
- + "dotted_decimal_identifier": "67638399371010690.23642238397896298.25512023620585",
583
- "source": "cookbooks/policyfile_demo",
584
- "cache_key": null,
585
- "scm_info": {
576
+ @@ -1,7 +1,7 @@
577
+ {
578
+ "version": "0.1.0",
579
+ - "identifier": "ea96c99da079db9ff3cb22601638fabd5df49599",
580
+ - "dotted_decimal_identifier": "66030937227426267.45022575077627448.275691232073113",
581
+ + "identifier": "f04cc40faf628253fe7d9566d66a1733fb1afbe9",
582
+ + "dotted_decimal_identifier": "67638399371010690.23642238397896298.25512023620585",
583
+ "source": "cookbooks/policyfile_demo",
584
+ "cache_key": null,
585
+ "scm_info": {
586
586
 
587
587
  E
588
588
  differ.run_report
@@ -610,25 +610,25 @@ E
610
610
  end
611
611
 
612
612
  it "reports the updated revision_id and modified attributes" do
613
- expected_output = <<-E
614
- Policy lock 'jenkins' differs between 'git: HEAD' and 'local disk':
613
+ expected_output = <<~E
614
+ Policy lock 'jenkins' differs between 'git: HEAD' and 'local disk':
615
615
 
616
- REVISION ID CHANGED
617
- ===================
616
+ REVISION ID CHANGED
617
+ ===================
618
618
 
619
- @@ -1,2 +1,2 @@
620
- -cf4b8a020bdc1ba6914093a8a07a5514cce8a3a2979a967b1f32ea704a61785b
621
- +304566f86a620aae85797a3c491a51fb8c6ecf996407e77b8063aa3ee59672c5
619
+ @@ -1,2 +1,2 @@
620
+ -cf4b8a020bdc1ba6914093a8a07a5514cce8a3a2979a967b1f32ea704a61785b
621
+ +304566f86a620aae85797a3c491a51fb8c6ecf996407e77b8063aa3ee59672c5
622
622
 
623
- DEFAULT ATTRIBUTES CHANGED
624
- ==========================
623
+ DEFAULT ATTRIBUTES CHANGED
624
+ ==========================
625
625
 
626
- @@ -1,4 +1,5 @@
627
- {
628
- - "greeting": "Attributes, f*** yeah"
629
- + "greeting": "Attributes, f*** yeah",
630
- + "new_attr": "hello"
631
- }
626
+ @@ -1,4 +1,5 @@
627
+ {
628
+ - "greeting": "Attributes, f*** yeah"
629
+ + "greeting": "Attributes, f*** yeah",
630
+ + "new_attr": "hello"
631
+ }
632
632
 
633
633
  E
634
634
  differ.run_report
@@ -656,25 +656,25 @@ E
656
656
  end
657
657
 
658
658
  it "reports the updated revision_id and override_attributes" do
659
- expected_output = <<-E
660
- Policy lock 'jenkins' differs between 'git: HEAD' and 'local disk':
659
+ expected_output = <<~E
660
+ Policy lock 'jenkins' differs between 'git: HEAD' and 'local disk':
661
661
 
662
- REVISION ID CHANGED
663
- ===================
662
+ REVISION ID CHANGED
663
+ ===================
664
664
 
665
- @@ -1,2 +1,2 @@
666
- -cf4b8a020bdc1ba6914093a8a07a5514cce8a3a2979a967b1f32ea704a61785b
667
- +304566f86a620aae85797a3c491a51fb8c6ecf996407e77b8063aa3ee59672c5
665
+ @@ -1,2 +1,2 @@
666
+ -cf4b8a020bdc1ba6914093a8a07a5514cce8a3a2979a967b1f32ea704a61785b
667
+ +304566f86a620aae85797a3c491a51fb8c6ecf996407e77b8063aa3ee59672c5
668
668
 
669
- OVERRIDE ATTRIBUTES CHANGED
670
- ===========================
669
+ OVERRIDE ATTRIBUTES CHANGED
670
+ ===========================
671
671
 
672
- @@ -1,4 +1,5 @@
673
- {
674
- - "attr_only_updating": "use -a"
675
- + "attr_only_updating": "use -a",
676
- + "new_attr": "ALL THE DIFF"
677
- }
672
+ @@ -1,4 +1,5 @@
673
+ {
674
+ - "attr_only_updating": "use -a"
675
+ + "attr_only_updating": "use -a",
676
+ + "new_attr": "ALL THE DIFF"
677
+ }
678
678
 
679
679
  E
680
680