chef 13.6.4-universal-mingw32 → 13.7.16-universal-mingw32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (269) hide show
  1. checksums.yaml +5 -5
  2. data/VERSION +1 -1
  3. data/acceptance/Gemfile +2 -2
  4. data/acceptance/top-cookbooks/.acceptance/acceptance-cookbook/libraries/top_cookbooks.rb +1 -6
  5. data/distro/powershell/chef/chef.psm1 +1 -5
  6. data/lib/chef/api_client.rb +5 -5
  7. data/lib/chef/api_client_v1.rb +6 -6
  8. data/lib/chef/application.rb +3 -2
  9. data/lib/chef/application/knife.rb +4 -0
  10. data/lib/chef/chef_class.rb +2 -2
  11. data/lib/chef/chef_fs/data_handler/data_bag_item_data_handler.rb +1 -1
  12. data/lib/chef/chef_fs/data_handler/data_handler_base.rb +2 -4
  13. data/lib/chef/client.rb +3 -3
  14. data/lib/chef/cookbook/chefignore.rb +4 -0
  15. data/lib/chef/cookbook/cookbook_collection.rb +2 -2
  16. data/lib/chef/cookbook/metadata.rb +2 -2
  17. data/lib/chef/data_bag.rb +1 -1
  18. data/lib/chef/deprecated.rb +10 -0
  19. data/lib/chef/event_dispatch/base.rb +2 -2
  20. data/lib/chef/http.rb +10 -10
  21. data/lib/chef/knife.rb +16 -15
  22. data/lib/chef/knife/configure.rb +12 -36
  23. data/lib/chef/knife/cookbook_upload.rb +4 -4
  24. data/lib/chef/knife/core/bootstrap_context.rb +1 -1
  25. data/lib/chef/knife/core/status_presenter.rb +6 -2
  26. data/lib/chef/knife/core/ui.rb +1 -1
  27. data/lib/chef/knife/data_bag_secret_options.rb +1 -1
  28. data/lib/chef/knife/data_bag_show.rb +1 -1
  29. data/lib/chef/knife/edit.rb +1 -1
  30. data/lib/chef/knife/ssh.rb +47 -35
  31. data/lib/chef/knife/user_create.rb +2 -0
  32. data/lib/chef/knife/user_delete.rb +2 -0
  33. data/lib/chef/knife/user_edit.rb +2 -0
  34. data/lib/chef/knife/user_reregister.rb +2 -0
  35. data/lib/chef/knife/user_show.rb +2 -0
  36. data/lib/chef/mixin/powershell_out.rb +1 -1
  37. data/lib/chef/node/attribute.rb +46 -70
  38. data/lib/chef/node/attribute_collections.rb +5 -5
  39. data/lib/chef/node/common_api.rb +1 -1
  40. data/lib/chef/node/immutable_collections.rb +180 -23
  41. data/lib/chef/node/mixin/state_tracking.rb +6 -6
  42. data/lib/chef/node_map.rb +63 -45
  43. data/lib/chef/property.rb +8 -8
  44. data/lib/chef/provider.rb +9 -3
  45. data/lib/chef/provider/apt_preference.rb +1 -1
  46. data/lib/chef/provider/apt_repository.rb +1 -1
  47. data/lib/chef/provider/apt_update.rb +1 -1
  48. data/lib/chef/provider/file.rb +1 -1
  49. data/lib/chef/provider/group/dscl.rb +6 -2
  50. data/lib/chef/provider/ifconfig.rb +96 -34
  51. data/lib/chef/provider/launchd.rb +0 -1
  52. data/lib/chef/provider/log.rb +3 -13
  53. data/lib/chef/provider/package/dnf.rb +1 -1
  54. data/lib/chef/provider/package/smartos.rb +2 -2
  55. data/lib/chef/provider/reboot.rb +12 -0
  56. data/lib/chef/provider/remote_directory.rb +1 -1
  57. data/lib/chef/provider/remote_file/http.rb +3 -2
  58. data/lib/chef/provider/service/solaris.rb +6 -2
  59. data/lib/chef/provider/systemd_unit.rb +34 -33
  60. data/lib/chef/provider/user/dscl.rb +1 -1
  61. data/lib/chef/provider/windows_path.rb +6 -7
  62. data/lib/chef/provider/windows_task.rb +89 -33
  63. data/lib/chef/provider/yum_repository.rb +24 -9
  64. data/lib/chef/resource/apt_package.rb +1 -0
  65. data/lib/chef/resource/apt_preference.rb +4 -0
  66. data/lib/chef/resource/apt_repository.rb +4 -0
  67. data/lib/chef/resource/apt_update.rb +3 -0
  68. data/lib/chef/resource/bash.rb +4 -0
  69. data/lib/chef/resource/batch.rb +5 -0
  70. data/lib/chef/resource/bff_package.rb +4 -0
  71. data/lib/chef/resource/breakpoint.rb +6 -0
  72. data/lib/chef/resource/cab_package.rb +6 -6
  73. data/lib/chef/resource/chef_gem.rb +13 -0
  74. data/lib/chef/resource/chocolatey_package.rb +4 -6
  75. data/lib/chef/resource/cookbook_file.rb +13 -15
  76. data/lib/chef/resource/cron.rb +2 -0
  77. data/lib/chef/resource/csh.rb +4 -0
  78. data/lib/chef/resource/directory.rb +8 -26
  79. data/lib/chef/resource/dnf_package.rb +5 -0
  80. data/lib/chef/resource/dpkg_package.rb +2 -0
  81. data/lib/chef/resource/dsc_resource.rb +5 -0
  82. data/lib/chef/resource/dsc_script.rb +6 -0
  83. data/lib/chef/resource/env.rb +3 -0
  84. data/lib/chef/resource/erl_call.rb +5 -0
  85. data/lib/chef/resource/execute.rb +5 -1
  86. data/lib/chef/resource/file.rb +2 -1
  87. data/lib/chef/resource/file/verification.rb +10 -0
  88. data/lib/chef/resource/freebsd_package.rb +10 -2
  89. data/lib/chef/resource/gem_package.rb +2 -0
  90. data/lib/chef/resource/git.rb +2 -0
  91. data/lib/chef/resource/group.rb +1 -0
  92. data/lib/chef/resource/homebrew_package.rb +3 -0
  93. data/lib/chef/resource/http_request.rb +2 -0
  94. data/lib/chef/resource/ifconfig.rb +23 -150
  95. data/lib/chef/resource/ips_package.rb +1 -0
  96. data/lib/chef/resource/ksh.rb +6 -0
  97. data/lib/chef/resource/launchd.rb +5 -4
  98. data/lib/chef/resource/link.rb +10 -0
  99. data/lib/chef/resource/log.rb +19 -46
  100. data/lib/chef/resource/macports_package.rb +1 -0
  101. data/lib/chef/resource/mdadm.rb +4 -0
  102. data/lib/chef/resource/mount.rb +1 -0
  103. data/lib/chef/resource/msu_package.rb +7 -8
  104. data/lib/chef/resource/ohai.rb +2 -0
  105. data/lib/chef/resource/openbsd_package.rb +3 -0
  106. data/lib/chef/resource/osx_profile.rb +10 -40
  107. data/lib/chef/resource/package.rb +6 -0
  108. data/lib/chef/resource/pacman_package.rb +1 -0
  109. data/lib/chef/resource/paludis_package.rb +3 -0
  110. data/lib/chef/resource/perl.rb +4 -0
  111. data/lib/chef/resource/portage_package.rb +1 -0
  112. data/lib/chef/resource/powershell_package.rb +5 -0
  113. data/lib/chef/resource/powershell_script.rb +8 -0
  114. data/lib/chef/resource/python.rb +4 -0
  115. data/lib/chef/resource/reboot.rb +14 -20
  116. data/lib/chef/resource/registry_key.rb +1 -0
  117. data/lib/chef/resource/remote_directory.rb +3 -0
  118. data/lib/chef/resource/remote_file.rb +2 -0
  119. data/lib/chef/resource/resource_notification.rb +17 -0
  120. data/lib/chef/resource/route.rb +1 -0
  121. data/lib/chef/resource/rpm_package.rb +1 -0
  122. data/lib/chef/resource/ruby.rb +4 -0
  123. data/lib/chef/resource/ruby_block.rb +3 -0
  124. data/lib/chef/resource/script.rb +4 -0
  125. data/lib/chef/resource/service.rb +1 -0
  126. data/lib/chef/resource/smartos_package.rb +1 -0
  127. data/lib/chef/resource/solaris_package.rb +1 -0
  128. data/lib/chef/resource/subversion.rb +1 -0
  129. data/lib/chef/resource/systemd_unit.rb +6 -0
  130. data/lib/chef/resource/template.rb +9 -0
  131. data/lib/chef/resource/user.rb +1 -0
  132. data/lib/chef/resource/windows_package.rb +2 -0
  133. data/lib/chef/resource/windows_path.rb +5 -10
  134. data/lib/chef/resource/windows_service.rb +3 -0
  135. data/lib/chef/resource/windows_task.rb +66 -87
  136. data/lib/chef/resource/yum_repository.rb +26 -22
  137. data/lib/chef/resource/zypper_package.rb +2 -0
  138. data/lib/chef/resource/zypper_repository.rb +6 -1
  139. data/lib/chef/run_context.rb +8 -2
  140. data/lib/chef/server_api.rb +1 -0
  141. data/lib/chef/util/selinux.rb +5 -4
  142. data/lib/chef/version.rb +1 -1
  143. data/lib/chef/version/platform.rb +18 -0
  144. data/lib/chef/version_constraint/platform.rb +2 -0
  145. data/spec/data/client.d_00/02-strings.rb +2 -0
  146. data/spec/functional/assets/chefinittest +6 -4
  147. data/spec/functional/knife/ssh_spec.rb +54 -7
  148. data/spec/functional/resource/bff_spec.rb +3 -3
  149. data/spec/functional/resource/ifconfig_spec.rb +1 -1
  150. data/spec/functional/resource/mount_spec.rb +7 -3
  151. data/spec/functional/resource/user/useradd_spec.rb +4 -4
  152. data/spec/functional/resource/windows_task_spec.rb +6 -6
  153. data/spec/functional/win32/security_spec.rb +7 -33
  154. data/spec/integration/knife/data_bag_show_spec.rb +1 -1
  155. data/spec/integration/recipes/noop_resource_spec.rb +1 -1
  156. data/spec/integration/recipes/recipe_dsl_spec.rb +30 -30
  157. data/spec/integration/recipes/resource_action_spec.rb +2 -2
  158. data/spec/integration/recipes/resource_converge_if_changed_spec.rb +71 -15
  159. data/spec/spec_helper.rb +19 -0
  160. data/spec/support/shared/functional/execute_resource.rb +1 -1
  161. data/spec/support/shared/unit/application_dot_d.rb +2 -0
  162. data/spec/support/shared/unit/execute_resource.rb +8 -1
  163. data/spec/support/shared/unit/provider/file.rb +9 -1
  164. data/spec/unit/chef_fs/data_handler/data_bag_item_data_handler.rb +10 -7
  165. data/spec/unit/chef_fs/file_system/repository/directory_spec.rb +2 -2
  166. data/spec/unit/client_spec.rb +1 -1
  167. data/spec/unit/deprecated_spec.rb +4 -4
  168. data/spec/unit/http_spec.rb +9 -0
  169. data/spec/unit/knife/bootstrap_spec.rb +5 -0
  170. data/spec/unit/knife/configure_spec.rb +10 -60
  171. data/spec/unit/knife/data_bag_create_spec.rb +40 -2
  172. data/spec/unit/knife/data_bag_show_spec.rb +16 -2
  173. data/spec/unit/knife/ssh_spec.rb +85 -39
  174. data/spec/unit/knife_spec.rb +2 -0
  175. data/spec/unit/lwrp_spec.rb +5 -3
  176. data/spec/unit/mixin/powershell_type_coercions_spec.rb +7 -6
  177. data/spec/unit/node/attribute_spec.rb +55 -24
  178. data/spec/unit/node/immutable_collections_spec.rb +28 -14
  179. data/spec/unit/node/vivid_mash_spec.rb +27 -10
  180. data/spec/unit/node_map_spec.rb +34 -0
  181. data/spec/unit/property_spec.rb +13 -13
  182. data/spec/unit/provider/group/dscl_spec.rb +14 -5
  183. data/spec/unit/provider/ifconfig_spec.rb +10 -3
  184. data/spec/unit/provider/remote_file/http_spec.rb +23 -19
  185. data/spec/unit/provider/service/solaris_smf_service_spec.rb +6 -5
  186. data/spec/unit/provider/user/dscl_spec.rb +26 -0
  187. data/spec/unit/provider/windows_task_spec.rb +148 -4
  188. data/spec/unit/provider_spec.rb +1 -1
  189. data/spec/unit/resource/apt_package_spec.rb +1 -1
  190. data/spec/unit/resource/bash_spec.rb +8 -10
  191. data/spec/unit/resource/batch_spec.rb +1 -1
  192. data/spec/unit/resource/cab_package_spec.rb +19 -1
  193. data/spec/unit/resource/chef_gem_spec.rb +3 -3
  194. data/spec/unit/resource/chocolatey_package_spec.rb +10 -10
  195. data/spec/unit/resource/conditional_spec.rb +2 -2
  196. data/spec/unit/resource/cookbook_file_spec.rb +24 -30
  197. data/spec/unit/resource/cron_spec.rb +79 -82
  198. data/spec/unit/resource/csh_spec.rb +8 -10
  199. data/spec/unit/resource/deploy_spec.rb +1 -1
  200. data/spec/unit/resource/directory_spec.rb +28 -31
  201. data/spec/unit/resource/dnf_package_spec.rb +9 -9
  202. data/spec/unit/resource/env_spec.rb +7 -7
  203. data/spec/unit/resource/erl_call_spec.rb +9 -9
  204. data/spec/unit/resource/execute_spec.rb +6 -6
  205. data/spec/unit/resource/file/verification_spec.rb +18 -4
  206. data/spec/unit/resource/file_spec.rb +53 -56
  207. data/spec/unit/resource/freebsd_package_spec.rb +7 -7
  208. data/spec/unit/resource/gem_package_spec.rb +1 -1
  209. data/spec/unit/resource/git_spec.rb +7 -9
  210. data/spec/unit/resource/group_spec.rb +60 -70
  211. data/spec/unit/resource/http_request_spec.rb +16 -19
  212. data/spec/unit/resource/ifconfig_spec.rb +3 -3
  213. data/spec/unit/resource/ips_package_spec.rb +3 -5
  214. data/spec/unit/resource/ksh_spec.rb +8 -10
  215. data/spec/unit/resource/launchd_spec.rb +17 -10
  216. data/spec/unit/resource/link_spec.rb +53 -53
  217. data/spec/unit/resource/log_spec.rb +24 -28
  218. data/spec/unit/resource/mdadm_spec.rb +42 -44
  219. data/spec/unit/resource/mount_spec.rb +97 -99
  220. data/spec/unit/resource/msu_package_spec.rb +14 -8
  221. data/spec/unit/resource/ohai_spec.rb +15 -17
  222. data/spec/unit/resource/openbsd_package_spec.rb +3 -3
  223. data/spec/unit/resource/osx_profile_spec.rb +7 -7
  224. data/spec/unit/resource/package_spec.rb +36 -40
  225. data/spec/unit/resource/perl_spec.rb +8 -11
  226. data/spec/unit/resource/portage_package_spec.rb +8 -10
  227. data/spec/unit/resource/powershell_package_spec.rb +9 -9
  228. data/spec/unit/resource/python_spec.rb +8 -11
  229. data/spec/unit/resource/reboot_spec.rb +50 -0
  230. data/spec/unit/resource/registry_key_spec.rb +84 -98
  231. data/spec/unit/resource/remote_directory_spec.rb +40 -42
  232. data/spec/unit/resource/remote_file_spec.rb +78 -80
  233. data/spec/unit/resource/route_spec.rb +42 -44
  234. data/spec/unit/resource/rpm_package_spec.rb +5 -7
  235. data/spec/unit/resource/ruby_block_spec.rb +14 -16
  236. data/spec/unit/resource/ruby_spec.rb +8 -12
  237. data/spec/unit/resource/scm_spec.rb +66 -69
  238. data/spec/unit/resource/script_spec.rb +1 -1
  239. data/spec/unit/resource/service_spec.rb +80 -83
  240. data/spec/unit/resource/smartos_package_spec.rb +5 -0
  241. data/spec/unit/resource/solaris_package_spec.rb +3 -5
  242. data/spec/unit/resource/subversion_spec.rb +18 -16
  243. data/spec/unit/resource/systemd_unit_spec.rb +50 -54
  244. data/spec/unit/resource/template_spec.rb +56 -61
  245. data/spec/unit/resource/user_spec.rb +47 -53
  246. data/spec/unit/resource/windows_package_spec.rb +1 -1
  247. data/spec/unit/resource/windows_path_spec.rb +11 -8
  248. data/spec/unit/resource/windows_task_spec.rb +129 -33
  249. data/spec/unit/resource/yum_package_spec.rb +1 -1
  250. data/spec/unit/resource/yum_repository_spec.rb +61 -8
  251. data/spec/unit/resource/zypper_repository_spec.rb +17 -18
  252. data/spec/unit/util/selinux_spec.rb +3 -6
  253. data/tasks/dependencies.rb +0 -5
  254. data/tasks/rspec.rb +1 -1
  255. metadata +7 -19
  256. data/acceptance/.DS_Store +0 -0
  257. data/acceptance/.bundle/config +0 -2
  258. data/acceptance/top-cookbooks/.kitchen.docker.yml +0 -13
  259. data/acceptance/top-cookbooks/.kitchen.git.yml +0 -11
  260. data/distro/.DS_Store +0 -0
  261. data/lib/.DS_Store +0 -0
  262. data/lib/chef/.DS_Store +0 -0
  263. data/lib/chef/knife/.DS_Store +0 -0
  264. data/lib/chef/mixin/.DS_Store +0 -0
  265. data/spec/.DS_Store +0 -0
  266. data/spec/functional/.DS_Store +0 -0
  267. data/spec/support/.DS_Store +0 -0
  268. data/spec/unit/.DS_Store +0 -0
  269. data/tasks/.DS_Store +0 -0
