chef 12.6.0-universal-mingw32 → 12.7.2-universal-mingw32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1452) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +26 -19
  3. data/README.md +26 -23
  4. data/Rakefile +28 -17
  5. data/VERSION +1 -0
  6. data/acceptance/.gitignore +1 -0
  7. data/acceptance/.shared/kitchen_acceptance/.kitchen.digitalocean.yml +27 -0
  8. data/acceptance/.shared/kitchen_acceptance/.kitchen.ec2.yml +281 -0
  9. data/acceptance/.shared/kitchen_acceptance/.kitchen.vagrant.yml +49 -0
  10. data/acceptance/.shared/kitchen_acceptance/libraries/kitchen.rb +46 -0
  11. data/acceptance/.shared/kitchen_acceptance/metadata.rb +1 -0
  12. data/acceptance/Gemfile +11 -0
  13. data/acceptance/README.md +86 -0
  14. data/acceptance/basics/.acceptance/acceptance-cookbook/.gitignore +2 -0
  15. data/acceptance/basics/.acceptance/acceptance-cookbook/metadata.rb +3 -0
  16. data/acceptance/basics/.acceptance/acceptance-cookbook/recipes/destroy.rb +1 -0
  17. data/acceptance/basics/.acceptance/acceptance-cookbook/recipes/provision.rb +1 -0
  18. data/acceptance/basics/.acceptance/acceptance-cookbook/recipes/verify.rb +1 -0
  19. data/acceptance/basics/.kitchen.yml +4 -0
  20. data/acceptance/basics/test/integration/chef-current-install/serverspec/chef_client_spec.rb +19 -0
  21. data/acceptance/basics/test/integration/chef-current-install/serverspec/spec_helper.rb +6 -0
  22. data/acceptance/top-cookbooks/.acceptance/acceptance-cookbook/.gitignore +2 -0
  23. data/acceptance/top-cookbooks/.acceptance/acceptance-cookbook/libraries/cookbook_kitchen.rb +43 -0
  24. data/acceptance/top-cookbooks/.acceptance/acceptance-cookbook/libraries/top_cookbooks.rb +21 -0
  25. data/acceptance/top-cookbooks/.acceptance/acceptance-cookbook/metadata.rb +3 -0
  26. data/acceptance/top-cookbooks/.acceptance/acceptance-cookbook/recipes/destroy.rb +1 -0
  27. data/acceptance/top-cookbooks/.acceptance/acceptance-cookbook/recipes/provision.rb +1 -0
  28. data/acceptance/top-cookbooks/.acceptance/acceptance-cookbook/recipes/verify.rb +1 -0
  29. data/acceptance/top-cookbooks/.gitignore +1 -0
  30. data/acceptance/top-cookbooks/.kitchen.git.yml +10 -0
  31. data/acceptance/top-cookbooks/.kitchen.learn-the-basics-rhel.yml +4 -0
  32. data/acceptance/top-cookbooks/.kitchen.learn-the-basics-ubuntu.yml +4 -0
  33. data/acceptance/top-cookbooks/.kitchen.learn-the-basics-windows.yml +4 -0
  34. data/acceptance/trivial/.acceptance/acceptance-cookbook/.gitignore +2 -0
  35. data/acceptance/trivial/.acceptance/acceptance-cookbook/metadata.rb +2 -0
  36. data/acceptance/trivial/.acceptance/acceptance-cookbook/recipes/destroy.rb +1 -0
  37. data/acceptance/trivial/.acceptance/acceptance-cookbook/recipes/provision.rb +1 -0
  38. data/acceptance/trivial/.acceptance/acceptance-cookbook/recipes/verify.rb +1 -0
  39. data/acceptance/trivial/.kitchen.yml +7 -0
  40. data/acceptance/trivial/test/integration/chef-current-install/inspec/chef_client_spec.rb +5 -0
  41. data/acceptance/windows-service/.acceptance/acceptance-cookbook/.gitignore +2 -0
  42. data/acceptance/windows-service/.acceptance/acceptance-cookbook/metadata.rb +2 -0
  43. data/acceptance/windows-service/.acceptance/acceptance-cookbook/recipes/destroy.rb +1 -0
  44. data/acceptance/windows-service/.acceptance/acceptance-cookbook/recipes/provision.rb +1 -0
  45. data/acceptance/windows-service/.acceptance/acceptance-cookbook/recipes/verify.rb +1 -0
  46. data/acceptance/windows-service/.kitchen.yml +7 -0
  47. data/acceptance/windows-service/test/integration/chef-windows-service/inspec/chef_windows_service_spec.rb +58 -0
  48. data/bin/chef-apply +3 -3
  49. data/bin/chef-client +5 -5
  50. data/bin/chef-service-manager +7 -7
  51. data/bin/chef-shell +1 -1
  52. data/bin/chef-solo +4 -4
  53. data/bin/chef-windows-service +5 -5
  54. data/bin/knife +4 -5
  55. data/chef-windows.gemspec +5 -2
  56. data/chef.gemspec +13 -13
  57. data/distro/common/html/_static/basic.css +1 -1
  58. data/distro/common/html/_static/doctools.js +1 -1
  59. data/distro/common/html/_static/searchtools.js +1 -1
  60. data/distro/common/html/_static/websupport.js +1 -1
  61. data/ext/win32-eventlog/Rakefile +13 -14
  62. data/lib-backcompat/chef/chef_fs/file_system/acl_entry.rb +5 -0
  63. data/lib-backcompat/chef/chef_fs/file_system/chef_repository_file_system_root_dir.rb +5 -0
  64. data/lib-backcompat/chef/chef_fs/file_system/chef_server_root_dir.rb +5 -0
  65. data/lib/chef.rb +17 -17
  66. data/lib/chef/api_client.rb +31 -30
  67. data/lib/chef/api_client/registration.rb +34 -10
  68. data/lib/chef/api_client_v1.rb +36 -36
  69. data/lib/chef/application.rb +32 -23
  70. data/lib/chef/application/apply.rb +20 -20
  71. data/lib/chef/application/client.rb +63 -43
  72. data/lib/chef/application/knife.rb +21 -15
  73. data/lib/chef/application/solo.rb +52 -41
  74. data/lib/chef/application/windows_service.rb +25 -25
  75. data/lib/chef/application/windows_service_manager.rb +22 -22
  76. data/lib/chef/applications.rb +4 -4
  77. data/lib/chef/audit/audit_event_proxy.rb +3 -3
  78. data/lib/chef/audit/audit_reporter.rb +8 -10
  79. data/lib/chef/audit/control_group_data.rb +9 -10
  80. data/lib/chef/audit/logger.rb +3 -3
  81. data/lib/chef/audit/rspec_formatter.rb +2 -2
  82. data/lib/chef/audit/runner.rb +15 -14
  83. data/lib/chef/chef_class.rb +10 -7
  84. data/lib/chef/chef_fs.rb +51 -1
  85. data/lib/chef/chef_fs/chef_fs_data_store.rb +320 -125
  86. data/lib/chef/chef_fs/command_line.rb +8 -8
  87. data/lib/chef/chef_fs/config.rb +52 -23
  88. data/lib/chef/chef_fs/data_handler/acl_data_handler.rb +10 -10
  89. data/lib/chef/chef_fs/data_handler/client_data_handler.rb +12 -12
  90. data/lib/chef/chef_fs/data_handler/container_data_handler.rb +6 -6
  91. data/lib/chef/chef_fs/data_handler/cookbook_data_handler.rb +15 -15
  92. data/lib/chef/chef_fs/data_handler/data_bag_item_data_handler.rb +11 -11
  93. data/lib/chef/chef_fs/data_handler/data_handler_base.rb +8 -8
  94. data/lib/chef/chef_fs/data_handler/environment_data_handler.rb +14 -14
  95. data/lib/chef/chef_fs/data_handler/group_data_handler.rb +18 -18
  96. data/lib/chef/chef_fs/data_handler/node_data_handler.rb +14 -14
  97. data/lib/chef/chef_fs/data_handler/organization_data_handler.rb +9 -9
  98. data/lib/chef/chef_fs/data_handler/organization_invites_data_handler.rb +2 -2
  99. data/lib/chef/chef_fs/data_handler/organization_members_data_handler.rb +2 -2
  100. data/lib/chef/chef_fs/data_handler/policy_data_handler.rb +30 -3
  101. data/lib/chef/chef_fs/data_handler/policy_group_data_handler.rb +27 -0
  102. data/lib/chef/chef_fs/data_handler/role_data_handler.rb +16 -16
  103. data/lib/chef/chef_fs/data_handler/user_data_handler.rb +12 -12
  104. data/lib/chef/chef_fs/file_pattern.rb +25 -25
  105. data/lib/chef/chef_fs/file_system.rb +10 -10
  106. data/lib/chef/chef_fs/file_system/already_exists_error.rb +3 -6
  107. data/lib/chef/chef_fs/file_system/base_fs_dir.rb +4 -4
  108. data/lib/chef/chef_fs/file_system/base_fs_object.rb +8 -8
  109. data/lib/chef/chef_fs/file_system/chef_server/acl_dir.rb +65 -0
  110. data/lib/chef/chef_fs/file_system/chef_server/acl_entry.rb +60 -0
  111. data/lib/chef/chef_fs/file_system/chef_server/acls_dir.rb +75 -0
  112. data/lib/chef/chef_fs/file_system/chef_server/chef_server_root_dir.rb +196 -0
  113. data/lib/chef/chef_fs/file_system/{chef_repository_file_system_acls_dir.rb → chef_server/cookbook_artifact_dir.rb} +13 -12
  114. data/lib/chef/chef_fs/file_system/chef_server/cookbook_artifacts_dir.rb +102 -0
  115. data/lib/chef/chef_fs/file_system/chef_server/cookbook_dir.rb +222 -0
  116. data/lib/chef/chef_fs/file_system/chef_server/cookbook_file.rb +84 -0
  117. data/lib/chef/chef_fs/file_system/chef_server/cookbook_subdir.rb +61 -0
  118. data/lib/chef/chef_fs/file_system/chef_server/cookbooks_acl_dir.rb +42 -0
  119. data/lib/chef/chef_fs/file_system/chef_server/cookbooks_dir.rb +102 -0
  120. data/lib/chef/chef_fs/file_system/chef_server/data_bag_dir.rb +71 -0
  121. data/lib/chef/chef_fs/file_system/chef_server/data_bags_dir.rb +69 -0
  122. data/lib/chef/chef_fs/file_system/chef_server/environments_dir.rb +57 -0
  123. data/lib/chef/chef_fs/file_system/chef_server/nodes_dir.rb +53 -0
  124. data/lib/chef/chef_fs/file_system/chef_server/org_entry.rb +31 -0
  125. data/lib/chef/chef_fs/file_system/chef_server/organization_invites_entry.rb +61 -0
  126. data/lib/chef/chef_fs/file_system/chef_server/organization_members_entry.rb +60 -0
  127. data/lib/chef/chef_fs/file_system/chef_server/policies_acl_dir.rb +41 -0
  128. data/lib/chef/chef_fs/file_system/chef_server/policies_dir.rb +160 -0
  129. data/lib/chef/chef_fs/file_system/chef_server/policy_group_entry.rb +137 -0
  130. data/lib/chef/chef_fs/file_system/chef_server/policy_groups_dir.rb +43 -0
  131. data/lib/chef/chef_fs/file_system/chef_server/policy_revision_entry.rb +34 -0
  132. data/lib/chef/chef_fs/file_system/chef_server/rest_list_dir.rb +178 -0
  133. data/lib/chef/chef_fs/file_system/chef_server/rest_list_entry.rb +187 -0
  134. data/lib/chef/chef_fs/file_system/chef_server/versioned_cookbook_dir.rb +45 -0
  135. data/lib/chef/chef_fs/file_system/chef_server/versioned_cookbooks_dir.rb +107 -0
  136. data/lib/chef/chef_fs/file_system/cookbook_frozen_error.rb +3 -6
  137. data/lib/chef/chef_fs/file_system/default_environment_cannot_be_modified_error.rb +3 -7
  138. data/lib/chef/chef_fs/file_system/file_system_error.rb +14 -3
  139. data/lib/chef/chef_fs/file_system/memory/memory_dir.rb +53 -0
  140. data/lib/chef/chef_fs/file_system/memory/memory_file.rb +20 -0
  141. data/lib/chef/chef_fs/file_system/memory/memory_root.rb +23 -0
  142. data/lib/chef/chef_fs/file_system/multiplexed_dir.rb +2 -2
  143. data/lib/chef/chef_fs/file_system/must_delete_recursively_error.rb +3 -6
  144. data/lib/chef/chef_fs/file_system/nonexistent_fs_object.rb +4 -4
  145. data/lib/chef/chef_fs/file_system/not_found_error.rb +3 -6
  146. data/lib/chef/chef_fs/file_system/operation_failed_error.rb +5 -5
  147. data/lib/chef/chef_fs/file_system/operation_not_allowed_error.rb +16 -18
  148. data/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_acls_dir.rb +39 -0
  149. data/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_artifact_dir.rb +41 -0
  150. data/lib/chef/chef_fs/file_system/{chef_repository_file_system_policies_dir.rb → repository/chef_repository_file_system_cookbook_artifacts_dir.rb} +9 -13
  151. data/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_dir.rb +95 -0
  152. data/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbook_entry.rb +82 -0
  153. data/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_cookbooks_dir.rb +84 -0
  154. data/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_data_bags_dir.rb +38 -0
  155. data/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_entry.rb +83 -0
  156. data/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_policies_dir.rb +38 -0
  157. data/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_root_dir.rb +210 -0
  158. data/lib/chef/chef_fs/file_system/repository/chef_repository_file_system_versioned_cookbook_dir.rb +42 -0
  159. data/lib/chef/chef_fs/file_system/{chef_repository_file_system_data_bags_dir.rb → repository/chef_repository_file_system_versioned_cookbooks_dir.rb} +9 -11
  160. data/lib/chef/chef_fs/file_system/repository/file_system_entry.rb +117 -0
  161. data/lib/chef/chef_fs/file_system/{file_system_root_dir.rb → repository/file_system_root_dir.rb} +8 -6
  162. data/lib/chef/chef_fs/knife.rb +16 -16
  163. data/lib/chef/chef_fs/parallelizer.rb +3 -3
  164. data/lib/chef/chef_fs/parallelizer/flatten_enumerable.rb +1 -1
  165. data/lib/chef/chef_fs/parallelizer/parallel_enumerable.rb +3 -3
  166. data/lib/chef/chef_fs/path_utils.rb +11 -10
  167. data/lib/chef/client.rb +80 -71
  168. data/lib/chef/config.rb +10 -10
  169. data/lib/chef/config_fetcher.rb +12 -4
  170. data/lib/chef/constants.rb +2 -1
  171. data/lib/chef/cookbook/chefignore.rb +4 -5
  172. data/lib/chef/cookbook/cookbook_collection.rb +6 -6
  173. data/lib/chef/cookbook/cookbook_version_loader.rb +15 -15
  174. data/lib/chef/cookbook/file_system_file_vendor.rb +4 -4
  175. data/lib/chef/cookbook/file_vendor.rb +3 -4
  176. data/lib/chef/cookbook/metadata.rb +108 -107
  177. data/lib/chef/cookbook/remote_file_vendor.rb +7 -7
  178. data/lib/chef/cookbook/synchronizer.rb +11 -10
  179. data/lib/chef/cookbook/syntax_check.rb +14 -14
  180. data/lib/chef/cookbook_loader.rb +14 -14
  181. data/lib/chef/cookbook_manifest.rb +16 -15
  182. data/lib/chef/cookbook_site_streaming_uploader.rb +22 -22
  183. data/lib/chef/cookbook_uploader.rb +22 -21
  184. data/lib/chef/cookbook_version.rb +87 -87
  185. data/lib/chef/daemon.rb +6 -6
  186. data/lib/chef/data_bag.rb +32 -26
  187. data/lib/chef/data_bag_item.rb +43 -40
  188. data/lib/chef/delayed_evaluator.rb +1 -1
  189. data/lib/chef/deprecation/mixin/template.rb +4 -4
  190. data/lib/chef/deprecation/provider/cookbook_file.rb +2 -3
  191. data/lib/chef/deprecation/provider/file.rb +10 -10
  192. data/lib/chef/deprecation/provider/remote_directory.rb +5 -5
  193. data/lib/chef/deprecation/provider/remote_file.rb +3 -3
  194. data/lib/chef/deprecation/provider/template.rb +3 -3
  195. data/lib/chef/deprecation/warnings.rb +2 -2
  196. data/lib/chef/digester.rb +6 -6
  197. data/lib/chef/dsl.rb +6 -6
  198. data/lib/chef/dsl/audit.rb +4 -4
  199. data/lib/chef/dsl/chef_provisioning.rb +5 -5
  200. data/lib/chef/dsl/cheffish.rb +5 -5
  201. data/lib/chef/dsl/data_query.rb +10 -10
  202. data/lib/chef/dsl/declare_resource.rb +8 -8
  203. data/lib/chef/dsl/definitions.rb +1 -2
  204. data/lib/chef/dsl/include_attribute.rb +4 -6
  205. data/lib/chef/dsl/include_recipe.rb +4 -4
  206. data/lib/chef/dsl/platform_introspection.rb +8 -14
  207. data/lib/chef/dsl/powershell.rb +3 -3
  208. data/lib/chef/dsl/reboot_pending.rb +12 -13
  209. data/lib/chef/dsl/recipe.rb +20 -20
  210. data/lib/chef/dsl/registry_helper.rb +7 -3
  211. data/lib/chef/dsl/resources.rb +6 -5
  212. data/lib/chef/encrypted_data_bag_item.rb +10 -10
  213. data/lib/chef/encrypted_data_bag_item/assertions.rb +4 -4
  214. data/lib/chef/encrypted_data_bag_item/check_encrypted.rb +3 -3
  215. data/lib/chef/encrypted_data_bag_item/decryption_failure.rb +2 -2
  216. data/lib/chef/encrypted_data_bag_item/decryptor.rb +16 -14
  217. data/lib/chef/encrypted_data_bag_item/encrypted_data_bag_item_assertions.rb +1 -1
  218. data/lib/chef/encrypted_data_bag_item/encryption_failure.rb +1 -1
  219. data/lib/chef/encrypted_data_bag_item/encryptor.rb +20 -20
  220. data/lib/chef/encrypted_data_bag_item/unacceptable_encrypted_data_bag_item_format.rb +2 -2
  221. data/lib/chef/encrypted_data_bag_item/unsupported_cipher.rb +2 -2
  222. data/lib/chef/encrypted_data_bag_item/unsupported_encrypted_data_bag_item_format.rb +2 -2
  223. data/lib/chef/environment.rb +41 -34
  224. data/lib/chef/event_dispatch/base.rb +2 -2
  225. data/lib/chef/event_dispatch/dispatcher.rb +2 -2
  226. data/lib/chef/event_dispatch/dsl.rb +6 -5
  227. data/lib/chef/event_loggers/base.rb +3 -3
  228. data/lib/chef/event_loggers/windows_eventlog.rb +11 -11
  229. data/lib/chef/exceptions.rb +23 -34
  230. data/lib/chef/file_access_control.rb +6 -6
  231. data/lib/chef/file_access_control/unix.rb +5 -5
  232. data/lib/chef/file_access_control/windows.rb +5 -5
  233. data/lib/chef/file_cache.rb +21 -21
  234. data/lib/chef/file_content_management/content_base.rb +2 -2
  235. data/lib/chef/file_content_management/deploy.rb +5 -6
  236. data/lib/chef/file_content_management/deploy/cp.rb +2 -2
  237. data/lib/chef/file_content_management/deploy/mv_unix.rb +2 -3
  238. data/lib/chef/file_content_management/deploy/mv_windows.rb +4 -6
  239. data/lib/chef/file_content_management/tempfile.rb +3 -3
  240. data/lib/chef/formatters/base.rb +8 -9
  241. data/lib/chef/formatters/doc.rb +7 -7
  242. data/lib/chef/formatters/error_descriptor.rb +5 -5
  243. data/lib/chef/formatters/error_inspectors.rb +5 -5
  244. data/lib/chef/formatters/error_inspectors/api_error_formatting.rb +50 -15
  245. data/lib/chef/formatters/error_inspectors/compile_error_inspector.rb +11 -11
  246. data/lib/chef/formatters/error_inspectors/cookbook_resolve_error_inspector.rb +8 -8
  247. data/lib/chef/formatters/error_inspectors/cookbook_sync_error_inspector.rb +8 -6
  248. data/lib/chef/formatters/error_inspectors/node_load_error_inspector.rb +14 -13
  249. data/lib/chef/formatters/error_inspectors/registration_error_inspector.rb +19 -17
  250. data/lib/chef/formatters/error_inspectors/resource_failure_inspector.rb +8 -11
  251. data/lib/chef/formatters/error_inspectors/run_list_expansion_error_inspector.rb +15 -14
  252. data/lib/chef/formatters/error_mapper.rb +2 -2
  253. data/lib/chef/formatters/indentable_output_stream.rb +5 -5
  254. data/lib/chef/formatters/minimal.rb +7 -9
  255. data/lib/chef/guard_interpreter.rb +3 -3
  256. data/lib/chef/guard_interpreter/default_guard_interpreter.rb +3 -4
  257. data/lib/chef/guard_interpreter/resource_guard_interpreter.rb +9 -9
  258. data/lib/chef/handler.rb +4 -4
  259. data/lib/chef/handler/error_report.rb +4 -4
  260. data/lib/chef/handler/json_file.rb +5 -5
  261. data/lib/chef/http.rb +32 -35
  262. data/lib/chef/http/auth_credentials.rb +12 -12
  263. data/lib/chef/http/authenticator.rb +17 -12
  264. data/lib/chef/http/basic_client.rb +20 -20
  265. data/lib/chef/http/cookie_jar.rb +7 -7
  266. data/lib/chef/http/cookie_manager.rb +8 -8
  267. data/lib/chef/http/decompressor.rb +7 -9
  268. data/lib/chef/http/http_request.rb +31 -32
  269. data/lib/chef/http/json_input.rb +9 -9
  270. data/lib/chef/http/json_output.rb +9 -9
  271. data/lib/chef/http/json_to_model_output.rb +4 -4
  272. data/lib/chef/http/remote_request_id.rb +6 -6
  273. data/lib/chef/http/simple.rb +23 -5
  274. data/lib/chef/http/simple_json.rb +43 -0
  275. data/lib/chef/http/socketless_chef_zero_client.rb +56 -57
  276. data/lib/chef/http/ssl_policies.rb +9 -9
  277. data/lib/chef/http/validate_content_length.rb +12 -12
  278. data/lib/chef/json_compat.rb +6 -6
  279. data/lib/chef/key.rb +44 -42
  280. data/lib/chef/knife.rb +47 -44
  281. data/lib/chef/knife/bootstrap.rb +32 -32
  282. data/lib/chef/knife/bootstrap/chef_vault_handler.rb +16 -23
  283. data/lib/chef/knife/bootstrap/client_builder.rb +15 -13
  284. data/lib/chef/knife/bootstrap/templates/chef-full.erb +1 -1
  285. data/lib/chef/knife/client_bulk_delete.rb +5 -5
  286. data/lib/chef/knife/client_create.rb +5 -5
  287. data/lib/chef/knife/client_delete.rb +6 -6
  288. data/lib/chef/knife/client_edit.rb +5 -5
  289. data/lib/chef/knife/client_key_create.rb +6 -6
  290. data/lib/chef/knife/client_key_delete.rb +6 -6
  291. data/lib/chef/knife/client_key_edit.rb +8 -9
  292. data/lib/chef/knife/client_key_list.rb +5 -5
  293. data/lib/chef/knife/client_key_show.rb +5 -5
  294. data/lib/chef/knife/client_list.rb +5 -5
  295. data/lib/chef/knife/client_reregister.rb +5 -5
  296. data/lib/chef/knife/client_show.rb +5 -5
  297. data/lib/chef/knife/configure.rb +14 -14
  298. data/lib/chef/knife/configure_client.rb +6 -6
  299. data/lib/chef/knife/cookbook_bulk_delete.rb +9 -10
  300. data/lib/chef/knife/cookbook_create.rb +12 -12
  301. data/lib/chef/knife/cookbook_delete.rb +10 -10
  302. data/lib/chef/knife/cookbook_download.rb +8 -10
  303. data/lib/chef/knife/cookbook_list.rb +5 -5
  304. data/lib/chef/knife/cookbook_metadata.rb +8 -8
  305. data/lib/chef/knife/cookbook_metadata_from_file.rb +5 -5
  306. data/lib/chef/knife/cookbook_show.rb +14 -18
  307. data/lib/chef/knife/cookbook_site_download.rb +22 -22
  308. data/lib/chef/knife/cookbook_site_install.rb +10 -10
  309. data/lib/chef/knife/cookbook_site_list.rb +6 -10
  310. data/lib/chef/knife/cookbook_site_search.rb +5 -10
  311. data/lib/chef/knife/cookbook_site_share.rb +17 -18
  312. data/lib/chef/knife/cookbook_site_show.rb +7 -12
  313. data/lib/chef/knife/cookbook_site_unshare.rb +6 -6
  314. data/lib/chef/knife/cookbook_site_vendor.rb +5 -5
  315. data/lib/chef/knife/cookbook_test.rb +6 -7
  316. data/lib/chef/knife/cookbook_upload.rb +19 -20
  317. data/lib/chef/knife/core/bootstrap_context.rb +25 -21
  318. data/lib/chef/knife/core/cookbook_scm_repo.rb +11 -12
  319. data/lib/chef/knife/core/custom_manifest_loader.rb +2 -2
  320. data/lib/chef/knife/core/gem_glob_loader.rb +11 -11
  321. data/lib/chef/knife/core/generic_presenter.rb +33 -34
  322. data/lib/chef/knife/core/hashed_command_loader.rb +6 -6
  323. data/lib/chef/knife/core/node_editor.rb +59 -38
  324. data/lib/chef/knife/core/node_presenter.rb +13 -14
  325. data/lib/chef/knife/core/object_loader.rb +9 -9
  326. data/lib/chef/knife/core/status_presenter.rb +17 -17
  327. data/lib/chef/knife/core/subcommand_loader.rb +19 -20
  328. data/lib/chef/knife/core/text_formatter.rb +13 -14
  329. data/lib/chef/knife/core/ui.rb +17 -18
  330. data/lib/chef/knife/data_bag_create.rb +11 -10
  331. data/lib/chef/knife/data_bag_delete.rb +6 -8
  332. data/lib/chef/knife/data_bag_edit.rb +8 -11
  333. data/lib/chef/knife/data_bag_from_file.rb +12 -11
  334. data/lib/chef/knife/data_bag_list.rb +4 -8
  335. data/lib/chef/knife/data_bag_secret_options.rb +6 -6
  336. data/lib/chef/knife/data_bag_show.rb +31 -31
  337. data/lib/chef/knife/delete.rb +6 -7
  338. data/lib/chef/knife/deps.rb +18 -18
  339. data/lib/chef/knife/diff.rb +8 -9
  340. data/lib/chef/knife/download.rb +11 -12
  341. data/lib/chef/knife/edit.rb +5 -6
  342. data/lib/chef/knife/environment_compare.rb +23 -23
  343. data/lib/chef/knife/environment_create.rb +5 -5
  344. data/lib/chef/knife/environment_delete.rb +5 -5
  345. data/lib/chef/knife/environment_edit.rb +5 -5
  346. data/lib/chef/knife/environment_from_file.rb +4 -5
  347. data/lib/chef/knife/environment_list.rb +5 -5
  348. data/lib/chef/knife/environment_show.rb +5 -5
  349. data/lib/chef/knife/exec.rb +7 -7
  350. data/lib/chef/knife/help.rb +7 -9
  351. data/lib/chef/knife/index_rebuild.rb +4 -5
  352. data/lib/chef/knife/key_create.rb +5 -5
  353. data/lib/chef/knife/key_create_base.rb +1 -1
  354. data/lib/chef/knife/key_delete.rb +2 -2
  355. data/lib/chef/knife/key_edit.rb +5 -5
  356. data/lib/chef/knife/key_edit_base.rb +1 -1
  357. data/lib/chef/knife/key_list.rb +12 -12
  358. data/lib/chef/knife/key_list_base.rb +1 -1
  359. data/lib/chef/knife/key_show.rb +4 -4
  360. data/lib/chef/knife/list.rb +14 -13
  361. data/lib/chef/knife/node_bulk_delete.rb +6 -12
  362. data/lib/chef/knife/node_create.rb +5 -8
  363. data/lib/chef/knife/node_delete.rb +5 -6
  364. data/lib/chef/knife/node_edit.rb +6 -8
  365. data/lib/chef/knife/node_environment_set.rb +4 -4
  366. data/lib/chef/knife/node_from_file.rb +10 -10
  367. data/lib/chef/knife/node_list.rb +5 -7
  368. data/lib/chef/knife/node_run_list_add.rb +8 -8
  369. data/lib/chef/knife/node_run_list_remove.rb +8 -8
  370. data/lib/chef/knife/node_run_list_set.rb +6 -6
  371. data/lib/chef/knife/node_show.rb +6 -7
  372. data/lib/chef/knife/osc_user_create.rb +5 -5
  373. data/lib/chef/knife/osc_user_delete.rb +5 -5
  374. data/lib/chef/knife/osc_user_edit.rb +5 -5
  375. data/lib/chef/knife/osc_user_list.rb +5 -5
  376. data/lib/chef/knife/osc_user_reregister.rb +5 -5
  377. data/lib/chef/knife/osc_user_show.rb +5 -5
  378. data/lib/chef/knife/raw.rb +18 -17
  379. data/lib/chef/knife/recipe_list.rb +4 -4
  380. data/lib/chef/knife/rehash.rb +9 -9
  381. data/lib/chef/knife/role_bulk_delete.rb +5 -10
  382. data/lib/chef/knife/role_create.rb +5 -7
  383. data/lib/chef/knife/role_delete.rb +5 -6
  384. data/lib/chef/knife/role_edit.rb +5 -8
  385. data/lib/chef/knife/role_env_run_list_add.rb +9 -9
  386. data/lib/chef/knife/role_env_run_list_clear.rb +4 -4
  387. data/lib/chef/knife/role_env_run_list_remove.rb +13 -13
  388. data/lib/chef/knife/role_env_run_list_replace.rb +6 -6
  389. data/lib/chef/knife/role_env_run_list_set.rb +6 -6
  390. data/lib/chef/knife/role_from_file.rb +6 -11
  391. data/lib/chef/knife/role_list.rb +5 -6
  392. data/lib/chef/knife/role_run_list_add.rb +9 -9
  393. data/lib/chef/knife/role_run_list_clear.rb +4 -4
  394. data/lib/chef/knife/role_run_list_remove.rb +13 -13
  395. data/lib/chef/knife/role_run_list_replace.rb +6 -6
  396. data/lib/chef/knife/role_run_list_set.rb +6 -6
  397. data/lib/chef/knife/role_show.rb +5 -8
  398. data/lib/chef/knife/search.rb +11 -11
  399. data/lib/chef/knife/serve.rb +10 -10
  400. data/lib/chef/knife/show.rb +4 -4
  401. data/lib/chef/knife/ssh.rb +34 -34
  402. data/lib/chef/knife/ssl_check.rb +12 -11
  403. data/lib/chef/knife/ssl_fetch.rb +13 -15
  404. data/lib/chef/knife/status.rb +10 -10
  405. data/lib/chef/knife/tag_create.rb +5 -5
  406. data/lib/chef/knife/tag_delete.rb +5 -5
  407. data/lib/chef/knife/tag_list.rb +5 -5
  408. data/lib/chef/knife/upload.rb +10 -11
  409. data/lib/chef/knife/user_create.rb +6 -8
  410. data/lib/chef/knife/user_delete.rb +6 -7
  411. data/lib/chef/knife/user_edit.rb +6 -7
  412. data/lib/chef/knife/user_key_create.rb +7 -7
  413. data/lib/chef/knife/user_key_delete.rb +6 -6
  414. data/lib/chef/knife/user_key_edit.rb +8 -9
  415. data/lib/chef/knife/user_key_list.rb +5 -5
  416. data/lib/chef/knife/user_key_show.rb +5 -5
  417. data/lib/chef/knife/user_list.rb +5 -5
  418. data/lib/chef/knife/user_reregister.rb +6 -7
  419. data/lib/chef/knife/user_show.rb +6 -6
  420. data/lib/chef/knife/xargs.rb +22 -23
  421. data/lib/chef/local_mode.rb +13 -11
  422. data/lib/chef/log.rb +10 -10
  423. data/lib/chef/log/syslog.rb +5 -6
  424. data/lib/chef/log/winevt.rb +12 -12
  425. data/lib/chef/mash.rb +6 -5
  426. data/lib/chef/mixin/api_version_request_handling.rb +1 -1
  427. data/lib/chef/mixin/checksum.rb +4 -4
  428. data/lib/chef/mixin/command.rb +13 -13
  429. data/lib/chef/mixin/command/unix.rb +7 -7
  430. data/lib/chef/mixin/command/windows.rb +6 -7
  431. data/lib/chef/mixin/convert_to_class_name.rb +11 -11
  432. data/lib/chef/mixin/create_path.rb +3 -3
  433. data/lib/chef/mixin/deep_merge.rb +3 -3
  434. data/lib/chef/mixin/deprecation.rb +24 -25
  435. data/lib/chef/mixin/descendants_tracker.rb +2 -3
  436. data/lib/chef/mixin/enforce_ownership_and_permissions.rb +3 -3
  437. data/lib/chef/mixin/file_class.rb +9 -11
  438. data/lib/chef/mixin/from_file.rb +3 -3
  439. data/lib/chef/mixin/get_source_from_package.rb +2 -3
  440. data/lib/chef/mixin/homebrew_user.rb +6 -6
  441. data/lib/chef/mixin/language.rb +5 -5
  442. data/lib/chef/mixin/language_include_attribute.rb +4 -5
  443. data/lib/chef/mixin/language_include_recipe.rb +4 -5
  444. data/lib/chef/mixin/params_validate.rb +38 -18
  445. data/lib/chef/mixin/path_sanity.rb +7 -7
  446. data/lib/chef/mixin/powershell_out.rb +5 -5
  447. data/lib/chef/mixin/powershell_type_coercions.rb +12 -10
  448. data/lib/chef/mixin/properties.rb +8 -8
  449. data/lib/chef/mixin/provides.rb +2 -2
  450. data/lib/chef/mixin/proxified_socket.rb +4 -4
  451. data/lib/chef/mixin/recipe_definition_dsl_core.rb +4 -4
  452. data/lib/chef/mixin/securable.rb +24 -27
  453. data/lib/chef/mixin/shell_out.rb +10 -10
  454. data/lib/chef/mixin/subclass_directive.rb +2 -2
  455. data/lib/chef/mixin/template.rb +8 -9
  456. data/lib/chef/mixin/unformatter.rb +1 -1
  457. data/lib/chef/mixin/uris.rb +2 -3
  458. data/lib/chef/mixin/which.rb +3 -3
  459. data/lib/chef/mixin/why_run.rb +6 -7
  460. data/lib/chef/mixin/wide_string.rb +7 -7
  461. data/lib/chef/mixin/windows_architecture_helper.rb +9 -10
  462. data/lib/chef/mixin/windows_env_helper.rb +10 -11
  463. data/lib/chef/mixin/xml_escape.rb +13 -13
  464. data/lib/chef/mixins.rb +13 -14
  465. data/lib/chef/monkey_patches/net-ssh-multi.rb +6 -6
  466. data/lib/chef/monkey_patches/net_http.rb +2 -2
  467. data/lib/chef/monkey_patches/webrick-utils.rb +6 -6
  468. data/lib/chef/monkey_patches/win32/registry.rb +6 -6
  469. data/lib/chef/monologger.rb +2 -4
  470. data/lib/chef/node.rb +66 -60
  471. data/lib/chef/node/attribute.rb +289 -289
  472. data/lib/chef/node/attribute_collections.rb +8 -8
  473. data/lib/chef/node/immutable_collections.rb +3 -3
  474. data/lib/chef/node_map.rb +11 -11
  475. data/lib/chef/null_logger.rb +3 -3
  476. data/lib/chef/org.rb +31 -30
  477. data/lib/chef/platform.rb +4 -4
  478. data/lib/chef/platform/handler_map.rb +2 -2
  479. data/lib/chef/platform/priority_map.rb +2 -2
  480. data/lib/chef/platform/provider_handler_map.rb +3 -3
  481. data/lib/chef/platform/provider_mapping.rb +33 -33
  482. data/lib/chef/platform/provider_priority_map.rb +2 -2
  483. data/lib/chef/platform/query_helpers.rb +10 -11
  484. data/lib/chef/platform/rebooter.rb +11 -11
  485. data/lib/chef/platform/resource_handler_map.rb +3 -3
  486. data/lib/chef/platform/resource_priority_map.rb +2 -2
  487. data/lib/chef/platform/service_helpers.rb +5 -5
  488. data/lib/chef/policy_builder.rb +5 -5
  489. data/lib/chef/policy_builder/dynamic.rb +10 -11
  490. data/lib/chef/policy_builder/expand_node_object.rb +24 -19
  491. data/lib/chef/policy_builder/policyfile.rb +13 -14
  492. data/lib/chef/property.rb +115 -49
  493. data/lib/chef/provider.rb +43 -43
  494. data/lib/chef/provider/apt_update.rb +79 -0
  495. data/lib/chef/provider/batch.rb +6 -6
  496. data/lib/chef/provider/breakpoint.rb +1 -1
  497. data/lib/chef/provider/cookbook_file.rb +5 -5
  498. data/lib/chef/provider/cookbook_file/content.rb +4 -4
  499. data/lib/chef/provider/cron.rb +8 -8
  500. data/lib/chef/provider/cron/aix.rb +1 -1
  501. data/lib/chef/provider/cron/solaris.rb +1 -1
  502. data/lib/chef/provider/cron/unix.rb +7 -7
  503. data/lib/chef/provider/deploy.rb +7 -8
  504. data/lib/chef/provider/deploy/revision.rb +9 -9
  505. data/lib/chef/provider/deploy/timestamped.rb +1 -1
  506. data/lib/chef/provider/directory.rb +8 -8
  507. data/lib/chef/provider/dsc_resource.rb +33 -27
  508. data/lib/chef/provider/dsc_script.rb +17 -17
  509. data/lib/chef/provider/env.rb +8 -8
  510. data/lib/chef/provider/env/windows.rb +3 -3
  511. data/lib/chef/provider/erl_call.rb +5 -5
  512. data/lib/chef/provider/execute.rb +8 -8
  513. data/lib/chef/provider/file.rb +24 -24
  514. data/lib/chef/provider/file/content.rb +4 -4
  515. data/lib/chef/provider/git.rb +33 -35
  516. data/lib/chef/provider/group.rb +7 -7
  517. data/lib/chef/provider/group/aix.rb +6 -6
  518. data/lib/chef/provider/group/dscl.rb +11 -11
  519. data/lib/chef/provider/group/gpasswd.rb +3 -3
  520. data/lib/chef/provider/group/groupadd.rb +8 -8
  521. data/lib/chef/provider/group/groupmod.rb +3 -3
  522. data/lib/chef/provider/group/pw.rb +2 -2
  523. data/lib/chef/provider/group/suse.rb +5 -5
  524. data/lib/chef/provider/group/usermod.rb +8 -8
  525. data/lib/chef/provider/group/windows.rb +5 -5
  526. data/lib/chef/provider/http_request.rb +15 -15
  527. data/lib/chef/provider/ifconfig.rb +15 -14
  528. data/lib/chef/provider/ifconfig/aix.rb +5 -4
  529. data/lib/chef/provider/ifconfig/debian.rb +6 -6
  530. data/lib/chef/provider/ifconfig/redhat.rb +3 -3
  531. data/lib/chef/provider/link.rb +13 -13
  532. data/lib/chef/provider/log.rb +1 -1
  533. data/lib/chef/provider/lwrp_base.rb +8 -8
  534. data/lib/chef/provider/mdadm.rb +4 -4
  535. data/lib/chef/provider/mount.rb +13 -13
  536. data/lib/chef/provider/mount/aix.rb +14 -14
  537. data/lib/chef/provider/mount/mount.rb +18 -18
  538. data/lib/chef/provider/mount/solaris.rb +30 -30
  539. data/lib/chef/provider/mount/windows.rb +4 -4
  540. data/lib/chef/provider/ohai.rb +2 -2
  541. data/lib/chef/provider/osx_profile.rb +256 -0
  542. data/lib/chef/provider/package.rb +19 -19
  543. data/lib/chef/provider/package/aix.rb +8 -9
  544. data/lib/chef/provider/package/apt.rb +12 -12
  545. data/lib/chef/provider/package/chocolatey.rb +277 -0
  546. data/lib/chef/provider/package/dpkg.rb +7 -7
  547. data/lib/chef/provider/package/easy_install.rb +14 -15
  548. data/lib/chef/provider/package/freebsd/base.rb +7 -7
  549. data/lib/chef/provider/package/freebsd/pkg.rb +8 -8
  550. data/lib/chef/provider/package/freebsd/pkgng.rb +6 -6
  551. data/lib/chef/provider/package/freebsd/port.rb +4 -4
  552. data/lib/chef/provider/package/homebrew.rb +16 -16
  553. data/lib/chef/provider/package/ips.rb +8 -8
  554. data/lib/chef/provider/package/macports.rb +1 -0
  555. data/lib/chef/provider/package/openbsd.rb +13 -13
  556. data/lib/chef/provider/package/pacman.rb +6 -9
  557. data/lib/chef/provider/package/paludis.rb +7 -10
  558. data/lib/chef/provider/package/portage.rb +10 -13
  559. data/lib/chef/provider/package/rpm.rb +7 -8
  560. data/lib/chef/provider/package/rubygems.rb +64 -64
  561. data/lib/chef/provider/package/smartos.rb +7 -10
  562. data/lib/chef/provider/package/solaris.rb +6 -11
  563. data/lib/chef/provider/package/windows.rb +38 -29
  564. data/lib/chef/provider/package/windows/exe.rb +9 -21
  565. data/lib/chef/provider/package/windows/msi.rb +12 -12
  566. data/lib/chef/provider/package/windows/registry_uninstall_entry.rb +7 -7
  567. data/lib/chef/provider/package/yum-dump.py +1 -1
  568. data/lib/chef/provider/package/yum.rb +43 -44
  569. data/lib/chef/provider/package/zypper.rb +57 -47
  570. data/lib/chef/provider/powershell_script.rb +14 -14
  571. data/lib/chef/provider/reboot.rb +5 -5
  572. data/lib/chef/provider/registry_key.rb +16 -16
  573. data/lib/chef/provider/remote_directory.rb +15 -15
  574. data/lib/chef/provider/remote_file.rb +5 -5
  575. data/lib/chef/provider/remote_file/cache_control_data.rb +11 -12
  576. data/lib/chef/provider/remote_file/content.rb +11 -11
  577. data/lib/chef/provider/remote_file/fetcher.rb +2 -2
  578. data/lib/chef/provider/remote_file/ftp.rb +11 -11
  579. data/lib/chef/provider/remote_file/http.rb +9 -9
  580. data/lib/chef/provider/remote_file/local_file.rb +5 -5
  581. data/lib/chef/provider/remote_file/network_file.rb +4 -4
  582. data/lib/chef/provider/route.rb +188 -188
  583. data/lib/chef/provider/ruby_block.rb +3 -3
  584. data/lib/chef/provider/script.rb +5 -5
  585. data/lib/chef/provider/service.rb +30 -30
  586. data/lib/chef/provider/service/aix.rb +4 -4
  587. data/lib/chef/provider/service/aixinit.rb +12 -12
  588. data/lib/chef/provider/service/arch.rb +5 -5
  589. data/lib/chef/provider/service/debian.rb +12 -13
  590. data/lib/chef/provider/service/freebsd.rb +7 -7
  591. data/lib/chef/provider/service/gentoo.rb +5 -5
  592. data/lib/chef/provider/service/init.rb +4 -4
  593. data/lib/chef/provider/service/insserv.rb +4 -4
  594. data/lib/chef/provider/service/invokercd.rb +3 -3
  595. data/lib/chef/provider/service/macosx.rb +19 -19
  596. data/lib/chef/provider/service/openbsd.rb +14 -14
  597. data/lib/chef/provider/service/redhat.rb +6 -6
  598. data/lib/chef/provider/service/simple.rb +10 -9
  599. data/lib/chef/provider/service/solaris.rb +8 -8
  600. data/lib/chef/provider/service/systemd.rb +4 -4
  601. data/lib/chef/provider/service/upstart.rb +8 -8
  602. data/lib/chef/provider/service/windows.rb +32 -78
  603. data/lib/chef/provider/subversion.rb +13 -13
  604. data/lib/chef/provider/template.rb +7 -7
  605. data/lib/chef/provider/template/content.rb +4 -4
  606. data/lib/chef/provider/template_finder.rb +2 -1
  607. data/lib/chef/provider/user.rb +9 -10
  608. data/lib/chef/provider/user/aix.rb +4 -3
  609. data/lib/chef/provider/user/dscl.rb +39 -40
  610. data/lib/chef/provider/user/pw.rb +9 -9
  611. data/lib/chef/provider/user/solaris.rb +9 -9
  612. data/lib/chef/provider/user/useradd.rb +9 -9
  613. data/lib/chef/provider/user/windows.rb +13 -13
  614. data/lib/chef/provider/whyrun_safe_ruby_block.rb +1 -1
  615. data/lib/chef/provider/windows_script.rb +5 -5
  616. data/lib/chef/provider_resolver.rb +3 -3
  617. data/lib/chef/providers.rb +113 -110
  618. data/lib/chef/recipe.rb +13 -14
  619. data/lib/chef/request_id.rb +4 -4
  620. data/lib/chef/resource.rb +103 -93
  621. data/lib/chef/resource/action_class.rb +3 -3
  622. data/lib/chef/resource/apt_package.rb +6 -17
  623. data/lib/chef/{shell/shell_rest.rb → resource/apt_update.rb} +14 -9
  624. data/lib/chef/resource/bash.rb +5 -5
  625. data/lib/chef/resource/batch.rb +4 -4
  626. data/lib/chef/resource/bff_package.rb +3 -3
  627. data/lib/chef/resource/breakpoint.rb +3 -4
  628. data/lib/chef/resource/chef_gem.rb +9 -25
  629. data/lib/chef/resource/chocolatey_package.rb +39 -0
  630. data/lib/chef/resource/conditional.rb +8 -8
  631. data/lib/chef/resource/conditional_action_not_nothing.rb +1 -1
  632. data/lib/chef/resource/cookbook_file.rb +10 -10
  633. data/lib/chef/resource/cron.rb +33 -33
  634. data/lib/chef/resource/csh.rb +5 -5
  635. data/lib/chef/resource/deploy.rb +76 -76
  636. data/lib/chef/resource/deploy_revision.rb +1 -1
  637. data/lib/chef/resource/directory.rb +12 -12
  638. data/lib/chef/resource/dpkg_package.rb +5 -6
  639. data/lib/chef/resource/dsc_resource.rb +121 -120
  640. data/lib/chef/resource/dsc_script.rb +25 -25
  641. data/lib/chef/resource/easy_install_package.rb +6 -25
  642. data/lib/chef/resource/env.rb +9 -9
  643. data/lib/chef/resource/erl_call.rb +15 -15
  644. data/lib/chef/resource/execute.rb +28 -28
  645. data/lib/chef/resource/file.rb +20 -87
  646. data/lib/chef/resource/file/verification.rb +11 -11
  647. data/lib/chef/resource/freebsd_package.rb +10 -9
  648. data/lib/chef/resource/gem_package.rb +8 -23
  649. data/lib/chef/resource/git.rb +4 -4
  650. data/lib/chef/resource/group.rb +18 -19
  651. data/lib/chef/resource/homebrew_package.rb +7 -18
  652. data/lib/chef/resource/http_request.rb +12 -12
  653. data/lib/chef/resource/ifconfig.rb +28 -28
  654. data/lib/chef/resource/ips_package.rb +5 -16
  655. data/lib/chef/resource/ksh.rb +3 -3
  656. data/lib/chef/resource/link.rb +18 -17
  657. data/lib/chef/resource/log.rb +9 -9
  658. data/lib/chef/resource/lwrp_base.rb +10 -10
  659. data/lib/chef/resource/macosx_service.rb +7 -7
  660. data/lib/chef/resource/macports_package.rb +3 -2
  661. data/lib/chef/resource/mdadm.rb +18 -19
  662. data/lib/chef/resource/mount.rb +34 -34
  663. data/lib/chef/resource/ohai.rb +7 -7
  664. data/lib/chef/resource/openbsd_package.rb +7 -6
  665. data/lib/chef/resource/osx_profile.rb +74 -0
  666. data/lib/chef/resource/package.rb +15 -69
  667. data/lib/chef/resource/pacman_package.rb +3 -2
  668. data/lib/chef/resource/paludis_package.rb +5 -7
  669. data/lib/chef/resource/perl.rb +5 -5
  670. data/lib/chef/resource/portage_package.rb +5 -4
  671. data/lib/chef/resource/powershell_script.rb +7 -7
  672. data/lib/chef/resource/python.rb +5 -5
  673. data/lib/chef/resource/reboot.rb +6 -6
  674. data/lib/chef/resource/registry_key.rb +15 -15
  675. data/lib/chef/resource/remote_directory.rb +23 -24
  676. data/lib/chef/resource/remote_file.rb +21 -21
  677. data/lib/chef/resource/resource_notification.rb +2 -2
  678. data/lib/chef/resource/route.rb +26 -26
  679. data/lib/chef/resource/rpm_package.rb +5 -15
  680. data/lib/chef/resource/ruby.rb +5 -5
  681. data/lib/chef/resource/ruby_block.rb +8 -8
  682. data/lib/chef/resource/scm.rb +36 -37
  683. data/lib/chef/resource/script.rb +13 -13
  684. data/lib/chef/resource/service.rb +32 -32
  685. data/lib/chef/resource/smartos_package.rb +4 -3
  686. data/lib/chef/resource/solaris_package.rb +4 -3
  687. data/lib/chef/resource/subversion.rb +6 -6
  688. data/lib/chef/resource/template.rb +19 -19
  689. data/lib/chef/resource/timestamped_deploy.rb +1 -1
  690. data/lib/chef/resource/user.rb +31 -31
  691. data/lib/chef/resource/whyrun_safe_ruby_block.rb +1 -1
  692. data/lib/chef/resource/windows_package.rb +21 -66
  693. data/lib/chef/resource/windows_script.rb +8 -8
  694. data/lib/chef/resource/windows_service.rb +9 -9
  695. data/lib/chef/resource/yum_package.rb +18 -42
  696. data/lib/chef/resource/zypper_package.rb +3 -2
  697. data/lib/chef/resource_builder.rb +4 -4
  698. data/lib/chef/resource_collection.rb +11 -11
  699. data/lib/chef/resource_collection/resource_collection_serialization.rb +5 -5
  700. data/lib/chef/resource_collection/resource_list.rb +6 -6
  701. data/lib/chef/resource_collection/resource_set.rb +6 -6
  702. data/lib/chef/resource_collection/stepable_iterator.rb +4 -4
  703. data/lib/chef/resource_definition.rb +7 -7
  704. data/lib/chef/resource_definition_list.rb +5 -5
  705. data/lib/chef/resource_reporter.rb +14 -15
  706. data/lib/chef/resource_resolver.rb +4 -5
  707. data/lib/chef/resources.rb +71 -68
  708. data/lib/chef/rest.rb +23 -23
  709. data/lib/chef/role.rb +49 -43
  710. data/lib/chef/run_context.rb +21 -23
  711. data/lib/chef/run_context/cookbook_compiler.rb +10 -13
  712. data/lib/chef/run_list.rb +17 -17
  713. data/lib/chef/run_list/run_list_expansion.rb +22 -26
  714. data/lib/chef/run_list/run_list_item.rb +8 -9
  715. data/lib/chef/run_list/versioned_recipe_list.rb +13 -13
  716. data/lib/chef/run_lock.rb +12 -12
  717. data/lib/chef/run_status.rb +3 -3
  718. data/lib/chef/runner.rb +11 -12
  719. data/lib/chef/scan_access_control.rb +7 -7
  720. data/lib/chef/search/query.rb +30 -16
  721. data/lib/chef/server_api.rb +42 -10
  722. data/lib/chef/shell.rb +24 -25
  723. data/lib/chef/shell/ext.rb +31 -31
  724. data/lib/chef/shell/model_wrapper.rb +7 -8
  725. data/lib/chef/shell/shell_session.rb +20 -19
  726. data/lib/chef/shell_out.rb +2 -2
  727. data/lib/chef/tasks/chef_repo.rake +62 -63
  728. data/lib/chef/user.rb +38 -37
  729. data/lib/chef/user_v1.rb +53 -58
  730. data/lib/chef/util/backup.rb +6 -6
  731. data/lib/chef/util/diff.rb +8 -8
  732. data/lib/chef/util/dsc/configuration_generator.rb +11 -11
  733. data/lib/chef/util/dsc/lcm_output_parser.rb +8 -8
  734. data/lib/chef/util/dsc/local_configuration_manager.rb +9 -9
  735. data/lib/chef/util/dsc/resource_info.rb +15 -15
  736. data/lib/chef/util/dsc/resource_store.rb +73 -74
  737. data/lib/chef/util/editor.rb +1 -2
  738. data/lib/chef/util/file_edit.rb +5 -5
  739. data/lib/chef/util/path_helper.rb +2 -2
  740. data/lib/chef/util/powershell/cmdlet.rb +119 -119
  741. data/lib/chef/util/powershell/cmdlet_result.rb +36 -36
  742. data/lib/chef/util/powershell/ps_credential.rb +2 -2
  743. data/lib/chef/util/selinux.rb +6 -6
  744. data/lib/chef/util/threaded_job_queue.rb +2 -2
  745. data/lib/chef/util/windows.rb +1 -1
  746. data/lib/chef/util/windows/net_group.rb +84 -85
  747. data/lib/chef/util/windows/net_use.rb +6 -6
  748. data/lib/chef/util/windows/net_user.rb +9 -8
  749. data/lib/chef/util/windows/volume.rb +3 -3
  750. data/lib/chef/version.rb +2 -2
  751. data/lib/chef/version/platform.rb +5 -5
  752. data/lib/chef/version_class.rb +6 -6
  753. data/lib/chef/version_constraint.rb +13 -13
  754. data/lib/chef/version_constraint/platform.rb +3 -3
  755. data/lib/chef/whitelist.rb +2 -2
  756. data/lib/chef/win32/api.rb +13 -8
  757. data/lib/chef/win32/api/crypto.rb +63 -63
  758. data/lib/chef/win32/api/error.rb +11 -10
  759. data/lib/chef/win32/api/file.rb +17 -16
  760. data/lib/chef/win32/api/installer.rb +15 -16
  761. data/lib/chef/win32/api/memory.rb +4 -4
  762. data/lib/chef/win32/api/net.rb +111 -123
  763. data/lib/chef/win32/api/process.rb +4 -4
  764. data/lib/chef/win32/api/psapi.rb +4 -4
  765. data/lib/chef/win32/api/registry.rb +4 -4
  766. data/lib/chef/win32/api/security.rb +51 -26
  767. data/lib/chef/win32/api/synchronization.rb +4 -4
  768. data/lib/chef/win32/api/system.rb +4 -4
  769. data/lib/chef/win32/api/unicode.rb +4 -4
  770. data/lib/chef/win32/crypto.rb +50 -50
  771. data/lib/chef/win32/error.rb +18 -15
  772. data/lib/chef/win32/eventlog.rb +2 -2
  773. data/lib/chef/win32/file.rb +14 -14
  774. data/lib/chef/win32/file/info.rb +3 -4
  775. data/lib/chef/win32/file/version_info.rb +4 -4
  776. data/lib/chef/win32/handle.rb +6 -6
  777. data/lib/chef/win32/memory.rb +4 -4
  778. data/lib/chef/win32/mutex.rb +4 -4
  779. data/lib/chef/win32/net.rb +26 -59
  780. data/lib/chef/win32/process.rb +7 -7
  781. data/lib/chef/win32/registry.rb +19 -33
  782. data/lib/chef/win32/security.rb +82 -20
  783. data/lib/chef/win32/security/ace.rb +6 -6
  784. data/lib/chef/win32/security/acl.rb +8 -8
  785. data/lib/chef/win32/security/securable_object.rb +5 -5
  786. data/lib/chef/win32/security/security_descriptor.rb +5 -5
  787. data/lib/chef/win32/security/sid.rb +81 -43
  788. data/lib/chef/win32/security/token.rb +6 -6
  789. data/lib/chef/win32/system.rb +4 -4
  790. data/lib/chef/win32/unicode.rb +7 -7
  791. data/lib/chef/win32/version.rb +26 -26
  792. data/lib/chef/workstation_config_loader.rb +2 -2
  793. data/spec/data/apt/chef-integration-test-1.0/debian/copyright +2 -2
  794. data/spec/data/apt/chef-integration-test-1.1/debian/copyright +2 -2
  795. data/spec/data/apt/chef-integration-test2-1.0/debian/copyright +2 -2
  796. data/spec/data/cookbooks/name-mismatch-versionnumber/recipes/default.rb +1 -1
  797. data/spec/data/cookbooks/supports-platform-constraints/metadata.rb +5 -0
  798. data/spec/data/incomplete-metadata-chef-repo/incomplete-metadata/recipes/default.rb +1 -1
  799. data/spec/data/invalid-metadata-chef-repo/invalid-metadata/metadata.rb +1 -2
  800. data/spec/data/invalid-metadata-chef-repo/invalid-metadata/recipes/default.rb +1 -1
  801. data/spec/functional/application_spec.rb +7 -7
  802. data/spec/functional/assets/chocolatey_feed/test-A.1.0.nupkg +0 -0
  803. data/spec/functional/assets/chocolatey_feed/test-A.1.5.nupkg +0 -0
  804. data/spec/functional/assets/chocolatey_feed/test-A.2.0.nupkg +0 -0
  805. data/spec/functional/assets/chocolatey_feed/test-B.1.0.nupkg +0 -0
  806. data/spec/functional/audit/rspec_formatter_spec.rb +8 -8
  807. data/spec/functional/audit/runner_spec.rb +9 -9
  808. data/spec/functional/dsl/reboot_pending_spec.rb +10 -15
  809. data/spec/functional/dsl/registry_helper_spec.rb +8 -10
  810. data/spec/functional/event_loggers/windows_eventlog_spec.rb +27 -22
  811. data/spec/functional/file_content_management/deploy_strategies_spec.rb +9 -10
  812. data/spec/functional/http/simple_spec.rb +11 -11
  813. data/spec/functional/knife/configure_spec.rb +5 -10
  814. data/spec/functional/knife/cookbook_delete_spec.rb +11 -11
  815. data/spec/functional/knife/exec_spec.rb +6 -6
  816. data/spec/functional/knife/smoke_test.rb +11 -3
  817. data/spec/functional/knife/ssh_spec.rb +22 -22
  818. data/spec/functional/mixin/powershell_out_spec.rb +3 -3
  819. data/spec/functional/mixin/shell_out_spec.rb +12 -12
  820. data/spec/functional/notifications_spec.rb +6 -7
  821. data/spec/functional/provider/remote_file/cache_control_data_spec.rb +11 -12
  822. data/spec/functional/provider/whyrun_safe_ruby_block_spec.rb +4 -4
  823. data/spec/functional/rebooter_spec.rb +12 -12
  824. data/spec/functional/resource/aix_service_spec.rb +7 -8
  825. data/spec/functional/resource/aixinit_service_spec.rb +20 -20
  826. data/spec/functional/resource/base.rb +1 -3
  827. data/spec/functional/resource/bash_spec.rb +6 -6
  828. data/spec/functional/resource/batch_spec.rb +5 -5
  829. data/spec/functional/resource/bff_spec.rb +10 -12
  830. data/spec/functional/resource/chocolatey_package_spec.rb +124 -0
  831. data/spec/functional/resource/cookbook_file_spec.rb +9 -9
  832. data/spec/functional/resource/cron_spec.rb +13 -13
  833. data/spec/functional/resource/deploy_revision_spec.rb +18 -18
  834. data/spec/functional/resource/directory_spec.rb +4 -4
  835. data/spec/functional/resource/dpkg_package_spec.rb +38 -38
  836. data/spec/functional/resource/dsc_resource_spec.rb +17 -22
  837. data/spec/functional/resource/dsc_script_spec.rb +104 -106
  838. data/spec/functional/resource/env_spec.rb +30 -30
  839. data/spec/functional/resource/execute_spec.rb +10 -10
  840. data/spec/functional/resource/file_spec.rb +12 -13
  841. data/spec/functional/resource/git_spec.rb +20 -20
  842. data/spec/functional/resource/group_spec.rb +21 -21
  843. data/spec/functional/resource/ifconfig_spec.rb +11 -11
  844. data/spec/functional/resource/link_spec.rb +140 -135
  845. data/spec/functional/resource/mount_spec.rb +17 -29
  846. data/spec/functional/resource/ohai_spec.rb +5 -8
  847. data/spec/functional/resource/package_spec.rb +11 -13
  848. data/spec/functional/resource/powershell_script_spec.rb +60 -60
  849. data/spec/functional/resource/reboot_spec.rb +12 -12
  850. data/spec/functional/resource/registry_spec.rb +71 -72
  851. data/spec/functional/resource/remote_directory_spec.rb +23 -23
  852. data/spec/functional/resource/remote_file_spec.rb +17 -17
  853. data/spec/functional/resource/rpm_spec.rb +14 -14
  854. data/spec/functional/resource/template_spec.rb +8 -8
  855. data/spec/functional/resource/user/dscl_spec.rb +3 -3
  856. data/spec/functional/resource/user/useradd_spec.rb +31 -37
  857. data/spec/functional/resource/user/windows_spec.rb +20 -20
  858. data/spec/functional/resource/windows_package_spec.rb +26 -35
  859. data/spec/functional/resource/windows_service_spec.rb +12 -8
  860. data/spec/functional/rest_spec.rb +6 -5
  861. data/spec/functional/run_lock_spec.rb +15 -14
  862. data/spec/functional/shell_spec.rb +11 -10
  863. data/spec/functional/tiny_server_spec.rb +18 -18
  864. data/spec/functional/util/path_helper_spec.rb +5 -5
  865. data/spec/functional/util/powershell/cmdlet_spec.rb +24 -27
  866. data/spec/functional/version_spec.rb +6 -6
  867. data/spec/functional/win32/crypto_spec.rb +7 -10
  868. data/spec/functional/win32/registry_spec.rb +105 -107
  869. data/spec/functional/win32/security_spec.rb +17 -17
  870. data/spec/functional/win32/service_manager_spec.rb +7 -8
  871. data/spec/functional/win32/sid_spec.rb +13 -13
  872. data/spec/functional/win32/version_info_spec.rb +7 -7
  873. data/spec/functional/win32/versions_spec.rb +13 -13
  874. data/spec/integration/client/client_spec.rb +65 -66
  875. data/spec/integration/client/ipv6_spec.rb +15 -16
  876. data/spec/integration/knife/chef_fs_data_store_spec.rb +432 -246
  877. data/spec/integration/knife/chef_repo_path_spec.rb +261 -261
  878. data/spec/integration/knife/chef_repository_file_system_spec.rb +84 -84
  879. data/spec/integration/knife/chefignore_spec.rb +82 -82
  880. data/spec/integration/knife/common_options_spec.rb +41 -41
  881. data/spec/integration/knife/cookbook_api_ipv6_spec.rb +9 -9
  882. data/spec/integration/knife/delete_spec.rb +262 -248
  883. data/spec/integration/knife/deps_spec.rb +301 -301
  884. data/spec/integration/knife/diff_spec.rb +237 -237
  885. data/spec/integration/knife/download_spec.rb +532 -401
  886. data/spec/integration/knife/list_spec.rb +310 -116
  887. data/spec/integration/knife/raw_spec.rb +39 -39
  888. data/spec/integration/knife/redirection_spec.rb +12 -12
  889. data/spec/integration/knife/serve_spec.rb +12 -12
  890. data/spec/integration/knife/show_spec.rb +59 -59
  891. data/spec/integration/knife/upload_spec.rb +661 -550
  892. data/spec/integration/recipes/lwrp_inline_resources_spec.rb +18 -18
  893. data/spec/integration/recipes/lwrp_spec.rb +7 -7
  894. data/spec/integration/recipes/provider_choice.rb +3 -2
  895. data/spec/integration/recipes/recipe_dsl_spec.rb +151 -124
  896. data/spec/integration/recipes/remote_directory.rb +2 -2
  897. data/spec/integration/recipes/resource_action_spec.rb +439 -328
  898. data/spec/integration/recipes/resource_converge_if_changed_spec.rb +12 -11
  899. data/spec/integration/recipes/resource_load_spec.rb +35 -33
  900. data/spec/integration/solo/solo_spec.rb +31 -32
  901. data/spec/scripts/ssl-serve.rb +12 -17
  902. data/spec/spec_helper.rb +48 -43
  903. data/spec/stress/win32/file_spec.rb +5 -5
  904. data/spec/stress/win32/memory_spec.rb +4 -4
  905. data/spec/stress/win32/security_spec.rb +8 -8
  906. data/spec/support/chef_helpers.rb +5 -6
  907. data/spec/support/key_helpers.rb +2 -2
  908. data/spec/support/lib/chef/provider/easy.rb +2 -2
  909. data/spec/support/lib/chef/provider/openldap_includer.rb +2 -2
  910. data/spec/support/lib/chef/provider/snakeoil.rb +2 -2
  911. data/spec/support/lib/chef/resource/cat.rb +4 -4
  912. data/spec/support/lib/chef/resource/one_two_three_four.rb +2 -2
  913. data/spec/support/lib/chef/resource/openldap_includer.rb +2 -3
  914. data/spec/support/lib/chef/resource/with_state.rb +4 -4
  915. data/spec/support/lib/chef/resource/zen_follower.rb +4 -4
  916. data/spec/support/lib/chef/resource/zen_master.rb +5 -6
  917. data/spec/support/lib/library_load_order.rb +0 -2
  918. data/spec/support/matchers/leak.rb +7 -5
  919. data/spec/support/mock/constant.rb +3 -3
  920. data/spec/support/mock/platform.rb +5 -5
  921. data/spec/support/platform_helpers.rb +36 -23
  922. data/spec/support/platforms/prof/gc.rb +2 -3
  923. data/spec/support/platforms/prof/win32.rb +3 -4
  924. data/spec/support/platforms/win32/spec_service.rb +3 -3
  925. data/spec/support/shared/context/client.rb +22 -14
  926. data/spec/support/shared/context/config.rb +3 -3
  927. data/spec/support/shared/context/win32.rb +9 -9
  928. data/spec/support/shared/examples/client.rb +4 -4
  929. data/spec/support/shared/functional/diff_disabled.rb +1 -1
  930. data/spec/support/shared/functional/directory_resource.rb +8 -8
  931. data/spec/support/shared/functional/file_resource.rb +20 -23
  932. data/spec/support/shared/functional/http.rb +33 -34
  933. data/spec/support/shared/functional/knife.rb +3 -3
  934. data/spec/support/shared/functional/securable_resource.rb +48 -48
  935. data/spec/support/shared/functional/securable_resource_with_reporting.rb +8 -12
  936. data/spec/support/shared/functional/win32_service.rb +3 -5
  937. data/spec/support/shared/functional/windows_script.rb +13 -13
  938. data/spec/support/shared/integration/app_server_support.rb +7 -7
  939. data/spec/support/shared/integration/integration_helper.rb +21 -21
  940. data/spec/support/shared/integration/knife_support.rb +13 -13
  941. data/spec/support/shared/matchers/exit_with_code.rb +2 -2
  942. data/spec/support/shared/matchers/match_environment_variable.rb +2 -2
  943. data/spec/support/shared/unit/api_error_inspector.rb +3 -5
  944. data/spec/support/shared/unit/api_versioning.rb +8 -8
  945. data/spec/support/shared/unit/execute_resource.rb +4 -4
  946. data/spec/support/shared/unit/file_system_support.rb +12 -13
  947. data/spec/support/shared/unit/knife_shared.rb +1 -2
  948. data/spec/support/shared/unit/mock_shellout.rb +5 -2
  949. data/spec/support/shared/unit/platform_introspector.rb +35 -37
  950. data/spec/support/shared/unit/provider/file.rb +29 -40
  951. data/spec/support/shared/unit/provider/useradd_based_user_provider.rb +50 -51
  952. data/spec/support/shared/unit/resource/static_provider_resolution.rb +2 -5
  953. data/spec/support/shared/unit/script_resource.rb +10 -10
  954. data/spec/support/shared/unit/user_and_client_shared.rb +5 -6
  955. data/spec/support/shared/unit/windows_script_resource.rb +6 -7
  956. data/spec/tiny_server.rb +24 -24
  957. data/spec/unit/api_client/registration_spec.rb +41 -38
  958. data/spec/unit/api_client_spec.rb +13 -16
  959. data/spec/unit/api_client_v1_spec.rb +17 -19
  960. data/spec/unit/application/apply_spec.rb +3 -3
  961. data/spec/unit/application/client_spec.rb +12 -9
  962. data/spec/unit/application/knife_spec.rb +69 -17
  963. data/spec/unit/application/solo_spec.rb +29 -48
  964. data/spec/unit/application_spec.rb +171 -151
  965. data/spec/unit/audit/audit_event_proxy_spec.rb +13 -13
  966. data/spec/unit/audit/audit_reporter_spec.rb +18 -25
  967. data/spec/unit/audit/control_group_data_spec.rb +16 -17
  968. data/spec/unit/audit/logger_spec.rb +5 -5
  969. data/spec/unit/audit/rspec_formatter_spec.rb +4 -4
  970. data/spec/unit/audit/runner_spec.rb +11 -12
  971. data/spec/unit/chef_class_spec.rb +5 -5
  972. data/spec/unit/chef_fs/config_spec.rb +14 -18
  973. data/spec/unit/chef_fs/data_handler/group_handler_spec.rb +17 -17
  974. data/spec/unit/chef_fs/diff_spec.rb +75 -75
  975. data/spec/unit/chef_fs/file_pattern_spec.rb +368 -369
  976. data/spec/unit/chef_fs/file_system/cookbook_subdir_spec.rb +9 -9
  977. data/spec/unit/chef_fs/file_system/operation_failed_error_spec.rb +9 -9
  978. data/spec/unit/chef_fs/file_system_spec.rb +74 -74
  979. data/spec/unit/chef_fs/parallelizer.rb +63 -66
  980. data/spec/unit/chef_fs/path_util_spec.rb +45 -45
  981. data/spec/unit/chef_spec.rb +3 -3
  982. data/spec/unit/client_spec.rb +44 -44
  983. data/spec/unit/config_fetcher_spec.rb +56 -28
  984. data/spec/unit/config_spec.rb +2 -2
  985. data/spec/unit/cookbook/chefignore_spec.rb +12 -12
  986. data/spec/unit/cookbook/cookbook_version_loader_spec.rb +5 -6
  987. data/spec/unit/cookbook/file_vendor_spec.rb +8 -9
  988. data/spec/unit/cookbook/metadata_spec.rb +73 -76
  989. data/spec/unit/cookbook/synchronizer_spec.rb +31 -32
  990. data/spec/unit/cookbook/syntax_check_spec.rb +22 -22
  991. data/spec/unit/cookbook_loader_spec.rb +9 -10
  992. data/spec/unit/cookbook_manifest_spec.rb +27 -28
  993. data/spec/unit/cookbook_site_streaming_uploader_spec.rb +24 -24
  994. data/spec/unit/cookbook_spec.rb +3 -3
  995. data/spec/unit/cookbook_uploader_spec.rb +10 -11
  996. data/spec/unit/cookbook_version_file_specificity_spec.rb +49 -50
  997. data/spec/unit/cookbook_version_spec.rb +45 -48
  998. data/spec/unit/daemon_spec.rb +5 -5
  999. data/spec/unit/data_bag_item_spec.rb +29 -30
  1000. data/spec/unit/data_bag_spec.rb +47 -47
  1001. data/spec/unit/deprecation_spec.rb +11 -11
  1002. data/spec/unit/digester_spec.rb +5 -6
  1003. data/spec/unit/dsl/audit_spec.rb +5 -5
  1004. data/spec/unit/dsl/data_query_spec.rb +12 -12
  1005. data/spec/unit/dsl/platform_introspection_spec.rb +19 -20
  1006. data/spec/unit/dsl/reboot_pending_spec.rb +17 -17
  1007. data/spec/unit/dsl/recipe_spec.rb +4 -6
  1008. data/spec/unit/dsl/regsitry_helper_spec.rb +9 -12
  1009. data/spec/unit/dsl/resources_spec.rb +13 -13
  1010. data/spec/unit/encrypted_data_bag_item/check_encrypted_spec.rb +7 -7
  1011. data/spec/unit/encrypted_data_bag_item_spec.rb +11 -11
  1012. data/spec/unit/environment_spec.rb +53 -53
  1013. data/spec/unit/event_dispatch/dispatcher_spec.rb +3 -4
  1014. data/spec/unit/event_dispatch/dsl_spec.rb +16 -16
  1015. data/spec/unit/exceptions_spec.rb +10 -10
  1016. data/spec/unit/file_access_control_spec.rb +32 -32
  1017. data/spec/unit/file_cache_spec.rb +19 -19
  1018. data/spec/unit/file_content_management/deploy/cp_spec.rb +3 -5
  1019. data/spec/unit/file_content_management/deploy/mv_unix_spec.rb +3 -5
  1020. data/spec/unit/file_content_management/deploy/mv_windows_spec.rb +5 -12
  1021. data/spec/unit/formatters/base_spec.rb +29 -6
  1022. data/spec/unit/formatters/doc_spec.rb +7 -7
  1023. data/spec/unit/formatters/error_inspectors/api_error_formatting_spec.rb +9 -10
  1024. data/spec/unit/formatters/error_inspectors/compile_error_inspector_spec.rb +11 -11
  1025. data/spec/unit/formatters/error_inspectors/cookbook_resolve_error_inspector_spec.rb +4 -7
  1026. data/spec/unit/formatters/error_inspectors/cookbook_sync_error_inspector_spec.rb +3 -3
  1027. data/spec/unit/formatters/error_inspectors/node_load_error_inspector_spec.rb +3 -4
  1028. data/spec/unit/formatters/error_inspectors/registration_error_inspector_spec.rb +3 -4
  1029. data/spec/unit/formatters/error_inspectors/resource_failure_inspector_spec.rb +4 -6
  1030. data/spec/unit/formatters/error_inspectors/run_list_expansion_error_inspector_spec.rb +5 -7
  1031. data/spec/unit/guard_interpreter/resource_guard_interpreter_spec.rb +9 -9
  1032. data/spec/unit/guard_interpreter_spec.rb +3 -3
  1033. data/spec/unit/handler/json_file_spec.rb +11 -12
  1034. data/spec/unit/handler_spec.rb +7 -7
  1035. data/spec/unit/http/authenticator_spec.rb +9 -7
  1036. data/spec/unit/http/basic_client_spec.rb +3 -3
  1037. data/spec/unit/http/http_request_spec.rb +22 -22
  1038. data/spec/unit/http/json_input_spec.rb +7 -7
  1039. data/spec/unit/http/simple_spec.rb +3 -3
  1040. data/spec/unit/http/socketless_chef_zero_client_spec.rb +3 -4
  1041. data/spec/unit/http/ssl_policies_spec.rb +18 -19
  1042. data/spec/unit/http/validate_content_length_spec.rb +9 -9
  1043. data/spec/unit/http_spec.rb +18 -18
  1044. data/spec/unit/json_compat_spec.rb +16 -9
  1045. data/spec/unit/key_spec.rb +41 -44
  1046. data/spec/unit/knife/bootstrap/chef_vault_handler_spec.rb +41 -42
  1047. data/spec/unit/knife/bootstrap/client_builder_spec.rb +30 -28
  1048. data/spec/unit/knife/bootstrap_spec.rb +75 -37
  1049. data/spec/unit/knife/client_bulk_delete_spec.rb +6 -6
  1050. data/spec/unit/knife/client_create_spec.rb +11 -12
  1051. data/spec/unit/knife/client_delete_spec.rb +13 -13
  1052. data/spec/unit/knife/client_edit_spec.rb +9 -9
  1053. data/spec/unit/knife/client_list_spec.rb +5 -5
  1054. data/spec/unit/knife/client_reregister_spec.rb +13 -13
  1055. data/spec/unit/knife/client_show_spec.rb +12 -12
  1056. data/spec/unit/knife/configure_client_spec.rb +19 -20
  1057. data/spec/unit/knife/configure_spec.rb +37 -39
  1058. data/spec/unit/knife/cookbook_bulk_delete_spec.rb +17 -19
  1059. data/spec/unit/knife/cookbook_create_spec.rb +32 -32
  1060. data/spec/unit/knife/cookbook_delete_spec.rb +79 -79
  1061. data/spec/unit/knife/cookbook_download_spec.rb +84 -85
  1062. data/spec/unit/knife/cookbook_list_spec.rb +26 -26
  1063. data/spec/unit/knife/cookbook_metadata_from_file_spec.rb +5 -5
  1064. data/spec/unit/knife/cookbook_metadata_spec.rb +55 -55
  1065. data/spec/unit/knife/cookbook_show_spec.rb +33 -34
  1066. data/spec/unit/knife/cookbook_site_download_spec.rb +51 -53
  1067. data/spec/unit/knife/cookbook_site_install_spec.rb +10 -8
  1068. data/spec/unit/knife/cookbook_site_share_spec.rb +42 -42
  1069. data/spec/unit/knife/cookbook_site_unshare_spec.rb +20 -20
  1070. data/spec/unit/knife/cookbook_test_spec.rb +6 -6
  1071. data/spec/unit/knife/cookbook_upload_spec.rb +69 -69
  1072. data/spec/unit/knife/core/bootstrap_context_spec.rb +39 -33
  1073. data/spec/unit/knife/core/cookbook_scm_repo_spec.rb +32 -32
  1074. data/spec/unit/knife/core/custom_manifest_loader_spec.rb +3 -3
  1075. data/spec/unit/knife/core/gem_glob_loader_spec.rb +23 -24
  1076. data/spec/unit/knife/core/hashed_command_loader_spec.rb +8 -8
  1077. data/spec/unit/knife/core/node_editor_spec.rb +211 -0
  1078. data/spec/unit/knife/core/object_loader_spec.rb +12 -12
  1079. data/spec/unit/knife/core/subcommand_loader_spec.rb +10 -10
  1080. data/spec/unit/knife/core/ui_spec.rb +45 -45
  1081. data/spec/unit/knife/data_bag_create_spec.rb +14 -14
  1082. data/spec/unit/knife/data_bag_edit_spec.rb +12 -12
  1083. data/spec/unit/knife/data_bag_from_file_spec.rb +9 -9
  1084. data/spec/unit/knife/data_bag_secret_options_spec.rb +6 -6
  1085. data/spec/unit/knife/data_bag_show_spec.rb +19 -19
  1086. data/spec/unit/knife/environment_compare_spec.rb +32 -32
  1087. data/spec/unit/knife/environment_create_spec.rb +2 -2
  1088. data/spec/unit/knife/environment_delete_spec.rb +2 -2
  1089. data/spec/unit/knife/environment_edit_spec.rb +2 -2
  1090. data/spec/unit/knife/environment_from_file_spec.rb +5 -5
  1091. data/spec/unit/knife/environment_list_spec.rb +4 -4
  1092. data/spec/unit/knife/environment_show_spec.rb +2 -2
  1093. data/spec/unit/knife/index_rebuild_spec.rb +14 -17
  1094. data/spec/unit/knife/key_create_spec.rb +11 -12
  1095. data/spec/unit/knife/key_delete_spec.rb +8 -10
  1096. data/spec/unit/knife/key_edit_spec.rb +14 -17
  1097. data/spec/unit/knife/key_helper.rb +2 -2
  1098. data/spec/unit/knife/key_list_spec.rb +13 -13
  1099. data/spec/unit/knife/key_show_spec.rb +11 -11
  1100. data/spec/unit/knife/knife_help.rb +2 -2
  1101. data/spec/unit/knife/node_bulk_delete_spec.rb +10 -13
  1102. data/spec/unit/knife/node_delete_spec.rb +4 -4
  1103. data/spec/unit/knife/node_edit_spec.rb +17 -18
  1104. data/spec/unit/knife/node_environment_set_spec.rb +4 -4
  1105. data/spec/unit/knife/node_from_file_spec.rb +5 -5
  1106. data/spec/unit/knife/node_list_spec.rb +5 -6
  1107. data/spec/unit/knife/node_run_list_add_spec.rb +5 -8
  1108. data/spec/unit/knife/node_run_list_remove_spec.rb +27 -27
  1109. data/spec/unit/knife/node_run_list_set_spec.rb +4 -4
  1110. data/spec/unit/knife/node_show_spec.rb +6 -6
  1111. data/spec/unit/knife/osc_user_create_spec.rb +7 -7
  1112. data/spec/unit/knife/osc_user_delete_spec.rb +7 -7
  1113. data/spec/unit/knife/osc_user_edit_spec.rb +6 -6
  1114. data/spec/unit/knife/osc_user_list_spec.rb +3 -3
  1115. data/spec/unit/knife/osc_user_reregister_spec.rb +10 -10
  1116. data/spec/unit/knife/osc_user_show_spec.rb +8 -8
  1117. data/spec/unit/knife/raw_spec.rb +6 -6
  1118. data/spec/unit/knife/role_bulk_delete_spec.rb +4 -4
  1119. data/spec/unit/knife/role_create_spec.rb +4 -4
  1120. data/spec/unit/knife/role_delete_spec.rb +4 -4
  1121. data/spec/unit/knife/role_edit_spec.rb +4 -6
  1122. data/spec/unit/knife/role_env_run_list_add_spec.rb +9 -9
  1123. data/spec/unit/knife/role_env_run_list_clear_spec.rb +38 -44
  1124. data/spec/unit/knife/role_env_run_list_remove_spec.rb +46 -52
  1125. data/spec/unit/knife/role_env_run_list_replace_spec.rb +49 -52
  1126. data/spec/unit/knife/role_env_run_list_set_spec.rb +17 -20
  1127. data/spec/unit/knife/role_from_file_spec.rb +7 -7
  1128. data/spec/unit/knife/role_list_spec.rb +5 -7
  1129. data/spec/unit/knife/role_run_list_add_spec.rb +7 -7
  1130. data/spec/unit/knife/role_run_list_clear_spec.rb +28 -34
  1131. data/spec/unit/knife/role_run_list_remove_spec.rb +36 -42
  1132. data/spec/unit/knife/role_run_list_replace_spec.rb +42 -45
  1133. data/spec/unit/knife/role_run_list_set_spec.rb +6 -9
  1134. data/spec/unit/knife/role_show_spec.rb +14 -14
  1135. data/spec/unit/knife/ssh_spec.rb +36 -36
  1136. data/spec/unit/knife/ssl_check_spec.rb +7 -7
  1137. data/spec/unit/knife/ssl_fetch_spec.rb +8 -8
  1138. data/spec/unit/knife/status_spec.rb +5 -5
  1139. data/spec/unit/knife/tag_create_spec.rb +1 -1
  1140. data/spec/unit/knife/tag_delete_spec.rb +1 -1
  1141. data/spec/unit/knife/tag_list_spec.rb +2 -2
  1142. data/spec/unit/knife/user_create_spec.rb +30 -30
  1143. data/spec/unit/knife/user_delete_spec.rb +11 -11
  1144. data/spec/unit/knife/user_edit_spec.rb +9 -9
  1145. data/spec/unit/knife/user_list_spec.rb +3 -3
  1146. data/spec/unit/knife/user_reregister_spec.rb +13 -13
  1147. data/spec/unit/knife/user_show_spec.rb +12 -12
  1148. data/spec/unit/knife_spec.rb +61 -61
  1149. data/spec/unit/lib_backcompat_spec.rb +34 -0
  1150. data/spec/unit/log/syslog_spec.rb +3 -3
  1151. data/spec/unit/log/winevt_spec.rb +3 -3
  1152. data/spec/unit/log_spec.rb +5 -5
  1153. data/spec/unit/lwrp_spec.rb +41 -43
  1154. data/spec/unit/mash_spec.rb +8 -8
  1155. data/spec/unit/mixin/api_version_request_handling_spec.rb +13 -14
  1156. data/spec/unit/mixin/checksum_spec.rb +5 -6
  1157. data/spec/unit/mixin/command_spec.rb +9 -9
  1158. data/spec/unit/mixin/convert_to_class_name_spec.rb +2 -2
  1159. data/spec/unit/mixin/deep_merge_spec.rb +107 -107
  1160. data/spec/unit/mixin/deprecation_spec.rb +5 -5
  1161. data/spec/unit/mixin/enforce_ownership_and_permissions_spec.rb +9 -9
  1162. data/spec/unit/mixin/homebrew_user_spec.rb +13 -13
  1163. data/spec/unit/mixin/params_validate_spec.rb +71 -71
  1164. data/spec/unit/mixin/path_sanity_spec.rb +16 -16
  1165. data/spec/unit/mixin/powershell_out_spec.rb +9 -9
  1166. data/spec/unit/mixin/powershell_type_coercions_spec.rb +34 -23
  1167. data/spec/unit/mixin/properties_spec.rb +27 -27
  1168. data/spec/unit/mixin/proxified_socket_spec.rb +6 -6
  1169. data/spec/unit/mixin/securable_spec.rb +37 -37
  1170. data/spec/unit/mixin/shell_out_spec.rb +68 -68
  1171. data/spec/unit/mixin/subclass_directive_spec.rb +2 -2
  1172. data/spec/unit/mixin/template_spec.rb +15 -12
  1173. data/spec/unit/mixin/unformatter_spec.rb +3 -3
  1174. data/spec/unit/mixin/uris_spec.rb +8 -8
  1175. data/spec/unit/mixin/windows_architecture_helper_spec.rb +14 -17
  1176. data/spec/unit/mixin/xml_escape_spec.rb +3 -3
  1177. data/spec/unit/monkey_patches/uri_spec.rb +3 -3
  1178. data/spec/unit/monologger_spec.rb +4 -4
  1179. data/spec/unit/node/attribute_spec.rb +203 -248
  1180. data/spec/unit/node/immutable_collections_spec.rb +20 -21
  1181. data/spec/unit/node_map_spec.rb +5 -5
  1182. data/spec/unit/node_spec.rb +165 -135
  1183. data/spec/unit/org_spec.rb +17 -17
  1184. data/spec/unit/platform/query_helpers_spec.rb +23 -23
  1185. data/spec/unit/platform_spec.rb +17 -17
  1186. data/spec/unit/policy_builder/dynamic_spec.rb +8 -10
  1187. data/spec/unit/policy_builder/expand_node_object_spec.rb +16 -14
  1188. data/spec/unit/policy_builder/policyfile_spec.rb +30 -37
  1189. data/spec/unit/policy_builder_spec.rb +4 -4
  1190. data/spec/unit/property/state_spec.rb +58 -56
  1191. data/spec/unit/property/validation_spec.rb +255 -216
  1192. data/spec/unit/property_spec.rb +206 -129
  1193. data/spec/unit/provider/apt_update_spec.rb +113 -0
  1194. data/spec/unit/provider/breakpoint_spec.rb +2 -3
  1195. data/spec/unit/provider/cookbook_file/content_spec.rb +9 -10
  1196. data/spec/unit/provider/cookbook_file_spec.rb +11 -11
  1197. data/spec/unit/provider/cron/unix_spec.rb +7 -7
  1198. data/spec/unit/provider/cron_spec.rb +67 -67
  1199. data/spec/unit/provider/deploy/revision_spec.rb +6 -7
  1200. data/spec/unit/provider/deploy/timestamped_spec.rb +2 -2
  1201. data/spec/unit/provider/deploy_spec.rb +24 -25
  1202. data/spec/unit/provider/directory_spec.rb +12 -12
  1203. data/spec/unit/provider/dsc_resource_spec.rb +29 -27
  1204. data/spec/unit/provider/dsc_script_spec.rb +47 -48
  1205. data/spec/unit/provider/env/windows_spec.rb +21 -21
  1206. data/spec/unit/provider/env_spec.rb +5 -5
  1207. data/spec/unit/provider/erl_call_spec.rb +3 -4
  1208. data/spec/unit/provider/execute_spec.rb +5 -5
  1209. data/spec/unit/provider/file/content_spec.rb +4 -4
  1210. data/spec/unit/provider/file_spec.rb +8 -9
  1211. data/spec/unit/provider/git_spec.rb +64 -65
  1212. data/spec/unit/provider/group/dscl_spec.rb +7 -7
  1213. data/spec/unit/provider/group/gpasswd_spec.rb +3 -3
  1214. data/spec/unit/provider/group/groupadd_spec.rb +9 -9
  1215. data/spec/unit/provider/group/groupmod_spec.rb +12 -12
  1216. data/spec/unit/provider/group/pw_spec.rb +3 -3
  1217. data/spec/unit/provider/group/usermod_spec.rb +6 -6
  1218. data/spec/unit/provider/group/windows_spec.rb +3 -3
  1219. data/spec/unit/provider/group_spec.rb +16 -16
  1220. data/spec/unit/provider/http_request_spec.rb +7 -7
  1221. data/spec/unit/provider/ifconfig/aix_spec.rb +4 -5
  1222. data/spec/unit/provider/ifconfig/debian_spec.rb +6 -6
  1223. data/spec/unit/provider/ifconfig/redhat_spec.rb +3 -3
  1224. data/spec/unit/provider/ifconfig_spec.rb +5 -5
  1225. data/spec/unit/provider/link_spec.rb +12 -12
  1226. data/spec/unit/provider/log_spec.rb +2 -2
  1227. data/spec/unit/provider/mdadm_spec.rb +12 -12
  1228. data/spec/unit/provider/mount/aix_spec.rb +7 -7
  1229. data/spec/unit/provider/mount/mount_spec.rb +20 -20
  1230. data/spec/unit/provider/mount/solaris_spec.rb +26 -26
  1231. data/spec/unit/provider/mount/windows_spec.rb +8 -8
  1232. data/spec/unit/provider/mount_spec.rb +7 -8
  1233. data/spec/unit/provider/ohai_spec.rb +13 -13
  1234. data/spec/unit/provider/osx_profile_spec.rb +249 -0
  1235. data/spec/unit/provider/package/aix_spec.rb +5 -5
  1236. data/spec/unit/provider/package/apt_spec.rb +49 -49
  1237. data/spec/unit/provider/package/chocolatey_spec.rb +504 -0
  1238. data/spec/unit/provider/package/dpkg_spec.rb +32 -36
  1239. data/spec/unit/provider/package/easy_install_spec.rb +11 -15
  1240. data/spec/unit/provider/package/freebsd/pkg_spec.rb +10 -10
  1241. data/spec/unit/provider/package/freebsd/pkgng_spec.rb +12 -19
  1242. data/spec/unit/provider/package/freebsd/port_spec.rb +12 -19
  1243. data/spec/unit/provider/package/homebrew_spec.rb +139 -139
  1244. data/spec/unit/provider/package/ips_spec.rb +10 -11
  1245. data/spec/unit/provider/package/macports_spec.rb +3 -3
  1246. data/spec/unit/provider/package/openbsd_spec.rb +38 -38
  1247. data/spec/unit/provider/package/pacman_spec.rb +8 -9
  1248. data/spec/unit/provider/package/paludis_spec.rb +9 -10
  1249. data/spec/unit/provider/package/portage_spec.rb +2 -2
  1250. data/spec/unit/provider/package/rpm_spec.rb +7 -11
  1251. data/spec/unit/provider/package/rubygems_spec.rb +386 -289
  1252. data/spec/unit/provider/package/smartos_spec.rb +8 -10
  1253. data/spec/unit/provider/package/solaris_spec.rb +4 -4
  1254. data/spec/unit/provider/package/windows/exe_spec.rb +17 -81
  1255. data/spec/unit/provider/package/windows/msi_spec.rb +16 -16
  1256. data/spec/unit/provider/package/windows_spec.rb +50 -40
  1257. data/spec/unit/provider/package/yum_spec.rb +179 -181
  1258. data/spec/unit/provider/package/zypper_spec.rb +53 -50
  1259. data/spec/unit/provider/package_spec.rb +104 -104
  1260. data/spec/unit/provider/powershell_script_spec.rb +20 -20
  1261. data/spec/unit/provider/registry_key_spec.rb +3 -3
  1262. data/spec/unit/provider/remote_directory_spec.rb +46 -46
  1263. data/spec/unit/provider/remote_file/cache_control_data_spec.rb +9 -10
  1264. data/spec/unit/provider/remote_file/content_spec.rb +5 -6
  1265. data/spec/unit/provider/remote_file/fetcher_spec.rb +3 -3
  1266. data/spec/unit/provider/remote_file/ftp_spec.rb +3 -3
  1267. data/spec/unit/provider/remote_file/http_spec.rb +10 -12
  1268. data/spec/unit/provider/remote_file/local_file_spec.rb +2 -2
  1269. data/spec/unit/provider/remote_file/network_file_spec.rb +2 -2
  1270. data/spec/unit/provider/remote_file_spec.rb +9 -11
  1271. data/spec/unit/provider/route_spec.rb +26 -27
  1272. data/spec/unit/provider/ruby_block_spec.rb +4 -5
  1273. data/spec/unit/provider/script_spec.rb +11 -11
  1274. data/spec/unit/provider/service/aix_service_spec.rb +5 -6
  1275. data/spec/unit/provider/service/aixinit_service_spec.rb +26 -23
  1276. data/spec/unit/provider/service/arch_service_spec.rb +15 -15
  1277. data/spec/unit/provider/service/debian_service_spec.rb +37 -37
  1278. data/spec/unit/provider/service/freebsd_service_spec.rb +9 -9
  1279. data/spec/unit/provider/service/gentoo_service_spec.rb +4 -4
  1280. data/spec/unit/provider/service/init_service_spec.rb +9 -9
  1281. data/spec/unit/provider/service/insserv_service_spec.rb +3 -3
  1282. data/spec/unit/provider/service/invokercd_service_spec.rb +9 -9
  1283. data/spec/unit/provider/service/macosx_spec.rb +26 -26
  1284. data/spec/unit/provider/service/openbsd_service_spec.rb +26 -26
  1285. data/spec/unit/provider/service/redhat_spec.rb +16 -16
  1286. data/spec/unit/provider/service/simple_service_spec.rb +5 -5
  1287. data/spec/unit/provider/service/solaris_smf_service_spec.rb +51 -51
  1288. data/spec/unit/provider/service/systemd_service_spec.rb +4 -4
  1289. data/spec/unit/provider/service/upstart_service_spec.rb +13 -13
  1290. data/spec/unit/provider/service/windows_spec.rb +28 -37
  1291. data/spec/unit/provider/service_spec.rb +2 -3
  1292. data/spec/unit/provider/subversion_spec.rb +27 -28
  1293. data/spec/unit/provider/template/content_spec.rb +21 -21
  1294. data/spec/unit/provider/template_spec.rb +15 -16
  1295. data/spec/unit/provider/user/dscl_spec.rb +36 -37
  1296. data/spec/unit/provider/user/pw_spec.rb +12 -12
  1297. data/spec/unit/provider/user/solaris_spec.rb +31 -31
  1298. data/spec/unit/provider/user/useradd_spec.rb +10 -10
  1299. data/spec/unit/provider/user/windows_spec.rb +9 -9
  1300. data/spec/unit/provider/user_spec.rb +19 -20
  1301. data/spec/unit/provider/whyrun_safe_ruby_block_spec.rb +3 -4
  1302. data/spec/unit/provider_resolver_spec.rb +63 -62
  1303. data/spec/unit/provider_spec.rb +7 -8
  1304. data/spec/unit/pure_application_spec.rb +3 -3
  1305. data/spec/unit/recipe_spec.rb +13 -16
  1306. data/spec/unit/resource/apt_package_spec.rb +4 -4
  1307. data/spec/unit/resource/apt_update_spec.rb +38 -0
  1308. data/spec/unit/resource/bash_spec.rb +3 -3
  1309. data/spec/unit/resource/batch_spec.rb +5 -5
  1310. data/spec/unit/resource/breakpoint_spec.rb +3 -3
  1311. data/spec/unit/resource/chef_gem_spec.rb +5 -9
  1312. data/spec/unit/resource/chocolatey_package_spec.rb +67 -0
  1313. data/spec/unit/resource/conditional_action_not_nothing_spec.rb +2 -2
  1314. data/spec/unit/resource/conditional_spec.rb +12 -12
  1315. data/spec/unit/resource/cookbook_file_spec.rb +23 -24
  1316. data/spec/unit/resource/cron_spec.rb +4 -4
  1317. data/spec/unit/resource/csh_spec.rb +3 -3
  1318. data/spec/unit/resource/deploy_revision_spec.rb +3 -3
  1319. data/spec/unit/resource/deploy_spec.rb +23 -24
  1320. data/spec/unit/resource/directory_spec.rb +4 -4
  1321. data/spec/unit/resource/dpkg_package_spec.rb +5 -5
  1322. data/spec/unit/resource/dsc_resource_spec.rb +11 -11
  1323. data/spec/unit/resource/dsc_script_spec.rb +15 -15
  1324. data/spec/unit/resource/easy_install_package_spec.rb +3 -3
  1325. data/spec/unit/resource/env_spec.rb +5 -5
  1326. data/spec/unit/resource/erl_call_spec.rb +3 -3
  1327. data/spec/unit/resource/execute_spec.rb +4 -4
  1328. data/spec/unit/resource/file/verification_spec.rb +11 -11
  1329. data/spec/unit/resource/file_spec.rb +10 -10
  1330. data/spec/unit/resource/freebsd_package_spec.rb +6 -9
  1331. data/spec/unit/resource/gem_package_spec.rb +4 -4
  1332. data/spec/unit/resource/git_spec.rb +3 -3
  1333. data/spec/unit/resource/group_spec.rb +4 -4
  1334. data/spec/unit/resource/homebrew_package_spec.rb +13 -13
  1335. data/spec/unit/resource/http_request_spec.rb +5 -5
  1336. data/spec/unit/resource/ifconfig_spec.rb +9 -9
  1337. data/spec/unit/resource/ips_package_spec.rb +4 -4
  1338. data/spec/unit/resource/ksh_spec.rb +2 -2
  1339. data/spec/unit/resource/link_spec.rb +6 -6
  1340. data/spec/unit/resource/log_spec.rb +3 -3
  1341. data/spec/unit/resource/macports_package_spec.rb +3 -3
  1342. data/spec/unit/resource/mdadm_spec.rb +3 -3
  1343. data/spec/unit/resource/mount_spec.rb +7 -7
  1344. data/spec/unit/resource/ohai_spec.rb +2 -3
  1345. data/spec/unit/resource/openbsd_package_spec.rb +5 -6
  1346. data/spec/unit/resource/osx_profile_spec.rb +61 -0
  1347. data/spec/unit/resource/package_spec.rb +6 -6
  1348. data/spec/unit/resource/pacman_package_spec.rb +3 -3
  1349. data/spec/unit/resource/perl_spec.rb +3 -3
  1350. data/spec/unit/resource/portage_package_spec.rb +2 -2
  1351. data/spec/unit/resource/powershell_script_spec.rb +16 -16
  1352. data/spec/unit/resource/python_spec.rb +3 -3
  1353. data/spec/unit/resource/registry_key_spec.rb +21 -21
  1354. data/spec/unit/resource/remote_directory_spec.rb +3 -3
  1355. data/spec/unit/resource/remote_file_spec.rb +15 -15
  1356. data/spec/unit/resource/resource_notification_spec.rb +18 -18
  1357. data/spec/unit/resource/route_spec.rb +3 -3
  1358. data/spec/unit/resource/rpm_package_spec.rb +4 -4
  1359. data/spec/unit/resource/ruby_block_spec.rb +4 -4
  1360. data/spec/unit/resource/ruby_spec.rb +3 -3
  1361. data/spec/unit/resource/scm_spec.rb +8 -8
  1362. data/spec/unit/resource/script_spec.rb +4 -4
  1363. data/spec/unit/resource/service_spec.rb +4 -5
  1364. data/spec/unit/resource/smartos_package_spec.rb +3 -3
  1365. data/spec/unit/resource/solaris_package_spec.rb +3 -3
  1366. data/spec/unit/resource/subversion_spec.rb +5 -5
  1367. data/spec/unit/resource/template_spec.rb +7 -8
  1368. data/spec/unit/resource/timestamped_deploy_spec.rb +4 -4
  1369. data/spec/unit/resource/user_spec.rb +4 -4
  1370. data/spec/unit/resource/windows_package_spec.rb +7 -7
  1371. data/spec/unit/resource/windows_service_spec.rb +3 -3
  1372. data/spec/unit/resource/yum_package_spec.rb +6 -6
  1373. data/spec/unit/resource_collection/resource_list_spec.rb +7 -7
  1374. data/spec/unit/resource_collection/resource_set_spec.rb +9 -9
  1375. data/spec/unit/resource_collection/stepable_iterator_spec.rb +6 -6
  1376. data/spec/unit/resource_collection_spec.rb +8 -9
  1377. data/spec/unit/resource_definition_spec.rb +3 -3
  1378. data/spec/unit/resource_reporter_spec.rb +56 -64
  1379. data/spec/unit/resource_resolver_spec.rb +5 -6
  1380. data/spec/unit/resource_spec.rb +80 -60
  1381. data/spec/unit/rest/auth_credentials_spec.rb +39 -71
  1382. data/spec/unit/rest_spec.rb +96 -90
  1383. data/spec/unit/role_spec.rb +64 -68
  1384. data/spec/unit/run_context/child_run_context_spec.rb +23 -23
  1385. data/spec/unit/run_context/cookbook_compiler_spec.rb +5 -7
  1386. data/spec/unit/run_context_spec.rb +19 -19
  1387. data/spec/unit/run_list/run_list_expansion_spec.rb +24 -24
  1388. data/spec/unit/run_list/run_list_item_spec.rb +28 -28
  1389. data/spec/unit/run_list/versioned_recipe_list_spec.rb +22 -23
  1390. data/spec/unit/run_list_spec.rb +37 -41
  1391. data/spec/unit/run_lock_spec.rb +10 -10
  1392. data/spec/unit/run_status_spec.rb +4 -5
  1393. data/spec/unit/runner_spec.rb +8 -8
  1394. data/spec/unit/scan_access_control_spec.rb +4 -5
  1395. data/spec/unit/search/query_spec.rb +50 -46
  1396. data/spec/unit/shell/model_wrapper_spec.rb +12 -13
  1397. data/spec/unit/shell/shell_ext_spec.rb +5 -5
  1398. data/spec/unit/shell/shell_session_spec.rb +8 -9
  1399. data/spec/unit/shell_out_spec.rb +1 -1
  1400. data/spec/unit/shell_spec.rb +9 -9
  1401. data/spec/unit/user_spec.rb +14 -15
  1402. data/spec/unit/user_v1_spec.rb +22 -23
  1403. data/spec/unit/util/backup_spec.rb +17 -18
  1404. data/spec/unit/util/diff_spec.rb +6 -9
  1405. data/spec/unit/util/dsc/configuration_generator_spec.rb +48 -48
  1406. data/spec/unit/util/dsc/lcm_output_parser_spec.rb +22 -22
  1407. data/spec/unit/util/dsc/local_configuration_manager_spec.rb +30 -31
  1408. data/spec/unit/util/dsc/resource_store.rb +22 -22
  1409. data/spec/unit/util/editor_spec.rb +65 -65
  1410. data/spec/unit/util/file_edit_spec.rb +7 -7
  1411. data/spec/unit/util/powershell/cmdlet_spec.rb +27 -27
  1412. data/spec/unit/util/powershell/ps_credential_spec.rb +13 -13
  1413. data/spec/unit/util/selinux_spec.rb +8 -9
  1414. data/spec/unit/util/threaded_job_queue_spec.rb +2 -2
  1415. data/spec/unit/version/platform_spec.rb +5 -6
  1416. data/spec/unit/version_class_spec.rb +8 -9
  1417. data/spec/unit/version_constraint/platform_spec.rb +3 -4
  1418. data/spec/unit/version_constraint_spec.rb +19 -19
  1419. data/spec/unit/win32/registry_spec.rb +25 -25
  1420. data/spec/unit/windows_service_spec.rb +20 -20
  1421. data/tasks/cbgb.rb +84 -0
  1422. data/tasks/external_tests.rb +12 -11
  1423. data/tasks/maintainers.rb +15 -15
  1424. data/tasks/rspec.rb +18 -15
  1425. metadata +250 -67
  1426. data/lib/chef/chef_fs/file_system/acl_dir.rb +0 -63
  1427. data/lib/chef/chef_fs/file_system/acl_entry.rb +0 -58
  1428. data/lib/chef/chef_fs/file_system/acls_dir.rb +0 -72
  1429. data/lib/chef/chef_fs/file_system/chef_repository_file_system_cookbook_dir.rb +0 -102
  1430. data/lib/chef/chef_fs/file_system/chef_repository_file_system_cookbook_entry.rb +0 -80
  1431. data/lib/chef/chef_fs/file_system/chef_repository_file_system_cookbooks_dir.rb +0 -82
  1432. data/lib/chef/chef_fs/file_system/chef_repository_file_system_entry.rb +0 -81
  1433. data/lib/chef/chef_fs/file_system/chef_repository_file_system_root_dir.rb +0 -196
  1434. data/lib/chef/chef_fs/file_system/chef_server_root_dir.rb +0 -165
  1435. data/lib/chef/chef_fs/file_system/cookbook_dir.rb +0 -224
  1436. data/lib/chef/chef_fs/file_system/cookbook_file.rb +0 -82
  1437. data/lib/chef/chef_fs/file_system/cookbook_subdir.rb +0 -59
  1438. data/lib/chef/chef_fs/file_system/cookbooks_acl_dir.rb +0 -41
  1439. data/lib/chef/chef_fs/file_system/cookbooks_dir.rb +0 -156
  1440. data/lib/chef/chef_fs/file_system/data_bag_dir.rb +0 -69
  1441. data/lib/chef/chef_fs/file_system/data_bags_dir.rb +0 -71
  1442. data/lib/chef/chef_fs/file_system/environments_dir.rb +0 -60
  1443. data/lib/chef/chef_fs/file_system/file_system_entry.rb +0 -115
  1444. data/lib/chef/chef_fs/file_system/memory_dir.rb +0 -51
  1445. data/lib/chef/chef_fs/file_system/memory_file.rb +0 -17
  1446. data/lib/chef/chef_fs/file_system/memory_root.rb +0 -21
  1447. data/lib/chef/chef_fs/file_system/nodes_dir.rb +0 -55
  1448. data/lib/chef/chef_fs/file_system/org_entry.rb +0 -34
  1449. data/lib/chef/chef_fs/file_system/organization_invites_entry.rb +0 -59
  1450. data/lib/chef/chef_fs/file_system/organization_members_entry.rb +0 -58
  1451. data/lib/chef/chef_fs/file_system/rest_list_dir.rb +0 -110
  1452. data/lib/chef/chef_fs/file_system/rest_list_entry.rb +0 -185
