vagrant-unbundled 1.9.7.1 → 1.9.8.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (280) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +36 -0
  3. data/Gemfile.lock +10 -6
  4. data/contrib/bash/completion.sh +1 -1
  5. data/contrib/sudoers/linux-ubuntu +3 -4
  6. data/lib/vagrant/errors.rb +8 -0
  7. data/lib/vagrant/machine.rb +2 -0
  8. data/lib/vagrant/util/platform.rb +1 -1
  9. data/lib/vagrant/util/powershell.rb +42 -13
  10. data/lib/vagrant/util/safe_exec.rb +13 -2
  11. data/lib/vagrant/util/ssh.rb +11 -1
  12. data/plugins/commands/box/command/update.rb +12 -7
  13. data/plugins/commands/login/client.rb +15 -6
  14. data/plugins/commands/login/command.rb +13 -3
  15. data/plugins/commands/up/command.rb +9 -0
  16. data/plugins/commands/validate/command.rb +4 -4
  17. data/plugins/guests/darwin/cap/shell_expand_guest_path.rb +2 -2
  18. data/plugins/guests/freebsd/cap/configure_networks.rb +1 -1
  19. data/plugins/guests/freebsd/cap/shell_expand_guest_path.rb +2 -2
  20. data/plugins/guests/linux/cap/shell_expand_guest_path.rb +2 -2
  21. data/plugins/guests/netbsd/cap/shell_expand_guest_path.rb +2 -2
  22. data/plugins/guests/openbsd/cap/shell_expand_guest_path.rb +2 -2
  23. data/plugins/guests/windows/cap/public_key.rb +21 -45
  24. data/plugins/kernel_v2/config/ssh_connect.rb +3 -0
  25. data/plugins/providers/docker/config.rb +4 -0
  26. data/plugins/providers/docker/driver/compose.rb +11 -4
  27. data/plugins/providers/hyperv/action/wait_for_ip_address.rb +15 -11
  28. data/plugins/providers/hyperv/scripts/get_network_config.ps1 +24 -9
  29. data/plugins/providers/virtualbox/action/prepare_nfs_settings.rb +18 -0
  30. data/plugins/provisioners/ansible/provisioner/host.rb +1 -1
  31. data/plugins/provisioners/chef/cap/debian/chef_install.rb +2 -2
  32. data/plugins/provisioners/chef/cap/freebsd/chef_install.rb +2 -2
  33. data/plugins/provisioners/chef/cap/omnios/chef_install.rb +2 -2
  34. data/plugins/provisioners/chef/cap/redhat/chef_install.rb +2 -2
  35. data/plugins/provisioners/chef/cap/suse/chef_install.rb +2 -2
  36. data/plugins/provisioners/chef/cap/windows/chef_install.rb +2 -2
  37. data/plugins/provisioners/chef/config/base.rb +17 -0
  38. data/plugins/provisioners/chef/config/chef_zero.rb +7 -0
  39. data/plugins/provisioners/chef/installer.rb +8 -7
  40. data/plugins/provisioners/chef/omnibus.rb +4 -6
  41. data/plugins/provisioners/chef/provisioner/base.rb +1 -0
  42. data/plugins/provisioners/chef/provisioner/chef_solo.rb +2 -1
  43. data/plugins/provisioners/file/provisioner.rb +18 -2
  44. data/plugins/provisioners/puppet/provisioner/puppet.rb +0 -2
  45. data/plugins/provisioners/salt/bootstrap-salt.sh +9 -5
  46. data/plugins/provisioners/shell/provisioner.rb +1 -1
  47. data/plugins/synced_folders/rsync/command/rsync_auto.rb +6 -1
  48. data/plugins/synced_folders/rsync/helper.rb +10 -0
  49. data/templates/locales/en.yml +27 -1
  50. data/templates/locales/providers_docker.yml +2 -0
  51. data/test/unit/base.rb +1 -3
  52. data/test/unit/plugins/commands/box/command/add_test.rb +3 -3
  53. data/test/unit/plugins/commands/box/command/remove_test.rb +6 -6
  54. data/test/unit/plugins/commands/box/command/repackage_test.rb +2 -4
  55. data/test/unit/plugins/commands/box/command/update_test.rb +36 -14
  56. data/test/unit/plugins/commands/init/command_test.rb +1 -1
  57. data/test/unit/plugins/commands/list-commands/command_test.rb +2 -2
  58. data/test/unit/plugins/commands/login/client_test.rb +5 -1
  59. data/test/unit/plugins/commands/package/command_test.rb +1 -1
  60. data/test/unit/plugins/commands/plugin/action/expunge_plugins_test.rb +1 -1
  61. data/test/unit/plugins/commands/plugin/action/install_gem_test.rb +3 -3
  62. data/test/unit/plugins/commands/plugin/action/plugin_exists_check_test.rb +3 -3
  63. data/test/unit/plugins/commands/plugin/action/uninstall_plugin_test.rb +1 -1
  64. data/test/unit/plugins/commands/plugin/action/update_gems_test.rb +2 -2
  65. data/test/unit/plugins/commands/port/command_test.rb +3 -3
  66. data/test/unit/plugins/commands/push/command_test.rb +1 -1
  67. data/test/unit/plugins/commands/snapshot/command/list_test.rb +2 -3
  68. data/test/unit/plugins/commands/ssh_config/command_test.rb +1 -1
  69. data/test/unit/plugins/commands/up/command_test.rb +69 -2
  70. data/test/unit/plugins/commands/validate/command_test.rb +47 -1
  71. data/test/unit/plugins/communicators/ssh/communicator_test.rb +5 -5
  72. data/test/unit/plugins/communicators/winrm/communicator_test.rb +6 -6
  73. data/test/unit/plugins/communicators/winrm/helper_test.rb +24 -23
  74. data/test/unit/plugins/communicators/winssh/communicator_test.rb +5 -5
  75. data/test/unit/plugins/guests/darwin/cap/shell_expand_guest_path_test.rb +43 -0
  76. data/test/unit/plugins/guests/freebsd/cap/configure_networks_test.rb +1 -1
  77. data/test/unit/plugins/guests/freebsd/cap/shell_expand_guest_path_test.rb +44 -0
  78. data/test/unit/plugins/guests/linux/cap/shell_expand_guest_path_test.rb +43 -0
  79. data/test/unit/plugins/guests/netbsd/cap/shell_expand_guest_path_test.rb +43 -0
  80. data/test/unit/plugins/guests/omnios/cap/mount_nfs_folder_test.rb +1 -3
  81. data/test/unit/plugins/guests/openbsd/cap/shell_expand_guest_path_test.rb +43 -0
  82. data/test/unit/plugins/guests/smartos/cap/change_host_name_test.rb +2 -2
  83. data/test/unit/plugins/guests/smartos/cap/configure_networks_test.rb +2 -2
  84. data/test/unit/plugins/guests/smartos/cap/halt_test.rb +2 -2
  85. data/test/unit/plugins/guests/smartos/cap/insert_public_key_test.rb +1 -1
  86. data/test/unit/plugins/guests/smartos/cap/mount_nfs_test.rb +2 -2
  87. data/test/unit/plugins/guests/smartos/cap/rsync_test.rb +2 -2
  88. data/test/unit/plugins/guests/windows/cap/insert_public_key_test.rb +2 -2
  89. data/test/unit/plugins/guests/windows/cap/remove_public_key_test.rb +4 -3
  90. data/test/unit/plugins/guests/windows/config_test.rb +1 -1
  91. data/test/unit/plugins/guests/windows/guest_network_test.rb +2 -2
  92. data/test/unit/plugins/hosts/linux/cap/nfs_test.rb +2 -0
  93. data/test/unit/plugins/kernel_v2/config/push_test.rb +1 -1
  94. data/test/unit/plugins/kernel_v2/config/vm_test.rb +7 -7
  95. data/test/unit/plugins/providers/docker/action/create_test.rb +1 -1
  96. data/test/unit/plugins/providers/docker/command/exec_test.rb +1 -1
  97. data/test/unit/plugins/providers/docker/config_test.rb +23 -4
  98. data/test/unit/plugins/providers/docker/driver_compose_test.rb +60 -30
  99. data/test/unit/plugins/providers/docker/driver_test.rb +31 -31
  100. data/test/unit/plugins/providers/docker/synced_folder_test.rb +3 -3
  101. data/test/unit/plugins/providers/hyperv/provider_test.rb +19 -19
  102. data/test/unit/plugins/providers/virtualbox/action/network_fix_ipv6_test.rb +2 -2
  103. data/test/unit/plugins/providers/virtualbox/action/network_test.rb +1 -1
  104. data/test/unit/plugins/providers/virtualbox/action/prepare_nfs_settings_test.rb +34 -8
  105. data/test/unit/plugins/providers/virtualbox/action/prepare_nfs_valid_ids_test.rb +3 -3
  106. data/test/unit/plugins/providers/virtualbox/cap_test.rb +2 -2
  107. data/test/unit/plugins/providers/virtualbox/config_test.rb +6 -6
  108. data/test/unit/plugins/providers/virtualbox/synced_folder_test.rb +6 -8
  109. data/test/unit/plugins/provisioners/ansible/config/guest_test.rb +1 -1
  110. data/test/unit/plugins/provisioners/ansible/config/host_test.rb +4 -4
  111. data/test/unit/plugins/provisioners/ansible/config/shared.rb +2 -2
  112. data/test/unit/plugins/provisioners/ansible/provisioner_test.rb +165 -157
  113. data/test/unit/plugins/provisioners/chef/command_builder_test.rb +2 -2
  114. data/test/unit/plugins/provisioners/chef/config/base_test.rb +13 -0
  115. data/test/unit/plugins/provisioners/chef/config/chef_zero_test.rb +11 -0
  116. data/test/unit/plugins/provisioners/chef/omnibus_test.rb +17 -7
  117. data/test/unit/plugins/provisioners/docker/config_test.rb +2 -1
  118. data/test/unit/plugins/provisioners/docker/provisioner_test.rb +13 -13
  119. data/test/unit/plugins/provisioners/file/provisioner_test.rb +32 -14
  120. data/test/unit/plugins/provisioners/puppet/provisioner/puppet_test.rb +51 -0
  121. data/test/unit/plugins/provisioners/salt/provisioner_test.rb +5 -5
  122. data/test/unit/plugins/provisioners/shell/provisioner_test.rb +35 -4
  123. data/test/unit/plugins/pushes/ftp/adapter_test.rb +1 -0
  124. data/test/unit/plugins/synced_folders/nfs/action_cleanup_test.rb +1 -1
  125. data/test/unit/plugins/synced_folders/nfs/config_test.rb +1 -1
  126. data/test/unit/plugins/synced_folders/rsync/command/rsync_auto_test.rb +44 -12
  127. data/test/unit/plugins/synced_folders/rsync/command/rsync_test.rb +5 -5
  128. data/test/unit/plugins/synced_folders/rsync/helper_test.rb +47 -29
  129. data/test/unit/plugins/synced_folders/rsync/synced_folder_test.rb +5 -5
  130. data/test/unit/vagrant/action/builtin/box_add_test.rb +27 -27
  131. data/test/unit/vagrant/action/builtin/box_check_outdated_test.rb +10 -10
  132. data/test/unit/vagrant/action/builtin/box_remove_test.rb +15 -15
  133. data/test/unit/vagrant/action/builtin/confirm_test.rb +1 -1
  134. data/test/unit/vagrant/action/builtin/graceful_halt_test.rb +2 -2
  135. data/test/unit/vagrant/action/builtin/handle_box_test.rb +8 -8
  136. data/test/unit/vagrant/action/builtin/handle_forwarded_port_collisions_test.rb +1 -1
  137. data/test/unit/vagrant/action/builtin/is_env_set_test.rb +2 -2
  138. data/test/unit/vagrant/action/builtin/is_state_test.rb +6 -6
  139. data/test/unit/vagrant/action/builtin/mixin_synced_folders_test.rb +6 -6
  140. data/test/unit/vagrant/action/builtin/provision_test.rb +1 -1
  141. data/test/unit/vagrant/action/builtin/provisioner_cleanup_test.rb +1 -1
  142. data/test/unit/vagrant/action/builtin/synced_folder_cleanup_test.rb +6 -6
  143. data/test/unit/vagrant/action/builtin/synced_folders_test.rb +3 -3
  144. data/test/unit/vagrant/batch_action_test.rb +2 -2
  145. data/test/unit/vagrant/box_collection_test.rb +1 -1
  146. data/test/unit/vagrant/box_test.rb +6 -6
  147. data/test/unit/vagrant/capability_host_test.rb +3 -3
  148. data/test/unit/vagrant/cli_test.rb +3 -3
  149. data/test/unit/vagrant/environment_test.rb +21 -20
  150. data/test/unit/vagrant/guest_test.rb +7 -7
  151. data/test/unit/vagrant/machine_index_test.rb +4 -4
  152. data/test/unit/vagrant/machine_test.rb +28 -17
  153. data/test/unit/vagrant/plugin/manager_test.rb +12 -12
  154. data/test/unit/vagrant/plugin/state_file_test.rb +2 -2
  155. data/test/unit/vagrant/plugin/v1/command_test.rb +9 -8
  156. data/test/unit/vagrant/plugin/v2/command_test.rb +54 -43
  157. data/test/unit/vagrant/plugin/v2/plugin_test.rb +4 -3
  158. data/test/unit/vagrant/plugin/v2/provider_test.rb +3 -3
  159. data/test/unit/vagrant/shared_helpers_test.rb +6 -6
  160. data/test/unit/vagrant/ui_test.rb +21 -21
  161. data/test/unit/vagrant/util/downloader_test.rb +7 -7
  162. data/test/unit/vagrant/util/ssh_test.rb +41 -5
  163. data/test/unit/vagrant/util/subprocess_test.rb +7 -7
  164. data/test/unit/vagrant_test.rb +9 -9
  165. data/vagrant.gemspec +3 -2
  166. data/vendor/bundle/ruby/2.4.0/bundler/gems/vagrant-spec-af86757912f7/vagrant-spec.gemspec +1 -1
  167. data/vendor/bundle/ruby/2.4.0/gems/fake_ftp-0.1.1/.gitignore +7 -0
  168. data/vendor/bundle/ruby/2.4.0/gems/fake_ftp-0.1.1/.rspec +2 -0
  169. data/vendor/bundle/ruby/2.4.0/gems/fake_ftp-0.1.1/.travis.yml +5 -0
  170. data/vendor/bundle/ruby/2.4.0/gems/fake_ftp-0.1.1/CONTRIBUTORS.md +19 -0
  171. data/vendor/bundle/ruby/2.4.0/gems/fake_ftp-0.1.1/Gemfile +12 -0
  172. data/vendor/bundle/ruby/2.4.0/gems/fake_ftp-0.1.1/Gemfile.lock +44 -0
  173. data/vendor/bundle/ruby/2.4.0/gems/fake_ftp-0.1.1/Guardfile +10 -0
  174. data/vendor/bundle/ruby/2.4.0/gems/fake_ftp-0.1.1/README.md +134 -0
  175. data/vendor/bundle/ruby/2.4.0/gems/fake_ftp-0.1.1/Rakefile +10 -0
  176. data/vendor/bundle/ruby/2.4.0/gems/fake_ftp-0.1.1/fake_ftp.gemspec +22 -0
  177. data/vendor/bundle/ruby/2.4.0/gems/fake_ftp-0.1.1/lib/fake_ftp.rb +5 -0
  178. data/vendor/bundle/ruby/2.4.0/gems/fake_ftp-0.1.1/lib/fake_ftp/file.rb +34 -0
  179. data/vendor/bundle/ruby/2.4.0/gems/fake_ftp-0.1.1/lib/fake_ftp/server.rb +340 -0
  180. data/vendor/bundle/ruby/2.4.0/gems/fake_ftp-0.1.1/lib/fake_ftp/version.rb +3 -0
  181. data/vendor/bundle/ruby/2.4.0/gems/fake_ftp-0.1.1/spec/fixtures/invisible_bike.jpg +0 -0
  182. data/vendor/bundle/ruby/2.4.0/gems/fake_ftp-0.1.1/spec/fixtures/text_file.txt +1 -0
  183. data/vendor/bundle/ruby/2.4.0/gems/fake_ftp-0.1.1/spec/functional/server_spec.rb +468 -0
  184. data/vendor/bundle/ruby/2.4.0/gems/fake_ftp-0.1.1/spec/integration/server_spec.rb +81 -0
  185. data/vendor/bundle/ruby/2.4.0/gems/fake_ftp-0.1.1/spec/models/fake_ftp/file_spec.rb +102 -0
  186. data/vendor/bundle/ruby/2.4.0/gems/fake_ftp-0.1.1/spec/models/fake_ftp/server_spec.rb +76 -0
  187. data/vendor/bundle/ruby/2.4.0/gems/fake_ftp-0.1.1/spec/spec_helper.rb +18 -0
  188. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/.gitignore +14 -0
  189. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/.rubocop.yml +57 -0
  190. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/.travis.yml +21 -0
  191. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/CONTRIBUTING.rdoc +36 -0
  192. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/Gemfile +3 -0
  193. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/History.rdoc +2247 -0
  194. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/MIT-LICENSE +21 -0
  195. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/README.rdoc +156 -0
  196. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/Rakefile +38 -0
  197. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/appveyor.yml +21 -0
  198. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/bin/console +7 -0
  199. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/bin/setup +6 -0
  200. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/doc/command_line_usage.rdoc +158 -0
  201. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/doc/example/Rakefile1 +38 -0
  202. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/doc/example/Rakefile2 +35 -0
  203. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/doc/example/a.c +6 -0
  204. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/doc/example/b.c +6 -0
  205. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/doc/example/main.c +11 -0
  206. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/doc/glossary.rdoc +42 -0
  207. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/doc/jamis.rb +591 -0
  208. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/doc/proto_rake.rdoc +127 -0
  209. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/doc/rake.1 +156 -0
  210. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/doc/rakefile.rdoc +622 -0
  211. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/doc/rational.rdoc +151 -0
  212. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/exe/rake +27 -0
  213. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake.rb +70 -0
  214. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/application.rb +785 -0
  215. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/backtrace.rb +23 -0
  216. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/clean.rb +77 -0
  217. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/cloneable.rb +16 -0
  218. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/cpu_counter.rb +106 -0
  219. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/default_loader.rb +14 -0
  220. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/dsl_definition.rb +194 -0
  221. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/early_time.rb +21 -0
  222. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/ext/core.rb +25 -0
  223. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/ext/string.rb +175 -0
  224. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/file_creation_task.rb +24 -0
  225. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/file_list.rb +434 -0
  226. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/file_task.rb +46 -0
  227. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/file_utils.rb +136 -0
  228. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/file_utils_ext.rb +144 -0
  229. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/invocation_chain.rb +56 -0
  230. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/invocation_exception_mixin.rb +16 -0
  231. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/late_time.rb +17 -0
  232. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/linked_list.rb +111 -0
  233. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/loaders/makefile.rb +53 -0
  234. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/multi_task.rb +49 -0
  235. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/name_space.rb +37 -0
  236. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/packagetask.rb +210 -0
  237. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/phony.rb +15 -0
  238. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/private_reader.rb +20 -0
  239. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/promise.rb +99 -0
  240. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/pseudo_status.rb +29 -0
  241. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/rake_module.rb +38 -0
  242. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/rake_test_loader.rb +21 -0
  243. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/rule_recursion_overflow_error.rb +19 -0
  244. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/scope.rb +42 -0
  245. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/task.rb +390 -0
  246. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/task_argument_error.rb +7 -0
  247. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/task_arguments.rb +108 -0
  248. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/task_manager.rb +303 -0
  249. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/tasklib.rb +11 -0
  250. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/testtask.rb +222 -0
  251. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/thread_history_display.rb +48 -0
  252. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/thread_pool.rb +162 -0
  253. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/trace_output.rb +22 -0
  254. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/version.rb +9 -0
  255. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/win32.rb +50 -0
  256. data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/rake.gemspec +39 -0
  257. data/vendor/bundle/ruby/2.4.0/gems/rspec-its-1.2.0/.gitignore +19 -0
  258. data/vendor/bundle/ruby/2.4.0/gems/rspec-its-1.2.0/.rspec +3 -0
  259. data/vendor/bundle/ruby/2.4.0/gems/rspec-its-1.2.0/.travis.yml +24 -0
  260. data/vendor/bundle/ruby/2.4.0/gems/rspec-its-1.2.0/Changelog.md +49 -0
  261. data/vendor/bundle/ruby/2.4.0/gems/rspec-its-1.2.0/Gemfile +26 -0
  262. data/vendor/bundle/ruby/2.4.0/gems/rspec-its-1.2.0/LICENSE.txt +27 -0
  263. data/vendor/bundle/ruby/2.4.0/gems/rspec-its-1.2.0/README.md +72 -0
  264. data/vendor/bundle/ruby/2.4.0/gems/rspec-its-1.2.0/Rakefile +16 -0
  265. data/vendor/bundle/ruby/2.4.0/gems/rspec-its-1.2.0/cucumber.yml +2 -0
  266. data/vendor/bundle/ruby/2.4.0/gems/rspec-its-1.2.0/features/its.feature +125 -0
  267. data/vendor/bundle/ruby/2.4.0/gems/rspec-its-1.2.0/features/step_definitions/additional_cli_steps.rb +21 -0
  268. data/vendor/bundle/ruby/2.4.0/gems/rspec-its-1.2.0/features/support/env.rb +23 -0
  269. data/vendor/bundle/ruby/2.4.0/gems/rspec-its-1.2.0/lib/rspec/its.rb +149 -0
  270. data/vendor/bundle/ruby/2.4.0/gems/rspec-its-1.2.0/lib/rspec/its/version.rb +5 -0
  271. data/vendor/bundle/ruby/2.4.0/gems/rspec-its-1.2.0/rspec-its.gemspec +28 -0
  272. data/vendor/bundle/ruby/2.4.0/gems/rspec-its-1.2.0/script/test_all +20 -0
  273. data/vendor/bundle/ruby/2.4.0/gems/rspec-its-1.2.0/spec/rspec/its_spec.rb +237 -0
  274. data/vendor/bundle/ruby/2.4.0/gems/rspec-its-1.2.0/spec/spec_helper.rb +15 -0
  275. data/vendor/bundle/ruby/2.4.0/specifications/fake_ftp-0.1.1.gemspec +20 -0
  276. data/vendor/bundle/ruby/2.4.0/specifications/rake-12.0.0.gemspec +43 -0
  277. data/vendor/bundle/ruby/2.4.0/specifications/rspec-its-1.2.0.gemspec +47 -0
  278. data/version.txt +1 -1
  279. metadata +137 -7
  280. data/2.14.0 +0 -5