@@ -78,7 +78,7 @@ describe Chef::Resource::YumPackage, "arch" do
78
78
  @resource = Chef::Resource::YumPackage.new("foo")
79
79
  end
80
80
 
81
- it "should set the arch variable to whatever is passed in" do
81
+ it "sets the arch variable to whatever is passed in" do
82
82
  @resource.arch("i386")
83
83
  expect(@resource.arch).to eql("i386")
84
84
  end
@@ -24,25 +24,78 @@ describe Chef::Resource::YumRepository do
24
24
  let(:run_context) { Chef::RunContext.new(node, {}, events) }
25
25
  let(:resource) { Chef::Resource::YumRepository.new("multiverse", run_context) }
26
26
 
27
- context "on linux", :linux_only do
28
- it "should create a new Chef::Resource::YumRepository" do
29
- expect(resource).to be_a_kind_of(Chef::Resource)
30
- expect(resource).to be_a_kind_of(Chef::Resource::YumRepository)
31
- end
27
+ it "has a resource_name of :yum_repository" do
28
+ expect(resource.resource_name).to eq(:yum_repository)
29
+ end
30
+
31
+ it "the repositoryid property is the name_property" do
32
+ expect(resource.repositoryid).to eq("multiverse")
33
+ end
34
+
35
+ it "the timeout property expects numeric Strings" do
36
+ expect { resource.timeout "123" }.not_to raise_error(ArgumentError)
37
+ expect { resource.timeout "123foo" }.to raise_error(ArgumentError)
38
+ end
39
+
40
+ it "the priority property expects numeric Strings from '1' to '99'" do
41
+ expect { resource.priority "99" }.not_to raise_error(ArgumentError)
42
+ expect { resource.priority "1" }.not_to raise_error(ArgumentError)
43
+ expect { resource.priority "100" }.to raise_error(ArgumentError)
44
+ expect { resource.priority "0" }.to raise_error(ArgumentError)
45
+ end
46
+
47
+ it "the failovermethod property accepts 'priority' or 'roundrobin'" do
48
+ expect { resource.failovermethod "priority" }.not_to raise_error(ArgumentError)
49
+ expect { resource.failovermethod "roundrobin" }.not_to raise_error(ArgumentError)
50
+ expect { resource.failovermethod "bob" }.to raise_error(ArgumentError)
51
+ end
52
+
53
+ it "the http_caching property accepts 'packages', 'all', or 'none'" do
54
+ expect { resource.http_caching "packages" }.not_to raise_error(ArgumentError)
55
+ expect { resource.http_caching "all" }.not_to raise_error(ArgumentError)
56
+ expect { resource.http_caching "none" }.not_to raise_error(ArgumentError)
57
+ expect { resource.http_caching "bob" }.to raise_error(ArgumentError)
58
+ end
59
+
60
+ it "the metadata_expire property accepts a time value or 'never'" do
61
+ expect { resource.metadata_expire "100" }.not_to raise_error(ArgumentError)
62
+ expect { resource.metadata_expire "100d" }.not_to raise_error(ArgumentError)
63
+ expect { resource.metadata_expire "100h" }.not_to raise_error(ArgumentError)
64
+ expect { resource.metadata_expire "100m" }.not_to raise_error(ArgumentError)
65
+ expect { resource.metadata_expire "never" }.not_to raise_error(ArgumentError)
66
+ expect { resource.metadata_expire "100s" }.to raise_error(ArgumentError)
67
+ end
32
68
 