@@ -1,5 +1,5 @@
1
- require 'support/shared/integration/integration_helper'
2
- require 'chef/mixin/shell_out'
1
+ require "support/shared/integration/integration_helper"
2
+ require "chef/mixin/shell_out"
3
3
 
4
4
  describe "LWRPs with inline resources" do
5
5
  include IntegrationSupport
@@ -29,7 +29,7 @@ describe "LWRPs with inline resources" do
29
29
  use_inline_resources
30
30
  def action_a
31
31
  r = new_resource
32
- ruby_block 'run a' do
32
+ ruby_block "run a" do
33
33
  block { r.ran_a "ran a" }
34
34
  end
35
35
  end
@@ -39,8 +39,8 @@ describe "LWRPs with inline resources" do
39
39
  it "this is totally a bug, but for backcompat purposes, it adds the resources to the main resource collection and does not get marked updated" do
40
40
  r = nil
41
41
  expect_recipe {
42
- r = lwrp_inline_resources_test 'hi'
43
- }.to have_updated('ruby_block[run a]', :run)
42
+ r = lwrp_inline_resources_test "hi"
43
+ }.to have_updated("ruby_block[run a]", :run)
44
44
  expect(r.ran_a).to eq "ran a"
45
45
  end
46
46
  end
@@ -58,7 +58,7 @@ describe "LWRPs with inline resources" do
58
58
 