@@ -16,10 +16,10 @@ module VagrantPlugins
16
16
  argv = parse_options(opts)
17
17
  return if !argv
18
18
 
19
- # Validate the configuration
20
- @env.machine(@env.machine_names.first, @env.default_provider).action_raw(
21
- :config_validate,
22
- Vagrant::Action::Builtin::ConfigValidate)
19
+ # Validate the configuration of all machines
20
+ with_target_vms() do |machine|
21
+ machine.action_raw(:config_validate, Vagrant::Action::Builtin::ConfigValidate)
22
+ end
23
23
 
24
24
  @env.ui.info(I18n.t("vagrant.commands.validate.success"))
25
25
 
@@ -4,7 +4,7 @@ module VagrantPlugins
4
4
  class ShellExpandGuestPath
5
5
  def self.shell_expand_guest_path(machine, path)
6
6
  real_path = nil
7
- machine.communicate.execute("printf #{path}") do |type, data|
7
+ machine.communicate.execute("printf \"#{path}\"") do |type, data|
8
8
  if type == :stdout
9
9
  real_path ||= ""
10
10
  real_path += data
@@ -14,7 +14,7 @@ module VagrantPlugins
14
14
  if !real_path
15
15
  # If no real guest path was detected, this is really strange
16
16
  # and we raise an exception because this is a bug.