33
- it "should resolve to a Noop class when yum is not found" do
69
+ it "the mirror_expire property accepts a time value" do
70
+ expect { resource.mirror_expire "100" }.not_to raise_error(ArgumentError)
71
+ expect { resource.mirror_expire "100d" }.not_to raise_error(ArgumentError)
72
+ expect { resource.mirror_expire "100h" }.not_to raise_error(ArgumentError)
73
+ expect { resource.mirror_expire "100m" }.not_to raise_error(ArgumentError)
74
+ expect { resource.mirror_expire "never" }.to raise_error(ArgumentError)
75
+ end
76
+
77
+ it "the mirrorlist_expire property accepts a time value" do
78
+ expect { resource.mirrorlist_expire "100" }.not_to raise_error(ArgumentError)
79
+ expect { resource.mirrorlist_expire "100d" }.not_to raise_error(ArgumentError)
80
+ expect { resource.mirrorlist_expire "100h" }.not_to raise_error(ArgumentError)
81
+ expect { resource.mirrorlist_expire "100m" }.not_to raise_error(ArgumentError)
82
+ expect { resource.mirrorlist_expire "never" }.to raise_error(ArgumentError)
83
+ end
84
+
85
+ context "on linux", :linux_only do
86
+ it "resolves to a Noop class when yum is not found" do
34
87
  expect(Chef::Provider::YumRepository).to receive(:which).with("yum").and_return(false)
