chef 12.4.3 → 12.16.42

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1730) hide show
  1. checksums.yaml +4 -4
  2. data/CONTRIBUTING.md +95 -156
  3. data/Gemfile +94 -0
  4. data/README.md +201 -41
  5. data/Rakefile +35 -128
  6. data/VERSION +1 -0
  7. data/acceptance/.gitignore +3 -0
  8. data/acceptance/.shared/kitchen_acceptance/.kitchen.digitalocean.yml +33 -0
  9. data/acceptance/.shared/kitchen_acceptance/.kitchen.ec2.yml +282 -0
  10. data/acceptance/.shared/kitchen_acceptance/.kitchen.vagrant.yml +59 -0
  11. data/acceptance/.shared/kitchen_acceptance/libraries/kitchen.rb +68 -0
  12. data/acceptance/.shared/kitchen_acceptance/metadata.rb +1 -0
  13. data/acceptance/Gemfile +16 -0
  14. data/acceptance/Gemfile.lock +248 -0
  15. data/acceptance/README.md +137 -0
  16. data/acceptance/basics/.acceptance/acceptance-cookbook/.gitignore +2 -0
  17. data/acceptance/basics/.acceptance/acceptance-cookbook/metadata.rb +3 -0
  18. data/acceptance/basics/.acceptance/acceptance-cookbook/recipes/destroy.rb +1 -0
  19. data/acceptance/basics/.acceptance/acceptance-cookbook/recipes/provision.rb +1 -0
  20. data/acceptance/basics/.acceptance/acceptance-cookbook/recipes/verify.rb +1 -0
  21. data/acceptance/basics/.kitchen.yml +4 -0
  22. data/acceptance/basics/test/integration/chef-current-install/serverspec/chef_client_spec.rb +19 -0
  23. data/acceptance/basics/test/integration/chef-current-install/serverspec/spec_helper.rb +6 -0
  24. data/acceptance/basics/test/integration/helpers/serverspec/Gemfile +8 -0
  25. data/acceptance/data-collector/.acceptance/acceptance-cookbook/.gitignore +2 -0
  26. data/acceptance/data-collector/.acceptance/acceptance-cookbook/metadata.rb +3 -0
  27. data/acceptance/data-collector/.acceptance/acceptance-cookbook/recipes/destroy.rb +2 -0
  28. data/acceptance/data-collector/.acceptance/acceptance-cookbook/recipes/provision.rb +2 -0
  29. data/acceptance/data-collector/.acceptance/acceptance-cookbook/recipes/verify.rb +2 -0
  30. data/acceptance/data-collector/.acceptance/data-collector-test/.gitignore +16 -0
  31. data/acceptance/data-collector/.acceptance/data-collector-test/Berksfile +3 -0
  32. data/acceptance/data-collector/.acceptance/data-collector-test/files/default/api.rb +85 -0
  33. data/acceptance/data-collector/.acceptance/data-collector-test/files/default/apigemfile +3 -0
  34. data/acceptance/data-collector/.acceptance/data-collector-test/files/default/client-rb-both-mode.rb +4 -0
  35. data/acceptance/data-collector/.acceptance/data-collector-test/files/default/client-rb-client-mode.rb +4 -0
  36. data/acceptance/data-collector/.acceptance/data-collector-test/files/default/client-rb-no-endpoint.rb +2 -0
  37. data/acceptance/data-collector/.acceptance/data-collector-test/files/default/client-rb-solo-mode.rb +4 -0
  38. data/acceptance/data-collector/.acceptance/data-collector-test/files/default/config.ru +2 -0
  39. data/acceptance/data-collector/.acceptance/data-collector-test/metadata.rb +7 -0
  40. data/acceptance/data-collector/.acceptance/data-collector-test/recipes/default.rb +38 -0
  41. data/acceptance/data-collector/.kitchen.yml +9 -0
  42. data/acceptance/data-collector/Berksfile +3 -0
  43. data/acceptance/data-collector/test/integration/default/serverspec/default_spec.rb +204 -0
  44. data/acceptance/data-collector/test/integration/helpers/serverspec/Gemfile +8 -0
  45. data/acceptance/fips/.acceptance/acceptance-cookbook/.gitignore +2 -0
  46. data/acceptance/fips/.acceptance/acceptance-cookbook/metadata.rb +2 -0
  47. data/acceptance/fips/.acceptance/acceptance-cookbook/recipes/destroy.rb +1 -0
  48. data/acceptance/fips/.acceptance/acceptance-cookbook/recipes/provision.rb +1 -0
  49. data/acceptance/fips/.acceptance/acceptance-cookbook/recipes/verify.rb +1 -0
  50. data/acceptance/fips/.kitchen.yml +8 -0
  51. data/acceptance/fips/test/integration/fips-integration/serverspec/Gemfile +9 -0
  52. data/acceptance/fips/test/integration/fips-integration/serverspec/fips-integration_spec.rb +52 -0
  53. data/acceptance/fips/test/integration/fips-unit-functional/serverspec/Gemfile +7 -0
  54. data/acceptance/fips/test/integration/fips-unit-functional/serverspec/fips-unit-functional_spec.rb +56 -0
  55. data/acceptance/omnitruck/.acceptance/acceptance-cookbook/.gitignore +2 -0
  56. data/acceptance/omnitruck/.acceptance/acceptance-cookbook/metadata.rb +1 -0
  57. data/acceptance/omnitruck/.acceptance/acceptance-cookbook/recipes/destroy.rb +1 -0
  58. data/acceptance/omnitruck/.acceptance/acceptance-cookbook/recipes/provision.rb +1 -0
  59. data/acceptance/omnitruck/.acceptance/acceptance-cookbook/recipes/verify.rb +61 -0
  60. data/acceptance/top-cookbooks/.acceptance/acceptance-cookbook/.gitignore +2 -0
  61. data/acceptance/top-cookbooks/.acceptance/acceptance-cookbook/libraries/cookbook_kitchen.rb +43 -0
  62. data/acceptance/top-cookbooks/.acceptance/acceptance-cookbook/libraries/top_cookbooks.rb +45 -0
  63. data/acceptance/top-cookbooks/.acceptance/acceptance-cookbook/metadata.rb +3 -0
  64. data/acceptance/top-cookbooks/.acceptance/acceptance-cookbook/recipes/destroy.rb +1 -0
  65. data/acceptance/top-cookbooks/.acceptance/acceptance-cookbook/recipes/provision.rb +1 -0
  66. data/acceptance/top-cookbooks/.acceptance/acceptance-cookbook/recipes/verify.rb +1 -0
  67. data/acceptance/top-cookbooks/.gitignore +1 -0
  68. data/acceptance/top-cookbooks/.kitchen.chocolatey.yml +6 -0
  69. data/acceptance/top-cookbooks/.kitchen.docker.yml +9 -0
  70. data/acceptance/top-cookbooks/.kitchen.git.yml +11 -0
  71. data/acceptance/top-cookbooks/.kitchen.iis.yml +4 -0
  72. data/acceptance/top-cookbooks/.kitchen.learn-the-basics-rhel.yml +7 -0
  73. data/acceptance/top-cookbooks/.kitchen.learn-the-basics-ubuntu.yml +7 -0
  74. data/acceptance/top-cookbooks/.kitchen.learn-the-basics-windows.yml +7 -0
  75. data/acceptance/top-cookbooks/.kitchen.powershell.yml +4 -0
  76. data/acceptance/top-cookbooks/.kitchen.sql_server.yml +5 -0
  77. data/acceptance/top-cookbooks/.kitchen.winbox.yml +8 -0
  78. data/acceptance/top-cookbooks/.kitchen.windows.yml +38 -0
  79. data/acceptance/trivial/.acceptance/acceptance-cookbook/.gitignore +2 -0
  80. data/acceptance/trivial/.acceptance/acceptance-cookbook/metadata.rb +2 -0
  81. data/acceptance/trivial/.acceptance/acceptance-cookbook/recipes/destroy.rb +1 -0
  82. data/acceptance/trivial/.acceptance/acceptance-cookbook/recipes/provision.rb +1 -0
  83. data/acceptance/trivial/.acceptance/acceptance-cookbook/recipes/verify.rb +1 -0
  84. data/acceptance/trivial/.kitchen.yml +7 -0
  85. data/acceptance/trivial/test/integration/chef-current-install/inspec/chef_client_spec.rb +5 -0
  86. data/acceptance/windows-service/.acceptance/acceptance-cookbook/.gitignore +2 -0
  87. data/acceptance/windows-service/.acceptance/acceptance-cookbook/metadata.rb +2 -0
  88. data/acceptance/windows-service/.acceptance/acceptance-cookbook/recipes/destroy.rb +1 -0
  89. data/acceptance/windows-service/.acceptance/acceptance-cookbook/recipes/provision.rb +1 -0
  90. data/acceptance/windows-service/.acceptance/acceptance-cookbook/recipes/verify.rb +1 -0
  91. data/acceptance/windows-service/.kitchen.yml +7 -0
  92. data/acceptance/windows-service/test/integration/chef-windows-service/inspec/chef_windows_service_spec.rb +58 -0
  93. data/bin/chef-apply +3 -3
  94. data/bin/chef-client +5 -5
  95. data/bin/chef-shell +1 -4
  96. data/bin/chef-solo +4 -4
  97. data/bin/knife +4 -5
  98. data/chef-universal-mingw32.gemspec +24 -0
  99. data/chef.gemspec +61 -0
  100. data/distro/common/html/_static/basic.css +1 -1
  101. data/distro/common/html/_static/doctools.js +1 -1
  102. data/distro/common/html/_static/searchtools.js +1 -1
  103. data/distro/common/html/_static/websupport.js +1 -1
  104. data/distro/common/html/knife_bootstrap.html +1 -1
  105. data/distro/common/html/knife_cookbook_site.html +18 -18
  106. data/distro/common/man/man1/README.md +2 -2
  107. data/distro/common/man/man1/knife-client.1 +1 -1
  108. data/distro/common/man/man1/knife-cookbook-site.1 +11 -11
  109. data/distro/common/markdown/man8/chef-client.mkd +2 -0
  110. data/lib/chef/api_client/registration.rb +42 -13
  111. data/lib/chef/api_client.rb +26 -25
  112. data/lib/chef/api_client_v1.rb +30 -30
  113. data/lib/chef/application/apply.rb +54 -29
  114. data/lib/chef/application/client.rb +135 -77
  115. data/lib/chef/application/exit_code.rb +235 -0
  116. data/lib/chef/application/knife.rb +33 -19
  117. data/lib/chef/application/solo.rb +113 -47
  118. data/lib/chef/application/windows_service.rb +49 -34
  119. data/lib/chef/application/windows_service_manager.rb +40 -34
  120. data/lib/chef/application.rb +78 -115
  121. data/lib/chef/applications.rb +4 -4
  122. data/lib/chef/audit/audit_event_proxy.rb +4 -4
  123. data/lib/chef/audit/audit_reporter.rb +13 -11
  124. data/lib/chef/audit/control_group_data.rb +9 -10
  125. data/lib/chef/audit/logger.rb +3 -3
  126. data/lib/chef/audit/rspec_formatter.rb +2 -2
  127. data/lib/chef/audit/runner.rb +17 -15
  128. data/lib/chef/chef_class.rb +45 -5
  129. data/lib/chef/chef_fs/chef_fs_data_store.rb +493 -103
  130. data/lib/chef/chef_fs/command_line.rb +50 -42
  131. data/lib/chef/chef_fs/config.rb +74 -45
  132. data/lib/chef/chef_fs/data_handler/acl_data_handler.rb +9 -9
  133. data/lib/chef/chef_fs/data_handler/client_data_handler.rb +13 -11
  134. data/lib/chef/chef_fs/data_handler/client_key_data_handler.rb +11 -0
  135. data/lib/chef/chef_fs/data_handler/container_data_handler.rb +13 -7
  136. data/lib/chef/chef_fs/data_handler/cookbook_data_handler.rb +13 -13
  137. data/lib/chef/chef_fs/data_handler/data_bag_item_data_handler.rb +18 -12
  138. data/lib/chef/chef_fs/data_handler/data_handler_base.rb +24 -21
  139. data/lib/chef/chef_fs/data_handler/environment_data_handler.rb +13 -13
  140. data/lib/chef/chef_fs/data_handler/group_data_handler.rb +18 -18
  141. data/lib/chef/chef_fs/data_handler/node_data_handler.rb +13 -13
  142. data/lib/chef/chef_fs/data_handler/organization_data_handler.rb +16 -10
  143. data/lib/chef/chef_fs/data_handler/organization_invites_data_handler.rb +2 -2
  144. data/lib/chef/chef_fs/data_handler/organization_members_data_handler.rb +2 -2
  145. data/lib/chef/chef_fs/data_handler/policy_data_handler.rb +36 -3
  146. data/lib/chef/chef_fs/data_handler/policy_group_data_handler.rb +33 -0
  147. data/lib/chef/chef_fs/data_handler/role_data_handler.rb +15 -15
  148. data/lib/chef/chef_fs/data_handler/user_data_handler.rb +11 -11
  149. data/lib/chef/chef_fs/file_pattern.rb +36 -47
  150. data/lib/chef/chef_fs/file_system/base_fs_dir.rb +4 -9
  151. data/lib/chef/chef_fs/file_system/base_fs_object.rb +19 -12
  152. data/lib/chef/chef_fs/file_system/chef_server/acl_dir.rb +65 -0
  153. data/lib/chef/chef_fs/file_system/chef_server/acl_entry.rb +67 -0
  154. data/lib/chef/chef_fs/file_system/chef_server/acls_dir.rb +75 -0
  155. data/lib/chef/chef_fs/file_system/chef_server/chef_server_root_dir.rb +196 -0
  156. data/lib/chef/chef_fs/file_system/chef_server/cookbook_artifact_dir.rb +38 -0
  157. data/lib/chef/chef_fs/file_system/chef_server/cookbook_artifacts_dir.rb +102 -0
  158. data/lib/chef/chef_fs/file_system/chef_server/cookbook_dir.rb +222 -0
  159. data/lib/chef/chef_fs/file_system/chef_server/cookbook_file.rb +80 -0
  160. data/lib/chef/chef_fs/file_system/chef_server/cookbook_subdir.rb +61 -0
  161. data/lib/chef/chef_fs/file_system/chef_server/cookbooks_acl_dir.rb +42 -0
  162. data/lib/chef/chef_fs/file_system/chef_server/cookbooks_dir.rb +101 -0
  163. data/lib/chef/chef_fs/file_system/chef_server/data_bag_dir.rb +76 -0
  164. data/lib/chef/chef_fs/file_system/chef_server/data_bag_entry.rb +19 -0
  165. data/lib/chef/chef_fs/file_system/chef_server/data_bags_dir.rb +69 -0
  166. data/lib/chef/chef_fs/file_system/chef_server/environments_dir.rb +56 -0
  167. data/lib/chef/chef_fs/file_system/chef_server/nodes_dir.rb +53 -0
  168. data/lib/chef/chef_fs/file_system/chef_server/org_entry.rb +35 -0
  169. data/lib/chef/chef_fs/file_system/chef_server/organization_invites_entry.rb +65 -0
  170. data/lib/chef/chef_fs/file_system/chef_server/organization_members_entry.rb +64 -0
  171. data/lib/chef/chef_fs/file_system/chef_server/policies_acl_dir.rb +41 -0
  172. data/lib/chef/chef_fs/file_system/chef_server/policies_dir.rb +160 -0
  173. data/lib/chef/chef_fs/file_system/chef_server/policy_group_entry.rb +135 -0
  174. data/lib/chef/chef_fs/file_system/{operation_not_allowed_error.rb → chef_server/policy_groups_dir.rb} +16 -21
  175. data/lib/chef/chef_fs/file_system/chef_server/policy_revision_entry.rb +38 -0
  176. data/lib/chef/chef_fs/file_system/chef_server/rest_list_dir.rb +178 -0
  177. data/lib/chef/chef_fs/file_system/chef_server/rest_list_entry.rb +197 -0
  178. data/lib/chef/chef_fs/file_system/chef_server/versioned_cookbook_dir.rb +45 -0
  179. data/lib/chef/chef_fs/file_system/chef_server/versioned_cookbooks_dir.rb +107 -0
  180. data/lib/chef/chef_fs/file_system/exceptions.rb +105 -0
  181. data/lib/chef/chef_fs/file_system/memory/memory_dir.rb +53 -0
  182. data/lib/chef/chef_fs/file_system/memory/memory_file.rb +20 -0
  183. data/lib/chef/chef_fs/file_system/memory/memory_root.rb +23 -0
  184. data/lib/chef/chef_fs/file_system/multiplexed_dir.rb +18 -3
  185. data/lib/chef/chef_fs/file_system/nonexistent_fs_object.rb +4 -8
  186. data/lib/chef/chef_fs/file_system/{operation_failed_error.rb → repository/acl.rb} +17 -14
  187. data/lib/chef/chef_fs/file_system/repository/acls_dir.rb +50 -0
  188. data/lib/chef/chef_fs/file_system/repository/acls_sub_dir.rb +38 -0
  189. data/lib/chef/chef_fs/file_system/repository/base_file.rb +155 -0
  190. data/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_artifact_dir.rb +41 -0
  191. data/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_dir.rb +146 -0
  192. data/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_entry.rb +181 -0
  193. data/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_root_dir.rb +218 -0
  194. data/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_versioned_cookbook_dir.rb +42 -0
  195. data/lib/chef/chef_fs/file_system/repository/client.rb +38 -0
  196. data/lib/chef/chef_fs/file_system/repository/client_key.rb +38 -0
  197. data/lib/chef/chef_fs/file_system/{chef_repository_file_system_data_bags_dir.rb → repository/client_keys_dir.rb} +16 -10
  198. data/lib/chef/chef_fs/file_system/repository/client_keys_sub_dir.rb +38 -0
  199. data/lib/chef/chef_fs/file_system/repository/clients_dir.rb +37 -0
  200. data/lib/chef/chef_fs/file_system/repository/container.rb +38 -0
  201. data/lib/chef/chef_fs/file_system/repository/containers_dir.rb +37 -0
  202. data/lib/chef/chef_fs/file_system/repository/cookbook_artifacts_dir.rb +36 -0
  203. data/lib/chef/chef_fs/file_system/repository/cookbooks_dir.rb +51 -0
  204. data/lib/chef/chef_fs/file_system/repository/data_bag.rb +39 -0
  205. data/lib/chef/chef_fs/file_system/repository/data_bag_item.rb +38 -0
  206. data/lib/chef/chef_fs/file_system/repository/data_bags_dir.rb +39 -0
  207. data/lib/chef/chef_fs/file_system/repository/directory.rb +167 -0
  208. data/lib/chef/chef_fs/file_system/repository/environment.rb +38 -0
  209. data/lib/chef/chef_fs/file_system/repository/environments_dir.rb +37 -0
  210. data/lib/chef/chef_fs/file_system/repository/file_system_entry.rb +151 -0
  211. data/lib/chef/chef_fs/file_system/repository/group.rb +38 -0
  212. data/lib/chef/chef_fs/file_system/repository/groups_dir.rb +37 -0
  213. data/lib/chef/chef_fs/file_system/{file_system_error.rb → repository/node.rb} +14 -9
  214. data/lib/chef/chef_fs/file_system/{default_environment_cannot_be_modified_error.rb → repository/nodes_dir.rb} +11 -10
  215. data/lib/chef/chef_fs/file_system/{chef_repository_file_system_policies_dir.rb → repository/policies_dir.rb} +15 -11
  216. data/lib/chef/chef_fs/file_system/repository/policy.rb +38 -0
  217. data/lib/chef/chef_fs/file_system/repository/policy_group.rb +38 -0
  218. data/lib/chef/chef_fs/file_system/repository/policy_groups_dir.rb +37 -0
  219. data/lib/chef/chef_fs/file_system/{already_exists_error.rb → repository/role.rb} +13 -6
  220. data/lib/chef/chef_fs/file_system/repository/roles_dir.rb +37 -0
  221. data/lib/chef/chef_fs/file_system/repository/user.rb +38 -0
  222. data/lib/chef/chef_fs/file_system/repository/users_dir.rb +37 -0
  223. data/lib/chef/chef_fs/file_system/repository/versioned_cookbooks_dir.rb +34 -0
  224. data/lib/chef/chef_fs/file_system.rb +161 -159
  225. data/lib/chef/chef_fs/file_system_cache.rb +80 -0
  226. data/lib/chef/chef_fs/knife.rb +49 -21
  227. data/lib/chef/chef_fs/parallelizer/flatten_enumerable.rb +2 -2
  228. data/lib/chef/chef_fs/parallelizer/parallel_enumerable.rb +7 -11
  229. data/lib/chef/chef_fs/parallelizer.rb +4 -4
  230. data/lib/chef/chef_fs/path_utils.rb +70 -38
  231. data/lib/chef/chef_fs.rb +51 -1
  232. data/lib/chef/client.rb +120 -78
  233. data/lib/chef/config.rb +42 -10
  234. data/lib/chef/config_fetcher.rb +18 -10
  235. data/lib/chef/{shell/shell_rest.rb → constants.rb} +11 -11
  236. data/lib/chef/cookbook/chefignore.rb +4 -5
  237. data/lib/chef/cookbook/cookbook_collection.rb +24 -6
  238. data/lib/chef/cookbook/cookbook_version_loader.rb +82 -26
  239. data/lib/chef/cookbook/file_system_file_vendor.rb +11 -12
  240. data/lib/chef/cookbook/file_vendor.rb +3 -4
  241. data/lib/chef/cookbook/gem_installer.rb +84 -0
  242. data/lib/chef/cookbook/metadata.rb +248 -93
  243. data/lib/chef/cookbook/remote_file_vendor.rb +8 -8
  244. data/lib/chef/cookbook/synchronizer.rb +19 -14
  245. data/lib/chef/cookbook/syntax_check.rb +15 -15
  246. data/lib/chef/cookbook_loader.rb +36 -18
  247. data/lib/chef/cookbook_manifest.rb +14 -13
  248. data/lib/chef/cookbook_site_streaming_uploader.rb +25 -26
  249. data/lib/chef/cookbook_uploader.rb +22 -21
  250. data/lib/chef/cookbook_version.rb +111 -97
  251. data/lib/chef/daemon.rb +8 -8
  252. data/lib/chef/data_bag.rb +36 -29
  253. data/lib/chef/data_bag_item.rb +46 -43
  254. data/lib/chef/data_collector/messages/helpers.rb +161 -0
  255. data/lib/chef/data_collector/messages.rb +97 -0
  256. data/lib/chef/data_collector/resource_report.rb +95 -0
  257. data/lib/chef/data_collector.rb +472 -0
  258. data/lib/chef/decorator/lazy.rb +60 -0
  259. data/lib/chef/decorator/lazy_array.rb +59 -0
  260. data/lib/chef/decorator/unchain.rb +59 -0
  261. data/lib/chef/decorator.rb +81 -0
  262. data/lib/chef/delayed_evaluator.rb +21 -0
  263. data/lib/chef/deprecation/mixin/template.rb +5 -6
  264. data/lib/chef/deprecation/provider/cookbook_file.rb +3 -4
  265. data/lib/chef/deprecation/provider/file.rb +11 -11
  266. data/lib/chef/deprecation/provider/remote_directory.rb +52 -0
  267. data/lib/chef/deprecation/provider/remote_file.rb +6 -7
  268. data/lib/chef/deprecation/provider/template.rb +4 -4
  269. data/lib/chef/deprecation/warnings.rb +5 -7
  270. data/lib/chef/digester.rb +11 -7
  271. data/lib/chef/dsl/audit.rb +4 -4
  272. data/lib/chef/dsl/chef_provisioning.rb +57 -0
  273. data/lib/chef/dsl/cheffish.rb +65 -0
  274. data/lib/chef/dsl/core.rb +52 -0
  275. data/lib/chef/dsl/data_query.rb +10 -10
  276. data/lib/chef/dsl/declare_resource.rb +295 -0
  277. data/lib/chef/dsl/definitions.rb +1 -2
  278. data/lib/chef/dsl/include_attribute.rb +4 -6
  279. data/lib/chef/dsl/include_recipe.rb +4 -4
  280. data/lib/chef/dsl/method_missing.rb +75 -0
  281. data/lib/chef/dsl/platform_introspection.rb +27 -17
  282. data/lib/chef/dsl/powershell.rb +3 -3
  283. data/lib/chef/dsl/reboot_pending.rb +12 -12
  284. data/lib/chef/dsl/recipe.rb +51 -141
  285. data/lib/chef/dsl/registry_helper.rb +7 -3
  286. data/lib/chef/dsl/resources.rb +31 -4
  287. data/lib/chef/dsl/universal.rb +50 -0
  288. data/lib/chef/dsl.rb +6 -6
  289. data/lib/chef/encrypted_data_bag_item/assertions.rb +4 -4
  290. data/lib/chef/encrypted_data_bag_item/check_encrypted.rb +3 -3
  291. data/lib/chef/encrypted_data_bag_item/decryption_failure.rb +2 -2
  292. data/lib/chef/encrypted_data_bag_item/decryptor.rb +16 -14
  293. data/lib/chef/encrypted_data_bag_item/encrypted_data_bag_item_assertions.rb +1 -1
  294. data/lib/chef/encrypted_data_bag_item/encryption_failure.rb +1 -1
  295. data/lib/chef/encrypted_data_bag_item/encryptor.rb +20 -20
  296. data/lib/chef/encrypted_data_bag_item/unacceptable_encrypted_data_bag_item_format.rb +2 -2
  297. data/lib/chef/encrypted_data_bag_item/unsupported_cipher.rb +2 -2
  298. data/lib/chef/encrypted_data_bag_item/unsupported_encrypted_data_bag_item_format.rb +2 -2
  299. data/lib/chef/encrypted_data_bag_item.rb +10 -10
  300. data/lib/chef/environment.rb +45 -38
  301. data/lib/chef/event_dispatch/base.rb +86 -25
  302. data/lib/chef/event_dispatch/dispatcher.rb +27 -7
  303. data/lib/chef/event_dispatch/dsl.rb +65 -0
  304. data/lib/chef/event_dispatch/events_output_stream.rb +8 -0
  305. data/lib/chef/event_loggers/base.rb +5 -5
  306. data/lib/chef/event_loggers/windows_eventlog.rb +9 -9
  307. data/lib/chef/exceptions.rb +82 -21
  308. data/lib/chef/file_access_control/unix.rb +21 -21
  309. data/lib/chef/file_access_control/windows.rb +10 -10
  310. data/lib/chef/file_access_control.rb +6 -6
  311. data/lib/chef/file_cache.rb +20 -20
  312. data/lib/chef/file_content_management/content_base.rb +2 -2
  313. data/lib/chef/file_content_management/deploy/cp.rb +4 -4
  314. data/lib/chef/file_content_management/deploy/mv_unix.rb +6 -7
  315. data/lib/chef/file_content_management/deploy/mv_windows.rb +5 -7
  316. data/lib/chef/file_content_management/deploy.rb +5 -6
  317. data/lib/chef/file_content_management/tempfile.rb +17 -6
  318. data/lib/chef/formatters/base.rb +21 -12
  319. data/lib/chef/formatters/doc.rb +104 -12
  320. data/lib/chef/formatters/{error_descriptor.rb → error_description.rb} +7 -5
  321. data/lib/chef/formatters/error_inspectors/api_error_formatting.rb +50 -15
  322. data/lib/chef/formatters/error_inspectors/compile_error_inspector.rb +47 -11
  323. data/lib/chef/formatters/error_inspectors/cookbook_resolve_error_inspector.rb +8 -8
  324. data/lib/chef/formatters/error_inspectors/cookbook_sync_error_inspector.rb +8 -6
  325. data/lib/chef/formatters/error_inspectors/node_load_error_inspector.rb +14 -13
  326. data/lib/chef/formatters/error_inspectors/registration_error_inspector.rb +19 -17
  327. data/lib/chef/formatters/error_inspectors/resource_failure_inspector.rb +9 -12
  328. data/lib/chef/formatters/error_inspectors/run_list_expansion_error_inspector.rb +15 -14
  329. data/lib/chef/formatters/error_inspectors.rb +5 -5
  330. data/lib/chef/formatters/error_mapper.rb +2 -2
  331. data/lib/chef/formatters/indentable_output_stream.rb +10 -5
  332. data/lib/chef/formatters/minimal.rb +9 -11
  333. data/lib/chef/guard_interpreter/default_guard_interpreter.rb +3 -4
  334. data/lib/chef/guard_interpreter/resource_guard_interpreter.rb +13 -11
  335. data/lib/chef/guard_interpreter.rb +3 -3
  336. data/lib/chef/handler/error_report.rb +4 -4
  337. data/lib/chef/handler/json_file.rb +5 -5
  338. data/lib/chef/handler.rb +37 -4
  339. data/lib/chef/http/auth_credentials.rb +12 -12
  340. data/lib/chef/http/authenticator.rb +19 -14
  341. data/lib/chef/http/basic_client.rb +40 -51
  342. data/lib/chef/http/cookie_jar.rb +7 -7
  343. data/lib/chef/http/cookie_manager.rb +8 -8
  344. data/lib/chef/http/decompressor.rb +9 -11
  345. data/lib/chef/http/http_request.rb +34 -35
  346. data/lib/chef/http/json_input.rb +9 -9
  347. data/lib/chef/http/json_output.rb +9 -9
  348. data/lib/chef/http/json_to_model_output.rb +4 -4
  349. data/lib/chef/http/remote_request_id.rb +6 -6
  350. data/lib/chef/http/simple.rb +23 -5
  351. data/lib/chef/http/simple_json.rb +43 -0
  352. data/lib/chef/http/socketless_chef_zero_client.rb +62 -61
  353. data/lib/chef/http/ssl_policies.rb +13 -13
  354. data/lib/chef/http/validate_content_length.rb +16 -12
  355. data/lib/chef/http.rb +136 -61
  356. data/lib/chef/json_compat.rb +8 -7
  357. data/lib/chef/key.rb +76 -75
  358. data/lib/chef/knife/bootstrap/chef_vault_handler.rb +16 -22
  359. data/lib/chef/knife/bootstrap/client_builder.rb +30 -12
  360. data/lib/chef/knife/bootstrap/templates/README.md +3 -4
  361. data/lib/chef/knife/bootstrap/templates/chef-full.erb +7 -2
  362. data/lib/chef/knife/bootstrap.rb +133 -38
  363. data/lib/chef/knife/client_bulk_delete.rb +6 -6
  364. data/lib/chef/knife/client_create.rb +9 -9
  365. data/lib/chef/knife/client_delete.rb +7 -7
  366. data/lib/chef/knife/client_edit.rb +6 -6
  367. data/lib/chef/knife/client_key_create.rb +6 -6
  368. data/lib/chef/knife/client_key_delete.rb +6 -6
  369. data/lib/chef/knife/client_key_edit.rb +8 -9
  370. data/lib/chef/knife/client_key_list.rb +5 -5
  371. data/lib/chef/knife/client_key_show.rb +5 -5
  372. data/lib/chef/knife/client_list.rb +5 -5
  373. data/lib/chef/knife/client_reregister.rb +5 -5
  374. data/lib/chef/knife/client_show.rb +5 -5
  375. data/lib/chef/knife/configure.rb +16 -16
  376. data/lib/chef/knife/configure_client.rb +6 -6
  377. data/lib/chef/knife/cookbook_bulk_delete.rb +10 -11
  378. data/lib/chef/knife/cookbook_create.rb +47 -33
  379. data/lib/chef/knife/cookbook_delete.rb +10 -10
  380. data/lib/chef/knife/cookbook_download.rb +8 -10
  381. data/lib/chef/knife/cookbook_list.rb +5 -5
  382. data/lib/chef/knife/cookbook_metadata.rb +9 -10
  383. data/lib/chef/knife/cookbook_metadata_from_file.rb +5 -5
  384. data/lib/chef/knife/cookbook_show.rb +15 -23
  385. data/lib/chef/knife/cookbook_site_download.rb +31 -24
  386. data/lib/chef/knife/cookbook_site_install.rb +23 -15
  387. data/lib/chef/knife/cookbook_site_list.rb +14 -11
  388. data/lib/chef/knife/cookbook_site_search.rb +13 -11
  389. data/lib/chef/knife/cookbook_site_share.rb +34 -34
  390. data/lib/chef/knife/cookbook_site_show.rb +19 -13
  391. data/lib/chef/knife/cookbook_site_unshare.rb +15 -8
  392. data/lib/chef/knife/cookbook_site_vendor.rb +5 -5
  393. data/lib/chef/knife/cookbook_test.rb +7 -8
  394. data/lib/chef/knife/cookbook_upload.rb +22 -25
  395. data/lib/chef/knife/core/bootstrap_context.rb +83 -27
  396. data/lib/chef/knife/core/cookbook_scm_repo.rb +11 -12
  397. data/lib/chef/knife/core/custom_manifest_loader.rb +69 -0
  398. data/lib/chef/knife/core/gem_glob_loader.rb +138 -0
  399. data/lib/chef/knife/core/generic_presenter.rb +53 -44
  400. data/lib/chef/knife/core/hashed_command_loader.rb +99 -0
  401. data/lib/chef/knife/core/node_editor.rb +60 -39
  402. data/lib/chef/knife/core/node_presenter.rb +38 -16
  403. data/lib/chef/knife/core/object_loader.rb +9 -8
  404. data/lib/chef/knife/core/status_presenter.rb +17 -17
  405. data/lib/chef/knife/core/subcommand_loader.rb +143 -153
  406. data/lib/chef/knife/core/text_formatter.rb +13 -14
  407. data/lib/chef/knife/core/ui.rb +31 -23
  408. data/lib/chef/knife/data_bag_create.rb +11 -10
  409. data/lib/chef/knife/data_bag_delete.rb +6 -8
  410. data/lib/chef/knife/data_bag_edit.rb +11 -14
  411. data/lib/chef/knife/data_bag_from_file.rb +13 -12
  412. data/lib/chef/knife/data_bag_list.rb +4 -8
  413. data/lib/chef/knife/data_bag_secret_options.rb +8 -8
  414. data/lib/chef/knife/data_bag_show.rb +31 -31
  415. data/lib/chef/knife/delete.rb +7 -8
  416. data/lib/chef/knife/deps.rb +20 -20
  417. data/lib/chef/knife/diff.rb +8 -9
  418. data/lib/chef/knife/download.rb +12 -13
  419. data/lib/chef/knife/edit.rb +8 -9
  420. data/lib/chef/knife/environment_compare.rb +23 -23
  421. data/lib/chef/knife/environment_create.rb +6 -6
  422. data/lib/chef/knife/environment_delete.rb +5 -5
  423. data/lib/chef/knife/environment_edit.rb +5 -5
  424. data/lib/chef/knife/environment_from_file.rb +4 -5
  425. data/lib/chef/knife/environment_list.rb +5 -5
  426. data/lib/chef/knife/environment_show.rb +5 -5
  427. data/lib/chef/knife/exec.rb +7 -7
  428. data/lib/chef/knife/help.rb +7 -9
  429. data/lib/chef/knife/index_rebuild.rb +6 -7
  430. data/lib/chef/knife/key_create.rb +10 -6
  431. data/lib/chef/knife/key_create_base.rb +1 -1
  432. data/lib/chef/knife/key_delete.rb +3 -3
  433. data/lib/chef/knife/key_edit.rb +10 -6
  434. data/lib/chef/knife/key_edit_base.rb +1 -1
  435. data/lib/chef/knife/key_list.rb +12 -12
  436. data/lib/chef/knife/key_list_base.rb +1 -1
  437. data/lib/chef/knife/key_show.rb +4 -4
  438. data/lib/chef/knife/list.rb +15 -15
  439. data/lib/chef/knife/node_bulk_delete.rb +6 -12
  440. data/lib/chef/knife/node_create.rb +6 -9
  441. data/lib/chef/knife/node_delete.rb +5 -6
  442. data/lib/chef/knife/node_edit.rb +6 -8
  443. data/lib/chef/knife/node_environment_set.rb +4 -4
  444. data/lib/chef/knife/node_from_file.rb +11 -11
  445. data/lib/chef/knife/node_list.rb +5 -7
  446. data/lib/chef/knife/node_run_list_add.rb +8 -8
  447. data/lib/chef/knife/node_run_list_remove.rb +19 -8
  448. data/lib/chef/knife/node_run_list_set.rb +6 -6
  449. data/lib/chef/knife/node_show.rb +6 -12
  450. data/lib/chef/knife/null.rb +10 -0
  451. data/lib/chef/knife/osc_user_create.rb +7 -7
  452. data/lib/chef/knife/osc_user_delete.rb +5 -5
  453. data/lib/chef/knife/osc_user_edit.rb +7 -7
  454. data/lib/chef/knife/osc_user_list.rb +5 -5
  455. data/lib/chef/knife/osc_user_reregister.rb +5 -5
  456. data/lib/chef/knife/osc_user_show.rb +5 -6
  457. data/lib/chef/knife/raw.rb +22 -21
  458. data/lib/chef/knife/recipe_list.rb +4 -4
  459. data/lib/chef/knife/rehash.rb +65 -0
  460. data/lib/chef/knife/role_bulk_delete.rb +5 -10
  461. data/lib/chef/knife/role_create.rb +6 -8
  462. data/lib/chef/knife/role_delete.rb +5 -6
  463. data/lib/chef/knife/role_edit.rb +5 -8
  464. data/lib/chef/knife/role_env_run_list_add.rb +9 -9
  465. data/lib/chef/knife/role_env_run_list_clear.rb +4 -4
  466. data/lib/chef/knife/role_env_run_list_remove.rb +13 -13
  467. data/lib/chef/knife/role_env_run_list_replace.rb +6 -6
  468. data/lib/chef/knife/role_env_run_list_set.rb +6 -6
  469. data/lib/chef/knife/role_from_file.rb +7 -12
  470. data/lib/chef/knife/role_list.rb +5 -6
  471. data/lib/chef/knife/role_run_list_add.rb +9 -9
  472. data/lib/chef/knife/role_run_list_clear.rb +4 -4
  473. data/lib/chef/knife/role_run_list_remove.rb +13 -13
  474. data/lib/chef/knife/role_run_list_replace.rb +6 -6
  475. data/lib/chef/knife/role_run_list_set.rb +6 -6
  476. data/lib/chef/knife/role_show.rb +5 -8
  477. data/lib/chef/knife/search.rb +18 -18
  478. data/lib/chef/knife/serve.rb +11 -11
  479. data/lib/chef/knife/show.rb +4 -4
  480. data/lib/chef/knife/ssh.rb +143 -101
  481. data/lib/chef/knife/ssl_check.rb +22 -16
  482. data/lib/chef/knife/ssl_fetch.rb +23 -20
  483. data/lib/chef/knife/status.rb +28 -15
  484. data/lib/chef/knife/supermarket_download.rb +33 -0
  485. data/lib/chef/knife/supermarket_install.rb +33 -0
  486. data/lib/chef/knife/supermarket_list.rb +33 -0
  487. data/lib/chef/knife/supermarket_search.rb +33 -0
  488. data/lib/chef/knife/supermarket_share.rb +33 -0
  489. data/lib/chef/knife/supermarket_show.rb +33 -0
  490. data/lib/chef/knife/supermarket_unshare.rb +33 -0
  491. data/lib/chef/knife/tag_create.rb +5 -5
  492. data/lib/chef/knife/tag_delete.rb +5 -5
  493. data/lib/chef/knife/tag_list.rb +5 -5
  494. data/lib/chef/knife/upload.rb +12 -13
  495. data/lib/chef/knife/user_create.rb +9 -11
  496. data/lib/chef/knife/user_delete.rb +6 -7
  497. data/lib/chef/knife/user_edit.rb +8 -10
  498. data/lib/chef/knife/user_key_create.rb +7 -7
  499. data/lib/chef/knife/user_key_delete.rb +6 -6
  500. data/lib/chef/knife/user_key_edit.rb +8 -9
  501. data/lib/chef/knife/user_key_list.rb +5 -5
  502. data/lib/chef/knife/user_key_show.rb +5 -5
  503. data/lib/chef/knife/user_list.rb +5 -5
  504. data/lib/chef/knife/user_reregister.rb +6 -7
  505. data/lib/chef/knife/user_show.rb +6 -6
  506. data/lib/chef/knife/xargs.rb +26 -27
  507. data/lib/chef/knife.rb +169 -139
  508. data/lib/chef/local_mode.rb +16 -9
  509. data/lib/chef/log/syslog.rb +5 -6
  510. data/lib/chef/log/winevt.rb +7 -7
  511. data/lib/chef/log.rb +28 -10
  512. data/lib/chef/mash.rb +6 -5
  513. data/lib/chef/mixin/api_version_request_handling.rb +1 -1
  514. data/lib/chef/mixin/checksum.rb +9 -4
  515. data/lib/chef/mixin/command/unix.rb +10 -10
  516. data/lib/chef/mixin/command/windows.rb +6 -7
  517. data/lib/chef/mixin/command.rb +16 -15
  518. data/lib/chef/mixin/convert_to_class_name.rb +11 -11
  519. data/lib/chef/mixin/create_path.rb +3 -3
  520. data/lib/chef/mixin/deep_merge.rb +3 -3
  521. data/lib/chef/mixin/deprecation.rb +30 -31
  522. data/lib/chef/mixin/descendants_tracker.rb +2 -3
  523. data/lib/chef/mixin/enforce_ownership_and_permissions.rb +3 -3
  524. data/lib/chef/mixin/file_class.rb +9 -11
  525. data/lib/chef/mixin/from_file.rb +3 -3
  526. data/lib/chef/mixin/get_source_from_package.rb +8 -4
  527. data/lib/chef/mixin/homebrew_user.rb +6 -6
  528. data/lib/chef/mixin/language.rb +5 -5
  529. data/lib/chef/mixin/language_include_attribute.rb +4 -5
  530. data/lib/chef/mixin/language_include_recipe.rb +4 -5
  531. data/lib/chef/mixin/lazy_module_include.rb +77 -0
  532. data/lib/chef/mixin/notifying_block.rb +53 -0
  533. data/lib/chef/mixin/params_validate.rb +384 -137
  534. data/lib/chef/mixin/path_sanity.rb +8 -8
  535. data/lib/chef/mixin/powershell_out.rb +5 -5
  536. data/lib/chef/mixin/powershell_type_coercions.rb +12 -10
  537. data/lib/chef/mixin/properties.rb +306 -0
  538. data/lib/chef/mixin/provides.rb +3 -2
  539. data/lib/chef/mixin/proxified_socket.rb +42 -0
  540. data/lib/chef/mixin/recipe_definition_dsl_core.rb +4 -4
  541. data/lib/chef/mixin/securable.rb +20 -23
  542. data/lib/chef/mixin/shell_out.rb +45 -26
  543. data/lib/chef/mixin/subclass_directive.rb +37 -0
  544. data/lib/chef/mixin/template.rb +56 -9
  545. data/lib/chef/mixin/unformatter.rb +1 -1
  546. data/lib/chef/mixin/uris.rb +4 -4
  547. data/lib/chef/mixin/which.rb +5 -5
  548. data/lib/chef/mixin/why_run.rb +8 -9
  549. data/lib/chef/mixin/wide_string.rb +72 -0
  550. data/lib/chef/mixin/windows_architecture_helper.rb +27 -53
  551. data/lib/chef/mixin/windows_env_helper.rb +14 -12
  552. data/lib/chef/mixin/xml_escape.rb +18 -18
  553. data/lib/chef/mixins.rb +13 -14
  554. data/lib/chef/monkey_patches/net-ssh-multi.rb +8 -7
  555. data/lib/chef/monkey_patches/net_http.rb +2 -2
  556. data/lib/chef/monkey_patches/webrick-utils.rb +51 -0
  557. data/lib/chef/monkey_patches/win32/registry.rb +86 -0
  558. data/lib/chef/monologger.rb +5 -7
  559. data/lib/chef/node/attribute.rb +347 -324
  560. data/lib/chef/node/attribute_collections.rb +58 -150
  561. data/lib/chef/node/common_api.rb +123 -0
  562. data/lib/chef/node/immutable_collections.rb +40 -78
  563. data/lib/chef/node/mixin/deep_merge_cache.rb +61 -0
  564. data/lib/chef/node/mixin/immutablize_array.rb +67 -0
  565. data/lib/chef/node/mixin/immutablize_hash.rb +54 -0
  566. data/lib/chef/node/mixin/state_tracking.rb +93 -0
  567. data/lib/chef/node.rb +204 -100
  568. data/lib/chef/node_map.rb +13 -13
  569. data/lib/chef/null_logger.rb +3 -3
  570. data/lib/chef/org.rb +31 -30
  571. data/lib/chef/platform/handler_map.rb +2 -7
  572. data/lib/chef/platform/priority_map.rb +2 -2
  573. data/lib/chef/platform/provider_handler_map.rb +3 -3
  574. data/lib/chef/platform/provider_mapping.rb +41 -39
  575. data/lib/chef/platform/provider_priority_map.rb +2 -2
  576. data/lib/chef/platform/query_helpers.rb +64 -12
  577. data/lib/chef/platform/rebooter.rb +23 -12
  578. data/lib/chef/platform/resource_handler_map.rb +3 -3
  579. data/lib/chef/platform/resource_priority_map.rb +2 -2
  580. data/lib/chef/platform/service_helpers.rb +41 -61
  581. data/lib/chef/platform.rb +4 -4
  582. data/lib/chef/policy_builder/dynamic.rb +185 -0
  583. data/lib/chef/policy_builder/expand_node_object.rb +65 -38
  584. data/lib/chef/policy_builder/policyfile.rb +174 -39
  585. data/lib/chef/policy_builder.rb +5 -12
  586. data/lib/chef/property.rb +696 -0
  587. data/lib/chef/provider/apt_repository.rb +253 -0
  588. data/lib/chef/provider/apt_update.rb +87 -0
  589. data/lib/chef/provider/batch.rb +14 -6
  590. data/lib/chef/provider/breakpoint.rb +1 -1
  591. data/lib/chef/provider/cookbook_file/content.rb +4 -4
  592. data/lib/chef/provider/cookbook_file.rb +5 -5
  593. data/lib/chef/provider/cron/aix.rb +1 -1
  594. data/lib/chef/provider/cron/solaris.rb +1 -1
  595. data/lib/chef/provider/cron/unix.rb +7 -7
  596. data/lib/chef/provider/cron.rb +11 -12
  597. data/lib/chef/provider/deploy/revision.rb +11 -11
  598. data/lib/chef/provider/deploy/timestamped.rb +1 -1
  599. data/lib/chef/provider/deploy.rb +12 -15
  600. data/lib/chef/provider/directory.rb +40 -12
  601. data/lib/chef/provider/dsc_resource.rb +74 -41
  602. data/lib/chef/provider/dsc_script.rb +20 -20
  603. data/lib/chef/provider/env/windows.rb +3 -3
  604. data/lib/chef/provider/env.rb +8 -8
  605. data/lib/chef/provider/erl_call.rb +5 -5
  606. data/lib/chef/provider/execute.rb +32 -11
  607. data/lib/chef/provider/file/content.rb +4 -4
  608. data/lib/chef/provider/file.rb +24 -29
  609. data/lib/chef/provider/git.rb +67 -67
  610. data/lib/chef/provider/group/aix.rb +6 -6
  611. data/lib/chef/provider/group/dscl.rb +12 -12
  612. data/lib/chef/provider/group/gpasswd.rb +3 -3
  613. data/lib/chef/provider/group/groupadd.rb +10 -9
  614. data/lib/chef/provider/group/groupmod.rb +4 -4
  615. data/lib/chef/provider/group/pw.rb +3 -3
  616. data/lib/chef/provider/group/suse.rb +30 -9
  617. data/lib/chef/provider/group/usermod.rb +9 -9
  618. data/lib/chef/provider/group/windows.rb +24 -11
  619. data/lib/chef/provider/group.rb +16 -9
  620. data/lib/chef/provider/http_request.rb +10 -10
  621. data/lib/chef/provider/ifconfig/aix.rb +5 -4
  622. data/lib/chef/provider/ifconfig/debian.rb +6 -6
  623. data/lib/chef/provider/ifconfig/redhat.rb +3 -3
  624. data/lib/chef/provider/ifconfig.rb +14 -13
  625. data/lib/chef/provider/launchd.rb +208 -0
  626. data/lib/chef/provider/link.rb +28 -21
  627. data/lib/chef/provider/log.rb +2 -2
  628. data/lib/chef/provider/lwrp_base.rb +9 -83
  629. data/lib/chef/provider/mdadm.rb +5 -4
  630. data/lib/chef/provider/mount/aix.rb +14 -14
  631. data/lib/chef/provider/mount/mount.rb +22 -22
  632. data/lib/chef/provider/mount/solaris.rb +30 -30
  633. data/lib/chef/provider/mount/windows.rb +10 -4
  634. data/lib/chef/provider/mount.rb +13 -13
  635. data/lib/chef/provider/noop.rb +37 -0
  636. data/lib/chef/provider/ohai.rb +2 -2
  637. data/lib/chef/provider/osx_profile.rb +255 -0
  638. data/lib/chef/provider/package/aix.rb +13 -10
  639. data/lib/chef/provider/package/apt.rb +119 -105
  640. data/lib/chef/provider/package/cab.rb +150 -0
  641. data/lib/chef/provider/package/chocolatey.rb +274 -0
  642. data/lib/chef/provider/package/dpkg.rb +156 -79
  643. data/lib/chef/provider/package/easy_install.rb +16 -15
  644. data/lib/chef/provider/package/freebsd/base.rb +7 -7
  645. data/lib/chef/provider/package/freebsd/pkg.rb +9 -9
  646. data/lib/chef/provider/package/freebsd/pkgng.rb +6 -6
  647. data/lib/chef/provider/package/freebsd/port.rb +4 -4
  648. data/lib/chef/provider/package/homebrew.rb +17 -17
  649. data/lib/chef/provider/package/ips.rb +9 -9
  650. data/lib/chef/provider/package/macports.rb +6 -5
  651. data/lib/chef/provider/package/openbsd.rb +17 -19
  652. data/lib/chef/provider/package/pacman.rb +7 -10
  653. data/lib/chef/provider/package/paludis.rb +9 -12
  654. data/lib/chef/provider/package/portage.rb +15 -18
  655. data/lib/chef/provider/package/rpm.rb +10 -11
  656. data/lib/chef/provider/package/rubygems.rb +80 -75
  657. data/lib/chef/provider/package/smartos.rb +7 -10
  658. data/lib/chef/provider/package/solaris.rb +8 -11
  659. data/lib/chef/provider/package/windows/exe.rb +115 -0
  660. data/lib/chef/provider/package/windows/msi.rb +42 -17
  661. data/lib/chef/provider/package/windows/registry_uninstall_entry.rb +87 -0
  662. data/lib/chef/provider/package/windows.rb +132 -31
  663. data/lib/chef/provider/package/yum/rpm_utils.rb +642 -0
  664. data/lib/chef/provider/package/{yum-dump.py → yum/yum-dump.py} +1 -1
  665. data/lib/chef/provider/package/yum/yum_cache.rb +376 -0
  666. data/lib/chef/provider/package/yum.rb +55 -969
  667. data/lib/chef/provider/package/zypper.rb +80 -50
  668. data/lib/chef/provider/package.rb +179 -67
  669. data/lib/chef/provider/powershell_script.rb +73 -34
  670. data/lib/chef/provider/reboot.rb +4 -4
  671. data/lib/chef/provider/registry_key.rb +51 -24
  672. data/lib/chef/provider/remote_directory.rb +197 -107
  673. data/lib/chef/provider/remote_file/cache_control_data.rb +46 -14
  674. data/lib/chef/provider/remote_file/content.rb +12 -12
  675. data/lib/chef/provider/remote_file/fetcher.rb +4 -2
  676. data/lib/chef/provider/remote_file/ftp.rb +15 -26
  677. data/lib/chef/provider/remote_file/http.rb +31 -13
  678. data/lib/chef/provider/remote_file/local_file.rb +5 -5
  679. data/lib/chef/provider/remote_file/network_file.rb +4 -4
  680. data/lib/chef/provider/remote_file/sftp.rb +105 -0
  681. data/lib/chef/provider/remote_file.rb +5 -5
  682. data/lib/chef/provider/route.rb +188 -188
  683. data/lib/chef/provider/ruby_block.rb +3 -3
  684. data/lib/chef/provider/script.rb +6 -5
  685. data/lib/chef/provider/service/aix.rb +5 -5
  686. data/lib/chef/provider/service/aixinit.rb +14 -14
  687. data/lib/chef/provider/service/arch.rb +8 -8
  688. data/lib/chef/provider/service/debian.rb +17 -20
  689. data/lib/chef/provider/service/freebsd.rb +9 -9
  690. data/lib/chef/provider/service/gentoo.rb +9 -9
  691. data/lib/chef/provider/service/init.rb +6 -6
  692. data/lib/chef/provider/service/insserv.rb +6 -8
  693. data/lib/chef/provider/service/invokercd.rb +4 -6
  694. data/lib/chef/provider/service/macosx.rb +24 -20
  695. data/lib/chef/provider/service/openbsd.rb +18 -17
  696. data/lib/chef/provider/service/redhat.rb +59 -17
  697. data/lib/chef/provider/service/simple.rb +15 -13
  698. data/lib/chef/provider/service/solaris.rb +53 -22
  699. data/lib/chef/provider/service/systemd.rb +64 -17
  700. data/lib/chef/provider/service/upstart.rb +47 -30
  701. data/lib/chef/provider/service/windows.rb +31 -77
  702. data/lib/chef/provider/service.rb +100 -40
  703. data/lib/chef/provider/subversion.rb +39 -21
  704. data/lib/chef/provider/support/yum_repo.erb +125 -0
  705. data/lib/chef/provider/systemd_unit.rb +238 -0
  706. data/lib/chef/provider/template/content.rb +20 -10
  707. data/lib/chef/provider/template.rb +8 -8
  708. data/lib/chef/provider/template_finder.rb +3 -2
  709. data/lib/chef/provider/user/aix.rb +9 -5
  710. data/lib/chef/provider/user/dscl.rb +147 -131
  711. data/lib/chef/provider/user/linux.rb +128 -0
  712. data/lib/chef/provider/user/pw.rb +12 -11
  713. data/lib/chef/provider/user/solaris.rb +46 -9
  714. data/lib/chef/provider/user/useradd.rb +15 -18
  715. data/lib/chef/provider/user/windows.rb +18 -16
  716. data/lib/chef/provider/user.rb +44 -33
  717. data/lib/chef/provider/whyrun_safe_ruby_block.rb +1 -1
  718. data/lib/chef/provider/windows_script.rb +13 -12
  719. data/lib/chef/provider/yum_repository.rb +121 -0
  720. data/lib/chef/provider.rb +261 -50
  721. data/lib/chef/provider_resolver.rb +5 -5
  722. data/lib/chef/providers.rb +121 -110
  723. data/lib/chef/recipe.rb +10 -31
  724. data/lib/chef/request_id.rb +4 -4
  725. data/lib/chef/resource/action_class.rb +94 -0
  726. data/lib/chef/resource/apt_package.rb +6 -17
  727. data/lib/chef/resource/apt_repository.rb +47 -0
  728. data/lib/chef/{chef_fs/file_system/cookbook_frozen_error.rb → resource/apt_update.rb} +12 -10
  729. data/lib/chef/resource/bash.rb +5 -5
  730. data/lib/chef/resource/batch.rb +4 -4
  731. data/lib/chef/resource/bff_package.rb +3 -3
  732. data/lib/chef/resource/breakpoint.rb +3 -4
  733. data/lib/chef/resource/cab_package.rb +44 -0
  734. data/lib/chef/resource/chef_gem.rb +12 -28
  735. data/lib/chef/resource/chocolatey_package.rb +39 -0
  736. data/lib/chef/resource/conditional.rb +17 -9
  737. data/lib/chef/resource/conditional_action_not_nothing.rb +1 -1
  738. data/lib/chef/resource/cookbook_file.rb +10 -10
  739. data/lib/chef/resource/cron.rb +20 -20
  740. data/lib/chef/resource/csh.rb +5 -5
  741. data/lib/chef/resource/deploy.rb +52 -46
  742. data/lib/chef/resource/deploy_revision.rb +1 -1
  743. data/lib/chef/resource/directory.rb +10 -10
  744. data/lib/chef/resource/dpkg_package.rb +5 -5
  745. data/lib/chef/resource/dsc_resource.rb +121 -82
  746. data/lib/chef/resource/dsc_script.rb +17 -15
  747. data/lib/chef/resource/easy_install_package.rb +6 -25
  748. data/lib/chef/resource/env.rb +6 -6
  749. data/lib/chef/resource/erl_call.rb +10 -10
  750. data/lib/chef/resource/execute.rb +25 -17
  751. data/lib/chef/resource/file/verification.rb +14 -8
  752. data/lib/chef/resource/file.rb +25 -87
  753. data/lib/chef/resource/freebsd_package.rb +11 -10
  754. data/lib/chef/resource/gem_package.rb +8 -23
  755. data/lib/chef/resource/git.rb +3 -3
  756. data/lib/chef/resource/group.rb +13 -14
  757. data/lib/chef/resource/homebrew_package.rb +7 -18
  758. data/lib/chef/resource/http_request.rb +9 -9
  759. data/lib/chef/resource/ifconfig.rb +16 -16
  760. data/lib/chef/resource/ips_package.rb +5 -16
  761. data/lib/chef/{chef_fs/file_system/not_found_error.rb → resource/ksh.rb} +10 -9
  762. data/lib/chef/resource/launchd.rb +104 -0
  763. data/lib/chef/resource/link.rb +13 -12
  764. data/lib/chef/resource/log.rb +7 -7
  765. data/lib/chef/resource/lwrp_base.rb +15 -25
  766. data/lib/chef/resource/macosx_service.rb +5 -5
  767. data/lib/chef/resource/macports_package.rb +3 -2
  768. data/lib/chef/resource/mdadm.rb +19 -11
  769. data/lib/chef/resource/mount.rb +21 -21
  770. data/lib/chef/resource/ohai.rb +5 -5
  771. data/lib/chef/resource/openbsd_package.rb +7 -6
  772. data/lib/chef/resource/osx_profile.rb +74 -0
  773. data/lib/chef/resource/package.rb +16 -71
  774. data/lib/chef/resource/pacman_package.rb +3 -2
  775. data/lib/chef/resource/paludis_package.rb +5 -7
  776. data/lib/chef/resource/perl.rb +5 -5
  777. data/lib/chef/resource/portage_package.rb +5 -4
  778. data/lib/chef/resource/powershell_script.rb +6 -6
  779. data/lib/chef/resource/python.rb +5 -5
  780. data/lib/chef/resource/reboot.rb +6 -6
  781. data/lib/chef/resource/registry_key.rb +16 -16
  782. data/lib/chef/resource/remote_directory.rb +15 -16
  783. data/lib/chef/resource/remote_file.rb +27 -18
  784. data/lib/chef/resource/resource_notification.rb +16 -3
  785. data/lib/chef/resource/route.rb +15 -15
  786. data/lib/chef/resource/rpm_package.rb +6 -16
  787. data/lib/chef/resource/ruby.rb +5 -5
  788. data/lib/chef/resource/ruby_block.rb +8 -8
  789. data/lib/chef/resource/scm.rb +20 -27
  790. data/lib/chef/resource/script.rb +11 -11
  791. data/lib/chef/resource/service.rb +49 -21
  792. data/lib/chef/resource/smartos_package.rb +4 -3
  793. data/lib/chef/resource/solaris_package.rb +4 -3
  794. data/lib/chef/resource/subversion.rb +10 -5
  795. data/lib/chef/resource/systemd_unit.rb +63 -0
  796. data/lib/chef/resource/template.rb +14 -14
  797. data/lib/chef/resource/timestamped_deploy.rb +1 -1
  798. data/lib/chef/{mixin/wstring.rb → resource/user/aix_user.rb} +10 -10
  799. data/lib/chef/{chef_fs/file_system/file_system_root_dir.rb → resource/user/dscl_user.rb} +9 -9
  800. data/lib/chef/resource/user/linux_user.rb +41 -0
  801. data/lib/chef/resource/user/pw_user.rb +31 -0
  802. data/lib/chef/resource/user/solaris_user.rb +31 -0
  803. data/lib/chef/resource/user/windows_user.rb +31 -0
  804. data/lib/chef/resource/user.rb +33 -19
  805. data/lib/chef/resource/whyrun_safe_ruby_block.rb +1 -1
  806. data/lib/chef/resource/windows_package.rb +21 -66
  807. data/lib/chef/resource/windows_script.rb +11 -7
  808. data/lib/chef/resource/windows_service.rb +6 -6
  809. data/lib/chef/resource/yum_package.rb +22 -36
  810. data/lib/chef/resource/yum_repository.rb +79 -0
  811. data/lib/chef/resource/zypper_package.rb +3 -2
  812. data/lib/chef/resource.rb +473 -204
  813. data/lib/chef/resource_builder.rb +24 -12
  814. data/lib/chef/resource_collection/resource_collection_serialization.rb +5 -5
  815. data/lib/chef/resource_collection/resource_list.rb +18 -7
  816. data/lib/chef/resource_collection/resource_set.rb +20 -17
  817. data/lib/chef/resource_collection/stepable_iterator.rb +5 -7
  818. data/lib/chef/resource_collection.rb +61 -14
  819. data/lib/chef/resource_definition.rb +7 -7
  820. data/lib/chef/resource_definition_list.rb +5 -5
  821. data/lib/chef/resource_reporter.rb +25 -20
  822. data/lib/chef/resource_resolver.rb +7 -8
  823. data/lib/chef/resources.rb +82 -74
  824. data/lib/chef/rest.rb +25 -24
  825. data/lib/chef/role.rb +50 -44
  826. data/lib/chef/run_context/cookbook_compiler.rb +14 -15
  827. data/lib/chef/run_context.rb +481 -110
  828. data/lib/chef/run_list/run_list_expansion.rb +57 -14
  829. data/lib/chef/run_list/run_list_item.rb +8 -9
  830. data/lib/chef/run_list/versioned_recipe_list.rb +27 -12
  831. data/lib/chef/run_list.rb +23 -21
  832. data/lib/chef/run_lock.rb +40 -31
  833. data/lib/chef/run_status.rb +3 -3
  834. data/lib/chef/runner.rb +47 -21
  835. data/lib/chef/scan_access_control.rb +7 -7
  836. data/lib/chef/search/query.rb +56 -25
  837. data/lib/chef/server_api.rb +43 -11
  838. data/lib/chef/shell/ext.rb +33 -33
  839. data/lib/chef/shell/model_wrapper.rb +9 -9
  840. data/lib/chef/shell/shell_session.rb +24 -23
  841. data/lib/chef/shell.rb +30 -26
  842. data/lib/chef/shell_out.rb +2 -2
  843. data/lib/chef/tasks/chef_repo.rake +62 -63
  844. data/lib/chef/user.rb +38 -37
  845. data/lib/chef/user_v1.rb +54 -59
  846. data/lib/chef/util/backup.rb +6 -6
  847. data/lib/chef/util/diff.rb +10 -10
  848. data/lib/chef/util/dsc/configuration_generator.rb +13 -13
  849. data/lib/chef/util/dsc/lcm_output_parser.rb +9 -9
  850. data/lib/chef/util/dsc/local_configuration_manager.rb +15 -15
  851. data/lib/chef/util/dsc/resource_info.rb +15 -15
  852. data/lib/chef/util/dsc/resource_store.rb +73 -74
  853. data/lib/chef/util/editor.rb +1 -2
  854. data/lib/chef/util/file_edit.rb +5 -5
  855. data/lib/chef/util/path_helper.rb +2 -2
  856. data/lib/chef/util/powershell/cmdlet.rb +125 -122
  857. data/lib/chef/util/powershell/cmdlet_result.rb +36 -36
  858. data/lib/chef/util/powershell/ps_credential.rb +5 -2
  859. data/lib/chef/util/selinux.rb +7 -7
  860. data/lib/chef/util/threaded_job_queue.rb +2 -2
  861. data/lib/chef/util/windows/net_group.rb +34 -56
  862. data/lib/chef/util/windows/net_use.rb +37 -73
  863. data/lib/chef/util/windows/net_user.rb +18 -17
  864. data/lib/chef/util/windows/volume.rb +21 -21
  865. data/lib/chef/util/windows.rb +1 -33
  866. data/lib/chef/version/platform.rb +5 -5
  867. data/lib/chef/version.rb +5 -5
  868. data/lib/chef/version_class.rb +14 -9
  869. data/lib/chef/version_constraint/platform.rb +3 -3
  870. data/lib/chef/version_constraint.rb +15 -15
  871. data/lib/chef/whitelist.rb +2 -2
  872. data/lib/chef/win32/api/crypto.rb +63 -63
  873. data/lib/chef/win32/api/error.rb +46 -14
  874. data/lib/chef/win32/api/file.rb +93 -19
  875. data/lib/chef/win32/api/installer.rb +15 -16
  876. data/lib/chef/win32/api/memory.rb +4 -4
  877. data/lib/chef/win32/api/net.rb +216 -108
  878. data/lib/chef/win32/api/process.rb +4 -4
  879. data/lib/chef/win32/api/psapi.rb +4 -4
  880. data/lib/chef/win32/api/registry.rb +51 -0
  881. data/lib/chef/win32/api/security.rb +53 -28
  882. data/lib/chef/win32/api/synchronization.rb +4 -4
  883. data/lib/chef/win32/api/system.rb +27 -4
  884. data/lib/chef/win32/api/unicode.rb +4 -47
  885. data/lib/chef/win32/api.rb +14 -8
  886. data/lib/chef/win32/crypto.rb +50 -49
  887. data/lib/chef/win32/error.rb +30 -17
  888. data/lib/chef/win32/eventlog.rb +4 -4
  889. data/lib/chef/win32/file/info.rb +3 -4
  890. data/lib/chef/win32/file/version_info.rb +93 -0
  891. data/lib/chef/win32/file.rb +50 -20
  892. data/lib/chef/win32/handle.rb +6 -6
  893. data/lib/chef/win32/memory.rb +4 -4
  894. data/lib/chef/win32/mutex.rb +5 -6
  895. data/lib/chef/win32/net.rb +170 -49
  896. data/lib/chef/win32/process.rb +20 -7
  897. data/lib/chef/win32/registry.rb +53 -60
  898. data/lib/chef/win32/security/ace.rb +6 -6
  899. data/lib/chef/win32/security/acl.rb +8 -8
  900. data/lib/chef/win32/security/securable_object.rb +5 -5
  901. data/lib/chef/win32/security/security_descriptor.rb +5 -5
  902. data/lib/chef/win32/security/sid.rb +85 -47
  903. data/lib/chef/win32/security/token.rb +7 -7
  904. data/lib/chef/win32/security.rb +82 -20
  905. data/lib/chef/win32/system.rb +62 -0
  906. data/lib/chef/win32/unicode.rb +13 -8
  907. data/lib/chef/win32/version.rb +28 -32
  908. data/lib/chef/workstation_config_loader.rb +4 -159
  909. data/lib/chef.rb +17 -17
  910. data/lib-backcompat/chef/chef_fs/file_system/acl_entry.rb +5 -0
  911. data/lib-backcompat/chef/chef_fs/file_system/already_exists_error.rb +20 -0
  912. data/lib-backcompat/chef/chef_fs/file_system/chef_repository_file_system_root_dir.rb +5 -0
  913. data/lib-backcompat/chef/chef_fs/file_system/chef_server_root_dir.rb +5 -0
  914. data/lib-backcompat/chef/chef_fs/file_system/cookbook_frozen_error.rb +20 -0
  915. data/lib-backcompat/chef/chef_fs/file_system/default_environment_cannot_be_modified_error.rb +20 -0
  916. data/lib-backcompat/chef/chef_fs/file_system/file_system_error.rb +20 -0
  917. data/lib-backcompat/chef/chef_fs/file_system/must_delete_recursively_error.rb +20 -0
  918. data/lib-backcompat/chef/chef_fs/file_system/not_found_error.rb +20 -0
  919. data/lib-backcompat/chef/chef_fs/file_system/operation_failed_error.rb +20 -0
  920. data/lib-backcompat/chef/chef_fs/file_system/operation_not_allowed_error.rb +20 -0
  921. data/lib-backcompat/chef/chef_fs/file_system/repository/chef_repository_file_system_acls_dir.rb +5 -0
  922. data/lib-backcompat/chef/chef_fs/file_system/repository/chef_repository_file_system_client_keys_dir.rb +5 -0
  923. data/lib-backcompat/chef/chef_fs/file_system/repository/chef_repository_file_system_entry.rb +6 -0
  924. data/lib-backcompat/chef/chef_fs/file_system/repository/chef_repository_file_system_policies_dir.rb +5 -0
  925. data/lib-backcompat/chef/chef_fs/file_system/repository/file_system_root_dir.rb +34 -0
  926. data/spec/data/apt/chef-integration-test-1.0/debian/copyright +2 -2
  927. data/spec/data/apt/chef-integration-test-1.1/debian/copyright +2 -2
  928. data/spec/data/apt/chef-integration-test2-1.0/debian/changelog +5 -0
  929. data/spec/data/apt/chef-integration-test2-1.0/debian/chef-integration-test2/DEBIAN/conffiles +1 -0
  930. data/spec/data/apt/chef-integration-test2-1.0/debian/chef-integration-test2/DEBIAN/control +10 -0
  931. data/spec/data/apt/chef-integration-test2-1.0/debian/chef-integration-test2/DEBIAN/md5sums +1 -0
  932. data/spec/data/apt/chef-integration-test2-1.0/debian/chef-integration-test2.debhelper.log +45 -0
  933. data/spec/data/apt/chef-integration-test2-1.0/debian/chef-integration-test2.substvars +1 -0
  934. data/spec/data/apt/chef-integration-test2-1.0/debian/compat +1 -0
  935. data/spec/data/apt/chef-integration-test2-1.0/debian/conffiles +1 -0
  936. data/spec/data/apt/chef-integration-test2-1.0/debian/control +13 -0
  937. data/spec/data/apt/chef-integration-test2-1.0/debian/copyright +34 -0
  938. data/spec/data/apt/chef-integration-test2-1.0/debian/files +1 -0
  939. data/spec/data/apt/chef-integration-test2-1.0/debian/rules +13 -0
  940. data/spec/data/apt/chef-integration-test2-1.0/debian/source/format +1 -0
  941. data/spec/data/apt/chef-integration-test2_1.0-1.debian.tar.gz +0 -0
  942. data/spec/data/apt/chef-integration-test2_1.0-1.dsc +18 -0
  943. data/spec/data/apt/chef-integration-test2_1.0-1_amd64.build +91 -0
  944. data/spec/data/apt/chef-integration-test2_1.0-1_amd64.changes +31 -0
  945. data/spec/data/apt/chef-integration-test2_1.0-1_amd64.deb +0 -0
  946. data/spec/data/apt/chef-integration-test2_1.0.orig.tar.gz +0 -0
  947. data/spec/data/client.d_00/00-foo.rb +2 -0
  948. data/spec/data/client.d_00/01-bar.rb +1 -0
  949. data/spec/data/client.d_00/bar +1 -0
  950. data/spec/data/client.d_01/foo/bar.rb +1 -0
  951. data/spec/data/client.d_02/foo.rb/foo.txt +1 -0
  952. data/spec/data/cookbooks/name-mismatch-versionnumber/recipes/default.rb +1 -1
  953. data/spec/{unit/provider/package_spec.rbe → data/cookbooks/openldap/.root_dotfile} +0 -0
  954. data/spec/data/cookbooks/openldap/spec/spec_helper.rb +0 -0
  955. data/spec/data/cookbooks/openldap/templates/default/helpers.erb +14 -0
  956. data/spec/data/cookbooks/openldap/templates/default/nested_openldap_partials.erb +1 -0
  957. data/spec/data/cookbooks/openldap/templates/default/nested_partial.erb +1 -0
  958. data/spec/data/cookbooks/supports-platform-constraints/metadata.rb +5 -0
  959. data/spec/data/dsc_lcm.pfx +0 -0
  960. data/spec/data/incomplete-metadata-chef-repo/incomplete-metadata/recipes/default.rb +1 -1
  961. data/spec/data/invalid-metadata-chef-repo/invalid-metadata/metadata.rb +1 -2
  962. data/spec/data/invalid-metadata-chef-repo/invalid-metadata/recipes/default.rb +1 -1
  963. data/spec/data/run_context/cookbooks/circular-dep1/attributes/default.rb +2 -4
  964. data/spec/data/run_context/cookbooks/circular-dep2/attributes/default.rb +2 -3
  965. data/spec/data/run_context/cookbooks/dependency1/attributes/aa_first.rb +2 -2
  966. data/spec/data/run_context/cookbooks/dependency1/attributes/default.rb +2 -2
  967. data/spec/data/run_context/cookbooks/dependency1/attributes/zz_last.rb +2 -3
  968. data/spec/data/run_context/cookbooks/dependency2/attributes/default.rb +2 -3
  969. data/spec/data/run_context/cookbooks/include/recipes/default.rb +24 -0
  970. data/spec/data/run_context/cookbooks/include/recipes/includee.rb +3 -0
  971. data/spec/data/run_context/cookbooks/no-default-attr/attributes/server.rb +2 -3
  972. data/spec/data/run_context/cookbooks/test-with-circular-deps/attributes/default.rb +2 -3
  973. data/spec/data/run_context/cookbooks/test-with-deps/attributes/default.rb +2 -3
  974. data/spec/data/templates/chef-seattle20160930-4388-1crv7ef.txt +1 -0
  975. data/spec/data/templates/chef-seattle20160930-4388-jjfoae.txt +1 -0
  976. data/spec/data/templates/chef-seattle20160930-4388-umeq2c.txt +1 -0
  977. data/spec/data/trusted_certs/example_no_cn.crt +36 -0
  978. data/spec/functional/application_spec.rb +8 -8
  979. data/spec/functional/assets/chocolatey_feed/test-A.1.0.nupkg +0 -0
  980. data/spec/functional/assets/chocolatey_feed/test-A.1.5.nupkg +0 -0
  981. data/spec/functional/assets/chocolatey_feed/test-A.2.0.nupkg +0 -0
  982. data/spec/functional/assets/chocolatey_feed/test-B.1.0.nupkg +0 -0
  983. data/spec/functional/assets/testchefsubsys +2 -3
  984. data/spec/functional/audit/rspec_formatter_spec.rb +8 -8
  985. data/spec/functional/audit/runner_spec.rb +13 -9
  986. data/spec/functional/dsl/reboot_pending_spec.rb +37 -52
  987. data/spec/functional/dsl/registry_helper_spec.rb +8 -10
  988. data/spec/functional/event_loggers/windows_eventlog_spec.rb +36 -28
  989. data/spec/functional/file_content_management/deploy_strategies_spec.rb +10 -11
  990. data/spec/functional/http/simple_spec.rb +13 -13
  991. data/spec/functional/knife/configure_spec.rb +5 -10
  992. data/spec/functional/knife/cookbook_delete_spec.rb +55 -56
  993. data/spec/functional/knife/exec_spec.rb +12 -12
  994. data/spec/functional/knife/rehash_spec.rb +39 -0
  995. data/spec/functional/knife/smoke_test.rb +11 -3
  996. data/spec/functional/knife/ssh_spec.rb +47 -31
  997. data/spec/functional/mixin/powershell_out_spec.rb +5 -5
  998. data/spec/functional/mixin/shell_out_spec.rb +12 -12
  999. data/spec/functional/notifications_spec.rb +78 -9
  1000. data/spec/functional/provider/remote_file/cache_control_data_spec.rb +11 -12
  1001. data/spec/functional/provider/whyrun_safe_ruby_block_spec.rb +6 -6
  1002. data/spec/functional/rebooter_spec.rb +18 -18
  1003. data/spec/functional/resource/aix_service_spec.rb +9 -10
  1004. data/spec/functional/resource/aixinit_service_spec.rb +20 -20
  1005. data/spec/functional/resource/base.rb +1 -3
  1006. data/spec/functional/resource/bash_spec.rb +10 -10
  1007. data/spec/functional/resource/batch_spec.rb +5 -5
  1008. data/spec/functional/resource/bff_spec.rb +10 -12
  1009. data/spec/functional/resource/chocolatey_package_spec.rb +125 -0
  1010. data/spec/functional/resource/cookbook_file_spec.rb +10 -10
  1011. data/spec/functional/resource/cron_spec.rb +22 -15
  1012. data/spec/functional/resource/deploy_revision_spec.rb +22 -22
  1013. data/spec/functional/resource/directory_spec.rb +4 -4
  1014. data/spec/functional/resource/dpkg_package_spec.rb +339 -0
  1015. data/spec/functional/resource/dsc_resource_spec.rb +23 -26
  1016. data/spec/functional/resource/dsc_script_spec.rb +217 -114
  1017. data/spec/functional/resource/env_spec.rb +34 -34
  1018. data/spec/functional/resource/execute_spec.rb +14 -14
  1019. data/spec/functional/resource/file_spec.rb +12 -13
  1020. data/spec/functional/resource/git_spec.rb +23 -25
  1021. data/spec/functional/resource/group_spec.rb +131 -87
  1022. data/spec/functional/resource/ifconfig_spec.rb +20 -12
  1023. data/spec/functional/resource/link_spec.rb +179 -145
  1024. data/spec/functional/resource/mount_spec.rb +20 -29
  1025. data/spec/functional/resource/ohai_spec.rb +11 -14
  1026. data/spec/functional/resource/package_spec.rb +12 -14
  1027. data/spec/functional/resource/{powershell_spec.rb → powershell_script_spec.rb} +164 -75
  1028. data/spec/functional/resource/reboot_spec.rb +14 -14
  1029. data/spec/functional/resource/registry_spec.rb +192 -77
  1030. data/spec/functional/resource/remote_directory_spec.rb +23 -23
  1031. data/spec/functional/resource/remote_file_spec.rb +32 -23
  1032. data/spec/functional/resource/rpm_spec.rb +14 -14
  1033. data/spec/functional/resource/template_spec.rb +12 -12
  1034. data/spec/functional/resource/user/dscl_spec.rb +8 -8
  1035. data/spec/functional/resource/user/useradd_spec.rb +62 -67
  1036. data/spec/functional/resource/user/windows_spec.rb +25 -17
  1037. data/spec/functional/resource/windows_package_spec.rb +168 -0
  1038. data/spec/functional/resource/windows_service_spec.rb +27 -23
  1039. data/spec/functional/rest_spec.rb +8 -7
  1040. data/spec/functional/run_lock_spec.rb +385 -198
  1041. data/spec/functional/shell_spec.rb +12 -11
  1042. data/spec/functional/tiny_server_spec.rb +25 -24
  1043. data/spec/functional/util/path_helper_spec.rb +6 -6
  1044. data/spec/functional/util/powershell/cmdlet_spec.rb +24 -27
  1045. data/spec/functional/version_spec.rb +6 -6
  1046. data/spec/functional/win32/crypto_spec.rb +8 -11
  1047. data/spec/functional/win32/{registry_helper_spec.rb → registry_spec.rb} +118 -126
  1048. data/spec/functional/win32/security_spec.rb +25 -25
  1049. data/spec/functional/win32/service_manager_spec.rb +14 -15
  1050. data/spec/functional/win32/sid_spec.rb +13 -13
  1051. data/spec/functional/win32/version_info_spec.rb +50 -0
  1052. data/spec/functional/win32/versions_spec.rb +15 -15
  1053. data/spec/integration/client/client_spec.rb +189 -57
  1054. data/spec/integration/client/exit_code_spec.rb +245 -0
  1055. data/spec/integration/client/ipv6_spec.rb +15 -16
  1056. data/spec/integration/knife/chef_fs_data_store_spec.rb +432 -246
  1057. data/spec/integration/knife/chef_repo_path_spec.rb +332 -261
  1058. data/spec/integration/knife/chef_repository_file_system_spec.rb +88 -84
  1059. data/spec/integration/knife/chefignore_spec.rb +82 -82
  1060. data/spec/integration/knife/client_bulk_delete_spec.rb +130 -0
  1061. data/spec/integration/knife/client_create_spec.rb +69 -0
  1062. data/spec/integration/knife/client_delete_spec.rb +63 -0
  1063. data/spec/integration/knife/client_key_create_spec.rb +65 -0
  1064. data/spec/integration/knife/client_key_delete_spec.rb +42 -0
  1065. data/spec/integration/knife/client_key_list_spec.rb +60 -0
  1066. data/spec/integration/knife/client_key_show_spec.rb +44 -0
  1067. data/spec/integration/knife/client_list_spec.rb +48 -0
  1068. data/spec/integration/knife/client_show_spec.rb +36 -0
  1069. data/spec/integration/knife/common_options_spec.rb +41 -41
  1070. data/spec/integration/knife/cookbook_api_ipv6_spec.rb +9 -9
  1071. data/spec/integration/knife/cookbook_bulk_delete_spec.rb +64 -0
  1072. data/spec/integration/knife/cookbook_download_spec.rb +95 -0
  1073. data/spec/integration/knife/cookbook_list_spec.rb +54 -0
  1074. data/spec/integration/knife/cookbook_show_spec.rb +159 -0
  1075. data/spec/integration/knife/cookbook_upload_spec.rb +90 -0
  1076. data/spec/integration/knife/data_bag_create_spec.rb +55 -0
  1077. data/spec/integration/knife/data_bag_delete_spec.rb +58 -0
  1078. data/spec/integration/knife/data_bag_from_file_spec.rb +115 -0
  1079. data/spec/integration/knife/data_bag_list_spec.rb +43 -0
  1080. data/spec/integration/knife/data_bag_show_spec.rb +53 -0
  1081. data/spec/integration/knife/delete_spec.rb +262 -248
  1082. data/spec/integration/knife/deps_spec.rb +284 -284
  1083. data/spec/integration/knife/diff_spec.rb +237 -237
  1084. data/spec/integration/knife/download_spec.rb +555 -392
  1085. data/spec/integration/knife/environment_compare_spec.rb +74 -0
  1086. data/spec/integration/knife/environment_create_spec.rb +40 -0
  1087. data/spec/integration/knife/environment_delete_spec.rb +36 -0
  1088. data/spec/integration/knife/environment_from_file_spec.rb +115 -0
  1089. data/spec/integration/knife/environment_list_spec.rb +41 -0
  1090. data/spec/integration/knife/environment_show_spec.rb +76 -0
  1091. data/spec/integration/knife/list_spec.rb +316 -122
  1092. data/spec/integration/knife/node_bulk_delete_spec.rb +51 -0
  1093. data/spec/integration/knife/node_create_spec.rb +46 -0
  1094. data/spec/integration/knife/node_delete_spec.rb +47 -0
  1095. data/spec/integration/knife/node_environment_set_spec.rb +45 -0
  1096. data/spec/integration/knife/node_from_file_spec.rb +58 -0
  1097. data/spec/integration/knife/node_list_spec.rb +44 -0
  1098. data/spec/integration/knife/node_run_list_add_spec.rb +53 -0
  1099. data/spec/integration/knife/node_run_list_remove_spec.rb +35 -0
  1100. data/spec/integration/knife/node_run_list_set_spec.rb +40 -0
  1101. data/spec/integration/knife/node_show_spec.rb +35 -0
  1102. data/spec/integration/knife/raw_spec.rb +41 -39
  1103. data/spec/integration/knife/redirection_spec.rb +12 -12
  1104. data/spec/integration/knife/role_bulk_delete_spec.rb +51 -0
  1105. data/spec/integration/knife/role_create_spec.rb +40 -0
  1106. data/spec/integration/knife/role_delete_spec.rb +47 -0
  1107. data/spec/integration/knife/role_from_file_spec.rb +95 -0
  1108. data/spec/integration/knife/role_list_spec.rb +44 -0
  1109. data/spec/integration/knife/role_show_spec.rb +50 -0
  1110. data/spec/integration/knife/serve_spec.rb +12 -12
  1111. data/spec/integration/knife/show_spec.rb +59 -59
  1112. data/spec/integration/knife/upload_spec.rb +700 -543
  1113. data/spec/integration/recipes/accumulator_spec.rb +232 -0
  1114. data/spec/integration/recipes/lwrp_inline_resources_spec.rb +124 -27
  1115. data/spec/integration/recipes/lwrp_spec.rb +7 -7
  1116. data/spec/integration/recipes/noop_resource_spec.rb +24 -0
  1117. data/spec/integration/recipes/notifies_spec.rb +334 -0
  1118. data/spec/integration/recipes/notifying_block_spec.rb +111 -0
  1119. data/spec/integration/recipes/provider_choice.rb +5 -4
  1120. data/spec/integration/recipes/recipe_dsl_spec.rb +417 -404
  1121. data/spec/integration/recipes/remote_directory.rb +74 -0
  1122. data/spec/integration/recipes/resource_action_spec.rb +581 -0
  1123. data/spec/integration/recipes/resource_converge_if_changed_spec.rb +496 -0
  1124. data/spec/integration/recipes/resource_load_spec.rb +208 -0
  1125. data/spec/integration/solo/solo_spec.rb +78 -54
  1126. data/spec/scripts/ssl-serve.rb +12 -17
  1127. data/spec/spec_helper.rb +82 -48
  1128. data/spec/stress/win32/file_spec.rb +5 -5
  1129. data/spec/stress/win32/memory_spec.rb +4 -4
  1130. data/spec/stress/win32/security_spec.rb +14 -14
  1131. data/spec/support/chef_helpers.rb +27 -6
  1132. data/spec/support/key_helpers.rb +2 -2
  1133. data/spec/support/lib/chef/provider/easy.rb +2 -2
  1134. data/spec/support/lib/chef/provider/openldap_includer.rb +2 -2
  1135. data/spec/support/lib/chef/provider/snakeoil.rb +2 -2
  1136. data/spec/support/lib/chef/resource/cat.rb +5 -5
  1137. data/spec/support/lib/chef/resource/one_two_three_four.rb +3 -3
  1138. data/spec/support/lib/chef/resource/openldap_includer.rb +2 -3
  1139. data/spec/support/lib/chef/resource/with_state.rb +4 -4
  1140. data/spec/support/lib/chef/resource/zen_follower.rb +4 -4
  1141. data/spec/support/lib/chef/resource/zen_master.rb +5 -6
  1142. data/spec/support/lib/library_load_order.rb +0 -2
  1143. data/spec/support/matchers/leak.rb +7 -5
  1144. data/spec/support/mock/constant.rb +5 -5
  1145. data/spec/support/mock/platform.rb +6 -6
  1146. data/spec/support/platform_helpers.rb +65 -31
  1147. data/spec/support/platforms/prof/gc.rb +2 -3
  1148. data/spec/support/platforms/prof/win32.rb +3 -4
  1149. data/spec/support/platforms/win32/spec_service.rb +4 -4
  1150. data/spec/support/shared/context/client.rb +33 -15
  1151. data/spec/support/shared/context/config.rb +3 -3
  1152. data/spec/support/shared/context/win32.rb +34 -0
  1153. data/spec/support/shared/examples/client.rb +4 -4
  1154. data/spec/support/shared/functional/diff_disabled.rb +1 -1
  1155. data/spec/support/shared/functional/directory_resource.rb +10 -10
  1156. data/spec/support/shared/functional/file_resource.rb +29 -31
  1157. data/spec/support/shared/functional/http.rb +47 -48
  1158. data/spec/support/shared/functional/knife.rb +3 -3
  1159. data/spec/support/shared/functional/securable_resource.rb +54 -54
  1160. data/spec/support/shared/functional/securable_resource_with_reporting.rb +8 -12
  1161. data/spec/support/shared/functional/win32_service.rb +8 -11
  1162. data/spec/support/shared/functional/windows_script.rb +68 -31
  1163. data/spec/support/shared/integration/app_server_support.rb +8 -10
  1164. data/spec/support/shared/integration/integration_helper.rb +27 -21
  1165. data/spec/support/shared/integration/knife_support.rb +29 -17
  1166. data/spec/support/shared/matchers/exit_with_code.rb +3 -3
  1167. data/spec/support/shared/matchers/match_environment_variable.rb +2 -2
  1168. data/spec/support/shared/shared_examples.rb +2 -2
  1169. data/spec/support/shared/unit/api_error_inspector.rb +3 -5
  1170. data/spec/support/shared/unit/api_versioning.rb +10 -10
  1171. data/spec/support/shared/unit/application_dot_d.rb +73 -0
  1172. data/spec/support/shared/unit/execute_resource.rb +11 -6
  1173. data/spec/support/shared/unit/file_system_support.rb +12 -13
  1174. data/spec/support/shared/unit/knife_shared.rb +1 -2
  1175. data/spec/support/shared/unit/mock_shellout.rb +49 -0
  1176. data/spec/support/shared/unit/platform_introspector.rb +39 -34
  1177. data/spec/support/shared/unit/provider/file.rb +33 -38
  1178. data/spec/support/shared/unit/provider/useradd_based_user_provider.rb +86 -118
  1179. data/spec/support/shared/unit/resource/static_provider_resolution.rb +4 -7
  1180. data/spec/support/shared/unit/script_resource.rb +17 -17
  1181. data/spec/support/shared/unit/user_and_client_shared.rb +12 -13
  1182. data/spec/support/shared/unit/windows_script_resource.rb +7 -8
  1183. data/spec/tiny_server.rb +69 -80
  1184. data/spec/unit/api_client/registration_spec.rb +46 -42
  1185. data/spec/unit/api_client_spec.rb +13 -16
  1186. data/spec/unit/api_client_v1_spec.rb +18 -20
  1187. data/spec/unit/application/apply_spec.rb +10 -7
  1188. data/spec/unit/application/client_spec.rb +184 -69
  1189. data/spec/unit/application/exit_code_spec.rb +241 -0
  1190. data/spec/unit/application/knife_spec.rb +71 -19
  1191. data/spec/unit/application/solo_spec.rb +149 -102
  1192. data/spec/unit/application_spec.rb +170 -303
  1193. data/spec/unit/audit/audit_event_proxy_spec.rb +44 -37
  1194. data/spec/unit/audit/audit_reporter_spec.rb +43 -41
  1195. data/spec/unit/audit/control_group_data_spec.rb +34 -30
  1196. data/spec/unit/audit/logger_spec.rb +5 -5
  1197. data/spec/unit/audit/rspec_formatter_spec.rb +4 -4
  1198. data/spec/unit/audit/runner_spec.rb +11 -12
  1199. data/spec/unit/chef_class_spec.rb +30 -11
  1200. data/spec/unit/chef_fs/config_spec.rb +140 -15
  1201. data/spec/unit/chef_fs/data_handler/group_handler_spec.rb +18 -18
  1202. data/spec/unit/chef_fs/diff_spec.rb +79 -79
  1203. data/spec/unit/chef_fs/file_pattern_spec.rb +368 -369
  1204. data/spec/unit/chef_fs/file_system/cookbook_subdir_spec.rb +34 -0
  1205. data/spec/unit/chef_fs/file_system/operation_failed_error_spec.rb +13 -13
  1206. data/spec/unit/chef_fs/file_system/repository/base_file_spec.rb +126 -0
  1207. data/spec/unit/chef_fs/file_system/repository/directory_spec.rb +175 -0
  1208. data/spec/unit/chef_fs/file_system_spec.rb +75 -75
  1209. data/spec/unit/chef_fs/parallelizer.rb +71 -76
  1210. data/spec/unit/chef_fs/path_util_spec.rb +108 -0
  1211. data/spec/unit/chef_spec.rb +3 -3
  1212. data/spec/unit/client_spec.rb +51 -46
  1213. data/spec/unit/config_fetcher_spec.rb +57 -29
  1214. data/spec/unit/config_spec.rb +31 -0
  1215. data/spec/unit/cookbook/chefignore_spec.rb +12 -12
  1216. data/spec/unit/cookbook/cookbook_version_loader_spec.rb +17 -6
  1217. data/spec/unit/cookbook/file_vendor_spec.rb +23 -9
  1218. data/spec/unit/cookbook/metadata_spec.rb +345 -161
  1219. data/spec/unit/cookbook/synchronizer_spec.rb +40 -34
  1220. data/spec/unit/cookbook/syntax_check_spec.rb +28 -23
  1221. data/spec/unit/cookbook_loader_spec.rb +43 -35
  1222. data/spec/unit/cookbook_manifest_spec.rb +27 -28
  1223. data/spec/unit/cookbook_site_streaming_uploader_spec.rb +28 -24
  1224. data/spec/unit/cookbook_spec.rb +5 -5
  1225. data/spec/unit/cookbook_uploader_spec.rb +10 -11
  1226. data/spec/unit/cookbook_version_file_specificity_spec.rb +74 -52
  1227. data/spec/unit/cookbook_version_spec.rb +143 -128
  1228. data/spec/unit/daemon_spec.rb +6 -6
  1229. data/spec/unit/data_bag_item_spec.rb +110 -46
  1230. data/spec/unit/data_bag_spec.rb +51 -51
  1231. data/spec/unit/data_collector/messages/helpers_spec.rb +186 -0
  1232. data/spec/unit/data_collector/messages_spec.rb +192 -0
  1233. data/spec/unit/data_collector_spec.rb +695 -0
  1234. data/spec/unit/decorator/lazy_array_spec.rb +58 -0
  1235. data/spec/unit/decorator/lazy_spec.rb +39 -0
  1236. data/spec/unit/decorator_spec.rb +142 -0
  1237. data/spec/unit/deprecation_spec.rb +14 -17
  1238. data/spec/unit/digester_spec.rb +5 -6
  1239. data/spec/unit/dsl/audit_spec.rb +7 -7
  1240. data/spec/unit/dsl/data_query_spec.rb +15 -14
  1241. data/spec/unit/dsl/declare_resource_spec.rb +365 -0
  1242. data/spec/unit/dsl/platform_introspection_spec.rb +19 -20
  1243. data/spec/unit/dsl/reboot_pending_spec.rb +29 -23
  1244. data/spec/unit/dsl/recipe_spec.rb +17 -6
  1245. data/spec/unit/dsl/{regsitry_helper_spec.rb → registry_helper_spec.rb} +10 -13
  1246. data/spec/unit/dsl/resources_spec.rb +14 -14
  1247. data/spec/unit/encrypted_data_bag_item/check_encrypted_spec.rb +11 -10
  1248. data/spec/unit/encrypted_data_bag_item_spec.rb +17 -16
  1249. data/spec/unit/environment_spec.rb +65 -65
  1250. data/spec/unit/event_dispatch/dispatcher_spec.rb +69 -8
  1251. data/spec/unit/event_dispatch/dsl_spec.rb +83 -0
  1252. data/spec/unit/exceptions_spec.rb +12 -10
  1253. data/spec/unit/file_access_control_spec.rb +35 -35
  1254. data/spec/unit/file_cache_spec.rb +19 -19
  1255. data/spec/unit/file_content_management/deploy/cp_spec.rb +3 -5
  1256. data/spec/unit/file_content_management/deploy/mv_unix_spec.rb +3 -5
  1257. data/spec/unit/file_content_management/deploy/mv_windows_spec.rb +5 -12
  1258. data/spec/unit/file_content_management/tempfile_spec.rb +115 -0
  1259. data/spec/unit/formatters/base_spec.rb +29 -6
  1260. data/spec/unit/formatters/doc_spec.rb +53 -7
  1261. data/spec/unit/formatters/error_description_spec.rb +96 -0
  1262. data/spec/unit/formatters/error_inspectors/api_error_formatting_spec.rb +11 -12
  1263. data/spec/unit/formatters/error_inspectors/compile_error_inspector_spec.rb +36 -10
  1264. data/spec/unit/formatters/error_inspectors/cookbook_resolve_error_inspector_spec.rb +4 -7
  1265. data/spec/unit/formatters/error_inspectors/cookbook_sync_error_inspector_spec.rb +3 -3
  1266. data/spec/unit/formatters/error_inspectors/node_load_error_inspector_spec.rb +3 -4
  1267. data/spec/unit/formatters/error_inspectors/registration_error_inspector_spec.rb +3 -4
  1268. data/spec/unit/formatters/error_inspectors/resource_failure_inspector_spec.rb +4 -6
  1269. data/spec/unit/formatters/error_inspectors/run_list_expansion_error_inspector_spec.rb +5 -7
  1270. data/spec/unit/guard_interpreter/resource_guard_interpreter_spec.rb +11 -11
  1271. data/spec/unit/guard_interpreter_spec.rb +3 -3
  1272. data/spec/unit/handler/json_file_spec.rb +11 -12
  1273. data/spec/unit/handler_spec.rb +94 -7
  1274. data/spec/unit/http/authenticator_spec.rb +9 -7
  1275. data/spec/unit/http/basic_client_spec.rb +28 -85
  1276. data/spec/unit/http/http_request_spec.rb +22 -22
  1277. data/spec/unit/http/json_input_spec.rb +7 -7
  1278. data/spec/unit/http/simple_spec.rb +3 -3
  1279. data/spec/unit/http/socketless_chef_zero_client_spec.rb +3 -4
  1280. data/spec/unit/http/ssl_policies_spec.rb +18 -19
  1281. data/spec/unit/http/validate_content_length_spec.rb +37 -22
  1282. data/spec/unit/http_spec.rb +146 -18
  1283. data/spec/unit/json_compat_spec.rb +18 -10
  1284. data/spec/unit/key_spec.rb +40 -43
  1285. data/spec/unit/knife/bootstrap/chef_vault_handler_spec.rb +43 -44
  1286. data/spec/unit/knife/bootstrap/client_builder_spec.rb +57 -28
  1287. data/spec/unit/knife/bootstrap_spec.rb +229 -46
  1288. data/spec/unit/knife/client_bulk_delete_spec.rb +16 -16
  1289. data/spec/unit/knife/client_create_spec.rb +13 -14
  1290. data/spec/unit/knife/client_delete_spec.rb +14 -14
  1291. data/spec/unit/knife/client_edit_spec.rb +12 -12
  1292. data/spec/unit/knife/client_list_spec.rb +5 -5
  1293. data/spec/unit/knife/client_reregister_spec.rb +13 -13
  1294. data/spec/unit/knife/client_show_spec.rb +12 -12
  1295. data/spec/unit/knife/configure_client_spec.rb +21 -22
  1296. data/spec/unit/knife/configure_spec.rb +37 -39
  1297. data/spec/unit/knife/cookbook_bulk_delete_spec.rb +17 -19
  1298. data/spec/unit/knife/cookbook_create_spec.rb +79 -78
  1299. data/spec/unit/knife/cookbook_delete_spec.rb +79 -79
  1300. data/spec/unit/knife/cookbook_download_spec.rb +84 -85
  1301. data/spec/unit/knife/cookbook_list_spec.rb +26 -26
  1302. data/spec/unit/knife/cookbook_metadata_from_file_spec.rb +5 -5
  1303. data/spec/unit/knife/cookbook_metadata_spec.rb +59 -59
  1304. data/spec/unit/knife/cookbook_show_spec.rb +102 -104
  1305. data/spec/unit/knife/cookbook_site_download_spec.rb +52 -53
  1306. data/spec/unit/knife/cookbook_site_install_spec.rb +17 -12
  1307. data/spec/unit/knife/cookbook_site_share_spec.rb +47 -47
  1308. data/spec/unit/knife/cookbook_site_unshare_spec.rb +20 -20
  1309. data/spec/unit/knife/cookbook_test_spec.rb +8 -8
  1310. data/spec/unit/knife/cookbook_upload_spec.rb +77 -75
  1311. data/spec/unit/knife/core/bootstrap_context_spec.rb +64 -34
  1312. data/spec/unit/knife/core/cookbook_scm_repo_spec.rb +32 -32
  1313. data/spec/unit/knife/core/custom_manifest_loader_spec.rb +41 -0
  1314. data/spec/unit/knife/core/gem_glob_loader_spec.rb +209 -0
  1315. data/spec/unit/knife/core/hashed_command_loader_spec.rb +110 -0
  1316. data/spec/unit/knife/core/node_editor_spec.rb +211 -0
  1317. data/spec/unit/knife/core/object_loader_spec.rb +12 -12
  1318. data/spec/unit/knife/core/subcommand_loader_spec.rb +25 -195
  1319. data/spec/unit/knife/core/ui_spec.rb +92 -54
  1320. data/spec/unit/knife/data_bag_create_spec.rb +14 -14
  1321. data/spec/unit/knife/data_bag_edit_spec.rb +13 -13
  1322. data/spec/unit/knife/data_bag_from_file_spec.rb +13 -12
  1323. data/spec/unit/knife/data_bag_secret_options_spec.rb +6 -6
  1324. data/spec/unit/knife/data_bag_show_spec.rb +22 -21
  1325. data/spec/unit/knife/environment_compare_spec.rb +33 -33
  1326. data/spec/unit/knife/environment_create_spec.rb +3 -3
  1327. data/spec/unit/knife/environment_delete_spec.rb +2 -2
  1328. data/spec/unit/knife/environment_edit_spec.rb +4 -4
  1329. data/spec/unit/knife/environment_from_file_spec.rb +5 -5
  1330. data/spec/unit/knife/environment_list_spec.rb +4 -4
  1331. data/spec/unit/knife/environment_show_spec.rb +2 -2
  1332. data/spec/unit/knife/index_rebuild_spec.rb +14 -17
  1333. data/spec/unit/knife/key_create_spec.rb +27 -28
  1334. data/spec/unit/knife/key_delete_spec.rb +10 -12
  1335. data/spec/unit/knife/key_edit_spec.rb +32 -35
  1336. data/spec/unit/knife/key_helper.rb +2 -2
  1337. data/spec/unit/knife/key_list_spec.rb +19 -19
  1338. data/spec/unit/knife/key_show_spec.rb +15 -15
  1339. data/spec/unit/knife/knife_help.rb +2 -2
  1340. data/spec/unit/knife/node_bulk_delete_spec.rb +10 -13
  1341. data/spec/unit/knife/node_delete_spec.rb +5 -5
  1342. data/spec/unit/knife/node_edit_spec.rb +17 -18
  1343. data/spec/unit/knife/node_environment_set_spec.rb +5 -29
  1344. data/spec/unit/knife/node_from_file_spec.rb +6 -6
  1345. data/spec/unit/knife/node_list_spec.rb +6 -7
  1346. data/spec/unit/knife/node_run_list_add_spec.rb +6 -9
  1347. data/spec/unit/knife/node_run_list_remove_spec.rb +38 -21
  1348. data/spec/unit/knife/node_run_list_set_spec.rb +4 -29
  1349. data/spec/unit/knife/node_show_spec.rb +7 -7
  1350. data/spec/unit/knife/osc_user_create_spec.rb +9 -9
  1351. data/spec/unit/knife/osc_user_delete_spec.rb +7 -7
  1352. data/spec/unit/knife/osc_user_edit_spec.rb +7 -7
  1353. data/spec/unit/knife/osc_user_list_spec.rb +3 -3
  1354. data/spec/unit/knife/osc_user_reregister_spec.rb +10 -10
  1355. data/spec/unit/knife/osc_user_show_spec.rb +8 -8
  1356. data/spec/unit/knife/raw_spec.rb +6 -6
  1357. data/spec/unit/knife/role_bulk_delete_spec.rb +5 -5
  1358. data/spec/unit/knife/role_create_spec.rb +6 -6
  1359. data/spec/unit/knife/role_delete_spec.rb +5 -5
  1360. data/spec/unit/knife/role_edit_spec.rb +7 -9
  1361. data/spec/unit/knife/role_env_run_list_add_spec.rb +10 -10
  1362. data/spec/unit/knife/role_env_run_list_clear_spec.rb +40 -46
  1363. data/spec/unit/knife/role_env_run_list_remove_spec.rb +47 -53
  1364. data/spec/unit/knife/role_env_run_list_replace_spec.rb +50 -53
  1365. data/spec/unit/knife/role_env_run_list_set_spec.rb +18 -21
  1366. data/spec/unit/knife/role_from_file_spec.rb +8 -8
  1367. data/spec/unit/knife/role_list_spec.rb +6 -8
  1368. data/spec/unit/knife/role_run_list_add_spec.rb +8 -8
  1369. data/spec/unit/knife/role_run_list_clear_spec.rb +29 -35
  1370. data/spec/unit/knife/role_run_list_remove_spec.rb +37 -43
  1371. data/spec/unit/knife/role_run_list_replace_spec.rb +43 -46
  1372. data/spec/unit/knife/role_run_list_set_spec.rb +7 -10
  1373. data/spec/unit/knife/role_show_spec.rb +14 -14
  1374. data/spec/unit/knife/ssh_spec.rb +54 -36
  1375. data/spec/unit/knife/ssl_check_spec.rb +34 -10
  1376. data/spec/unit/knife/ssl_fetch_spec.rb +48 -10
  1377. data/spec/unit/knife/status_spec.rb +19 -18
  1378. data/spec/unit/knife/tag_create_spec.rb +1 -1
  1379. data/spec/unit/knife/tag_delete_spec.rb +2 -2
  1380. data/spec/unit/knife/tag_list_spec.rb +2 -2
  1381. data/spec/unit/knife/user_create_spec.rb +35 -35
  1382. data/spec/unit/knife/user_delete_spec.rb +11 -11
  1383. data/spec/unit/knife/user_edit_spec.rb +10 -10
  1384. data/spec/unit/knife/user_list_spec.rb +3 -3
  1385. data/spec/unit/knife/user_reregister_spec.rb +13 -13
  1386. data/spec/unit/knife/user_show_spec.rb +12 -12
  1387. data/spec/unit/knife_spec.rb +126 -63
  1388. data/spec/unit/lib_backcompat_spec.rb +34 -0
  1389. data/spec/unit/log/syslog_spec.rb +3 -3
  1390. data/spec/unit/log/winevt_spec.rb +3 -3
  1391. data/spec/unit/log_spec.rb +5 -5
  1392. data/spec/unit/lwrp_spec.rb +103 -47
  1393. data/spec/unit/mash_spec.rb +8 -8
  1394. data/spec/unit/mixin/api_version_request_handling_spec.rb +15 -16
  1395. data/spec/unit/mixin/checksum_spec.rb +19 -6
  1396. data/spec/unit/mixin/command_spec.rb +17 -14
  1397. data/spec/unit/mixin/convert_to_class_name_spec.rb +2 -2
  1398. data/spec/unit/mixin/deep_merge_spec.rb +107 -107
  1399. data/spec/unit/mixin/deprecation_spec.rb +6 -6
  1400. data/spec/unit/mixin/enforce_ownership_and_permissions_spec.rb +15 -15
  1401. data/spec/unit/mixin/homebrew_user_spec.rb +15 -15
  1402. data/spec/unit/mixin/lazy_module_include.rb +71 -0
  1403. data/spec/unit/mixin/params_validate_spec.rb +140 -137
  1404. data/spec/unit/mixin/path_sanity_spec.rb +22 -16
  1405. data/spec/unit/mixin/powershell_out_spec.rb +32 -8
  1406. data/spec/unit/mixin/powershell_type_coercions_spec.rb +35 -24
  1407. data/spec/unit/mixin/properties_spec.rb +97 -0
  1408. data/spec/unit/mixin/proxified_socket_spec.rb +97 -0
  1409. data/spec/unit/mixin/securable_spec.rb +37 -37
  1410. data/spec/unit/mixin/shell_out_spec.rb +67 -63
  1411. data/spec/unit/mixin/subclass_directive_spec.rb +45 -0
  1412. data/spec/unit/mixin/template_spec.rb +20 -13
  1413. data/spec/unit/mixin/unformatter_spec.rb +3 -3
  1414. data/spec/unit/mixin/uris_spec.rb +8 -8
  1415. data/spec/unit/mixin/windows_architecture_helper_spec.rb +22 -20
  1416. data/spec/unit/mixin/xml_escape_spec.rb +6 -6
  1417. data/spec/unit/monkey_patches/uri_spec.rb +3 -3
  1418. data/spec/unit/monologger_spec.rb +4 -4
  1419. data/spec/unit/node/attribute_spec.rb +284 -264
  1420. data/spec/unit/node/immutable_collections_spec.rb +25 -22
  1421. data/spec/unit/node/vivid_mash_spec.rb +342 -0
  1422. data/spec/unit/node_map_spec.rb +5 -5
  1423. data/spec/unit/node_spec.rb +644 -136
  1424. data/spec/unit/org_spec.rb +17 -17
  1425. data/spec/unit/platform/query_helpers_spec.rb +153 -10
  1426. data/spec/unit/platform_spec.rb +11 -11
  1427. data/spec/unit/policy_builder/dynamic_spec.rb +273 -0
  1428. data/spec/unit/policy_builder/expand_node_object_spec.rb +53 -52
  1429. data/spec/unit/policy_builder/policyfile_spec.rb +295 -80
  1430. data/spec/unit/policy_builder_spec.rb +4 -4
  1431. data/spec/unit/property/state_spec.rb +508 -0
  1432. data/spec/unit/property/validation_spec.rb +720 -0
  1433. data/spec/unit/property_spec.rb +1227 -0
  1434. data/spec/unit/provider/apt_repository_spec.rb +183 -0
  1435. data/spec/unit/provider/apt_update_spec.rb +114 -0
  1436. data/spec/unit/provider/breakpoint_spec.rb +2 -3
  1437. data/spec/unit/provider/cookbook_file/content_spec.rb +9 -10
  1438. data/spec/unit/provider/cookbook_file_spec.rb +15 -15
  1439. data/spec/unit/provider/cron/unix_spec.rb +11 -11
  1440. data/spec/unit/provider/cron_spec.rb +85 -85
  1441. data/spec/unit/provider/deploy/revision_spec.rb +6 -7
  1442. data/spec/unit/provider/deploy/timestamped_spec.rb +2 -2
  1443. data/spec/unit/provider/deploy_spec.rb +37 -38
  1444. data/spec/unit/provider/directory_spec.rb +51 -13
  1445. data/spec/unit/provider/dsc_resource_spec.rb +121 -37
  1446. data/spec/unit/provider/dsc_script_spec.rb +56 -57
  1447. data/spec/unit/provider/env/windows_spec.rb +27 -27
  1448. data/spec/unit/provider/env_spec.rb +5 -5
  1449. data/spec/unit/provider/erl_call_spec.rb +3 -4
  1450. data/spec/unit/provider/execute_spec.rb +100 -33
  1451. data/spec/unit/provider/file/content_spec.rb +14 -14
  1452. data/spec/unit/provider/file_spec.rb +12 -13
  1453. data/spec/unit/provider/git_spec.rb +132 -74
  1454. data/spec/unit/provider/group/dscl_spec.rb +9 -9
  1455. data/spec/unit/provider/group/gpasswd_spec.rb +3 -3
  1456. data/spec/unit/provider/group/groupadd_spec.rb +121 -102
  1457. data/spec/unit/provider/group/groupmod_spec.rb +12 -12
  1458. data/spec/unit/provider/group/pw_spec.rb +7 -7
  1459. data/spec/unit/provider/group/suse_spec.rb +90 -0
  1460. data/spec/unit/provider/group/usermod_spec.rb +8 -8
  1461. data/spec/unit/provider/group/windows_spec.rb +13 -5
  1462. data/spec/unit/provider/group_spec.rb +16 -16
  1463. data/spec/unit/provider/http_request_spec.rb +7 -7
  1464. data/spec/unit/provider/ifconfig/aix_spec.rb +4 -5
  1465. data/spec/unit/provider/ifconfig/debian_spec.rb +6 -6
  1466. data/spec/unit/provider/ifconfig/redhat_spec.rb +3 -3
  1467. data/spec/unit/provider/ifconfig_spec.rb +27 -7
  1468. data/spec/unit/provider/launchd_spec.rb +190 -0
  1469. data/spec/unit/provider/link_spec.rb +167 -12
  1470. data/spec/unit/provider/log_spec.rb +16 -2
  1471. data/spec/unit/provider/mdadm_spec.rb +21 -12
  1472. data/spec/unit/provider/mount/aix_spec.rb +7 -7
  1473. data/spec/unit/provider/mount/mount_spec.rb +26 -26
  1474. data/spec/unit/provider/mount/solaris_spec.rb +75 -75
  1475. data/spec/unit/provider/mount/windows_spec.rb +17 -5
  1476. data/spec/unit/provider/mount_spec.rb +7 -16
  1477. data/spec/unit/provider/ohai_spec.rb +14 -14
  1478. data/spec/unit/provider/osx_profile_spec.rb +255 -0
  1479. data/spec/unit/provider/package/aix_spec.rb +18 -5
  1480. data/spec/unit/provider/package/apt_spec.rb +135 -50
  1481. data/spec/unit/provider/package/cab_spec.rb +218 -0
  1482. data/spec/unit/provider/package/chocolatey_spec.rb +489 -0
  1483. data/spec/unit/provider/package/dpkg_spec.rb +194 -102
  1484. data/spec/unit/provider/package/easy_install_spec.rb +17 -15
  1485. data/spec/unit/provider/package/freebsd/pkg_spec.rb +10 -10
  1486. data/spec/unit/provider/package/freebsd/pkgng_spec.rb +12 -19
  1487. data/spec/unit/provider/package/freebsd/port_spec.rb +16 -23
  1488. data/spec/unit/provider/package/homebrew_spec.rb +139 -139
  1489. data/spec/unit/provider/package/ips_spec.rb +10 -11
  1490. data/spec/unit/provider/package/macports_spec.rb +3 -3
  1491. data/spec/unit/provider/package/openbsd_spec.rb +38 -38
  1492. data/spec/unit/provider/package/pacman_spec.rb +8 -9
  1493. data/spec/unit/provider/package/paludis_spec.rb +9 -10
  1494. data/spec/unit/provider/package/portage_spec.rb +8 -2
  1495. data/spec/unit/provider/package/rpm_spec.rb +25 -12
  1496. data/spec/unit/provider/package/rubygems_spec.rb +461 -304
  1497. data/spec/unit/provider/package/smartos_spec.rb +8 -10
  1498. data/spec/unit/provider/package/solaris_spec.rb +4 -4
  1499. data/spec/unit/provider/package/windows/exe_spec.rb +201 -0
  1500. data/spec/unit/provider/package/windows/msi_spec.rb +108 -15
  1501. data/spec/unit/provider/package/windows_spec.rb +313 -36
  1502. data/spec/unit/provider/package/yum/yum_cache_spec.rb +27 -0
  1503. data/spec/unit/provider/package/yum_spec.rb +351 -255
  1504. data/spec/unit/provider/package/zypper_spec.rb +132 -49
  1505. data/spec/unit/provider/package_spec.rb +572 -372
  1506. data/spec/unit/provider/powershell_script_spec.rb +106 -0
  1507. data/spec/unit/provider/registry_key_spec.rb +144 -20
  1508. data/spec/unit/provider/remote_directory_spec.rb +63 -49
  1509. data/spec/unit/provider/remote_file/cache_control_data_spec.rb +70 -45
  1510. data/spec/unit/provider/remote_file/content_spec.rb +7 -7
  1511. data/spec/unit/provider/remote_file/fetcher_spec.rb +3 -3
  1512. data/spec/unit/provider/remote_file/ftp_spec.rb +8 -10
  1513. data/spec/unit/provider/remote_file/http_spec.rb +31 -12
  1514. data/spec/unit/provider/remote_file/local_file_spec.rb +6 -4
  1515. data/spec/unit/provider/remote_file/network_file_spec.rb +2 -2
  1516. data/spec/unit/provider/remote_file/sftp_spec.rb +150 -0
  1517. data/spec/unit/provider/remote_file_spec.rb +13 -15
  1518. data/spec/unit/provider/route_spec.rb +27 -28
  1519. data/spec/unit/provider/ruby_block_spec.rb +4 -5
  1520. data/spec/unit/provider/script_spec.rb +17 -17
  1521. data/spec/unit/provider/service/aix_service_spec.rb +8 -9
  1522. data/spec/unit/provider/service/aixinit_service_spec.rb +26 -23
  1523. data/spec/unit/provider/service/arch_service_spec.rb +15 -15
  1524. data/spec/unit/provider/service/debian_service_spec.rb +41 -41
  1525. data/spec/unit/provider/service/freebsd_service_spec.rb +26 -22
  1526. data/spec/unit/provider/service/gentoo_service_spec.rb +7 -7
  1527. data/spec/unit/provider/service/init_service_spec.rb +9 -9
  1528. data/spec/unit/provider/service/insserv_service_spec.rb +3 -3
  1529. data/spec/unit/provider/service/invokercd_service_spec.rb +9 -9
  1530. data/spec/unit/provider/service/macosx_spec.rb +29 -29
  1531. data/spec/unit/provider/service/openbsd_service_spec.rb +51 -45
  1532. data/spec/unit/provider/service/redhat_spec.rb +115 -21
  1533. data/spec/unit/provider/service/simple_service_spec.rb +5 -5
  1534. data/spec/unit/provider/service/solaris_smf_service_spec.rb +115 -44
  1535. data/spec/unit/provider/service/systemd_service_spec.rb +123 -32
  1536. data/spec/unit/provider/service/upstart_service_spec.rb +77 -32
  1537. data/spec/unit/provider/service/windows_spec.rb +242 -240
  1538. data/spec/unit/provider/service_spec.rb +2 -3
  1539. data/spec/unit/provider/subversion_spec.rb +140 -68
  1540. data/spec/unit/provider/systemd_unit_spec.rb +885 -0
  1541. data/spec/unit/provider/template/content_spec.rb +104 -13
  1542. data/spec/unit/provider/template_spec.rb +23 -24
  1543. data/spec/unit/provider/user/dscl_spec.rb +114 -96
  1544. data/spec/unit/provider/user/linux_spec.rb +106 -0
  1545. data/spec/unit/provider/user/pw_spec.rb +17 -18
  1546. data/spec/unit/provider/user/solaris_spec.rb +126 -28
  1547. data/spec/unit/provider/user/windows_spec.rb +14 -14
  1548. data/spec/unit/provider/user_spec.rb +36 -22
  1549. data/spec/unit/provider/whyrun_safe_ruby_block_spec.rb +3 -4
  1550. data/spec/unit/provider/yum_repository_spec.rb +35 -0
  1551. data/spec/unit/provider_resolver_spec.rb +772 -696
  1552. data/spec/unit/provider_spec.rb +8 -11
  1553. data/spec/unit/pure_application_spec.rb +3 -3
  1554. data/spec/unit/recipe_spec.rb +95 -49
  1555. data/spec/unit/resource/apt_package_spec.rb +5 -5
  1556. data/spec/unit/resource/apt_repository_spec.rb +50 -0
  1557. data/spec/unit/resource/apt_update_spec.rb +58 -0
  1558. data/spec/unit/resource/bash_spec.rb +3 -3
  1559. data/spec/unit/resource/batch_spec.rb +5 -5
  1560. data/spec/unit/resource/breakpoint_spec.rb +4 -4
  1561. data/spec/unit/resource/cab_package_spec.rb +38 -0
  1562. data/spec/unit/resource/chef_gem_spec.rb +9 -13
  1563. data/spec/unit/resource/chocolatey_package_spec.rb +67 -0
  1564. data/spec/unit/resource/conditional_action_not_nothing_spec.rb +2 -2
  1565. data/spec/unit/resource/conditional_spec.rb +58 -12
  1566. data/spec/unit/resource/cookbook_file_spec.rb +23 -24
  1567. data/spec/unit/resource/cron_spec.rb +8 -8
  1568. data/spec/unit/resource/csh_spec.rb +3 -3
  1569. data/spec/unit/resource/deploy_revision_spec.rb +5 -5
  1570. data/spec/unit/resource/deploy_spec.rb +31 -26
  1571. data/spec/unit/resource/directory_spec.rb +4 -4
  1572. data/spec/unit/resource/dpkg_package_spec.rb +5 -5
  1573. data/spec/unit/resource/dsc_resource_spec.rb +32 -21
  1574. data/spec/unit/resource/dsc_script_spec.rb +23 -19
  1575. data/spec/unit/resource/easy_install_package_spec.rb +4 -4
  1576. data/spec/unit/resource/env_spec.rb +5 -5
  1577. data/spec/unit/resource/erl_call_spec.rb +3 -3
  1578. data/spec/unit/resource/execute_spec.rb +4 -4
  1579. data/spec/unit/resource/file/verification_spec.rb +40 -12
  1580. data/spec/unit/resource/file_spec.rb +10 -10
  1581. data/spec/unit/resource/freebsd_package_spec.rb +12 -15
  1582. data/spec/unit/resource/gem_package_spec.rb +5 -5
  1583. data/spec/unit/resource/git_spec.rb +4 -4
  1584. data/spec/unit/resource/group_spec.rb +13 -8
  1585. data/spec/unit/resource/homebrew_package_spec.rb +14 -14
  1586. data/spec/unit/resource/http_request_spec.rb +5 -5
  1587. data/spec/unit/resource/ifconfig_spec.rb +9 -9
  1588. data/spec/unit/resource/ips_package_spec.rb +5 -5
  1589. data/spec/unit/resource/ksh_spec.rb +40 -0
  1590. data/spec/unit/resource/launchd_spec.rb +32 -0
  1591. data/spec/unit/resource/link_spec.rb +6 -6
  1592. data/spec/unit/resource/log_spec.rb +3 -3
  1593. data/spec/unit/resource/macports_package_spec.rb +4 -4
  1594. data/spec/unit/resource/mdadm_spec.rb +12 -7
  1595. data/spec/unit/resource/mount_spec.rb +10 -10
  1596. data/spec/unit/resource/ohai_spec.rb +2 -3
  1597. data/spec/unit/resource/openbsd_package_spec.rb +5 -6
  1598. data/spec/unit/resource/osx_profile_spec.rb +62 -0
  1599. data/spec/unit/resource/package_spec.rb +6 -6
  1600. data/spec/unit/resource/pacman_package_spec.rb +4 -4
  1601. data/spec/unit/resource/perl_spec.rb +3 -3
  1602. data/spec/unit/resource/portage_package_spec.rb +2 -2
  1603. data/spec/unit/resource/{powershell_spec.rb → powershell_script_spec.rb} +31 -27
  1604. data/spec/unit/resource/python_spec.rb +3 -3
  1605. data/spec/unit/resource/registry_key_spec.rb +44 -28
  1606. data/spec/unit/resource/remote_directory_spec.rb +3 -3
  1607. data/spec/unit/resource/remote_file_spec.rb +21 -21
  1608. data/spec/unit/resource/resource_notification_spec.rb +47 -48
  1609. data/spec/unit/resource/route_spec.rb +3 -3
  1610. data/spec/unit/resource/rpm_package_spec.rb +3 -3
  1611. data/spec/unit/resource/ruby_block_spec.rb +4 -4
  1612. data/spec/unit/resource/ruby_spec.rb +3 -3
  1613. data/spec/unit/resource/scm_spec.rb +8 -8
  1614. data/spec/unit/resource/script_spec.rb +4 -4
  1615. data/spec/unit/resource/service_spec.rb +20 -21
  1616. data/spec/unit/resource/smartos_package_spec.rb +4 -4
  1617. data/spec/unit/resource/solaris_package_spec.rb +4 -4
  1618. data/spec/unit/resource/subversion_spec.rb +10 -6
  1619. data/spec/unit/resource/systemd_unit_spec.rb +133 -0
  1620. data/spec/unit/resource/template_spec.rb +7 -8
  1621. data/spec/unit/resource/timestamped_deploy_spec.rb +4 -4
  1622. data/spec/unit/resource/user_spec.rb +5 -5
  1623. data/spec/unit/resource/windows_package_spec.rb +6 -6
  1624. data/spec/unit/resource/windows_service_spec.rb +2 -2
  1625. data/spec/unit/resource/yum_package_spec.rb +15 -6
  1626. data/spec/unit/resource/yum_repository_spec.rb +49 -0
  1627. data/spec/unit/resource_collection/resource_list_spec.rb +7 -7
  1628. data/spec/unit/resource_collection/resource_set_spec.rb +9 -9
  1629. data/spec/unit/resource_collection/stepable_iterator_spec.rb +6 -6
  1630. data/spec/unit/resource_collection_spec.rb +113 -14
  1631. data/spec/unit/resource_definition_spec.rb +14 -14
  1632. data/spec/unit/resource_reporter_spec.rb +65 -66
  1633. data/spec/unit/resource_resolver_spec.rb +11 -12
  1634. data/spec/unit/resource_spec.rb +344 -289
  1635. data/spec/unit/rest/auth_credentials_spec.rb +101 -137
  1636. data/spec/unit/rest_spec.rb +97 -91
  1637. data/spec/unit/role_spec.rb +67 -71
  1638. data/spec/unit/run_context/child_run_context_spec.rb +133 -0
  1639. data/spec/unit/run_context/cookbook_compiler_spec.rb +48 -8
  1640. data/spec/unit/run_context_spec.rb +25 -18
  1641. data/spec/unit/run_list/run_list_expansion_spec.rb +37 -22
  1642. data/spec/unit/run_list/run_list_item_spec.rb +28 -28
  1643. data/spec/unit/run_list/versioned_recipe_list_spec.rb +31 -27
  1644. data/spec/unit/run_list_spec.rb +38 -42
  1645. data/spec/unit/run_lock_spec.rb +10 -10
  1646. data/spec/unit/run_status_spec.rb +4 -5
  1647. data/spec/unit/runner_spec.rb +9 -9
  1648. data/spec/unit/scan_access_control_spec.rb +4 -5
  1649. data/spec/unit/search/query_spec.rb +87 -64
  1650. data/spec/unit/server_api_spec.rb +50 -0
  1651. data/spec/unit/shell/model_wrapper_spec.rb +12 -13
  1652. data/spec/unit/shell/shell_ext_spec.rb +5 -5
  1653. data/spec/unit/shell/shell_session_spec.rb +9 -10
  1654. data/spec/unit/shell_out_spec.rb +1 -1
  1655. data/spec/unit/shell_spec.rb +9 -9
  1656. data/spec/unit/user_spec.rb +14 -15
  1657. data/spec/unit/user_v1_spec.rb +29 -30
  1658. data/spec/unit/util/backup_spec.rb +17 -18
  1659. data/spec/unit/util/diff_spec.rb +10 -13
  1660. data/spec/unit/util/dsc/configuration_generator_spec.rb +60 -60
  1661. data/spec/unit/util/dsc/lcm_output_parser_spec.rb +30 -30
  1662. data/spec/unit/util/dsc/local_configuration_manager_spec.rb +52 -44
  1663. data/spec/unit/util/dsc/resource_store.rb +30 -28
  1664. data/spec/unit/util/editor_spec.rb +71 -71
  1665. data/spec/unit/util/file_edit_spec.rb +7 -7
  1666. data/spec/unit/util/powershell/cmdlet_spec.rb +37 -37
  1667. data/spec/unit/util/powershell/ps_credential_spec.rb +17 -10
  1668. data/spec/unit/util/selinux_spec.rb +8 -9
  1669. data/spec/unit/util/threaded_job_queue_spec.rb +2 -2
  1670. data/spec/unit/version/platform_spec.rb +5 -6
  1671. data/spec/unit/version_class_spec.rb +8 -9
  1672. data/spec/unit/version_constraint/platform_spec.rb +3 -4
  1673. data/spec/unit/version_constraint_spec.rb +19 -19
  1674. data/spec/unit/win32/registry_spec.rb +394 -0
  1675. data/spec/unit/windows_service_spec.rb +85 -40
  1676. data/tasks/bin/bundle-platform +20 -0
  1677. data/tasks/bin/bundle-platform.bat +2 -0
  1678. data/tasks/bin/bundler_patch.rb +27 -0
  1679. data/tasks/bin/create-override-gemfile +110 -0
  1680. data/tasks/bin/gem-version-diff +37 -0
  1681. data/tasks/bin/run_external_test +47 -0
  1682. data/tasks/bundle.rb +97 -0
  1683. data/tasks/bundle_util.rb +110 -0
  1684. data/tasks/cbgb.rb +84 -0
  1685. data/tasks/changelog.rb +13 -0
  1686. data/tasks/dependencies.rb +135 -0
  1687. data/tasks/gemfile_util.rb +390 -0
  1688. data/tasks/maintainers.rb +162 -20
  1689. data/tasks/rspec.rb +20 -16
  1690. metadata +542 -129
  1691. data/lib/chef/chef_fs/file_system/acl_dir.rb +0 -64
  1692. data/lib/chef/chef_fs/file_system/acl_entry.rb +0 -58
  1693. data/lib/chef/chef_fs/file_system/acls_dir.rb +0 -68
  1694. data/lib/chef/chef_fs/file_system/chef_repository_file_system_acls_dir.rb +0 -37
  1695. data/lib/chef/chef_fs/file_system/chef_repository_file_system_cookbook_dir.rb +0 -109
  1696. data/lib/chef/chef_fs/file_system/chef_repository_file_system_cookbook_entry.rb +0 -87
  1697. data/lib/chef/chef_fs/file_system/chef_repository_file_system_cookbooks_dir.rb +0 -89
  1698. data/lib/chef/chef_fs/file_system/chef_repository_file_system_entry.rb +0 -92
  1699. data/lib/chef/chef_fs/file_system/chef_repository_file_system_root_dir.rb +0 -192
  1700. data/lib/chef/chef_fs/file_system/chef_server_root_dir.rb +0 -159
  1701. data/lib/chef/chef_fs/file_system/cookbook_dir.rb +0 -224
  1702. data/lib/chef/chef_fs/file_system/cookbook_file.rb +0 -82
  1703. data/lib/chef/chef_fs/file_system/cookbook_subdir.rb +0 -54
  1704. data/lib/chef/chef_fs/file_system/cookbooks_acl_dir.rb +0 -41
  1705. data/lib/chef/chef_fs/file_system/cookbooks_dir.rb +0 -164
  1706. data/lib/chef/chef_fs/file_system/data_bag_dir.rb +0 -69
  1707. data/lib/chef/chef_fs/file_system/data_bags_dir.rb +0 -73
  1708. data/lib/chef/chef_fs/file_system/environments_dir.rb +0 -60
  1709. data/lib/chef/chef_fs/file_system/file_system_entry.rb +0 -108
  1710. data/lib/chef/chef_fs/file_system/memory_dir.rb +0 -52
  1711. data/lib/chef/chef_fs/file_system/memory_file.rb +0 -17
  1712. data/lib/chef/chef_fs/file_system/memory_root.rb +0 -21
  1713. data/lib/chef/chef_fs/file_system/must_delete_recursively_error.rb +0 -31
  1714. data/lib/chef/chef_fs/file_system/nodes_dir.rb +0 -55
  1715. data/lib/chef/chef_fs/file_system/org_entry.rb +0 -34
  1716. data/lib/chef/chef_fs/file_system/organization_invites_entry.rb +0 -59
  1717. data/lib/chef/chef_fs/file_system/organization_members_entry.rb +0 -58
  1718. data/lib/chef/chef_fs/file_system/rest_list_dir.rb +0 -115
  1719. data/lib/chef/chef_fs/file_system/rest_list_entry.rb +0 -185
  1720. data/lib/chef/knife/bootstrap/templates/archlinux-gems.erb +0 -76
  1721. data/lib/chef/knife/bootstrap/templates/chef-aix.erb +0 -72
  1722. data/spec/support/pedant/Gemfile +0 -3
  1723. data/spec/support/pedant/pedant_config.rb +0 -129
  1724. data/spec/support/pedant/run_pedant.rb +0 -63
  1725. data/spec/support/pedant/stickywicket.pem +0 -27
  1726. data/spec/unit/provider/powershell_spec.rb +0 -80
  1727. data/spec/unit/provider/user/useradd_spec.rb +0 -51
  1728. data/spec/unit/registry_helper_spec.rb +0 -376
  1729. data/spec/unit/workstation_config_loader_spec.rb +0 -283
  1730. data/tasks/external_tests.rb +0 -29
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1fb36207d513df46412aaabb2664021593d3237d
4
- data.tar.gz: c5a2775437c4a52ec7d4807bff6f0fc082550fe6
3
+ metadata.gz: 340c1cbda2004926c5f046f561e56586829a141c
4
+ data.tar.gz: efed35187da59fd2a49ea092312be922d11f90db
5
5
  SHA512:
6
- metadata.gz: 6a1ce60ed9ab3d13f87e56b427be169e026d22b90abba9a5d5db461af333f839e03d5135273a4c8dd0be2848dd1b737f69834a453cf7c1474f9ec98e50d669d6
7
- data.tar.gz: 29f2c9e3ef7671bed65750c32fa700fa422c92928a12ebebb37233839a453f7a24156c7c9ea40520be9b9c4fc7d0bbbc5bc1f49506c1f470f920848117f484d5
6
+ metadata.gz: 0f0e9083844b5a3553acf79a476daab28277cbd3ef1f4d7da0354d88bf28afbe98e967e3470e5967ccaf5139864d11a9fffd58f3a3d733c07b81e8dbc6c7d11d
7
+ data.tar.gz: c97b133f8aa935250e57a66ef73af2288563547dcfec3cc9031531c0f2205ee52fbc8d8091e3b2d57dc9825f852cb7f7ff4e8332b1c733aae8b4ae3d0ecc7a68
data/CONTRIBUTING.md CHANGED
@@ -1,212 +1,151 @@
1
- # Contributing to Chef
1
+ # Contributing to Chef Projects
2
2
 
3
- We are glad you want to contribute to Chef!
3
+ We're glad you want to contribute to a Chef project! This document will help answer common questions you may have during your first contribution.
4
4
 