59
59
  action :a do
60
60
  r = new_resource
61
- ruby_block 'run a' do
61
+ ruby_block "run a" do
62
62
  block { r.ran_a "ran a" }
63
63
  end
64
64
  end
@@ -68,7 +68,7 @@ describe "LWRPs with inline resources" do
68
68
  r = new_resource
69
69
  # Grab ran_a right now, before we converge
70
70
  ran_a = r.ran_a
71
- ruby_block 'run b' do
71
+ ruby_block "run b" do
72
72
  block { r.ran_b "ran b: ran_a value was #{ran_a.inspect}" }
73
73
  end
74
74
  end
@@ -78,34 +78,34 @@ describe "LWRPs with inline resources" do
78
78
  it "resources declared in b are executed immediately inline" do
79
79
  r = nil
80
80
  expect_recipe {
81
- r = lwrp_inline_resources_test2 'hi' do
81
+ r = lwrp_inline_resources_test2 "hi" do
82
82
  action :b
83
83
  end
84
- }.to have_updated('lwrp_inline_resources_test2[hi]', :b).
85
- and have_updated('ruby_block[run a]', :run).
86
- and have_updated('ruby_block[run b]', :run)
84
+ }.to have_updated("lwrp_inline_resources_test2[hi]", :b).
85
+ and have_updated("ruby_block[run a]", :run).
86
+ and have_updated("ruby_block[run b]", :run)
87
87
  expect(r.ran_b).to eq "ran b: ran_a value was \"ran a\""