35
88
  expect(resource.provider_for_action(:add)).to be_a(Chef::Provider::Noop)
36
89
  end
37
90
 
38
- it "should resolve to a YumRepository class when yum is found" do
91
+ it "resolves to a YumRepository class when yum is found" do
39
92
  expect(Chef::Provider::YumRepository).to receive(:which).with("yum").and_return(true)
40
93
  expect(resource.provider_for_action(:add)).to be_a(Chef::Provider::YumRepository)
41
94
  end
42
95
  end
43
96
 
44
97
  context "on windows", :windows_only do
45
- it "should resolve to a NoOp provider" do
98
+ it "resolves to a NoOp provider" do
46
99
  expect(resource.provider_for_action(:add)).to be_a(Chef::Provider::Noop)
47
100
  end
48
101
  end
@@ -24,28 +24,27 @@ describe Chef::Resource::ZypperRepository do
24
24
  let(:run_context) { Chef::RunContext.new(node, {}, events) }
25
25
  let(:resource) { Chef::Resource::ZypperRepository.new("repo-source", run_context) }
26
26
 
27
- context "on linux", :linux_only do
28
- it "should create a new Chef::Resource::ZypperRepository" do
29
- expect(resource).to be_a_kind_of(Chef::Resource)
30
- expect(resource).to be_a_kind_of(Chef::Resource::ZypperRepository)
31
- end
27
+ it "has a resource_name of :zypper_repository" do
28
+ expect(resource.resource_name).to eq(:zypper_repository)
29
+ end
32
30
 
