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
@@ -12,8 +12,8 @@ describe "VagrantPlugins::GuestSmartos::Cap::ChangeHostName" do
12
12
  let(:config) { double("config", smartos: VagrantPlugins::GuestSmartos::Config.new) }
13
13
 
14
14
  before do
15
- machine.stub(:communicate).and_return(comm)
16
- machine.stub(:config).and_return(config)
15
+ allow(machine).to receive(:communicate).and_return(comm)
16
+ allow(machine).to receive(:config).and_return(config)
17
17
  end
18
18
 
19
19
  after do
@@ -7,8 +7,8 @@ describe "VagrantPlugins::VagrantPlugins::Cap::ConfigureNetworks" do
7
7
  let(:communicator) { VagrantTests::DummyCommunicator::Communicator.new(machine) }
8
8
 
9
9
  before do
10
- machine.stub(:communicate).and_return(communicator)
11
- machine.stub(:config).and_return(config)
10
+ allow(machine).to receive(:communicate).and_return(communicator)
11
+ allow(machine).to receive(:config).and_return(config)
12
12
  end
13
13
 
14
14
  after do
@@ -8,8 +8,8 @@ describe "VagrantPlugins::GuestSmartos::Cap::Halt" do
8
8
  let(:shutdown_command){ "pfexec /usr/sbin/poweroff" }
9
9
 
10
10
  before do
11
- machine.stub(:communicate).and_return(communicator)
12
- machine.stub(:config).and_return(config)
11
+ allow(machine).to receive(:communicate).and_return(communicator)
12
+ allow(machine).to receive(:config).and_return(config)
13
13
  end
14
14
 
15
15
  after do
@@ -11,7 +11,7 @@ describe "VagrantPlugins::GuestSmartos::Cap::InsertPublicKey" do
11
11
  let(:comm) { VagrantTests::DummyCommunicator::Communicator.new(machine) }
12
12
 
13
13
  before do
14
- machine.stub(:communicate).and_return(comm)
14
+ allow(machine).to receive(:communicate).and_return(comm)
15
15
  end
16
16
 
17
17
  after do
@@ -13,8 +13,8 @@ describe "VagrantPlugins::GuestSmartos::Cap::MountNFS" do
13
13
  let(:config) { double("config", smartos: VagrantPlugins::GuestSmartos::Config.new) }
14
14
 
15
15
  before do
16
- machine.stub(:communicate).and_return(comm)
17
- machine.stub(:config).and_return(config)
16
+ allow(machine).to receive(:communicate).and_return(comm)
17
+ allow(machine).to receive(:config).and_return(config)
18
18
  end
19
19
 
20
20
  after do
@@ -7,8 +7,8 @@ describe "VagrantPlugins::VagrantPlugins::Cap::Rsync" do
7
7
  let(:communicator) { VagrantTests::DummyCommunicator::Communicator.new(machine) }
8
8
 
9
9
  before do
10
- machine.stub(:communicate).and_return(communicator)
11
- machine.stub(:config).and_return(config)
10
+ allow(machine).to receive(:communicate).and_return(communicator)
11
+ allow(machine).to receive(:config).and_return(config)
12
12
  end
13
13
 
14
14
  after do
@@ -41,7 +41,7 @@ describe "VagrantPlugins::GuestWindows::Cap::InsertPublicKey" do
41
41
  it "inserts the public key" do
42
42
  expect(comm).to receive(:download)
43
43
  expect(comm).to receive(:upload)
44
- expect(comm).to receive(:execute).with(/move .*/, shell: "cmd")
44
+ expect(comm).to receive(:execute).with(/Set-Acl .*/, shell: "powershell")
45
45
  cap.insert_public_key(machine, "ssh-rsa ...")
46
46
  expect(File.read(@tempfile.path)).to include("ssh-rsa ...")
47
47
  end
@@ -56,7 +56,7 @@ describe "VagrantPlugins::GuestWindows::Cap::InsertPublicKey" do
56
56
  it "inserts the public key" do
57
57
  expect(comm).to_not receive(:download)
58
58
  expect(comm).to receive(:upload)
