chef 12.14.89 → 12.15.19

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. checksums.yaml +4 -4
  2. data/CONTRIBUTING.md +76 -51
  3. data/Gemfile +1 -1
  4. data/README.md +9 -7
  5. data/Rakefile +1 -1
  6. data/VERSION +1 -1
  7. data/acceptance/Gemfile +3 -0
  8. data/acceptance/Gemfile.lock +19 -18
  9. data/acceptance/fips/.kitchen.yml +1 -1
  10. data/lib/chef/application/exit_code.rb +9 -0
  11. data/lib/chef/cookbook/file_system_file_vendor.rb +7 -8
  12. data/lib/chef/cookbook/metadata.rb +8 -0
  13. data/lib/chef/exceptions.rb +5 -0
  14. data/lib/chef/knife.rb +14 -15
  15. data/lib/chef/knife/ssh.rb +1 -0
  16. data/lib/chef/node/attribute.rb +1 -3
  17. data/lib/chef/node/attribute_collections.rb +20 -0
  18. data/lib/chef/provider/apt_repository.rb +1 -1
  19. data/lib/chef/provider/apt_update.rb +1 -1
  20. data/lib/chef/provider/group/groupadd.rb +2 -1
  21. data/lib/chef/provider/package/cab.rb +150 -0
  22. data/lib/chef/provider/package/rubygems.rb +0 -1
  23. data/lib/chef/provider/registry_key.rb +26 -2
  24. data/lib/chef/provider/remote_file/content.rb +1 -1
  25. data/lib/chef/provider/user.rb +10 -0
  26. data/lib/chef/provider/user/dscl.rb +2 -2
  27. data/lib/chef/provider/user/linux.rb +4 -14
  28. data/lib/chef/provider/user/pw.rb +2 -2
  29. data/lib/chef/provider/user/solaris.rb +15 -0
  30. data/lib/chef/provider/user/useradd.rb +1 -5
  31. data/lib/chef/providers.rb +1 -0
  32. data/lib/chef/resource/cab_package.rb +44 -0
  33. data/lib/chef/resource/registry_key.rb +3 -3
  34. data/lib/chef/resource/yum_repository.rb +1 -1
  35. data/lib/chef/resources.rb +1 -0
  36. data/lib/chef/server_api.rb +1 -1
  37. data/lib/chef/util/dsc/local_configuration_manager.rb +1 -1
  38. data/lib/chef/version.rb +1 -1
  39. data/spec/data/templates/chef-seattle20160930-4388-1crv7ef.txt +1 -0
  40. data/spec/data/templates/chef-seattle20160930-4388-jjfoae.txt +1 -0
  41. data/spec/data/templates/chef-seattle20160930-4388-umeq2c.txt +1 -0
  42. data/spec/functional/knife/cookbook_delete_spec.rb +48 -59
  43. data/spec/functional/resource/ifconfig_spec.rb +6 -0
  44. data/spec/functional/resource/registry_spec.rb +110 -4
  45. data/spec/unit/application/exit_code_spec.rb +10 -0
  46. data/spec/unit/cookbook/file_vendor_spec.rb +15 -0
  47. data/spec/unit/cookbook/metadata_spec.rb +19 -0
  48. data/spec/unit/exceptions_spec.rb +2 -0
  49. data/spec/unit/node/attribute_spec.rb +23 -1
  50. data/spec/unit/node/vivid_mash_spec.rb +27 -0
  51. data/spec/unit/provider/group/groupadd_spec.rb +118 -99
  52. data/spec/unit/provider/package/cab_spec.rb +218 -0
  53. data/spec/unit/provider/package/rubygems_spec.rb +2 -4
  54. data/spec/unit/provider/registry_key_spec.rb +94 -0
  55. data/spec/unit/provider/remote_file/content_spec.rb +1 -0
  56. data/spec/unit/provider/user/solaris_spec.rb +52 -40
  57. data/spec/unit/resource/apt_update_spec.rb +25 -17
  58. data/spec/unit/resource/cab_package_spec.rb +38 -0
  59. data/spec/unit/resource/registry_key_spec.rb +26 -10
  60. data/spec/unit/server_api_spec.rb +50 -0
  61. data/spec/unit/util/dsc/local_configuration_manager_spec.rb +10 -4
  62. metadata +13 -5
@@ -59,10 +59,6 @@ EOH
59
59
  allow(lcm).to receive(:run_configuration_cmdlet).and_return(lcm_status)
60
60
  end
61
61
  context "that returns successfully" do
62
- before(:each) do
63
- allow(lcm).to receive(:run_configuration_cmdlet).and_return(lcm_status)
64
- end
65
-
66
62
  let(:lcm_standard_output) { normal_lcm_output }
67
63
  let(:lcm_standard_error) { nil }
68
64
  let(:lcm_cmdlet_success) { true }