33
- it "should have a name of repo-source" do
34
- expect(resource.name).to eql("repo-source")
35
- end
31
+ it "repo_name is the name_property" do
32
+ expect(resource.repo_name).to eql("repo-source")
33
+ end
36
34
 
37
- it "should have a default action of create" do
38
- expect(resource.action).to eql([:create])
39
- end
35
+ it "has a default action of create" do
36
+ expect(resource.action).to eql([:create])
37
+ end
40
38
 
41
- it "supports all valid actions" do
42
- expect { resource.action :add }.not_to raise_error
43
- expect { resource.action :remove }.not_to raise_error
44
- expect { resource.action :create }.not_to raise_error
45
- expect { resource.action :refresh }.not_to raise_error
46
- expect { resource.action :delete }.to raise_error(ArgumentError)
47
- end
39
+ it "supports all valid actions" do
40
+ expect { resource.action :add }.not_to raise_error
41
+ expect { resource.action :remove }.not_to raise_error
42
+ expect { resource.action :create }.not_to raise_error
43
+ expect { resource.action :refresh }.not_to raise_error
44
+ expect { resource.action :delete }.to raise_error(ArgumentError)
45
+ end
48
46
 
47
+ context "on linux", :linux_only do
49
48
  it "resolves to a Noop class when on non-linux OS" do
