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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +36 -0
- data/Gemfile.lock +10 -6
- data/contrib/bash/completion.sh +1 -1
- data/contrib/sudoers/linux-ubuntu +3 -4
- data/lib/vagrant/errors.rb +8 -0
- data/lib/vagrant/machine.rb +2 -0
- data/lib/vagrant/util/platform.rb +1 -1
- data/lib/vagrant/util/powershell.rb +42 -13
- data/lib/vagrant/util/safe_exec.rb +13 -2
- data/lib/vagrant/util/ssh.rb +11 -1
- data/plugins/commands/box/command/update.rb +12 -7
- data/plugins/commands/login/client.rb +15 -6
- data/plugins/commands/login/command.rb +13 -3
- data/plugins/commands/up/command.rb +9 -0
- data/plugins/commands/validate/command.rb +4 -4
- data/plugins/guests/darwin/cap/shell_expand_guest_path.rb +2 -2
- data/plugins/guests/freebsd/cap/configure_networks.rb +1 -1
- data/plugins/guests/freebsd/cap/shell_expand_guest_path.rb +2 -2
- data/plugins/guests/linux/cap/shell_expand_guest_path.rb +2 -2
- data/plugins/guests/netbsd/cap/shell_expand_guest_path.rb +2 -2
- data/plugins/guests/openbsd/cap/shell_expand_guest_path.rb +2 -2
- data/plugins/guests/windows/cap/public_key.rb +21 -45
- data/plugins/kernel_v2/config/ssh_connect.rb +3 -0
- data/plugins/providers/docker/config.rb +4 -0
- data/plugins/providers/docker/driver/compose.rb +11 -4
- data/plugins/providers/hyperv/action/wait_for_ip_address.rb +15 -11
- data/plugins/providers/hyperv/scripts/get_network_config.ps1 +24 -9
- data/plugins/providers/virtualbox/action/prepare_nfs_settings.rb +18 -0
- data/plugins/provisioners/ansible/provisioner/host.rb +1 -1
- data/plugins/provisioners/chef/cap/debian/chef_install.rb +2 -2
- data/plugins/provisioners/chef/cap/freebsd/chef_install.rb +2 -2
- data/plugins/provisioners/chef/cap/omnios/chef_install.rb +2 -2
- data/plugins/provisioners/chef/cap/redhat/chef_install.rb +2 -2
- data/plugins/provisioners/chef/cap/suse/chef_install.rb +2 -2
- data/plugins/provisioners/chef/cap/windows/chef_install.rb +2 -2
- data/plugins/provisioners/chef/config/base.rb +17 -0
- data/plugins/provisioners/chef/config/chef_zero.rb +7 -0
- data/plugins/provisioners/chef/installer.rb +8 -7
- data/plugins/provisioners/chef/omnibus.rb +4 -6
- data/plugins/provisioners/chef/provisioner/base.rb +1 -0
- data/plugins/provisioners/chef/provisioner/chef_solo.rb +2 -1
- data/plugins/provisioners/file/provisioner.rb +18 -2
- data/plugins/provisioners/puppet/provisioner/puppet.rb +0 -2
- data/plugins/provisioners/salt/bootstrap-salt.sh +9 -5
- data/plugins/provisioners/shell/provisioner.rb +1 -1
- data/plugins/synced_folders/rsync/command/rsync_auto.rb +6 -1
- data/plugins/synced_folders/rsync/helper.rb +10 -0
- data/templates/locales/en.yml +27 -1
- data/templates/locales/providers_docker.yml +2 -0
- data/test/unit/base.rb +1 -3
- data/test/unit/plugins/commands/box/command/add_test.rb +3 -3
- data/test/unit/plugins/commands/box/command/remove_test.rb +6 -6
- data/test/unit/plugins/commands/box/command/repackage_test.rb +2 -4
- data/test/unit/plugins/commands/box/command/update_test.rb +36 -14
- data/test/unit/plugins/commands/init/command_test.rb +1 -1
- data/test/unit/plugins/commands/list-commands/command_test.rb +2 -2
- data/test/unit/plugins/commands/login/client_test.rb +5 -1
- data/test/unit/plugins/commands/package/command_test.rb +1 -1
- data/test/unit/plugins/commands/plugin/action/expunge_plugins_test.rb +1 -1
- data/test/unit/plugins/commands/plugin/action/install_gem_test.rb +3 -3
- data/test/unit/plugins/commands/plugin/action/plugin_exists_check_test.rb +3 -3
- data/test/unit/plugins/commands/plugin/action/uninstall_plugin_test.rb +1 -1
- data/test/unit/plugins/commands/plugin/action/update_gems_test.rb +2 -2
- data/test/unit/plugins/commands/port/command_test.rb +3 -3
- data/test/unit/plugins/commands/push/command_test.rb +1 -1
- data/test/unit/plugins/commands/snapshot/command/list_test.rb +2 -3
- data/test/unit/plugins/commands/ssh_config/command_test.rb +1 -1
- data/test/unit/plugins/commands/up/command_test.rb +69 -2
- data/test/unit/plugins/commands/validate/command_test.rb +47 -1
- data/test/unit/plugins/communicators/ssh/communicator_test.rb +5 -5
- data/test/unit/plugins/communicators/winrm/communicator_test.rb +6 -6
- data/test/unit/plugins/communicators/winrm/helper_test.rb +24 -23
- data/test/unit/plugins/communicators/winssh/communicator_test.rb +5 -5
- data/test/unit/plugins/guests/darwin/cap/shell_expand_guest_path_test.rb +43 -0
- data/test/unit/plugins/guests/freebsd/cap/configure_networks_test.rb +1 -1
- data/test/unit/plugins/guests/freebsd/cap/shell_expand_guest_path_test.rb +44 -0
- data/test/unit/plugins/guests/linux/cap/shell_expand_guest_path_test.rb +43 -0
- data/test/unit/plugins/guests/netbsd/cap/shell_expand_guest_path_test.rb +43 -0
- data/test/unit/plugins/guests/omnios/cap/mount_nfs_folder_test.rb +1 -3
- data/test/unit/plugins/guests/openbsd/cap/shell_expand_guest_path_test.rb +43 -0
- data/test/unit/plugins/guests/smartos/cap/change_host_name_test.rb +2 -2
- data/test/unit/plugins/guests/smartos/cap/configure_networks_test.rb +2 -2
- data/test/unit/plugins/guests/smartos/cap/halt_test.rb +2 -2
- data/test/unit/plugins/guests/smartos/cap/insert_public_key_test.rb +1 -1
- data/test/unit/plugins/guests/smartos/cap/mount_nfs_test.rb +2 -2
- data/test/unit/plugins/guests/smartos/cap/rsync_test.rb +2 -2
- data/test/unit/plugins/guests/windows/cap/insert_public_key_test.rb +2 -2
- data/test/unit/plugins/guests/windows/cap/remove_public_key_test.rb +4 -3
- data/test/unit/plugins/guests/windows/config_test.rb +1 -1
- data/test/unit/plugins/guests/windows/guest_network_test.rb +2 -2
- data/test/unit/plugins/hosts/linux/cap/nfs_test.rb +2 -0
- data/test/unit/plugins/kernel_v2/config/push_test.rb +1 -1
- data/test/unit/plugins/kernel_v2/config/vm_test.rb +7 -7
- data/test/unit/plugins/providers/docker/action/create_test.rb +1 -1
- data/test/unit/plugins/providers/docker/command/exec_test.rb +1 -1
- data/test/unit/plugins/providers/docker/config_test.rb +23 -4
- data/test/unit/plugins/providers/docker/driver_compose_test.rb +60 -30
- data/test/unit/plugins/providers/docker/driver_test.rb +31 -31
- data/test/unit/plugins/providers/docker/synced_folder_test.rb +3 -3
- data/test/unit/plugins/providers/hyperv/provider_test.rb +19 -19
- data/test/unit/plugins/providers/virtualbox/action/network_fix_ipv6_test.rb +2 -2
- data/test/unit/plugins/providers/virtualbox/action/network_test.rb +1 -1
- data/test/unit/plugins/providers/virtualbox/action/prepare_nfs_settings_test.rb +34 -8
- data/test/unit/plugins/providers/virtualbox/action/prepare_nfs_valid_ids_test.rb +3 -3
- data/test/unit/plugins/providers/virtualbox/cap_test.rb +2 -2
- data/test/unit/plugins/providers/virtualbox/config_test.rb +6 -6
- data/test/unit/plugins/providers/virtualbox/synced_folder_test.rb +6 -8
- data/test/unit/plugins/provisioners/ansible/config/guest_test.rb +1 -1
- data/test/unit/plugins/provisioners/ansible/config/host_test.rb +4 -4
- data/test/unit/plugins/provisioners/ansible/config/shared.rb +2 -2
- data/test/unit/plugins/provisioners/ansible/provisioner_test.rb +165 -157
- data/test/unit/plugins/provisioners/chef/command_builder_test.rb +2 -2
- data/test/unit/plugins/provisioners/chef/config/base_test.rb +13 -0
- data/test/unit/plugins/provisioners/chef/config/chef_zero_test.rb +11 -0
- data/test/unit/plugins/provisioners/chef/omnibus_test.rb +17 -7
- data/test/unit/plugins/provisioners/docker/config_test.rb +2 -1
- data/test/unit/plugins/provisioners/docker/provisioner_test.rb +13 -13
- data/test/unit/plugins/provisioners/file/provisioner_test.rb +32 -14
- data/test/unit/plugins/provisioners/puppet/provisioner/puppet_test.rb +51 -0
- data/test/unit/plugins/provisioners/salt/provisioner_test.rb +5 -5
- data/test/unit/plugins/provisioners/shell/provisioner_test.rb +35 -4
- data/test/unit/plugins/pushes/ftp/adapter_test.rb +1 -0
- data/test/unit/plugins/synced_folders/nfs/action_cleanup_test.rb +1 -1
- data/test/unit/plugins/synced_folders/nfs/config_test.rb +1 -1
- data/test/unit/plugins/synced_folders/rsync/command/rsync_auto_test.rb +44 -12
- data/test/unit/plugins/synced_folders/rsync/command/rsync_test.rb +5 -5
- data/test/unit/plugins/synced_folders/rsync/helper_test.rb +47 -29
- data/test/unit/plugins/synced_folders/rsync/synced_folder_test.rb +5 -5
- data/test/unit/vagrant/action/builtin/box_add_test.rb +27 -27
- data/test/unit/vagrant/action/builtin/box_check_outdated_test.rb +10 -10
- data/test/unit/vagrant/action/builtin/box_remove_test.rb +15 -15
- data/test/unit/vagrant/action/builtin/confirm_test.rb +1 -1
- data/test/unit/vagrant/action/builtin/graceful_halt_test.rb +2 -2
- data/test/unit/vagrant/action/builtin/handle_box_test.rb +8 -8
- data/test/unit/vagrant/action/builtin/handle_forwarded_port_collisions_test.rb +1 -1
- data/test/unit/vagrant/action/builtin/is_env_set_test.rb +2 -2
- data/test/unit/vagrant/action/builtin/is_state_test.rb +6 -6
- data/test/unit/vagrant/action/builtin/mixin_synced_folders_test.rb +6 -6
- data/test/unit/vagrant/action/builtin/provision_test.rb +1 -1
- data/test/unit/vagrant/action/builtin/provisioner_cleanup_test.rb +1 -1
- data/test/unit/vagrant/action/builtin/synced_folder_cleanup_test.rb +6 -6
- data/test/unit/vagrant/action/builtin/synced_folders_test.rb +3 -3
- data/test/unit/vagrant/batch_action_test.rb +2 -2
- data/test/unit/vagrant/box_collection_test.rb +1 -1
- data/test/unit/vagrant/box_test.rb +6 -6
- data/test/unit/vagrant/capability_host_test.rb +3 -3
- data/test/unit/vagrant/cli_test.rb +3 -3
- data/test/unit/vagrant/environment_test.rb +21 -20
- data/test/unit/vagrant/guest_test.rb +7 -7
- data/test/unit/vagrant/machine_index_test.rb +4 -4
- data/test/unit/vagrant/machine_test.rb +28 -17
- data/test/unit/vagrant/plugin/manager_test.rb +12 -12
- data/test/unit/vagrant/plugin/state_file_test.rb +2 -2
- data/test/unit/vagrant/plugin/v1/command_test.rb +9 -8
- data/test/unit/vagrant/plugin/v2/command_test.rb +54 -43
- data/test/unit/vagrant/plugin/v2/plugin_test.rb +4 -3
- data/test/unit/vagrant/plugin/v2/provider_test.rb +3 -3
- data/test/unit/vagrant/shared_helpers_test.rb +6 -6
- data/test/unit/vagrant/ui_test.rb +21 -21
- data/test/unit/vagrant/util/downloader_test.rb +7 -7
- data/test/unit/vagrant/util/ssh_test.rb +41 -5
- data/test/unit/vagrant/util/subprocess_test.rb +7 -7
- data/test/unit/vagrant_test.rb +9 -9
- data/vagrant.gemspec +3 -2
- data/vendor/bundle/ruby/2.4.0/bundler/gems/vagrant-spec-af86757912f7/vagrant-spec.gemspec +1 -1
- data/vendor/bundle/ruby/2.4.0/gems/fake_ftp-0.1.1/.gitignore +7 -0
- data/vendor/bundle/ruby/2.4.0/gems/fake_ftp-0.1.1/.rspec +2 -0
- data/vendor/bundle/ruby/2.4.0/gems/fake_ftp-0.1.1/.travis.yml +5 -0
- data/vendor/bundle/ruby/2.4.0/gems/fake_ftp-0.1.1/CONTRIBUTORS.md +19 -0
- data/vendor/bundle/ruby/2.4.0/gems/fake_ftp-0.1.1/Gemfile +12 -0
- data/vendor/bundle/ruby/2.4.0/gems/fake_ftp-0.1.1/Gemfile.lock +44 -0
- data/vendor/bundle/ruby/2.4.0/gems/fake_ftp-0.1.1/Guardfile +10 -0
- data/vendor/bundle/ruby/2.4.0/gems/fake_ftp-0.1.1/README.md +134 -0
- data/vendor/bundle/ruby/2.4.0/gems/fake_ftp-0.1.1/Rakefile +10 -0
- data/vendor/bundle/ruby/2.4.0/gems/fake_ftp-0.1.1/fake_ftp.gemspec +22 -0
- data/vendor/bundle/ruby/2.4.0/gems/fake_ftp-0.1.1/lib/fake_ftp.rb +5 -0
- data/vendor/bundle/ruby/2.4.0/gems/fake_ftp-0.1.1/lib/fake_ftp/file.rb +34 -0
- data/vendor/bundle/ruby/2.4.0/gems/fake_ftp-0.1.1/lib/fake_ftp/server.rb +340 -0
- data/vendor/bundle/ruby/2.4.0/gems/fake_ftp-0.1.1/lib/fake_ftp/version.rb +3 -0
- data/vendor/bundle/ruby/2.4.0/gems/fake_ftp-0.1.1/spec/fixtures/invisible_bike.jpg +0 -0
- data/vendor/bundle/ruby/2.4.0/gems/fake_ftp-0.1.1/spec/fixtures/text_file.txt +1 -0
- data/vendor/bundle/ruby/2.4.0/gems/fake_ftp-0.1.1/spec/functional/server_spec.rb +468 -0
- data/vendor/bundle/ruby/2.4.0/gems/fake_ftp-0.1.1/spec/integration/server_spec.rb +81 -0
- data/vendor/bundle/ruby/2.4.0/gems/fake_ftp-0.1.1/spec/models/fake_ftp/file_spec.rb +102 -0
- data/vendor/bundle/ruby/2.4.0/gems/fake_ftp-0.1.1/spec/models/fake_ftp/server_spec.rb +76 -0
- data/vendor/bundle/ruby/2.4.0/gems/fake_ftp-0.1.1/spec/spec_helper.rb +18 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/.gitignore +14 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/.rubocop.yml +57 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/.travis.yml +21 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/CONTRIBUTING.rdoc +36 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/Gemfile +3 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/History.rdoc +2247 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/MIT-LICENSE +21 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/README.rdoc +156 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/Rakefile +38 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/appveyor.yml +21 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/bin/console +7 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/bin/setup +6 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/doc/command_line_usage.rdoc +158 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/doc/example/Rakefile1 +38 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/doc/example/Rakefile2 +35 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/doc/example/a.c +6 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/doc/example/b.c +6 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/doc/example/main.c +11 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/doc/glossary.rdoc +42 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/doc/jamis.rb +591 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/doc/proto_rake.rdoc +127 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/doc/rake.1 +156 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/doc/rakefile.rdoc +622 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/doc/rational.rdoc +151 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/exe/rake +27 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake.rb +70 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/application.rb +785 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/backtrace.rb +23 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/clean.rb +77 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/cloneable.rb +16 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/cpu_counter.rb +106 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/default_loader.rb +14 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/dsl_definition.rb +194 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/early_time.rb +21 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/ext/core.rb +25 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/ext/string.rb +175 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/file_creation_task.rb +24 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/file_list.rb +434 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/file_task.rb +46 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/file_utils.rb +136 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/file_utils_ext.rb +144 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/invocation_chain.rb +56 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/invocation_exception_mixin.rb +16 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/late_time.rb +17 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/linked_list.rb +111 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/loaders/makefile.rb +53 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/multi_task.rb +49 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/name_space.rb +37 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/packagetask.rb +210 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/phony.rb +15 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/private_reader.rb +20 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/promise.rb +99 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/pseudo_status.rb +29 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/rake_module.rb +38 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/rake_test_loader.rb +21 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/rule_recursion_overflow_error.rb +19 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/scope.rb +42 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/task.rb +390 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/task_argument_error.rb +7 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/task_arguments.rb +108 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/task_manager.rb +303 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/tasklib.rb +11 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/testtask.rb +222 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/thread_history_display.rb +48 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/thread_pool.rb +162 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/trace_output.rb +22 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/version.rb +9 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/win32.rb +50 -0
- data/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/rake.gemspec +39 -0
- data/vendor/bundle/ruby/2.4.0/gems/rspec-its-1.2.0/.gitignore +19 -0
- data/vendor/bundle/ruby/2.4.0/gems/rspec-its-1.2.0/.rspec +3 -0
- data/vendor/bundle/ruby/2.4.0/gems/rspec-its-1.2.0/.travis.yml +24 -0
- data/vendor/bundle/ruby/2.4.0/gems/rspec-its-1.2.0/Changelog.md +49 -0
- data/vendor/bundle/ruby/2.4.0/gems/rspec-its-1.2.0/Gemfile +26 -0
- data/vendor/bundle/ruby/2.4.0/gems/rspec-its-1.2.0/LICENSE.txt +27 -0
- data/vendor/bundle/ruby/2.4.0/gems/rspec-its-1.2.0/README.md +72 -0
- data/vendor/bundle/ruby/2.4.0/gems/rspec-its-1.2.0/Rakefile +16 -0
- data/vendor/bundle/ruby/2.4.0/gems/rspec-its-1.2.0/cucumber.yml +2 -0
- data/vendor/bundle/ruby/2.4.0/gems/rspec-its-1.2.0/features/its.feature +125 -0
- data/vendor/bundle/ruby/2.4.0/gems/rspec-its-1.2.0/features/step_definitions/additional_cli_steps.rb +21 -0
- data/vendor/bundle/ruby/2.4.0/gems/rspec-its-1.2.0/features/support/env.rb +23 -0
- data/vendor/bundle/ruby/2.4.0/gems/rspec-its-1.2.0/lib/rspec/its.rb +149 -0
- data/vendor/bundle/ruby/2.4.0/gems/rspec-its-1.2.0/lib/rspec/its/version.rb +5 -0
- data/vendor/bundle/ruby/2.4.0/gems/rspec-its-1.2.0/rspec-its.gemspec +28 -0
- data/vendor/bundle/ruby/2.4.0/gems/rspec-its-1.2.0/script/test_all +20 -0
- data/vendor/bundle/ruby/2.4.0/gems/rspec-its-1.2.0/spec/rspec/its_spec.rb +237 -0
- data/vendor/bundle/ruby/2.4.0/gems/rspec-its-1.2.0/spec/spec_helper.rb +15 -0
- data/vendor/bundle/ruby/2.4.0/specifications/fake_ftp-0.1.1.gemspec +20 -0
- data/vendor/bundle/ruby/2.4.0/specifications/rake-12.0.0.gemspec +43 -0
- data/vendor/bundle/ruby/2.4.0/specifications/rspec-its-1.2.0.gemspec +47 -0
- data/version.txt +1 -1
- metadata +137 -7
- data/2.14.0 +0 -5
@@ -11,8 +11,8 @@ describe Vagrant::BatchAction do
|
|
11
11
|
|
12
12
|
def new_machine(options)
|
13
13
|
double("machine").tap do |m|
|
14
|
-
m.
|
15
|
-
m.
|
14
|
+
allow(m).to receive(:provider_name).and_return(provider_name)
|
15
|
+
allow(m).to receive(:provider_options).and_return(options)
|
16
16
|
allow(m).to receive(:action) do |action, opts|
|
17
17
|
lock.synchronize do
|
18
18
|
called_actions << [m, action, opts]
|
@@ -223,7 +223,7 @@ describe Vagrant::BoxCollection, :skip_windows do
|
|
223
223
|
environment.box3("foo", "0", :virtualbox,
|
224
224
|
metadata_url: "foourl")
|
225
225
|
|
226
|
-
expect(hook).to receive(:call).with { |name, env|
|
226
|
+
expect(hook).to receive(:call).with(any_args) { |name, env|
|
227
227
|
expect(name).to eq(:authenticate_box_url)
|
228
228
|
expect(env[:box_urls]).to eq(["foourl"])
|
229
229
|
true
|
@@ -110,7 +110,7 @@ describe Vagrant::Box, :skip_windows do
|
|
110
110
|
}
|
111
111
|
RAW
|
112
112
|
|
113
|
-
subject.
|
113
|
+
allow(subject).to receive(:load_metadata).and_return(metadata)
|
114
114
|
|
115
115
|
expect(subject.has_update?).to be_nil
|
116
116
|
end
|
@@ -136,7 +136,7 @@ describe Vagrant::Box, :skip_windows do
|
|
136
136
|
}
|
137
137
|
RAW
|
138
138
|
|
139
|
-
subject.
|
139
|
+
allow(subject).to receive(:load_metadata).and_return(metadata)
|
140
140
|
|
141
141
|
result = subject.has_update?
|
142
142
|
expect(result).to_not be_nil
|
@@ -180,7 +180,7 @@ describe Vagrant::Box, :skip_windows do
|
|
180
180
|
}
|
181
181
|
RAW
|
182
182
|
|
183
|
-
subject.
|
183
|
+
allow(subject).to receive(:load_metadata).and_return(metadata)
|
184
184
|
|
185
185
|
result = subject.has_update?(">= 1.1, < 1.4")
|
186
186
|
expect(result).to_not be_nil
|
@@ -256,8 +256,8 @@ describe Vagrant::Box, :skip_windows do
|
|
256
256
|
|
257
257
|
it "raises an error if the download failed" do
|
258
258
|
dl = double("downloader")
|
259
|
-
Vagrant::Util::Downloader.
|
260
|
-
dl.
|
259
|
+
allow(Vagrant::Util::Downloader).to receive(:new).and_return(dl)
|
260
|
+
expect(dl).to receive(:download!).and_raise(
|
261
261
|
Vagrant::Errors::DownloaderError.new(message: "foo"))
|
262
262
|
|
263
263
|
expect { subject.load_metadata }.
|
@@ -308,7 +308,7 @@ describe Vagrant::Box, :skip_windows do
|
|
308
308
|
end
|
309
309
|
|
310
310
|
# Repackage our box to some temporary directory
|
311
|
-
expect(subject.repackage(box_output_path)).to
|
311
|
+
expect(subject.repackage(box_output_path)).to be(true)
|
312
312
|
|
313
313
|
# Let's now add this box again under a different name, and then
|
314
314
|
# verify that we get the proper result back.
|
@@ -104,15 +104,15 @@ describe Vagrant::CapabilityHost do
|
|
104
104
|
end
|
105
105
|
|
106
106
|
it "does not have a non-existent capability" do
|
107
|
-
expect(subject.capability?(:foo)).to
|
107
|
+
expect(subject.capability?(:foo)).to be(false)
|
108
108
|
end
|
109
109
|
|
110
110
|
it "has capabilities of itself" do
|
111
|
-
expect(subject.capability?(:self)).to
|
111
|
+
expect(subject.capability?(:self)).to be(true)
|
112
112
|
end
|
113
113
|
|
114
114
|
it "has capabilities of parent" do
|
115
|
-
expect(subject.capability?(:parent)).to
|
115
|
+
expect(subject.capability?(:parent)).to be(true)
|
116
116
|
end
|
117
117
|
end
|
118
118
|
|
@@ -11,7 +11,7 @@ describe Vagrant::CLI do
|
|
11
11
|
let(:env) { iso_env.create_vagrant_env }
|
12
12
|
|
13
13
|
before do
|
14
|
-
Vagrant.plugin("2").manager.
|
14
|
+
allow(Vagrant.plugin("2").manager).to receive(:commands).and_return(commands)
|
15
15
|
end
|
16
16
|
|
17
17
|
describe "#execute" do
|
@@ -45,10 +45,10 @@ describe Vagrant::CLI do
|
|
45
45
|
commands[:bar] = [command_lambda("bar", 0), { primary: true }]
|
46
46
|
commands[:baz] = [command_lambda("baz", 0), { primary: false }]
|
47
47
|
|
48
|
-
expect(env.ui).to receive(:info).with { |message, opts|
|
48
|
+
expect(env.ui).to receive(:info).with(any_args) { |message, opts|
|
49
49
|
expect(message).to include("foo")
|
50
50
|
expect(message).to include("bar")
|
51
|
-
expect(message.include?("baz")).to
|
51
|
+
expect(message.include?("baz")).to be(false)
|
52
52
|
}
|
53
53
|
|
54
54
|
subject.help
|
@@ -31,8 +31,8 @@ describe Vagrant::Environment do
|
|
31
31
|
|
32
32
|
before do
|
33
33
|
m = Vagrant.plugin("2").manager
|
34
|
-
m.
|
35
|
-
m.
|
34
|
+
allow(m).to receive(:hosts).and_return(plugin_hosts)
|
35
|
+
allow(m).to receive(:host_capabilities).and_return(plugin_host_caps)
|
36
36
|
|
37
37
|
# Detect the host
|
38
38
|
env.vagrantfile <<-VF
|
@@ -48,8 +48,8 @@ describe Vagrant::Environment do
|
|
48
48
|
it "should return whether it can install or not" do
|
49
49
|
plugin_host_caps[:foo] = { provider_install_foo: Class }
|
50
50
|
|
51
|
-
expect(subject.can_install_provider?(:foo)).to
|
52
|
-
expect(subject.can_install_provider?(:bar)).to
|
51
|
+
expect(subject.can_install_provider?(:foo)).to be(true)
|
52
|
+
expect(subject.can_install_provider?(:bar)).to be(false)
|
53
53
|
end
|
54
54
|
end
|
55
55
|
|
@@ -160,7 +160,8 @@ describe Vagrant::Environment do
|
|
160
160
|
|
161
161
|
it "moves the boxes into the new directory structure" do
|
162
162
|
# Kind of hacky but avoids two instantiations of BoxCollection
|
163
|
-
Vagrant::Environment.
|
163
|
+
allow(Vagrant::Environment).to receive(:boxes)
|
164
|
+
.and_return(double("boxes"))
|
164
165
|
|
165
166
|
collection = double("collection")
|
166
167
|
expect(Vagrant::BoxCollection).to receive(:new).with(
|
@@ -177,8 +178,8 @@ describe Vagrant::Environment do
|
|
177
178
|
|
178
179
|
before do
|
179
180
|
m = Vagrant.plugin("2").manager
|
180
|
-
m.
|
181
|
-
m.
|
181
|
+
allow(m).to receive(:hosts).and_return(plugin_hosts)
|
182
|
+
allow(m).to receive(:host_capabilities).and_return(plugin_host_caps)
|
182
183
|
end
|
183
184
|
|
184
185
|
it "should default to some host even if there are none" do
|
@@ -202,7 +203,7 @@ describe Vagrant::Environment do
|
|
202
203
|
plugin_host_caps[:foo] = { bar: Class }
|
203
204
|
|
204
205
|
result = subject.host
|
205
|
-
expect(result.capability?(:bar)).to
|
206
|
+
expect(result.capability?(:bar)).to be(true)
|
206
207
|
end
|
207
208
|
|
208
209
|
it "should attempt to detect a host if host is :detect" do
|
@@ -216,7 +217,7 @@ describe Vagrant::Environment do
|
|
216
217
|
plugin_host_caps[:foo] = { bar: Class }
|
217
218
|
|
218
219
|
result = subject.host
|
219
|
-
expect(result.capability?(:bar)).to
|
220
|
+
expect(result.capability?(:bar)).to be(true)
|
220
221
|
end
|
221
222
|
|
222
223
|
it "should use an exact host if specified" do
|
@@ -231,7 +232,7 @@ describe Vagrant::Environment do
|
|
231
232
|
plugin_host_caps[:foo] = { bar: Class }
|
232
233
|
|
233
234
|
result = subject.host
|
234
|
-
expect(result.capability?(:bar)).to
|
235
|
+
expect(result.capability?(:bar)).to be(true)
|
235
236
|
end
|
236
237
|
|
237
238
|
it "should raise an error if an exact match was specified but not found" do
|
@@ -270,7 +271,7 @@ describe Vagrant::Environment do
|
|
270
271
|
end
|
271
272
|
end
|
272
273
|
|
273
|
-
expect(raised).to
|
274
|
+
expect(raised).to be(true)
|
274
275
|
end
|
275
276
|
|
276
277
|
it "allows nested locks on the same environment" do
|
@@ -282,7 +283,7 @@ describe Vagrant::Environment do
|
|
282
283
|
end
|
283
284
|
end
|
284
285
|
|
285
|
-
expect(success).to
|
286
|
+
expect(success).to be(true)
|
286
287
|
end
|
287
288
|
|
288
289
|
it "cleans up all lock files" do
|
@@ -641,8 +642,8 @@ VF
|
|
641
642
|
klass = double("machine_index")
|
642
643
|
stub_const("Vagrant::MachineIndex", klass)
|
643
644
|
|
644
|
-
klass.
|
645
|
-
expect(path.to_s.start_with?(subject.home_path.to_s)).to
|
645
|
+
expect(klass).to receive(:new).with(any_args) do |path|
|
646
|
+
expect(path.to_s.start_with?(subject.home_path.to_s)).to be(true)
|
646
647
|
true
|
647
648
|
end
|
648
649
|
|
@@ -759,7 +760,7 @@ VF
|
|
759
760
|
|
760
761
|
before do
|
761
762
|
m = Vagrant.plugin("2").manager
|
762
|
-
m.
|
763
|
+
allow(m).to receive(:providers).and_return(plugin_providers)
|
763
764
|
end
|
764
765
|
|
765
766
|
it "is the highest matching usable provider" do
|
@@ -985,7 +986,7 @@ VF
|
|
985
986
|
Dir.chdir(temp_dir) do
|
986
987
|
instance = described_class.new(local_data_path: "foo")
|
987
988
|
expect(instance.local_data_path).to eq(instance.cwd.join("foo"))
|
988
|
-
expect(File.exist?(instance.local_data_path)).to
|
989
|
+
expect(File.exist?(instance.local_data_path)).to be(false)
|
989
990
|
end
|
990
991
|
end
|
991
992
|
end
|
@@ -1249,7 +1250,7 @@ VF
|
|
1249
1250
|
|
1250
1251
|
env = environment.create_vagrant_env
|
1251
1252
|
env.push("foo")
|
1252
|
-
expect(push_class.pushed?).to
|
1253
|
+
expect(push_class.pushed?).to be(true)
|
1253
1254
|
end
|
1254
1255
|
end
|
1255
1256
|
|
@@ -1257,7 +1258,7 @@ VF
|
|
1257
1258
|
it "should call the action runner with the proper hook" do
|
1258
1259
|
hook_name = :foo
|
1259
1260
|
|
1260
|
-
expect(instance.action_runner).to receive(:run).with { |callable, env|
|
1261
|
+
expect(instance.action_runner).to receive(:run).with(any_args) { |callable, env|
|
1261
1262
|
expect(env[:action_name]).to eq(hook_name)
|
1262
1263
|
}
|
1263
1264
|
|
@@ -1279,7 +1280,7 @@ VF
|
|
1279
1280
|
end
|
1280
1281
|
|
1281
1282
|
it "should allow passing in custom data" do
|
1282
|
-
expect(instance.action_runner).to receive(:run).with { |callable, env|
|
1283
|
+
expect(instance.action_runner).to receive(:run).with(any_args) { |callable, env|
|
1283
1284
|
expect(env[:foo]).to eq(:bar)
|
1284
1285
|
}
|
1285
1286
|
|
@@ -1287,7 +1288,7 @@ VF
|
|
1287
1288
|
end
|
1288
1289
|
|
1289
1290
|
it "should allow passing a custom callable" do
|
1290
|
-
expect(instance.action_runner).to receive(:run).with { |callable, env|
|
1291
|
+
expect(instance.action_runner).to receive(:run).with(any_args) { |callable, env|
|
1291
1292
|
expect(callable).to eq(:what)
|
1292
1293
|
}
|
1293
1294
|
|
@@ -9,10 +9,10 @@ describe Vagrant::Guest do
|
|
9
9
|
let(:guests) { {} }
|
10
10
|
let(:machine) do
|
11
11
|
double("machine").tap do |m|
|
12
|
-
m.
|
13
|
-
m.
|
14
|
-
m.config.
|
15
|
-
m.config.vm.
|
12
|
+
allow(m).to receive(:inspect).and_return("machine")
|
13
|
+
allow(m).to receive(:config).and_return(double("config"))
|
14
|
+
allow(m.config).to receive(:vm).and_return(double("vm_config"))
|
15
|
+
allow(m.config.vm).to receive(:guest).and_return(nil)
|
16
16
|
end
|
17
17
|
end
|
18
18
|
|
@@ -47,7 +47,7 @@ describe Vagrant::Guest do
|
|
47
47
|
|
48
48
|
describe "#detect!" do
|
49
49
|
it "auto-detects if no explicit guest name given" do
|
50
|
-
machine.config.vm.
|
50
|
+
allow(machine.config.vm).to receive(:guest).and_return(nil)
|
51
51
|
expect(subject).to receive(:initialize_capabilities!).
|
52
52
|
with(nil, guests, capabilities, machine)
|
53
53
|
|
@@ -55,7 +55,7 @@ describe Vagrant::Guest do
|
|
55
55
|
end
|
56
56
|
|
57
57
|
it "uses the explicit guest name if specified" do
|
58
|
-
machine.config.vm.
|
58
|
+
allow(machine.config.vm).to receive(:guest).and_return(:foo)
|
59
59
|
expect(subject).to receive(:initialize_capabilities!).
|
60
60
|
with(:foo, guests, capabilities, machine)
|
61
61
|
|
@@ -63,7 +63,7 @@ describe Vagrant::Guest do
|
|
63
63
|
end
|
64
64
|
|
65
65
|
it "raises a user-friendly error if specified guest doesn't exist" do
|
66
|
-
machine.config.vm.
|
66
|
+
allow(machine.config.vm).to receive(:guest).and_return(:foo)
|
67
67
|
|
68
68
|
expect { subject.detect! }.
|
69
69
|
to raise_error(Vagrant::Errors::GuestExplicitNotDetected)
|
@@ -136,7 +136,7 @@ describe Vagrant::MachineIndex do
|
|
136
136
|
end
|
137
137
|
|
138
138
|
it "should include? by prefix" do
|
139
|
-
expect(subject.include?("b")).to
|
139
|
+
expect(subject.include?("b")).to be(true)
|
140
140
|
end
|
141
141
|
|
142
142
|
it "locks the entry so subsequent gets fail" do
|
@@ -159,7 +159,7 @@ describe Vagrant::MachineIndex do
|
|
159
159
|
|
160
160
|
describe "#include" do
|
161
161
|
it "should not include non-existent things" do
|
162
|
-
expect(subject.include?("foo")).to
|
162
|
+
expect(subject.include?("foo")).to be(false)
|
163
163
|
end
|
164
164
|
|
165
165
|
it "should include created entries" do
|
@@ -168,7 +168,7 @@ describe Vagrant::MachineIndex do
|
|
168
168
|
subject.release(result)
|
169
169
|
|
170
170
|
subject = described_class.new(data_dir)
|
171
|
-
expect(subject.include?(result.id)).to
|
171
|
+
expect(subject.include?(result.id)).to be(true)
|
172
172
|
end
|
173
173
|
end
|
174
174
|
|
@@ -204,7 +204,7 @@ describe Vagrant::MachineIndex do
|
|
204
204
|
|
205
205
|
it "can delete an entry that doesn't exist" do
|
206
206
|
e = entry_klass.new
|
207
|
-
expect(subject.delete(e)).to
|
207
|
+
expect(subject.delete(e)).to be(true)
|
208
208
|
end
|
209
209
|
|
210
210
|
it "updates an existing entry" do
|
@@ -12,7 +12,7 @@ describe Vagrant::Machine do
|
|
12
12
|
let(:provider) { new_provider_mock }
|
13
13
|
let(:provider_cls) do
|
14
14
|
obj = double("provider_cls")
|
15
|
-
obj.
|
15
|
+
allow(obj).to receive(:new).and_return(provider)
|
16
16
|
obj
|
17
17
|
end
|
18
18
|
let(:provider_config) { Object.new }
|
@@ -21,9 +21,9 @@ describe Vagrant::Machine do
|
|
21
21
|
let(:base) { false }
|
22
22
|
let(:box) do
|
23
23
|
double("box").tap do |b|
|
24
|
-
b.
|
25
|
-
b.
|
26
|
-
b.
|
24
|
+
allow(b).to receive(:name).and_return("foo")
|
25
|
+
allow(b).to receive(:provider).and_return(:dummy)
|
26
|
+
allow(b).to receive(:version).and_return("1.0")
|
27
27
|
end
|
28
28
|
end
|
29
29
|
|
@@ -50,8 +50,8 @@ describe Vagrant::Machine do
|
|
50
50
|
|
51
51
|
def new_provider_mock
|
52
52
|
double("provider").tap do |obj|
|
53
|
-
obj.
|
54
|
-
obj.
|
53
|
+
allow(obj).to receive(:_initialize).and_return(nil)
|
54
|
+
allow(obj).to receive(:machine_id_changed).and_return(nil)
|
55
55
|
allow(obj).to receive(:state).and_return(Vagrant::MachineState.new(
|
56
56
|
:created, "", ""))
|
57
57
|
end
|
@@ -81,7 +81,7 @@ describe Vagrant::Machine do
|
|
81
81
|
|
82
82
|
it "should not insert key" do
|
83
83
|
subject = new_instance
|
84
|
-
expect(subject.config.ssh.insert_key).to
|
84
|
+
expect(subject.config.ssh.insert_key).to be(false)
|
85
85
|
end
|
86
86
|
end
|
87
87
|
|
@@ -197,7 +197,7 @@ describe Vagrant::Machine do
|
|
197
197
|
|
198
198
|
it "should initialize the capabilities" do
|
199
199
|
instance = new_provider_mock
|
200
|
-
expect(instance).to receive(:_initialize).with { |p, m|
|
200
|
+
expect(instance).to receive(:_initialize).with(any_args) { |p, m|
|
201
201
|
expect(p).to eq(provider_name)
|
202
202
|
expect(m.name).to eq(name)
|
203
203
|
true
|
@@ -383,7 +383,7 @@ describe Vagrant::Machine do
|
|
383
383
|
it "should run the callable with the proper env" do
|
384
384
|
subject.action_raw(:foo, callable)
|
385
385
|
|
386
|
-
expect(@env[:called]).to
|
386
|
+
expect(@env[:called]).to be(true)
|
387
387
|
expect(@env[:action_name]).to eq(:machine_action_foo)
|
388
388
|
expect(@env[:machine]).to equal(subject)
|
389
389
|
expect(@env[:machine_action]).to eq(:foo)
|
@@ -398,7 +398,7 @@ describe Vagrant::Machine do
|
|
398
398
|
it "should merge in any extra env" do
|
399
399
|
subject.action_raw(:bar, callable, foo: :bar)
|
400
400
|
|
401
|
-
expect(@env[:called]).to
|
401
|
+
expect(@env[:called]).to be(true)
|
402
402
|
expect(@env[:foo]).to eq(:bar)
|
403
403
|
end
|
404
404
|
end
|
@@ -533,9 +533,9 @@ describe Vagrant::Machine do
|
|
533
533
|
|
534
534
|
# Setup the box information
|
535
535
|
box = double("box")
|
536
|
-
box.
|
537
|
-
box.
|
538
|
-
box.
|
536
|
+
allow(box).to receive(:name).and_return("foo")
|
537
|
+
allow(box).to receive(:provider).and_return(:bar)
|
538
|
+
allow(box).to receive(:version).and_return("1.2.3")
|
539
539
|
subject.box = box
|
540
540
|
|
541
541
|
subject.id = "foo"
|
@@ -788,18 +788,29 @@ describe Vagrant::Machine do
|
|
788
788
|
|
789
789
|
context "with custom ssh_info" do
|
790
790
|
it "keys_only should be default" do
|
791
|
-
expect(instance.ssh_info[:keys_only]).to
|
791
|
+
expect(instance.ssh_info[:keys_only]).to be(true)
|
792
792
|
end
|
793
793
|
it "paranoid should be default" do
|
794
|
-
expect(instance.ssh_info[:paranoid]).to
|
794
|
+
expect(instance.ssh_info[:paranoid]).to be(false)
|
795
|
+
end
|
796
|
+
it "extra_args should be nil" do
|
797
|
+
expect(instance.ssh_info[:extra_args]).to be(nil)
|
798
|
+
end
|
799
|
+
it "extra_args should be set" do
|
800
|
+
instance.config.ssh.extra_args = ["-L", "127.1.2.7:8008:127.1.2.7:8008"]
|
801
|
+
expect(instance.ssh_info[:extra_args]).to eq(["-L", "127.1.2.7:8008:127.1.2.7:8008"])
|
802
|
+
end
|
803
|
+
it "extra_args should be set as an array" do
|
804
|
+
instance.config.ssh.extra_args = "-6"
|
805
|
+
expect(instance.ssh_info[:extra_args]).to eq("-6")
|
795
806
|
end
|
796
807
|
it "keys_only should be overridden" do
|
797
808
|
instance.config.ssh.keys_only = false
|
798
|
-
expect(instance.ssh_info[:keys_only]).to
|
809
|
+
expect(instance.ssh_info[:keys_only]).to be(false)
|
799
810
|
end
|
800
811
|
it "paranoid should be overridden" do
|
801
812
|
instance.config.ssh.paranoid = true
|
802
|
-
expect(instance.ssh_info[:paranoid]).to
|
813
|
+
expect(instance.ssh_info[:paranoid]).to be(true)
|
803
814
|
end
|
804
815
|
end
|
805
816
|
end
|
@@ -21,7 +21,7 @@ describe Vagrant::Plugin::Manager do
|
|
21
21
|
end
|
22
22
|
|
23
23
|
before do
|
24
|
-
Vagrant::Bundler.
|
24
|
+
allow(Vagrant::Bundler).to receive(:instance).and_return(bundler)
|
25
25
|
end
|
26
26
|
|
27
27
|
subject { described_class.new(path) }
|
@@ -30,9 +30,9 @@ describe Vagrant::Plugin::Manager do
|
|
30
30
|
it "installs the plugin and adds it to the state file" do
|
31
31
|
specs = Array.new(5) { Gem::Specification.new }
|
32
32
|
specs[3].name = "foo"
|
33
|
-
expect(bundler).to receive(:install).once.with { |plugins, local|
|
33
|
+
expect(bundler).to receive(:install).once.with(any_args) { |plugins, local|
|
34
34
|
expect(plugins).to have_key("foo")
|
35
|
-
expect(local).to
|
35
|
+
expect(local).to be(false)
|
36
36
|
}.and_return(specs)
|
37
37
|
expect(bundler).to receive(:clean)
|
38
38
|
|
@@ -92,10 +92,10 @@ describe Vagrant::Plugin::Manager do
|
|
92
92
|
end
|
93
93
|
|
94
94
|
it "installs a version with constraints" do
|
95
|
-
expect(bundler).to receive(:install).once.with { |plugins, local|
|
95
|
+
expect(bundler).to receive(:install).once.with(any_args) { |plugins, local|
|
96
96
|
expect(plugins).to have_key("foo")
|
97
97
|
expect(plugins["foo"]["gem_version"]).to eql(">= 0.1.0")
|
98
|
-
expect(local).to
|
98
|
+
expect(local).to be(false)
|
99
99
|
}.and_return(specs)
|
100
100
|
expect(bundler).to receive(:clean)
|
101
101
|
|
@@ -107,10 +107,10 @@ describe Vagrant::Plugin::Manager do
|
|
107
107
|
end
|
108
108
|
|
109
109
|
it "installs with an exact version but doesn't constrain" do
|
110
|
-
expect(bundler).to receive(:install).once.with { |plugins, local|
|
110
|
+
expect(bundler).to receive(:install).once.with(any_args) { |plugins, local|
|
111
111
|
expect(plugins).to have_key("foo")
|
112
112
|
expect(plugins["foo"]["gem_version"]).to eql("0.1.0")
|
113
|
-
expect(local).to
|
113
|
+
expect(local).to be(false)
|
114
114
|
}.and_return(specs)
|
115
115
|
expect(bundler).to receive(:clean)
|
116
116
|
|
@@ -152,7 +152,7 @@ describe Vagrant::Plugin::Manager do
|
|
152
152
|
before do
|
153
153
|
systems_path.unlink
|
154
154
|
|
155
|
-
described_class.
|
155
|
+
allow(described_class).to receive(:system_plugins_file).and_return(systems_path)
|
156
156
|
|
157
157
|
sf = Vagrant::Plugin::StateFile.new(systems_path)
|
158
158
|
sf.add_plugin("foo", version: "0.2.0")
|
@@ -170,7 +170,7 @@ describe Vagrant::Plugin::Manager do
|
|
170
170
|
subject.uninstall_plugin("bar")
|
171
171
|
|
172
172
|
plugins = subject.installed_plugins
|
173
|
-
expect(plugins["foo"]["system"]).to
|
173
|
+
expect(plugins["foo"]["system"]).to be(true)
|
174
174
|
end
|
175
175
|
|
176
176
|
it "raises an error if uninstalling a system gem" do
|
@@ -230,7 +230,7 @@ describe Vagrant::Plugin::Manager do
|
|
230
230
|
before do
|
231
231
|
systems_path.unlink
|
232
232
|
|
233
|
-
described_class.
|
233
|
+
allow(described_class).to receive(:system_plugins_file).and_return(systems_path)
|
234
234
|
|
235
235
|
sf = Vagrant::Plugin::StateFile.new(systems_path)
|
236
236
|
sf.add_plugin("foo", version: "0.2.0")
|
@@ -243,9 +243,9 @@ describe Vagrant::Plugin::Manager do
|
|
243
243
|
expect(plugins.length).to eql(2)
|
244
244
|
expect(plugins).to have_key("foo")
|
245
245
|
expect(plugins["foo"]["gem_version"]).to eq("0.1.0")
|
246
|
-
expect(plugins["foo"]["system"]).to
|
246
|
+
expect(plugins["foo"]["system"]).to be_truthy
|
247
247
|
expect(plugins).to have_key("bar")
|
248
|
-
expect(plugins["bar"]["system"]).to
|
248
|
+
expect(plugins["bar"]["system"]).to be(true)
|
249
249
|
end
|
250
250
|
end
|
251
251
|
end
|