88
88
  end
89
89
  end
90
90
 
91
91
  when_the_repository "has a cookbook with a nested LWRP" do
92
92
  before do
93
- directory 'cookbooks/x' do
93
+ directory "cookbooks/x" do
94
94
 
95
- file 'resources/do_nothing.rb', <<-EOM
95
+ file "resources/do_nothing.rb", <<-EOM
96
96
  actions :create, :nothing
97
97
  default_action :create
98
98
  EOM
99
- file 'providers/do_nothing.rb', <<-EOM
99
+ file "providers/do_nothing.rb", <<-EOM
100
100
  action :create do
101
101
  end
102
102
  EOM
103
103
 
104
- file 'resources/my_machine.rb', <<-EOM
104
+ file "resources/my_machine.rb", <<-EOM
105
105
  actions :create, :nothing
106
106
  default_action :create
107
107
  EOM
108
- file 'providers/my_machine.rb', <<-EOM
108
+ file "providers/my_machine.rb", <<-EOM
109
109
  use_inline_resources
110
110
  action :create do
111
111
  x_do_nothing 'a'
@@ -113,7 +113,7 @@ describe "LWRPs with inline resources" do
113
113
  end
114
114
  EOM
115
115
 
116
- file 'recipes/default.rb', <<-EOM
116
+ file "recipes/default.rb", <<-EOM
117
117
  x_my_machine "me"