50
49
  node.automatic[:os] = "windows"
51
50
  node.automatic[:platform_family] = "windows"
@@ -124,24 +124,21 @@ describe Chef::Util::Selinux do
124
124
  end
125
125
 
126
126
  it "should call restorecon non-recursive by default" do
127
- restorecon_command = "#{@restorecon_enabled_path} -R \"#{path}\""
128
- expect(@test_instance).to receive(:shell_out!).twice.with(restorecon_command)
127
+ expect(@test_instance).to receive(:shell_out_compact!).twice.with(@restorecon_enabled_path, [ "-R", path ])
129
128
  @test_instance.restore_security_context(path)
130
129
  expect(File).not_to receive(:executable?)
131
130
  @test_instance.restore_security_context(path)
132
131
  end
133
132
 
134
133
  it "should call restorecon recursive when recursive is set" do
135
- restorecon_command = "#{@restorecon_enabled_path} -R -r \"#{path}\""
136
- expect(@test_instance).to receive(:shell_out!).twice.with(restorecon_command)
134
+ expect(@test_instance).to receive(:shell_out_compact!).twice.with(@restorecon_enabled_path, [ "-R", "-r", path ])
137
135
  @test_instance.restore_security_context(path, true)
138
136
  expect(File).not_to receive(:executable?)
139
137
  @test_instance.restore_security_context(path, true)
140
138
  end
141
139
 
142
140
  it "should call restorecon non-recursive when recursive is not set" do
143
- restorecon_command = "#{@restorecon_enabled_path} -R \"#{path}\""
144
- expect(@test_instance).to receive(:shell_out!).twice.with(restorecon_command)
141
+ expect(@test_instance).to receive(:shell_out_compact!).twice.with(@restorecon_enabled_path, [ "-R", path ])
145
142
  @test_instance.restore_security_context(path)
146
143
  expect(File).not_to receive(:executable?)
147
144
  @test_instance.restore_security_context(path)
@@ -39,8 +39,6 @@ namespace :dependencies do
39
39
  dependencies:update_gemfile_lock
40
40
  dependencies:update_omnibus_gemfile_lock
41
41
  dependencies:update_acceptance_gemfile_lock
42
- dependencies:update_kitchen_tests_gemfile_lock
43
- dependencies:update_kitchen_tests_berksfile_lock
44
42
  dependencies:update_audit_tests_berksfile_lock
45
43
  }
