vagrant-clone 0.0.1 → 0.0.3

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 (306) hide show
  1. checksums.yaml +4 -4
  2. data/.idea/.rakeTasks +7 -0
  3. data/.idea/inspectionProfiles/Project_Default.xml +6 -0
  4. data/.idea/misc.xml +4 -0
  5. data/.idea/modules.xml +8 -0
  6. data/.idea/runConfigurations/clone.xml +21 -0
  7. data/.idea/runConfigurations/libvirt.xml +21 -0
  8. data/.idea/vagrant-clone.iml +114 -0
  9. data/.idea/vcs.xml +6 -0
  10. data/.idea/workspace.xml +948 -0
  11. data/Gemfile +9 -3
  12. data/Gemfile.lock +123 -37
  13. data/Rakefile +2 -1
  14. data/Vagrantfile +9 -0
  15. data/cookbooks/apt/CHANGELOG.md +321 -0
  16. data/cookbooks/apt/CONTRIBUTING.md +2 -0
  17. data/cookbooks/apt/MAINTAINERS.md +15 -0
  18. data/cookbooks/apt/README.md +250 -0
  19. data/cookbooks/apt/attributes/default.rb +57 -0
  20. data/cookbooks/apt/files/15update-stamp +1 -0
  21. data/cookbooks/apt/files/apt-proxy-v2.conf +50 -0
  22. data/cookbooks/apt/libraries/helpers.rb +49 -0
  23. data/cookbooks/apt/libraries/matchers.rb +16 -0
  24. data/cookbooks/apt/metadata.json +1 -0
  25. data/cookbooks/apt/recipes/cacher-client.rb +52 -0
  26. data/cookbooks/apt/recipes/cacher-ng.rb +39 -0
  27. data/cookbooks/apt/recipes/default.rb +93 -0
  28. data/cookbooks/apt/recipes/unattended-upgrades.rb +47 -0
  29. data/cookbooks/apt/resources/preference.rb +90 -0
  30. data/cookbooks/apt/templates/01proxy.erb +11 -0
  31. data/cookbooks/apt/templates/10dpkg-options.erb +8 -0
  32. data/cookbooks/apt/templates/10recommends.erb +3 -0
  33. data/cookbooks/apt/templates/20auto-upgrades.erb +5 -0
  34. data/cookbooks/apt/templates/50unattended-upgrades.erb +75 -0
  35. data/cookbooks/apt/templates/acng.conf.erb +275 -0
  36. data/cookbooks/apt/templates/unattended-upgrades.seed.erb +1 -0
  37. data/cookbooks/build-essential/.foodcritic +1 -0
  38. data/cookbooks/build-essential/CHANGELOG.md +257 -0
  39. data/cookbooks/build-essential/CONTRIBUTING.md +2 -0
  40. data/cookbooks/build-essential/MAINTAINERS.md +15 -0
  41. data/cookbooks/build-essential/README.md +134 -0
  42. data/cookbooks/build-essential/attributes/default.rb +21 -0
  43. data/cookbooks/build-essential/libraries/matchers.rb +9 -0
  44. data/cookbooks/build-essential/metadata.json +1 -0
  45. data/cookbooks/build-essential/recipes/_windows.rb +53 -0
  46. data/cookbooks/build-essential/recipes/default.rb +24 -0
  47. data/cookbooks/build-essential/resources/build_essential.rb +106 -0
  48. data/cookbooks/build-essential/resources/xcode_command_line_tools.rb +61 -0
  49. data/cookbooks/compat_resource/CHANGELOG.md +53 -0
  50. data/cookbooks/compat_resource/CONTRIBUTING.md +2 -0
  51. data/cookbooks/compat_resource/MAINTAINERS.md +16 -0
  52. data/cookbooks/compat_resource/README.md +60 -0
  53. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/constants.rb +47 -0
  54. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/delayed_evaluator.rb +40 -0
  55. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/dsl/core.rb +73 -0
  56. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/dsl/declare_resource.rb +315 -0
  57. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/dsl/platform_introspection.rb +292 -0
  58. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/dsl/recipe.rb +37 -0
  59. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/dsl/universal.rb +70 -0
  60. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/mixin/lazy_module_include.rb +98 -0
  61. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/mixin/notifying_block.rb +74 -0
  62. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/mixin/params_validate.rb +510 -0
  63. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/mixin/powershell_out.rb +117 -0
  64. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/mixin/properties.rb +328 -0
  65. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/property.rb +713 -0
  66. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/provider/apt_repository.rb +269 -0
  67. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/provider/apt_update.rb +105 -0
  68. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/provider/noop.rb +56 -0
  69. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/provider/support/yum_repo.erb +132 -0
  70. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/provider/systemd_unit.rb +253 -0
  71. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/provider/yum_repository.rb +136 -0
  72. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/provider.rb +164 -0
  73. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/resource/action_class.rb +114 -0
  74. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/resource/apt_repository.rb +65 -0
  75. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/resource/apt_update.rb +52 -0
  76. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/resource/systemd_unit.rb +81 -0
  77. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/resource/yum_repository.rb +97 -0
  78. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/resource.rb +214 -0
  79. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef/chef/resource_builder.rb +174 -0
  80. data/cookbooks/compat_resource/files/lib/chef_compat/copied_from_chef.rb +29 -0
  81. data/cookbooks/compat_resource/files/lib/chef_compat/mixin/properties.rb +8 -0
  82. data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/exceptions.rb +10 -0
  83. data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/log.rb +30 -0
  84. data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/mixin/params_validate.rb +17 -0
  85. data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/node.rb +9 -0
  86. data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/property.rb +15 -0
  87. data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/provider.rb +65 -0
  88. data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/recipe.rb +118 -0
  89. data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/recipe_hook.rb +20 -0
  90. data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/resource/lwrp_base.rb +60 -0
  91. data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/resource.rb +156 -0
  92. data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/resource_builder.rb +167 -0
  93. data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/resource_collection/resource_list.rb +49 -0
  94. data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/resource_collection/resource_set.rb +49 -0
  95. data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/resource_collection.rb +103 -0
  96. data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/run_context.rb +691 -0
  97. data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef/runner.rb +153 -0
  98. data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches/chef.rb +33 -0
  99. data/cookbooks/compat_resource/files/lib/chef_compat/monkeypatches.rb +41 -0
  100. data/cookbooks/compat_resource/files/lib/chef_compat/property.rb +6 -0
  101. data/cookbooks/compat_resource/files/lib/chef_compat/recipe.rb +8 -0
  102. data/cookbooks/compat_resource/files/lib/chef_compat/resource/lwrp_base.rb +44 -0
  103. data/cookbooks/compat_resource/files/lib/chef_compat/resource.rb +56 -0
  104. data/cookbooks/compat_resource/files/lib/chef_upstream_version.rb +3 -0
  105. data/cookbooks/compat_resource/files/lib/compat_resource.rb +35 -0
  106. data/cookbooks/compat_resource/libraries/autoload.rb +31 -0
  107. data/cookbooks/compat_resource/metadata.json +1 -0
  108. data/cookbooks/inifile_chef_gem/CHANGELOG.md +11 -0
  109. data/cookbooks/inifile_chef_gem/README.md +46 -0
  110. data/cookbooks/inifile_chef_gem/metadata.json +51 -0
  111. data/cookbooks/inifile_chef_gem/metadata.rb +11 -0
  112. data/cookbooks/inifile_chef_gem/resources/default.rb +28 -0
  113. data/cookbooks/mariadb/CHANGELOG.md +332 -0
  114. data/cookbooks/mariadb/README.md +225 -0
  115. data/cookbooks/mariadb/attributes/default.rb +199 -0
  116. data/cookbooks/mariadb/libraries/mariadb_conn_helper.rb +53 -0
  117. data/cookbooks/mariadb/libraries/mariadb_helper.rb +216 -0
  118. data/cookbooks/mariadb/libraries/matchers.rb +21 -0
  119. data/cookbooks/mariadb/metadata.json +1 -0
  120. data/cookbooks/mariadb/providers/configuration.rb +39 -0
  121. data/cookbooks/mariadb/recipes/_audit_plugin.rb +63 -0
  122. data/cookbooks/mariadb/recipes/_debian_galera.rb +62 -0
  123. data/cookbooks/mariadb/recipes/_debian_server.rb +78 -0
  124. data/cookbooks/mariadb/recipes/_mariadb_repository.rb +29 -0
  125. data/cookbooks/mariadb/recipes/_redhat_client.rb +27 -0
  126. data/cookbooks/mariadb/recipes/_redhat_galera.rb +55 -0
  127. data/cookbooks/mariadb/recipes/_redhat_server.rb +58 -0
  128. data/cookbooks/mariadb/recipes/client.rb +47 -0
  129. data/cookbooks/mariadb/recipes/config.rb +115 -0
  130. data/cookbooks/mariadb/recipes/default.rb +46 -0
  131. data/cookbooks/mariadb/recipes/devel.rb +41 -0
  132. data/cookbooks/mariadb/recipes/galera.rb +324 -0
  133. data/cookbooks/mariadb/recipes/plugins.rb +3 -0
  134. data/cookbooks/mariadb/recipes/repository.rb +45 -0
  135. data/cookbooks/mariadb/recipes/server.rb +157 -0
  136. data/cookbooks/mariadb/resources/configuration.rb +13 -0
  137. data/cookbooks/mariadb/resources/mysql2_gem.rb +25 -0
  138. data/cookbooks/mariadb/resources/replication.rb +192 -0
  139. data/cookbooks/mariadb/templates/default/conf.d.generic.erb +19 -0
  140. data/cookbooks/mariadb/templates/default/debian.cnf.erb +12 -0
  141. data/cookbooks/mariadb/templates/default/mariadb-server.seed.erb +13 -0
  142. data/cookbooks/mariadb/templates/default/mariadb_grants.erb +42 -0
  143. data/cookbooks/mariadb/templates/default/my.cnf.erb +210 -0
  144. data/cookbooks/mariadb/templates/default/root.cnf.erb +5 -0
  145. data/cookbooks/mingw/.foodcritic +1 -0
  146. data/cookbooks/mingw/CHANGELOG.md +50 -0
  147. data/cookbooks/mingw/CONTRIBUTING.md +2 -0
  148. data/cookbooks/mingw/MAINTAINERS.md +14 -0
  149. data/cookbooks/mingw/README.md +133 -0
  150. data/cookbooks/mingw/files/default/bash.bat +17 -0
  151. data/cookbooks/mingw/files/default/custom-upgrade.sh +23 -0
  152. data/cookbooks/mingw/files/default/custom_prefix.sh +13 -0
  153. data/cookbooks/mingw/files/default/pthread.h +719 -0
  154. data/cookbooks/mingw/files/default/time.h +297 -0
  155. data/cookbooks/mingw/libraries/_helper.rb +38 -0
  156. data/cookbooks/mingw/metadata.json +1 -0
  157. data/cookbooks/mingw/recipes/default.rb +19 -0
  158. data/cookbooks/mingw/resources/get.rb +56 -0
  159. data/cookbooks/mingw/resources/msys2_package.rb +139 -0
  160. data/cookbooks/mingw/resources/tdm_gcc.rb +114 -0
  161. data/cookbooks/ohai/.foodcritic +2 -0
  162. data/cookbooks/ohai/CHANGELOG.md +166 -0
  163. data/cookbooks/ohai/CONTRIBUTING.md +2 -0
  164. data/cookbooks/ohai/MAINTAINERS.md +15 -0
  165. data/cookbooks/ohai/README.md +134 -0
  166. data/cookbooks/ohai/libraries/matchers.rb +41 -0
  167. data/cookbooks/ohai/metadata.json +1 -0
  168. data/cookbooks/ohai/recipes/default.rb +20 -0
  169. data/cookbooks/ohai/resources/hint.rb +55 -0
  170. data/cookbooks/ohai/resources/plugin.rb +117 -0
  171. data/cookbooks/selinux_policy/.gitignore +51 -0
  172. data/cookbooks/selinux_policy/.kitchen.yml +25 -0
  173. data/cookbooks/selinux_policy/.rubocop.yml +2 -0
  174. data/cookbooks/selinux_policy/.travis.yml +26 -0
  175. data/cookbooks/selinux_policy/Berksfile +8 -0
  176. data/cookbooks/selinux_policy/CHANGELOG.md +155 -0
  177. data/cookbooks/selinux_policy/LICENSE +13 -0
  178. data/cookbooks/selinux_policy/README.md +217 -0
  179. data/cookbooks/selinux_policy/Rakefile +68 -0
  180. data/cookbooks/selinux_policy/TESTING.md +2 -0
  181. data/cookbooks/selinux_policy/Thorfile +12 -0
  182. data/cookbooks/selinux_policy/attributes/default.rb +5 -0
  183. data/cookbooks/selinux_policy/chefignore +102 -0
  184. data/cookbooks/selinux_policy/libraries/helper-disabled.rb +29 -0
  185. data/cookbooks/selinux_policy/libraries/matchers.rb +57 -0
  186. data/cookbooks/selinux_policy/metadata.json +58 -0
  187. data/cookbooks/selinux_policy/metadata.rb +20 -0
  188. data/cookbooks/selinux_policy/providers/boolean.rb +28 -0
  189. data/cookbooks/selinux_policy/providers/fcontext.rb +78 -0
  190. data/cookbooks/selinux_policy/providers/module.rb +81 -0
  191. data/cookbooks/selinux_policy/providers/permissive.rb +26 -0
  192. data/cookbooks/selinux_policy/providers/port.rb +58 -0
  193. data/cookbooks/selinux_policy/recipes/default.rb +9 -0
  194. data/cookbooks/selinux_policy/recipes/install.rb +32 -0
  195. data/cookbooks/selinux_policy/resources/boolean.rb +8 -0
  196. data/cookbooks/selinux_policy/resources/fcontext.rb +8 -0
  197. data/cookbooks/selinux_policy/resources/module.rb +21 -0
  198. data/cookbooks/selinux_policy/resources/permissive.rb +6 -0
  199. data/cookbooks/selinux_policy/resources/port.rb +9 -0
  200. data/cookbooks/seven_zip/CHANGELOG.md +30 -0
  201. data/cookbooks/seven_zip/README.md +108 -0
  202. data/cookbooks/seven_zip/attributes/default.rb +31 -0
  203. data/cookbooks/seven_zip/libraries/matchers.rb +33 -0
  204. data/cookbooks/seven_zip/metadata.json +1 -0
  205. data/cookbooks/seven_zip/providers/archive.rb +68 -0
  206. data/cookbooks/seven_zip/recipes/default.rb +41 -0
  207. data/cookbooks/seven_zip/resources/archive.rb +29 -0
  208. data/cookbooks/windows/.foodcritic +2 -0
  209. data/cookbooks/windows/CHANGELOG.md +528 -0
  210. data/cookbooks/windows/CONTRIBUTING.md +2 -0
  211. data/cookbooks/windows/MAINTAINERS.md +21 -0
  212. data/cookbooks/windows/README.md +803 -0
  213. data/cookbooks/windows/attributes/default.rb +21 -0
  214. data/cookbooks/windows/files/dism_features.rb +45 -0
  215. data/cookbooks/windows/libraries/matchers.rb +586 -0
  216. data/cookbooks/windows/libraries/powershell_helper.rb +53 -0
  217. data/cookbooks/windows/libraries/registry_helper.rb +356 -0
  218. data/cookbooks/windows/libraries/version.rb +207 -0
  219. data/cookbooks/windows/libraries/version_helper.rb +79 -0
  220. data/cookbooks/windows/libraries/windows_helper.rb +174 -0
  221. data/cookbooks/windows/libraries/windows_privileged.rb +103 -0
  222. data/cookbooks/windows/libraries/wmi_helper.rb +32 -0
  223. data/cookbooks/windows/metadata.json +1 -0
  224. data/cookbooks/windows/recipes/default.rb +21 -0
  225. data/cookbooks/windows/resources/auto_run.rb +46 -0
  226. data/cookbooks/windows/resources/certificate.rb +166 -0
  227. data/cookbooks/windows/resources/certificate_binding.rb +128 -0
  228. data/cookbooks/windows/resources/feature.rb +82 -0
  229. data/cookbooks/windows/resources/feature_dism.rb +108 -0
  230. data/cookbooks/windows/resources/feature_powershell.rb +70 -0
  231. data/cookbooks/windows/resources/feature_servermanagercmd.rb +76 -0
  232. data/cookbooks/windows/resources/font.rb +80 -0
  233. data/cookbooks/windows/resources/http_acl.rb +110 -0
  234. data/cookbooks/windows/resources/pagefile.rb +152 -0
  235. data/cookbooks/windows/resources/path.rb +54 -0
  236. data/cookbooks/windows/resources/printer.rb +103 -0
  237. data/cookbooks/windows/resources/printer_port.rb +101 -0
  238. data/cookbooks/windows/resources/share.rb +291 -0
  239. data/cookbooks/windows/resources/shortcut.rb +53 -0
  240. data/cookbooks/windows/resources/task.rb +384 -0
  241. data/cookbooks/windows/resources/zipfile.rb +125 -0
  242. data/cookbooks/yum/.foodcritic +1 -0
  243. data/cookbooks/yum/CHANGELOG.md +351 -0
  244. data/cookbooks/yum/CONTRIBUTING.md +2 -0
  245. data/cookbooks/yum/MAINTAINERS.md +16 -0
  246. data/cookbooks/yum/README.md +125 -0
  247. data/cookbooks/yum/attributes/main.rb +103 -0
  248. data/cookbooks/yum/libraries/matchers.rb +9 -0
  249. data/cookbooks/yum/metadata.json +1 -0
  250. data/cookbooks/yum/recipes/default.rb +26 -0
  251. data/cookbooks/yum/recipes/dnf_yum_compat.rb +29 -0
  252. data/cookbooks/yum/resources/globalconfig.rb +119 -0
  253. data/cookbooks/yum/templates/.DS_Store +0 -0
  254. data/cookbooks/yum/templates/main.erb +276 -0
  255. data/cookbooks/yum-epel/CHANGELOG.md +138 -0
  256. data/cookbooks/yum-epel/CONTRIBUTING.md +2 -0
  257. data/cookbooks/yum-epel/MAINTAINERS.md +19 -0
  258. data/cookbooks/yum-epel/README.md +172 -0
  259. data/cookbooks/yum-epel/attributes/default.rb +8 -0
  260. data/cookbooks/yum-epel/attributes/epel-debuginfo.rb +15 -0
  261. data/cookbooks/yum-epel/attributes/epel-source.rb +15 -0
  262. data/cookbooks/yum-epel/attributes/epel-testing-debuginfo.rb +15 -0
  263. data/cookbooks/yum-epel/attributes/epel-testing-source.rb +15 -0
  264. data/cookbooks/yum-epel/attributes/epel-testing.rb +15 -0
  265. data/cookbooks/yum-epel/attributes/epel.rb +21 -0
  266. data/cookbooks/yum-epel/metadata.json +1 -0
  267. data/cookbooks/yum-epel/recipes/default.rb +27 -0
  268. data/cookbooks/yum-scl/.kitchen.dokken.yml +24 -0
  269. data/cookbooks/yum-scl/.kitchen.yml +24 -0
  270. data/cookbooks/yum-scl/.rubocop.yml +6 -0
  271. data/cookbooks/yum-scl/.travis.yml +28 -0
  272. data/cookbooks/yum-scl/Berksfile +3 -0
  273. data/cookbooks/yum-scl/Berksfile.lock +25 -0
  274. data/cookbooks/yum-scl/CHANGELOG.md +11 -0
  275. data/cookbooks/yum-scl/Gemfile +46 -0
  276. data/cookbooks/yum-scl/README.md +76 -0
  277. data/cookbooks/yum-scl/attributes/centos.rb +83 -0
  278. data/cookbooks/yum-scl/attributes/default.rb +15 -0
  279. data/cookbooks/yum-scl/attributes/scientific.rb +1 -0
  280. data/cookbooks/yum-scl/files/default/RPM-GPG-KEY-CentOS-SIG-SCLo +20 -0
  281. data/cookbooks/yum-scl/libraries/yum_scl_helper.rb +33 -0
  282. data/cookbooks/yum-scl/metadata.json +42 -0
  283. data/cookbooks/yum-scl/metadata.rb +12 -0
  284. data/cookbooks/yum-scl/recipes/chef_install.rb +52 -0
  285. data/cookbooks/yum-scl/recipes/default.rb +17 -0
  286. data/cookbooks/yum-scl/recipes/native_install.rb +35 -0
  287. data/lib/vagrant-clone/command/clone.rb +66 -61
  288. data/lib/vagrant-clone/errors.rb +61 -0
  289. data/lib/vagrant-clone/util/clone_manager_base.rb +69 -0
  290. data/lib/vagrant-clone/util/clone_managers/docker.rb +31 -0
  291. data/lib/vagrant-clone/util/clone_managers/libvirt.rb +254 -0
  292. data/lib/vagrant-clone/util/vagrantfile_managers/docker.rb +154 -0
  293. data/lib/vagrant-clone/util/vagrantfile_managers/libvirt.rb +159 -0
  294. data/lib/vagrant-clone/version.rb +2 -2
  295. data/lib/vagrant-clone.rb +6 -6
  296. data/libvirt.txt +7 -0
  297. data/performance_testing.rb +165 -0
  298. data/results.txt +45 -0
  299. data/scripts/create_box.sh +134 -0
  300. data/test.rb +92 -0
  301. data/tools/create_box.sh +130 -0
  302. data/vagrant-clone.gemspec +7 -7
  303. metadata +296 -5
  304. data/lib/vagrant-clone/command/errors.rb +0 -16
  305. data/lib/vagrant-clone/command/provider/docker.rb +0 -13
  306. data/lib/vagrant-clone/utils/vagrantfile_manager.rb +0 -47
