vagrant-unbundled 1.8.4.2 → 1.8.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (281) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +1 -1
  3. data/CHANGELOG.md +52 -0
  4. data/Gemfile.lock +9 -7
  5. data/RELEASE.md +37 -14
  6. data/lib/vagrant/action/builtin/box_add.rb +3 -1
  7. data/lib/vagrant/action/builtin/handle_forwarded_port_collisions.rb +5 -0
  8. data/lib/vagrant/box_collection.rb +2 -1
  9. data/lib/vagrant/bundler.rb +36 -1
  10. data/lib/vagrant/errors.rb +16 -8
  11. data/lib/vagrant/plugin/state_file.rb +8 -1
  12. data/lib/vagrant/util/platform.rb +1 -1
  13. data/plugins/guests/arch/cap/change_host_name.rb +13 -10
  14. data/plugins/guests/arch/cap/configure_networks.rb +11 -8
  15. data/plugins/guests/arch/cap/nfs.rb +35 -0
  16. data/plugins/guests/arch/cap/rsync.rb +16 -0
  17. data/plugins/guests/arch/cap/smb.rb +17 -0
  18. data/plugins/guests/arch/plugin.rb +28 -3
  19. data/plugins/guests/atomic/cap/change_host_name.rb +13 -10
  20. data/plugins/guests/atomic/plugin.rb +3 -3
  21. data/plugins/guests/{netbsd → bsd}/cap/halt.rb +2 -2
  22. data/plugins/guests/bsd/cap/nfs.rb +49 -0
  23. data/plugins/guests/bsd/cap/public_key.rb +65 -0
  24. data/plugins/guests/bsd/cap/virtualbox.rb +16 -0
  25. data/plugins/guests/bsd/guest.rb +9 -0
  26. data/plugins/guests/bsd/plugin.rb +40 -0
  27. data/plugins/guests/coreos/cap/change_host_name.rb +1 -1
  28. data/plugins/guests/coreos/plugin.rb +4 -4
  29. data/plugins/guests/darwin/cap/change_host_name.rb +4 -1
  30. data/plugins/guests/darwin/cap/configure_networks.rb +12 -5
  31. data/plugins/guests/darwin/cap/halt.rb +3 -1
  32. data/plugins/guests/darwin/cap/rsync.rb +7 -4
  33. data/plugins/guests/darwin/plugin.rb +13 -28
  34. data/plugins/guests/debian/cap/change_host_name.rb +14 -15
  35. data/plugins/guests/debian/cap/configure_networks.rb +2 -6
  36. data/plugins/guests/debian/cap/{nfs_client.rb → nfs.rb} +2 -1
  37. data/plugins/guests/debian/cap/rsync.rb +5 -6
  38. data/plugins/guests/debian/plugin.rb +8 -8
  39. data/plugins/guests/esxi/cap/mount_nfs_folder.rb +2 -2
  40. data/plugins/guests/esxi/plugin.rb +6 -6
  41. data/plugins/guests/fedora/cap/flavor.rb +1 -1
  42. data/plugins/guests/fedora/plugin.rb +2 -17
  43. data/plugins/guests/freebsd/cap/change_host_name.rb +2 -3
  44. data/plugins/guests/freebsd/cap/rsync.rb +7 -4
  45. data/plugins/guests/freebsd/plugin.rb +9 -29
  46. data/plugins/guests/funtoo/plugin.rb +3 -8
  47. data/plugins/guests/gentoo/cap/change_host_name.rb +21 -6
  48. data/plugins/guests/gentoo/cap/configure_networks.rb +35 -26
  49. data/plugins/guests/gentoo/plugin.rb +4 -4
  50. data/plugins/guests/linux/cap/choose_addressable_ip_addr.rb +2 -3
  51. data/plugins/guests/linux/cap/mount_virtualbox_shared_folder.rb +31 -45
  52. data/plugins/guests/linux/cap/network_interfaces.rb +20 -0
  53. data/plugins/guests/linux/cap/nfs.rb +57 -0
  54. data/plugins/guests/linux/cap/public_key.rb +65 -0
  55. data/plugins/guests/linux/cap/rsync.rb +7 -4
  56. data/plugins/guests/linux/plugin.rb +30 -25
  57. data/plugins/guests/mint/plugin.rb +1 -1
  58. data/plugins/guests/netbsd/plugin.rb +10 -30
  59. data/plugins/guests/nixos/plugin.rb +5 -5
  60. data/plugins/guests/omnios/cap/change_host_name.rb +1 -1
  61. data/plugins/guests/omnios/plugin.rb +4 -4
  62. data/plugins/guests/openbsd/cap/change_host_name.rb +21 -3
  63. data/plugins/guests/openbsd/plugin.rb +10 -30
  64. data/plugins/guests/photon/cap/change_host_name.rb +1 -1
  65. data/plugins/guests/photon/plugin.rb +4 -4
  66. data/plugins/guests/pld/cap/change_host_name.rb +1 -1
  67. data/plugins/guests/pld/plugin.rb +4 -4
  68. data/plugins/guests/redhat/cap/change_host_name.rb +4 -3
  69. data/plugins/guests/redhat/cap/configure_networks.rb +1 -24
  70. data/plugins/guests/redhat/plugin.rb +7 -7
  71. data/plugins/guests/slackware/cap/change_host_name.rb +1 -1
  72. data/plugins/guests/slackware/cap/configure_networks.rb +1 -5
  73. data/plugins/guests/slackware/plugin.rb +3 -3
  74. data/plugins/guests/smartos/plugin.rb +12 -12
  75. data/plugins/guests/solaris/plugin.rb +14 -14
  76. data/plugins/guests/solaris11/plugin.rb +12 -12
  77. data/plugins/guests/suse/cap/change_host_name.rb +1 -1
  78. data/plugins/guests/suse/cap/configure_networks.rb +1 -5
  79. data/plugins/guests/suse/plugin.rb +8 -8
  80. data/plugins/guests/tinycore/cap/mount_nfs.rb +2 -2
  81. data/plugins/guests/tinycore/plugin.rb +7 -7
  82. data/plugins/guests/trisquel/plugin.rb +1 -1
  83. data/plugins/guests/ubuntu/guest.rb +1 -1
  84. data/plugins/guests/ubuntu/plugin.rb +1 -6
  85. data/plugins/guests/windows/plugin.rb +2 -2
  86. data/plugins/kernel_v2/config/vm.rb +8 -1
  87. data/plugins/providers/hyperv/scripts/get_vm_status.ps1 +25 -5
  88. data/plugins/providers/virtualbox/driver/meta.rb +1 -0
  89. data/plugins/providers/virtualbox/driver/version_5_1.rb +734 -0
  90. data/plugins/providers/virtualbox/plugin.rb +1 -0
  91. data/plugins/synced_folders/nfs/synced_folder.rb +10 -2
  92. data/plugins/synced_folders/rsync/helper.rb +11 -4
  93. data/scripts/{bintray_upload.sh → sign.sh} +0 -0
  94. data/templates/guests/arch/network_static.erb +3 -3
  95. data/templates/guests/arch/network_static6.erb +8 -0
  96. data/templates/guests/freebsd/network_static6.erb +6 -0
  97. data/templates/guests/funtoo/network_static6.erb +9 -0
  98. data/templates/guests/gentoo/network_dhcp.erb +1 -1
  99. data/templates/guests/gentoo/network_static.erb +4 -4
  100. data/templates/guests/gentoo/network_static6.erb +7 -0
  101. data/templates/guests/redhat/network_dhcp.erb +1 -1
  102. data/templates/guests/redhat/network_static.erb +4 -1
  103. data/templates/guests/{fedora → redhat}/network_static6.erb +5 -2
  104. data/templates/locales/en.yml +40 -6
  105. data/test/unit/plugins/guests/arch/cap/change_host_name_test.rb +6 -6
  106. data/test/unit/plugins/guests/arch/cap/configure_networks_test.rb +20 -15
  107. data/test/unit/plugins/guests/arch/cap/rsync_test.rb +30 -0
  108. data/test/unit/plugins/guests/arch/cap/smb_test.rb +38 -0
  109. data/test/unit/plugins/guests/atomic/cap/change_host_name_test.rb +9 -8
  110. data/test/unit/plugins/guests/{freebsd → bsd}/cap/halt_test.rb +11 -10
  111. data/test/unit/plugins/guests/{freebsd → bsd}/cap/insert_public_key_test.rb +7 -6
  112. data/test/unit/plugins/guests/bsd/cap/nfs_test.rb +68 -0
  113. data/test/unit/plugins/guests/coreos/cap/change_host_name_test.rb +5 -5
  114. data/test/unit/plugins/guests/darwin/cap/change_host_name_test.rb +5 -5
  115. data/test/unit/plugins/guests/darwin/cap/halt_test.rb +36 -0
  116. data/test/unit/plugins/guests/debian/cap/change_host_name_test.rb +3 -5
  117. data/test/unit/plugins/guests/debian/cap/configure_networks_test.rb +13 -9
  118. data/test/unit/plugins/guests/debian/cap/rsync_test.rb +3 -11
  119. data/test/unit/plugins/guests/freebsd/cap/change_host_name_test.rb +2 -2
  120. data/test/unit/plugins/guests/linux/cap/mount_nfs_test.rb +16 -3
  121. data/test/unit/plugins/guests/omnios/cap/change_host_name_test.rb +2 -2
  122. data/test/unit/plugins/guests/photon/cap/change_host_name_test.rb +2 -2
  123. data/test/unit/plugins/guests/pld/cap/change_host_name_test.rb +2 -2
  124. data/test/unit/plugins/guests/redhat/cap/change_host_name_test.rb +4 -3
  125. data/test/unit/plugins/guests/redhat/cap/configure_networks_test.rb +17 -33
  126. data/test/unit/plugins/guests/slackware/cap/change_host_name_test.rb +2 -2
  127. data/test/unit/plugins/guests/slackware/cap/configure_networks_test.rb +8 -4
  128. data/test/unit/plugins/guests/suse/cap/change_host_name_test.rb +2 -2
  129. data/test/unit/plugins/guests/suse/cap/configure_networks_test.rb +13 -16
  130. data/test/unit/plugins/kernel_v2/config/vm_test.rb +10 -2
  131. data/test/unit/templates/guests/arch/network_static_test.rb +4 -2
  132. data/test/unit/templates/guests/gentoo/network_dhcp_test.rb +2 -2
  133. data/test/unit/templates/guests/gentoo/network_static_test.rb +10 -10
  134. data/test/unit/templates/guests/redhat/network_dhcp_test.rb +2 -2
  135. data/test/unit/templates/guests/redhat/network_static_test.rb +9 -9
  136. data/vagrant.gemspec +3 -3
  137. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/CHANGELOG.md +1 -0
  138. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/CONTRIBUTING.md +38 -0
  139. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/LICENSE.txt +22 -0
  140. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/README.md +297 -0
  141. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/bin/listen +12 -0
  142. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/adapter/base.rb +141 -0
  143. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/adapter/bsd.rb +106 -0
  144. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/adapter/config.rb +26 -0
  145. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/adapter/darwin.rb +92 -0
  146. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/adapter/linux.rb +106 -0
  147. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/adapter/polling.rb +37 -0
  148. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/adapter/windows.rb +98 -0
  149. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/adapter.rb +45 -0
  150. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/backend.rb +38 -0
  151. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/change.rb +76 -0
  152. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/cli.rb +65 -0
  153. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/directory.rb +87 -0
  154. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/event/config.rb +55 -0
  155. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/event/loop.rb +117 -0
  156. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/event/processor.rb +122 -0
  157. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/event/queue.rb +55 -0
  158. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/file.rb +80 -0
  159. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/fsm.rb +132 -0
  160. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/internals/thread_pool.rb +29 -0
  161. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/listener/config.rb +41 -0
  162. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/listener.rb +133 -0
  163. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/logger.rb +32 -0
  164. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/options.rb +23 -0
  165. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/queue_optimizer.rb +132 -0
  166. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/record/entry.rb +64 -0
  167. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/record/symlink_detector.rb +39 -0
  168. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/record.rb +118 -0
  169. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/silencer/controller.rb +48 -0
  170. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/silencer.rb +97 -0
  171. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen/version.rb +3 -0
  172. data/vendor/bundle/ruby/2.3.0/gems/listen-3.1.5/lib/listen.rb +57 -0
  173. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/.gitignore +8 -0
  174. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/.rspec +2 -0
  175. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/.rubocop-disables.yml +384 -0
  176. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/.rubocop.yml +3 -0
  177. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/.travis.yml +43 -0
  178. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/AUTHORS +98 -0
  179. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/Gemfile +11 -0
  180. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/LICENSE +21 -0
  181. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/README.md +667 -0
  182. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/Rakefile +132 -0
  183. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/bin/restclient +92 -0
  184. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/history.md +310 -0
  185. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/lib/rest-client.rb +2 -0
  186. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/lib/rest_client.rb +2 -0
  187. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/lib/restclient/abstract_response.rb +226 -0
  188. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/lib/restclient/exceptions.rb +244 -0
  189. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/lib/restclient/params_array.rb +72 -0
  190. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/lib/restclient/payload.rb +209 -0
  191. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/lib/restclient/platform.rb +49 -0
  192. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/lib/restclient/raw_response.rb +38 -0
  193. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/lib/restclient/request.rb +904 -0
  194. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/lib/restclient/resource.rb +168 -0
  195. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/lib/restclient/response.rb +80 -0
  196. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/lib/restclient/utils.rb +235 -0
  197. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/lib/restclient/version.rb +8 -0
  198. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/lib/restclient/windows/root_certs.rb +105 -0
  199. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/lib/restclient/windows.rb +8 -0
  200. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/lib/restclient.rb +184 -0
  201. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/rest-client.gemspec +31 -0
  202. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/rest-client.windows.gemspec +19 -0
  203. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/helpers.rb +22 -0
  204. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/integration/_lib.rb +1 -0
  205. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/integration/capath_digicert/244b5494.0 +19 -0
  206. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/integration/capath_digicert/81b9768f.0 +19 -0
  207. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/integration/capath_digicert/README +8 -0
  208. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/integration/capath_digicert/digicert.crt +19 -0
  209. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/integration/capath_verisign/415660c1.0 +14 -0
  210. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/integration/capath_verisign/7651b327.0 +14 -0
  211. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/integration/capath_verisign/README +8 -0
  212. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/integration/capath_verisign/verisign.crt +14 -0
  213. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/integration/certs/digicert.crt +19 -0
  214. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/integration/certs/verisign.crt +14 -0
  215. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/integration/httpbin_spec.rb +86 -0
  216. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/integration/integration_spec.rb +125 -0
  217. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/integration/request_spec.rb +127 -0
  218. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/spec_helper.rb +29 -0
  219. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/unit/_lib.rb +1 -0
  220. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/unit/abstract_response_spec.rb +145 -0
  221. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/unit/exceptions_spec.rb +108 -0
  222. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/unit/master_shake.jpg +0 -0
  223. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/unit/params_array_spec.rb +36 -0
  224. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/unit/payload_spec.rb +263 -0
  225. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/unit/raw_response_spec.rb +18 -0
  226. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/unit/request2_spec.rb +54 -0
  227. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/unit/request_spec.rb +1265 -0
  228. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/unit/resource_spec.rb +130 -0
  229. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/unit/response_spec.rb +241 -0
  230. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/unit/restclient_spec.rb +79 -0
  231. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/unit/utils_spec.rb +147 -0
  232. data/vendor/bundle/ruby/2.3.0/gems/rest-client-2.0.0/spec/unit/windows/root_certs_spec.rb +22 -0
  233. data/vendor/bundle/ruby/2.3.0/gems/ruby_dep-1.4.0/.gitignore +10 -0
  234. data/vendor/bundle/ruby/2.3.0/gems/ruby_dep-1.4.0/.rspec +3 -0
  235. data/vendor/bundle/ruby/2.3.0/gems/ruby_dep-1.4.0/.rubocop.yml +3 -0
  236. data/vendor/bundle/ruby/2.3.0/gems/ruby_dep-1.4.0/.travis.yml +11 -0
  237. data/vendor/bundle/ruby/2.3.0/gems/ruby_dep-1.4.0/LICENSE.txt +21 -0
  238. data/vendor/bundle/ruby/2.3.0/gems/ruby_dep-1.4.0/README.md +151 -0
  239. data/vendor/bundle/ruby/2.3.0/gems/ruby_dep-1.4.0/lib/ruby_dep/logger.rb +16 -0
  240. data/vendor/bundle/ruby/2.3.0/gems/ruby_dep-1.4.0/lib/ruby_dep/quiet.rb +3 -0
  241. data/vendor/bundle/ruby/2.3.0/gems/ruby_dep-1.4.0/lib/ruby_dep/ruby_version.rb +58 -0
  242. data/vendor/bundle/ruby/2.3.0/gems/ruby_dep-1.4.0/lib/ruby_dep/travis/ruby_version.rb +59 -0
  243. data/vendor/bundle/ruby/2.3.0/gems/ruby_dep-1.4.0/lib/ruby_dep/travis.rb +58 -0
  244. data/vendor/bundle/ruby/2.3.0/gems/ruby_dep-1.4.0/lib/ruby_dep/version.rb +3 -0
  245. data/vendor/bundle/ruby/2.3.0/gems/ruby_dep-1.4.0/lib/ruby_dep/warning.rb +97 -0
  246. data/vendor/bundle/ruby/2.3.0/gems/ruby_dep-1.4.0/lib/ruby_dep.rb +2 -0
  247. data/vendor/bundle/ruby/2.3.0/specifications/listen-3.1.5.gemspec +44 -0
  248. data/vendor/bundle/ruby/2.3.0/specifications/rest-client-2.0.0.gemspec +60 -0
  249. data/vendor/bundle/ruby/2.3.0/specifications/ruby_dep-1.4.0.gemspec +34 -0
  250. data/version.txt +1 -1
  251. metadata +147 -44
  252. data/plugins/guests/darwin/cap/insert_public_key.rb +0 -33
  253. data/plugins/guests/darwin/cap/mount_nfs_folder.rb +0 -37
  254. data/plugins/guests/darwin/cap/remove_public_key.rb +0 -21
  255. data/plugins/guests/fedora/cap/change_host_name.rb +0 -29
  256. data/plugins/guests/fedora/cap/configure_networks.rb +0 -135
  257. data/plugins/guests/fedora/cap/network_scripts_dir.rb +0 -15
  258. data/plugins/guests/freebsd/cap/halt.rb +0 -16
  259. data/plugins/guests/freebsd/cap/insert_public_key.rb +0 -34
  260. data/plugins/guests/freebsd/cap/mount_nfs_folder.rb +0 -24
  261. data/plugins/guests/freebsd/cap/remove_public_key.rb +0 -21
  262. data/plugins/guests/funtoo/cap/change_host_name.rb +0 -17
  263. data/plugins/guests/linux/cap/insert_public_key.rb +0 -31
  264. data/plugins/guests/linux/cap/mount_nfs.rb +0 -50
  265. data/plugins/guests/linux/cap/nfs_client.rb +0 -11
  266. data/plugins/guests/linux/cap/remove_public_key.rb +0 -24
  267. data/plugins/guests/netbsd/cap/insert_public_key.rb +0 -21
  268. data/plugins/guests/netbsd/cap/mount_nfs_folder.rb +0 -17
  269. data/plugins/guests/netbsd/cap/remove_public_key.rb +0 -21
  270. data/plugins/guests/openbsd/cap/halt.rb +0 -16
  271. data/plugins/guests/openbsd/cap/insert_public_key.rb +0 -21
  272. data/plugins/guests/openbsd/cap/mount_nfs_folder.rb +0 -14
  273. data/plugins/guests/openbsd/cap/remove_public_key.rb +0 -21
  274. data/plugins/guests/ubuntu/cap/change_host_name.rb +0 -52
  275. data/templates/guests/fedora/network_dhcp.erb +0 -6
  276. data/templates/guests/fedora/network_static.erb +0 -16
  277. data/test/unit/plugins/guests/freebsd/cap/mount_nfs_folder_test.rb +0 -53
  278. data/test/unit/plugins/guests/ubuntu/cap/change_host_name_test.rb +0 -42
  279. data/test/unit/templates/guests/fedora/network_dhcp_test.rb +0 -21
  280. data/test/unit/templates/guests/fedora/network_static6_test.rb +0 -25
  281. data/test/unit/templates/guests/fedora/network_static_test.rb +0 -71