@@ -138,4 +134,14 @@ EOH
138
134
  expect(lcm.send(:dsc_module_import_failure?, dsc_resource_import_failure_output.gsub("CimException", "ArgumentException"))).to be(false)
139
135
  end
140
136
  end
137
+
138
+ describe "#run_configuration_cmdlet" do
139
+ context "when invalid dsc script is given" do
140
+ it "raises exception" do
141
+ configuration_document = "invalid-config"
142
+ shellout_flags = { :cwd => nil, :environment => nil, :timeout => nil }
143
+ expect { lcm.send(:run_configuration_cmdlet, configuration_document, true, shellout_flags) }.to raise_error(Chef::Exceptions::PowershellCmdletException)
144
+ end
145
+ end
146
+ end
141
147
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chef
3
3
  version: !ruby/object:Gem::Version
4
- version: 12.14.89
4
+ version: 12.15.19
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Jacob
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-22 00:00:00.000000000 Z
11
+ date: 2016-10-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chef-config
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 12.14.89
19
+ version: 12.15.19
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 12.14.89
26
+ version: 12.15.19
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: mixlib-cli
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -1257,6 +1257,7 @@ files:
1257
1257
  - lib/chef/provider/package.rb
1258
1258
  - lib/chef/provider/package/aix.rb
1259
1259
  - lib/chef/provider/package/apt.rb
1260
+ - lib/chef/provider/package/cab.rb
1260
1261
  - lib/chef/provider/package/chocolatey.rb
1261
1262
  - lib/chef/provider/package/dpkg.rb
1262
1263
  - lib/chef/provider/package/easy_install.rb
@@ -1350,6 +1351,7 @@ files:
1350
1351
  - lib/chef/resource/batch.rb
1351
1352
  - lib/chef/resource/bff_package.rb
1352
1353
  - lib/chef/resource/breakpoint.rb
1354
+ - lib/chef/resource/cab_package.rb
1353
1355
  - lib/chef/resource/chef_gem.rb
1354
1356
  - lib/chef/resource/chocolatey_package.rb
1355
1357
  - lib/chef/resource/conditional.rb
@@ -1828,6 +1830,9 @@ files:
1828
1830
  - spec/data/standalone_cookbook/chefignore
1829
1831
  - spec/data/standalone_cookbook/recipes/default.rb
1830
1832
  - spec/data/standalone_cookbook/vendor/bundle/ruby/2.0.0/gems/multi_json-1.9.0/lib/multi_json.rb
1833
+ - spec/data/templates/chef-seattle20160930-4388-1crv7ef.txt
1834
+ - spec/data/templates/chef-seattle20160930-4388-jjfoae.txt
1835
+ - spec/data/templates/chef-seattle20160930-4388-umeq2c.txt
1831
1836
  - spec/data/templates/seattle.txt
1832
1837
  - spec/data/trusted_certs/example.crt
1833
1838
  - spec/data/trusted_certs/intermediate.pem
@@ -2344,6 +2349,7 @@ files:
2344
2349
  - spec/unit/provider/osx_profile_spec.rb
2345
2350
  - spec/unit/provider/package/aix_spec.rb
2346
2351
  - spec/unit/provider/package/apt_spec.rb
2352
+ - spec/unit/provider/package/cab_spec.rb
2347
2353
  - spec/unit/provider/package/chocolatey_spec.rb
2348
2354
  - spec/unit/provider/package/dpkg_spec.rb
2349
2355
  - spec/unit/provider/package/easy_install_spec.rb
@@ -2423,6 +2429,7 @@ files:
2423
2429
  - spec/unit/resource/bash_spec.rb
2424
2430
  - spec/unit/resource/batch_spec.rb
2425
2431
  - spec/unit/resource/breakpoint_spec.rb
2432
+ - spec/unit/resource/cab_package_spec.rb
2426
2433
  - spec/unit/resource/chef_gem_spec.rb
2427
2434
  - spec/unit/resource/chocolatey_package_spec.rb
2428
2435
  - spec/unit/resource/conditional_action_not_nothing_spec.rb
@@ -2512,6 +2519,7 @@ files:
2512
2519
  - spec/unit/runner_spec.rb
2513
2520
  - spec/unit/scan_access_control_spec.rb
2514
2521
  - spec/unit/search/query_spec.rb
2522
+ - spec/unit/server_api_spec.rb
2515
2523
  - spec/unit/shell/model_wrapper_spec.rb
2516
2524
  - spec/unit/shell/shell_ext_spec.rb
2517
2525
  - spec/unit/shell/shell_session_spec.rb
@@ -2572,7 +2580,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
2572
2580
  version: '0'
2573
2581
  requirements: []
2574
2582
  rubyforge_project:
2575
- rubygems_version: 2.6.6
2583
+ rubygems_version: 2.6.7
2576
2584
  signing_key:
2577
2585
  specification_version: 4
2578
2586
  summary: A systems integration framework, built to bring the benefits of configuration