118
118
  x_my_machine "you"
119
119
  EOM
@@ -122,7 +122,7 @@ describe "LWRPs with inline resources" do
122
122
  end
123
123
 
124
124
  it "should complete with success" do
125
- file 'config/client.rb', <<EOM
125
+ file "config/client.rb", <<EOM
126
126
  local_mode true
127
127
  cookbook_path "#{path_to('cookbooks')}"
128
128
  log_level :warn
@@ -1,5 +1,5 @@
1
- require 'support/shared/integration/integration_helper'
2
- require 'chef/mixin/shell_out'
1
+ require "support/shared/integration/integration_helper"
2
+ require "chef/mixin/shell_out"
3
3
 
4
4
  describe "LWRPs" do
5
5
  include IntegrationSupport
@@ -20,17 +20,17 @@ describe "LWRPs" do
20
20
 
21
21
  when_the_repository "has a cookbook named l-w-r-p" do
22
22
  before do
23
- directory 'cookbooks/l-w-r-p' do
23
+ directory "cookbooks/l-w-r-p" do
24
24
 
25
- file 'resources/foo.rb', <<EOM
25
+ file "resources/foo.rb", <<EOM
26
26
  default_action :create
27
27
  EOM
28
- file 'providers/foo.rb', <<EOM
28
+ file "providers/foo.rb", <<EOM
29
29
  action :create do
