vagrant-unbundled 2.2.4.0 → 2.2.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +44 -0
- data/Gemfile.lock +10 -10
- data/LICENSE +1 -1
- data/README.md +10 -0
- data/RELEASE.md +11 -25
- data/contrib/bash/completion.sh +1 -1
- data/lib/vagrant/action/builtin/mixin_synced_folders.rb +7 -1
- data/lib/vagrant/action/general/package.rb +18 -0
- data/lib/vagrant/action/runner.rb +1 -1
- data/lib/vagrant/action/warden.rb +1 -1
- data/lib/vagrant/batch_action.rb +14 -0
- data/lib/vagrant/box_collection.rb +1 -1
- data/lib/vagrant/bundler.rb +29 -8
- data/lib/vagrant/cli.rb +1 -1
- data/lib/vagrant/environment.rb +50 -5
- data/lib/vagrant/machine.rb +4 -1
- data/lib/vagrant/plugin/v2/trigger.rb +12 -3
- data/lib/vagrant/shared_helpers.rb +8 -0
- data/lib/vagrant/util/guest_inspection.rb +19 -0
- data/lib/vagrant/vagrantfile.rb +18 -14
- data/plugins/commands/box/command/update.rb +8 -2
- data/plugins/commands/cloud/box/create.rb +1 -1
- data/plugins/commands/cloud/box/delete.rb +1 -1
- data/plugins/commands/cloud/provider/create.rb +1 -1
- data/plugins/commands/cloud/provider/delete.rb +1 -1
- data/plugins/commands/cloud/provider/update.rb +1 -1
- data/plugins/commands/cloud/provider/upload.rb +1 -1
- data/plugins/commands/cloud/publish.rb +1 -1
- data/plugins/commands/cloud/search.rb +1 -1
- data/plugins/commands/cloud/version/create.rb +1 -1
- data/plugins/commands/cloud/version/delete.rb +1 -1
- data/plugins/commands/cloud/version/release.rb +1 -1
- data/plugins/commands/cloud/version/revoke.rb +1 -1
- data/plugins/commands/cloud/version/update.rb +1 -1
- data/plugins/commands/global-status/command.rb +11 -0
- data/plugins/commands/snapshot/command/list.rb +2 -1
- data/plugins/commands/snapshot/command/pop.rb +3 -1
- data/plugins/communicators/ssh/communicator.rb +0 -1
- data/plugins/guests/bsd/cap/{virtualbox.rb → mount_virtualbox_shared_folder.rb} +1 -1
- data/plugins/guests/bsd/plugin.rb +2 -2
- data/plugins/guests/coreos/cap/change_host_name.rb +24 -7
- data/plugins/guests/coreos/cap/configure_networks.rb +48 -64
- data/plugins/guests/freebsd/cap/configure_networks.rb +2 -2
- data/plugins/guests/freebsd/cap/mount_virtualbox_shared_folder.rb +76 -0
- data/plugins/guests/freebsd/plugin.rb +10 -0
- data/plugins/hosts/bsd/cap/nfs.rb +1 -1
- data/plugins/hosts/freebsd/cap/nfs.rb +1 -1
- data/plugins/hosts/void/cap/nfs.rb +1 -1
- data/plugins/kernel_v2/config/vm_trigger.rb +1 -1
- data/plugins/providers/docker/action/connect_networks.rb +77 -0
- data/plugins/providers/docker/action/destroy_network.rb +50 -0
- data/plugins/providers/docker/action/prepare_networks.rb +355 -0
- data/plugins/providers/docker/action.rb +9 -3
- data/plugins/providers/docker/driver/compose.rb +13 -1
- data/plugins/providers/docker/driver.rb +148 -4
- data/plugins/providers/docker/errors.rb +28 -0
- data/plugins/providers/docker/provider.rb +8 -0
- data/plugins/providers/virtualbox/cap.rb +1 -0
- data/plugins/provisioners/ansible/cap/guest/debian/ansible_install.rb +5 -5
- data/plugins/provisioners/ansible/cap/guest/fedora/ansible_install.rb +5 -5
- data/plugins/provisioners/ansible/cap/guest/pip/pip.rb +15 -2
- data/plugins/provisioners/ansible/cap/guest/redhat/ansible_install.rb +5 -5
- data/plugins/provisioners/ansible/cap/guest/ubuntu/ansible_install.rb +2 -2
- data/plugins/provisioners/ansible/config/guest.rb +3 -0
- data/plugins/provisioners/ansible/provisioner/guest.rb +5 -2
- data/plugins/provisioners/chef/cap/freebsd/chef_installed.rb +1 -1
- data/plugins/provisioners/chef/cap/linux/chef_installed.rb +1 -1
- data/plugins/provisioners/chef/cap/omnios/chef_installed.rb +1 -1
- data/plugins/provisioners/chef/cap/windows/chef_installed.rb +2 -2
- data/plugins/provisioners/chef/provisioner/base.rb +1 -1
- data/plugins/synced_folders/rsync/command/rsync_auto.rb +5 -1
- data/plugins/synced_folders/rsync/default_unix_cap.rb +1 -1
- data/plugins/synced_folders/rsync/helper.rb +8 -7
- data/plugins/synced_folders/smb/synced_folder.rb +21 -0
- data/templates/locales/en.yml +8 -4
- data/templates/locales/providers_docker.yml +70 -0
- data/templates/nfs/{exports_freebsd.erb → exports_bsd.erb} +0 -0
- data/vendor/bundle/ruby/2.6.0/bundler/gems/vagrant-spec-abfc34474d12/vagrant-spec.gemspec +3 -3
- data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/bcrypt_pbkdf-1.0.1/bcrypt_pbkdf_ext.so +0 -0
- data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/bcrypt_pbkdf-1.0.1/gem.build_complete +0 -0
- data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/bcrypt_pbkdf-1.0.1/gem_make.out +19 -0
- data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/unf_ext-0.0.7.6/gem.build_complete +0 -0
- data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/unf_ext-0.0.7.6/gem_make.out +16 -0
- data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/unf_ext-0.0.7.6/mkmf.log +35 -0
- data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/unf_ext-0.0.7.6/unf_ext.so +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/bcrypt_pbkdf-1.0.1/.travis.yml +8 -0
- data/vendor/bundle/ruby/2.6.0/gems/bcrypt_pbkdf-1.0.1/CHANGELOG.md +3 -0
- data/vendor/bundle/ruby/2.6.0/gems/bcrypt_pbkdf-1.0.1/COPYING +23 -0
- data/vendor/bundle/ruby/2.6.0/gems/bcrypt_pbkdf-1.0.1/Gemfile +2 -0
- data/vendor/bundle/ruby/2.6.0/gems/bcrypt_pbkdf-1.0.1/Gemfile.lock +31 -0
- data/vendor/bundle/ruby/2.6.0/gems/bcrypt_pbkdf-1.0.1/README.md +31 -0
- data/vendor/bundle/ruby/2.6.0/gems/bcrypt_pbkdf-1.0.1/Rakefile +56 -0
- data/vendor/bundle/ruby/2.6.0/gems/bcrypt_pbkdf-1.0.1/bcrypt_pbkdf.gemspec +29 -0
- data/vendor/bundle/ruby/2.6.0/gems/bcrypt_pbkdf-1.0.1/ext/mri/.sitearchdir.time +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/bcrypt_pbkdf-1.0.1/ext/mri/Makefile +265 -0
- data/vendor/bundle/ruby/2.6.0/gems/bcrypt_pbkdf-1.0.1/ext/mri/bcrypt_pbkdf.c +169 -0
- data/vendor/bundle/ruby/2.6.0/gems/bcrypt_pbkdf-1.0.1/ext/mri/bcrypt_pbkdf.o +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/bcrypt_pbkdf-1.0.1/ext/mri/bcrypt_pbkdf_ext.c +44 -0
- data/vendor/bundle/ruby/2.6.0/gems/bcrypt_pbkdf-1.0.1/ext/mri/bcrypt_pbkdf_ext.o +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/bcrypt_pbkdf-1.0.1/ext/mri/bcrypt_pbkdf_ext.so +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/bcrypt_pbkdf-1.0.1/ext/mri/blf.h +90 -0
- data/vendor/bundle/ruby/2.6.0/gems/bcrypt_pbkdf-1.0.1/ext/mri/blowfish.c +698 -0
- data/vendor/bundle/ruby/2.6.0/gems/bcrypt_pbkdf-1.0.1/ext/mri/blowfish.o +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/bcrypt_pbkdf-1.0.1/ext/mri/crypto_api.h +3 -0
- data/vendor/bundle/ruby/2.6.0/gems/bcrypt_pbkdf-1.0.1/ext/mri/crypto_hash_sha512.h +19 -0
- data/vendor/bundle/ruby/2.6.0/gems/bcrypt_pbkdf-1.0.1/ext/mri/explicit_bzero.c +20 -0
- data/vendor/bundle/ruby/2.6.0/gems/bcrypt_pbkdf-1.0.1/ext/mri/explicit_bzero.o +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/bcrypt_pbkdf-1.0.1/ext/mri/extconf.rb +3 -0
- data/vendor/bundle/ruby/2.6.0/gems/bcrypt_pbkdf-1.0.1/ext/mri/hash_sha512.c +320 -0
- data/vendor/bundle/ruby/2.6.0/gems/bcrypt_pbkdf-1.0.1/ext/mri/hash_sha512.o +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/bcrypt_pbkdf-1.0.1/ext/mri/includes.h +27 -0
- data/vendor/bundle/ruby/2.6.0/gems/bcrypt_pbkdf-1.0.1/ext/mri/sha2.h +13 -0
- data/vendor/bundle/ruby/2.6.0/gems/bcrypt_pbkdf-1.0.1/ext/mri/util.h +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/bcrypt_pbkdf-1.0.1/ext/mri/utils.h +5 -0
- data/vendor/bundle/ruby/2.6.0/gems/bcrypt_pbkdf-1.0.1/lib/bcrypt_pbkdf.rb +24 -0
- data/vendor/bundle/ruby/2.6.0/gems/bcrypt_pbkdf-1.0.1/lib/bcrypt_pbkdf_ext.so +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/bcrypt_pbkdf-1.0.1/test/bcrypt_pnkdf/engine_test.rb +76 -0
- data/vendor/bundle/ruby/2.6.0/gems/bcrypt_pbkdf-1.0.1/test/test_helper.rb +2 -0
- data/vendor/bundle/ruby/2.6.0/gems/domain_name-0.5.20190701/.document +5 -0
- data/vendor/bundle/ruby/2.6.0/gems/domain_name-0.5.20190701/.gitignore +17 -0
- data/vendor/bundle/ruby/2.6.0/gems/domain_name-0.5.20190701/.travis.yml +21 -0
- data/vendor/bundle/ruby/2.6.0/gems/domain_name-0.5.20190701/CHANGELOG.md +219 -0
- data/vendor/bundle/ruby/2.6.0/gems/domain_name-0.5.20190701/Gemfile +4 -0
- data/vendor/bundle/ruby/2.6.0/gems/domain_name-0.5.20190701/LICENSE.txt +78 -0
- data/vendor/bundle/ruby/2.6.0/gems/domain_name-0.5.20190701/README.md +67 -0
- data/vendor/bundle/ruby/2.6.0/gems/domain_name-0.5.20190701/Rakefile +111 -0
- data/vendor/bundle/ruby/2.6.0/gems/domain_name-0.5.20190701/data/public_suffix_list.dat +12985 -0
- data/vendor/bundle/ruby/2.6.0/gems/domain_name-0.5.20190701/domain_name.gemspec +36 -0
- data/vendor/bundle/ruby/2.6.0/gems/domain_name-0.5.20190701/lib/domain_name/etld_data.rb +8787 -0
- data/vendor/bundle/ruby/2.6.0/gems/domain_name-0.5.20190701/lib/domain_name/etld_data.rb.erb +11 -0
- data/vendor/bundle/ruby/2.6.0/gems/domain_name-0.5.20190701/lib/domain_name/punycode.rb +283 -0
- data/vendor/bundle/ruby/2.6.0/gems/domain_name-0.5.20190701/lib/domain_name/version.rb +3 -0
- data/vendor/bundle/ruby/2.6.0/gems/domain_name-0.5.20190701/lib/domain_name.rb +297 -0
- data/vendor/bundle/ruby/2.6.0/gems/domain_name-0.5.20190701/test/helper.rb +17 -0
- data/vendor/bundle/ruby/2.6.0/gems/domain_name-0.5.20190701/test/test_domain_name-punycode.rb +97 -0
- data/vendor/bundle/ruby/2.6.0/gems/domain_name-0.5.20190701/test/test_domain_name.rb +317 -0
- data/vendor/bundle/ruby/2.6.0/gems/domain_name-0.5.20190701/tool/gen_etld_data.rb +63 -0
- data/vendor/bundle/ruby/2.6.0/gems/gssapi-1.3.0/.gitignore +11 -0
- data/vendor/bundle/ruby/2.6.0/gems/gssapi-1.3.0/COPYING +18 -0
- data/vendor/bundle/ruby/2.6.0/gems/gssapi-1.3.0/Changelog.md +23 -0
- data/vendor/bundle/ruby/2.6.0/gems/gssapi-1.3.0/Gemfile +2 -0
- data/vendor/bundle/ruby/2.6.0/gems/gssapi-1.3.0/README.md +22 -0
- data/vendor/bundle/ruby/2.6.0/gems/gssapi-1.3.0/Rakefile +11 -0
- data/vendor/bundle/ruby/2.6.0/gems/gssapi-1.3.0/VERSION +1 -0
- data/vendor/bundle/ruby/2.6.0/gems/gssapi-1.3.0/examples/gss_client.rb +26 -0
- data/vendor/bundle/ruby/2.6.0/gems/gssapi-1.3.0/examples/gss_iov_client.rb +55 -0
- data/vendor/bundle/ruby/2.6.0/gems/gssapi-1.3.0/examples/gss_iov_helpers.rb +74 -0
- data/vendor/bundle/ruby/2.6.0/gems/gssapi-1.3.0/examples/gss_iov_server.rb +67 -0
- data/vendor/bundle/ruby/2.6.0/gems/gssapi-1.3.0/examples/gss_server.rb +31 -0
- data/vendor/bundle/ruby/2.6.0/gems/gssapi-1.3.0/gssapi.gemspec +34 -0
- data/vendor/bundle/ruby/2.6.0/gems/gssapi-1.3.0/lib/gssapi/exceptions.rb +50 -0
- data/vendor/bundle/ruby/2.6.0/gems/gssapi-1.3.0/lib/gssapi/extensions.rb +40 -0
- data/vendor/bundle/ruby/2.6.0/gems/gssapi-1.3.0/lib/gssapi/heimdal.rb +10 -0
- data/vendor/bundle/ruby/2.6.0/gems/gssapi-1.3.0/lib/gssapi/lib_gssapi.rb +414 -0
- data/vendor/bundle/ruby/2.6.0/gems/gssapi-1.3.0/lib/gssapi/lib_gssapi_loader.rb +80 -0
- data/vendor/bundle/ruby/2.6.0/gems/gssapi-1.3.0/lib/gssapi/simple.rb +269 -0
- data/vendor/bundle/ruby/2.6.0/gems/gssapi-1.3.0/lib/gssapi.rb +18 -0
- data/vendor/bundle/ruby/2.6.0/gems/gssapi-1.3.0/preamble +5 -0
- data/vendor/bundle/ruby/2.6.0/gems/gssapi-1.3.0/test/spec/gssapi_simple_spec.rb +70 -0
- data/vendor/bundle/ruby/2.6.0/gems/gssapi-1.3.0/test/spec/test_buffer_spec.rb +15 -0
- data/vendor/bundle/ruby/2.6.0/gems/mime-types-3.3/Code-of-Conduct.md +73 -0
- data/vendor/bundle/ruby/2.6.0/gems/mime-types-3.3/Contributing.md +141 -0
- data/vendor/bundle/ruby/2.6.0/gems/mime-types-3.3/History.md +223 -0
- data/vendor/bundle/ruby/2.6.0/gems/mime-types-3.3/Licence.md +25 -0
- data/vendor/bundle/ruby/2.6.0/gems/mime-types-3.3/Manifest.txt +31 -0
- data/vendor/bundle/ruby/2.6.0/gems/mime-types-3.3/README.rdoc +200 -0
- data/vendor/bundle/ruby/2.6.0/gems/mime-types-3.3/Rakefile +284 -0
- data/vendor/bundle/ruby/2.6.0/gems/mime-types-3.3/lib/mime/type/columnar.rb +57 -0
- data/vendor/bundle/ruby/2.6.0/gems/mime-types-3.3/lib/mime/type.rb +587 -0
- data/vendor/bundle/ruby/2.6.0/gems/mime-types-3.3/lib/mime/types/_columnar.rb +136 -0
- data/vendor/bundle/ruby/2.6.0/gems/mime-types-3.3/lib/mime/types/cache.rb +58 -0
- data/vendor/bundle/ruby/2.6.0/gems/mime-types-3.3/lib/mime/types/columnar.rb +3 -0
- data/vendor/bundle/ruby/2.6.0/gems/mime-types-3.3/lib/mime/types/container.rb +96 -0
- data/vendor/bundle/ruby/2.6.0/gems/mime-types-3.3/lib/mime/types/deprecations.rb +32 -0
- data/vendor/bundle/ruby/2.6.0/gems/mime-types-3.3/lib/mime/types/full.rb +19 -0
- data/vendor/bundle/ruby/2.6.0/gems/mime-types-3.3/lib/mime/types/loader.rb +146 -0
- data/vendor/bundle/ruby/2.6.0/gems/mime-types-3.3/lib/mime/types/logger.rb +39 -0
- data/vendor/bundle/ruby/2.6.0/gems/mime-types-3.3/lib/mime/types/registry.rb +90 -0
- data/vendor/bundle/ruby/2.6.0/gems/mime-types-3.3/lib/mime/types.rb +231 -0
- data/vendor/bundle/ruby/2.6.0/gems/mime-types-3.3/lib/mime-types.rb +3 -0
- data/vendor/bundle/ruby/2.6.0/gems/mime-types-3.3/test/bad-fixtures/malformed +9 -0
- data/vendor/bundle/ruby/2.6.0/gems/mime-types-3.3/test/fixture/json.json +1 -0
- data/vendor/bundle/ruby/2.6.0/gems/mime-types-3.3/test/fixture/old-data +9 -0
- data/vendor/bundle/ruby/2.6.0/gems/mime-types-3.3/test/fixture/yaml.yaml +55 -0
- data/vendor/bundle/ruby/2.6.0/gems/mime-types-3.3/test/minitest_helper.rb +13 -0
- data/vendor/bundle/ruby/2.6.0/gems/mime-types-3.3/test/test_mime_type.rb +610 -0
- data/vendor/bundle/ruby/2.6.0/gems/mime-types-3.3/test/test_mime_types.rb +169 -0
- data/vendor/bundle/ruby/2.6.0/gems/mime-types-3.3/test/test_mime_types_cache.rb +118 -0
- data/vendor/bundle/ruby/2.6.0/gems/mime-types-3.3/test/test_mime_types_class.rb +159 -0
- data/vendor/bundle/ruby/2.6.0/gems/mime-types-3.3/test/test_mime_types_lazy.rb +49 -0
- data/vendor/bundle/ruby/2.6.0/gems/mime-types-3.3/test/test_mime_types_loader.rb +32 -0
- data/vendor/bundle/ruby/2.6.0/gems/mime-types-data-3.2019.0904/Code-of-Conduct.md +75 -0
- data/vendor/bundle/ruby/2.6.0/gems/mime-types-data-3.2019.0904/Contributing.md +161 -0
- data/vendor/bundle/ruby/2.6.0/gems/mime-types-data-3.2019.0904/History.md +396 -0
- data/vendor/bundle/ruby/2.6.0/gems/mime-types-data-3.2019.0904/Licence.md +25 -0
- data/vendor/bundle/ruby/2.6.0/gems/mime-types-data-3.2019.0904/Manifest.txt +31 -0
- data/vendor/bundle/ruby/2.6.0/gems/mime-types-data-3.2019.0904/README.md +63 -0
- data/vendor/bundle/ruby/2.6.0/gems/mime-types-data-3.2019.0904/Rakefile +94 -0
- data/vendor/bundle/ruby/2.6.0/gems/mime-types-data-3.2019.0904/data/mime-types.json +1 -0
- data/vendor/bundle/ruby/2.6.0/gems/mime-types-data-3.2019.0904/data/mime.content_type.column +2212 -0
- data/vendor/bundle/ruby/2.6.0/gems/mime-types-data-3.2019.0904/data/mime.docs.column +2212 -0
- data/vendor/bundle/ruby/2.6.0/gems/mime-types-data-3.2019.0904/data/mime.encoding.column +2212 -0
- data/vendor/bundle/ruby/2.6.0/gems/mime-types-data-3.2019.0904/data/mime.flags.column +2212 -0
- data/vendor/bundle/ruby/2.6.0/gems/mime-types-data-3.2019.0904/data/mime.friendly.column +2212 -0
- data/vendor/bundle/ruby/2.6.0/gems/mime-types-data-3.2019.0904/data/mime.pext.column +2212 -0
- data/vendor/bundle/ruby/2.6.0/gems/mime-types-data-3.2019.0904/data/mime.use_instead.column +2212 -0
- data/vendor/bundle/ruby/2.6.0/gems/mime-types-data-3.2019.0904/data/mime.xrefs.column +2212 -0
- data/vendor/bundle/ruby/2.6.0/gems/mime-types-data-3.2019.0904/lib/mime/types/data.rb +21 -0
- data/vendor/bundle/ruby/2.6.0/gems/mime-types-data-3.2019.0904/lib/mime-types-data.rb +3 -0
- data/vendor/bundle/ruby/2.6.0/gems/mime-types-data-3.2019.0904/types/application.yaml +16342 -0
- data/vendor/bundle/ruby/2.6.0/gems/mime-types-data-3.2019.0904/types/audio.yaml +1644 -0
- data/vendor/bundle/ruby/2.6.0/gems/mime-types-data-3.2019.0904/types/chemical.yaml +71 -0
- data/vendor/bundle/ruby/2.6.0/gems/mime-types-data-3.2019.0904/types/conference.yaml +9 -0
- data/vendor/bundle/ruby/2.6.0/gems/mime-types-data-3.2019.0904/types/drawing.yaml +15 -0
- data/vendor/bundle/ruby/2.6.0/gems/mime-types-data-3.2019.0904/types/font.yaml +65 -0
- data/vendor/bundle/ruby/2.6.0/gems/mime-types-data-3.2019.0904/types/image.yaml +1069 -0
- data/vendor/bundle/ruby/2.6.0/gems/mime-types-data-3.2019.0904/types/message.yaml +200 -0
- data/vendor/bundle/ruby/2.6.0/gems/mime-types-data-3.2019.0904/types/model.yaml +302 -0
- data/vendor/bundle/ruby/2.6.0/gems/mime-types-data-3.2019.0904/types/multipart.yaml +179 -0
- data/vendor/bundle/ruby/2.6.0/gems/mime-types-data-3.2019.0904/types/text.yaml +1046 -0
- data/vendor/bundle/ruby/2.6.0/gems/mime-types-data-3.2019.0904/types/video.yaml +1070 -0
- data/vendor/bundle/ruby/2.6.0/gems/mime-types-data-3.2019.0904/types/world.yaml +8 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/README.md +313 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/Rakefile +18 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/TODO +15 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/central_directory.rb +208 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/compressor.rb +9 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/constants.rb +63 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/crypto/encryption.rb +11 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/crypto/null_encryption.rb +43 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/crypto/traditional_encryption.rb +99 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/decompressor.rb +13 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/deflater.rb +34 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/dos_time.rb +48 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/entry.rb +688 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/entry_set.rb +86 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/errors.rb +17 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/extra_field/generic.rb +43 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/extra_field/ntfs.rb +90 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/extra_field/old_unix.rb +44 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/extra_field/universal_time.rb +47 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/extra_field/unix.rb +37 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/extra_field/zip64.rb +68 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/extra_field/zip64_placeholder.rb +15 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/extra_field.rb +101 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/file.rb +436 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/filesystem.rb +627 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/inflater.rb +66 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/input_stream.rb +173 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/ioextras/abstract_input_stream.rb +111 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/ioextras/abstract_output_stream.rb +43 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/ioextras.rb +36 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/null_compressor.rb +15 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/null_decompressor.rb +27 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/null_input_stream.rb +10 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/output_stream.rb +189 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/pass_thru_compressor.rb +23 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/pass_thru_decompressor.rb +40 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/streamable_directory.rb +15 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/streamable_stream.rb +56 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/version.rb +3 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip.rb +69 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/samples/example.rb +81 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/samples/example_filesystem.rb +31 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/samples/example_recursive.rb +54 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/samples/gtk_ruby_zip.rb +84 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/samples/qtzip.rb +92 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/samples/write_simple.rb +12 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/samples/zipfind.rb +66 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/basic_zip_file_test.rb +60 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/case_sensitivity_test.rb +69 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/central_directory_entry_test.rb +69 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/central_directory_test.rb +100 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/crypto/null_encryption_test.rb +57 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/crypto/traditional_encryption_test.rb +80 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/WarnInvalidDate.zip +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/file1.txt +46 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/file1.txt.deflatedData +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/file2.txt +1504 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/globTest/foo/bar/baz/foo.txt +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/globTest/foo.txt +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/globTest/food.txt +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/globTest.zip +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/gpbit3stored.zip +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/mimetype +1 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/notzippedruby.rb +7 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/ntfs.zip +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/oddExtraField.zip +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/path_traversal/Makefile +10 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/path_traversal/jwilk/README.md +5 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/path_traversal/jwilk/absolute1.zip +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/path_traversal/jwilk/absolute2.zip +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/path_traversal/jwilk/dirsymlink.zip +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/path_traversal/jwilk/dirsymlink2a.zip +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/path_traversal/jwilk/dirsymlink2b.zip +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/path_traversal/jwilk/relative0.zip +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/path_traversal/jwilk/relative2.zip +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/path_traversal/jwilk/symlink.zip +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/path_traversal/relative1.zip +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/path_traversal/tilde.zip +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/path_traversal/tuzovakaoff/README.md +3 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/path_traversal/tuzovakaoff/absolutepath.zip +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/path_traversal/tuzovakaoff/symlink.zip +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/rubycode.zip +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/rubycode2.zip +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/test.xls +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/testDirectory.bin +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/zip64-sample.zip +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/zipWithDirs.zip +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/zipWithEncryption.zip +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/deflater_test.rb +65 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/encryption_test.rb +42 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/entry_set_test.rb +163 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/entry_test.rb +154 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/errors_test.rb +35 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/extra_field_test.rb +76 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/file_extract_directory_test.rb +54 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/file_extract_test.rb +83 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/file_permissions_test.rb +65 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/file_split_test.rb +57 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/file_test.rb +646 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/filesystem/dir_iterator_test.rb +58 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/filesystem/directory_test.rb +139 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/filesystem/file_mutating_test.rb +87 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/filesystem/file_nonmutating_test.rb +508 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/filesystem/file_stat_test.rb +64 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/gentestfiles.rb +126 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/inflater_test.rb +14 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/input_stream_test.rb +182 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/ioextras/abstract_input_stream_test.rb +102 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/ioextras/abstract_output_stream_test.rb +106 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/ioextras/fake_io_test.rb +18 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/local_entry_test.rb +154 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/output_stream_test.rb +128 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/pass_thru_compressor_test.rb +30 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/pass_thru_decompressor_test.rb +14 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/path_traversal_test.rb +141 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/samples/example_recursive_test.rb +37 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/settings_test.rb +95 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/test_helper.rb +234 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/unicode_file_names_and_comments_test.rb +62 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/zip64_full_test.rb +51 -0
- data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/zip64_support_test.rb +14 -0
- data/vendor/bundle/ruby/2.6.0/gems/unf_ext-0.0.7.6/.document +5 -0
- data/vendor/bundle/ruby/2.6.0/gems/unf_ext-0.0.7.6/.gitignore +19 -0
- data/vendor/bundle/ruby/2.6.0/gems/unf_ext-0.0.7.6/.travis.yml +24 -0
- data/vendor/bundle/ruby/2.6.0/gems/unf_ext-0.0.7.6/CHANGELOG.md +42 -0
- data/vendor/bundle/ruby/2.6.0/gems/unf_ext-0.0.7.6/Gemfile +4 -0
- data/vendor/bundle/ruby/2.6.0/gems/unf_ext-0.0.7.6/LICENSE.txt +22 -0
- data/vendor/bundle/ruby/2.6.0/gems/unf_ext-0.0.7.6/README.md +57 -0
- data/vendor/bundle/ruby/2.6.0/gems/unf_ext-0.0.7.6/Rakefile +31 -0
- data/vendor/bundle/ruby/2.6.0/gems/unf_ext-0.0.7.6/ext/unf_ext/.sitearchdir.time +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/unf_ext-0.0.7.6/ext/unf_ext/Makefile +265 -0
- data/vendor/bundle/ruby/2.6.0/gems/unf_ext-0.0.7.6/ext/unf_ext/extconf.rb +50 -0
- data/vendor/bundle/ruby/2.6.0/gems/unf_ext-0.0.7.6/ext/unf_ext/unf/normalizer.hh +139 -0
- data/vendor/bundle/ruby/2.6.0/gems/unf_ext-0.0.7.6/ext/unf_ext/unf/table.hh +13617 -0
- data/vendor/bundle/ruby/2.6.0/gems/unf_ext-0.0.7.6/ext/unf_ext/unf/trie/char_stream.hh +150 -0
- data/vendor/bundle/ruby/2.6.0/gems/unf_ext-0.0.7.6/ext/unf_ext/unf/trie/node.hh +25 -0
- data/vendor/bundle/ruby/2.6.0/gems/unf_ext-0.0.7.6/ext/unf_ext/unf/trie/searcher.hh +194 -0
- data/vendor/bundle/ruby/2.6.0/gems/unf_ext-0.0.7.6/ext/unf_ext/unf/util.hh +24 -0
- data/vendor/bundle/ruby/2.6.0/gems/unf_ext-0.0.7.6/ext/unf_ext/unf.cc +75 -0
- data/vendor/bundle/ruby/2.6.0/gems/unf_ext-0.0.7.6/ext/unf_ext/unf.o +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/unf_ext-0.0.7.6/ext/unf_ext/unf_ext.so +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/unf_ext-0.0.7.6/lib/unf_ext/version.rb +5 -0
- data/vendor/bundle/ruby/2.6.0/gems/unf_ext-0.0.7.6/lib/unf_ext.rb +5 -0
- data/vendor/bundle/ruby/2.6.0/gems/unf_ext-0.0.7.6/lib/unf_ext.so +0 -0
- data/vendor/bundle/ruby/2.6.0/gems/unf_ext-0.0.7.6/test/helper.rb +18 -0
- data/vendor/bundle/ruby/2.6.0/gems/unf_ext-0.0.7.6/test/normalization-test.txt +112332 -0
- data/vendor/bundle/ruby/2.6.0/gems/unf_ext-0.0.7.6/test/test_unf_ext.rb +41 -0
- data/vendor/bundle/ruby/2.6.0/gems/unf_ext-0.0.7.6/unf_ext.gemspec +42 -0
- data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/LICENSE +202 -0
- data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/README.md +276 -0
- data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/bin/rwinrm +90 -0
- data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/connection.rb +84 -0
- data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/connection_opts.rb +90 -0
- data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/exceptions.rb +88 -0
- data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/http/response_handler.rb +127 -0
- data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/http/transport.rb +462 -0
- data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/http/transport_factory.rb +64 -0
- data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/output.rb +58 -0
- data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/psrp/create_pipeline.xml.erb +167 -0
- data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/psrp/fragment.rb +68 -0
- data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/psrp/init_runspace_pool.xml.erb +224 -0
- data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/psrp/message.rb +128 -0
- data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/psrp/message_data/base.rb +47 -0
- data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/psrp/message_data/error_record.rb +66 -0
- data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/psrp/message_data/pipeline_host_call.rb +30 -0
- data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/psrp/message_data/pipeline_output.rb +48 -0
- data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/psrp/message_data/pipeline_state.rb +38 -0
- data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/psrp/message_data/runspacepool_host_call.rb +30 -0
- data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/psrp/message_data/runspacepool_state.rb +37 -0
- data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/psrp/message_data/session_capability.rb +34 -0
- data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/psrp/message_data.rb +40 -0
- data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/psrp/message_defragmenter.rb +62 -0
- data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/psrp/message_factory.rb +74 -0
- data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/psrp/message_fragmenter.rb +58 -0
- data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/psrp/powershell_output_decoder.rb +142 -0
- data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/psrp/receive_response_reader.rb +95 -0
- data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/psrp/session_capability.xml.erb +7 -0
- data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/psrp/uuid.rb +39 -0
- data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/shells/base.rb +187 -0
- data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/shells/cmd.rb +63 -0
- data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/shells/power_shell.rb +206 -0
- data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/shells/retryable.rb +44 -0
- data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/shells/shell_factory.rb +56 -0
- data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/version.rb +5 -0
- data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/wsmv/base.rb +57 -0
- data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/wsmv/cleanup_command.rb +60 -0
- data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/wsmv/close_shell.rb +49 -0
- data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/wsmv/command.rb +100 -0
- data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/wsmv/command_output.rb +75 -0
- data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/wsmv/command_output_decoder.rb +54 -0
- data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/wsmv/configuration.rb +44 -0
- data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/wsmv/create_pipeline.rb +64 -0
- data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/wsmv/create_shell.rb +115 -0
- data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/wsmv/header.rb +213 -0
- data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/wsmv/init_runspace_pool.rb +96 -0
- data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/wsmv/iso8601_duration.rb +58 -0
- data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/wsmv/keep_alive.rb +66 -0
- data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/wsmv/receive_response_reader.rb +128 -0
- data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/wsmv/send_data.rb +66 -0
- data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/wsmv/soap.rb +49 -0
- data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/wsmv/wql_pull.rb +54 -0
- data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/wsmv/wql_query.rb +98 -0
- data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/wsmv/write_stdin.rb +86 -0
- data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm.rb +37 -0
- data/vendor/bundle/ruby/2.6.0/specifications/bcrypt_pbkdf-1.0.1.gemspec +49 -0
- data/vendor/bundle/ruby/2.6.0/specifications/domain_name-0.5.20190701.gemspec +46 -0
- data/vendor/bundle/ruby/2.6.0/specifications/gssapi-1.3.0.gemspec +36 -0
- data/vendor/bundle/ruby/2.6.0/specifications/mime-types-3.3.gemspec +84 -0
- data/vendor/bundle/ruby/2.6.0/specifications/mime-types-data-3.2019.0904.gemspec +60 -0
- data/vendor/bundle/ruby/2.6.0/specifications/rubyzip-1.2.4.gemspec +44 -0
- data/vendor/bundle/ruby/2.6.0/specifications/unf_ext-0.0.7.6.gemspec +51 -0
- data/vendor/bundle/ruby/2.6.0/specifications/winrm-2.3.2.gemspec +73 -0
- data/version.txt +1 -1
- metadata +365 -6
- data/templates/nfs/exports.erb +0 -5
@@ -0,0 +1,610 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'mime/types'
|
4
|
+
require 'minitest_helper'
|
5
|
+
|
6
|
+
describe MIME::Type do
|
7
|
+
def mime_type(content_type)
|
8
|
+
MIME::Type.new(content_type) { |mt| yield mt if block_given? }
|
9
|
+
end
|
10
|
+
|
11
|
+
let(:x_appl_x_zip) {
|
12
|
+
mime_type('x-appl/x-zip') { |t| t.extensions = %w(zip zp) }
|
13
|
+
}
|
14
|
+
let(:text_plain) { mime_type('text/plain') }
|
15
|
+
let(:text_html) { mime_type('text/html') }
|
16
|
+
let(:image_jpeg) { mime_type('image/jpeg') }
|
17
|
+
let(:application_javascript) {
|
18
|
+
mime_type('application/javascript') do |js|
|
19
|
+
js.friendly('en' => 'JavaScript')
|
20
|
+
js.xrefs = {
|
21
|
+
'rfc' => %w(rfc4239 rfc4239),
|
22
|
+
'template' => %w(application/javascript)
|
23
|
+
}
|
24
|
+
js.encoding = '8bit'
|
25
|
+
js.extensions = %w(js sj)
|
26
|
+
js.registered = true
|
27
|
+
end
|
28
|
+
}
|
29
|
+
let(:text_x_yaml) {
|
30
|
+
mime_type('text/x-yaml') do |yaml|
|
31
|
+
yaml.extensions = %w(yaml yml)
|
32
|
+
yaml.encoding = '8bit'
|
33
|
+
yaml.friendly('en' => 'YAML Structured Document')
|
34
|
+
end
|
35
|
+
}
|
36
|
+
let(:text_x_yaml_with_docs) {
|
37
|
+
text_x_yaml.dup.tap do |yaml|
|
38
|
+
yaml.docs = 'Test YAML'
|
39
|
+
end
|
40
|
+
}
|
41
|
+
|
42
|
+
describe '.simplified' do
|
43
|
+
it 'leaves normal types alone' do
|
44
|
+
assert_equal 'text/plain', MIME::Type.simplified('text/plain')
|
45
|
+
end
|
46
|
+
|
47
|
+
it 'does not remove x- prefixes by default' do
|
48
|
+
assert_equal 'application/x-msword',
|
49
|
+
MIME::Type.simplified('application/x-msword')
|
50
|
+
assert_equal 'x-xyz/abc', MIME::Type.simplified('x-xyz/abc')
|
51
|
+
end
|
52
|
+
|
53
|
+
it 'removes x- prefixes when requested' do
|
54
|
+
assert_equal 'application/msword',
|
55
|
+
MIME::Type.simplified('application/x-msword', remove_x_prefix: true)
|
56
|
+
assert_equal 'xyz/abc',
|
57
|
+
MIME::Type.simplified('x-xyz/abc', remove_x_prefix: true)
|
58
|
+
end
|
59
|
+
|
60
|
+
it 'lowercases mixed-case types' do
|
61
|
+
assert_equal 'text/vcard', MIME::Type.simplified('text/vCard')
|
62
|
+
end
|
63
|
+
|
64
|
+
it 'returns nil when the value provided is not a valid content type' do
|
65
|
+
assert_nil MIME::Type.simplified('text')
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
describe '.i18n_key' do
|
70
|
+
it 'converts text/plain to text.plain' do
|
71
|
+
assert_equal 'text.plain', MIME::Type.i18n_key('text/plain')
|
72
|
+
end
|
73
|
+
|
74
|
+
it 'does not remove x-prefixes' do
|
75
|
+
assert_equal 'application.x-msword',
|
76
|
+
MIME::Type.i18n_key('application/x-msword')
|
77
|
+
end
|
78
|
+
|
79
|
+
it 'converts text/vCard to text.vcard' do
|
80
|
+
assert_equal 'text.vcard', MIME::Type.i18n_key('text/vCard')
|
81
|
+
end
|
82
|
+
|
83
|
+
it 'returns nil when the value provided is not a valid content type' do
|
84
|
+
assert_nil MIME::Type.i18n_key('text')
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
describe '.new' do
|
89
|
+
it 'fails if an invalid content type is provided' do
|
90
|
+
exception = assert_raises MIME::Type::InvalidContentType do
|
91
|
+
MIME::Type.new('apps')
|
92
|
+
end
|
93
|
+
assert_equal 'Invalid Content-Type "apps"', exception.to_s
|
94
|
+
end
|
95
|
+
|
96
|
+
it 'creates a valid content type just from a string' do
|
97
|
+
type = MIME::Type.new('text/x-yaml')
|
98
|
+
|
99
|
+
assert_instance_of MIME::Type, type
|
100
|
+
assert_equal 'text/x-yaml', type.content_type
|
101
|
+
end
|
102
|
+
|
103
|
+
it 'yields the content type in a block' do
|
104
|
+
MIME::Type.new('text/x-yaml') do |type|
|
105
|
+
assert_instance_of MIME::Type, type
|
106
|
+
assert_equal 'text/x-yaml', type.content_type
|
107
|
+
end
|
108
|
+
end
|
109
|
+
|
110
|
+
it 'creates a valid content type from a hash' do
|
111
|
+
type = MIME::Type.new(
|
112
|
+
'content-type' => 'text/x-yaml',
|
113
|
+
'obsolete' => true
|
114
|
+
)
|
115
|
+
assert_instance_of MIME::Type, type
|
116
|
+
assert_equal 'text/x-yaml', type.content_type
|
117
|
+
assert type.obsolete?
|
118
|
+
end
|
119
|
+
|
120
|
+
it 'creates a valid content type from an array' do
|
121
|
+
type = MIME::Type.new(%w(text/x-yaml yaml yml yz))
|
122
|
+
assert_instance_of MIME::Type, type
|
123
|
+
assert_equal 'text/x-yaml', type.content_type
|
124
|
+
assert_equal %w(yaml yml yz), type.extensions
|
125
|
+
end
|
126
|
+
end
|
127
|
+
|
128
|
+
describe '#like?' do
|
129
|
+
it 'compares two MIME::Types on #simplified values without x- prefixes' do
|
130
|
+
assert text_plain.like?(text_plain)
|
131
|
+
refute text_plain.like?(text_html)
|
132
|
+
end
|
133
|
+
|
134
|
+
it 'compares MIME::Type against string without x- prefixes' do
|
135
|
+
assert text_plain.like?(text_plain.to_s)
|
136
|
+
refute text_plain.like?(text_html.to_s)
|
137
|
+
end
|
138
|
+
end
|
139
|
+
|
140
|
+
describe '#<=>' do
|
141
|
+
it 'correctly compares identical types' do
|
142
|
+
assert_equal text_plain, text_plain
|
143
|
+
end
|
144
|
+
|
145
|
+
it 'correctly compares equivalent types' do
|
146
|
+
right = mime_type('text/Plain')
|
147
|
+
refute_same text_plain, right
|
148
|
+
assert_equal text_plain, right
|
149
|
+
end
|
150
|
+
|
151
|
+
it 'correctly compares types that sort earlier' do
|
152
|
+
refute_equal text_html, text_plain
|
153
|
+
assert_operator text_html, :<, text_plain
|
154
|
+
end
|
155
|
+
|
156
|
+
it 'correctly compares types that sort later' do
|
157
|
+
refute_equal text_plain, text_html
|
158
|
+
assert_operator text_plain, :>, text_html
|
159
|
+
end
|
160
|
+
|
161
|
+
it 'correctly compares types against equivalent strings' do
|
162
|
+
assert_equal text_plain, 'text/plain'
|
163
|
+
end
|
164
|
+
|
165
|
+
it 'correctly compares types against strings that sort earlier' do
|
166
|
+
refute_equal text_html, 'text/plain'
|
167
|
+
assert_operator text_html, :<, 'text/plain'
|
168
|
+
end
|
169
|
+
|
170
|
+
it 'correctly compares types against strings that sort later' do
|
171
|
+
refute_equal text_plain, 'text/html'
|
172
|
+
assert_operator text_plain, :>, 'text/html'
|
173
|
+
end
|
174
|
+
|
175
|
+
it 'correctly compares against nil' do
|
176
|
+
refute_equal text_html, nil
|
177
|
+
assert_operator text_plain, :<, nil
|
178
|
+
end
|
179
|
+
end
|
180
|
+
|
181
|
+
describe '#ascii?' do
|
182
|
+
it 'defaults to true for text/* types' do
|
183
|
+
assert text_plain.ascii?
|
184
|
+
end
|
185
|
+
|
186
|
+
it 'defaults to false for non-text/* types' do
|
187
|
+
refute image_jpeg.ascii?
|
188
|
+
end
|
189
|
+
end
|
190
|
+
|
191
|
+
describe '#binary?' do
|
192
|
+
it 'defaults to false for text/* types' do
|
193
|
+
refute text_plain.binary?
|
194
|
+
end
|
195
|
+
|
196
|
+
it 'defaults to true for non-text/* types' do
|
197
|
+
assert image_jpeg.binary?
|
198
|
+
end
|
199
|
+
end
|
200
|
+
|
201
|
+
describe '#complete?' do
|
202
|
+
it 'is true when there are extensions' do
|
203
|
+
assert text_x_yaml.complete?
|
204
|
+
end
|
205
|
+
|
206
|
+
it 'is false when there are no extensions' do
|
207
|
+
refute mime_type('text/plain').complete?
|
208
|
+
end
|
209
|
+
end
|
210
|
+
|
211
|
+
describe '#content_type' do
|
212
|
+
it 'preserves the original case' do
|
213
|
+
assert_equal 'text/plain', text_plain.content_type
|
214
|
+
assert_equal 'text/vCard', mime_type('text/vCard').content_type
|
215
|
+
end
|
216
|
+
|
217
|
+
it 'does not remove x- prefixes' do
|
218
|
+
assert_equal 'x-appl/x-zip', x_appl_x_zip.content_type
|
219
|
+
end
|
220
|
+
end
|
221
|
+
|
222
|
+
describe '#default_encoding' do
|
223
|
+
it 'is quoted-printable for text/* types' do
|
224
|
+
assert_equal 'quoted-printable', text_plain.default_encoding
|
225
|
+
end
|
226
|
+
|
227
|
+
it 'is base64 for non-text/* types' do
|
228
|
+
assert_equal 'base64', image_jpeg.default_encoding
|
229
|
+
end
|
230
|
+
end
|
231
|
+
|
232
|
+
describe '#encoding, #encoding=' do
|
233
|
+
it 'returns #default_encoding if not set explicitly' do
|
234
|
+
assert_equal 'quoted-printable', text_plain.encoding
|
235
|
+
assert_equal 'base64', image_jpeg.encoding
|
236
|
+
end
|
237
|
+
|
238
|
+
it 'returns the set value when set' do
|
239
|
+
text_plain.encoding = '8bit'
|
240
|
+
assert_equal '8bit', text_plain.encoding
|
241
|
+
end
|
242
|
+
|
243
|
+
it 'resets to the default encoding when set to nil or :default' do
|
244
|
+
text_plain.encoding = '8bit'
|
245
|
+
text_plain.encoding = nil
|
246
|
+
assert_equal text_plain.default_encoding, text_plain.encoding
|
247
|
+
text_plain.encoding = :default
|
248
|
+
assert_equal text_plain.default_encoding, text_plain.encoding
|
249
|
+
end
|
250
|
+
|
251
|
+
it 'raises a MIME::Type::InvalidEncoding for an invalid encoding' do
|
252
|
+
exception = assert_raises MIME::Type::InvalidEncoding do
|
253
|
+
text_plain.encoding = 'binary'
|
254
|
+
end
|
255
|
+
assert_equal 'Invalid Encoding "binary"', exception.to_s
|
256
|
+
end
|
257
|
+
end
|
258
|
+
|
259
|
+
describe '#eql?' do
|
260
|
+
it 'is not true for a non-MIME::Type' do
|
261
|
+
refute text_plain.eql?('text/plain')
|
262
|
+
end
|
263
|
+
|
264
|
+
it 'is not true for a different MIME::Type' do
|
265
|
+
refute text_plain.eql?(image_jpeg)
|
266
|
+
end
|
267
|
+
|
268
|
+
it 'is true for an equivalent MIME::Type' do
|
269
|
+
assert text_plain, mime_type('text/Plain')
|
270
|
+
end
|
271
|
+
end
|
272
|
+
|
273
|
+
describe '#extensions, #extensions=' do
|
274
|
+
it 'returns an array of extensions' do
|
275
|
+
assert_equal %w(yaml yml), text_x_yaml.extensions
|
276
|
+
assert_equal %w(zip zp), x_appl_x_zip.extensions
|
277
|
+
end
|
278
|
+
|
279
|
+
it 'sets a single extension when provided a single value' do
|
280
|
+
text_x_yaml.extensions = 'yaml'
|
281
|
+
assert_equal %w(yaml), text_x_yaml.extensions
|
282
|
+
end
|
283
|
+
|
284
|
+
it 'deduplicates extensions' do
|
285
|
+
text_x_yaml.extensions = %w(yaml yaml)
|
286
|
+
assert_equal %w(yaml), text_x_yaml.extensions
|
287
|
+
end
|
288
|
+
end
|
289
|
+
|
290
|
+
describe '#add_extensions' do
|
291
|
+
it 'does not modify extensions when provided nil' do
|
292
|
+
text_x_yaml.add_extensions(nil)
|
293
|
+
assert_equal %w(yaml yml), text_x_yaml.extensions
|
294
|
+
end
|
295
|
+
|
296
|
+
it 'remains deduplicated with duplicate values' do
|
297
|
+
text_x_yaml.add_extensions('yaml')
|
298
|
+
assert_equal %w(yaml yml), text_x_yaml.extensions
|
299
|
+
text_x_yaml.add_extensions(%w(yaml yz))
|
300
|
+
assert_equal %w(yaml yml yz), text_x_yaml.extensions
|
301
|
+
end
|
302
|
+
end
|
303
|
+
|
304
|
+
describe '#priority_compare' do
|
305
|
+
def assert_priority_less(left, right)
|
306
|
+
assert_equal(-1, left.priority_compare(right))
|
307
|
+
end
|
308
|
+
|
309
|
+
def assert_priority_same(left, right)
|
310
|
+
assert_equal 0, left.priority_compare(right)
|
311
|
+
end
|
312
|
+
|
313
|
+
def assert_priority_more(left, right)
|
314
|
+
assert_equal 1, left.priority_compare(right)
|
315
|
+
end
|
316
|
+
|
317
|
+
def assert_priority(left, middle, right)
|
318
|
+
assert_priority_less left, right
|
319
|
+
assert_priority_same left, middle
|
320
|
+
assert_priority_more right, left
|
321
|
+
end
|
322
|
+
|
323
|
+
let(:text_1) { mime_type('text/1') }
|
324
|
+
let(:text_1p) { mime_type('text/1') }
|
325
|
+
let(:text_2) { mime_type('text/2') }
|
326
|
+
|
327
|
+
it 'sorts (1) based on the simplified type' do
|
328
|
+
assert_priority text_1, text_1p, text_2
|
329
|
+
end
|
330
|
+
|
331
|
+
it 'sorts (2) based on extensions' do
|
332
|
+
text_1.extensions = ['foo', 'bar']
|
333
|
+
text_2.extensions = ['foo']
|
334
|
+
|
335
|
+
assert_priority_same text_1, text_2
|
336
|
+
|
337
|
+
text_2.registered = true
|
338
|
+
|
339
|
+
assert_priority_more text_1, text_2
|
340
|
+
end
|
341
|
+
|
342
|
+
it 'sorts (3) based on the registration state' do
|
343
|
+
text_1.registered = text_1p.registered = true
|
344
|
+
text_1b = mime_type(text_1) { |t| t.registered = false }
|
345
|
+
|
346
|
+
assert_priority text_1, text_1p, text_1b
|
347
|
+
end
|
348
|
+
|
349
|
+
it 'sorts (4) based on the completeness' do
|
350
|
+
text_1.extensions = text_1p.extensions = '1'
|
351
|
+
text_1b = mime_type(text_1) { |t| t.extensions = nil }
|
352
|
+
|
353
|
+
assert_priority text_1, text_1p, text_1b
|
354
|
+
end
|
355
|
+
|
356
|
+
it 'sorts (5) based on obsolete status' do
|
357
|
+
text_1.obsolete = text_1p.obsolete = false
|
358
|
+
text_1b = mime_type(text_1) { |t| t.obsolete = true }
|
359
|
+
|
360
|
+
assert_priority text_1, text_1p, text_1b
|
361
|
+
end
|
362
|
+
|
363
|
+
it 'sorts (5) based on the use-instead value' do
|
364
|
+
text_1.obsolete = text_1p.obsolete = true
|
365
|
+
text_1.use_instead = text_1p.use_instead = 'abc/xyz'
|
366
|
+
text_1b = mime_type(text_1) { |t| t.use_instead = nil }
|
367
|
+
|
368
|
+
assert_priority text_1, text_1p, text_1b
|
369
|
+
|
370
|
+
text_1b.use_instead = 'abc/zzz'
|
371
|
+
|
372
|
+
assert_priority text_1, text_1p, text_1b
|
373
|
+
end
|
374
|
+
end
|
375
|
+
|
376
|
+
describe '#raw_media_type' do
|
377
|
+
it 'extracts the media type as case-preserved' do
|
378
|
+
assert_equal 'Text', mime_type('Text/plain').raw_media_type
|
379
|
+
end
|
380
|
+
|
381
|
+
it 'does not remove x- prefixes' do
|
382
|
+
assert_equal('x-appl', x_appl_x_zip.raw_media_type)
|
383
|
+
end
|
384
|
+
end
|
385
|
+
|
386
|
+
describe '#media_type' do
|
387
|
+
it 'extracts the media type as lowercase' do
|
388
|
+
assert_equal 'text', text_plain.media_type
|
389
|
+
end
|
390
|
+
|
391
|
+
it 'does not remove x- prefixes' do
|
392
|
+
assert_equal('x-appl', x_appl_x_zip.media_type)
|
393
|
+
end
|
394
|
+
end
|
395
|
+
|
396
|
+
describe '#raw_media_type' do
|
397
|
+
it 'extracts the media type as case-preserved' do
|
398
|
+
assert_equal 'Text', mime_type('Text/plain').raw_media_type
|
399
|
+
end
|
400
|
+
|
401
|
+
it 'does not remove x- prefixes' do
|
402
|
+
assert_equal('x-appl', x_appl_x_zip.raw_media_type)
|
403
|
+
end
|
404
|
+
end
|
405
|
+
|
406
|
+
describe '#sub_type' do
|
407
|
+
it 'extracts the sub type as lowercase' do
|
408
|
+
assert_equal 'plain', text_plain.sub_type
|
409
|
+
end
|
410
|
+
|
411
|
+
it 'does not remove x- prefixes' do
|
412
|
+
assert_equal('x-zip', x_appl_x_zip.sub_type)
|
413
|
+
end
|
414
|
+
end
|
415
|
+
|
416
|
+
describe '#raw_sub_type' do
|
417
|
+
it 'extracts the sub type as case-preserved' do
|
418
|
+
assert_equal 'Plain', mime_type('text/Plain').raw_sub_type
|
419
|
+
end
|
420
|
+
|
421
|
+
it 'does not remove x- prefixes' do
|
422
|
+
assert_equal('x-zip', x_appl_x_zip.raw_sub_type)
|
423
|
+
end
|
424
|
+
end
|
425
|
+
|
426
|
+
describe '#to_h' do
|
427
|
+
let(:t) { mime_type('a/b') }
|
428
|
+
|
429
|
+
it 'has the required keys (content-type, registered, encoding)' do
|
430
|
+
assert_has_keys t.to_h, %w(content-type registered encoding)
|
431
|
+
end
|
432
|
+
|
433
|
+
it 'has the docs key if there are documents' do
|
434
|
+
assert_has_keys mime_type(t) { |v| v.docs = 'a' }.to_h, %w(docs)
|
435
|
+
end
|
436
|
+
|
437
|
+
it 'has the extensions key if set' do
|
438
|
+
assert_has_keys mime_type(t) { |v| v.extensions = 'a' }.to_h,
|
439
|
+
'extensions'
|
440
|
+
end
|
441
|
+
|
442
|
+
it 'has the preferred-extension key if set' do
|
443
|
+
assert_has_keys mime_type(t) { |v| v.preferred_extension = 'a' }.to_h,
|
444
|
+
'preferred-extension'
|
445
|
+
end
|
446
|
+
|
447
|
+
it 'has the obsolete key if set' do
|
448
|
+
assert_has_keys mime_type(t) { |v| v.obsolete = true }.to_h, 'obsolete'
|
449
|
+
end
|
450
|
+
|
451
|
+
it 'has the obsolete and use-instead keys if set' do
|
452
|
+
assert_has_keys mime_type(t) { |v|
|
453
|
+
v.obsolete = true
|
454
|
+
v.use_instead = 'c/d'
|
455
|
+
}.to_h, %w(obsolete use-instead)
|
456
|
+
end
|
457
|
+
|
458
|
+
it 'has the signature key if set' do
|
459
|
+
assert_has_keys mime_type(t) { |v| v.signature = true }.to_h, 'signature'
|
460
|
+
end
|
461
|
+
end
|
462
|
+
|
463
|
+
describe '#to_json' do
|
464
|
+
let(:expected) {
|
465
|
+
'{"content-type":"a/b","encoding":"base64","registered":false}'
|
466
|
+
}
|
467
|
+
|
468
|
+
it 'converts to JSON when requested' do
|
469
|
+
assert_equal expected, mime_type('a/b').to_json
|
470
|
+
end
|
471
|
+
end
|
472
|
+
|
473
|
+
describe '#to_s, #to_str' do
|
474
|
+
it 'represents itself as a string of the canonical content_type' do
|
475
|
+
assert_equal 'text/plain', "#{text_plain}" # rubocop:disable Style/UnneededInterpolation
|
476
|
+
end
|
477
|
+
|
478
|
+
it 'acts like a string of the canonical content_type for comparison' do
|
479
|
+
assert_equal text_plain, 'text/plain'
|
480
|
+
end
|
481
|
+
|
482
|
+
it 'acts like a string for other purposes' do
|
483
|
+
assert_equal 'stringy', 'text/plain'.sub(text_plain, 'stringy')
|
484
|
+
end
|
485
|
+
end
|
486
|
+
|
487
|
+
describe '#xrefs, #xrefs=' do
|
488
|
+
let(:expected) {
|
489
|
+
MIME::Types::Container.new('rfc' => Set['rfc1234', 'rfc5678'])
|
490
|
+
}
|
491
|
+
|
492
|
+
it 'returns the expected results' do
|
493
|
+
application_javascript.xrefs = {
|
494
|
+
'rfc' => %w(rfc5678 rfc1234 rfc1234)
|
495
|
+
}
|
496
|
+
|
497
|
+
assert_equal expected, application_javascript.xrefs
|
498
|
+
end
|
499
|
+
end
|
500
|
+
|
501
|
+
describe '#xref_urls' do
|
502
|
+
let(:expected) {
|
503
|
+
[
|
504
|
+
'http://www.iana.org/go/draft1',
|
505
|
+
'http://www.iana.org/assignments/media-types/a/b',
|
506
|
+
'http://www.iana.org/assignments/media-types/media-types.xhtml#p-1',
|
507
|
+
'http://www.iana.org/go/rfc-1',
|
508
|
+
'http://www.rfc-editor.org/errata_search.php?eid=err-1',
|
509
|
+
'http://example.org',
|
510
|
+
'text'
|
511
|
+
]
|
512
|
+
}
|
513
|
+
|
514
|
+
let(:type) {
|
515
|
+
mime_type('a/b').tap do |t|
|
516
|
+
t.xrefs = {
|
517
|
+
'draft' => ['RFC1'],
|
518
|
+
'template' => ['a/b'],
|
519
|
+
'person' => ['p-1'],
|
520
|
+
'rfc' => ['rfc-1'],
|
521
|
+
'rfc-errata' => ['err-1'],
|
522
|
+
'uri' => ['http://example.org'],
|
523
|
+
'text' => ['text']
|
524
|
+
}
|
525
|
+
end
|
526
|
+
}
|
527
|
+
|
528
|
+
it 'translates according to given rules' do
|
529
|
+
assert_equal expected, type.xref_urls
|
530
|
+
end
|
531
|
+
end
|
532
|
+
|
533
|
+
describe '#use_instead' do
|
534
|
+
it 'is nil unless the type is obsolete' do
|
535
|
+
assert_nil text_plain.use_instead
|
536
|
+
end
|
537
|
+
|
538
|
+
it 'is nil if not set and the type is obsolete' do
|
539
|
+
text_plain.obsolete = true
|
540
|
+
assert_nil text_plain.use_instead
|
541
|
+
end
|
542
|
+
|
543
|
+
it 'is a different type if set and the type is obsolete' do
|
544
|
+
text_plain.obsolete = true
|
545
|
+
text_plain.use_instead = 'text/html'
|
546
|
+
assert_equal 'text/html', text_plain.use_instead
|
547
|
+
end
|
548
|
+
end
|
549
|
+
|
550
|
+
describe '#preferred_extension, #preferred_extension=' do
|
551
|
+
it 'is nil when not set and there are no extensions' do
|
552
|
+
assert_nil text_plain.preferred_extension
|
553
|
+
end
|
554
|
+
|
555
|
+
it 'is the first extension when not set but there are extensions' do
|
556
|
+
assert_equal 'yaml', text_x_yaml.preferred_extension
|
557
|
+
end
|
558
|
+
|
559
|
+
it 'is the extension provided when set' do
|
560
|
+
text_x_yaml.preferred_extension = 'yml'
|
561
|
+
assert_equal 'yml', text_x_yaml.preferred_extension
|
562
|
+
end
|
563
|
+
|
564
|
+
it 'is adds the preferred extension if it does not exist' do
|
565
|
+
text_x_yaml.preferred_extension = 'yz'
|
566
|
+
assert_equal 'yz', text_x_yaml.preferred_extension
|
567
|
+
assert_includes text_x_yaml.extensions, 'yz'
|
568
|
+
end
|
569
|
+
end
|
570
|
+
|
571
|
+
describe '#friendly' do
|
572
|
+
it 'returns English by default' do
|
573
|
+
assert_equal 'YAML Structured Document', text_x_yaml.friendly
|
574
|
+
end
|
575
|
+
|
576
|
+
it 'returns English when requested' do
|
577
|
+
assert_equal 'YAML Structured Document', text_x_yaml.friendly('en')
|
578
|
+
assert_equal 'YAML Structured Document', text_x_yaml.friendly(:en)
|
579
|
+
end
|
580
|
+
|
581
|
+
it 'returns nothing for an unknown language' do
|
582
|
+
assert_nil text_x_yaml.friendly('zz')
|
583
|
+
end
|
584
|
+
|
585
|
+
it 'merges new values from an array parameter' do
|
586
|
+
expected = { 'en' => 'Text files' }
|
587
|
+
assert_equal expected, text_plain.friendly(['en', 'Text files'])
|
588
|
+
expected.update('fr' => 'des fichiers texte')
|
589
|
+
assert_equal expected,
|
590
|
+
text_plain.friendly(['fr', 'des fichiers texte'])
|
591
|
+
end
|
592
|
+
|
593
|
+
it 'merges new values from a hash parameter' do
|
594
|
+
expected = { 'en' => 'Text files' }
|
595
|
+
assert_equal expected, text_plain.friendly(expected)
|
596
|
+
french = { 'fr' => 'des fichiers texte' }
|
597
|
+
expected.update(french)
|
598
|
+
assert_equal expected, text_plain.friendly(french)
|
599
|
+
end
|
600
|
+
|
601
|
+
it 'raises an ArgumentError if an unknown value is provided' do
|
602
|
+
exception = assert_raises ArgumentError do
|
603
|
+
text_plain.friendly(1)
|
604
|
+
end
|
605
|
+
|
606
|
+
assert_equal 'Expected a language or translation set, not 1',
|
607
|
+
exception.message
|
608
|
+
end
|
609
|
+
end
|
610
|
+
end
|