46
44
 
@@ -84,9 +82,6 @@ namespace :dependencies do
84
82
  bundle_update_locked_multiplatform_task :update_gemfile_lock, "."
85
83
  bundle_update_locked_multiplatform_task :update_omnibus_gemfile_lock, "omnibus"
86
84
  bundle_update_task :update_acceptance_gemfile_lock, "acceptance"
87
- bundle_update_locked_multiplatform_task :update_kitchen_tests_gemfile_lock, "kitchen-tests"
88
-
89
- berks_update_task :update_kitchen_tests_berksfile_lock, "kitchen-tests"
90
85
  berks_update_task :update_audit_tests_berksfile_lock, "kitchen-tests/cookbooks/audit_test"
91
86
 
92
87
  end
@@ -25,7 +25,7 @@ CHEF_ROOT = File.join(File.dirname(__FILE__), "..")
25
25
  begin
26
26
  require "rspec/core/rake_task"
27
27
 
28
- desc "Run specs for Chef's Components"
28
+ desc "Run specs for Chef's Components (chef-config)"
29
29
  task :component_specs do
30
30
  Dir.chdir("chef-config") do
31
31
  Bundler.with_clean_env do
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: 13.6.4
4
+ version: 13.7.16
5
5
  platform: universal-mingw32
6
6
  authors:
7
7
  - Adam Jacob
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-11-07 00:00:00.000000000 Z
11
+ date: 2018-01-23 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: 13.6.4
19
+ version: 13.7.16
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: 13.6.4
26
+ version: 13.7.16
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: mixlib-cli
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -624,8 +624,6 @@ files:
624
624
  - README.md
625
625
  - Rakefile
626
626
  - VERSION
627
- - acceptance/.DS_Store
628
- - acceptance/.bundle/config
629
627
  - acceptance/.gitignore
630
628
  - acceptance/.shared/kitchen_acceptance/.kitchen.digitalocean.yml
631
629
  - acceptance/.shared/kitchen_acceptance/.kitchen.ec2.yml
@@ -678,8 +676,6 @@ files:
678
676
  - acceptance/top-cookbooks/.acceptance/acceptance-cookbook/recipes/verify.rb
679
677
  - acceptance/top-cookbooks/.gitignore
680
678
  - acceptance/top-cookbooks/.kitchen.chocolatey.yml
681
- - acceptance/top-cookbooks/.kitchen.docker.yml
682
- - acceptance/top-cookbooks/.kitchen.git.yml
683
679
  - acceptance/top-cookbooks/.kitchen.iis.yml
684
680
  - acceptance/top-cookbooks/.kitchen.learn-the-basics-rhel.yml
685
681
  - acceptance/top-cookbooks/.kitchen.learn-the-basics-ubuntu.yml
@@ -711,7 +707,6 @@ files:
711
707
  - bin/knife
712
708
  - chef-universal-mingw32.gemspec
713
709
  - chef.gemspec
714
- - distro/.DS_Store
715
710
  - distro/common/html/_sources/ctl_chef_client.txt
716
711
  - distro/common/html/_sources/ctl_chef_server.txt
717
712
  - distro/common/html/_sources/ctl_chef_shell.txt
@@ -878,9 +873,7 @@ files:
878
873
  - distro/powershell/chef/chef.psm1
879
874
  - ext/win32-eventlog/Rakefile
880
875
  - ext/win32-eventlog/chef-log.man
881
- - lib/.DS_Store
882
876
  - lib/chef.rb
883
- - lib/chef/.DS_Store
884
877
  - lib/chef/api_client.rb
885
878
  - lib/chef/api_client/registration.rb
886
879
  - lib/chef/api_client_v1.rb
@@ -1128,7 +1121,6 @@ files:
1128
1121
  - lib/chef/json_compat.rb
1129
1122
  - lib/chef/key.rb
1130
1123
  - lib/chef/knife.rb
1131
- - lib/chef/knife/.DS_Store
1132
1124
  - lib/chef/knife/bootstrap.rb
1133
1125
  - lib/chef/knife/bootstrap/chef_vault_handler.rb
1134
1126
  - lib/chef/knife/bootstrap/client_builder.rb
@@ -1282,7 +1274,6 @@ files:
1282
1274
  - lib/chef/log/syslog.rb
1283
1275
  - lib/chef/log/winevt.rb
1284
1276
  - lib/chef/mash.rb
1285
- - lib/chef/mixin/.DS_Store
1286
1277
  - lib/chef/mixin/api_version_request_handling.rb
1287
1278
  - lib/chef/mixin/checksum.rb
1288
1279
  - lib/chef/mixin/convert_to_class_name.rb
@@ -1696,7 +1687,6 @@ files:
1696
1687
  - lib/chef/win32/unicode.rb
1697
1688
  - lib/chef/win32/version.rb