30
30
  end
31
31
  EOM
32
32
 
33
- file 'recipes/default.rb', <<EOM
33
+ file "recipes/default.rb", <<EOM
34
34
  l_w_r_p_foo "me"
35
35
  EOM
36
36
 
@@ -38,7 +38,7 @@ EOM
38
38
  end
39
39
 
40
40
  it "should complete with success" do
41
- file 'config/client.rb', <<EOM
41
+ file "config/client.rb", <<EOM
42
42
  local_mode true
43
43
  cookbook_path "#{path_to('cookbooks')}"
44
44
  log_level :warn
@@ -1,4 +1,4 @@
1
- require 'support/shared/integration/integration_helper'
1
+ require "support/shared/integration/integration_helper"
2
2
 
3
3
  describe "Recipe DSL methods" do
4
4
  include IntegrationSupport
@@ -18,6 +18,7 @@ describe "Recipe DSL methods" do
18
18
  class Chef::Provider::ProviderThingy < Chef::Provider
19
19
  def load_current_resource
20
20
  end
21
+
21
22
  def action_create
22
23
  Chef::Log.warn("hello from #{self.class.name}")
23
24
  end
@@ -26,7 +27,7 @@ describe "Recipe DSL methods" do
26
27
 
27
28
  it "provider_thingy 'blah' runs the provider and warns" do
28
29
  recipe = converge {
29
- provider_thingy 'blah' do; end
30
+ provider_thingy "blah" do; end
30
31
  }
31
32
  expect(recipe.logged_warnings).to match /hello from Chef::Provider::ProviderThingy/
32
33
  expect(recipe.logged_warnings).to match /you must use 'provides' to provide DSL/i
@@ -1,4 +1,4 @@
1
- require 'support/shared/integration/integration_helper'
1
+ require "support/shared/integration/integration_helper"
2
2
 
3
3
  describe "Recipe DSL methods" do
4
4
  include IntegrationSupport
@@ -15,7 +15,7 @@ describe "Recipe DSL methods" do
15
15
  before(:context) {
16
16
 
17
17
  class BaseThingy < Chef::Resource
18
- resource_name 'base_thingy'
18
+ resource_name "base_thingy"
19
19
  default_action :create
20
20
 
21
21
  class<<self
@@ -30,6 +30,7 @@ describe "Recipe DSL methods" do
30
30
  class Provider < Chef::Provider
31
31
  def load_current_resource
32
32
  end
33
+
33
34
  def action_create
34
35
  BaseThingy.created_name = new_resource.name
35
36
  BaseThingy.created_resource = new_resource.class
@@ -51,27 +52,27 @@ describe "Recipe DSL methods" do
51
52
 
52
53
  it "creates base_thingy when you call base_thingy in a recipe" do
53
54
  recipe = converge {
54
- base_thingy 'blah' do; end
55
+ base_thingy "blah" do; end
55
56
  }
56
- expect(recipe.logged_warnings).to eq ''
57
- expect(BaseThingy.created_name).to eq 'blah'
57
+ expect(recipe.logged_warnings).to eq ""
58
+ expect(BaseThingy.created_name).to eq "blah"
58
59
  expect(BaseThingy.created_resource).to eq BaseThingy
59
60
  end
60
61
 
61
62
  it "errors out when you call base_thingy do ... end in a recipe" do
62
63
  expect_converge {
63
64
  base_thingy do; end
64
- }.to raise_error(ArgumentError, 'You must supply a name when declaring a base_thingy resource')
65
+ }.to raise_error(ArgumentError, "You must supply a name when declaring a base_thingy resource")
65
66
  end
66
67
 
67
68
  it "emits a warning when you call base_thingy 'foo', 'bar' do ... end in a recipe" do
68
69
  Chef::Config[:treat_deprecation_warnings_as_errors] = false
69
70
  recipe = converge {
70
- base_thingy 'foo', 'bar' do
71
+ base_thingy "foo", "bar" do
71
72
  end
72
73
  }
73
74
  expect(recipe.logged_warnings).to match(/Cannot create resource base_thingy with more than one argument. All arguments except the name \("foo"\) will be ignored. This will cause an error in Chef 13. Arguments: \["foo", "bar"\]/)
74
- expect(BaseThingy.created_name).to eq 'foo'
75
+ expect(BaseThingy.created_name).to eq "foo"
75
76
  expect(BaseThingy.created_resource).to eq BaseThingy
76
77
  end
77
78
 
@@ -89,6 +90,7 @@ describe "Recipe DSL methods" do
89
90
  class Chef::Provider::BackcompatThingy < Chef::Provider
90
91
  def load_current_resource
91
92
  end
93
+
92
94
  def action_create
93
95
  BaseThingy.created_resource = new_resource.class
94
96
  BaseThingy.created_provider = self.class
@@ -99,7 +101,7 @@ describe "Recipe DSL methods" do
99
101
 
100
102
  it "backcompat_thingy creates a Chef::Resource::BackcompatThingy" do
101
103
  recipe = converge {
102
- backcompat_thingy 'blah' do; end
104
+ backcompat_thingy "blah" do; end
103
105
  }
104
106
  expect(BaseThingy.created_resource).to eq Chef::Resource::BackcompatThingy
105
107
  expect(BaseThingy.created_provider).to eq Chef::Provider::BackcompatThingy
@@ -117,7 +119,7 @@ describe "Recipe DSL methods" do
117
119
 
118
120
  it "backcompat_thingy creates a BackcompatThingy" do
119
121
  recipe = converge {
120
- backcompat_thingy 'blah' do; end
122
+ backcompat_thingy "blah" do; end
121
123
  }
122
124
  expect(recipe.logged_warnings).to match(/Class Chef::Provider::BackcompatThingy does not declare 'provides :backcompat_thingy'./)
123
125
  expect(BaseThingy.created_resource).not_to be_nil
@@ -135,7 +137,7 @@ describe "Recipe DSL methods" do
135
137
 
136
138
  it "bar_thingy does not work" do
137
139
  expect_converge {
138
- bar_thingy 'blah' do; end
140
+ bar_thingy "blah" do; end
139
141
  }.to raise_error(NoMethodError)
140
142
  end
141
143
  end
@@ -151,7 +153,7 @@ describe "Recipe DSL methods" do
151
153
 
152
154
  it "no_name_thingy does not work" do
153
155
  expect_converge {
154
- no_name_thingy 'blah' do; end
156
+ no_name_thingy "blah" do; end
155
157
  }.to raise_error(NoMethodError)
156
158
  end
157
159
  end
@@ -167,15 +169,15 @@ describe "Recipe DSL methods" do
167
169
 
168
170
  it "another_no_name_thingy does not work" do
169
171
  expect_converge {
170
- another_no_name_thingy 'blah' do; end
172
+ another_no_name_thingy "blah" do; end
171
173
  }.to raise_error(NoMethodError)
172
174
  end
173
175
 
174
176
  it "another_thingy_name works" do
175
177
  recipe = converge {
176
- another_thingy_name 'blah' do; end
178
+ another_thingy_name "blah" do; end
177
179
  }
178
- expect(recipe.logged_warnings).to eq ''
180
+ expect(recipe.logged_warnings).to eq ""
179
181
  expect(BaseThingy.created_resource).to eq(AnotherNoNameThingy)
180
182
  end
181
183
  end
@@ -192,21 +194,21 @@ describe "Recipe DSL methods" do
192
194
 
193
195
  it "another_no_name_thingy does not work" do
194
196
  expect_converge {
195
- another_no_name_thingy2 'blah' do; end
197
+ another_no_name_thingy2 "blah" do; end
196
198
  }.to raise_error(NoMethodError)
197
199
  end
198
200
 
199
201
  it "another_thingy_name2 does not work" do
200
202
  expect_converge {
201
- another_thingy_name2 'blah' do; end
203
+ another_thingy_name2 "blah" do; end
202
204
  }.to raise_error(NoMethodError)