59
- expect(comm).to receive(:execute).with(/move .*/, shell: "cmd")
59
+ expect(comm).to receive(:execute).with(/Set-Acl .*/, shell: "powershell")
60
60
  cap.insert_public_key(machine, "ssh-rsa ...")
61
61
  expect(File.read(@tempfile.path)).to include("ssh-rsa ...")
62
62
  end
@@ -27,6 +27,7 @@ describe "VagrantPlugins::GuestWindows::Cap::RemovePublicKey" do
27
27
  allow(machine).to receive(:communicate).and_return(comm)
28
28
 
29
29
  allow(comm).to receive(:execute).with(/echo .+/, shell: "cmd").and_yield(:stdout, "TEMP\r\nHOME\r\n")
30
+ allow(comm).to receive(:execute).with(/dir .+\.ssh/, shell: "cmd")
30
31
  allow(comm).to receive(:execute).with(/dir .+authorized_keys/, shell: "cmd", error_check: false).and_return(auth_keys_check_result)
31
32
  end
32
33
 
@@ -47,7 +48,7 @@ describe "VagrantPlugins::GuestWindows::Cap::RemovePublicKey" do
47
48
  it "removes the public key" do
48
49
  expect(comm).to receive(:download)
49
50
  expect(comm).to receive(:upload)
50
- expect(comm).to receive(:execute).with(/move .*/, shell: "cmd")
51
+ expect(comm).to receive(:execute).with(/Set-Acl .*/, shell: "powershell")
51
52
  cap.remove_public_key(machine, public_key_insecure)
52
53
  expect(File.read(@tempfile.path)).to include(public_key_other)
53
54
  expect(File.read(@tempfile.path)).to_not include(public_key_insecure)
@@ -57,8 +58,8 @@ describe "VagrantPlugins::GuestWindows::Cap::RemovePublicKey" do
57
58
  context "when authorized_keys does not exist on guest" do
58
59
  it "does nothing" do
59
60
  expect(comm).to_not receive(:download)
60
- expect(comm).to_not receive(:upload)
61
- expect(comm).to_not receive(:execute).with(/move .*/, shell: "cmd")
61
+ expect(comm).to receive(:upload)
62
+ expect(comm).to receive(:execute).with(/Set-Acl .*/, shell: "powershell")
62
63
  cap.remove_public_key(machine, public_key_insecure)
63
64
  end
64
65
  end
@@ -23,7 +23,7 @@ describe VagrantPlugins::GuestWindows::Config do
23
23
  it "should not default #{attribute} if overridden" do
24
24
  subject.send("#{attribute}=".to_sym, 10)
25
25
  subject.finalize!
26
- subject.send(attribute).should == 10
26
+ expect(subject.send(attribute)).to be(10)
27
27
  end
28
28
 
29
29
  it "should return error #{attribute} if nil" do
@@ -12,14 +12,14 @@ describe "VagrantPlugins::GuestWindows::GuestNetwork" do
12
12
  expect(communicator).to receive(:test).with(
13
13
  /.+Get-WmiObject -Class Win32_NetworkAdapterConfiguration -Filter "Index=7 and DHCPEnabled=True"/).
14
14
  and_return(true)
15
- expect(subject.is_dhcp_enabled(7)).to be_true
15
+ expect(subject.is_dhcp_enabled(7)).to be(true)
16
16
  end
17
17
 
18
18
  it "should return false for non-DHCP NICs" do
19
19
  expect(communicator).to receive(:test).with(
20
20
  /.+Get-WmiObject -Class Win32_NetworkAdapterConfiguration -Filter "Index=8 and DHCPEnabled=True"/).
21
21
  and_return(false)
22
- expect(subject.is_dhcp_enabled(8)).to be_false
22
+ expect(subject.is_dhcp_enabled(8)).to be(false)
23
23
  end
24
24
  end
25
25
 
@@ -147,10 +147,12 @@ EOH
147
147
 
148
148
  it "should retain existing file owner and group IDs" do
149
149
  pending("investigate using a simulated FS to test")
150
+ test_with_simulated_fs
150
151
  end
151
152
 
152
153
  it "should raise custom exception when chown fails" do
153
154
  pending("investigate using a simulated FS to test")