17
- raise ShellExpandFailed
17
+ raise Vagrant::Errors::ShellExpandFailed
18
18
  end
19
19
 
20
20
  # Chomp the string so that any trailing newlines are killed
@@ -18,7 +18,7 @@ module VagrantPlugins
18
18
  # Remove any previous network additions to the configuration file.
19
19
  commands << "sed -i'' -e '/^#VAGRANT-BEGIN/,/^#VAGRANT-END/ d' /etc/rc.conf"
20
20
 
21
- comm.sudo("ifconfig -a | grep -o ^[0-9a-z]* | grep -v '^lo'", options) do |_, stdout|
21
+ comm.sudo("ifconfig -a | grep -o '^[0-9a-z]*' | grep -v '^lo'", options) do |_, stdout|
22
22
  interfaces = stdout.split("\n")
23
23
  end
24
24
 
@@ -4,7 +4,7 @@ module VagrantPlugins
4
4
  class ShellExpandGuestPath
5
5
  def self.shell_expand_guest_path(machine, path)
6
6
  real_path = nil
7
- machine.communicate.execute("printf #{path}",
7
+ machine.communicate.execute("printf \"#{path}\"",
8
8
  shell: "sh") do |type, data|
9
9
  if type == :stdout
10
10
  real_path ||= ""
@@ -15,7 +15,7 @@ module VagrantPlugins
15
15
  if !real_path
16
16
  # If no real guest path was detected, this is really strange
17
17
  # and we raise an exception because this is a bug.
18
- raise ShellExpandFailed
18
+ raise Vagrant::Errors::ShellExpandFailed
19
19
  end
20
20
 
21
21
  # Chomp the string so that any trailing newlines are killed
@@ -4,7 +4,7 @@ module VagrantPlugins
4
4
  class ShellExpandGuestPath
5
5
  def self.shell_expand_guest_path(machine, path)
6
6
  real_path = nil
7
- machine.communicate.execute("echo; printf #{path}") do |type, data|
7
+ machine.communicate.execute("echo; printf \"#{path}\"") do |type, data|
8
8
  if type == :stdout
9
9
  real_path ||= ""
10
10
  real_path += data
@@ -19,7 +19,7 @@ module VagrantPlugins
19
19
  if !real_path
20
20
  # If no real guest path was detected, this is really strange
21
21
  # and we raise an exception because this is a bug.
22
- raise ShellExpandFailed
22
+ raise Vagrant::Errors::ShellExpandFailed
23
23
  end
24
24
 
25
25
  # Chomp the string so that any trailing newlines are killed
@@ -4,7 +4,7 @@ module VagrantPlugins
4
4
  class ShellExpandGuestPath
5
5
  def self.shell_expand_guest_path(machine, path)
6
6
  real_path = nil
7
- machine.communicate.execute("printf #{path}") do |type, data|
7
+ machine.communicate.execute("printf \"#{path}\"") do |type, data|
8
8
  if type == :stdout
9
9
  real_path ||= ""
10
10
  real_path += data
@@ -14,7 +14,7 @@ module VagrantPlugins
14
14
  if !real_path
15
15
  # If no real guest path was detected, this is really strange
16
16
  # and we raise an exception because this is a bug.
17
- raise ShellExpandFailed
17
+ raise Vagrant::Errors::ShellExpandFailed
18
18
  end
19
19
 
20
20
  # Chomp the string so that any trailing newlines are killed
@@ -4,7 +4,7 @@ module VagrantPlugins
4
4
  class ShellExpandGuestPath
5
5
  def self.shell_expand_guest_path(machine, path)
6
6
  real_path = nil
7
- machine.communicate.execute("printf #{path}") do |type, data|
7
+ machine.communicate.execute("printf \"#{path}\"") do |type, data|
8
8
  if type == :stdout
9
9
  real_path ||= ""
10
10
  real_path += data
@@ -14,7 +14,7 @@ module VagrantPlugins
14
14
  if !real_path
15
15
  # If no real guest path was detected, this is really strange
16
16
  # and we raise an exception because this is a bug.
17
- raise ShellExpandFailed
17
+ raise Vagrant::Errors::ShellExpandFailed
18
18
  end
19
19
 
20
20
  # Chomp the string so that any trailing newlines are killed
@@ -6,7 +6,12 @@ module VagrantPlugins
6
6
  class PublicKey
7
7
  def self.insert_public_key(machine, contents)
8
8
  if machine.communicate.is_a?(CommunicatorWinSSH::Communicator)
9
- winssh_insert_public_key(machine, contents)
9
+ contents = contents.strip
10
+ winssh_modify_authorized_keys machine do |keys|
11
+ if !keys.include?(contents)
12
+ keys << contents
13
+ end
14
+ end
10
15
  else
11
16
  raise Vagrant::Errors::SSHInsertKeyUnsupported
12
17
  end
@@ -14,73 +19,44 @@ module VagrantPlugins
14
19
 
15
20
  def self.remove_public_key(machine, contents)
16
21
  if machine.communicate.is_a?(CommunicatorWinSSH::Communicator)
17
- winssh_remove_public_key(machine, contents)
22
+ winssh_modify_authorized_keys machine do |keys|
23
+ keys.delete(contents)
24
+ end
18
25
  else
19
26
  raise Vagrant::Errors::SSHInsertKeyUnsupported
20
27
  end
21
28
  end
22
29
 
23
- def self.winssh_insert_public_key(machine, contents)
30
+ def self.winssh_modify_authorized_keys(machine)
24
31
  comm = machine.communicate
25
- contents = contents.strip
26
-
27
32
  directories = fetch_guest_paths(comm)
28
33
  home_dir = directories[:home]
29
34
  temp_dir = directories[:temp]
30
35
 
31
- remote_ssh_dir = "#{home_dir}\\.ssh"
32
- remote_upload_path = "#{temp_dir}\\vagrant-insert-pubkey-#{Time.now.to_i}"
33
- remote_authkeys_path = "#{remote_ssh_dir}\authorized_keys"
34
-
35
36
  # Ensure the user's ssh directory exists
37
+ remote_ssh_dir = "#{home_dir}\\.ssh"
36
38
  comm.execute("dir \"#{remote_ssh_dir}\"\n if errorlevel 1 (mkdir \"#{remote_ssh_dir}\")", shell: "cmd")
37
39
  remote_upload_path = "#{temp_dir}\\vagrant-insert-pubkey-#{Time.now.to_i}"
38
40
  remote_authkeys_path = "#{remote_ssh_dir}\\authorized_keys"
39
41
 
40
42
  keys_file = Tempfile.new("vagrant-windows-insert-public-key")
43
+ keys_file.close
41
44
  # Check if an authorized_keys file already exists
42
45
  result = comm.execute("dir \"#{remote_authkeys_path}\"", shell: "cmd", error_check: false)
43
46
  if result == 0
44
- keys_file.close
45
47
  comm.download(remote_authkeys_path, keys_file.path)
46
- current_content = File.read(keys_file.path).split(/[\r\n]+/)
47
- if !current_content.include?(contents)
48
- current_content << contents
49
- end
50
- File.write(keys_file.path, current_content.join("\r\n") + "\r\n")
48
+ keys = File.read(keys_file.path).split(/[\r\n]+/)
51
49
  else
52
- keys_file.puts(contents)
53
- keys_file.close
50
+ keys = []
54
51
  end
55
- keys_file.delete
52
+ yield keys
53
+ File.write(keys_file.path, keys.join("\r\n") + "\r\n")
56
54
  comm.upload(keys_file.path, remote_upload_path)
57
- comm.execute("move /y \"#{remote_upload_path}\" \"#{remote_authkeys_path}\"", shell: "cmd")
58
- end
59
-
60
- def self.winssh_remove_public_key(machine, contents)
61
- comm = machine.communicate
62
-
63
- directories = fetch_guest_paths(comm)
64
- home_dir = directories[:home]
65
- temp_dir = directories[:temp]
66
-
67
- remote_ssh_dir = "#{home_dir}\\.ssh"
68
- remote_upload_path = "#{temp_dir}\\vagrant-remove-pubkey-#{Time.now.to_i}"
69
- remote_authkeys_path = "#{remote_ssh_dir}\\authorized_keys"
70
-
71
- # Check if an authorized_keys file already exists
72
- result = comm.execute("dir \"#{remote_authkeys_path}\"", shell: "cmd", error_check: false)
73
- if result == 0
74
- keys_file = Tempfile.new("vagrant-windows-remove-public-key")
75
- keys_file.close
76
- comm.download(remote_authkeys_path, keys_file.path)
77
- current_content = File.read(keys_file.path).split(/[\r\n]+/)
78
- current_content.delete(contents)
79
- File.write(keys_file.path, current_content.join("\r\n") + "\r\n")
80
- comm.upload(keys_file.path, remote_upload_path)
81
- keys_file.delete
82
- comm.execute("move /y \"#{remote_upload_path}\" \"#{remote_authkeys_path}\"", shell: "cmd")
83
- end
55
+ keys_file.delete
56
+ comm.execute <<-EOC.gsub(/^\s*/, ""), shell: "powershell"
57
+ Set-Acl "#{remote_upload_path}" (Get-Acl "#{remote_authkeys_path}")
58
+ Move-Item -Force "#{remote_upload_path}" "#{remote_authkeys_path}"
59
+ EOC
84
60
  end
85
61
 
86
62
  # Fetch user's temporary and home directory paths from the Windows guest
@@ -11,6 +11,7 @@ module VagrantPlugins
11
11
  attr_accessor :paranoid
12
12
  attr_accessor :compression
13
13
  attr_accessor :dsa_authentication
14
+ attr_accessor :extra_args
14
15
 
15
16
  def initialize
16
17
  @host = UNSET_VALUE
@@ -23,6 +24,7 @@ module VagrantPlugins
23
24
  @paranoid = UNSET_VALUE
24
25
  @compression = UNSET_VALUE
25
26
  @dsa_authentication = UNSET_VALUE
27
+ @extra_args = UNSET_VALUE
26
28
  end
27
29
 
28
30
  def finalize!
@@ -36,6 +38,7 @@ module VagrantPlugins
36
38
  @paranoid = false if @paranoid == UNSET_VALUE
37
39
  @compression = true if @compression == UNSET_VALUE
38
40
  @dsa_authentication = true if @dsa_authentication == UNSET_VALUE
41
+ @extra_args = nil if @extra_args == UNSET_VALUE
39
42
 
40
43
  if @private_key_path && !@private_key_path.is_a?(Array)
41
44
  @private_key_path = [@private_key_path]
@@ -281,6 +281,10 @@ module VagrantPlugins
281
281
  errors << I18n.t("docker_provider.errors.config.compose_configuration_hash")
282
282
  end
283
283
 
284
+ if @compose && @force_host_vm
285
+ errors << I18n.t("docker_provider.errors.config.compose_force_vm")
286
+ end
287
+
284
288
  if !@create_args.is_a?(Array)
285
289
  errors << I18n.t("docker_provider.errors.config.create_args_array")
286
290
  end
@@ -83,20 +83,27 @@ module VagrantPlugins
83
83
  # need to worry about uniqueness with compose
84
84
  name = machine.name.to_s
85
85
  image = params.fetch(:image)
86
- links = params.fetch(:links)
86
+ links = Array(params.fetch(:links, [])).map do |link|
87
+ case link
88
+ when Array
89
+ link
90
+ else
91
+ link.to_s.split(":")
92
+ end
93
+ end
87
94
  ports = Array(params[:ports])
88
95
  volumes = Array(params[:volumes]).map do |v|
89
96
  v = v.to_s
97
+ host, guest = v.split(":", 2)
90
98
  if v.include?(":") && (Vagrant::Util::Platform.windows? || Vagrant::Util::Platform.wsl?)
91
- host, guest = v.split(":", 2)
92
99
  host = Vagrant::Util::Platform.windows_path(host)
93
100
  # NOTE: Docker does not support UNC style paths (which also
94
101
  # means that there's no long path support). Hopefully this
95
102
  # will be fixed someday and the gsub below can be removed.
96
103
  host.gsub!(/^[^A-Za-z]+/, "")
97
- v = [host, guest].join(":")
98
104
  end
99
- v
105
+ host = @machine.env.cwd.join(host).to_s
106
+ "#{host}:#{guest}"
100
107
  end
101
108
  cmd = Array(params.fetch(:cmd))
102
109
  env = Hash[*params.fetch(:env).flatten.map(&:to_s)]
@@ -23,19 +23,23 @@ module VagrantPlugins
23
23
  return if env[:interrupted]
24
24
 
25
25
  # Try to get the IP
26
- network_info = env[:machine].provider.driver.read_guest_ip
27
- guest_ip = network_info["ip"]
28
-
29
- if guest_ip
30
- begin
31
- IPAddr.new(guest_ip)
32
- break
33
- rescue IPAddr::InvalidAddressError
34
- # Ignore, continue looking.
35
- @logger.warn("Invalid IP address returned: #{guest_ip}")
26
+ begin
27
+ network_info = env[:machine].provider.driver.read_guest_ip
28
+ guest_ip = network_info["ip"]
29
+
30
+ if guest_ip
31
+ begin
32
+ IPAddr.new(guest_ip)
33
+ break
34
+ rescue IPAddr::InvalidAddressError
35
+ # Ignore, continue looking.
36
+ @logger.warn("Invalid IP address returned: #{guest_ip}")
37
+ end
36
38
  end
39
+ rescue Errors::PowerShellError
40
+ # Ignore, continue looking.
41
+ @logger.warn("Failed to read guest IP.")
37
42
  end
38
-
39
43
  sleep 1
40
44
  end
41
45
  end
@@ -7,21 +7,36 @@ Param(
7
7
  $Dir = Split-Path $script:MyInvocation.MyCommand.Path
8
8
  . ([System.IO.Path]::Combine($Dir, "utils\write_messages.ps1"))
9
9
 
10
- $ip_address = ""
11
10
  $vm = Get-VM -Id $VmId -ErrorAction "Stop"
12
11
  $networks = Get-VMNetworkAdapter -VM $vm
13
12
  foreach ($network in $networks) {
14
13
  if ($network.IpAddresses.Length -gt 0) {
15
- $ip_address = $network.IpAddresses[0]
16
- if (-Not ([string]::IsNullOrEmpty($ip_address))) {
17
- # We found our IP address!
18
- break
14
+ foreach ($ip_address in $network.IpAddresses) {
15
+ if ($ip_address.Contains(".")) {
16
+ $ip4_address = $ip_address
17
+ } elseif ($ip_address.Contains(":")) {
18
+ $ip6_address = $ip_address
19
+ }
20
+ if (-Not ([string]::IsNullOrEmpty($ip4_address)) -Or -Not ([string]::IsNullOrEmpty($ip6_address))) {
21
+ # We found our IP address!
22
+ break
23
+ }
19
24
  }
20
25
  }
21
26
  }
22
27
 
23
- $resultHash = @{
24
- ip = "$ip_address"
28
+ if (-Not ([string]::IsNullOrEmpty($ip4_address))) {
29
+ $guest_ipaddress = $ip4_address
30
+ } elseif (-Not ([string]::IsNullOrEmpty($ip6_address))) {
31
+ $guest_ipaddress = $ip6_address
32
+ }
33
+
34
+ if (-Not ([string]::IsNullOrEmpty($guest_ipaddress))) {
35
+ $resultHash = @{
36
+ ip = $guest_ipaddress
37
+ }
38
+ $result = ConvertTo-Json $resultHash
39
+ Write-Output-Message $result
40
+ } else {
41
+ Write-Error-Message "Failed to determine IP address"
25
42
  }
26
- $result = ConvertTo-Json $resultHash
27
- Write-Output-Message $result
@@ -1,3 +1,4 @@
1
+ require "ipaddr"
1
2
  require "vagrant/action/builtin/mixin_synced_folders"
2
3
 
3
4
  module VagrantPlugins
@@ -59,6 +60,23 @@ module VagrantPlugins
59
60
  end
60
61
  end
61
62
 
63
+ if host_ip && !machine_ip.empty?
64
+ interface = @machine.provider.driver.read_host_only_interfaces.detect do |iface|
65
+ iface[:ip] == host_ip
66
+ end
67
+ host_ipaddr = IPAddr.new("#{host_ip}/#{interface.fetch(:netmask, "0.0.0.0")}")
68
+
69
+ case machine_ip
70
+ when String
71
+ machine_ip = nil if !host_ipaddr.include?(machine_ip)
72
+ when Array
73
+ machine_ip.delete_if do |m_ip|
74
+ !host_ipaddr.include?(m_ip)
75
+ end
76
+ machine_ip = nil if machine_ip.empty?
77
+ end
78
+ end
79
+
62
80
  raise Vagrant::Errors::NFSNoHostonlyNetwork if !host_ip || !machine_ip
63
81
 
64
82
  env[:nfs_host_ip] = host_ip
@@ -255,7 +255,7 @@ module VagrantPlugins
255
255
  # Multiple Private Keys
256
256
  unless !config.inventory_path && @ssh_info[:private_key_path].size == 1
257
257
  @ssh_info[:private_key_path].each do |key|
258
- ssh_options << "-i '#{key}'"
258
+ ssh_options += ["-o", "IdentityFile=%s" % [key.gsub('%', '%%')]]
259
259
  end
260
260
  end
261
261
 
@@ -5,11 +5,11 @@ module VagrantPlugins
5
5
  module Cap
6
6
  module Debian
7
7
  module ChefInstall
8
- def self.chef_install(machine, project, version, channel, options = {})
8
+ def self.chef_install(machine, project, version, channel, omnibus_url, options = {})
9
9
  machine.communicate.sudo("apt-get update -y -qq")
10
10
  machine.communicate.sudo("apt-get install -y -qq curl")
11
11
 
12
- command = Omnibus.sh_command(project, version, channel, options)
12
+ command = Omnibus.sh_command(project, version, channel, omnibus_url, options)
13
13
  machine.communicate.sudo(command)
14
14
  end
15
15
  end
@@ -5,10 +5,10 @@ module VagrantPlugins
5
5
  module Cap
6
6
  module FreeBSD
7
7
  module ChefInstall
8
- def self.chef_install(machine, project, version, channel, options = {})
8
+ def self.chef_install(machine, project, version, channel, omnibus_url, options = {})
9
9
  machine.communicate.sudo("pkg install -y -qq curl bash")
10
10
 
11
- command = Omnibus.sh_command(project, version, channel, options)
11
+ command = Omnibus.sh_command(project, version, channel, omnibus_url, options)
12
12
  machine.communicate.sudo(command)
13
13
  end
14
14
  end
@@ -5,12 +5,12 @@ module VagrantPlugins
5
5
  module Cap
6
6
  module OmniOS
7
7
  module ChefInstall
8
- def self.chef_install(machine, project, version, channel, options = {})
8
+ def self.chef_install(machine, project, version, channel, omnibus_url, options = {})
9
9
  su = machine.config.solaris.suexec_cmd
10
10
 
11
11
  machine.communicate.execute("#{su} pkg list --no-refresh web/curl > /dev/null 2>&1 || pkg install -q --accept web/curl")
12
12
 
13
- command = Omnibus.sh_command(project, version, channel, options)
13
+ command = Omnibus.sh_command(project, version, channel, omnibus_url, options)
14
14
  machine.communicate.execute("#{su} #{command}")
15
15
  end
16
16
  end