5
- We utilize **Github Issues** for issue tracking and contributions. You can contribute in two ways:
5
+ ## Submitting Issues
6
6
 
7
- 1. Reporting an issue or making a feature request [here](#issues).
8
- 2. Adding features or fixing bugs yourself and contributing your code to Chef.
7
+ Not every contribution comes in the form of code. Submitting, confirming, and triaging issues is an important task for any project. At Chef we use Github to track all project issues.
9
8
 
10
- ## Contribution Process
11
-
12
- We have a 3 step process that utilizes **Github Issues**:
13
-
14
- 1. Sign or be added to an existing [Contributor License Agreement (CLA)](https://supermarket.getchef.com/become-a-contributor).
15
- 2. Create a Github Pull Request.
16
- 3. Do [Code Review](#cr) with the **Chef Engineering Team** or **Chef Core Committers** on the pull request.
17
-
18
- ### <a name="pulls"></a> Chef Pull Requests
19
-
20
- Chef is built to last. We strive to ensure high quality throughout the Chef experience. In order to ensure
21
- this, we require a couple of things for all pull requests to Chef:
22
-
23
- 1. **Tests:** To ensure high quality code and protect against future regressions, we require all the
24
- code in Chef to have at least unit test coverage. See the [spec/unit](https://github.com/opscode/chef/tree/master/spec/unit)
25
- directory for the existing tests and use ```bundle exec rake spec``` to run them.
26
- 2. **Green Travis Run:** We use [Travis CI](https://travis-ci.org/) in order to run our tests
27
- continuously on all the pull requests. We require the Travis runs to succeed on every pull
28
- request before being merged.
29
-
30
- In addition to this it would be nice to include the description of the problem you are solving
31
- with your change. You can use [Chef Issue Template](#issuetemplate) in the description section
32
- of the pull request.
33
-
34
- ### <a name="cr"></a> Chef Code Review Process
9
+ If you are familiar with Chef and know the component, that is causing you a problem, you can file an issue in the corresponding Github project. All of our Open Source Software can be found in our [Github organization](https://github.com/chef/). All projects include Github issue templates to help gather information needed for a thorough review.
35
10
 
36
- The Chef Code Review process happens on Github pull requests. See
37
- [this article](https://help.github.com/articles/using-pull-requests) if you're not
38
- familiar with Github Pull Requests.
11
+ We ask you not to submit security concerns via Github. For details on submitting potential security issues please see <https://www.chef.io/security/>
39
12
 
40
- Once you a pull request, the **Chef Engineering Team** or **Chef Core Committers** will review your code
41
- and respond to you with any feedback they might have. The process at this point is as follows:
13
+ In addition to Github issues, we also utilize a feedback site that helps our product team track and rank feature requests. If you have a feature request, this is an excellent place to start <https://feedback.chef.io>
42
14
 
43
- 1. 2 thumbs-ups are required from the **Chef Engineering Team** or **Chef Core Committers** for all merges.
44
- 2. When ready, your pull request will be tagged with label `Ready For Merge`.
45
- 3. Your patch will be merged into `master` including necessary documentation updates
46
- and you will be included in `CHANGELOG.md`. Our goal is to have patches merged in 2 weeks
47
- after they are marked to be merged.
15
+ ## Contribution Process
48
16
 
49
- If you would like to learn about when your code will be available in a release of Chef, read more about
50
- [Chef Release Process](#release).
17
+ We have a 3 step process for contributions:
51
18
 
52
- ### <a name="oh"></a> Developer Office Hours
19
+ 1. Commit changes to a git branch, making sure to sign-off those changes for the [Developer Certificate of Origin](#developer-certification-of-origin-dco).
20
+ 2. Create a Github Pull Request for your change, following the instructions in the pull request template.
21
+ 3. Perform a [Code Review](#code-review-process) with the project maintainers on the pull request.
53
22
 
54
- We hold regular "office hours" on Google Hangouts On-The-Air that you can join to review contributions together,
55
- ask questions about contributing, or just hang out with Chef Software employees. The regularly scheduled Chef hangouts occur on Mondays and Wednesdays at 3pm Eastern / Noon Pacific.
23
+ ### Pull Request Requirements
56
24
 
57
- The link to join the Hangout or watch it live is usually tweeted from [@ChefOfficeHours](https://twitter.com/ChefOfficeHours)
58
- and posted in the #chef IRC channel on irc.freenode.net when the hangout is about to start.
25
+ Chef Projects are built to last. We strive to ensure high quality throughout the experience. In order to ensure this, we require that all pull requests to Chef projects meet these specifications:
59
26
 
60
- You can watch the recordings of the old Code Review hangouts on the [opscodebtm](http://www.youtube.com/opscodebtm) youtube account.
27
+ 1. **Tests:** To ensure high quality code and protect against future regressions, we require all the code in Chef Projects to have at least unit test coverage. We use [RSpec](http://rspec.info/) for unit testing.
28
+ 2. **Green CI Tests:** We use [Travis CI](https://travis-ci.org/) and/or [AppVeyor](https://www.appveyor.com/) CI systems to test all pull requests. We require these test runs to succeed on every pull request before being merged.
61
29
 
62
- ### Contributor License Agreement (CLA)
63
- Licensing is very important to open source projects. It helps ensure the
64
- software continues to be available under the terms that the author desired.
30
+ ### Code Review Process
65
31
 
66
- Chef uses [the Apache 2.0 license](https://github.com/opscode/chef/blob/master/LICENSE)
67
- to strike a balance between open contribution and allowing you to use the
68
- software however you would like to.
32
+ Code review takes place in Github pull requests. See [this article](https://help.github.com/articles/about-pull-requests/) if you're not familiar with Github Pull Requests.
69
33
 
70
- The license tells you what rights you have that are provided by the copyright holder.
71
- It is important that the contributor fully understands what rights they are
72
- licensing and agrees to them. Sometimes the copyright holder isn't the contributor,
73
- most often when the contributor is doing work for a company.
34
+ Once you open a pull request, project maintainers will review your code and respond to your pull request with any feedback they might have. The process at this point is as follows:
74
35
 
75
- To make a good faith effort to ensure these criteria are met, Chef requires an Individual CLA
76
- or a Corporate CLA for contributions. This agreement helps ensure you are aware of the
77
- terms of the license you are contributing your copyrighted works under, which helps to
78
- prevent the inclusion of works in the projects that the contributor does not hold the rights
79
- to share.
36
+ 1. Two thumbs-up (:+1:) are required from project maintainers. See the master maintainers document for Chef projects at <https://github.com/chef/chef/blob/master/MAINTAINERS.md>.
37
+ 2. When ready, your pull request will be tagged with label `Ready For Merge`.
38
+ 3. Your change will be merged into the project's `master` branch and will be noted in the project's `CHANGELOG.md` at the time of release.
80
39
 
81
- It only takes a few minutes to complete a CLA, and you retain the copyright to your contribution.
40
+ If you would like to learn about when your code will be available in a release of Chef, read more about [Chef Release Cycles](#release-cycles).
82
41
 
83
- You can complete our
84
- [Individual CLA](https://supermarket.getchef.com/icla-signatures/new) online.
85
- If you're contributing on behalf of your employer and they retain the copyright for your works,
86
- have your employer fill out our
87
- [Corporate CLA](https://supermarket.getchef.com/ccla-signatures/new) instead.
42
+ ### Developer Certification of Origin (DCO)
88
43
 
89
- ### Chef Obvious Fix Policy
44
+ Licensing is very important to open source projects. It helps ensure the software continues to be available under the terms that the author desired.
90
45
 
91
- Small contributions such as fixing spelling errors, where the content is small enough
92
- to not be considered intellectual property, can be submitted by a contributor as a patch,
93
- without a CLA.
46
+ Chef uses [the Apache 2.0 license](https://github.com/chef/chef/blob/master/LICENSE) to strike a balance between open contribution and allowing you to use the software however you would like to.
94
47
 
95
- As a rule of thumb, changes are obvious fixes if they do not introduce any new functionality
96
- or creative thinking. As long as the change does not affect functionality, some likely
97
- examples include the following:
48
+ The license tells you what rights you have that are provided by the copyright holder. It is important that the contributor fully understands what rights they are licensing and agrees to them. Sometimes the copyright holder isn't the contributor, such as when the contributor is doing work on behalf of a company.
98
49
 
99
- * Spelling / grammar fixes
100
- * Typo correction, white space and formatting changes
101
- * Comment clean up
102
- * Bug fixes that change default return values or error codes stored in constants
103
- * Adding logging messages or debugging output
104
- * Changes to ‘metadata’ files like Gemfile, .gitignore, build scripts, etc.
105
- * Moving source files from one directory or package to another
50
+ To make a good faith effort to ensure these criteria are met, Chef requires the Developer Certificate of Origin (DCO) process to be followed.
106
51
 
107
- **Whenever you invoke the “obvious fix” rule, please say so in your commit message:**
52
+ The DCO is an attestation attached to every contribution made by every developer. In the commit message of the contribution, the developer simply adds a Signed-off-by statement and thereby agrees to the DCO, which you can find below or at <http://developercertificate.org/>.
108
53
 
109
54
  ```
110
- ------------------------------------------------------------------------
111
- commit 370adb3f82d55d912b0cf9c1d1e99b132a8ed3b5
112
- Author: danielsdeleo <dan@opscode.com>
113
- Date: Wed Sep 18 11:44:40 2013 -0700
114
-
115
- Fix typo in config file docs.
116
-
117
- Obvious fix.
118
-
119
- ------------------------------------------------------------------------
55
+ Developer's Certificate of Origin 1.1
56
+
57
+ By making a contribution to this project, I certify that:
58
+
59
+ (a) The contribution was created in whole or in part by me and I
60
+ have the right to submit it under the open source license
61
+ indicated in the file; or
62
+
63
+ (b) The contribution is based upon previous work that, to the
64
+ best of my knowledge, is covered under an appropriate open
65
+ source license and I have the right under that license to
66
+ submit that work with modifications, whether created in whole
67
+ or in part by me, under the same open source license (unless
68
+ I am permitted to submit under a different license), as
69
+ Indicated in the file; or
70
+
71
+ (c) The contribution was provided directly to me by some other
72
+ person who certified (a), (b) or (c) and I have not modified
73
+ it.
74
+
75
+ (d) I understand and agree that this project and the contribution
76
+ are public and that a record of the contribution (including
77
+ all personal information I submit with it, including my
78
+ sign-off) is maintained indefinitely and may be redistributed
79
+ consistent with this project or the open source license(s)
80
+ involved.
120
81
  ```
121
82
 
122
- ## <a name="issues"></a> Chef Issue Tracking
123
-
124
- Chef Issue Tracking is handled using Github Issues.
83
+ For more information on the change see the Chef Blog post [Introducing Developer Certificate of Origin](https://blog.chef.io/2016/09/19/introducing-developer-certificate-of-origin/)
125
84
 
126
- If you are familiar with Chef and know the component that is causing you a problem or if you
127
- have a feature request on a specific component you can file an issue in the corresponding
128
- Github project. All of our Open Source Software can be found in our
129
- [Github organization](https://github.com/opscode/).
85
+ #### DCO Sign-Off Methods
130
86
 
131
- There is also a listing of the various Chef products and where to file issues that can be
132
- found in the Chef docs in the [community contributions section](https://docs.chef.io/community_contributions.html#issues-and-bug-reports).
87
+ The DCO requires a sign-off message in the following format appear on each commit in the pull request:
133
88
 
134
- Otherwise you can file your issue in the [Chef project](https://github.com/opscode/chef/issues)
135
- and we will make sure it gets filed against the appropriate project.
136
-
137
- In order to decrease the back and forth an issues and help us get to the bottom of them quickly
138
- we use below issue template. You can copy paste this code into the issue you are opening and
139
- edit it accordingly.
140
-
141
- <a name="issuetemplate"></a>
142
89
  ```
143
- ### Version:
144
- [Version of the project installed]
145
-
146
- ### Environment: [Details about the environment such as the Operating System, cookbook details, etc...]
147
-
148
- ### Scenario:
149
- [What you are trying to achieve and you can't?]
90
+ Signed-off-by: Julia Child <juliachild@chef.io>
91
+ ```
150
92
 
93
+ The DCO text can either be manually added to your commit body, or you can add either **-s** or **--signoff** to your usual git commit commands. If you forget to add the sign-off you can also amend a previous commit with the sign-off by running **git commit –-amend -s**. If you've pushed your changes to Github already you'll need to force push your branch after this with **git push -f**.
151
94
 
95
+ ### Chef Obvious Fix Policy
152
96
 
153
- ### Steps to Reproduce:
154
- [If you are filing an issue what are the things we need to do in order to repro your problem?]
97
+ Small contributions, such as fixing spelling errors, where the content is small enough to not be considered intellectual property, can be submitted without signing the contribution for the DCO.
155
98
 
99
+ As a rule of thumb, changes are obvious fixes if they do not introduce any new functionality or creative thinking. Assuming the change does not affect functionality, some common obvious fix examples include the following:
156
100
 
157
- ### Expected Result:
158
- [What are you expecting to happen as the consequence of above reproduction steps?]
101
+ - Spelling / grammar fixes
102
+ - Typo correction, white space and formatting changes
103
+ - Comment clean up
104
+ - Bug fixes that change default return values or error codes stored in constants
105
+ - Adding logging messages or debugging output
106
+ - Changes to 'metadata' files like Gemfile, .gitignore, build scripts, etc.
107
+ - Moving source files from one directory or package to another
159
108
 
109
+ **Whenever you invoke the "obvious fix" rule, please say so in your commit message:**
160
110
 
161
- ### Actual Result:
162
- [What actually happens after the reproduction steps?]
163
111
  ```
112
+ ------------------------------------------------------------------------
113
+ commit 370adb3f82d55d912b0cf9c1d1e99b132a8ed3b5
114
+ Author: Julia Child <juliachild@chef.io>
115
+ Date: Wed Sep 18 11:44:40 2015 -0700
164
116
 
165
- ### Useful Github Queries
166
-
167
- Contributions go through a review process to improve code quality and avoid regressions. Managing a large number of contributions requires a workflow to provide queues for work such as triage, code review, and merging. A semi-formal process has evolved over the life of the project. Chef maintains this process pending community development and acceptance of an [RFC](https://github.com/opscode/chef-rfc). These queries will help track contributions through this process:
117
+ Fix typo in the README.
168
118
 
169
- * [Issues that are not assigned to a team](https://github.com/opscode/chef/issues?q=is%3Aopen+-label%3AAIX+-label%3ABSD+-label%3Awindows+-label%3A%22Chef+Core%22++-label%3A%22Dev+Tools%22+-label%3AUbuntu+-label%3A%22Enterprise+Linux%22+-label%3A%22Ready+For+Merge%22+-label%3AMac+-label%3ASolaris+)
170
- * [Untriaged Issues](https://github.com/opscode/chef/issues?q=is%3Aopen+is%3Aissue+-label%3ABug+-label%3AEnhancement+-label%3A%22Tech+Cleanup%22+-label%3A%22Ready+For+Merge%22)
171
- * [PRs to be Reviewed](https://github.com/opscode/chef/labels/Pending%20Maintainer%20Review)
172
- * [Suitable for First Contribution](https://github.com/opscode/chef/labels/Easy)
119
+ Obvious fix.
173
120
 
174
- ## <a name="release"></a> Chef Release Cycles
121
+ ------------------------------------------------------------------------
122
+ ```
175
123
 
176
- Our primary shipping vehicle is operating system specific packages that includes
177
- all the requirements of Chef. We call these [Omnibus packages](https://github.com/opscode/omnibus-ruby)
124
+ ## Release Cycles
178
125
 
179
- We also release our software as gems to [Rubygems](https://rubygems.org/) but we strongly
180
- recommend using Chef packages since they are the only combination of native libraries &
181
- gems required by Chef that we test throughly.
126
+ Our primary shipping vehicle is operating system specific packages that includes all the requirements of Chef. We call these [Omnibus packages](https://github.com/chef/omnibus)
182
127
 
183
- Our version numbering closely follows [Semantic Versioning](http://semver.org/) standard. Our
184
- standard version numbers look like X.Y.Z which mean:
128
+ We also release our software as gems to [Rubygems](https://rubygems.org/) but we strongly recommend using Chef packages since they are the only combination of native libraries & gems required by Chef that we test throughly.
185
129
 
186
- * X is a major release, which may not be fully compatible with prior major releases
187
- * Y is a minor release, which adds both new features and bug fixes
188
- * Z is a patch release, which adds just bug fixes
130
+ Our version numbering roughly follows [Semantic Versioning](http://semver.org/) standard. Our standard version numbers look like X.Y.Z which mean:
189
131
 
190
- We frequently make `alpha` and `beta` releases with version numbers that look like
191
- `X.Y.Z.alpha.0` or `X.Y.Z.beta.1`. These releases are still well tested but not as
192
- throughly as **Minor** or **Patch** releases.
132
+ - X is a major release, which may not be fully compatible with prior major releases
133
+ - Y is a minor release, which adds both new features and bug fixes
134
+ - Z is a patch release, which adds just bug fixes
193
135
 
194
- We do a `Minor` release approximately every 3 months and `Patch` releases on a when-needed
195
- basis for regressions, significant bugs, and security issues.
136
+ After shipping a release of Chef we bump the `Minor` version by one to start development of the next minor release. All merges to master trigger an increment of the `Patch` version, and a build through our internal testing pipeline. We do a `Minor` release approximately every month, which consist of shipping one of the already auto-incremented and tested `Patch` versions. For example after shiping 12.10.24, we incremented Chef to 12.11.0\. From there 18 commits where merged bringing the version to 12.11.18, which we shipped as an omnibus package.
196
137
 
197
- Announcements of releases are available on [Chef Blog](http://www.getchef.com/blog) when they are
198
- available.
138
+ Announcements of releases are made to the [chef mailing list](https://discourse.chef.io/c/chef-release) when they are available.
199
139
 
200
140
  ## Chef Community
201
141
 
202
- Chef is made possible by a strong community of developers and system administrators. If you have
203
- any questions or if you would like to get involved in the Chef community you can check out:
142
+ Chef is made possible by a strong community of developers and system administrators. If you have any questions or if you would like to get involved in the Chef community you can check out:
204
143
 
205
- * [chef](http://lists.opscode.com/sympa/info/chef) and [chef-dev](http://lists.opscode.com/sympa/info/chef-dev) mailing lists
206
- * [\#chef](https://botbot.me/freenode/chef) and [\#chef-hacking](https://botbot.me/freenode/chef-hacking) IRC channels on irc.freenode.net
144
+ - [Chef Mailing List](https://discourse.chef.io/)
145
+ - [Chef Community Slack](https://community-slack.chef.io/)
207
146
 
208
147
  Also here are some additional pointers to some awesome Chef content:
209
148
 
210
- * [Chef Docs](http://docs.opscode.com/)
211
- * [Learn Chef](https://learnchef.opscode.com/)
212
- * [Chef Inc](http://www.getchef.com/)
149
+ - [Chef Docs](https://docs.chef.io/)
150
+ - [Learn Chef](https://learn.chef.io/)
151
+ - [Chef Website](https://www.chef.io/)
data/Gemfile ADDED
@@ -0,0 +1,94 @@
1
+ # This buys us the ability to be included in other Gemfiles
2
+ require_relative "tasks/gemfile_util"
3
+ extend GemfileUtil
4
+
5
+ source "https://rubygems.org"
6
+
7
+ # Note we do not use the gemspec DSL which restricts to the
8
+ # gemspec for the current platform and filters out other platforms
9
+ # during a bundle lock operation. We actually want dependencies from
10
+ # both of our gemspecs. Also note this this mimics gemspec behavior
11
+ # of bundler versions prior to 1.12.0 (https://github.com/bundler/bundler/commit/193a14fe5e0d56294c7b370a0e59f93b2c216eed)
12
+ gem "chef", path: "."
13
+
14
+ gem "chef-config", path: File.expand_path("../chef-config", __FILE__) if File.exist?(File.expand_path("../chef-config", __FILE__))
15
+ # Ensure that we can always install rake, regardless of gem groups
16
+ gem "rake", group: [ :default, :omnibus_package, :development ]
17
+ gem "bundler"
18
+ gem "cheffish"
19
+
20
+ group(:omnibus_package) do
21
+ gem "appbundler"
22
+ gem "rb-readline"
23
+ gem "nokogiri"
24
+ end
25
+
26
+ group(:omnibus_package, :pry) do
27
+ gem "pry"
28
+ gem "pry-byebug"
29
+ gem "pry-remote"
30
+ gem "pry-stack_explorer"
31
+ end
32
+ # These are used for external tests
33
+ group(:integration) do
34
+ gem "chef-provisioning"
35
+ gem "chef-provisioning-aws"
36
+ gem "chef-sugar"
37
+ gem "chefspec"
38
+ gem "halite"
39
+ gem "poise"
40
+ gem "poise-boiler"
41
+ gem "knife-windows"
42
+ gem "foodcritic"
43
+
44
+ # We pin this so nobody brings in a cucumber-core incompatible with cucumber latest
45
+ gem "cucumber", ">= 2.4.0"
46
+ # We pin oc-chef-pedant to prevent it from updating out of lockstep with chef-zero
47
+ gem "oc-chef-pedant", git: "https://github.com/chef/chef-server"
48
+ end
49
+
50
+ group(:docgen) do
51
+ gem "yard"
52
+ end
53
+
54
+ group(:maintenance) do
55
+ gem "tomlrb"
56
+
57
+ # To sync maintainers with github
58
+ gem "octokit"
59
+ gem "netrc"
60
+ end
61
+
62
+ # Everything except AIX
63
+ group(:linux, :bsd, :mac_os_x, :solaris, :windows) do
64
+ # may need to disable this in insolation on fussy builds like AIX, RHEL4, etc
65
+ gem "ruby-prof"
66
+ end
67
+ # Everything except AIX and Windows
68
+ group(:linux, :bsd, :mac_os_x, :solaris) do
69
+ gem "ruby-shadow", platforms: :ruby
70
+ end
71
+
72
+ group(:development, :test) do
73
+ gem "simplecov"
74
+
75
+ # for testing new chefstyle rules
76
+ # gem 'chefstyle', github: 'chef/chefstyle'
77
+ gem "chefstyle", git: "https://github.com/chef/chefstyle.git", branch: "master"
78
+ end
79
+
80
+ group(:changelog) do
81
+ gem "github_changelog_generator"
82
+ end
83
+
84
+ group(:travis) do
85
+ # See `bundler-audit` in .travis.yml
86
+ gem "bundler-audit", git: "https://github.com/rubysec/bundler-audit.git"
87
+ gem "travis"
88
+ end
89
+
90
+ instance_eval(ENV["GEMFILE_MOD"]) if ENV["GEMFILE_MOD"]
91
+
92
+ # If you want to load debugging tools into the bundle exec sandbox,
93
+ # add these additional dependencies into chef/Gemfile.local
94
+ eval(IO.read(__FILE__ + ".local"), binding) if File.exist?(__FILE__ + ".local")