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
@@ -0,0 +1,27 @@
|
|
1
|
+
(The MIT License)
|
2
|
+
|
3
|
+
Copyright (c) 2013 Peter Alfvin
|
4
|
+
Copyright (c) 2012 David Chelimsky, Myron Marston
|
5
|
+
Copyright (c) 2006 David Chelimsky, The RSpec Development Team
|
6
|
+
Copyright (c) 2005 Steven Baker
|
7
|
+
|
8
|
+
MIT License
|
9
|
+
|
10
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
11
|
+
a copy of this software and associated documentation files (the
|
12
|
+
"Software"), to deal in the Software without restriction, including
|
13
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
14
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
15
|
+
permit persons to whom the Software is furnished to do so, subject to
|
16
|
+
the following conditions:
|
17
|
+
|
18
|
+
The above copyright notice and this permission notice shall be
|
19
|
+
included in all copies or substantial portions of the Software.
|
20
|
+
|
21
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
22
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
23
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
24
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
25
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
26
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
27
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@@ -0,0 +1,72 @@
|
|
1
|
+
# RSpec::Its [![Build Status](https://travis-ci.org/rspec/rspec-its.svg)](https://travis-ci.org/rspec/rspec-its)
|
2
|
+
|
3
|
+
RSpec::Its provides the `its` method as a short-hand to specify the expected value of an attribute.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
gem 'rspec-its'
|
10
|
+
|
11
|
+
And then execute:
|
12
|
+
|
13
|
+
$ bundle
|
14
|
+
|
15
|
+
Or install it yourself as:
|
16
|
+
|
17
|
+
$ gem install rspec-its
|
18
|
+
|
19
|
+
And require it as:
|
20
|
+
|
21
|
+
require 'rspec/its'
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
Use the `its` method to generate a nested example group with
|
26
|
+
a single example that specifies the expected value of an attribute of the
|
27
|
+
subject using `should`, `should_not` or `is_expected`.
|
28
|
+
|
29
|
+
`its` accepts a symbol or a string, and a block representing the example.
|
30
|
+
|
31
|
+
its(:size) { should eq(1) }
|
32
|
+
its("length") { should eq(1) }
|
33
|
+
|
34
|
+
You can use a string with dots to specify a nested attribute (i.e. an
|
35
|
+
attribute of the attribute of the subject).
|
36
|
+
|
37
|
+
its("phone_numbers.size") { should_not eq(0) }
|
38
|
+
|
39
|
+
The following expect-style method is also available:
|
40
|
+
|
41
|
+
its(:size) { is_expected.to eq(1) }
|
42
|
+
|
43
|
+
as is this alias for pluralized use:
|
44
|
+
|
45
|
+
its(:keys) { are_expected.to eq([:key1, :key2])
|
46
|
+
|
47
|
+
When the subject implements the `[]` operator, you can pass in an array with a single key to
|
48
|
+
refer to the value returned by that operator when passed that key as an argument.
|
49
|
+
|
50
|
+
its([:key]) { is_expected.to eq(value) }
|
51
|
+
|
52
|
+
For hashes, multiple keys within the array will result in successive accesses into the hash. For example:
|
53
|
+
|
54
|
+
subject { {key1: {key2: 3} } }
|
55
|
+
its([:key1, :key2]) { is_expected.to eq(3)
|
56
|
+
|
57
|
+
For other objects, multiple keys within the array will be passed as separate arguments in a single method call to [], as in:
|
58
|
+
|
59
|
+
subject { Matrix[ [:a, :b], [:c, :d] ] }
|
60
|
+
its([1,1]) { should eq(:d) }
|
61
|
+
|
62
|
+
Metadata arguments are supported.
|
63
|
+
|
64
|
+
its(:size, focus: true) { should eq(1) }
|
65
|
+
|
66
|
+
## Contributing
|
67
|
+
|
68
|
+
1. Fork it
|
69
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
70
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
71
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
72
|
+
5. Create new Pull Request
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require "bundler"
|
2
|
+
Bundler.setup
|
3
|
+
Bundler::GemHelper.install_tasks
|
4
|
+
|
5
|
+
require "rake"
|
6
|
+
require "rspec/core/rake_task"
|
7
|
+
|
8
|
+
require "cucumber/rake/task"
|
9
|
+
Cucumber::Rake::Task.new(:cucumber)
|
10
|
+
|
11
|
+
desc "Run all examples"
|
12
|
+
RSpec::Core::RakeTask.new(:spec) do |t|
|
13
|
+
t.ruby_opts = %w[-w]
|
14
|
+
end
|
15
|
+
|
16
|
+
task :default => [:spec, :cucumber]
|
@@ -0,0 +1,125 @@
|
|
1
|
+
Feature: attribute of subject
|
2
|
+
|
3
|
+
Scenario: specify value of a nested attribute
|
4
|
+
Given a file named "example_spec.rb" with:
|
5
|
+
"""ruby
|
6
|
+
class Person
|
7
|
+
attr_reader :phone_numbers
|
8
|
+
def initialize
|
9
|
+
@phone_numbers = []
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
describe Person do
|
14
|
+
context "with one phone number (555-1212)"do
|
15
|
+
subject do
|
16
|
+
person = Person.new
|
17
|
+
person.phone_numbers << "555-1212"
|
18
|
+
person
|
19
|
+
end
|
20
|
+
|
21
|
+
its("phone_numbers.first") { should eq("555-1212") }
|
22
|
+
end
|
23
|
+
end
|
24
|
+
"""
|
25
|
+
When I run rspec with the documentation option
|
26
|
+
Then the output should contain:
|
27
|
+
"""
|
28
|
+
Person
|
29
|
+
with one phone number (555-1212)
|
30
|
+
phone_numbers.first
|
31
|
+
should eq "555-1212"
|
32
|
+
"""
|
33
|
+
|
34
|
+
Scenario: specify value of an attribute of a hash
|
35
|
+
Given a file named "example_spec.rb" with:
|
36
|
+
"""ruby
|
37
|
+
describe Hash do
|
38
|
+
context "with two items" do
|
39
|
+
subject do
|
40
|
+
{:one => 'one', :two => 'two'}
|
41
|
+
end
|
42
|
+
|
43
|
+
its(:size) { should eq(2) }
|
44
|
+
end
|
45
|
+
end
|
46
|
+
"""
|
47
|
+
When I run rspec
|
48
|
+
Then the examples should all pass
|
49
|
+
|
50
|
+
Scenario: specify value for key in a hash
|
51
|
+
Given a file named "example_spec.rb" with:
|
52
|
+
"""ruby
|
53
|
+
describe Hash do
|
54
|
+
context "with keys :one and 'two'" do
|
55
|
+
subject do
|
56
|
+
{:one => 1, "two" => 2}
|
57
|
+
end
|
58
|
+
|
59
|
+
its([:one]) { should eq(1) }
|
60
|
+
its(["two"]) { should eq(2) }
|
61
|
+
end
|
62
|
+
end
|
63
|
+
"""
|
64
|
+
When I run rspec
|
65
|
+
Then the examples should all pass
|
66
|
+
|
67
|
+
Scenario: specify value for key in a hash-like object
|
68
|
+
Given a file named "example_spec.rb" with:
|
69
|
+
"""ruby
|
70
|
+
require 'matrix'
|
71
|
+
|
72
|
+
describe Matrix do
|
73
|
+
context "with values [[1, 2], [3, 4]]" do
|
74
|
+
subject do
|
75
|
+
Matrix[[1, 2], [3, 4]]
|
76
|
+
end
|
77
|
+
|
78
|
+
its([0, 1]) { should eq(2) }
|
79
|
+
its([1, 0]) { should eq(3) }
|
80
|
+
its([1, 2]) { should be_nil }
|
81
|
+
end
|
82
|
+
end
|
83
|
+
"""
|
84
|
+
When I run rspec
|
85
|
+
Then the examples should all pass
|
86
|
+
|
87
|
+
Scenario: failures are correctly reported as coming from the `its` line
|
88
|
+
Given a file named "example_spec.rb" with:
|
89
|
+
"""ruby
|
90
|
+
describe Array do
|
91
|
+
context "when first created" do
|
92
|
+
its(:size) { should_not eq(0) }
|
93
|
+
end
|
94
|
+
end
|
95
|
+
"""
|
96
|
+
When I run rspec
|
97
|
+
Then the output should contain "Failure/Error: its(:size) { should_not eq(0) }"
|
98
|
+
And the output should not match /#[^\n]*rspec[\x2f]its/
|
99
|
+
|
100
|
+
Scenario: examples can be specified by exact line number
|
101
|
+
Given a file named "example_spec.rb" with:
|
102
|
+
"""ruby
|
103
|
+
describe Array do
|
104
|
+
context "when first created" do
|
105
|
+
its(:size) { should eq(0) }
|
106
|
+
end
|
107
|
+
end
|
108
|
+
"""
|
109
|
+
When I run rspec specifying line number 3
|
110
|
+
Then the examples should all pass
|
111
|
+
|
112
|
+
Scenario: examples can be specified by line number within containing block
|
113
|
+
Given a file named "example_spec.rb" with:
|
114
|
+
"""ruby
|
115
|
+
describe Array do
|
116
|
+
context "when first created" do
|
117
|
+
its(:size) { should eq(0) }
|
118
|
+
end
|
119
|
+
it "should never execute this" do
|
120
|
+
expect(true).to be(false)
|
121
|
+
end
|
122
|
+
end
|
123
|
+
"""
|
124
|
+
When I run rspec specifying line number 2
|
125
|
+
Then the examples should all pass
|
data/vendor/bundle/ruby/2.4.0/gems/rspec-its-1.2.0/features/step_definitions/additional_cli_steps.rb
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
When /^I run rspec( with the documentation option)?$/ do |documentation|
|
2
|
+
rspec_its_gem_location = File.expand_path('../../../lib/rspec/its', __FILE__)
|
3
|
+
require_option = "--require #{rspec_its_gem_location}"
|
4
|
+
format_option = documentation ? "--format documentation" : ""
|
5
|
+
rspec_command = ['rspec', require_option, format_option, 'example_spec.rb'].join(' ')
|
6
|
+
step "I run `#{rspec_command}`"
|
7
|
+
end
|
8
|
+
|
9
|
+
When /^I run rspec specifying line number (\d+)$/ do |line_number|
|
10
|
+
rspec_its_gem_location = File.expand_path('../../../lib/rspec/its', __FILE__)
|
11
|
+
require_option = "--require #{rspec_its_gem_location}"
|
12
|
+
file_specification = "example_spec.rb:#{line_number}"
|
13
|
+
rspec_command = ['rspec', require_option, file_specification].join(' ')
|
14
|
+
step "I run `#{rspec_command}`"
|
15
|
+
end
|
16
|
+
|
17
|
+
Then /^the example(?:s)? should(?: all)? pass$/ do
|
18
|
+
step %q{the output should contain "0 failures"}
|
19
|
+
step %q{the output should not contain "0 examples"}
|
20
|
+
step %q{the exit status should be 0}
|
21
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'aruba/cucumber'
|
2
|
+
require 'rspec/core'
|
3
|
+
require 'rspec/its'
|
4
|
+
|
5
|
+
Before do
|
6
|
+
if RUBY_PLATFORM =~ /java/ || defined?(Rubinius)
|
7
|
+
@aruba_timeout_seconds = 60
|
8
|
+
else
|
9
|
+
@aruba_timeout_seconds = 10
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
Aruba.configure do |config|
|
14
|
+
config.before_cmd do |cmd|
|
15
|
+
set_env('JRUBY_OPTS', "-X-C #{ENV['JRUBY_OPTS']}") # disable JIT since these processes are so short lived
|
16
|
+
end
|
17
|
+
end if RUBY_PLATFORM == 'java'
|
18
|
+
|
19
|
+
Aruba.configure do |config|
|
20
|
+
config.before_cmd do |cmd|
|
21
|
+
set_env('RBXOPT', "-Xint=true #{ENV['RBXOPT']}") # disable JIT since these processes are so short lived
|
22
|
+
end
|
23
|
+
end if defined?(Rubinius)
|
@@ -0,0 +1,149 @@
|
|
1
|
+
require 'rspec/its/version'
|
2
|
+
require 'rspec/core'
|
3
|
+
|
4
|
+
module RSpec
|
5
|
+
module Its
|
6
|
+
|
7
|
+
# Creates a nested example group named by the submitted `attribute`,
|
8
|
+
# and then generates an example using the submitted block.
|
9
|
+
#
|
10
|
+
# @example
|
11
|
+
#
|
12
|
+
# # This ...
|
13
|
+
# describe Array do
|
14
|
+
# its(:size) { should eq(0) }
|
15
|
+
# end
|
16
|
+
#
|
17
|
+
# # ... generates the same runtime structure as this:
|
18
|
+
# describe Array do
|
19
|
+
# describe "size" do
|
20
|
+
# it "should eq(0)" do
|
21
|
+
# subject.size.should eq(0)
|
22
|
+
# end
|
23
|
+
# end
|
24
|
+
# end
|
25
|
+
#
|
26
|
+
# The attribute can be a `Symbol` or a `String`. Given a `String`
|
27
|
+
# with dots, the result is as though you concatenated that `String`
|
28
|
+
# onto the subject in an expression.
|
29
|
+
#
|
30
|
+
# @example
|
31
|
+
#
|
32
|
+
# describe Person do
|
33
|
+
# subject do
|
34
|
+
# Person.new.tap do |person|
|
35
|
+
# person.phone_numbers << "555-1212"
|
36
|
+
# end
|
37
|
+
# end
|
38
|
+
#
|
39
|
+
# its("phone_numbers.first") { should eq("555-1212") }
|
40
|
+
# end
|
41
|
+
#
|
42
|
+
# When the subject is a `Hash`, you can refer to the Hash keys by
|
43
|
+
# specifying a `Symbol` or `String` in an array.
|
44
|
+
#
|
45
|
+
# @example
|
46
|
+
#
|
47
|
+
# describe "a configuration Hash" do
|
48
|
+
# subject do
|
49
|
+
# { :max_users => 3,
|
50
|
+
# 'admin' => :all_permissions.
|
51
|
+
# 'john_doe' => {:permissions => [:read, :write]}}
|
52
|
+
# end
|
53
|
+
#
|
54
|
+
# its([:max_users]) { should eq(3) }
|
55
|
+
# its(['admin']) { should eq(:all_permissions) }
|
56
|
+
# its(['john_doe', :permissions]) { should eq([:read, :write]) }
|
57
|
+
#
|
58
|
+
# # You can still access to its regular methods this way:
|
59
|
+
# its(:keys) { should include(:max_users) }
|
60
|
+
# its(:count) { should eq(2) }
|
61
|
+
# end
|
62
|
+
#
|
63
|
+
# With an implicit subject, `is_expected` can be used as an alternative
|
64
|
+
# to `should` (e.g. for one-liner use)
|
65
|
+
#
|
66
|
+
# @example
|
67
|
+
#
|
68
|
+
# describe Array do
|
69
|
+
# its(:size) { is_expected.to eq(0) }
|
70
|
+
# end
|
71
|
+
#
|
72
|
+
# You can pass more than one arguments on the `its` block to add
|
73
|
+
# some options to the generated example
|
74
|
+
#
|
75
|
+
# @example
|
76
|
+
#
|
77
|
+
# # This ...
|
78
|
+
# describe Array do
|
79
|
+
# its(:size, :focus) { should eq(0) }
|
80
|
+
# end
|
81
|
+
#
|
82
|
+
# # ... generates the same runtime structure as this:
|
83
|
+
# describe Array do
|
84
|
+
# describe "size" do
|
85
|
+
# it "should eq(0)", :focus do
|
86
|
+
# subject.size.should eq(0)
|
87
|
+
# end
|
88
|
+
# end
|
89
|
+
# end
|
90
|
+
#
|
91
|
+
# Note that this method does not modify `subject` in any way, so if you
|
92
|
+
# refer to `subject` in `let` or `before` blocks, you're still
|
93
|
+
# referring to the outer subject.
|
94
|
+
#
|
95
|
+
# @example
|
96
|
+
#
|
97
|
+
# describe Person do
|
98
|
+
# subject { Person.new }
|
99
|
+
# before { subject.age = 25 }
|
100
|
+
# its(:age) { should eq(25) }
|
101
|
+
# end
|
102
|
+
def its(attribute, *options, &block)
|
103
|
+
its_caller = caller.select {|file_line| file_line !~ %r(/lib/rspec/its) }
|
104
|
+
describe(attribute.to_s, :caller => its_caller) do
|
105
|
+
let(:__its_subject) do
|
106
|
+
if Array === attribute
|
107
|
+
if Hash === subject
|
108
|
+
attribute.inject(subject) {|inner, attr| inner[attr] }
|
109
|
+
else
|
110
|
+
subject[*attribute]
|
111
|
+
end
|
112
|
+
else
|
113
|
+
attribute_chain = attribute.to_s.split('.')
|
114
|
+
attribute_chain.inject(subject) do |inner_subject, attr|
|
115
|
+
inner_subject.send(attr)
|
116
|
+
end
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
120
|
+
def is_expected
|
121
|
+
expect(__its_subject)
|
122
|
+
end
|
123
|
+
alias_method :are_expected, :is_expected
|
124
|
+
|
125
|
+
def should(matcher=nil, message=nil)
|
126
|
+
RSpec::Expectations::PositiveExpectationHandler.handle_matcher(__its_subject, matcher, message)
|
127
|
+
end
|
128
|
+
|
129
|
+
def should_not(matcher=nil, message=nil)
|
130
|
+
RSpec::Expectations::NegativeExpectationHandler.handle_matcher(__its_subject, matcher, message)
|
131
|
+
end
|
132
|
+
|
133
|
+
options << {} unless options.last.kind_of?(Hash)
|
134
|
+
options.last.merge!(:caller => its_caller)
|
135
|
+
|
136
|
+
example(nil, *options, &block)
|
137
|
+
|
138
|
+
end
|
139
|
+
end
|
140
|
+
|
141
|
+
end
|
142
|
+
end
|
143
|
+
|
144
|
+
RSpec.configure do |rspec|
|
145
|
+
rspec.extend RSpec::Its
|
146
|
+
rspec.backtrace_exclusion_patterns << %r(/lib/rspec/its)
|
147
|
+
end
|
148
|
+
|
149
|
+
RSpec::SharedContext.send(:include, RSpec::Its)
|