203
205
  end
204
206
 
205
207
  it "yet_another_thingy_name3 works" do
206
208
  recipe = converge {
207
- another_thingy_name3 'blah' do; end
209
+ another_thingy_name3 "blah" do; end
208
210
  }
209
- expect(recipe.logged_warnings).to eq ''
211
+ expect(recipe.logged_warnings).to eq ""
210
212
  expect(BaseThingy.created_resource).to eq(AnotherNoNameThingy2)
211
213
  end
212
214
  end
@@ -217,7 +219,7 @@ describe "Recipe DSL methods" do
217
219
 
218
220
  class AnotherNoNameThingy3 < BaseThingy
219
221
  resource_name :another_no_name_thingy_3
220
- provides :another_no_name_thingy3, os: 'blarghle'
222
+ provides :another_no_name_thingy3, os: "blarghle"
221
223
  end
222
224
 
223
225
  }
@@ -225,18 +227,18 @@ describe "Recipe DSL methods" do
225
227
  it "and os = linux, another_no_name_thingy3 does not work" do
226
228
  expect_converge {
227
229
  # TODO this is an ugly way to test, make Cheffish expose node attrs
228
- run_context.node.automatic[:os] = 'linux'
229
- another_no_name_thingy3 'blah' do; end
230
+ run_context.node.automatic[:os] = "linux"
231
+ another_no_name_thingy3 "blah" do; end
230
232
  }.to raise_error(Chef::Exceptions::NoSuchResourceType)
231
233
  end
232
234
 
233
235
  it "and os = blarghle, another_no_name_thingy3 works" do
234
236
  recipe = converge {
235
237
  # TODO this is an ugly way to test, make Cheffish expose node attrs
236
- run_context.node.automatic[:os] = 'blarghle'
237
- another_no_name_thingy3 'blah' do; end
238
+ run_context.node.automatic[:os] = "blarghle"
239
+ another_no_name_thingy3 "blah" do; end
238
240
  }
239
- expect(recipe.logged_warnings).to eq ''
241
+ expect(recipe.logged_warnings).to eq ""
240
242
  expect(BaseThingy.created_resource).to eq (AnotherNoNameThingy3)
241
243
  end
242
244
  end
@@ -246,8 +248,8 @@ describe "Recipe DSL methods" do
246
248
 
247
249
  class AnotherNoNameThingy4 < BaseThingy
248
250
  resource_name :another_no_name_thingy_4
249
- provides :another_no_name_thingy4, os: 'blarghle'
250
- provides :another_no_name_thingy4, platform_family: 'foo'
251
+ provides :another_no_name_thingy4, os: "blarghle"
252
+ provides :another_no_name_thingy4, platform_family: "foo"
251
253
  end
252
254
 
253
255
  }
@@ -255,28 +257,28 @@ describe "Recipe DSL methods" do
255
257
  it "and os = linux, another_no_name_thingy4 does not work" do
256
258
  expect_converge {
257
259
  # TODO this is an ugly way to test, make Cheffish expose node attrs
258
- run_context.node.automatic[:os] = 'linux'
259
- another_no_name_thingy4 'blah' do; end
260
+ run_context.node.automatic[:os] = "linux"
261
+ another_no_name_thingy4 "blah" do; end
260
262
  }.to raise_error(Chef::Exceptions::NoSuchResourceType)
261
263
  end
262
264
 
263
265
  it "and os = blarghle, another_no_name_thingy4 works" do
264
266
  recipe = converge {
265
267
  # TODO this is an ugly way to test, make Cheffish expose node attrs
266
- run_context.node.automatic[:os] = 'blarghle'
267
- another_no_name_thingy4 'blah' do; end
268
+ run_context.node.automatic[:os] = "blarghle"
269
+ another_no_name_thingy4 "blah" do; end
268
270
  }
269
- expect(recipe.logged_warnings).to eq ''
271
+ expect(recipe.logged_warnings).to eq ""
270
272
  expect(BaseThingy.created_resource).to eq (AnotherNoNameThingy4)
271
273
  end
272
274
 
273
275
  it "and platform_family = foo, another_no_name_thingy4 works" do
274
276
  recipe = converge {
275
277
  # TODO this is an ugly way to test, make Cheffish expose node attrs
276
- run_context.node.automatic[:platform_family] = 'foo'
277
- another_no_name_thingy4 'blah' do; end
278
+ run_context.node.automatic[:platform_family] = "foo"
279
+ another_no_name_thingy4 "blah" do; end
278
280
  }
279
- expect(recipe.logged_warnings).to eq ''
281
+ expect(recipe.logged_warnings).to eq ""
280
282
  expect(BaseThingy.created_resource).to eq (AnotherNoNameThingy4)
281
283
  end
282
284
  end
@@ -286,7 +288,7 @@ describe "Recipe DSL methods" do
286
288
 
287
289
  class AnotherNoNameThingy5 < BaseThingy
288
290
  resource_name :another_thingy_name_for_another_no_name_thingy5
289
- provides :another_no_name_thingy5, os: 'blarghle'
291
+ provides :another_no_name_thingy5, os: "blarghle"
290
292
  end
291
293
 
292
294
  }
@@ -294,26 +296,26 @@ describe "Recipe DSL methods" do
294
296
  it "and os = linux, another_no_name_thingy5 does not work" do
295
297
  expect_converge {
296
298
  # this is an ugly way to test, make Cheffish expose node attrs
297
- run_context.node.automatic[:os] = 'linux'
298
- another_no_name_thingy5 'blah' do; end
299
+ run_context.node.automatic[:os] = "linux"
300
+ another_no_name_thingy5 "blah" do; end
299
301
  }.to raise_error(Chef::Exceptions::NoSuchResourceType)
300
302
  end
301
303
 
302
304
  it "and os = blarghle, another_no_name_thingy5 works" do
303
305
  recipe = converge {
304
306
  # this is an ugly way to test, make Cheffish expose node attrs
305
- run_context.node.automatic[:os] = 'blarghle'
306
- another_no_name_thingy5 'blah' do; end
307
+ run_context.node.automatic[:os] = "blarghle"
308
+ another_no_name_thingy5 "blah" do; end
307
309
  }
308
- expect(recipe.logged_warnings).to eq ''
310
+ expect(recipe.logged_warnings).to eq ""
309
311
  expect(BaseThingy.created_resource).to eq (AnotherNoNameThingy5)
310
312
  end
311
313
 
312
314
  it "the new resource name can be used in a recipe" do
313
315
  recipe = converge {
314
- another_thingy_name_for_another_no_name_thingy5 'blah' do; end
316
+ another_thingy_name_for_another_no_name_thingy5 "blah" do; end
315
317
  }
316
- expect(recipe.logged_warnings).to eq ''
318
+ expect(recipe.logged_warnings).to eq ""
317
319
  expect(BaseThingy.created_resource).to eq (AnotherNoNameThingy5)
318
320
  end
319
321
  end
@@ -322,7 +324,7 @@ describe "Recipe DSL methods" do
322
324
  before(:context) {
323
325
 
324
326
  class AnotherNoNameThingy6 < BaseThingy
325
- provides :another_no_name_thingy6, os: 'blarghle'
327
+ provides :another_no_name_thingy6, os: "blarghle"
326
328
  resource_name :another_thingy_name_for_another_no_name_thingy6
327
329
  end
328
330
 
@@ -331,26 +333,26 @@ describe "Recipe DSL methods" do
331
333
  it "and os = linux, another_no_name_thingy6 does not work" do
332
334
  expect_converge {
333
335
  # this is an ugly way to test, make Cheffish expose node attrs
334
- run_context.node.automatic[:os] = 'linux'
335
- another_no_name_thingy6 'blah' do; end
336
+ run_context.node.automatic[:os] = "linux"
337
+ another_no_name_thingy6 "blah" do; end
336
338
  }.to raise_error(Chef::Exceptions::NoSuchResourceType)
337
339
  end
338
340
 
339
341
  it "and os = blarghle, another_no_name_thingy6 works" do
340
342
  recipe = converge {
341
343
  # this is an ugly way to test, make Cheffish expose node attrs
342
- run_context.node.automatic[:os] = 'blarghle'
343
- another_no_name_thingy6 'blah' do; end
344
+ run_context.node.automatic[:os] = "blarghle"
345
+ another_no_name_thingy6 "blah" do; end
344
346
  }
345
- expect(recipe.logged_warnings).to eq ''
347
+ expect(recipe.logged_warnings).to eq ""
346
348
  expect(BaseThingy.created_resource).to eq (AnotherNoNameThingy6)
347
349
  end
348
350
 
349
351
  it "the new resource name can be used in a recipe" do
350
352
  recipe = converge {
351
- another_thingy_name_for_another_no_name_thingy6 'blah' do; end
353
+ another_thingy_name_for_another_no_name_thingy6 "blah" do; end
352
354
  }
353
- expect(recipe.logged_warnings).to eq ''
355
+ expect(recipe.logged_warnings).to eq ""
354
356
  expect(BaseThingy.created_resource).to eq (AnotherNoNameThingy6)
355
357
  end
356
358
  end
@@ -360,7 +362,7 @@ describe "Recipe DSL methods" do
360
362
 
361
363
  class AnotherNoNameThingy7 < BaseThingy
362
364
  resource_name :another_thingy_name_for_another_no_name_thingy7
363
- provides :another_thingy_name_for_another_no_name_thingy7, os: 'blarghle'
365
+ provides :another_thingy_name_for_another_no_name_thingy7, os: "blarghle"
364
366
  end
365
367
 
366
368
  }
@@ -368,26 +370,26 @@ describe "Recipe DSL methods" do
368
370
  it "and os = linux, another_thingy_name_for_another_no_name_thingy7 does not work" do
369
371
  expect_converge {
370
372
  # this is an ugly way to test, make Cheffish expose node attrs
371
- run_context.node.automatic[:os] = 'linux'
372
- another_thingy_name_for_another_no_name_thingy7 'blah' do; end
373
+ run_context.node.automatic[:os] = "linux"
374
+ another_thingy_name_for_another_no_name_thingy7 "blah" do; end
373
375
  }.to raise_error(Chef::Exceptions::NoSuchResourceType)
374
376
  end
375
377
 
376
378
  it "and os = blarghle, another_thingy_name_for_another_no_name_thingy7 works" do
377
379
  recipe = converge {
378
380
  # this is an ugly way to test, make Cheffish expose node attrs
379
- run_context.node.automatic[:os] = 'blarghle'
380
- another_thingy_name_for_another_no_name_thingy7 'blah' do; end
381
+ run_context.node.automatic[:os] = "blarghle"
382
+ another_thingy_name_for_another_no_name_thingy7 "blah" do; end
381
383
  }
382
- expect(recipe.logged_warnings).to eq ''
384
+ expect(recipe.logged_warnings).to eq ""
383
385
  expect(BaseThingy.created_resource).to eq (AnotherNoNameThingy7)
384
386
  end
385
387
 
386
388
  it "the old resource name does not work" do
387
389
  expect_converge {
388
390
  # this is an ugly way to test, make Cheffish expose node attrs
389
- run_context.node.automatic[:os] = 'linux'
390
- another_no_name_thingy_7 'blah' do; end
391
+ run_context.node.automatic[:os] = "linux"
392
+ another_no_name_thingy_7 "blah" do; end
391
393
  }.to raise_error(NoMethodError)
392
394
  end
393
395
  end