155
+ test_with_simulated_fs
154
156
  end
155
157
  end
156
158
  end
@@ -71,7 +71,7 @@ describe VagrantPlugins::Kernel_V2::PushConfig do
71
71
  describe "#__compiled_pushes" do
72
72
  it "raises an exception if not finalized" do
73
73
  subject.instance_variable_set(:@__finalized, false)
74
- expect { subject.__compiled_pushes }.to raise_error
74
+ expect { subject.__compiled_pushes }.to raise_error(RuntimeError)
75
75
  end
76
76
 
77
77
  it "returns a copy of the compiled pushes" do
@@ -32,10 +32,10 @@ describe VagrantPlugins::Kernel_V2::VMConfig do
32
32
 
33
33
  before do
34
34
  env = double("env")
35
- env.stub(root_path: nil)
36
- machine.stub(env: env)
37
- machine.stub(provider_config: nil)
38
- machine.stub(provider_options: {})
35
+ allow(env).to receive(:root_path).and_return(nil)
36
+ allow(machine).to receive(:env).and_return(env)
37
+ allow(machine).to receive(:provider_config).and_return(nil)
38
+ allow(machine).to receive(:provider_options).and_return({})
39
39
 
40
40
  subject.box = "foo"
41
41
  end
@@ -356,7 +356,7 @@ describe VagrantPlugins::Kernel_V2::VMConfig do
356
356
 
357
357
  config = subject.get_provider_config(:virtualbox)
358
358
  expect(config.name).to eq("foo")
359
- expect(config.gui).to be_true
359
+ expect(config.gui).to be(true)
360
360
  end
361
361
 
362
362
  it "raises an exception if there is a problem loading" do
@@ -543,7 +543,7 @@ describe VagrantPlugins::Kernel_V2::VMConfig do
543
543
  sf = subject.synced_folders
544
544
  expect(sf.length).to eq(1)
545
545
  expect(sf).to have_key("/vagrant")
546
- expect(sf["/vagrant"][:disabled]).to be_true
546
+ expect(sf["/vagrant"][:disabled]).to be(true)
547
547
  end
548
548
 
549
549
  it "allows overriding previously set options" do
@@ -553,7 +553,7 @@ describe VagrantPlugins::Kernel_V2::VMConfig do
553
553
  sf = subject.synced_folders
554
554
  expect(sf.length).to eq(1)
555
555
  expect(sf).to have_key("/vagrant")
556
- expect(sf["/vagrant"][:disabled]).to be_false
556
+ expect(sf["/vagrant"][:disabled]).to be(false)
557
557
  expect(sf["/vagrant"][:foo]).to eq(:bar)
558
558
  end
559
559
 
@@ -15,7 +15,7 @@ describe VagrantPlugins::DockerProvider::Action::Create do
15
15
 
16
16
  let(:machine) do
17
17
  iso_env.machine(iso_env.machine_names[0], :virtualbox).tap do |m|
18
- m.provider.stub(driver: driver)
18
+ allow(m.provider).to receive(:driver).and_return(driver)
19
19
  end
20
20
  end
21
21
 
@@ -22,7 +22,7 @@ describe VagrantPlugins::DockerProvider::Command::Exec do
22
22
  end
23
23
 
24
24
  before do
25
- Vagrant.plugin("2").manager.stub(commands: {})
25
+ allow(Vagrant.plugin("2").manager).to receive(:commands).and_return({})
26
26
  allow(subject).to receive(:exec_command)
27
27
  end
28
28
 
@@ -46,11 +46,11 @@ describe VagrantPlugins::DockerProvider::Config do
46
46
  its(:expose) { should eq([]) }
47
47
  its(:cmd) { should eq([]) }
48
48
  its(:env) { should eq({}) }
49
- its(:force_host_vm) { should be_false }
49
+ its(:force_host_vm) { should be(false) }
50
50
  its(:host_vm_build_dir_options) { should be_nil }
51
51
  its(:image) { should be_nil }
52
52
  its(:name) { should be_nil }
53
- its(:privileged) { should be_false }
53
+ its(:privileged) { should be(false) }
54
54
  its(:stop_timeout) { should eq(1) }