@@ -0,0 +1,122 @@
1
+ module Listen
2
+ module Event
3
+ class Processor
4
+ def initialize(config, reasons)
5
+ @config = config
6
+ @reasons = reasons
7
+ _reset_no_unprocessed_events
8
+ end
9
+
10
+ # TODO: implement this properly instead of checking the state at arbitrary
11
+ # points in time
12
+ def loop_for(latency)
13
+ @latency = latency
14
+
15
+ loop do
16
+ _wait_until_events
17
+ _wait_until_events_calm_down
18
+ _wait_until_no_longer_paused
19
+ _process_changes
20
+ end
21
+ rescue Stopped
22
+ Listen::Logger.debug('Processing stopped')
23
+ end
24
+
25
+ private
26
+
27
+ class Stopped < RuntimeError
28
+ end
29
+
30
+ def _wait_until_events_calm_down
31
+ loop do
32
+ now = _timestamp
33
+
34
+ # Assure there's at least latency between callbacks to allow
35
+ # for accumulating changes
36
+ diff = _deadline - now
37
+ break if diff <= 0
38
+
39
+ # give events a bit of time to accumulate so they can be
40
+ # compressed/optimized
41
+ _sleep(:waiting_until_latency, diff)
42
+ end
43
+ end
44
+
45
+ def _wait_until_no_longer_paused
46
+ # TODO: may not be a good idea?
47
+ _sleep(:waiting_for_unpause) while config.paused?
48
+ end
49
+
50
+ def _check_stopped
51
+ return unless config.stopped?
52
+
53
+ _flush_wakeup_reasons
54
+ raise Stopped
55
+ end
56
+
57
+ def _sleep(_local_reason, *args)
58
+ _check_stopped
59
+ sleep_duration = config.sleep(*args)
60
+ _check_stopped
61
+
62
+ _flush_wakeup_reasons do |reason|
63
+ next unless reason == :event
64
+ _remember_time_of_first_unprocessed_event unless config.paused?
65
+ end
66
+
67
+ sleep_duration
68
+ end
69
+
70
+ def _remember_time_of_first_unprocessed_event
71
+ @first_unprocessed_event_time ||= _timestamp
72
+ end
73
+
74
+ def _reset_no_unprocessed_events
75
+ @first_unprocessed_event_time = nil
76
+ end
77
+
78
+ def _deadline
79
+ @first_unprocessed_event_time + @latency
80
+ end
81
+
82
+ def _wait_until_events
83
+ # TODO: long sleep may not be a good idea?
84
+ _sleep(:waiting_for_events) while config.event_queue.empty?
85
+ @first_unprocessed_event_time ||= _timestamp
86
+ end
87
+
88
+ def _flush_wakeup_reasons
89
+ reasons = @reasons
90
+ until reasons.empty?
91
+ reason = reasons.pop
92
+ yield reason if block_given?
93
+ end
94
+ end
95
+
96
+ def _timestamp
97
+ config.timestamp
98
+ end
99
+
100
+ # for easier testing without sleep loop
101
+ def _process_changes
102
+ _reset_no_unprocessed_events
103
+
104
+ changes = []
105
+ changes << config.event_queue.pop until config.event_queue.empty?
106
+
107
+ callable = config.callable?
108
+ return unless callable
109
+
110
+ hash = config.optimize_changes(changes)
111
+ result = [hash[:modified], hash[:added], hash[:removed]]
112
+ return if result.all?(&:empty?)
113
+
114
+ block_start = _timestamp
115
+ config.call(*result)
116
+ Listen::Logger.debug "Callback took #{_timestamp - block_start} sec"
117
+ end
118
+
119
+ attr_reader :config
120
+ end
121
+ end
122
+ end
@@ -0,0 +1,55 @@
1
+ require 'thread'
2
+
3
+ require 'forwardable'
4
+
5
+ module Listen
6
+ module Event
7
+ class Queue
8
+ extend Forwardable
9
+
10
+ class Config
11
+ def initialize(relative)
12
+ @relative = relative
13
+ end
14
+
15
+ def relative?
16
+ @relative
17
+ end
18
+ end
19
+
20
+ def initialize(config, &block)
21
+ @event_queue = ::Queue.new
22
+ @block = block
23
+ @config = config
24
+ end
25
+
26
+ def <<(args)
27
+ type, change, dir, path, options = *args
28
+ fail "Invalid type: #{type.inspect}" unless [:dir, :file].include? type
29
+ fail "Invalid change: #{change.inspect}" unless change.is_a?(Symbol)
30
+ fail "Invalid path: #{path.inspect}" unless path.is_a?(String)
31
+
32
+ dir = _safe_relative_from_cwd(dir)
33
+ event_queue.public_send(:<<, [type, change, dir, path, options])
34
+
35
+ block.call(args) if block
36
+ end
37
+
38
+ delegate empty?: :event_queue
39
+ delegate pop: :event_queue
40
+
41
+ private
42
+
43
+ attr_reader :event_queue
44
+ attr_reader :block
45
+ attr_reader :config
46
+
47
+ def _safe_relative_from_cwd(dir)
48
+ return dir unless config.relative?
49
+ dir.relative_path_from(Pathname.pwd)
50
+ rescue ArgumentError
51
+ dir
52
+ end
53
+ end
54
+ end
55
+ end
@@ -0,0 +1,80 @@
1
+ require 'digest/md5'
2
+
3
+ module Listen
4
+ class File
5
+ def self.change(record, rel_path)
6
+ path = Pathname.new(record.root) + rel_path
7
+ lstat = path.lstat
8
+
9
+ data = { mtime: lstat.mtime.to_f, mode: lstat.mode }
10
+
11
+ record_data = record.file_data(rel_path)
12
+
13
+ if record_data.empty?
14
+ record.update_file(rel_path, data)
15
+ return :added
16
+ end
17
+
18
+ if data[:mode] != record_data[:mode]
19
+ record.update_file(rel_path, data)
20
+ return :modified
21
+ end
22
+
23
+ if data[:mtime] != record_data[:mtime]
24
+ record.update_file(rel_path, data)
25
+ return :modified
26
+ end
27
+
28
+ return if /1|true/ =~ ENV['LISTEN_GEM_DISABLE_HASHING']
29
+ return unless inaccurate_mac_time?(lstat)
30
+
31
+ # Check if change happened within 1 second (maybe it's even
32
+ # too much, e.g. 0.3-0.5 could be sufficient).
33
+ #
34
+ # With rb-fsevent, there's a (configurable) latency between
35
+ # when file was changed and when the event was triggered.
36
+ #
37
+ # If a file is saved at ???14.998, by the time the event is
38
+ # actually received by Listen, the time could already be e.g.
39
+ # ???15.7.
40
+ #
41
+ # And since Darwin adapter uses directory scanning, the file
42
+ # mtime may be the same (e.g. file was changed at ???14.001,
43
+ # then at ???14.998, but the fstat time would be ???14.0 in
44
+ # both cases).
45
+ #
46
+ # If change happend at ???14.999997, the mtime is 14.0, so for
47
+ # an mtime=???14.0 we assume it could even be almost ???15.0
48
+ #
49
+ # So if Time.now.to_f is ???15.999998 and stat reports mtime
50
+ # at ???14.0, then event was due to that file'd change when:
51
+ #
52
+ # ???15.999997 - ???14.999998 < 1.0s
53
+ #
54
+ # So the "2" is "1 + 1" (1s to cover rb-fsevent latency +
55
+ # 1s maximum difference between real mtime and that recorded
56
+ # in the file system)
57
+ #
58
+ return if data[:mtime].to_i + 2 <= Time.now.to_f
59
+
60
+ md5 = Digest::MD5.file(path).digest
61
+ record.update_file(rel_path, data.merge(md5: md5))
62
+ :modified if record_data[:md5] && md5 != record_data[:md5]
63
+ rescue SystemCallError
64
+ record.unset_path(rel_path)
65
+ :removed
66
+ rescue
67
+ Listen::Logger.debug "lstat failed for: #{rel_path} (#{$ERROR_INFO})"
68
+ raise
69
+ end
70
+
71
+ def self.inaccurate_mac_time?(stat)
72
+ # 'mac' means Modified/Accessed/Created
73
+
74
+ # Since precision depends on mounted FS (e.g. you can have a FAT partiion
75
+ # mounted on Linux), check for fields with a remainder to detect this
76
+
77
+ [stat.mtime, stat.ctime, stat.atime].map(&:usec).all?(&:zero?)
78
+ end
79
+ end
80
+ end
@@ -0,0 +1,132 @@
1
+ # Code copied from https://github.com/celluloid/celluloid-fsm
2
+ module Listen
3
+ module FSM
4
+ DEFAULT_STATE = :default # Default state name unless one is explicitly set
5
+
6
+ # Included hook to extend class methods
7
+ def self.included(klass)
8
+ klass.send :extend, ClassMethods
9
+ end
10
+
11
+ module ClassMethods
12
+ # Obtain or set the default state
13
+ # Passing a state name sets the default state
14
+ def default_state(new_default = nil)
15
+ if new_default
16
+ @default_state = new_default.to_sym
17
+ else
18
+ defined?(@default_state) ? @default_state : DEFAULT_STATE
19
+ end
20
+ end
21
+
22
+ # Obtain the valid states for this FSM
23
+ def states
24
+ @states ||= {}
25
+ end
26
+
27
+ # Declare an FSM state and optionally provide a callback block to fire
28
+ # Options:
29
+ # * to: a state or array of states this state can transition to
30
+ def state(*args, &block)
31
+ if args.last.is_a? Hash
32
+ # Stringify keys :/
33
+ options = args.pop.each_with_object({}) { |(k, v), h| h[k.to_s] = v }
34
+ else
35
+ options = {}
36
+ end
37
+
38
+ args.each do |name|
39
+ name = name.to_sym
40
+ default_state name if options['default']
41
+ states[name] = State.new(name, options['to'], &block)
42
+ end
43
+ end
44
+ end
45
+
46
+ # Be kind and call super if you must redefine initialize
47
+ def initialize
48
+ @state = self.class.default_state
49
+ end
50
+
51
+ # Obtain the current state of the FSM
52
+ attr_reader :state
53
+
54
+ def transition(state_name)
55
+ new_state = validate_and_sanitize_new_state(state_name)
56
+ return unless new_state
57
+ transition_with_callbacks!(new_state)
58
+ end
59
+
60
+ # Immediate state transition with no checks, or callbacks. "Dangerous!"
61
+ def transition!(state_name)
62
+ @state = state_name
63
+ end
64
+
65
+ protected
66
+
67
+ def validate_and_sanitize_new_state(state_name)
68
+ state_name = state_name.to_sym
69
+
70
+ return if current_state_name == state_name
71
+
72
+ if current_state && !current_state.valid_transition?(state_name)
73
+ valid = current_state.transitions.map(&:to_s).join(', ')
74
+ msg = "#{self.class} can't change state from '#{@state}'"\
75
+ " to '#{state_name}', only to: #{valid}"
76
+ fail ArgumentError, msg
77
+ end
78
+
79
+ new_state = states[state_name]
80
+
81
+ unless new_state
82
+ return if state_name == default_state
83
+ fail ArgumentError, "invalid state for #{self.class}: #{state_name}"
84
+ end
85
+
86
+ new_state
87
+ end
88
+
89
+ def transition_with_callbacks!(state_name)
90
+ transition! state_name.name
91
+ state_name.call(self)
92
+ end
93
+
94
+ def states
95
+ self.class.states
96
+ end
97
+
98
+ def default_state
99
+ self.class.default_state
100
+ end
101
+
102
+ def current_state
103
+ states[@state]
104
+ end
105
+
106
+ def current_state_name
107
+ current_state && current_state.name || ''
108
+ end
109
+
110
+ class State
111
+ attr_reader :name, :transitions
112
+
113
+ def initialize(name, transitions = nil, &block)
114
+ @name = name
115
+ @block = block
116
+ @transitions = nil
117
+ @transitions = Array(transitions).map(&:to_sym) if transitions
118
+ end
119
+
120
+ def call(obj)
121
+ obj.instance_eval(&@block) if @block
122
+ end
123
+
124
+ def valid_transition?(new_state)
125
+ # All transitions are allowed unless expressly
126
+ return true unless @transitions
127
+
128
+ @transitions.include? new_state.to_sym
129
+ end
130
+ end
131
+ end
132
+ end
@@ -0,0 +1,29 @@
1
+ module Listen
2
+ # @private api
3
+ module Internals
4
+ module ThreadPool
5
+ def self.add(&block)
6
+ Thread.new { block.call }.tap do |th|
7
+ (@threads ||= Queue.new) << th
8
+ end
9
+ end
10
+
11
+ def self.stop
12
+ return unless @threads ||= nil
13
+ return if @threads.empty? # return to avoid using possibly stubbed Queue
14
+
15
+ killed = Queue.new
16
+ # You can't kill a read on a descriptor in JRuby, so let's just
17
+ # ignore running threads (listen rb-inotify waiting for disk activity
18
+ # before closing) pray threads die faster than they are created...
19
+ limit = RUBY_ENGINE == 'jruby' ? [1] : []
20
+
21
+ killed << @threads.pop.kill until @threads.empty?
22
+ until killed.empty?
23
+ th = killed.pop
24
+ th.join(*limit) unless th[:listen_blocking_read_thread]
25
+ end
26
+ end
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,41 @@
1
+ module Listen
2
+ class Listener
3
+ class Config
4
+ DEFAULTS = {
5
+ # Listener options
6
+ debug: false, # TODO: is this broken?
7
+ wait_for_delay: nil, # NOTE: should be provided by adapter if possible
8
+ relative: false,
9
+
10
+ # Backend selecting options
11
+ force_polling: false,
12
+ polling_fallback_message: nil
13
+ }.freeze
14
+
15
+ def initialize(opts)
16
+ @options = DEFAULTS.merge(opts)
17
+ @relative = @options[:relative]
18
+ @min_delay_between_events = @options[:wait_for_delay]
19
+ @silencer_rules = @options # silencer will extract what it needs
20
+ end
21
+
22
+ def relative?
23
+ @relative
24
+ end
25
+
26
+ attr_reader :min_delay_between_events
27
+
28
+ attr_reader :silencer_rules
29
+
30
+ def adapter_instance_options(klass)
31
+ valid_keys = klass.const_get('DEFAULTS').keys
32
+ Hash[@options.select { |key, _| valid_keys.include?(key) }]
33
+ end
34
+
35
+ def adapter_select_options
36
+ valid_keys = %w(force_polling polling_fallback_message).map(&:to_sym)
37
+ Hash[@options.select { |key, _| valid_keys.include?(key) }]
38
+ end
39
+ end
40
+ end
41
+ end