1698
1689
  - lib/chef/workstation_config_loader.rb
1699
- - spec/.DS_Store
1700
1690
  - spec/data/apt/chef-integration-test-1.0/debian/changelog
1701
1691
  - spec/data/apt/chef-integration-test-1.0/debian/compat
1702
1692
  - spec/data/apt/chef-integration-test-1.0/debian/control
@@ -1789,6 +1779,7 @@ files:
1789
1779
  - spec/data/checksum_cache/chef-file--tmp-chef-rendered-template20100929-10863-xi0l6h-0
1790
1780
  - spec/data/client.d_00/00-foo.rb
1791
1781
  - spec/data/client.d_00/01-bar.rb
1782
+ - spec/data/client.d_00/02-strings.rb
1792
1783
  - spec/data/client.d_00/bar
1793
1784
  - spec/data/client.d_01/foo/bar.rb
1794
1785
  - spec/data/client.d_02/foo.rb/foo.txt
@@ -2034,7 +2025,6 @@ files:
2034
2025
  - spec/data/trusted_certs/intermediate.pem
2035
2026
  - spec/data/trusted_certs/opscode.pem
2036
2027
  - spec/data/trusted_certs/root.pem
2037
- - spec/functional/.DS_Store
2038
2028
  - spec/functional/application_spec.rb
2039
2029
  - spec/functional/assets/PkgA.1.0.0.0.bff
2040
2030
  - spec/functional/assets/PkgA.2.0.0.0.bff
@@ -2215,7 +2205,6 @@ files:
2215
2205
  - spec/stress/win32/file_spec.rb
2216
2206
  - spec/stress/win32/memory_spec.rb
2217
2207
  - spec/stress/win32/security_spec.rb
2218
- - spec/support/.DS_Store
2219
2208
  - spec/support/chef_helpers.rb
2220
2209
  - spec/support/key_helpers.rb
2221
2210
  - spec/support/lib/chef/provider/easy.rb
@@ -2270,7 +2259,6 @@ files:
2270
2259
  - spec/support/shared/unit/user_and_client_shared.rb
2271
2260
  - spec/support/shared/unit/windows_script_resource.rb
2272
2261
  - spec/tiny_server.rb
2273
- - spec/unit/.DS_Store
2274
2262
  - spec/unit/api_client/registration_spec.rb
2275
2263
  - spec/unit/api_client_spec.rb
2276
2264
  - spec/unit/api_client_v1_spec.rb
@@ -2711,6 +2699,7 @@ files:
2711
2699
  - spec/unit/resource/powershell_package_spec.rb
2712
2700
  - spec/unit/resource/powershell_script_spec.rb
2713
2701
  - spec/unit/resource/python_spec.rb
2702
+ - spec/unit/resource/reboot_spec.rb
2714
2703
  - spec/unit/resource/registry_key_spec.rb
2715
2704
  - spec/unit/resource/remote_directory_spec.rb
2716
2705
  - spec/unit/resource/remote_file_spec.rb
@@ -2789,7 +2778,6 @@ files:
2789
2778
  - spec/unit/win32/registry_spec.rb
2790
2779
  - spec/unit/win32/security_spec.rb
2791
2780
  - spec/unit/windows_service_spec.rb
2792
- - tasks/.DS_Store
2793
2781
  - tasks/announce.rb
2794
2782
  - tasks/bin/run_external_test
2795
2783
  - tasks/cbgb.rb
@@ -2818,7 +2806,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
2818
2806
  version: '0'
2819
2807
  requirements: []
2820
2808
  rubyforge_project:
2821
- rubygems_version: 2.6.13
2809
+ rubygems_version: 2.7.3
2822
2810
  signing_key:
2823
2811
  specification_version: 4
2824
2812
  summary: A systems integration framework, built to bring the benefits of configuration
Binary file
@@ -1,2 +0,0 @@
1
- ---
2
- BUNDLE_FROZEN: '1'
@@ -1,13 +0,0 @@
1
- suites:
2
- - name: docker-default
3
- attributes:
4
- apt-docker:
5
- repos:
6
- docker-main:
7
- keyserver: hkp://ha.pool.sks-keyservers.net
8
- docker:
9
- version: 1.10.0
10
- run_list:
11
- - recipe[apt]
12
- - recipe[chef-apt-docker]
13
- includes: [ubuntu-14.04]
@@ -1,11 +0,0 @@
1
- suites:
2
- - name: git-default
3
- # Ubuntu images need to run apt update
4
- run_list: ["recipe[apt]","recipe[git]"]
5
- includes: [ubuntu-14.04]
6
- - name: git-source
7
- run_list: ["recipe[git::source]"]
8
- includes: [nonexistent]
9
- - name: git-default-windows
10
- run_list: ["recipe[git]"]
11
- includes: [windows-2012r2]
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file