55
55
  its(:vagrant_machine) { should be_nil }
56
56
  its(:vagrant_vagrantfile) { should be_nil }
@@ -63,8 +63,8 @@ describe VagrantPlugins::DockerProvider::Config do
63
63
 
64
64
  before do
65
65
  # By default lets be Linux for validations
66
- Vagrant::Util::Platform.stub(linux: true)
67
- Vagrant::Util::Platform.stub(linux?: true)
66
+ allow(Vagrant::Util::Platform).to receive(:linux).and_return(true)
67
+ allow(Vagrant::Util::Platform).to receive(:linux?).and_return(true)
68
68
  end
69
69
 
70
70
  it "should be invalid if both build dir and image are set" do
@@ -89,6 +89,25 @@ describe VagrantPlugins::DockerProvider::Config do
89
89
  end
90
90
  end
91
91
 
92
+ describe "#compose" do
93
+ before do
94
+ valid_defaults
95
+ end
96
+
97
+ it "should be valid when enabled" do
98
+ subject.compose = true
99
+ subject.finalize!
100
+ assert_valid
101
+ end
102
+
103
+ it "should be invalid when force_host_vm is enabled" do
104
+ subject.compose = true
105
+ subject.force_host_vm = true
106
+ subject.finalize!
107
+ assert_invalid
108
+ end
109
+ end
110
+
92
111
  describe "#create_args" do
93
112
  before do
94
113
  valid_defaults
@@ -41,13 +41,14 @@ describe VagrantPlugins::DockerProvider::Driver::Compose do
41
41
  allow(Vagrant::Util::Which).to receive(:which).and_return("/dev/null/docker-compose")
42
42
  allow(env).to receive(:lock).and_yield
43
43
  allow(Pathname).to receive(:new).with(local_data_path).and_return(local_data_path)
44
+ allow(Pathname).to receive(:new).with('/host/path').and_call_original
44
45
  allow(local_data_path).to receive(:join).and_return(data_directory)
45
46
  allow(data_directory).to receive(:mkpath)
46
47
  allow(FileUtils).to receive(:mv)
47
48
  allow(Tempfile).to receive(:new).with("vagrant-docker-compose").and_return(docker_yml)
48
49
  allow(docker_yml).to receive(:write)
49
50
  allow(docker_yml).to receive(:close)
50
- subject.stub(:execute) do |*args|
51
+ allow(subject).to receive(:execute) do |*args|
51
52
  args.delete_if{|i| i.is_a?(Hash) }
52
53
  @cmd = args.join(' ')
53
54
  end
