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
@@ -36,9 +36,9 @@ describe Vagrant::Plugin::StateFile do
|
|
36
36
|
end
|
37
37
|
|
38
38
|
it "should check for plugins" do
|
39
|
-
expect(subject.has_plugin?("foo")).to
|
39
|
+
expect(subject.has_plugin?("foo")).to be(false)
|
40
40
|
subject.add_plugin("foo")
|
41
|
-
expect(subject.has_plugin?("foo")).to
|
41
|
+
expect(subject.has_plugin?("foo")).to be(true)
|
42
42
|
end
|
43
43
|
|
44
44
|
it "should remove plugins" do
|
@@ -55,14 +55,14 @@ describe Vagrant::Plugin::V1::Command do
|
|
55
55
|
|
56
56
|
let(:environment) do
|
57
57
|
env = double("environment")
|
58
|
-
env.
|
58
|
+
allow(env).to receive(:root_path).and_return("foo")
|
59
59
|
env
|
60
60
|
end
|
61
61
|
|
62
62
|
let(:instance) { klass.new([], environment) }
|
63
63
|
|
64
64
|
it "should raise an exception if a root_path is not available" do
|
65
|
-
environment.
|
65
|
+
allow(environment).to receive(:root_path).and_return(nil)
|
66
66
|
|
67
67
|
expect { instance.with_target_vms }.
|
68
68
|
to raise_error(Vagrant::Errors::NoEnvironmentError)
|
@@ -75,9 +75,9 @@ describe Vagrant::Plugin::V1::Command do
|
|
75
75
|
bar_vm = double("bar")
|
76
76
|
allow(bar_vm).to receive(:name).and_return("bar")
|
77
77
|
|
78
|
-
environment.
|
79
|
-
|
80
|
-
|
78
|
+
allow(environment).to receive(:multivm?).and_return(true)
|
79
|
+
allow(environment).to receive(:vms).and_return({ "foo" => foo_vm, "bar" => bar_vm })
|
80
|
+
allow(environment).to receive(:vms_ordered).and_return([foo_vm, bar_vm])
|
81
81
|
|
82
82
|
vms = []
|
83
83
|
instance.with_target_vms do |vm|
|
@@ -88,7 +88,8 @@ describe Vagrant::Plugin::V1::Command do
|
|
88
88
|
end
|
89
89
|
|
90
90
|
it "raises an exception if the named VM doesn't exist" do
|
91
|
-
environment.
|
91
|
+
allow(environment).to receive(:multivm?).and_return(true)
|
92
|
+
allow(environment).to receive(:vms).and_return({})
|
92
93
|
|
93
94
|
expect { instance.with_target_vms("foo") }.
|
94
95
|
to raise_error(Vagrant::Errors::VMNotFoundError)
|
@@ -98,8 +99,8 @@ describe Vagrant::Plugin::V1::Command do
|
|
98
99
|
foo_vm = double("foo")
|
99
100
|
allow(foo_vm).to receive(:name).and_return(:foo)
|
100
101
|
|
101
|
-
environment.
|
102
|
-
|
102
|
+
allow(environment).to receive(:multivm?).and_return(true)
|
103
|
+
allow(environment).to receive(:vms).and_return({ foo: foo_vm, bar: nil })
|
103
104
|
|
104
105
|
vms = []
|
105
106
|
instance.with_target_vms("foo") { |vm| vms << vm }
|
@@ -78,7 +78,7 @@ describe Vagrant::Plugin::V2::Command do
|
|
78
78
|
subject { instance }
|
79
79
|
|
80
80
|
it "should raise an exception if a root_path is not available" do
|
81
|
-
environment.
|
81
|
+
allow(environment).to receive(:root_path).and_return(nil)
|
82
82
|
|
83
83
|
expect { instance.with_target_vms }.
|
84
84
|
to raise_error(Vagrant::Errors::NoEnvironmentError)
|
@@ -86,16 +86,18 @@ describe Vagrant::Plugin::V2::Command do
|
|
86
86
|
|
87
87
|
it "should yield every VM in order if no name is given" do
|
88
88
|
foo_vm = double("foo")
|
89
|
-
foo_vm.
|
90
|
-
foo_vm.
|
91
|
-
foo_vm.
|
89
|
+
allow(foo_vm).to receive(:name).and_return("foo")
|
90
|
+
allow(foo_vm).to receive(:provider).and_return(:foobarbaz)
|
91
|
+
allow(foo_vm).to receive(:ui).and_return(Vagrant::UI::Silent.new)
|
92
|
+
allow(foo_vm).to receive(:state).and_return(nil)
|
92
93
|
|
93
94
|
bar_vm = double("bar")
|
94
|
-
bar_vm.
|
95
|
-
bar_vm.
|
96
|
-
bar_vm.
|
95
|
+
allow(bar_vm).to receive(:name).and_return("bar")
|
96
|
+
allow(bar_vm).to receive(:provider).and_return(:foobarbaz)
|
97
|
+
allow(bar_vm).to receive(:ui).and_return(Vagrant::UI::Silent.new)
|
98
|
+
allow(bar_vm).to receive(:state).and_return(nil)
|
97
99
|
|
98
|
-
environment.
|
100
|
+
allow(environment).to receive(:machine_names).and_return([:foo, :bar])
|
99
101
|
allow(environment).to receive(:machine).with(:foo, environment.default_provider).and_return(foo_vm)
|
100
102
|
allow(environment).to receive(:machine).with(:bar, environment.default_provider).and_return(bar_vm)
|
101
103
|
|
@@ -108,7 +110,7 @@ describe Vagrant::Plugin::V2::Command do
|
|
108
110
|
end
|
109
111
|
|
110
112
|
it "raises an exception if the named VM doesn't exist" do
|
111
|
-
environment.
|
113
|
+
allow(environment).to receive(:machine_names).and_return([:default])
|
112
114
|
allow(environment).to receive(:machine).with(:foo, anything).and_return(nil)
|
113
115
|
|
114
116
|
expect { instance.with_target_vms("foo") }.
|
@@ -117,9 +119,10 @@ describe Vagrant::Plugin::V2::Command do
|
|
117
119
|
|
118
120
|
it "yields the given VM if a name is given" do
|
119
121
|
foo_vm = double("foo")
|
120
|
-
foo_vm.
|
121
|
-
foo_vm.
|
122
|
-
foo_vm.
|
122
|
+
allow(foo_vm).to receive(:name).and_return("foo")
|
123
|
+
allow(foo_vm).to receive(:provider).and_return(:foobarbaz)
|
124
|
+
allow(foo_vm).to receive(:ui).and_return(Vagrant::UI::Silent.new)
|
125
|
+
allow(foo_vm).to receive(:state).and_return(nil)
|
123
126
|
|
124
127
|
allow(environment).to receive(:machine).with(:foo, environment.default_provider).and_return(foo_vm)
|
125
128
|
|
@@ -130,9 +133,10 @@ describe Vagrant::Plugin::V2::Command do
|
|
130
133
|
|
131
134
|
it "calls state after yielding the vm to update the machine index" do
|
132
135
|
foo_vm = double("foo")
|
133
|
-
foo_vm.
|
134
|
-
foo_vm.
|
135
|
-
foo_vm.
|
136
|
+
allow(foo_vm).to receive(:name).and_return("foo")
|
137
|
+
allow(foo_vm).to receive(:provider).and_return(:foobarbaz)
|
138
|
+
allow(foo_vm).to receive(:ui).and_return(Vagrant::UI::Silent.new)
|
139
|
+
allow(foo_vm).to receive(:state).and_return(nil)
|
136
140
|
|
137
141
|
allow(environment).to receive(:machine).with(:foo, environment.default_provider).and_return(foo_vm)
|
138
142
|
|
@@ -145,9 +149,10 @@ describe Vagrant::Plugin::V2::Command do
|
|
145
149
|
foo_vm = double("foo")
|
146
150
|
provider = :foobarbaz
|
147
151
|
|
148
|
-
foo_vm.
|
149
|
-
foo_vm.
|
150
|
-
foo_vm.
|
152
|
+
allow(foo_vm).to receive(:name).and_return("foo")
|
153
|
+
allow(foo_vm).to receive(:provider).and_return(provider)
|
154
|
+
allow(foo_vm).to receive(:ui).and_return(Vagrant::UI::Silent.new)
|
155
|
+
allow(foo_vm).to receive(:state).and_return(nil)
|
151
156
|
allow(environment).to receive(:machine).with(:foo, provider).and_return(foo_vm)
|
152
157
|
|
153
158
|
vms = []
|
@@ -158,7 +163,7 @@ describe Vagrant::Plugin::V2::Command do
|
|
158
163
|
it "should raise an exception if an active machine exists with a different provider" do
|
159
164
|
name = :foo
|
160
165
|
|
161
|
-
environment.
|
166
|
+
allow(environment).to receive(:active_machines).and_return([[name, :vmware]])
|
162
167
|
expect { instance.with_target_vms(name.to_s, provider: :foo) }.
|
163
168
|
to raise_error Vagrant::Errors::ActiveMachineWithDifferentProvider
|
164
169
|
end
|
@@ -168,11 +173,12 @@ describe Vagrant::Plugin::V2::Command do
|
|
168
173
|
provider = :vmware
|
169
174
|
vmware_vm = double("vmware_vm")
|
170
175
|
|
171
|
-
environment.
|
176
|
+
allow(environment).to receive(:active_machines).and_return([[name, provider]])
|
172
177
|
allow(environment).to receive(:machine).with(name, provider).and_return(vmware_vm)
|
173
|
-
vmware_vm.
|
174
|
-
vmware_vm.
|
175
|
-
vmware_vm.
|
178
|
+
allow(vmware_vm).to receive(:name).and_return(name)
|
179
|
+
allow(vmware_vm).to receive(:provider).and_return(provider)
|
180
|
+
allow(vmware_vm).to receive(:ui).and_return(Vagrant::UI::Silent.new)
|
181
|
+
allow(vmware_vm).to receive(:state).and_return(nil)
|
176
182
|
|
177
183
|
vms = []
|
178
184
|
instance.with_target_vms(name.to_s) { |vm| vms << vm }
|
@@ -184,10 +190,12 @@ describe Vagrant::Plugin::V2::Command do
|
|
184
190
|
provider = :vmware
|
185
191
|
vmware_vm = double("vmware_vm")
|
186
192
|
|
187
|
-
environment.
|
193
|
+
allow(environment).to receive(:active_machines).and_return([[name, provider]])
|
188
194
|
allow(environment).to receive(:machine).with(name, provider).and_return(vmware_vm)
|
189
|
-
vmware_vm.
|
190
|
-
vmware_vm.
|
195
|
+
allow(vmware_vm).to receive(:name).and_return(name)
|
196
|
+
allow(vmware_vm).to receive(:provider).and_return(provider)
|
197
|
+
allow(vmware_vm).to receive(:ui).and_return(Vagrant::UI::Silent.new)
|
198
|
+
allow(vmware_vm).to receive(:state).and_return(nil)
|
191
199
|
|
192
200
|
vms = []
|
193
201
|
instance.with_target_vms(name.to_s, provider: provider) { |vm| vms << vm }
|
@@ -199,9 +207,10 @@ describe Vagrant::Plugin::V2::Command do
|
|
199
207
|
machine = double("machine")
|
200
208
|
|
201
209
|
allow(environment).to receive(:machine).with(name, environment.default_provider).and_return(machine)
|
202
|
-
machine.
|
203
|
-
machine.
|
204
|
-
machine.
|
210
|
+
allow(machine).to receive(:name).and_return(name)
|
211
|
+
allow(machine).to receive(:provider).and_return(environment.default_provider)
|
212
|
+
allow(machine).to receive(:ui).and_return(Vagrant::UI::Silent.new)
|
213
|
+
allow(machine).to receive(:state).and_return(nil)
|
205
214
|
|
206
215
|
results = []
|
207
216
|
instance.with_target_vms(name.to_s) { |m| results << m }
|
@@ -213,13 +222,14 @@ describe Vagrant::Plugin::V2::Command do
|
|
213
222
|
provider = :vmware
|
214
223
|
vmware_vm = double("vmware_vm")
|
215
224
|
|
216
|
-
environment.
|
225
|
+
allow(environment).to receive(:active_machines).and_return([[name, provider]])
|
217
226
|
allow(environment).to receive(:machine).with(name, provider).and_return(vmware_vm)
|
218
|
-
environment.
|
219
|
-
environment.
|
220
|
-
vmware_vm.
|
221
|
-
vmware_vm.
|
222
|
-
vmware_vm.
|
227
|
+
allow(environment).to receive(:machine_names).and_return([])
|
228
|
+
allow(environment).to receive(:primary_machine_name).and_return(name)
|
229
|
+
allow(vmware_vm).to receive(:name).and_return(name)
|
230
|
+
allow(vmware_vm).to receive(:provider).and_return(provider)
|
231
|
+
allow(vmware_vm).to receive(:ui).and_return(Vagrant::UI::Silent.new)
|
232
|
+
allow(vmware_vm).to receive(:state).and_return(nil)
|
223
233
|
|
224
234
|
vms = []
|
225
235
|
instance.with_target_vms(nil, single_target: true) { |vm| vms << vm }
|
@@ -230,13 +240,14 @@ describe Vagrant::Plugin::V2::Command do
|
|
230
240
|
name = :foo
|
231
241
|
machine = double("machine")
|
232
242
|
|
233
|
-
environment.
|
243
|
+
allow(environment).to receive(:active_machines).and_return([])
|
234
244
|
allow(environment).to receive(:machine).with(name, environment.default_provider).and_return(machine)
|
235
|
-
environment.
|
236
|
-
environment.
|
237
|
-
machine.
|
238
|
-
machine.
|
239
|
-
machine.
|
245
|
+
allow(environment).to receive(:machine_names).and_return([])
|
246
|
+
allow(environment).to receive(:primary_machine_name).and_return(name)
|
247
|
+
allow(machine).to receive(:name).and_return(name)
|
248
|
+
allow(machine).to receive(:provider).and_return(environment.default_provider)
|
249
|
+
allow(machine).to receive(:ui).and_return(Vagrant::UI::Silent.new)
|
250
|
+
allow(machine).to receive(:state).and_return(nil)
|
240
251
|
|
241
252
|
vms = []
|
242
253
|
instance.with_target_vms(nil, single_target: true) { |vm| vms << machine }
|
@@ -255,7 +266,7 @@ describe Vagrant::Plugin::V2::Command do
|
|
255
266
|
other_machine.id = "foo"
|
256
267
|
|
257
268
|
# Make sure we don't have a root path, to test
|
258
|
-
environment.
|
269
|
+
allow(environment).to receive(:root_path).and_return(nil)
|
259
270
|
|
260
271
|
results = []
|
261
272
|
subject.with_target_vms(other_machine.index_uuid) { |m| results << m }
|
@@ -282,7 +293,7 @@ describe Vagrant::Plugin::V2::Command do
|
|
282
293
|
FileUtils.rm_rf(iso_env.workdir)
|
283
294
|
|
284
295
|
# Make sure we don't have a root path, to test
|
285
|
-
environment.
|
296
|
+
allow(environment).to receive(:root_path).and_return(nil)
|
286
297
|
|
287
298
|
# Run the command
|
288
299
|
expect {
|
@@ -2,7 +2,8 @@ require File.expand_path("../../../../base", __FILE__)
|
|
2
2
|
|
3
3
|
describe Vagrant::Plugin::V2::Plugin do
|
4
4
|
before do
|
5
|
-
described_class.
|
5
|
+
allow(described_class).to receive(:manager)
|
6
|
+
.and_return(Vagrant::Plugin::V2::Manager.new)
|
6
7
|
end
|
7
8
|
|
8
9
|
it "should be able to set and get the name" do
|
@@ -71,8 +72,8 @@ describe Vagrant::Plugin::V2::Plugin do
|
|
71
72
|
command("bar", primary: false) { "bar" }
|
72
73
|
end
|
73
74
|
|
74
|
-
expect(plugin.components.commands[:foo][1][:primary]).to
|
75
|
-
expect(plugin.components.commands[:bar][1][:primary]).to
|
75
|
+
expect(plugin.components.commands[:foo][1][:primary]).to be(true)
|
76
|
+
expect(plugin.components.commands[:bar][1][:primary]).to be(false)
|
76
77
|
end
|
77
78
|
|
78
79
|
["spaces bad", "sym^bols"].each do |bad|
|
@@ -42,14 +42,14 @@ describe Vagrant::Plugin::V2::Provider do
|
|
42
42
|
end
|
43
43
|
end
|
44
44
|
|
45
|
-
machine.
|
45
|
+
allow(machine).to receive(:id).and_return("YEAH")
|
46
46
|
|
47
47
|
instance._initialize("foo", machine)
|
48
48
|
end
|
49
49
|
|
50
50
|
it "can execute capabilities" do
|
51
|
-
expect(subject.capability?(:foo)).to
|
52
|
-
expect(subject.capability?(:bar)).to
|
51
|
+
expect(subject.capability?(:foo)).to be(false)
|
52
|
+
expect(subject.capability?(:bar)).to be(true)
|
53
53
|
|
54
54
|
expect { subject.capability(:bar) }.
|
55
55
|
to raise_error("bar YEAH")
|
@@ -18,25 +18,25 @@ describe Vagrant do
|
|
18
18
|
describe "#in_installer?" do
|
19
19
|
it "is not if env is not set" do
|
20
20
|
with_temp_env("VAGRANT_INSTALLER_ENV" => nil) do
|
21
|
-
expect(subject.in_installer?).to
|
21
|
+
expect(subject.in_installer?).to be(false)
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
25
25
|
it "is if env is set" do
|
26
26
|
with_temp_env("VAGRANT_INSTALLER_ENV" => "/foo") do
|
27
|
-
expect(subject.in_installer?).to
|
27
|
+
expect(subject.in_installer?).to be(true)
|
28
28
|
end
|
29
29
|
end
|
30
30
|
end
|
31
31
|
|
32
32
|
describe "#installer_embedded_dir" do
|
33
33
|
it "returns nil if not in an installer" do
|
34
|
-
Vagrant.
|
34
|
+
allow(Vagrant).to receive(:in_installer?).and_return(false)
|
35
35
|
expect(subject.installer_embedded_dir).to be_nil
|
36
36
|
end
|
37
37
|
|
38
38
|
it "returns the set directory" do
|
39
|
-
Vagrant.
|
39
|
+
allow(Vagrant).to receive(:in_installer?).and_return(true)
|
40
40
|
|
41
41
|
with_temp_env("VAGRANT_INSTALLER_EMBEDDED_DIR" => "/foo") do
|
42
42
|
expect(subject.installer_embedded_dir).to eq("/foo")
|
@@ -47,13 +47,13 @@ describe Vagrant do
|
|
47
47
|
describe "#plugins_enabled?" do
|
48
48
|
it "returns true if the env is not set" do
|
49
49
|
with_temp_env("VAGRANT_NO_PLUGINS" => nil) do
|
50
|
-
expect(subject.plugins_enabled?).to
|
50
|
+
expect(subject.plugins_enabled?).to be(true)
|
51
51
|
end
|
52
52
|
end
|
53
53
|
|
54
54
|
it "returns false if the env is set" do
|
55
55
|
with_temp_env("VAGRANT_NO_PLUGINS" => "1") do
|
56
|
-
expect(subject.plugins_enabled?).to
|
56
|
+
expect(subject.plugins_enabled?).to be(false)
|
57
57
|
end
|
58
58
|
end
|
59
59
|
end
|
@@ -5,7 +5,7 @@ describe Vagrant::UI::Basic do
|
|
5
5
|
it "outputs within the a new thread" do
|
6
6
|
current = Thread.current.object_id
|
7
7
|
|
8
|
-
expect(subject).to receive(:safe_puts).with { |*args|
|
8
|
+
expect(subject).to receive(:safe_puts).with(any_args) { |*args|
|
9
9
|
expect(Thread.current.object_id).to_not eq(current)
|
10
10
|
true
|
11
11
|
}
|
@@ -14,7 +14,7 @@ describe Vagrant::UI::Basic do
|
|
14
14
|
end
|
15
15
|
|
16
16
|
it "outputs using `puts` by default" do
|
17
|
-
expect(subject).to receive(:safe_puts).with { |message, **opts|
|
17
|
+
expect(subject).to receive(:safe_puts).with(any_args) { |message, **opts|
|
18
18
|
expect(opts[:printer]).to eq(:puts)
|
19
19
|
true
|
20
20
|
}
|
@@ -23,7 +23,7 @@ describe Vagrant::UI::Basic do
|
|
23
23
|
end
|
24
24
|
|
25
25
|
it "outputs using `print` if new_line is false" do
|
26
|
-
expect(subject).to receive(:safe_puts).with { |message, **opts|
|
26
|
+
expect(subject).to receive(:safe_puts).with(any_args) { |message, **opts|
|
27
27
|
expect(opts[:printer]).to eq(:print)
|
28
28
|
true
|
29
29
|
}
|
@@ -32,7 +32,7 @@ describe Vagrant::UI::Basic do
|
|
32
32
|
end
|
33
33
|
|
34
34
|
it "outputs using `print` if new_line is false" do
|
35
|
-
expect(subject).to receive(:safe_puts).with { |message, **opts|
|
35
|
+
expect(subject).to receive(:safe_puts).with(any_args) { |message, **opts|
|
36
36
|
expect(opts[:printer]).to eq(:print)
|
37
37
|
true
|
38
38
|
}
|
@@ -44,7 +44,7 @@ describe Vagrant::UI::Basic do
|
|
44
44
|
stdout = StringIO.new
|
45
45
|
subject.stdout = stdout
|
46
46
|
|
47
|
-
expect(subject).to receive(:safe_puts).with { |message, **opts|
|
47
|
+
expect(subject).to receive(:safe_puts).with(any_args) { |message, **opts|
|
48
48
|
expect(opts[:io]).to be(stdout)
|
49
49
|
true
|
50
50
|
}
|
@@ -60,7 +60,7 @@ describe Vagrant::UI::Basic do
|
|
60
60
|
stderr = StringIO.new
|
61
61
|
subject.stderr = stderr
|
62
62
|
|
63
|
-
expect(subject).to receive(:safe_puts).with { |message, **opts|
|
63
|
+
expect(subject).to receive(:safe_puts).with(any_args) { |message, **opts|
|
64
64
|
expect(opts[:io]).to be(stderr)
|
65
65
|
true
|
66
66
|
}
|
@@ -81,7 +81,7 @@ describe Vagrant::UI::Basic do
|
|
81
81
|
|
82
82
|
context "#detail" do
|
83
83
|
it "outputs details" do
|
84
|
-
expect(subject).to receive(:safe_puts).with { |message, **opts|
|
84
|
+
expect(subject).to receive(:safe_puts).with(any_args) { |message, **opts|
|
85
85
|
expect(message).to eq("foo")
|
86
86
|
true
|
87
87
|
}
|
@@ -114,7 +114,7 @@ describe Vagrant::UI::Colored do
|
|
114
114
|
end
|
115
115
|
|
116
116
|
it "does not bold by default with a color" do
|
117
|
-
expect(subject).to receive(:safe_puts).with { |message, *args|
|
117
|
+
expect(subject).to receive(:safe_puts).with(any_args) { |message, *args|
|
118
118
|
expect(message).to start_with("\033[0;31m")
|
119
119
|
expect(message).to end_with("\033[0m")
|
120
120
|
}
|
@@ -125,7 +125,7 @@ describe Vagrant::UI::Colored do
|
|
125
125
|
|
126
126
|
describe "#error" do
|
127
127
|
it "colors red" do
|
128
|
-
expect(subject).to receive(:safe_puts).with { |message, *args|
|
128
|
+
expect(subject).to receive(:safe_puts).with(any_args) { |message, *args|
|
129
129
|
expect(message).to start_with("\033[0;31m")
|
130
130
|
expect(message).to end_with("\033[0m")
|
131
131
|
}
|
@@ -153,7 +153,7 @@ describe Vagrant::UI::Colored do
|
|
153
153
|
it "colors output to color specified in global opts" do
|
154
154
|
subject.opts[:color] = :red
|
155
155
|
|
156
|
-
expect(subject).to receive(:safe_puts).with { |message, *args|
|
156
|
+
expect(subject).to receive(:safe_puts).with(any_args) { |message, *args|
|
157
157
|
expect(message).to start_with("\033[0;31m")
|
158
158
|
expect(message).to end_with("\033[0m")
|
159
159
|
}
|
@@ -164,7 +164,7 @@ describe Vagrant::UI::Colored do
|
|
164
164
|
it "colors output to specified color over global opts" do
|
165
165
|
subject.opts[:color] = :red
|
166
166
|
|
167
|
-
expect(subject).to receive(:safe_puts).with { |message, *args|
|
167
|
+
expect(subject).to receive(:safe_puts).with(any_args) { |message, *args|
|
168
168
|
expect(message).to start_with("\033[0;32m")
|
169
169
|
expect(message).to end_with("\033[0m")
|
170
170
|
}
|
@@ -175,7 +175,7 @@ describe Vagrant::UI::Colored do
|
|
175
175
|
it "bolds the output if specified" do
|
176
176
|
subject.opts[:color] = :red
|
177
177
|
|
178
|
-
expect(subject).to receive(:safe_puts).with { |message, *args|
|
178
|
+
expect(subject).to receive(:safe_puts).with(any_args) { |message, *args|
|
179
179
|
expect(message).to start_with("\033[1;31m")
|
180
180
|
expect(message).to end_with("\033[0m")
|
181
181
|
}
|
@@ -186,7 +186,7 @@ describe Vagrant::UI::Colored do
|
|
186
186
|
|
187
187
|
describe "#success" do
|
188
188
|
it "colors green" do
|
189
|
-
expect(subject).to receive(:safe_puts).with { |message, *args|
|
189
|
+
expect(subject).to receive(:safe_puts).with(any_args) { |message, *args|
|
190
190
|
expect(message).to start_with("\033[0;32m")
|
191
191
|
expect(message).to end_with("\033[0m")
|
192
192
|
}
|
@@ -197,7 +197,7 @@ describe Vagrant::UI::Colored do
|
|
197
197
|
|
198
198
|
describe "#warn" do
|
199
199
|
it "colors yellow" do
|
200
|
-
expect(subject).to receive(:safe_puts).with { |message, *args|
|
200
|
+
expect(subject).to receive(:safe_puts).with(any_args) { |message, *args|
|
201
201
|
expect(message).to start_with("\033[0;33m")
|
202
202
|
expect(message).to end_with("\033[0m")
|
203
203
|
}
|
@@ -218,7 +218,7 @@ describe Vagrant::UI::MachineReadable do
|
|
218
218
|
[:detail, :warn, :error, :info, :output, :success].each do |method|
|
219
219
|
describe "##{method}" do
|
220
220
|
it "outputs UI type to the machine-readable output" do
|
221
|
-
expect(subject).to receive(:safe_puts).with { |message|
|
221
|
+
expect(subject).to receive(:safe_puts).with(any_args) { |message|
|
222
222
|
parts = message.split(",")
|
223
223
|
expect(parts.length).to eq(5)
|
224
224
|
expect(parts[1]).to eq("")
|
@@ -235,7 +235,7 @@ describe Vagrant::UI::MachineReadable do
|
|
235
235
|
|
236
236
|
describe "#machine" do
|
237
237
|
it "is formatted properly" do
|
238
|
-
expect(subject).to receive(:safe_puts).with { |message|
|
238
|
+
expect(subject).to receive(:safe_puts).with(any_args) { |message|
|
239
239
|
parts = message.split(",")
|
240
240
|
expect(parts.length).to eq(5)
|
241
241
|
expect(parts[1]).to eq("")
|
@@ -249,7 +249,7 @@ describe Vagrant::UI::MachineReadable do
|
|
249
249
|
end
|
250
250
|
|
251
251
|
it "includes a target if given" do
|
252
|
-
expect(subject).to receive(:safe_puts).with { |message|
|
252
|
+
expect(subject).to receive(:safe_puts).with(any_args) { |message|
|
253
253
|
parts = message.split(",")
|
254
254
|
expect(parts.length).to eq(4)
|
255
255
|
expect(parts[1]).to eq("boom")
|
@@ -262,7 +262,7 @@ describe Vagrant::UI::MachineReadable do
|
|
262
262
|
end
|
263
263
|
|
264
264
|
it "replaces commas" do
|
265
|
-
expect(subject).to receive(:safe_puts).with { |message|
|
265
|
+
expect(subject).to receive(:safe_puts).with(any_args) { |message|
|
266
266
|
parts = message.split(",")
|
267
267
|
expect(parts.length).to eq(4)
|
268
268
|
expect(parts[3]).to eq("foo%!(VAGRANT_COMMA)bar")
|
@@ -273,7 +273,7 @@ describe Vagrant::UI::MachineReadable do
|
|
273
273
|
end
|
274
274
|
|
275
275
|
it "replaces newlines" do
|
276
|
-
expect(subject).to receive(:safe_puts).with { |message|
|
276
|
+
expect(subject).to receive(:safe_puts).with(any_args) { |message|
|
277
277
|
parts = message.split(",")
|
278
278
|
expect(parts.length).to eq(4)
|
279
279
|
expect(parts[3]).to eq("foo\\nbar\\r")
|
@@ -286,7 +286,7 @@ describe Vagrant::UI::MachineReadable do
|
|
286
286
|
# This is for a bug where JSON parses are frozen and an
|
287
287
|
# exception was being raised.
|
288
288
|
it "works properly with frozen string arguments" do
|
289
|
-
expect(subject).to receive(:safe_puts).with { |message|
|
289
|
+
expect(subject).to receive(:safe_puts).with(any_args) { |message|
|
290
290
|
parts = message.split(",")
|
291
291
|
expect(parts.length).to eq(4)
|
292
292
|
expect(parts[3]).to eq("foo\\nbar\\r")
|
@@ -350,7 +350,7 @@ describe Vagrant::UI::Prefixed do
|
|
350
350
|
|
351
351
|
describe "#opts" do
|
352
352
|
it "is the parent's opts" do
|
353
|
-
ui.
|
353
|
+
allow(ui).to receive(:opts).and_return(Object.new)
|
354
354
|
expect(subject.opts).to be(ui.opts)
|
355
355
|
end
|
356
356
|
end
|