@@ -0,0 +1,53 @@
1
+ #
2
+ # Author:: Doug MacEachern <dougm@vmware.com>
3
+ # Cookbook:: windows
4
+ # Resource:: shortcut
5
+ #
6
+ # Copyright:: 2010-2017, VMware, Inc.
7
+ #
8
+ # Licensed under the Apache License, Version 2.0 (the "License");
9
+ # you may not use this file except in compliance with the License.
10
+ # You may obtain a copy of the License at
11
+ #
12
+ # http://www.apache.org/licenses/LICENSE-2.0
13
+ #
14
+ # Unless required by applicable law or agreed to in writing, software
15
+ # distributed under the License is distributed on an "AS IS" BASIS,
16
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
+ # See the License for the specific language governing permissions and
18
+ # limitations under the License.
19
+ #
20
+
21
+ property :name, String
22
+ property :target, String
23
+ property :arguments, String
24
+ property :description, String
25
+ property :cwd, String
26
+ property :iconlocation, String
27
+
28
+ load_current_value do |desired|
29
+ require 'win32ole' if RUBY_PLATFORM =~ /mswin|mingw32|windows/
30
+
31
+ link = WIN32OLE.new('WScript.Shell').CreateShortcut(desired.name)
32
+ name desired.name
33
+ target(link.TargetPath)
34
+ arguments(link.Arguments)
35
+ description(link.Description)
36
+ cwd(link.WorkingDirectory)
37
+ iconlocation(link.IconLocation)
38
+ end
39
+
40
+ action :create do
41
+ converge_if_changed do
42
+ converge_by "creating shortcut #{new_resource.name}" do
43
+ link = WIN32OLE.new('WScript.Shell').CreateShortcut(new_resource.name)
44
+ link.TargetPath = new_resource.target unless new_resource.target.nil?
45
+ link.Arguments = new_resource.arguments unless new_resource.arguments.nil?
46
+ link.Description = new_resource.description unless new_resource.description.nil?
47
+ link.WorkingDirectory = new_resource.cwd unless new_resource.cwd.nil?
48
+ link.IconLocation = new_resource.iconlocation unless new_resource.iconlocation.nil?
49
+ # ignoring: WindowStyle, Hotkey
50
+ link.Save
51
+ end
52
+ end
53
+ end
@@ -0,0 +1,384 @@
1
+ #
2
+ # Author:: Paul Mooring (<paul@chef.io>)
3
+ # Cookbook:: windows
4
+ # Resource:: task
5
+ #
6
+ # Copyright:: 2012-2017, Chef Software, Inc.
7
+ #
8
+ # Licensed under the Apache License, Version 2.0 (the "License");
9
+ # you may not use this file except in compliance with the License.
10
+ # You may obtain a copy of the License at
11
+ #
12
+ # http://www.apache.org/licenses/LICENSE-2.0
13
+ #
14
+ # Unless required by applicable law or agreed to in writing, software
15
+ # distributed under the License is distributed on an "AS IS" BASIS,
16
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
+ # See the License for the specific language governing permissions and
18
+ # limitations under the License.
19
+ #
20
+
21
+ # Passwords can't be loaded for existing tasks, making :modify both confusing
22
+ # and not very useful
23
+
24
+ require 'chef/mixin/shell_out'
25
+ require 'rexml/document'
26
+
27
+ include Chef::Mixin::ShellOut
28
+ include Chef::Mixin::PowershellOut
29
+
30
+ property :task_name, String, name_property: true, regex: [/\A[^\/\:\*\?\<\>\|]+\z/]
31
+ property :command, String
32
+ property :cwd, String
33
+ property :user, String, default: 'SYSTEM'
34
+ property :password, String
35
+ property :run_level, equal_to: [:highest, :limited], default: :limited
36
+ property :force, [true, false], default: false
37
+ property :interactive_enabled, [true, false], default: false
38
+ property :frequency_modifier, [Integer, String], default: 1
39
+ property :frequency, equal_to: [:minute,
40
+ :hourly,
41
+ :daily,
42
+ :weekly,
43
+ :monthly,
44
+ :once,
45
+ :on_logon,
46
+ :onstart,
47
+ :on_idle], default: :hourly
48
+ property :start_day, String
49
+ property :start_time, String
50
+ property :day, [String, Integer]
51
+ property :months, String
52
+ property :idle_time, Integer
53
+ property :exists, [true, false], desired_state: true
54
+ property :status, Symbol, desired_state: true
55
+ property :enabled, [true, false], desired_state: true
56
+
57
+ def load_task_hash(task_name)
58
+ Chef::Log.debug 'Looking for existing tasks'
59
+
60
+ # we use powershell_out here instead of powershell_out! because a failure implies that the task does not exist
61
+ task_script = <<-EOH
62
+ [Console]::OutputEncoding = [Text.UTF8Encoding]::UTF8
63
+ schtasks /Query /FO LIST /V /TN \"#{task_name}\"
64
+ EOH
65
+ output = powershell_out(task_script).stdout.force_encoding('UTF-8')
66
+ if output.empty?
67
+ task = false
68
+ else
69
+ task = {}
70
+
71
+ output.split("\n").map! { |line| line.split(':', 2).map!(&:strip) }.each do |field|
72
+ if field.is_a?(Array) && field[0].respond_to?(:to_sym)
73
+ task[field[0].gsub(/\s+/, '').to_sym] = field[1]
74
+ end
75
+ end
76
+ end
77
+
78
+ task
79
+ end
80
+
81
+ load_current_value do |desired|
82
+ pathed_task_name = desired.task_name.start_with?('\\') ? desired.task_name : "\\#{desired.task_name}"
83
+
84
+ task_hash = load_task_hash pathed_task_name
85
+
86
+ task_name pathed_task_name
87
+ if task_hash.respond_to?(:[]) && task_hash[:TaskName] == pathed_task_name
88
+ exists true
89
+ status :running if task_hash[:Status] == 'Running'
90
+ enabled task_hash[:ScheduledTaskState] == 'Enabled' ? true : false
91
+ cwd task_hash[:StartIn] unless task_hash[:StartIn] == 'N/A'
92
+ command task_hash[:TaskToRun]
93
+ user task_hash[:RunAsUser]
94
+ else
95
+ exists false
96
+ end
97
+ end
98
+
99
+ action :create do
100
+ if current_resource.exists && !(task_need_update? || new_resource.force)
101
+ Chef::Log.info "#{new_resource} task already exists - nothing to do"
102
+ else
103
+ converge_by("creating a new scheduled task #{new_resource.task_name}") do
104
+ validate_user_and_password
105
+ validate_interactive_setting
106
+ validate_create_frequency_modifier
107
+ validate_create_day
108
+ validate_create_months
109
+ validate_idle_time
110
+
111
+ options = {}
112
+ options['F'] = '' if new_resource.force || task_need_update?
113
+ options['SC'] = schedule
114
+ options['MO'] = new_resource.frequency_modifier if frequency_modifier_allowed
115
+ options['I'] = new_resource.idle_time unless new_resource.idle_time.nil?
116
+ options['SD'] = new_resource.start_day unless new_resource.start_day.nil?
117
+ options['ST'] = new_resource.start_time unless new_resource.start_time.nil?
118
+ options['TR'] = new_resource.command
119
+ options['RU'] = new_resource.user
120
+ options['RP'] = new_resource.password if use_password?
121
+ options['RL'] = 'HIGHEST' if new_resource.run_level == :highest
122
+ options['IT'] = '' if new_resource.interactive_enabled
123
+ options['D'] = new_resource.day if new_resource.day
124
+ options['M'] = new_resource.months unless new_resource.months.nil?
125
+
126
+ run_schtasks 'CREATE', options
127
+ cwd(new_resource.cwd) if new_resource.cwd
128
+ end
129
+ end
130
+ end
131
+
132
+ action :run do
133
+ if current_resource.exists
134
+ if current_resource.status == :running
135
+ Chef::Log.info "#{new_resource} task is currently running, skipping run"
136
+ else
137
+ converge_by("running scheduled task #{new_resource.task_name}") do
138
+ run_schtasks 'RUN'
139
+ new_resource.updated_by_last_action true
140
+ end
141
+ end
142
+ else
143
+ Chef::Log.debug "#{new_resource} task doesn't exists - nothing to do"
144
+ end
145
+ end
146
+
147
+ action :change do
148
+ if current_resource.exists
149
+ converge_by("changing scheduled task #{new_resource.task_name}") do
150
+ validate_user_and_password
151
+ validate_interactive_setting
152
+
153
+ options = {}
154
+ options['TR'] = new_resource.command if new_resource.command
155
+ options['RU'] = new_resource.user if new_resource.user
156
+ options['RP'] = new_resource.password if new_resource.password
157
+ options['SD'] = new_resource.start_day unless new_resource.start_day.nil?
158
+ options['ST'] = new_resource.start_time unless new_resource.start_time.nil?
159
+ options['IT'] = '' if new_resource.interactive_enabled
160
+
161
+ run_schtasks 'CHANGE', options
162
+ cwd(new_resource.cwd) if new_resource.cwd != current_resource.cwd
163
+ end
164
+ else
165
+ Chef::Log.debug "#{new_resource} task doesn't exists - nothing to do"
166
+ end
167
+ end
168
+
169
+ action :delete do
170
+ if current_resource.exists
171
+ converge_by("deleting scheduled task #{new_resource.task_name}") do
172
+ # always need to force deletion
173
+ run_schtasks 'DELETE', 'F' => ''
174
+ end
175
+ else
176
+ Chef::Log.debug "#{new_resource} task doesn't exists - nothing to do"
177
+ end
178
+ end
179
+
180
+ action :end do
181
+ if current_resource.exists
182
+ if current_resource.status != :running
183
+ Chef::Log.debug "#{new_resource} is not running - nothing to do"
184
+ else
185
+ converge_by("stopping scheduled task #{new_resource.task_name}") do
186
+ run_schtasks 'END'
187
+ end
188
+ end
189
+ else
190
+ Chef::Log.fatal "#{new_resource} task doesn't exist - nothing to do"
191
+ raise Errno::ENOENT, "#{new_resource}: task does not exist, cannot end"
192
+ end
193
+ end
194
+
195
+ action :enable do
196
+ if current_resource.exists
197
+ if current_resource.enabled
198
+ Chef::Log.debug "#{new_resource} already enabled - nothing to do"
199
+ else
200
+ converge_by("enabling scheduled task #{new_resource.task_name}") do
201
+ run_schtasks 'CHANGE', 'ENABLE' => ''
202
+ end
203
+ end
204
+ else
205
+ Chef::Log.fatal "#{new_resource} task doesn't exist - nothing to do"
206
+ raise Errno::ENOENT, "#{new_resource}: task does not exist, cannot enable"
207
+ end
208
+ end
209
+
210
+ action :disable do
211
+ if current_resource.exists
212
+ if current_resource.enabled
213
+ converge_by("disabling scheduled task #{new_resource.task_name}") do
214
+ run_schtasks 'CHANGE', 'DISABLE' => ''
215
+ end
216
+ else
217
+ Chef::Log.debug "#{new_resource} already disabled - nothing to do"
218
+ end
219
+ else
220
+ Chef::Log.debug "#{new_resource} task doesn't exist - nothing to do"
221
+ end
222
+ end
223
+
224
+ action_class do
225
+ # rubocop:disable Style/StringLiteralsInInterpolation
226
+ def run_schtasks(task_action, options = {})
227
+ cmd = "schtasks /#{task_action} /TN \"#{new_resource.task_name}\" "
228
+ options.keys.each do |option|
229
+ cmd += "/#{option} "
230
+ cmd += "\"#{options[option].to_s.gsub('"', "\\\"")}\" " unless options[option] == ''
231
+ end
232
+ Chef::Log.debug('running: ')
233
+ Chef::Log.debug(" #{cmd}")
234
+ shell_out!(cmd, returns: [0])
235
+ end
236
+ # rubocop:enable Style/StringLiteralsInInterpolation
237
+
238
+ def task_need_update?
239
+ # gsub needed as schtasks converts single quotes to double quotes on creation
240
+ current_resource.command != new_resource.command.tr("'", '"') ||
241
+ current_resource.user != new_resource.user
242
+ end
243
+
244
+ def cwd(folder)
245
+ Chef::Log.debug 'looking for existing tasks'
246
+
247
+ # we use shell_out here instead of shell_out! because a failure implies that the task does not exist
248
+ xml_cmd = shell_out("schtasks /Query /TN \"#{new_resource.task_name}\" /XML")
249
+
250
+ return if xml_cmd.exitstatus != 0
251
+
252
+ doc = REXML::Document.new(xml_cmd.stdout)
253
+
254
+ Chef::Log.debug 'Removing former CWD if any'
255
+ doc.root.elements.delete('Actions/Exec/WorkingDirectory')
256
+
257
+ unless folder.nil?
258
+ Chef::Log.debug 'Setting CWD as #folder'
259
+ cwd_element = REXML::Element.new('WorkingDirectory')
260
+ cwd_element.add_text(folder)
261
+ exec_element = doc.root.elements['Actions/Exec']
262
+ exec_element.add_element(cwd_element)
263
+ end
264
+
265
+ temp_task_file = ::File.join(ENV['TEMP'], 'windows_task.xml')
266
+ begin
267
+ ::File.open(temp_task_file, 'w:UTF-16LE') do |f|
268
+ doc.write(f)
269
+ end
270
+
271
+ options = {}
272
+ options['RU'] = new_resource.user if new_resource.user
273
+ options['RP'] = new_resource.password if new_resource.password
274
+ options['IT'] = '' if new_resource.interactive_enabled
275
+ options['XML'] = temp_task_file
276
+
277
+ run_schtasks('DELETE', 'F' => '')
278
+ run_schtasks('CREATE', options)
279
+ ensure
280
+ ::File.delete(temp_task_file)
281
+ end
282
+ end
283
+
284
+ SYSTEM_USERS = ['NT AUTHORITY\SYSTEM', 'SYSTEM', 'NT AUTHORITY\LOCALSERVICE', 'NT AUTHORITY\NETWORKSERVICE'].freeze
285
+
286
+ def validate_user_and_password
287
+ return unless new_resource.user && use_password?
288
+ return unless new_resource.password.nil?
289
+ Chef::Log.fatal "#{new_resource.task_name}: Can't specify a non-system user without a password!"
290
+ end
291
+
292
+ def validate_interactive_setting
293
+ return unless new_resource.interactive_enabled && new_resource.password.nil?
294
+ Chef::Log.fatal "#{new_resource} did not provide a password when attempting to set interactive/non-interactive."
295
+ end
296
+
297
+ def validate_create_day
298
+ return unless new_resource.day
299
+ unless [:weekly, :monthly].include?(new_resource.frequency)
300
+ raise 'day attribute is only valid for tasks that run weekly or monthly'
301
+ end
302
+ return unless new_resource.day.is_a?(String) && new_resource.day.to_i.to_s != new_resource.day
303
+ days = new_resource.day.split(',')
304
+ days.each do |day|
305
+ unless ['mon', 'tue', 'wed', 'thu', 'fri', 'sat', 'sun', '*'].include?(day.strip.downcase)
306
+ raise 'day attribute invalid. Only valid values are: MON, TUE, WED, THU, FRI, SAT, SUN and *. Multiple values must be separated by a comma.'
307
+ end
308
+ end
309
+ end
310
+
311
+ def validate_create_months
312
+ return unless new_resource.months
313
+ unless [:monthly].include?(new_resource.frequency)
314
+ raise 'months attribute is only valid for tasks that run monthly'
315
+ end
316
+ return unless new_resource.months.is_a? String
317
+ months = new_resource.months.split(',')
318
+ months.each do |month|
319
+ unless ['JAN', 'FEB', 'MAR', 'APR', 'MAY', 'JUN', 'JUL', 'AUG', 'SEP', 'OCT', 'NOV', 'DEC', '*'].include?(month.strip.upcase)
320
+ raise 'months attribute invalid. Only valid values are: JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, DEC and *. Multiple values must be separated by a comma.'
321
+ end
322
+ end
323
+ end
324
+
325
+ def validate_idle_time
326
+ return unless new_resource.frequency == :on_idle
327
+ return if new_resource.idle_time.to_i > 0 && new_resource.idle_time.to_i <= 999
328
+ raise "idle_time value #{new_resource.idle_time} is invalid. Valid values for :on_idle frequency are 1 - 999."
329
+ end
330
+
331
+ def validate_create_frequency_modifier
332
+ # Currently is handled in create action 'frequency_modifier_allowed' line. Does not allow for frequency_modifier for once,onstart,onlogon,onidle
333
+ # Note that 'OnEvent' is not a supported frequency.
334
+ return if new_resource.frequency.nil? || new_resource.frequency_modifier.nil?
335
+ case new_resource.frequency
336
+ when :minute
337
+ unless new_resource.frequency_modifier.to_i > 0 && new_resource.frequency_modifier.to_i <= 1439
338
+ raise "frequency_modifier value #{new_resource.frequency_modifier} is invalid. Valid values for :minute frequency are 1 - 1439."
339
+ end
340
+ when :hourly
341
+ unless new_resource.frequency_modifier.to_i > 0 && new_resource.frequency_modifier.to_i <= 23
342
+ raise "frequency_modifier value #{new_resource.frequency_modifier} is invalid. Valid values for :hourly frequency are 1 - 23."
343
+ end
344
+ when :daily
345
+ unless new_resource.frequency_modifier.to_i > 0 && new_resource.frequency_modifier.to_i <= 365
346
+ raise "frequency_modifier value #{new_resource.frequency_modifier} is invalid. Valid values for :daily frequency are 1 - 365."
347
+ end
348
+ when :weekly
349
+ unless new_resource.frequency_modifier.to_i > 0 && new_resource.frequency_modifier.to_i <= 52
350
+ raise "frequency_modifier value #{new_resource.frequency_modifier} is invalid. Valid values for :weekly frequency are 1 - 52."
351
+ end
352
+ when :monthly
353
+ unless ('1'..'12').to_a.push('FIRST', 'SECOND', 'THIRD', 'FOURTH', 'LAST', 'LASTDAY').include?(new_resource.frequency_modifier.to_s.upcase)
354
+ raise "frequency_modifier value #{new_resource.frequency_modifier} is invalid. Valid values for :monthly frequency are 1 - 12, 'FIRST', 'SECOND', 'THIRD', 'FOURTH', 'LAST', 'LASTDAY'."
355
+ end
356
+ end
357
+ end
358
+
359
+ def use_password?
360
+ @use_password ||= !SYSTEM_USERS.include?(new_resource.user.upcase)
361
+ end
362
+
363
+ def schedule
364
+ case new_resource.frequency
365
+ when :on_logon
366
+ 'ONLOGON'
367
+ when :on_idle
368
+ 'ONIDLE'
369
+ else
370
+ new_resource.frequency
371
+ end
372
+ end
373
+
374
+ def frequency_modifier_allowed
375
+ case new_resource.frequency
376
+ when :minute, :hourly, :daily, :weekly
377
+ true
378
+ when :monthly
379
+ new_resource.months.nil? || %w(FIRST SECOND THIRD FOURTH LAST LASTDAY).include?(new_resource.frequency_modifier)
380
+ else
381
+ false
382
+ end
383
+ end
384
+ end
@@ -0,0 +1,125 @@
1
+ #
2
+ # Author:: Doug MacEachern (<dougm@vmware.com>)
3
+ # Author:: Seth Chisamore (<schisamo@chef.io>)
4
+ # Cookbook:: windows
5
+ # Resource:: zipfile
6
+ #
7
+ # Copyright:: 2010-2017, VMware, Inc.
8
+ # Copyright:: 2011-2017, Chef Software, Inc.
9
+ #
10
+ # Licensed under the Apache License, Version 2.0 (the "License");
11
+ # you may not use this file except in compliance with the License.
12
+ # You may obtain a copy of the License at
13
+ #
14
+ # http://www.apache.org/licenses/LICENSE-2.0
15
+ #
16
+ # Unless required by applicable law or agreed to in writing, software
17
+ # distributed under the License is distributed on an "AS IS" BASIS,
18
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ # See the License for the specific language governing permissions and
20
+ # limitations under the License.
21
+ #
22
+
23
+ property :path, String, name_property: true
24
+ property :source, String
25
+ property :overwrite, [true, false], default: false
26
+ property :checksum, String
27
+
28
+ include Windows::Helper
29
+ require 'find'
30
+
31
+ action :unzip do
32
+ ensure_rubyzip_gem_installed
33
+ Chef::Log.debug("unzip #{new_resource.source} => #{new_resource.path} (overwrite=#{new_resource.overwrite})")
34
+
35
+ cache_file_path = if new_resource.source =~ %r{^(file|ftp|http|https):\/\/} # http://rubular.com/r/DGoIWjLfGI
36
+ uri = as_uri(source)
37
+ local_cache_path = "#{Chef::Config[:file_cache_path]}/#{::File.basename(::URI.unescape(uri.path))}"
38
+ Chef::Log.debug("Caching a copy of file #{new_resource.source} at #{cache_file_path}")
39
+
40
+ remote_file local_cache_path do
41
+ source new_resource.source
42
+ backup false
43
+ checksum new_resource.checksum unless new_resource.checksum.nil?
44
+ end
45
+
46
+ local_cache_path
47
+ else
48
+ new_resource.source
49
+ end
50
+
51
+ cache_file_path = win_friendly_path(cache_file_path)
52
+
53
+ converge_by("unzip #{new_resource.source}") do
54
+ ruby_block 'Unzipping' do
55
+ block do
56
+ Zip::File.open(cache_file_path) do |zip|
57
+ zip.each do |entry|
58
+ path = ::File.join(new_resource.path, entry.name)
59
+ FileUtils.mkdir_p(::File.dirname(path))
60
+ if new_resource.overwrite && ::File.exist?(path) && !::File.directory?(path)
61
+ FileUtils.rm(path)
62
+ end
63
+ zip.extract(entry, path) unless ::File.exist?(path)
64
+ end
65
+ end
66
+ end
67
+ action :run
68
+ end
69
+ end
70
+ end
71
+
72
+ action :zip do
73
+ ensure_rubyzip_gem_installed
74
+ # sanitize paths for windows.
75
+ new_resource.source.downcase.gsub!(::File::SEPARATOR, ::File::ALT_SEPARATOR)
76
+ new_resource.path.downcase.gsub!(::File::SEPARATOR, ::File::ALT_SEPARATOR)
77
+ Chef::Log.debug("zip #{new_resource.source} => #{new_resource.path} (overwrite=#{new_resource.overwrite})")
78
+
79
+ if new_resource.overwrite == false && ::File.exist?(new_resource.path)
80
+ Chef::Log.info("file #{new_resource.path} already exists and overwrite is set to false, exiting")
81
+ else
82
+ # delete the archive if it already exists, because we are recreating it.
83
+ if ::File.exist?(new_resource.path)
84
+ converge_by("delete existing file at #{new_resource.path}") do
85
+ ::File.unlink(new_resource.path)
86
+ end
87
+ end
88
+
89
+ # only supporting compression of a single directory (recursively).
90
+ if ::File.directory?(new_resource.source)
91
+ converge_by("zipping #{new_resource.source} to #{new_resource.path}") do
92
+ z = Zip::File.new(new_resource.path, true)
93
+ unless new_resource.source =~ /::File::ALT_SEPARATOR$/
94
+ new_resource.source << ::File::ALT_SEPARATOR
95
+ end
96
+ Find.find(new_resource.source) do |f|
97
+ f.downcase.gsub!(::File::SEPARATOR, ::File::ALT_SEPARATOR)
98
+ # don't add root directory to the zipfile.
99
+ next if f == new_resource.source
100
+ # strip the root directory from the filename before adding it to the zipfile.
101
+ zip_fname = f.sub(new_resource.source, '')
102
+ Chef::Log.debug("adding #{zip_fname} to archive, sourcefile is: #{f}")
103
+ z.add(zip_fname, f)
104
+ end
105
+ z.close
106
+ end
107
+ else
108
+ Chef::Log.info("Single directory must be specified for compression, and #{new_resource.source} does not meet that criteria.")
109
+ end
110
+ end
111
+ end
112
+
113
+ action_class do
114
+ def ensure_rubyzip_gem_installed
115
+ require 'zip'
116
+ rescue LoadError
117
+ Chef::Log.info("Missing gem 'rubyzip'...installing now.")
118
+ chef_gem 'rubyzip' do
119
+ version node['windows']['rubyzipversion']
120
+ action :install
121
+ compile_time true
122
+ end
123
+ require 'zip'
124
+ end
125
+ end
@@ -0,0 +1 @@
1
+ ~FC016