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
@@ -21,14 +21,14 @@ describe VagrantPlugins::SyncedFolderRSync::Command::Rsync do
21
21
 
22
22
  subject do
23
23
  described_class.new(argv, iso_env).tap do |s|
24
- s.stub(synced_folders: synced_folders)
24
+ allow(s).to receive(:synced_folders).and_return(synced_folders)
25
25
  end
26
26
  end
27
27
 
28
28
  before do
29
29
  iso_env.machine_names.each do |name|
30
30
  m = iso_env.machine(name, iso_env.default_provider)
31
- m.stub(communicate: communicator)
31
+ allow(m).to receive(:communicate).and_return(communicator)
32
32
  end
33
33
  end
34
34
 
@@ -41,8 +41,8 @@ describe VagrantPlugins::SyncedFolderRSync::Command::Rsync do
41
41
  let(:machine) { iso_env.machine(iso_env.machine_names[0], iso_env.default_provider) }
42
42
 
43
43
  before do
44
- communicator.stub(ready?: true)
45
- machine.stub(ssh_info: ssh_info)
44
+ allow(communicator).to receive(:ready?).and_return(true)
45
+ allow(machine).to receive(:ssh_info).and_return(ssh_info)
46
46
 
47
47
  synced_folders[:rsync] = [
48
48
  [:one, {}],
@@ -51,7 +51,7 @@ describe VagrantPlugins::SyncedFolderRSync::Command::Rsync do
51
51
  end
52
52
 
53
53
  it "doesn't sync if communicator isn't ready and exits with 1" do
54
- communicator.stub(ready?: false)
54
+ allow(communicator).to receive(:ready?).and_return(false)
55
55
 
56
56
  expect(helper_class).to receive(:rsync_single).never
57
57
 
@@ -20,7 +20,7 @@ describe VagrantPlugins::SyncedFolderRSync::RsyncHelper do
20
20
  subject { described_class }
21
21
 
22
22
  before do
23
- machine.stub(guest: guest)
23
+ allow(machine).to receive(:guest).and_return(guest)
24
24
 
25
25
  # Don't do all the crazy Cygwin stuff
26
26
  allow(Vagrant::Util::Platform).to receive(:cygwin_path) do |path, **opts|
@@ -64,9 +64,9 @@ describe VagrantPlugins::SyncedFolderRSync::RsyncHelper do
64
64
  let(:ui) { machine.ui }
65
65
 
66
66
  before do
67
- Vagrant::Util::Subprocess.stub(execute: result)
67
+ allow(Vagrant::Util::Subprocess).to receive(:execute){ result }
68
68
 
69
- guest.stub(capability?: false)
69
+ allow(guest).to receive(:capability?){ false }
70
70
  end
71
71
 
72
72
  it "doesn't raise an error if it succeeds" do
@@ -74,25 +74,25 @@ describe VagrantPlugins::SyncedFolderRSync::RsyncHelper do
74
74
  end
75
75
 
76
76
  it "doesn't call cygwin_path on non-Windows" do
77
- Vagrant::Util::Platform.stub(windows?: false)
77
+ allow(Vagrant::Util::Platform).to receive(:windows?).and_return(false)
78
78
  expect(Vagrant::Util::Platform).not_to receive(:cygwin_path)
79
79
  subject.rsync_single(machine, ssh_info, opts)
80
80
  end
81
81
 
82
82
  it "calls cygwin_path on Windows" do
83
- Vagrant::Util::Platform.stub(windows?: true)
83
+ allow(Vagrant::Util::Platform).to receive(:windows?).and_return(true)
84
84
  expect(Vagrant::Util::Platform).to receive(:cygwin_path).and_return("foo")
85
85
 
86
- expect(Vagrant::Util::Subprocess).to receive(:execute).with { |*args|
86
+ expect(Vagrant::Util::Subprocess).to receive(:execute).with(any_args) { |*args|
87
87
  expect(args[args.length - 3]).to eql("foo/")
88
- }
88
+ }.and_return(result)
89
89
 
90
90
  subject.rsync_single(machine, ssh_info, opts)
91
91
  end
92
92
 
93
93
  it "raises an error if the exit code is non-zero" do
94
- Vagrant::Util::Subprocess.stub(
95
- execute: Vagrant::Util::Subprocess::Result.new(1, "", ""))
94
+ allow(Vagrant::Util::Subprocess).to receive(:execute)
95
+ .and_return(Vagrant::Util::Subprocess::Result.new(1, "", ""))
96
96
 
97
97
  expect {subject.rsync_single(machine, ssh_info, opts) }.
98
98
  to raise_error(Vagrant::Errors::RSyncError)
@@ -103,11 +103,11 @@ describe VagrantPlugins::SyncedFolderRSync::RsyncHelper do
103
103
  opts[:hostpath] = "/foo"
104
104
  opts[:guestpath] = "/bar"
105
105
 
106
- expect(Vagrant::Util::Subprocess).to receive(:execute).with { |*args|
106
+ expect(Vagrant::Util::Subprocess).to receive(:execute).with(any_args) { |*args|
107
107
  expected = Vagrant::Util::Platform.fs_real_path("/foo").to_s
108
108
  expect(args[args.length - 3]).to eql("#{expected}/")
109
109
  expect(args[args.length - 2]).to include("/bar")
110
- }
110
+ }.and_return(result)
111
111
 
112
112
  subject.rsync_single(machine, ssh_info, opts)
113
113
  end
@@ -118,22 +118,22 @@ describe VagrantPlugins::SyncedFolderRSync::RsyncHelper do
118
118
 
119
119
  hostpath_expanded = File.expand_path(opts[:hostpath], machine.env.root_path)
120
120
 
121
- expect(Vagrant::Util::Subprocess).to receive(:execute).with { |*args|
121
+ expect(Vagrant::Util::Subprocess).to receive(:execute).with(any_args) { |*args|
122
122
  expect(args[args.length - 3]).to eql("#{hostpath_expanded}/")
123
123
  expect(args[args.length - 2]).to include("/bar")
124
- }
124
+ }.and_return(result)
125
125
 
126
126
  subject.rsync_single(machine, ssh_info, opts)
127
127
  end
128
128
  end
129
129
 
130
130
  it "executes within the root path" do
131
- expect(Vagrant::Util::Subprocess).to receive(:execute).with { |*args|
131
+ expect(Vagrant::Util::Subprocess).to receive(:execute).with(any_args) { |*args|
132
132
  expect(args.last).to be_kind_of(Hash)
133
133
 
134
134
  opts = args.last
135
135
  expect(opts[:workdir]).to eql(machine.env.root_path.to_s)
136
- }
136
+ }.and_return(result)
137
137
 
138
138
  subject.rsync_single(machine, ssh_info, opts)
139
139
  end
@@ -158,11 +158,11 @@ describe VagrantPlugins::SyncedFolderRSync::RsyncHelper do
158
158
  it "excludes files if given as a string" do
159
159
  opts[:exclude] = "foo"
160
160
 
161
- expect(Vagrant::Util::Subprocess).to receive(:execute).with { |*args|
161
+ expect(Vagrant::Util::Subprocess).to receive(:execute).with(any_args) { |*args|
162
162
  index = args.find_index("foo")
163
163
  expect(index).to be > 0
164
164
  expect(args[index-1]).to eql("--exclude")
165
- }
165
+ }.and_return(result)
166
166
 
167
167
  subject.rsync_single(machine, ssh_info, opts)
168
168
  end
@@ -170,7 +170,7 @@ describe VagrantPlugins::SyncedFolderRSync::RsyncHelper do
170
170
  it "excludes multiple files" do
171
171
  opts[:exclude] = ["foo", "bar"]
172
172
 
173
- expect(Vagrant::Util::Subprocess).to receive(:execute).with { |*args|
173
+ expect(Vagrant::Util::Subprocess).to receive(:execute).with(any_args) { |*args|
174
174
  index = args.find_index("foo")
175
175
  expect(index).to be > 0
176
176
  expect(args[index-1]).to eql("--exclude")
@@ -178,7 +178,7 @@ describe VagrantPlugins::SyncedFolderRSync::RsyncHelper do
178
178
  index = args.find_index("bar")
179
179
  expect(index).to be > 0
180
180
  expect(args[index-1]).to eql("--exclude")
181
- }
181
+ }.and_return(result)
182
182
 
183
183
  subject.rsync_single(machine, ssh_info, opts)
184
184
  end
@@ -186,14 +186,14 @@ describe VagrantPlugins::SyncedFolderRSync::RsyncHelper do
186
186
 
187
187
  context "custom arguments" do
188
188
  it "uses the default arguments if not given" do
189
- expect(Vagrant::Util::Subprocess).to receive(:execute).with { |*args|
189
+ expect(Vagrant::Util::Subprocess).to receive(:execute).with(any_args) { |*args|
190
190
  expect(args[1]).to eq("--verbose")
191
191
  expect(args[2]).to eq("--archive")
192
192
  expect(args[3]).to eq("--delete")
193
193
 
194
194
  expected = Vagrant::Util::Platform.fs_real_path("/foo").to_s
195
195
  expect(args[args.length - 3]).to eql("#{expected}/")
196
- }
196
+ }.and_return(result)
197
197
 
198
198
  subject.rsync_single(machine, ssh_info, opts)
199
199
  end
@@ -201,13 +201,13 @@ describe VagrantPlugins::SyncedFolderRSync::RsyncHelper do
201
201
  it "uses the custom arguments if given" do
202
202
  opts[:args] = ["--verbose", "-z"]
203
203
 
204
- expect(Vagrant::Util::Subprocess).to receive(:execute).with { |*args|
204
+ expect(Vagrant::Util::Subprocess).to receive(:execute).with(any_args) { |*args|
205
205
  expect(args[1]).to eq("--verbose")
206
206
  expect(args[2]).to eq("-z")
207
207
 
208
208
  expected = Vagrant::Util::Platform.fs_real_path("/foo").to_s
209
209
  expect(args[args.length - 3]).to eql("#{expected}/")
210
- }
210
+ }.and_return(result)
211
211
 
212
212
  subject.rsync_single(machine, ssh_info, opts)
213
213
  end
@@ -228,19 +228,37 @@ describe VagrantPlugins::SyncedFolderRSync::RsyncHelper do
228
228
  let(:ui) { machine.ui }
229
229
 
230
230
  before do
231
- Vagrant::Util::Subprocess.stub(execute: result)
231
+ allow(Vagrant::Util::Subprocess).to receive(:execute){ result }
232
232
 
233
- guest.stub(capability?: false)
233
+ allow(guest).to receive(:capability?){ false }
234
+ end
235
+
236
+ context "with an IPv6 address" do
237
+ before { ssh_info[:host] = "fe00::0" }
238
+
239
+ it "formats the address correctly" do
240
+ expect(Vagrant::Util::Subprocess).to receive(:execute).with(any_args, "@[#{ssh_info[:host]}]:''", instance_of(Hash))
241
+ subject.rsync_single(machine, ssh_info, opts)
242
+ end
243
+ end
244
+
245
+ context "with an IPv4 address" do
246
+ before { ssh_info[:host] = "127.0.0.1" }
247
+
248
+ it "formats the address correctly" do
249
+ expect(Vagrant::Util::Subprocess).to receive(:execute).with(any_args, "@#{ssh_info[:host]}:''", instance_of(Hash))
250
+ subject.rsync_single(machine, ssh_info, opts)
251
+ end
234
252
  end
235
253
 
236
254
  it "includes IdentitiesOnly, StrictHostKeyChecking, and UserKnownHostsFile with defaults" do
237
255
 
238
- expect(Vagrant::Util::Subprocess).to receive(:execute).with { |*args|
256
+ expect(Vagrant::Util::Subprocess).to receive(:execute).with(any_args) { |*args|
239
257
  expect(args[9]).to include('IdentitiesOnly')
240
258
  expect(args[9]).to include('StrictHostKeyChecking')
241
259
  expect(args[9]).to include('UserKnownHostsFile')
242
260
  expect(args[9]).to include("-i '/path/to/key'")
243
- }
261
+ }.and_return(result)
244
262
 
245
263
  subject.rsync_single(machine, ssh_info, opts)
246
264
  end
@@ -248,7 +266,7 @@ describe VagrantPlugins::SyncedFolderRSync::RsyncHelper do
248
266
  it "omits IdentitiesOnly with keys_only = false" do
249
267
  ssh_info[:keys_only] = false
250
268
 
251
- Vagrant::Util::Subprocess.should_receive(:execute) do |*args|
269
+ expect(Vagrant::Util::Subprocess).to receive(:execute) do |*args|
252
270
  expect(args[9]).not_to include('IdentitiesOnly')
253
271
  result
254
272
  end
@@ -259,7 +277,7 @@ describe VagrantPlugins::SyncedFolderRSync::RsyncHelper do
259
277
  it "omits StrictHostKeyChecking and UserKnownHostsFile with paranoid = true" do
260
278
  ssh_info[:keys_only] = false
261
279
 
262
- Vagrant::Util::Subprocess.should_receive(:execute) do |*args|
280
+ expect(Vagrant::Util::Subprocess).to receive(:execute) do |*args|
263
281
  expect(args[9]).not_to include('StrictHostKeyChecking ')
264
282
  expect(args[9]).not_to include('UserKnownHostsFile ')
265
283
  result
@@ -19,19 +19,19 @@ describe VagrantPlugins::SyncedFolderRSync::SyncedFolder do
19
19
  let(:helper_class) { VagrantPlugins::SyncedFolderRSync::RsyncHelper }
20
20
 
21
21
  before do
22
- machine.env.stub(host: host)
23
- machine.stub(guest: guest)
22
+ allow(machine.env).to receive(:host).and_return(host)
23
+ allow(machine).to receive(:guest).and_return(guest)
24
24
  end
25
25
 
26
26
  describe "#usable?" do
27
27
  it "is usable if rsync can be found" do
28
28
  expect(Vagrant::Util::Which).to receive(:which).with("rsync").and_return(true)
29
- expect(subject.usable?(machine)).to be_true
29
+ expect(subject.usable?(machine)).to be(true)
30
30
  end
31
31
 
32
32
  it "is not usable if rsync cant be found" do
33
33
  expect(Vagrant::Util::Which).to receive(:which).with("rsync").and_return(false)
34
- expect(subject.usable?(machine)).to be_false
34
+ expect(subject.usable?(machine)).to be(false)
35
35
  end
36
36
 
37
37
  it "raises an exception if asked to" do
@@ -47,7 +47,7 @@ describe VagrantPlugins::SyncedFolderRSync::SyncedFolder do
47
47
  }}
