vagrant-unbundled 2.0.0.1 → 2.0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -2
- data/CHANGELOG.md +34 -0
- data/Gemfile.lock +10 -10
- data/README.md +2 -2
- data/contrib/sudoers/linux-suse +6 -7
- data/lib/vagrant/plugin/v2/command.rb +3 -0
- data/lib/vagrant/plugin/v2/communicator.rb +1 -1
- data/lib/vagrant/registry.rb +1 -1
- data/lib/vagrant/util/downloader.rb +1 -2
- data/lib/vagrant/util/is_port_open.rb +2 -1
- data/lib/vagrant/util/keypair.rb +1 -1
- data/lib/vagrant/util/platform.rb +39 -23
- data/plugins/commands/destroy/command.rb +31 -10
- data/plugins/communicators/ssh/communicator.rb +1 -0
- data/plugins/communicators/winrm/helper.rb +6 -1
- data/plugins/guests/solaris11/cap/change_host_name.rb +0 -2
- data/plugins/guests/solaris11/cap/configure_networks.rb +1 -7
- data/plugins/guests/solaris11/plugin.rb +5 -35
- data/plugins/guests/windows/cap/public_key.rb +2 -0
- data/plugins/guests/windows/guest_network.rb +3 -3
- data/plugins/guests/windows/scripts/reboot_detect.ps1 +5 -0
- data/plugins/providers/docker/driver.rb +1 -1
- data/plugins/providers/docker/executor/local.rb +4 -0
- data/plugins/providers/docker/executor/vagrant.rb +4 -0
- data/plugins/providers/hyperv/scripts/import_vm_vmcx.ps1 +1 -1
- data/plugins/providers/virtualbox/driver/meta.rb +1 -0
- data/plugins/providers/virtualbox/driver/version_5_2.rb +16 -0
- data/plugins/providers/virtualbox/plugin.rb +1 -0
- data/plugins/providers/virtualbox/synced_folder.rb +1 -1
- data/plugins/provisioners/chef/provisioner/chef_client.rb +30 -23
- data/plugins/provisioners/chef/provisioner/chef_solo.rb +26 -19
- data/plugins/provisioners/chef/provisioner/chef_zero.rb +29 -22
- data/plugins/provisioners/puppet/provisioner/puppet.rb +23 -4
- data/plugins/provisioners/salt/bootstrap-salt.ps1 +15 -3
- data/plugins/provisioners/salt/bootstrap-salt.sh +2 -0
- data/plugins/provisioners/salt/config.rb +11 -0
- data/plugins/provisioners/salt/provisioner.rb +10 -7
- data/plugins/provisioners/shell/provisioner.rb +1 -1
- data/templates/locales/en.yml +5 -0
- data/test/unit/base.rb +2 -0
- data/test/unit/plugins/commands/destroy/command_test.rb +155 -0
- data/test/unit/plugins/communicators/winrm/helper_test.rb +33 -0
- data/test/unit/plugins/guests/solaris11/cap/change_host_name_test.rb +36 -0
- data/test/unit/plugins/guests/solaris11/cap/configure_networks_test.rb +56 -0
- data/test/unit/plugins/providers/virtualbox/synced_folder_test.rb +26 -0
- data/test/unit/plugins/provisioners/salt/config_test.rb +42 -0
- data/test/unit/plugins/provisioners/salt/provisioner_test.rb +16 -1
- data/test/unit/plugins/provisioners/shell/config_test.rb +3 -3
- data/test/unit/plugins/pushes/local-exec/config_test.rb +2 -2
- data/test/unit/vagrant/util/downloader_test.rb +28 -0
- data/test/unit/vagrant/util/platform_test.rb +58 -0
- data/vagrant.gemspec +1 -1
- data/vendor/bundle/ruby/2.4.0/bin/rwinrmcp +5 -0
- data/vendor/bundle/ruby/2.4.0/bin/vagrant +5 -0
- data/vendor/bundle/ruby/2.4.0/bin/vagrant-spec +5 -0
- data/vendor/bundle/ruby/2.4.0/bundler/gems/vagrant-spec-af86757912f7/vagrant-spec.gemspec +3 -3
- data/vendor/bundle/ruby/2.4.0/gems/addressable-2.5.2/CHANGELOG.md +216 -0
- data/vendor/bundle/ruby/2.4.0/gems/addressable-2.5.2/Gemfile +32 -0
- data/vendor/bundle/ruby/2.4.0/gems/addressable-2.5.2/LICENSE.txt +202 -0
- data/vendor/bundle/ruby/2.4.0/gems/addressable-2.5.2/README.md +121 -0
- data/vendor/bundle/ruby/2.4.0/gems/addressable-2.5.2/Rakefile +32 -0
- data/vendor/bundle/ruby/2.4.0/gems/addressable-2.5.2/data/unicode.data +0 -0
- data/vendor/bundle/ruby/2.4.0/gems/addressable-2.5.2/lib/addressable/idna/native.rb +59 -0
- data/vendor/bundle/ruby/2.4.0/gems/addressable-2.5.2/lib/addressable/idna/pure.rb +677 -0
- data/vendor/bundle/ruby/2.4.0/gems/addressable-2.5.2/lib/addressable/idna.rb +25 -0
- data/vendor/bundle/ruby/2.4.0/gems/addressable-2.5.2/lib/addressable/template.rb +1065 -0
- data/vendor/bundle/ruby/2.4.0/gems/addressable-2.5.2/lib/addressable/uri.rb +2492 -0
- data/vendor/bundle/ruby/2.4.0/gems/addressable-2.5.2/lib/addressable/version.rb +30 -0
- data/vendor/bundle/ruby/2.4.0/gems/addressable-2.5.2/lib/addressable.rb +2 -0
- data/vendor/bundle/ruby/2.4.0/gems/addressable-2.5.2/spec/addressable/idna_spec.rb +298 -0
- data/vendor/bundle/ruby/2.4.0/gems/addressable-2.5.2/spec/addressable/net_http_compat_spec.rb +28 -0
- data/vendor/bundle/ruby/2.4.0/gems/addressable-2.5.2/spec/addressable/rack_mount_compat_spec.rb +104 -0
- data/vendor/bundle/ruby/2.4.0/gems/addressable-2.5.2/spec/addressable/security_spec.rb +57 -0
- data/vendor/bundle/ruby/2.4.0/gems/addressable-2.5.2/spec/addressable/template_spec.rb +1419 -0
- data/vendor/bundle/ruby/2.4.0/gems/addressable-2.5.2/spec/addressable/uri_spec.rb +6468 -0
- data/vendor/bundle/ruby/2.4.0/gems/addressable-2.5.2/spec/spec_helper.rb +21 -0
- data/vendor/bundle/ruby/2.4.0/gems/addressable-2.5.2/tasks/clobber.rake +2 -0
- data/vendor/bundle/ruby/2.4.0/gems/addressable-2.5.2/tasks/gem.rake +91 -0
- data/vendor/bundle/ruby/2.4.0/gems/addressable-2.5.2/tasks/git.rake +45 -0
- data/vendor/bundle/ruby/2.4.0/gems/addressable-2.5.2/tasks/metrics.rake +22 -0
- data/vendor/bundle/ruby/2.4.0/gems/addressable-2.5.2/tasks/rspec.rake +21 -0
- data/vendor/bundle/ruby/2.4.0/gems/addressable-2.5.2/tasks/yard.rake +27 -0
- data/vendor/bundle/ruby/2.4.0/gems/hashdiff-0.3.7/.gitignore +15 -0
- data/vendor/bundle/ruby/2.4.0/gems/hashdiff-0.3.7/.rspec +1 -0
- data/vendor/bundle/ruby/2.4.0/gems/hashdiff-0.3.7/.travis.yml +13 -0
- data/vendor/bundle/ruby/2.4.0/gems/hashdiff-0.3.7/.yardopts +1 -0
- data/vendor/bundle/ruby/2.4.0/gems/hashdiff-0.3.7/Gemfile +6 -0
- data/vendor/bundle/ruby/2.4.0/gems/hashdiff-0.3.7/LICENSE +19 -0
- data/vendor/bundle/ruby/2.4.0/gems/hashdiff-0.3.7/README.md +265 -0
- data/vendor/bundle/ruby/2.4.0/gems/hashdiff-0.3.7/Rakefile +13 -0
- data/vendor/bundle/ruby/2.4.0/gems/hashdiff-0.3.7/changelog.md +72 -0
- data/vendor/bundle/ruby/2.4.0/gems/hashdiff-0.3.7/hashdiff.gemspec +25 -0
- data/vendor/bundle/ruby/2.4.0/gems/hashdiff-0.3.7/lib/hashdiff/diff.rb +232 -0
- data/vendor/bundle/ruby/2.4.0/gems/hashdiff-0.3.7/lib/hashdiff/lcs.rb +69 -0
- data/vendor/bundle/ruby/2.4.0/gems/hashdiff-0.3.7/lib/hashdiff/linear_compare_array.rb +155 -0
- data/vendor/bundle/ruby/2.4.0/gems/hashdiff-0.3.7/lib/hashdiff/patch.rb +88 -0
- data/vendor/bundle/ruby/2.4.0/gems/hashdiff-0.3.7/lib/hashdiff/util.rb +146 -0
- data/vendor/bundle/ruby/2.4.0/gems/hashdiff-0.3.7/lib/hashdiff/version.rb +3 -0
- data/vendor/bundle/ruby/2.4.0/gems/hashdiff-0.3.7/lib/hashdiff.rb +6 -0
- data/vendor/bundle/ruby/2.4.0/gems/hashdiff-0.3.7/spec/hashdiff/best_diff_spec.rb +74 -0
- data/vendor/bundle/ruby/2.4.0/gems/hashdiff-0.3.7/spec/hashdiff/diff_array_spec.rb +60 -0
- data/vendor/bundle/ruby/2.4.0/gems/hashdiff-0.3.7/spec/hashdiff/diff_spec.rb +339 -0
- data/vendor/bundle/ruby/2.4.0/gems/hashdiff-0.3.7/spec/hashdiff/lcs_spec.rb +75 -0
- data/vendor/bundle/ruby/2.4.0/gems/hashdiff-0.3.7/spec/hashdiff/linear_compare_array_spec.rb +48 -0
- data/vendor/bundle/ruby/2.4.0/gems/hashdiff-0.3.7/spec/hashdiff/patch_spec.rb +183 -0
- data/vendor/bundle/ruby/2.4.0/gems/hashdiff-0.3.7/spec/hashdiff/util_spec.rb +78 -0
- data/vendor/bundle/ruby/2.4.0/gems/hashdiff-0.3.7/spec/spec_helper.rb +13 -0
- data/vendor/bundle/ruby/2.4.0/gems/multi_json-1.12.2/CHANGELOG.md +250 -0
- data/vendor/bundle/ruby/2.4.0/gems/multi_json-1.12.2/CONTRIBUTING.md +46 -0
- data/vendor/bundle/ruby/2.4.0/gems/multi_json-1.12.2/LICENSE.md +20 -0
- data/vendor/bundle/ruby/2.4.0/gems/multi_json-1.12.2/README.md +122 -0
- data/vendor/bundle/ruby/2.4.0/gems/multi_json-1.12.2/lib/multi_json/adapter.rb +49 -0
- data/vendor/bundle/ruby/2.4.0/gems/multi_json-1.12.2/lib/multi_json/adapter_error.rb +15 -0
- data/vendor/bundle/ruby/2.4.0/gems/multi_json-1.12.2/lib/multi_json/adapters/gson.rb +20 -0
- data/vendor/bundle/ruby/2.4.0/gems/multi_json-1.12.2/lib/multi_json/adapters/jr_jackson.rb +25 -0
- data/vendor/bundle/ruby/2.4.0/gems/multi_json-1.12.2/lib/multi_json/adapters/json_common.rb +23 -0
- data/vendor/bundle/ruby/2.4.0/gems/multi_json-1.12.2/lib/multi_json/adapters/json_gem.rb +11 -0
- data/vendor/bundle/ruby/2.4.0/gems/multi_json-1.12.2/lib/multi_json/adapters/json_pure.rb +11 -0
- data/vendor/bundle/ruby/2.4.0/gems/multi_json-1.12.2/lib/multi_json/adapters/nsjsonserialization.rb +32 -0
- data/vendor/bundle/ruby/2.4.0/gems/multi_json-1.12.2/lib/multi_json/adapters/oj.rb +25 -0
- data/vendor/bundle/ruby/2.4.0/gems/multi_json-1.12.2/lib/multi_json/adapters/ok_json.rb +23 -0
- data/vendor/bundle/ruby/2.4.0/gems/multi_json-1.12.2/lib/multi_json/adapters/yajl.rb +19 -0
- data/vendor/bundle/ruby/2.4.0/gems/multi_json-1.12.2/lib/multi_json/convertible_hash_keys.rb +43 -0
- data/vendor/bundle/ruby/2.4.0/gems/multi_json-1.12.2/lib/multi_json/options.rb +39 -0
- data/vendor/bundle/ruby/2.4.0/gems/multi_json-1.12.2/lib/multi_json/options_cache.rb +29 -0
- data/vendor/bundle/ruby/2.4.0/gems/multi_json-1.12.2/lib/multi_json/parse_error.rb +17 -0
- data/vendor/bundle/ruby/2.4.0/gems/multi_json-1.12.2/lib/multi_json/vendor/okjson.rb +606 -0
- data/vendor/bundle/ruby/2.4.0/gems/multi_json-1.12.2/lib/multi_json/version.rb +17 -0
- data/vendor/bundle/ruby/2.4.0/gems/multi_json-1.12.2/lib/multi_json.rb +161 -0
- data/vendor/bundle/ruby/2.4.0/gems/public_suffix-3.0.1/.gitignore +11 -0
- data/vendor/bundle/ruby/2.4.0/gems/public_suffix-3.0.1/.rubocop.yml +32 -0
- data/vendor/bundle/ruby/2.4.0/gems/public_suffix-3.0.1/.rubocop_defaults.yml +177 -0
- data/vendor/bundle/ruby/2.4.0/gems/public_suffix-3.0.1/.travis.yml +24 -0
- data/vendor/bundle/ruby/2.4.0/gems/public_suffix-3.0.1/.yardopts +1 -0
- data/vendor/bundle/ruby/2.4.0/gems/public_suffix-3.0.1/2.0-Upgrade.md +52 -0
- data/vendor/bundle/ruby/2.4.0/gems/public_suffix-3.0.1/CHANGELOG.md +330 -0
- data/vendor/bundle/ruby/2.4.0/gems/public_suffix-3.0.1/Gemfile +10 -0
- data/vendor/bundle/ruby/2.4.0/gems/public_suffix-3.0.1/LICENSE.txt +22 -0
- data/vendor/bundle/ruby/2.4.0/gems/public_suffix-3.0.1/README.md +202 -0
- data/vendor/bundle/ruby/2.4.0/gems/public_suffix-3.0.1/Rakefile +49 -0
- data/vendor/bundle/ruby/2.4.0/gems/public_suffix-3.0.1/bin/console +14 -0
- data/vendor/bundle/ruby/2.4.0/gems/public_suffix-3.0.1/data/list.txt +12288 -0
- data/vendor/bundle/ruby/2.4.0/gems/public_suffix-3.0.1/lib/public_suffix/domain.rb +235 -0
- data/vendor/bundle/ruby/2.4.0/gems/public_suffix-3.0.1/lib/public_suffix/errors.rb +39 -0
- data/vendor/bundle/ruby/2.4.0/gems/public_suffix-3.0.1/lib/public_suffix/list.rb +243 -0
- data/vendor/bundle/ruby/2.4.0/gems/public_suffix-3.0.1/lib/public_suffix/rule.rb +348 -0
- data/vendor/bundle/ruby/2.4.0/gems/public_suffix-3.0.1/lib/public_suffix/version.rb +10 -0
- data/vendor/bundle/ruby/2.4.0/gems/public_suffix-3.0.1/lib/public_suffix.rb +175 -0
- data/vendor/bundle/ruby/2.4.0/gems/public_suffix-3.0.1/public_suffix.gemspec +25 -0
- data/vendor/bundle/ruby/2.4.0/gems/public_suffix-3.0.1/test/.empty +2 -0
- data/vendor/bundle/ruby/2.4.0/gems/public_suffix-3.0.1/test/acceptance_test.rb +127 -0
- data/vendor/bundle/ruby/2.4.0/gems/public_suffix-3.0.1/test/benchmarks/bm_find.rb +66 -0
- data/vendor/bundle/ruby/2.4.0/gems/public_suffix-3.0.1/test/benchmarks/bm_find_all.rb +102 -0
- data/vendor/bundle/ruby/2.4.0/gems/public_suffix-3.0.1/test/benchmarks/bm_names.rb +91 -0
- data/vendor/bundle/ruby/2.4.0/gems/public_suffix-3.0.1/test/benchmarks/bm_select.rb +26 -0
- data/vendor/bundle/ruby/2.4.0/gems/public_suffix-3.0.1/test/benchmarks/bm_select_incremental.rb +25 -0
- data/vendor/bundle/ruby/2.4.0/gems/public_suffix-3.0.1/test/benchmarks/bm_valid.rb +101 -0
- data/vendor/bundle/ruby/2.4.0/gems/public_suffix-3.0.1/test/profilers/domain_profiler.rb +12 -0
- data/vendor/bundle/ruby/2.4.0/gems/public_suffix-3.0.1/test/profilers/find_profiler.rb +12 -0
- data/vendor/bundle/ruby/2.4.0/gems/public_suffix-3.0.1/test/profilers/find_profiler_jp.rb +12 -0
- data/vendor/bundle/ruby/2.4.0/gems/public_suffix-3.0.1/test/profilers/initialization_profiler.rb +11 -0
- data/vendor/bundle/ruby/2.4.0/gems/public_suffix-3.0.1/test/profilers/list_profsize.rb +11 -0
- data/vendor/bundle/ruby/2.4.0/gems/public_suffix-3.0.1/test/profilers/object_binsize.rb +57 -0
- data/vendor/bundle/ruby/2.4.0/gems/public_suffix-3.0.1/test/psl_test.rb +49 -0
- data/vendor/bundle/ruby/2.4.0/gems/public_suffix-3.0.1/test/test_helper.rb +13 -0
- data/vendor/bundle/ruby/2.4.0/gems/public_suffix-3.0.1/test/tests.txt +98 -0
- data/vendor/bundle/ruby/2.4.0/gems/public_suffix-3.0.1/test/unit/domain_test.rb +104 -0
- data/vendor/bundle/ruby/2.4.0/gems/public_suffix-3.0.1/test/unit/errors_test.rb +23 -0
- data/vendor/bundle/ruby/2.4.0/gems/public_suffix-3.0.1/test/unit/list_test.rb +239 -0
- data/vendor/bundle/ruby/2.4.0/gems/public_suffix-3.0.1/test/unit/public_suffix_test.rb +186 -0
- data/vendor/bundle/ruby/2.4.0/gems/public_suffix-3.0.1/test/unit/rule_test.rb +220 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/.gemtest +0 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/.gitignore +34 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/.rspec-tm +2 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/.travis.yml +24 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/CHANGELOG.md +1460 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/Gemfile +9 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/LICENSE +20 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/README.md +1045 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/Rakefile +30 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/lib/webmock/api.rb +97 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/lib/webmock/assertion_failure.rb +11 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/lib/webmock/callback_registry.rb +35 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/lib/webmock/config.rb +18 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/lib/webmock/cucumber.rb +10 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/lib/webmock/deprecation.rb +9 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/lib/webmock/errors.rb +17 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/lib/webmock/http_lib_adapters/curb_adapter.rb +337 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/lib/webmock/http_lib_adapters/em_http_request_adapter.rb +228 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/lib/webmock/http_lib_adapters/excon_adapter.rb +162 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/lib/webmock/http_lib_adapters/http_lib_adapter.rb +7 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/lib/webmock/http_lib_adapters/http_lib_adapter_registry.rb +19 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/lib/webmock/http_lib_adapters/http_rb/client.rb +14 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/lib/webmock/http_lib_adapters/http_rb/request.rb +10 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/lib/webmock/http_lib_adapters/http_rb/response.rb +43 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/lib/webmock/http_lib_adapters/http_rb/streamer.rb +25 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/lib/webmock/http_lib_adapters/http_rb/webmock.rb +68 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/lib/webmock/http_lib_adapters/http_rb_adapter.rb +37 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/lib/webmock/http_lib_adapters/httpclient_adapter.rb +240 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/lib/webmock/http_lib_adapters/manticore_adapter.rb +127 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/lib/webmock/http_lib_adapters/net_http.rb +362 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/lib/webmock/http_lib_adapters/net_http_response.rb +34 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/lib/webmock/http_lib_adapters/patron_adapter.rb +130 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/lib/webmock/http_lib_adapters/typhoeus_hydra_adapter.rb +174 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/lib/webmock/matchers/hash_including_matcher.rb +36 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/lib/webmock/minitest.rb +41 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/lib/webmock/rack_response.rb +69 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/lib/webmock/request_body_diff.rb +64 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/lib/webmock/request_execution_verifier.rb +78 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/lib/webmock/request_pattern.rb +343 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/lib/webmock/request_registry.rb +35 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/lib/webmock/request_signature.rb +54 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/lib/webmock/request_signature_snippet.rb +61 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/lib/webmock/request_stub.rb +100 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/lib/webmock/response.rb +153 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/lib/webmock/responses_sequence.rb +40 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/lib/webmock/rspec/matchers/request_pattern_matcher.rb +78 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/lib/webmock/rspec/matchers/webmock_matcher.rb +52 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/lib/webmock/rspec/matchers.rb +27 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/lib/webmock/rspec.rb +35 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/lib/webmock/stub_registry.rb +67 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/lib/webmock/stub_request_snippet.rb +34 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/lib/webmock/test_unit.rb +22 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/lib/webmock/util/hash_counter.rb +32 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/lib/webmock/util/hash_keys_stringifier.rb +25 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/lib/webmock/util/hash_validator.rb +17 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/lib/webmock/util/headers.rb +49 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/lib/webmock/util/json.rb +78 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/lib/webmock/util/query_mapper.rb +279 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/lib/webmock/util/uri.rb +111 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/lib/webmock/util/version_checker.rb +111 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/lib/webmock/version.rb +3 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/lib/webmock/webmock.rb +156 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/lib/webmock.rb +54 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/minitest/test_helper.rb +34 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/minitest/test_webmock.rb +9 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/minitest/webmock_spec.rb +60 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/spec/acceptance/curb/curb_spec.rb +466 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/spec/acceptance/curb/curb_spec_helper.rb +147 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/spec/acceptance/em_http_request/em_http_request_spec.rb +406 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/spec/acceptance/em_http_request/em_http_request_spec_helper.rb +77 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/spec/acceptance/excon/excon_spec.rb +75 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/spec/acceptance/excon/excon_spec_helper.rb +50 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/spec/acceptance/http_rb/http_rb_spec.rb +73 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/spec/acceptance/http_rb/http_rb_spec_helper.rb +51 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/spec/acceptance/httpclient/httpclient_spec.rb +209 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/spec/acceptance/httpclient/httpclient_spec_helper.rb +57 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/spec/acceptance/manticore/manticore_spec.rb +56 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/spec/acceptance/manticore/manticore_spec_helper.rb +35 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/spec/acceptance/net_http/net_http_shared.rb +142 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/spec/acceptance/net_http/net_http_spec.rb +317 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/spec/acceptance/net_http/net_http_spec_helper.rb +64 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/spec/acceptance/net_http/real_net_http_spec.rb +20 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/spec/acceptance/patron/patron_spec.rb +118 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/spec/acceptance/patron/patron_spec_helper.rb +54 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/spec/acceptance/shared/allowing_and_disabling_net_connect.rb +313 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/spec/acceptance/shared/callbacks.rb +147 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/spec/acceptance/shared/complex_cross_concern_behaviors.rb +36 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/spec/acceptance/shared/enabling_and_disabling_webmock.rb +95 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/spec/acceptance/shared/precedence_of_stubs.rb +15 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/spec/acceptance/shared/request_expectations.rb +916 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/spec/acceptance/shared/returning_declared_responses.rb +388 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/spec/acceptance/shared/stubbing_requests.rb +583 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/spec/acceptance/typhoeus/typhoeus_hydra_spec.rb +135 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/spec/acceptance/typhoeus/typhoeus_hydra_spec_helper.rb +60 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/spec/acceptance/webmock_shared.rb +41 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/spec/fixtures/test.txt +1 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/spec/quality_spec.rb +84 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/spec/spec_helper.rb +48 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/spec/support/example_curl_output.txt +22 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/spec/support/failures.rb +9 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/spec/support/my_rack_app.rb +53 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/spec/support/network_connection.rb +19 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/spec/support/webmock_server.rb +69 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/spec/unit/api_spec.rb +75 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/spec/unit/errors_spec.rb +129 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/spec/unit/http_lib_adapters/http_lib_adapter_registry_spec.rb +17 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/spec/unit/http_lib_adapters/http_lib_adapter_spec.rb +12 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/spec/unit/matchers/hash_including_matcher_spec.rb +87 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/spec/unit/rack_response_spec.rb +112 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/spec/unit/request_body_diff_spec.rb +90 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/spec/unit/request_execution_verifier_spec.rb +208 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/spec/unit/request_pattern_spec.rb +590 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/spec/unit/request_registry_spec.rb +76 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/spec/unit/request_signature_snippet_spec.rb +89 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/spec/unit/request_signature_spec.rb +155 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/spec/unit/request_stub_spec.rb +199 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/spec/unit/response_spec.rb +282 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/spec/unit/stub_registry_spec.rb +103 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/spec/unit/stub_request_snippet_spec.rb +95 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/spec/unit/util/hash_counter_spec.rb +39 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/spec/unit/util/hash_keys_stringifier_spec.rb +27 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/spec/unit/util/headers_spec.rb +28 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/spec/unit/util/json_spec.rb +33 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/spec/unit/util/query_mapper_spec.rb +138 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/spec/unit/util/uri_spec.rb +299 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/spec/unit/util/version_checker_spec.rb +65 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/spec/unit/webmock_spec.rb +11 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/test/http_request.rb +24 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/test/shared_test.rb +95 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/test/test_helper.rb +23 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/test/test_webmock.rb +6 -0
- data/vendor/bundle/ruby/2.4.0/gems/webmock-2.3.2/webmock.gemspec +46 -0
- data/vendor/bundle/ruby/2.4.0/gems/winrm-fs-1.1.1/.gitignore +11 -0
- data/vendor/bundle/ruby/2.4.0/gems/winrm-fs-1.1.1/.rspec +3 -0
- data/vendor/bundle/ruby/2.4.0/gems/winrm-fs-1.1.1/.rubocop.yml +9 -0
- data/vendor/bundle/ruby/2.4.0/gems/winrm-fs-1.1.1/.travis.yml +9 -0
- data/vendor/bundle/ruby/2.4.0/gems/winrm-fs-1.1.1/Gemfile +5 -0
- data/vendor/bundle/ruby/2.4.0/gems/winrm-fs-1.1.1/LICENSE +202 -0
- data/vendor/bundle/ruby/2.4.0/gems/winrm-fs-1.1.1/README.md +79 -0
- data/vendor/bundle/ruby/2.4.0/gems/winrm-fs-1.1.1/Rakefile +28 -0
- data/vendor/bundle/ruby/2.4.0/gems/winrm-fs-1.1.1/VERSION +1 -0
- data/vendor/bundle/ruby/2.4.0/gems/winrm-fs-1.1.1/Vagrantfile +9 -0
- data/vendor/bundle/ruby/2.4.0/gems/winrm-fs-1.1.1/appveyor.yml +38 -0
- data/vendor/bundle/ruby/2.4.0/gems/winrm-fs-1.1.1/bin/rwinrmcp +86 -0
- data/vendor/bundle/ruby/2.4.0/gems/winrm-fs-1.1.1/changelog.md +60 -0
- data/vendor/bundle/ruby/2.4.0/gems/winrm-fs-1.1.1/lib/winrm-fs/core/file_transporter.rb +527 -0
- data/vendor/bundle/ruby/2.4.0/gems/winrm-fs-1.1.1/lib/winrm-fs/core/tmp_zip.rb +177 -0
- data/vendor/bundle/ruby/2.4.0/gems/winrm-fs-1.1.1/lib/winrm-fs/exceptions.rb +28 -0
- data/vendor/bundle/ruby/2.4.0/gems/winrm-fs-1.1.1/lib/winrm-fs/file_manager.rb +118 -0
- data/vendor/bundle/ruby/2.4.0/gems/winrm-fs-1.1.1/lib/winrm-fs/scripts/check_files.ps1.erb +49 -0
- data/vendor/bundle/ruby/2.4.0/gems/winrm-fs-1.1.1/lib/winrm-fs/scripts/checksum.ps1.erb +13 -0
- data/vendor/bundle/ruby/2.4.0/gems/winrm-fs-1.1.1/lib/winrm-fs/scripts/create_dir.ps1.erb +6 -0
- data/vendor/bundle/ruby/2.4.0/gems/winrm-fs-1.1.1/lib/winrm-fs/scripts/delete.ps1.erb +6 -0
- data/vendor/bundle/ruby/2.4.0/gems/winrm-fs-1.1.1/lib/winrm-fs/scripts/download.ps1.erb +8 -0
- data/vendor/bundle/ruby/2.4.0/gems/winrm-fs-1.1.1/lib/winrm-fs/scripts/exists.ps1.erb +10 -0
- data/vendor/bundle/ruby/2.4.0/gems/winrm-fs-1.1.1/lib/winrm-fs/scripts/extract_files.ps1.erb +52 -0
- data/vendor/bundle/ruby/2.4.0/gems/winrm-fs-1.1.1/lib/winrm-fs/scripts/scripts.rb +31 -0
- data/vendor/bundle/ruby/2.4.0/gems/winrm-fs-1.1.1/lib/winrm-fs.rb +28 -0
- data/vendor/bundle/ruby/2.4.0/gems/winrm-fs-1.1.1/spec/config-example.yml +3 -0
- data/vendor/bundle/ruby/2.4.0/gems/winrm-fs-1.1.1/spec/integration/file_manager_spec.rb +224 -0
- data/vendor/bundle/ruby/2.4.0/gems/winrm-fs-1.1.1/spec/integration/tmp_zip_spec.rb +26 -0
- data/vendor/bundle/ruby/2.4.0/gems/winrm-fs-1.1.1/spec/matchers.rb +58 -0
- data/vendor/bundle/ruby/2.4.0/gems/winrm-fs-1.1.1/spec/spec_helper.rb +71 -0
- data/vendor/bundle/ruby/2.4.0/gems/winrm-fs-1.1.1/spec/unit/tmp_zip_spec.rb +79 -0
- data/vendor/bundle/ruby/2.4.0/gems/winrm-fs-1.1.1/winrm-fs.gemspec +37 -0
- data/vendor/bundle/ruby/2.4.0/specifications/addressable-2.5.2.gemspec +39 -0
- data/vendor/bundle/ruby/2.4.0/specifications/hashdiff-0.3.7.gemspec +39 -0
- data/vendor/bundle/ruby/2.4.0/specifications/multi_json-1.12.2.gemspec +33 -0
- data/vendor/bundle/ruby/2.4.0/specifications/public_suffix-3.0.1.gemspec +41 -0
- data/vendor/bundle/ruby/2.4.0/specifications/webmock-2.3.2.gemspec +79 -0
- data/vendor/bundle/ruby/2.4.0/specifications/winrm-fs-1.1.1.gemspec +57 -0
- data/version.txt +1 -1
- metadata +295 -11
- data/plugins/guests/solaris11/cap/halt.rb +0 -26
- data/plugins/guests/solaris11/cap/insert_public_key.rb +0 -21
- data/plugins/guests/solaris11/cap/mount_virtualbox_shared_folder.rb +0 -45
- data/plugins/guests/solaris11/cap/remove_public_key.rb +0 -21
- data/plugins/guests/solaris11/cap/rsync.rb +0 -29
- data/test/unit/plugins/guests/solaris11/cap/halt_test.rb +0 -44
@@ -0,0 +1,39 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe WebMock::Util::HashCounter do
|
4
|
+
|
5
|
+
it "should return 0 for non existing key" do
|
6
|
+
expect(WebMock::Util::HashCounter.new.get(:abc)).to eq(0)
|
7
|
+
end
|
8
|
+
|
9
|
+
it "should increase the returned value on every put with the same key" do
|
10
|
+
counter = WebMock::Util::HashCounter.new
|
11
|
+
counter.put(:abc)
|
12
|
+
expect(counter.get(:abc)).to eq(1)
|
13
|
+
counter.put(:abc)
|
14
|
+
expect(counter.get(:abc)).to eq(2)
|
15
|
+
end
|
16
|
+
|
17
|
+
it "should only increase value for given key provided to put" do
|
18
|
+
counter = WebMock::Util::HashCounter.new
|
19
|
+
counter.put(:abc)
|
20
|
+
expect(counter.get(:abc)).to eq(1)
|
21
|
+
expect(counter.get(:def)).to eq(0)
|
22
|
+
end
|
23
|
+
|
24
|
+
describe "each" do
|
25
|
+
it "should provide elements in order of the last modified" do
|
26
|
+
counter = WebMock::Util::HashCounter.new
|
27
|
+
counter.put(:a)
|
28
|
+
counter.put(:b)
|
29
|
+
counter.put(:c)
|
30
|
+
counter.put(:b)
|
31
|
+
counter.put(:a)
|
32
|
+
counter.put(:d)
|
33
|
+
|
34
|
+
elements = []
|
35
|
+
counter.each {|k,v| elements << [k,v]}
|
36
|
+
expect(elements).to eq([[:c, 1], [:b, 2], [:a, 2], [:d, 1]])
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe WebMock::Util::HashKeysStringifier do
|
4
|
+
|
5
|
+
it "should recursively stringify all symbol keys" do
|
6
|
+
hash = {
|
7
|
+
a: {
|
8
|
+
b: [
|
9
|
+
{
|
10
|
+
c: [{d: "1"}]
|
11
|
+
}
|
12
|
+
]
|
13
|
+
}
|
14
|
+
}
|
15
|
+
stringified = {
|
16
|
+
'a' => {
|
17
|
+
'b' => [
|
18
|
+
{
|
19
|
+
'c' => [{'d' => "1"}]
|
20
|
+
}
|
21
|
+
]
|
22
|
+
}
|
23
|
+
}
|
24
|
+
expect(WebMock::Util::HashKeysStringifier.stringify_keys!(hash, deep: true)).to eq(stringified)
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe WebMock::Util::Headers do
|
4
|
+
|
5
|
+
it "should decode_userinfo_from_header handles basic auth" do
|
6
|
+
authorization_header = "Basic dXNlcm5hbWU6c2VjcmV0"
|
7
|
+
userinfo = WebMock::Util::Headers.decode_userinfo_from_header(authorization_header)
|
8
|
+
expect(userinfo).to eq("username:secret")
|
9
|
+
end
|
10
|
+
|
11
|
+
describe "sorted_headers_string" do
|
12
|
+
|
13
|
+
it "should return nice string for hash with string values" do
|
14
|
+
expect(WebMock::Util::Headers.sorted_headers_string({"a" => "b"})).to eq("{'A'=>'b'}")
|
15
|
+
end
|
16
|
+
|
17
|
+
it "should return nice string for hash with array values" do
|
18
|
+
expect(WebMock::Util::Headers.sorted_headers_string({"a" => ["b", "c"]})).to eq("{'A'=>['b', 'c']}")
|
19
|
+
end
|
20
|
+
|
21
|
+
it "should return nice string for hash with array values and string values" do
|
22
|
+
expect(WebMock::Util::Headers.sorted_headers_string({"a" => ["b", "c"], "d" => "e"})).to eq("{'A'=>['b', 'c'], 'D'=>'e'}")
|
23
|
+
end
|
24
|
+
|
25
|
+
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
require 'spec_helper'
|
3
|
+
|
4
|
+
describe WebMock::Util::JSON do
|
5
|
+
describe ".parse" do
|
6
|
+
it "should parse json without parsing dates" do
|
7
|
+
expect(WebMock::Util::JSON.parse("\"a\":\"2011-01-01\"")).to eq(
|
8
|
+
{"a" => "2011-01-01"}
|
9
|
+
)
|
10
|
+
end
|
11
|
+
|
12
|
+
it "can parse json with multibyte characters" do
|
13
|
+
expect(WebMock::Util::JSON.parse(
|
14
|
+
"{\"name\":\"山田太郎\"\,\"job\":\"会社員\"}"
|
15
|
+
)).to eq({"name" => "山田太郎", "job" => "会社員"})
|
16
|
+
end
|
17
|
+
|
18
|
+
it "rescues ArgumentError's from YAML.load" do
|
19
|
+
allow(YAML).to receive(:load).and_raise(ArgumentError)
|
20
|
+
expect {
|
21
|
+
WebMock::Util::JSON.parse("Bad JSON")
|
22
|
+
}.to raise_error WebMock::Util::JSON::ParseError
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
describe ".convert_json_to_yaml" do
|
27
|
+
it "parses multibyte characters" do
|
28
|
+
expect(WebMock::Util::JSON.convert_json_to_yaml(
|
29
|
+
"{\"name\":\"山田太郎\"\,\"job\":\"会社員\"}"
|
30
|
+
)).to eq "{\"name\": \"山田太郎\", \"job\": \"会社員\"}"
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,138 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe WebMock::Util::QueryMapper do
|
4
|
+
subject { described_class }
|
5
|
+
|
6
|
+
context '#query_to_values' do
|
7
|
+
it 'should raise on invalid notation' do
|
8
|
+
query = 'a=&b=c'
|
9
|
+
expect { subject.query_to_values(query, {notation: 'foo'}) }.to raise_error(
|
10
|
+
ArgumentError,
|
11
|
+
'Invalid notation. Must be one of: [:flat, :dot, :subscript, :flat_array].'
|
12
|
+
)
|
13
|
+
end
|
14
|
+
|
15
|
+
it 'should parse hash queries' do
|
16
|
+
# {"one" => {"two" => {"three" => ["four", "five"]}}}
|
17
|
+
query = 'one%5Btwo%5D%5Bthree%5D%5B%5D=four&one%5Btwo%5D%5Bthree%5D%5B%5D=five'
|
18
|
+
hsh = subject.query_to_values(query)
|
19
|
+
expect(hsh['one']['two']['three']).to eq(%w(four five))
|
20
|
+
end
|
21
|
+
|
22
|
+
it 'should parse one nil value queries' do
|
23
|
+
# {'a' => nil, 'b' => 'c'}
|
24
|
+
query = 'a=&b=c'
|
25
|
+
hsh = subject.query_to_values(query)
|
26
|
+
expect(hsh['a']).to be_empty
|
27
|
+
expect(hsh['b']).to eq('c')
|
28
|
+
end
|
29
|
+
|
30
|
+
it 'should parse array queries' do
|
31
|
+
# {"one" => ["foo", "bar"]}
|
32
|
+
query = 'one%5B%5D=foo&one%5B%5D=bar'
|
33
|
+
hsh = subject.query_to_values(query)
|
34
|
+
expect(hsh['one']).to eq(%w(foo bar))
|
35
|
+
end
|
36
|
+
|
37
|
+
it 'should parse string queries' do
|
38
|
+
# {"one" => "two", "three" => "four"}
|
39
|
+
query = 'one=two&three=four'
|
40
|
+
hsh = subject.query_to_values(query)
|
41
|
+
expect(hsh).to eq({'one' => 'two', 'three' => 'four'})
|
42
|
+
end
|
43
|
+
|
44
|
+
it 'should parse nested queries' do
|
45
|
+
# [{"b"=>[{"c"=>[{"d"=>["1", {"e"=>"2"}]}]}]}]
|
46
|
+
query = 'a%5B%5D%5Bb%5D%5B%5D%5Bc%5D%5B%5D%5Bd%5D%5B%5D=1&a%5B%5D%5Bb%5D%5B%5D%5Bc%5D%5B%5D%5Bd%5D%5B%5D%5Be%5D=2'
|
47
|
+
hsh = subject.query_to_values(query)
|
48
|
+
expect(hsh['a'][0]['b'][0]['c'][0]['d'][0]).to eq('1')
|
49
|
+
expect(hsh['a'][0]['b'][0]['c'][0]['d'][1]['e']).to eq('2')
|
50
|
+
end
|
51
|
+
|
52
|
+
it "should parse nested repeated correctly" do
|
53
|
+
query = "a[][b][]=one&a[][b][]=two"
|
54
|
+
hsh = subject.query_to_values(query)
|
55
|
+
expect(hsh['a']).to be_a(Array)
|
56
|
+
expect(hsh['a'][0]).to eq({"b" => ['one']})
|
57
|
+
expect(hsh['a'][1]).to eq({"b" => ['two']})
|
58
|
+
end
|
59
|
+
|
60
|
+
it "should parse nested non-repeated correctly" do
|
61
|
+
query = "a[][b][]=one&a[][c][]=two"
|
62
|
+
hsh = subject.query_to_values(query)
|
63
|
+
expect(hsh['a']).to be_a(Array)
|
64
|
+
expect(hsh['a'][0]['b']).to eq(['one'])
|
65
|
+
expect(hsh['a'][0]['c']).to eq(['two'])
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
context '#to_query' do
|
70
|
+
it 'should transform nil value' do
|
71
|
+
expect(subject.to_query('a', nil)).to eq('a')
|
72
|
+
end
|
73
|
+
it 'should transform string value' do
|
74
|
+
expect(subject.to_query('a', 'b')).to eq('a=b')
|
75
|
+
end
|
76
|
+
it 'should transform hash value' do
|
77
|
+
expect(subject.to_query('a', {'key' => 'value'})).to eq('a[key]=value')
|
78
|
+
end
|
79
|
+
it 'should transform hash value with keys that are symbols' do
|
80
|
+
expect(subject.to_query('a', {key: 'value'})).to eq('a[key]=value')
|
81
|
+
end
|
82
|
+
it 'should transform array value' do
|
83
|
+
expect(subject.to_query('a', ['b', 'c'])).to eq('a[0]=b&a[1]=c')
|
84
|
+
end
|
85
|
+
it 'should transform boolean values' do
|
86
|
+
expect(subject.to_query('a', true)).to eq('a=true')
|
87
|
+
expect(subject.to_query('a', false)).to eq('a=false')
|
88
|
+
end
|
89
|
+
end
|
90
|
+
|
91
|
+
context '#values_to_query' do
|
92
|
+
it 'converts values to a query string' do
|
93
|
+
query = "key=value&other_key=other_value"
|
94
|
+
values = [['key','value'],['other_key','other_value']]
|
95
|
+
expect(subject.values_to_query values).to eq query
|
96
|
+
end
|
97
|
+
|
98
|
+
it 'converts values with missing keys to a query string' do
|
99
|
+
query = "=value"
|
100
|
+
values = { '' => 'value' }
|
101
|
+
expect(subject.values_to_query values).to eq query
|
102
|
+
end
|
103
|
+
|
104
|
+
it 'converts values with nil keys to a query string' do
|
105
|
+
query = "=value"
|
106
|
+
values = { nil => 'value' }
|
107
|
+
expect(subject.values_to_query values).to eq query
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
111
|
+
it 'converts array values, vice versa' do
|
112
|
+
query = "one%5B%5D=1&one%5B%5D=2" # one[]=1&one[]=2
|
113
|
+
values = {"one" => ["1","2"]}
|
114
|
+
expect(subject.values_to_query values).to eq query
|
115
|
+
expect(subject.query_to_values query).to eq values
|
116
|
+
end
|
117
|
+
|
118
|
+
it 'converts hash values, vice versa' do
|
119
|
+
query = "one%5Ba%5D=1&one%5Bb%5D=2" # one[a]=1&one[b]=2
|
120
|
+
values = {"one" => {"a" => "1", "b" => "2"}}
|
121
|
+
expect(subject.values_to_query values).to eq query
|
122
|
+
expect(subject.query_to_values query).to eq values
|
123
|
+
end
|
124
|
+
|
125
|
+
it 'converts complex nested hashes, vice versa' do
|
126
|
+
query = "one%5B%5D[foo]=bar&one%5B%5D[zoo]=car" # one[][foo]=bar&one[][zoo]=car
|
127
|
+
values = {"one" => [{"foo" => "bar", "zoo" => "car"}]}
|
128
|
+
expect(subject.values_to_query values).to eq query
|
129
|
+
expect(subject.query_to_values query).to eq values
|
130
|
+
end
|
131
|
+
|
132
|
+
it 'converts complex nested array of hashes, vice versa' do
|
133
|
+
query = "one%5B%5D[foo]=bar&one%5B%5D[foo]=bar&one%5B%5D[zoo]=car" # one[][foo]=bar&one[][foo]=bar&one[][zoo]=car
|
134
|
+
values = {"one" => [{"foo" => "bar"}, {"foo" => "bar", "zoo" => "car"}]}
|
135
|
+
expect(subject.values_to_query values).to eq query
|
136
|
+
expect(subject.query_to_values query).to eq values
|
137
|
+
end
|
138
|
+
end
|
@@ -0,0 +1,299 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
|
4
|
+
URIS_WITHOUT_PATH_OR_PARAMS =
|
5
|
+
[
|
6
|
+
"www.example.com",
|
7
|
+
"www.example.com/",
|
8
|
+
"www.example.com:80",
|
9
|
+
"www.example.com:80/",
|
10
|
+
"http://www.example.com",
|
11
|
+
"http://www.example.com/",
|
12
|
+
"http://www.example.com:80",
|
13
|
+
"http://www.example.com:80/"
|
14
|
+
].sort
|
15
|
+
|
16
|
+
URIS_WITHOUT_PATH_BUT_WITH_PARAMS =
|
17
|
+
[
|
18
|
+
"www.example.com?a=b",
|
19
|
+
"www.example.com/?a=b",
|
20
|
+
"www.example.com:80?a=b",
|
21
|
+
"www.example.com:80/?a=b",
|
22
|
+
"http://www.example.com?a=b",
|
23
|
+
"http://www.example.com/?a=b",
|
24
|
+
"http://www.example.com:80?a=b",
|
25
|
+
"http://www.example.com:80/?a=b"
|
26
|
+
].sort
|
27
|
+
|
28
|
+
URIS_WITH_AUTH =
|
29
|
+
[
|
30
|
+
"a b:pass@www.example.com",
|
31
|
+
"a b:pass@www.example.com/",
|
32
|
+
"a b:pass@www.example.com:80",
|
33
|
+
"a b:pass@www.example.com:80/",
|
34
|
+
"http://a b:pass@www.example.com",
|
35
|
+
"http://a b:pass@www.example.com/",
|
36
|
+
"http://a b:pass@www.example.com:80",
|
37
|
+
"http://a b:pass@www.example.com:80/",
|
38
|
+
"a%20b:pass@www.example.com",
|
39
|
+
"a%20b:pass@www.example.com/",
|
40
|
+
"a%20b:pass@www.example.com:80",
|
41
|
+
"a%20b:pass@www.example.com:80/",
|
42
|
+
"http://a%20b:pass@www.example.com",
|
43
|
+
"http://a%20b:pass@www.example.com/",
|
44
|
+
"http://a%20b:pass@www.example.com:80",
|
45
|
+
"http://a%20b:pass@www.example.com:80/"
|
46
|
+
].sort
|
47
|
+
|
48
|
+
URIS_WITH_PATH_AND_PARAMS =
|
49
|
+
[
|
50
|
+
"www.example.com/my path/?a=my param&b=c d",
|
51
|
+
"www.example.com/my%20path/?a=my%20param&b=c%20d",
|
52
|
+
"www.example.com:80/my path/?a=my param&b=c d",
|
53
|
+
"www.example.com:80/my%20path/?a=my%20param&b=c%20d",
|
54
|
+
"http://www.example.com/my path/?a=my param&b=c d",
|
55
|
+
"http://www.example.com/my%20path/?a=my%20param&b=c%20d",
|
56
|
+
"http://www.example.com:80/my path/?a=my param&b=c d",
|
57
|
+
"http://www.example.com:80/my%20path/?a=my%20param&b=c%20d",
|
58
|
+
].sort
|
59
|
+
|
60
|
+
URIS_WITH_DIFFERENT_PORT =
|
61
|
+
[
|
62
|
+
"www.example.com:88",
|
63
|
+
"www.example.com:88/",
|
64
|
+
"http://www.example.com:88",
|
65
|
+
"http://www.example.com:88/"
|
66
|
+
].sort
|
67
|
+
|
68
|
+
|
69
|
+
URIS_FOR_HTTPS =
|
70
|
+
[
|
71
|
+
"https://www.example.com",
|
72
|
+
"https://www.example.com/",
|
73
|
+
"https://www.example.com:443",
|
74
|
+
"https://www.example.com:443/"
|
75
|
+
].sort
|
76
|
+
|
77
|
+
|
78
|
+
describe WebMock::Util::URI do
|
79
|
+
|
80
|
+
describe "reporting variations of uri" do
|
81
|
+
|
82
|
+
it "should find all variations of the same uri for all variations of uri with params and path" do
|
83
|
+
URIS_WITH_PATH_AND_PARAMS.each do |uri|
|
84
|
+
expect(WebMock::Util::URI.variations_of_uri_as_strings(uri).sort).to eq(URIS_WITH_PATH_AND_PARAMS)
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
it "should find all variations of the same uri for all variations of uri with params but without path" do
|
89
|
+
URIS_WITHOUT_PATH_BUT_WITH_PARAMS.each do |uri|
|
90
|
+
expect(WebMock::Util::URI.variations_of_uri_as_strings(uri).sort).to eq(URIS_WITHOUT_PATH_BUT_WITH_PARAMS)
|
91
|
+
end
|
92
|
+
end
|
93
|
+
|
94
|
+
it "should find all variations of the same uri for all variations of uri without params or path" do
|
95
|
+
URIS_WITHOUT_PATH_OR_PARAMS.each do |uri|
|
96
|
+
expect(WebMock::Util::URI.variations_of_uri_as_strings(uri).sort).to eq(URIS_WITHOUT_PATH_OR_PARAMS)
|
97
|
+
end
|
98
|
+
end
|
99
|
+
|
100
|
+
it "should find all variations of the same uri for all variations of uri with auth" do
|
101
|
+
URIS_WITH_AUTH.each do |uri|
|
102
|
+
expect(WebMock::Util::URI.variations_of_uri_as_strings(uri).sort).to eq(URIS_WITH_AUTH)
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
106
|
+
it "should find all variations of the same uri for all variations of uri with different port" do
|
107
|
+
URIS_WITH_DIFFERENT_PORT.each do |uri|
|
108
|
+
expect(WebMock::Util::URI.variations_of_uri_as_strings(uri).sort).to eq(URIS_WITH_DIFFERENT_PORT)
|
109
|
+
end
|
110
|
+
end
|
111
|
+
|
112
|
+
it "should find all variations of the same uri for all variations of https uris" do
|
113
|
+
URIS_FOR_HTTPS.each do |uri|
|
114
|
+
expect(WebMock::Util::URI.variations_of_uri_as_strings(uri).sort).to eq(URIS_FOR_HTTPS)
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
118
|
+
end
|
119
|
+
|
120
|
+
describe "normalized uri equality" do
|
121
|
+
|
122
|
+
it "should successfully compare all variations of the same uri with path and params" do
|
123
|
+
URIS_WITH_PATH_AND_PARAMS.each do |uri_a|
|
124
|
+
URIS_WITH_PATH_AND_PARAMS.each do |uri_b|
|
125
|
+
expect(WebMock::Util::URI.normalize_uri(uri_a)).to be === WebMock::Util::URI.normalize_uri(uri_b)
|
126
|
+
end
|
127
|
+
end
|
128
|
+
end
|
129
|
+
|
130
|
+
it "should successfully compare all variations of the same uri with path but with params" do
|
131
|
+
URIS_WITHOUT_PATH_BUT_WITH_PARAMS.each do |uri_a|
|
132
|
+
URIS_WITHOUT_PATH_BUT_WITH_PARAMS.each do |uri_b|
|
133
|
+
expect(WebMock::Util::URI.normalize_uri(uri_a)).to be === WebMock::Util::URI.normalize_uri(uri_b)
|
134
|
+
end
|
135
|
+
end
|
136
|
+
end
|
137
|
+
|
138
|
+
it "should successfully compare all variations of the same uri without path or params" do
|
139
|
+
URIS_WITHOUT_PATH_OR_PARAMS.each do |uri_a|
|
140
|
+
URIS_WITHOUT_PATH_OR_PARAMS.each do |uri_b|
|
141
|
+
expect(WebMock::Util::URI.normalize_uri(uri_a)).to be === WebMock::Util::URI.normalize_uri(uri_b)
|
142
|
+
end
|
143
|
+
end
|
144
|
+
end
|
145
|
+
|
146
|
+
it "should successfully compare all variations of the same uri with authority" do
|
147
|
+
URIS_WITH_AUTH.each do |uri_a|
|
148
|
+
URIS_WITH_AUTH.each do |uri_b|
|
149
|
+
expect(WebMock::Util::URI.normalize_uri(uri_a)).to be === WebMock::Util::URI.normalize_uri(uri_b)
|
150
|
+
end
|
151
|
+
end
|
152
|
+
end
|
153
|
+
|
154
|
+
it "should successfully compare all variations of the same uri custom port" do
|
155
|
+
URIS_WITH_DIFFERENT_PORT.each do |uri_a|
|
156
|
+
URIS_WITH_DIFFERENT_PORT.each do |uri_b|
|
157
|
+
expect(WebMock::Util::URI.normalize_uri(uri_a)).to be === WebMock::Util::URI.normalize_uri(uri_b)
|
158
|
+
end
|
159
|
+
end
|
160
|
+
end
|
161
|
+
|
162
|
+
it "should successfully compare all variations of the same https uri" do
|
163
|
+
URIS_FOR_HTTPS.each do |uri_a|
|
164
|
+
URIS_FOR_HTTPS.each do |uri_b|
|
165
|
+
expect(WebMock::Util::URI.normalize_uri(uri_a)).to be === WebMock::Util::URI.normalize_uri(uri_b)
|
166
|
+
end
|
167
|
+
end
|
168
|
+
end
|
169
|
+
|
170
|
+
it "should successfully handle array parameters" do
|
171
|
+
uri_string = 'http://www.example.com:80/path?a[]=b&a[]=c'
|
172
|
+
uri = WebMock::Util::URI.normalize_uri(uri_string)
|
173
|
+
expect(WebMock::Util::QueryMapper.query_to_values(uri.query)).to eq({"a"=>["b", "c"]})
|
174
|
+
end
|
175
|
+
|
176
|
+
it "should successfully handle hash parameters" do
|
177
|
+
uri_string = 'http://www.example.com:80/path?a[d]=b&a[e]=c&a[b][c]=1'
|
178
|
+
uri = WebMock::Util::URI.normalize_uri(uri_string)
|
179
|
+
expect(WebMock::Util::QueryMapper.query_to_values(uri.query)).to eq({"a"=>{"d"=>"b", "e"=>"c", "b"=>{"c"=>"1"}}})
|
180
|
+
end
|
181
|
+
|
182
|
+
it "should successfully handle nested hash parameters" do
|
183
|
+
uri_string = 'http://www.example.com:80/path?one[two][three][]=four&one[two][three][]=five'
|
184
|
+
uri = WebMock::Util::URI.normalize_uri(uri_string)
|
185
|
+
expect(WebMock::Util::QueryMapper.query_to_values(uri.query)).to eq({"one"=>{"two"=>{"three" => ["four", "five"]}}})
|
186
|
+
end
|
187
|
+
|
188
|
+
it "should successfully handle mixed array and hash parameters" do
|
189
|
+
# derived from an elasticsearch query:
|
190
|
+
# load => {
|
191
|
+
# :include => [
|
192
|
+
# { :staff => :email },
|
193
|
+
# :business_name
|
194
|
+
# ]
|
195
|
+
# }
|
196
|
+
uri_string = "http://www.example.com:80/path?load[include][][staff]=email&load[include][]=business_name"
|
197
|
+
uri = WebMock::Util::URI.normalize_uri(uri_string)
|
198
|
+
expect(WebMock::Util::QueryMapper.query_to_values(uri.query)).to eq({"load"=>{"include"=>[{"staff"=>"email"},"business_name"]}})
|
199
|
+
end
|
200
|
+
|
201
|
+
context "when query notation is set to :flat_array" do
|
202
|
+
before :all do
|
203
|
+
WebMock::Config.instance.query_values_notation = :flat_array
|
204
|
+
end
|
205
|
+
|
206
|
+
it "should successfully handle repeated paramters" do
|
207
|
+
uri_string = "http://www.example.com:80/path?target=host1&target=host2"
|
208
|
+
uri = WebMock::Util::URI.normalize_uri(uri_string)
|
209
|
+
expect(WebMock::Util::QueryMapper.query_to_values(uri.query, notation: WebMock::Config.instance.query_values_notation)).to eq([['target', 'host1'], ['target', 'host2']])
|
210
|
+
end
|
211
|
+
end
|
212
|
+
end
|
213
|
+
|
214
|
+
describe "sorting query values" do
|
215
|
+
|
216
|
+
context "when query values is a Hash" do
|
217
|
+
it "returns an alphabetically sorted hash" do
|
218
|
+
sorted_query = WebMock::Util::URI.sort_query_values({"b"=>"one", "a"=>"two"})
|
219
|
+
expect(sorted_query).to eq({"a"=>"two", "b"=>"one"})
|
220
|
+
end
|
221
|
+
end
|
222
|
+
|
223
|
+
context "when query values is an Array" do
|
224
|
+
it "returns an alphabetically sorted array" do
|
225
|
+
sorted_query = WebMock::Util::URI.sort_query_values([["b","two"],["a","one_b"],["a","one_a"]])
|
226
|
+
expect(sorted_query).to eq([["a","one_a"],["a","one_b"],["b","two"]])
|
227
|
+
end
|
228
|
+
end
|
229
|
+
end
|
230
|
+
|
231
|
+
describe "stripping default port" do
|
232
|
+
|
233
|
+
it "should strip_default_port_from_uri strips 80 from http with path" do
|
234
|
+
uri = "http://example.com:80/foo/bar"
|
235
|
+
stripped_uri = WebMock::Util::URI.strip_default_port_from_uri_string(uri)
|
236
|
+
expect(stripped_uri).to eq("http://example.com/foo/bar")
|
237
|
+
end
|
238
|
+
|
239
|
+
it "should strip_default_port_from_uri strips 80 from http without path" do
|
240
|
+
uri = "http://example.com:80"
|
241
|
+
stripped_uri = WebMock::Util::URI.strip_default_port_from_uri_string(uri)
|
242
|
+
expect(stripped_uri).to eq("http://example.com")
|
243
|
+
end
|
244
|
+
|
245
|
+
it "should strip_default_port_from_uri strips 443 from https without path" do
|
246
|
+
uri = "https://example.com:443"
|
247
|
+
stripped_uri = WebMock::Util::URI.strip_default_port_from_uri_string(uri)
|
248
|
+
expect(stripped_uri).to eq("https://example.com")
|
249
|
+
end
|
250
|
+
|
251
|
+
it "should strip_default_port_from_uri strips 443 from https" do
|
252
|
+
uri = "https://example.com:443/foo/bar"
|
253
|
+
stripped_uri = WebMock::Util::URI.strip_default_port_from_uri_string(uri)
|
254
|
+
expect(stripped_uri).to eq("https://example.com/foo/bar")
|
255
|
+
end
|
256
|
+
|
257
|
+
it "should strip_default_port_from_uri does not strip 8080 from http" do
|
258
|
+
uri = "http://example.com:8080/foo/bar"
|
259
|
+
expect(WebMock::Util::URI.strip_default_port_from_uri_string(uri)).to eq(uri)
|
260
|
+
end
|
261
|
+
|
262
|
+
it "should strip_default_port_from_uri does not strip 443 from http" do
|
263
|
+
uri = "http://example.com:443/foo/bar"
|
264
|
+
expect(WebMock::Util::URI.strip_default_port_from_uri_string(uri)).to eq(uri)
|
265
|
+
end
|
266
|
+
|
267
|
+
it "should strip_default_port_from_uri does not strip 80 from query string" do
|
268
|
+
uri = "http://example.com/?a=:80&b=c"
|
269
|
+
expect(WebMock::Util::URI.strip_default_port_from_uri_string(uri)).to eq(uri)
|
270
|
+
end
|
271
|
+
|
272
|
+
it "should strip_default_port_from_uri does not modify strings that do not start with http or https" do
|
273
|
+
uri = "httpz://example.com:80/"
|
274
|
+
expect(WebMock::Util::URI.strip_default_port_from_uri_string(uri)).to eq(uri)
|
275
|
+
end
|
276
|
+
|
277
|
+
end
|
278
|
+
|
279
|
+
|
280
|
+
describe "encoding userinfo" do
|
281
|
+
|
282
|
+
it "should encode unsafe chars in userinfo does not encode userinfo safe punctuation" do
|
283
|
+
userinfo = "user;&=+$,:secret"
|
284
|
+
expect(WebMock::Util::URI.encode_unsafe_chars_in_userinfo(userinfo)).to eq(userinfo)
|
285
|
+
end
|
286
|
+
|
287
|
+
it "should encode unsafe chars in userinfo does not encode rfc 3986 unreserved characters" do
|
288
|
+
userinfo = "-.!~*'()abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789:secret"
|
289
|
+
expect(WebMock::Util::URI.encode_unsafe_chars_in_userinfo(userinfo)).to eq(userinfo)
|
290
|
+
end
|
291
|
+
|
292
|
+
it "should encode unsafe chars in userinfo does encode other characters" do
|
293
|
+
userinfo, safe_userinfo = 'us#rn@me:sec//ret?"', 'us%23rn%40me:sec%2F%2Fret%3F%22'
|
294
|
+
expect(WebMock::Util::URI.encode_unsafe_chars_in_userinfo(userinfo)).to eq(safe_userinfo)
|
295
|
+
end
|
296
|
+
|
297
|
+
end
|
298
|
+
|
299
|
+
end
|