@@ -397,7 +399,7 @@ describe "Recipe DSL methods" do
397
399
  before(:context) {
398
400
 
399
401
  class AnotherNoNameThingy8 < BaseThingy
400
- provides :another_thingy_name_for_another_no_name_thingy8, os: 'blarghle'
402
+ provides :another_thingy_name_for_another_no_name_thingy8, os: "blarghle"
401
403
  resource_name :another_thingy_name_for_another_no_name_thingy8
402
404
  end
403
405
 
@@ -406,26 +408,26 @@ describe "Recipe DSL methods" do
406
408
  it "and os = linux, another_thingy_name_for_another_no_name_thingy8 does not work" do
407
409
  expect_converge {
408
410
  # this is an ugly way to test, make Cheffish expose node attrs
409
- run_context.node.automatic[:os] = 'linux'
410
- another_thingy_name_for_another_no_name_thingy8 'blah' do; end
411
+ run_context.node.automatic[:os] = "linux"
412
+ another_thingy_name_for_another_no_name_thingy8 "blah" do; end
411
413
  }.to raise_error(Chef::Exceptions::NoSuchResourceType)
412
414
  end
413
415
 
414
416
  it "and os = blarghle, another_thingy_name_for_another_no_name_thingy8 works" do
415
417
  recipe = converge {
416
418
  # this is an ugly way to test, make Cheffish expose node attrs
417
- run_context.node.automatic[:os] = 'blarghle'
418
- another_thingy_name_for_another_no_name_thingy8 'blah' do; end
419
+ run_context.node.automatic[:os] = "blarghle"
420
+ another_thingy_name_for_another_no_name_thingy8 "blah" do; end
419
421
  }
420
- expect(recipe.logged_warnings).to eq ''
422
+ expect(recipe.logged_warnings).to eq ""
421
423
  expect(BaseThingy.created_resource).to eq (AnotherNoNameThingy8)
422
424
  end
423
425
 
424
426
  it "the old resource name does not work" do
425
427
  expect_converge {
426
428
  # this is an ugly way to test, make Cheffish expose node attrs
427
- run_context.node.automatic[:os] = 'linux'
428
- another_thingy_name8 'blah' do; end
429
+ run_context.node.automatic[:os] = "linux"
430
+ another_thingy_name8 "blah" do; end
429
431
  }.to raise_error(NoMethodError)
430
432
  end
431
433
  end
@@ -444,13 +446,13 @@ describe "Recipe DSL methods" do
444
446
 
445
447
  it "my_supplier does not work in a recipe" do
446
448
  expect_converge {
447
- my_supplier 'blah' do; end
449
+ my_supplier "blah" do; end
448
450
  }.to raise_error(NoMethodError)
449
451
  end
450
452
 
451
453
  it "hemlock works in a recipe" do
452
454
  expect_recipe {
453
- hemlock 'blah' do; end
455
+ hemlock "blah" do; end
454
456
  }.to emit_no_warnings_or_errors
455
457
  expect(BaseThingy.created_resource).to eq RecipeDSLSpecNamespace::MySupplier
456
458
  end
@@ -467,7 +469,7 @@ describe "Recipe DSL methods" do
467
469
 
468
470
  it "thingy3 works in a recipe" do
469
471
  expect_recipe {
470
- thingy3 'blah' do; end
472
+ thingy3 "blah" do; end
471
473
  }.to emit_no_warnings_or_errors
472
474
  expect(BaseThingy.created_resource).to eq RecipeDSLSpecNamespace::Thingy3
473
475
  end
@@ -483,14 +485,14 @@ describe "Recipe DSL methods" do
483
485
 
484
486
  it "thingy3 works in a recipe and yields Thingy3 (the alphabetical one)" do
485
487
  recipe = converge {
486
- thingy3 'blah' do; end
488
+ thingy3 "blah" do; end
487
489
  }
488
490
  expect(BaseThingy.created_resource).to eq RecipeDSLSpecNamespace::Thingy3
489
491
  end
490
492
 
491
493
  it "thingy4 does not work in a recipe" do
492
494
  expect_converge {
493
- thingy4 'blah' do; end
495
+ thingy4 "blah" do; end
494
496
  }.to raise_error(NoMethodError)
495
497
  end
496
498
 
@@ -514,7 +516,7 @@ describe "Recipe DSL methods" do
514
516
 
515
517
  it "thingy5 works in a recipe" do
516
518
  expect_recipe {
517
- thingy5 'blah' do; end
519
+ thingy5 "blah" do; end
518
520
  }.to emit_no_warnings_or_errors
519
521
  expect(BaseThingy.created_resource).to eq RecipeDSLSpecNamespace::Thingy5
520
522
  end
@@ -531,14 +533,14 @@ describe "Recipe DSL methods" do
531
533
 
532
534
  it "thingy6 works in a recipe and yields Thingy6" do
533
535
  recipe = converge {
534
- thingy6 'blah' do; end
536
+ thingy6 "blah" do; end
535
537
  }
536
538
  expect(BaseThingy.created_resource).to eq RecipeDSLSpecNamespace::Thingy6
537
539
  end
538
540
 
539
541
  it "thingy5 works in a recipe and yields Foo::Thingy5 (the alphabetical one)" do
540
542
  recipe = converge {
541
- thingy5 'blah' do; end
543
+ thingy5 "blah" do; end
542
544
  }
543
545
  expect(BaseThingy.created_resource).to eq RecipeDSLSpecNamespace::Thingy5
544
546
  end
@@ -558,7 +560,7 @@ describe "Recipe DSL methods" do
558
560
 
559
561
  it "thingy5reverse works in a recipe and yields AThingy5 (the alphabetical one)" do
560
562
  recipe = converge {
561
- thingy5reverse 'blah' do; end
563
+ thingy5reverse "blah" do; end
562
564
  }
563
565
  expect(BaseThingy.created_resource).to eq RecipeDSLSpecNamespace::AThingy5
564
566
  end
@@ -577,7 +579,7 @@ describe "Recipe DSL methods" do
577
579
 
578
580
  it "thingy5_2 works in a recipe and yields the RecipeDSLSpaceNamespace one (the alphabetical one)" do
579
581
  recipe = converge {
580
- thingy5_2 'blah' do; end
582
+ thingy5_2 "blah" do; end
581
583
  }
582
584
  expect(BaseThingy.created_resource).to eq RecipeDSLSpecNamespace::Thingy5
583
585
  end
@@ -596,7 +598,7 @@ describe "Recipe DSL methods" do
596
598
 
597
599
  it "thingy5_2reverse works in a recipe and yields the ARecipeDSLSpaceNamespace one (the alphabetical one)" do
598
600
  recipe = converge {
599
- thingy5_2reverse 'blah' do; end
601
+ thingy5_2reverse "blah" do; end
600
602
  }
601
603
  expect(BaseThingy.created_resource).to eq ARecipeDSLSpecNamespace::Thingy5
602
604
  end
@@ -614,7 +616,7 @@ describe "Recipe DSL methods" do
614
616
 
615
617
  it "thingy3 works in a recipe" do
616
618
  expect_recipe {
617
- thingy3 'blah' do; end
619
+ thingy3 "blah" do; end
618
620
  }.to emit_no_warnings_or_errors
619
621
  expect(BaseThingy.created_resource).to eq RecipeDSLSpecNamespace::Thingy3
620
622
  end
@@ -630,14 +632,14 @@ describe "Recipe DSL methods" do
630
632
 
631
633
  it "thingy3 works in a recipe and yields Thingy3 (the alphabetical one)" do
632
634
  recipe = converge {
633
- thingy3 'blah' do; end
635
+ thingy3 "blah" do; end
634
636
  }
635
637
  expect(BaseThingy.created_resource).to eq RecipeDSLSpecNamespace::Thingy3
636
638
  end
637
639
 
638
640
  it "thingy4 does not work in a recipe" do
639
641
  expect_converge {
640
- thingy4 'blah' do; end
642
+ thingy4 "blah" do; end
641
643
  }.to raise_error(NoMethodError)
642
644
  end
643
645
 
@@ -657,14 +659,14 @@ describe "Recipe DSL methods" do
657
659
 
658
660
  it "thingy3 works in a recipe and yields Thingy3 (the alphabetical one)" do
659
661
  recipe = converge {
660
- thingy3 'blah' do; end
662
+ thingy3 "blah" do; end
661
663
  }
662
664
  expect(BaseThingy.created_resource).to eq RecipeDSLSpecNamespace::Thingy3
663
665
  end
664
666
 
665
667
  it "thingy4 does not work in a recipe" do
666
668
  expect_converge {
667
- thingy4 'blah' do; end
669
+ thingy4 "blah" do; end
668
670
  }.to raise_error(NoMethodError)
669
671
  end
670
672
 
@@ -697,14 +699,14 @@ describe "Recipe DSL methods" do
697
699
 
698
700
  it "thingy7 works in a recipe and yields Thingy7" do
699
701
  recipe = converge {
700
- thingy7 'blah' do; end
702
+ thingy7 "blah" do; end
701
703
  }
702
704
  expect(BaseThingy.created_resource).to eq RecipeDSLSpecNamespace::Thingy7
703
705
  end
704
706
 
705
707
  it "thingy8 works in a recipe and yields Thingy7 (alphabetical)" do
706
708
  recipe = converge {
707
- thingy8 'blah' do; end
709
+ thingy8 "blah" do; end
708
710
  }
709
711
  expect(BaseThingy.created_resource).to eq RecipeDSLSpecNamespace::Thingy7
710
712
  end
@@ -728,21 +730,21 @@ describe "Recipe DSL methods" do
728
730
 
729
731
  it "thingy12 works in a recipe and yields Thingy12" do
730
732
  expect_recipe {
731
- thingy12 'blah' do; end
733
+ thingy12 "blah" do; end
732
734
  }.to emit_no_warnings_or_errors
733
735
  expect(BaseThingy.created_resource).to eq RecipeDSLSpecNamespace::Thingy12
734
736
  end
735
737
 
736
738
  it "twizzle works in a recipe and yields Thingy12" do
737
739
  expect_recipe {
738
- twizzle 'blah' do; end
740
+ twizzle "blah" do; end
739
741
  }.to emit_no_warnings_or_errors
740
742
  expect(BaseThingy.created_resource).to eq RecipeDSLSpecNamespace::Thingy12
741
743
  end
742
744
 
743
745
  it "twizzle2 works in a recipe and yields Thingy12" do
744
746
  expect_recipe {
745
- twizzle2 'blah' do; end
747
+ twizzle2 "blah" do; end
746
748
  }.to emit_no_warnings_or_errors
747
749
  expect(BaseThingy.created_resource).to eq RecipeDSLSpecNamespace::Thingy12
748
750
  end
@@ -752,20 +754,20 @@ describe "Recipe DSL methods" do
752
754
  before(:context) {
753
755
  class MySuperThingyFoo < BaseThingy
754
756
  resource_name :my_super_thingy_foo
755
- provides :my_super_thingy, platform: 'foo'
757
+ provides :my_super_thingy, platform: "foo"
756
758
  end
757
759
 
758
760
  class MySuperThingyBar < BaseThingy
759
761
  resource_name :my_super_thingy_bar
760
- provides :my_super_thingy, platform: 'bar'
762
+ provides :my_super_thingy, platform: "bar"
761
763
  end
762
764
  }
763
765
 
764
766
  it "A run with platform 'foo' uses MySuperThingyFoo" do
765
767
  r = Cheffish::ChefRun.new(chef_config)
766
- r.client.run_context.node.automatic['platform'] = 'foo'
768
+ r.client.run_context.node.automatic["platform"] = "foo"
767
769
  r.compile_recipe {
768
- my_super_thingy 'blah' do; end
770
+ my_super_thingy "blah" do; end
769
771
  }
770
772
  r.converge
771
773
  expect(r).to emit_no_warnings_or_errors
@@ -774,9 +776,9 @@ describe "Recipe DSL methods" do
774
776
 
775
777
  it "A run with platform 'bar' uses MySuperThingyBar" do
776
778
  r = Cheffish::ChefRun.new(chef_config)
777
- r.client.run_context.node.automatic['platform'] = 'bar'
779
+ r.client.run_context.node.automatic["platform"] = "bar"
778
780
  r.compile_recipe {
779
- my_super_thingy 'blah' do; end
781
+ my_super_thingy "blah" do; end
780
782
  }
781
783
  r.converge
782
784
  expect(r).to emit_no_warnings_or_errors
@@ -785,10 +787,10 @@ describe "Recipe DSL methods" do
785
787
 
786
788
  it "A run with platform 'x' reports that my_super_thingy is not supported" do
787
789
  r = Cheffish::ChefRun.new(chef_config)
788
- r.client.run_context.node.automatic['platform'] = 'x'
790
+ r.client.run_context.node.automatic["platform"] = "x"
789
791
  expect {
790
792
  r.compile_recipe {
791
- my_super_thingy 'blah' do; end
793
+ my_super_thingy "blah" do; end
792
794
  }
793
795
  }.to raise_error(Chef::Exceptions::NoSuchResourceType)
794
796
  end
@@ -819,7 +821,7 @@ describe "Recipe DSL methods" do
819
821
  it "declaring a resource providing the same :thingy11 with os: 'linux' does not produce a warning" do
820
822
  expect(Chef::Log).not_to receive(:warn)
821
823
  class RecipeDSLSpecNamespace::Thingy11AlternateProvider < BaseThingy
822
- provides :thingy11, os: 'linux'
824
+ provides :thingy11, os: "linux"
823
825
  end
824
826
  end
825
827
  end
@@ -832,7 +834,9 @@ describe "Recipe DSL methods" do
832
834
  def self.name
833
835
  "B"
834
836
  end
837
+
835
838
  def self.to_s; name; end
839
+
836
840
  def self.inspect; name.inspect; end
837
841
  end
838
842
  result.resource_name two_classes_one_dsl
@@ -846,7 +850,9 @@ describe "Recipe DSL methods" do
846
850
  def self.name
847
851
  "A"
848
852
  end
853
+
849
854
  def self.to_s; name; end
855
+
850
856
  def self.inspect; name.inspect; end
851
857
  end
852
858
  result.resource_name two_classes_one_dsl
@@ -859,7 +865,7 @@ describe "Recipe DSL methods" do
859
865
  recipe = converge {
860
866
  instance_eval("#{two_classes_one_dsl} 'blah'")
861
867
  }
862
- expect(recipe.logged_warnings).to eq ''
868
+ expect(recipe.logged_warnings).to eq ""
863
869
  expect(BaseThingy.created_resource).to eq resource_class_a
864
870
  end
865
871
 
@@ -874,7 +880,9 @@ describe "Recipe DSL methods" do
874
880
  def self.name
875
881
  "Z"
876
882
  end
883
+
877
884
  def self.to_s; name; end
885
+
878
886
  def self.inspect; name.inspect; end
879
887
  end
880
888
  result.resource_name two_classes_one_dsl
@@ -887,7 +895,7 @@ describe "Recipe DSL methods" do
887
895
  recipe = converge {
888
896
  instance_eval("#{two_classes_one_dsl} 'blah'")
889
897
  }
890
- expect(recipe.logged_warnings).to eq ''
898
+ expect(recipe.logged_warnings).to eq ""
891
899
  expect(BaseThingy.created_resource).to eq resource_class
892
900
  end
893
901
 
@@ -905,7 +913,7 @@ describe "Recipe DSL methods" do
905
913
  recipe = converge {
906
914
  instance_eval("#{two_classes_one_dsl} 'blah'")
907
915
  }
908
- expect(recipe.logged_warnings).to eq ''
916
+ expect(recipe.logged_warnings).to eq ""
909
917
  expect(BaseThingy.created_resource).to eq resource_class_z
910
918
  end
911
919
 
@@ -923,7 +931,7 @@ describe "Recipe DSL methods" do
923
931
  recipe = converge {
924
932
  instance_eval("#{two_classes_one_dsl} 'blah'")
925
933
  }
926
- expect(recipe.logged_warnings).to eq ''
934
+ expect(recipe.logged_warnings).to eq ""
927
935
  expect(BaseThingy.created_resource).to eq resource_class
928
936
  end
929
937
 
@@ -944,7 +952,7 @@ describe "Recipe DSL methods" do
944
952
  recipe = converge {
945
953
  instance_eval("#{two_classes_one_dsl} 'blah'")
946
954
  }
947
- expect(recipe.logged_warnings).to eq ''
955
+ expect(recipe.logged_warnings).to eq ""
948
956
  expect(BaseThingy.created_resource).to eq resource_class_z
949
957
  end
950
958
 
@@ -962,7 +970,7 @@ describe "Recipe DSL methods" do
962
970
  recipe = converge {
963
971
  instance_eval("#{two_classes_one_dsl} 'blah'")
964
972
  }
965
- expect(recipe.logged_warnings).to eq ''
973
+ expect(recipe.logged_warnings).to eq ""
966
974
  expect(BaseThingy.created_resource).to eq resource_class
967
975
  end
968
976
 
@@ -987,7 +995,7 @@ describe "Recipe DSL methods" do
987
995
  recipe = converge {
988
996
  instance_eval("#{two_classes_one_dsl} 'blah'")
989
997
  }
990
- expect(recipe.logged_warnings).to eq ''
998
+ expect(recipe.logged_warnings).to eq ""
991
999
  expect(BaseThingy.created_resource).to eq resource_class
992
1000
  end
993
1001
 
@@ -1009,7 +1017,9 @@ describe "Recipe DSL methods" do
1009
1017
  def self.name
1010
1018
  "B"
1011
1019
  end
1020
+
1012
1021
  def self.to_s; name; end
1022
+
1013
1023
  def self.inspect; name.inspect; end
1014
1024
  end
1015
1025
  result.provides two_classes_one_dsl
@@ -1023,7 +1033,9 @@ describe "Recipe DSL methods" do
1023
1033
  def self.name
1024
1034
  "A"
1025
1035
  end
1036
+
1026
1037
  def self.to_s; name; end
1038
+
1027
1039
  def self.inspect; name.inspect; end
1028
1040
  end
1029
1041
  result
@@ -1036,7 +1048,7 @@ describe "Recipe DSL methods" do
1036
1048
  recipe = converge {
1037
1049
  instance_eval("#{two_classes_one_dsl} 'blah'")
1038
1050
  }
1039
- expect(recipe.logged_warnings).to eq ''
1051
+ expect(recipe.logged_warnings).to eq ""
1040
1052
  expect(BaseThingy.created_provider).to eq provider_class_a
1041
1053
  end
1042
1054
  end
@@ -1048,7 +1060,7 @@ describe "Recipe DSL methods" do
1048
1060
  recipe = converge {
1049
1061
  instance_eval("#{two_classes_one_dsl} 'blah'")
1050
1062
  }
1051
- expect(recipe.logged_warnings).to eq ''
1063
+ expect(recipe.logged_warnings).to eq ""
1052
1064
  expect(BaseThingy.created_provider).to eq provider_class
1053
1065
  end
1054
1066
  end
@@ -1060,7 +1072,9 @@ describe "Recipe DSL methods" do
1060
1072
  def self.name
1061
1073
  "Z"
1062
1074
  end
1075
+
1063
1076
  def self.to_s; name; end
1077
+
1064
1078
  def self.inspect; name.inspect; end
1065
1079
  end
1066
1080
  result
@@ -1075,7 +1089,7 @@ describe "Recipe DSL methods" do
1075
1089
  recipe = converge {
1076
1090
  instance_eval("#{two_classes_one_dsl} 'blah'")
1077
1091
  }
1078
- expect(recipe.logged_warnings).to eq ''
1092
+ expect(recipe.logged_warnings).to eq ""
1079
1093
  expect(BaseThingy.created_provider).to eq provider_class
1080
1094
  end
1081
1095
 
@@ -1087,7 +1101,7 @@ describe "Recipe DSL methods" do
1087
1101
  recipe = converge {
1088
1102
  instance_eval("#{two_classes_one_dsl} 'blah'")
1089
1103
  }
1090
- expect(recipe.logged_warnings).to eq ''
1104
+ expect(recipe.logged_warnings).to eq ""
1091
1105
  expect(BaseThingy.created_provider).to eq provider_class_z
1092
1106
  end
1093
1107
  end
@@ -1104,7 +1118,7 @@ describe "Recipe DSL methods" do
1104
1118
  recipe = converge {
1105
1119
  instance_eval("#{two_classes_one_dsl} 'blah'")
1106
1120
  }
1107
- expect(recipe.logged_warnings).to eq ''
1121
+ expect(recipe.logged_warnings).to eq ""
1108
1122
  expect(BaseThingy.created_provider).to eq provider_class
1109
1123
  end
1110
1124
  end
@@ -1118,7 +1132,7 @@ describe "Recipe DSL methods" do
1118
1132
  recipe = converge {
1119
1133
  instance_eval("#{two_classes_one_dsl} 'blah'")
1120
1134
  }
1121
- expect(recipe.logged_warnings).to eq ''
1135
+ expect(recipe.logged_warnings).to eq ""
1122
1136
  expect(BaseThingy.created_provider).to eq provider_class
1123
1137
  end
1124
1138
  end
@@ -1132,11 +1146,13 @@ describe "Recipe DSL methods" do
1132
1146
  def self.name
1133
1147
  "Blarghle"
1134
1148
  end
1149
+
1135
1150
  def self.to_s; name; end
1151
+
1136
1152
  def self.inspect; name.inspect; end
1137
1153
  end
1138
1154
  result.resource_name two_classes_one_dsl
1139
- result.provides two_classes_one_dsl, os: 'blarghle'
1155
+ result.provides two_classes_one_dsl, os: "blarghle"
1140
1156
  result
1141
1157
  }
1142
1158
  before { resource_class_blarghle } # pull on it so it gets defined before the recipe runs
@@ -1145,10 +1161,10 @@ describe "Recipe DSL methods" do
1145
1161
  two_classes_one_dsl = self.two_classes_one_dsl
1146
1162
  recipe = converge {
1147
1163
  # this is an ugly way to test, make Cheffish expose node attrs
1148
- run_context.node.automatic[:os] = 'blarghle'
1164
+ run_context.node.automatic[:os] = "blarghle"
1149
1165
  instance_eval("#{two_classes_one_dsl} 'blah' do; end")
1150
1166
  }
1151
- expect(recipe.logged_warnings).to eq ''
1167
+ expect(recipe.logged_warnings).to eq ""
1152
1168
  expect(BaseThingy.created_resource).to eq resource_class_blarghle
1153
1169
  end
1154
1170
 
@@ -1156,10 +1172,10 @@ describe "Recipe DSL methods" do
1156
1172
  two_classes_one_dsl = self.two_classes_one_dsl
1157
1173
  recipe = converge {
1158
1174
  # this is an ugly way to test, make Cheffish expose node attrs
1159
- run_context.node.automatic[:os] = 'linux'
1175
+ run_context.node.automatic[:os] = "linux"
1160
1176
  instance_eval("#{two_classes_one_dsl} 'blah' do; end")
1161
1177
  }
1162
- expect(recipe.logged_warnings).to eq ''
1178
+ expect(recipe.logged_warnings).to eq ""
1163
1179
  expect(BaseThingy.created_resource).to eq resource_class
1164
1180
  end
1165
1181
  end
@@ -1170,6 +1186,7 @@ describe "Recipe DSL methods" do
1170
1186
  def self.called_provides
1171
1187
  @called_provides
1172
1188
  end
1189
+
1173
1190
  def to_s
1174
1191
  "MyResource"
1175
1192
  end
@@ -1196,7 +1213,7 @@ describe "Recipe DSL methods" do
1196
1213
  recipe = converge {
1197
1214
  instance_eval("#{dsl_name} 'foo'")
1198
1215
  }
1199
- expect(recipe.logged_warnings).to eq ''
1216
+ expect(recipe.logged_warnings).to eq ""
1200
1217
  expect(BaseThingy.created_resource).to eq resource_class
1201
1218
  expect(resource_class.called_provides).to be_truthy
1202
1219
  end
@@ -1237,8 +1254,11 @@ describe "Recipe DSL methods" do
1237
1254
  def self.name
1238
1255
  "MyProvider"
1239
1256
  end
1257
+
1240
1258
  def self.to_s; name; end
1259
+
1241
1260
  def self.inspect; name.inspect; end
1261
+
1242
1262
  def self.called_provides
1243
1263
  @called_provides
1244
1264
  end
@@ -1256,7 +1276,7 @@ describe "Recipe DSL methods" do
1256
1276
 
1257
1277
  context "with supports? returning true" do
1258
1278
  before do
1259
- provider_class.define_singleton_method(:supports?) { |resource,action| true }
1279
+ provider_class.define_singleton_method(:supports?) { |resource, action| true }
1260
1280
  end
1261
1281
 
1262
1282
  it "my_resource runs the provider and does not emit a warning" do
@@ -1264,7 +1284,7 @@ describe "Recipe DSL methods" do
1264
1284
  recipe = converge {
1265
1285
  instance_eval("#{my_resource} 'foo'")
1266
1286
  }
1267
- expect(recipe.logged_warnings).to eq ''
1287
+ expect(recipe.logged_warnings).to eq ""
1268
1288
  expect(BaseThingy.created_provider).to eq provider_class
1269
1289
  end
1270
1290
 
@@ -1274,8 +1294,11 @@ describe "Recipe DSL methods" do
1274
1294
  def self.name
1275
1295
  "MyProvider2"
1276
1296
  end
1297
+
1277
1298
  def self.to_s; name; end
1299
+
1278
1300
  def self.inspect; name.inspect; end
1301
+
1279
1302
  def self.called_provides
1280
1303
  @called_provides
1281
1304
  end
@@ -1291,7 +1314,7 @@ describe "Recipe DSL methods" do
1291
1314
  recipe = converge {
1292
1315
  instance_eval("#{my_resource} 'foo'")
1293
1316
  }
1294
- expect(recipe.logged_warnings).to eq ''
1317
+ expect(recipe.logged_warnings).to eq ""
1295
1318
  expect(BaseThingy.created_provider).to eq provider_class
1296
1319
  end
1297
1320
  end
@@ -1299,7 +1322,7 @@ describe "Recipe DSL methods" do
1299
1322
 
1300
1323
  context "with supports? returning false" do
1301
1324
  before do
1302
- provider_class.define_singleton_method(:supports?) { |resource,action| false }
1325
+ provider_class.define_singleton_method(:supports?) { |resource, action| false }
1303
1326
  end
1304
1327
 
1305
1328
  # TODO no warning? ick
@@ -1308,7 +1331,7 @@ describe "Recipe DSL methods" do
1308
1331
  recipe = converge {
1309
1332
  instance_eval("#{my_resource} 'foo'")
1310
1333
  }
1311
- expect(recipe.logged_warnings).to eq ''
1334
+ expect(recipe.logged_warnings).to eq ""
1312
1335
  expect(BaseThingy.created_provider).to eq provider_class
1313
1336
  end
1314
1337
 
@@ -1319,8 +1342,11 @@ describe "Recipe DSL methods" do
1319
1342
  def self.name
1320
1343
  "MyProvider2"
1321
1344
  end
1345
+
1322
1346
  def self.to_s; name; end
1347
+
1323
1348
  def self.inspect; name.inspect; end
1349
+
1324
1350
  def self.called_provides
1325
1351
  @called_provides
1326
1352
  end
@@ -1337,7 +1363,7 @@ describe "Recipe DSL methods" do
1337
1363
  recipe = converge {
1338
1364
  instance_eval("#{my_resource} 'foo'")
1339
1365
  }
1340
- expect(recipe.logged_warnings).to eq ''
1366
+ expect(recipe.logged_warnings).to eq ""
1341
1367
  expect(BaseThingy.created_provider).to eq provider_class2
1342
1368
  end
1343
1369
  end
@@ -1363,7 +1389,7 @@ describe "Recipe DSL methods" do
1363
1389
  recipe = converge {
1364
1390
  instance_eval("#{my_resource} 'foo'")
1365
1391
  }
1366
- expect(recipe.logged_warnings).to eq ''
1392
+ expect(recipe.logged_warnings).to eq ""
1367
1393
  expect(BaseThingy.created_provider).to eq provider_class
1368
1394
  expect(provider_class.called_provides).to be_truthy
1369
1395
  end
@@ -1475,6 +1501,7 @@ describe "Recipe DSL methods" do
1475
1501
  class Chef::Provider::LwResourceWithHwProviderTestCase < Chef::Provider
1476
1502
  def load_current_resource
1477
1503
  end
1504
+
1478
1505
  def action_create
1479
1506
  new_resource.created_provider = self.class
1480
1507
  end
@@ -1484,7 +1511,7 @@ describe "Recipe DSL methods" do
1484
1511
  it "looks up the provider in Chef::Provider converting the resource name from snake case to camel case" do
1485
1512
  resource = nil
1486
1513
  recipe = converge {
1487
- resource = lw_resource_with_hw_provider_test_case 'blah' do; end
1514
+ resource = lw_resource_with_hw_provider_test_case "blah" do; end
1488
1515
  }
1489
1516
  expect(resource.created_provider).to eq(Chef::Provider::LwResourceWithHwProviderTestCase)
1490
1517
  end