48
48
 
49
49
  before do
50
- machine.stub(ssh_info: ssh_info)
50
+ allow(machine).to receive(:ssh_info).and_return(ssh_info)
51
51
  allow(guest).to receive(:capability?).with(:rsync_installed)
52
52
  end
53
53
 
@@ -81,7 +81,7 @@ describe Vagrant::Action::Builtin::BoxAdd, :skip_windows do
81
81
  end
82
82
 
83
83
  before do
84
- box_collection.stub(find: nil)
84
+ allow(box_collection).to receive(:find).and_return(nil)
85
85
  end
86
86
 
87
87
  context "with box file directly" do
@@ -91,7 +91,7 @@ describe Vagrant::Action::Builtin::BoxAdd, :skip_windows do
91
91
  env[:box_name] = "foo"
92
92
  env[:box_url] = box_path.to_s
93
93
 
94
- expect(box_collection).to receive(:add).with { |path, name, version, **opts|
94
+ expect(box_collection).to receive(:add).with(any_args) { |path, name, version, **opts|
95
95
  expect(checksum(path)).to eq(checksum(box_path))
96
96
  expect(name).to eq("foo")
97
97
  expect(version).to eq("0")
@@ -113,7 +113,7 @@ describe Vagrant::Action::Builtin::BoxAdd, :skip_windows do
113
113
  box_path.to_s,
114
114
  ]
115
115
 
116
- expect(box_collection).to receive(:add).with { |path, name, version, **opts|
116
+ expect(box_collection).to receive(:add).with(any_args) { |path, name, version, **opts|
117
117
  expect(checksum(path)).to eq(checksum(box_path))
118
118
  expect(name).to eq("foo")
119
119
  expect(version).to eq("0")
@@ -132,7 +132,7 @@ describe Vagrant::Action::Builtin::BoxAdd, :skip_windows do
132
132
  env[:box_name] = "foo"
133
133
  env[:box_url] = "http://127.0.0.1:#{port}/#{box_path.basename}"
134
134
 
135
- expect(box_collection).to receive(:add).with { |path, name, version, **opts|
135
+ expect(box_collection).to receive(:add).with(any_args) { |path, name, version, **opts|
136
136
  expect(checksum(path)).to eq(checksum(box_path))
137
137
  expect(name).to eq("foo")
138
138
  expect(version).to eq("0")
@@ -152,7 +152,7 @@ describe Vagrant::Action::Builtin::BoxAdd, :skip_windows do
152
152
  env[:box_name] = "foo"
153
153
  env[:box_url] = "ftp://127.0.0.1:#{port}/#{box_path.basename}"
154
154
 
155
- expect(box_collection).to receive(:add).with { |path, name, version, **opts|
155
+ expect(box_collection).to receive(:add).with(any_args) { |path, name, version, **opts|
156
156
  expect(checksum(path)).to eq(checksum(box_path))
157
157
  expect(name).to eq("foo")
158
158
  expect(version).to eq("0")
@@ -267,8 +267,8 @@ describe Vagrant::Action::Builtin::BoxAdd, :skip_windows do
267
267
  env[:box_url] = box_path.to_s
268
268
  env[:box_provider] = "virtualbox"
269
269
 
270
- box_collection.stub(find: box)
271
- expect(box_collection).to receive(:add).with { |path, name, version, **opts|
270
+ allow(box_collection).to receive(:find).and_return(box)
271
+ expect(box_collection).to receive(:add).with(any_args) { |path, name, version, **opts|
272
272
  expect(checksum(path)).to eq(checksum(box_path))
273
273
  expect(name).to eq("foo")
274
274
  expect(version).to eq("0")
@@ -288,7 +288,7 @@ describe Vagrant::Action::Builtin::BoxAdd, :skip_windows do
288
288
  box_url_name = "http://127.0.0.1:#{port}/#{box_path.basename}"
289
289
  env[:box_name] = box_url_name
290
290
 
291
- expect(box_collection).to receive(:add).with { |path, name, version, **opts|
291
+ expect(box_collection).to receive(:add).with(any_args) { |path, name, version, **opts|
292
292
  expect(name).to eq(box_url_name)
293
293
  expect(version).to eq("0")
294
294
  expect(opts[:metadata_url]).to be_nil
@@ -313,7 +313,7 @@ describe Vagrant::Action::Builtin::BoxAdd, :skip_windows do
313
313
  box_url_name = "box name with spaces"
314
314
  env[:box_name] = box_url_name
315
315
 
316
- expect(box_collection).to receive(:add).with { |path, name, version, **opts|
316
+ expect(box_collection).to receive(:add).with(any_args) { |path, name, version, **opts|
317
317
  expect(name).to eq(box_url_name)
318
318
  expect(version).to eq("0")
319
319
  expect(opts[:metadata_url]).to be_nil
@@ -337,7 +337,7 @@ describe Vagrant::Action::Builtin::BoxAdd, :skip_windows do
337
337
  env[:box_name] = "foo"
338
338
  env[:box_url] = "http://#{username}:#{password}@127.0.0.1:#{port}/#{box_path.basename}"
339
339
 
340
- expect(box_collection).to receive(:add).with { |path, name, version, **opts|
340
+ expect(box_collection).to receive(:add).with(any_args) { |path, name, version, **opts|
341
341
  expect(checksum(path)).to eq(checksum(box_path))
342
342
  expect(name).to eq("foo")
343
343
  expect(version).to eq("0")
@@ -385,7 +385,7 @@ describe Vagrant::Action::Builtin::BoxAdd, :skip_windows do
385
385
  with_web_server(md_path) do |port|
386
386
  env[:box_url] = "http://127.0.0.1:#{port}/#{md_path.basename}"
387
387
 
388
- expect(box_collection).to receive(:add).with { |path, name, version, **opts|
388
+ expect(box_collection).to receive(:add).with(any_args) { |path, name, version, **opts|
389
389
  expect(name).to eq("foo/bar")
390
390
  expect(version).to eq("0.7")
391
391
  expect(checksum(path)).to eq(checksum(box_path))
@@ -430,7 +430,7 @@ describe Vagrant::Action::Builtin::BoxAdd, :skip_windows do
430
430
  with_web_server(md_path, **opts) do |port|
431
431
  env[:box_url] = "http://127.0.0.1:#{port}/#{md_path.basename}"
432
432
 
433
- expect(box_collection).to receive(:add).with { |path, name, version, **opts|
433
+ expect(box_collection).to receive(:add).with(any_args) { |path, name, version, **opts|
434
434
  expect(name).to eq("foo/bar")
435
435
  expect(version).to eq("0.7")
436
436
  expect(checksum(path)).to eq(checksum(box_path))
@@ -475,7 +475,7 @@ describe Vagrant::Action::Builtin::BoxAdd, :skip_windows do
475
475
  url = "http://127.0.0.1:#{port}"
476
476
  env[:box_url] = "mitchellh/precise64.json"
477
477
 
478
- expect(box_collection).to receive(:add).with { |path, name, version, **opts|
478
+ expect(box_collection).to receive(:add).with(any_args) { |path, name, version, **opts|
479
479
  expect(name).to eq("mitchellh/precise64")
480
480
  expect(version).to eq("0.7")
481
481
  expect(checksum(path)).to eq(checksum(box_path))
@@ -526,7 +526,7 @@ describe Vagrant::Action::Builtin::BoxAdd, :skip_windows do
526
526
  env[:box_url] = "mitchellh/precise64.json"
527
527
  env[:box_server_url] = url
528
528
 
529
- expect(box_collection).to receive(:add).with { |path, name, version, **opts|
529
+ expect(box_collection).to receive(:add).with(any_args) { |path, name, version, **opts|
530
530
  expect(name).to eq("mitchellh/precise64")
531
531
  expect(version).to eq("0.7")
532
532
  expect(checksum(path)).to eq(checksum(box_path))
@@ -587,7 +587,7 @@ describe Vagrant::Action::Builtin::BoxAdd, :skip_windows do
587
587
  end
588
588
  end
589
589
 
590
- expect(box_collection).to receive(:add).with { |path, name, version, **opts|
590
+ expect(box_collection).to receive(:add).with(any_args) { |path, name, version, **opts|
591
591
  expect(name).to eq("foo/bar")
592
592
  expect(version).to eq("0.7")
593
593
  expect(checksum(path)).to eq(checksum(box_path))
@@ -632,7 +632,7 @@ describe Vagrant::Action::Builtin::BoxAdd, :skip_windows do
632
632
  with_web_server(md_path) do |port|
633
633
  env[:box_url] = "http://127.0.0.1:#{port}/#{md_path.basename}"
634
634
 
635
- expect(box_collection).to receive(:add).with { |path, name, version, **opts|
635
+ expect(box_collection).to receive(:add).with(any_args) { |path, name, version, **opts|
636
636
  expect(name).to eq("foo/bar")
637
637
  expect(version).to eq("0.7")
638
638
  expect(checksum(path)).to eq(checksum(box_path))
@@ -691,7 +691,7 @@ describe Vagrant::Action::Builtin::BoxAdd, :skip_windows do
691
691
  expect(box_collection).to receive(:add).never
692
692
  expect(app).to receive(:call).never
693
693
 
694
- Vagrant.stub(server_url: nil)
694
+ allow(Vagrant).to receive(:server_url).and_return(nil)
695
695
 
696
696
  expect { subject.call(env) }.
697
697
  to raise_error(Vagrant::Errors::BoxServerNotSet)
@@ -776,7 +776,7 @@ describe Vagrant::Action::Builtin::BoxAdd, :skip_windows do
776
776
  end
777
777
 
778
778
  env[:box_url] = tf.path
779
- expect(box_collection).to receive(:add).with { |path, name, version, **opts|
779
+ expect(box_collection).to receive(:add).with(any_args) { |path, name, version, **opts|
780
780
  expect(checksum(path)).to eq(checksum(box_path))
781
781
  expect(name).to eq("foo/bar")
782
782
  expect(version).to eq("0.7")
@@ -820,7 +820,7 @@ describe Vagrant::Action::Builtin::BoxAdd, :skip_windows do
820
820
 
821
821
  env[:box_url] = tf.path
822
822
  env[:box_provider] = "vmware"
823
- expect(box_collection).to receive(:add).with { |path, name, version, **opts|
823
+ expect(box_collection).to receive(:add).with(any_args) { |path, name, version, **opts|
824
824
  expect(checksum(path)).to eq(checksum(box_path))
825
825
  expect(name).to eq("foo/bar")
826
826
  expect(version).to eq("0.7")
@@ -869,7 +869,7 @@ describe Vagrant::Action::Builtin::BoxAdd, :skip_windows do
869
869
 
870
870
  env[:box_url] = tf.path
871
871
  env[:box_provider] = "vmware"
872
- expect(box_collection).to receive(:add).with { |path, name, version, **opts|
872
+ expect(box_collection).to receive(:add).with(any_args) { |path, name, version, **opts|
873
873
  expect(checksum(path)).to eq(checksum(box_path))
874
874
  expect(name).to eq("foo/bar")
875
875
  expect(version).to eq("0.7")
@@ -909,7 +909,7 @@ describe Vagrant::Action::Builtin::BoxAdd, :skip_windows do
909
909
 
910
910
  env[:box_url] = tf.path
911
911
  env[:box_version] = "~> 0.1"
912
- expect(box_collection).to receive(:add).with { |path, name, version, **opts|
912
+ expect(box_collection).to receive(:add).with(any_args) { |path, name, version, **opts|
913
913
  expect(checksum(path)).to eq(checksum(box_path))
914
914
  expect(name).to eq("foo/bar")
915
915
  expect(version).to eq("0.5")
@@ -954,7 +954,7 @@ describe Vagrant::Action::Builtin::BoxAdd, :skip_windows do
954
954
  env[:box_url] = tf.path
955
955
  env[:box_provider] = "vmware"
956
956
  env[:box_version] = "~> 0.1"
957
- expect(box_collection).to receive(:add).with { |path, name, version, **opts|
957
+ expect(box_collection).to receive(:add).with(any_args) { |path, name, version, **opts|
958
958
  expect(checksum(path)).to eq(checksum(box_path))
959
959
  expect(name).to eq("foo/bar")
960
960
  expect(version).to eq("0.5")
@@ -1002,7 +1002,7 @@ describe Vagrant::Action::Builtin::BoxAdd, :skip_windows do
1002
1002
 
1003
1003
  env[:box_url] = tf.path
1004
1004
  env[:box_provider] = ["virtualbox", "vmware"]
1005
- expect(box_collection).to receive(:add).with { |path, name, version, **opts|
1005
+ expect(box_collection).to receive(:add).with(any_args) { |path, name, version, **opts|
1006
1006
  expect(checksum(path)).to eq(checksum(box_path))
1007
1007
  expect(name).to eq("foo/bar")
1008
1008
  expect(version).to eq("0.7")
@@ -1050,7 +1050,7 @@ describe Vagrant::Action::Builtin::BoxAdd, :skip_windows do
1050
1050
 
1051
1051
  expect(env[:ui]).to receive(:ask).and_return("1")
1052
1052
 
1053
- expect(box_collection).to receive(:add).with { |path, name, version, **opts|
1053
+ expect(box_collection).to receive(:add).with(any_args) { |path, name, version, **opts|
1054
1054
  expect(checksum(path)).to eq(checksum(box_path))
1055
1055
  expect(name).to eq("foo/bar")
1056
1056
  expect(version).to eq("0.7")
@@ -1225,12 +1225,12 @@ describe Vagrant::Action::Builtin::BoxAdd, :skip_windows do
1225
1225
 
1226
1226
  env[:box_force] = true
1227
1227
  env[:box_url] = tf.path
1228
- box_collection.stub(find: box)
1229
- expect(box_collection).to receive(:add).with { |path, name, version, **opts|
1228
+ allow(box_collection).to receive(:find).and_return(box)
1229
+ expect(box_collection).to receive(:add).with(any_args) { |path, name, version, **opts|
1230
1230
  expect(checksum(path)).to eq(checksum(box_path))
1231
1231
  expect(name).to eq("foo/bar")
1232
1232
  expect(version).to eq("0.7")
1233
- expect(opts[:force]).to be_true
1233
+ expect(opts[:force]).to be(true)
1234
1234
  expect(opts[:metadata_url]).to eq("file://#{tf.path}")
1235
1235
  true
1236
1236
  }.and_return(box)