@@ -82,11 +83,34 @@ describe VagrantPlugins::DockerProvider::Driver::Compose do
82
83
  expect(docker_yml).to receive(:write).with(/#{params[:volumes]}/)
83
84
  end
84
85
 
86
+ context 'when links are provided as strings' do
87
+ before{ params[:links] = ["linkl1:linkr1", "linkl2:linkr2"] }
88
+
89
+ it 'links containers' do
90
+ params[:links].flatten.map{|l| l.split(':')}.each do |link|
91
+ expect(docker_yml).to receive(:write).with(/#{link}/)
92
+ end
93
+ subject.create(params)
94
+ end
95
+ end
96
+
97
+ context 'with relative path in share folders' do
98
+ before do
99
+ params[:volumes] = './path:guest/path'
100
+ allow(Pathname).to receive(:new).with('./path').and_call_original
101
+ allow(Pathname).to receive(:new).with('/compose/cwd/path').and_call_original
102
+ end
103
+
104
+ it 'should expand the relative host directory' do
105
+ expect(docker_yml).to receive(:write).with(%r{/compose/cwd/path})
106
+ end
107
+ end
108
+
85
109
  it 'links containers' do
86
110
  params[:links].each do |link|
87
111
  expect(docker_yml).to receive(:write).with(/#{link}/)
88
- subject.create(params)
89
112
  end
113
+ subject.create(params)
90
114
  end
91
115
 
92
116
  it 'sets environmental variables' do
@@ -115,19 +139,21 @@ describe VagrantPlugins::DockerProvider::Driver::Compose do
115
139
  end
116
140
 
117
141
  context 'when container exists' do
118
- before { subject.stub(execute: "foo\n#{cid}\nbar") }
119
- it { expect(result).to be_true }
142
+ before { allow(subject).to receive(:execute)
143
+ .and_return("foo\n#{cid}\nbar") }
144
+ it { expect(result).to be_truthy }
120
145
  end
121
146
 
122
147
  context 'when container does not exist' do
123
- before { subject.stub(execute: "foo\n#{cid}extra\nbar") }
124
- it { expect(result).to be_false }
148
+ before { allow(subject).to receive(:execute)
149
+ .and_return("foo\n#{cid}extra\nbar") }
150
+ it { expect(result).to be_falsey }
125
151
  end
126
152
  end
127
153
 
128
154
  describe '#pull' do
129
155
  it 'should pull images' do
130
- subject.should_receive(:execute).with('docker', 'pull', 'foo')
156
+ expect(subject).to receive(:execute).with('docker', 'pull', 'foo')
131
157
  subject.pull('foo')
132
158
  end
133
159
  end
@@ -142,43 +168,47 @@ describe VagrantPlugins::DockerProvider::Driver::Compose do
142
168
  end
143
169
 
144
170
  context 'when container exists' do
145
- before { subject.stub(execute: "foo\n#{cid}\nbar") }
146
- it { expect(result).to be_true }
171
+ before { allow(subject).to receive(:execute)
172
+ .and_return("foo\n#{cid}\nbar") }
173
+ it { expect(result).to be_truthy }
147
174
  end
148
175
 
149
176
  context 'when container does not exist' do
150
- before { subject.stub(execute: "foo\n#{cid}extra\nbar") }
151
- it { expect(result).to be_false }
177
+ before { allow(subject).to receive(:execute)
178
+ .and_return("foo\n#{cid}extra\nbar") }
179
+ it { expect(result).to be_falsey }
152
180
  end
153
181
  end
154
182
 
155
183
  describe '#privileged?' do
156
184
  it 'identifies privileged containers' do
157
- subject.stub(inspect_container: {'HostConfig' => {"Privileged" => true}})
185
+ allow(subject).to receive(:inspect_container)
186
+ .and_return({'HostConfig' => {"Privileged" => true}})
158
187
  expect(subject).to be_privileged(cid)
159
188
  end
160
189
 
161
190
  it 'identifies unprivileged containers' do
162
- subject.stub(inspect_container: {'HostConfig' => {"Privileged" => false}})
191
+ allow(subject).to receive(:inspect_container)
192
+ .and_return({'HostConfig' => {"Privileged" => false}})
163
193
  expect(subject).to_not be_privileged(cid)
164
194
  end
165
195
  end
166
196
 
167
197
  describe '#start' do
168
198
  context 'when container is running' do
169
- before { subject.stub(running?: true) }
199
+ before { allow(subject).to receive(:running?).and_return(true) }
170
200
 
171
201
  it 'does not start the container' do
172
- subject.should_not_receive(:execute).with('docker', 'start', cid)
202
+ expect(subject).not_to receive(:execute).with('docker', 'start', cid)
173
203
  subject.start(cid)
174
204
  end
175
205
  end
176
206
 
177
207
  context 'when container is not running' do
178
- before { subject.stub(running?: false) }
208
+ before { allow(subject).to receive(:running?).and_return(false) }
179
209
 
180
210
  it 'starts the container' do
181
- subject.should_receive(:execute).with('docker', 'start', cid)
211
+ expect(subject).to receive(:execute).with('docker', 'start', cid)
182
212
  subject.start(cid)
183
213
  end
184
214
  end
@@ -186,24 +216,24 @@ describe VagrantPlugins::DockerProvider::Driver::Compose do
186
216
 
187
217
  describe '#stop' do
188
218
  context 'when container is running' do
189
- before { subject.stub(running?: true) }
219
+ before { allow(subject).to receive(:running?).and_return(true) }
190
220
 
191
221
  it 'stops the container' do
192
- subject.should_receive(:execute).with('docker', 'stop', '-t', '1', cid)
222
+ expect(subject).to receive(:execute).with('docker', 'stop', '-t', '1', cid)
193
223
  subject.stop(cid, 1)
194
224
  end
195
225
 
196
226
  it "stops the container with the set timeout" do
197
- subject.should_receive(:execute).with('docker', 'stop', '-t', '5', cid)
227
+ expect(subject).to receive(:execute).with('docker', 'stop', '-t', '5', cid)
198
228
  subject.stop(cid, 5)
199
229
  end
200
230
  end
201
231
 
202
232
  context 'when container is not running' do
203
- before { subject.stub(running?: false) }
233
+ before { allow(subject).to receive(:running?).and_return(false) }
204
234
 
205
235
  it 'does not stop container' do
206
- subject.should_not_receive(:execute).with('docker', 'stop', '-t', '1', cid)
236
+ expect(subject).not_to receive(:execute).with('docker', 'stop', '-t', '1', cid)
207
237
  subject.stop(cid, 1)
208
238
  end
209
239
  end
@@ -211,7 +241,7 @@ describe VagrantPlugins::DockerProvider::Driver::Compose do
211
241
 
212
242
  describe '#rm' do
213
243
  context 'when container has been created' do
214
- before { subject.stub(created?: true) }
244
+ before { allow(subject).to receive(:created?).and_return(true) }
215
245
 
216
246
  it 'removes the container' do
217
247
  expect(subject).to receive(:execute).with("docker-compose", "-f", "docker-compose.yml", "-p", "cwd", "rm", "-f", "docker_1", {})
@@ -220,7 +250,7 @@ describe VagrantPlugins::DockerProvider::Driver::Compose do
220
250
  end
221
251
 
222
252
  context 'when container has not been created' do
223
- before { subject.stub(created?: false) }
253
+ before { allow(subject).to receive(:created?).and_return(false) }
224
254
 
225
255
  it 'does not attempt to remove the container' do
226
256
  expect(subject).not_to receive(:execute).with("docker-compose", "-f", "docker-compose.yml", "-p", "cwd", "rm", "-f", "docker_1", {})
@@ -232,10 +262,10 @@ describe VagrantPlugins::DockerProvider::Driver::Compose do
232
262
  describe '#inspect_container' do
233
263
  let(:data) { '[{"json": "value"}]' }
234
264
 
235
- before { subject.stub(execute: data) }
265
+ before { allow(subject).to receive(:execute).and_return(data) }
236
266
 
237
267
  it 'inspects the container' do
238
- subject.should_receive(:execute).with('docker', 'inspect', cid)
268
+ expect(subject).to receive(:execute).with('docker', 'inspect', cid)
239
269
  subject.inspect_container(cid)
240
270
  end
241
271
 
@@ -247,10 +277,10 @@ describe VagrantPlugins::DockerProvider::Driver::Compose do
247
277
  describe '#all_containers' do
248
278
  let(:containers) { "container1\ncontainer2" }
249
279
 
250
- before { subject.stub(execute: containers) }
280
+ before { allow(subject).to receive(:execute).and_return(containers) }
251
281
 
252
282
  it 'returns an array of all known containers' do
253
- subject.should_receive(:execute).with('docker', 'ps', '-a', '-q', '--no-trunc')
283
+ expect(subject).to receive(:execute).with('docker', 'ps', '-a', '-q', '--no-trunc')
254
284
  expect(subject.all_containers).to eq(['container1', 'container2'])
255
285
  end
256
286
  end
@@ -258,10 +288,10 @@ describe VagrantPlugins::DockerProvider::Driver::Compose do
258
288
  describe '#docker_bridge_ip' do
259
289
  let(:containers) { " inet 123.456.789.012/16 " }
260
290
 
261
- before { subject.stub(execute: containers) }
291
+ before { allow(subject).to receive(:execute).and_return(containers) }
262
292
 
263
293
  it 'returns an array of all known containers' do
264
- subject.should_receive(:execute).with('/sbin/ip', '-4', 'addr', 'show', 'scope', 'global', 'docker0')
294
+ expect(subject).to receive(:execute).with('/sbin/ip', '-4', 'addr', 'show', 'scope', 'global', 'docker0')
265
295
  expect(subject.docker_bridge_ip).to eq('123.456.789.012')
266
296
  end
267
297
  end