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,128 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class ZipOutputStreamTest < MiniTest::Test
|
4
|
+
include AssertEntry
|
5
|
+
|
6
|
+
TEST_ZIP = TestZipFile::TEST_ZIP2.clone
|
7
|
+
TEST_ZIP.zip_name = 'test/data/generated/output.zip'
|
8
|
+
|
9
|
+
def test_new
|
10
|
+
zos = ::Zip::OutputStream.new(TEST_ZIP.zip_name)
|
11
|
+
zos.comment = TEST_ZIP.comment
|
12
|
+
write_test_zip(zos)
|
13
|
+
zos.close
|
14
|
+
assert_test_zip_contents(TEST_ZIP)
|
15
|
+
end
|
16
|
+
|
17
|
+
def test_open
|
18
|
+
::Zip::OutputStream.open(TEST_ZIP.zip_name) do |zos|
|
19
|
+
zos.comment = TEST_ZIP.comment
|
20
|
+
write_test_zip(zos)
|
21
|
+
end
|
22
|
+
assert_test_zip_contents(TEST_ZIP)
|
23
|
+
end
|
24
|
+
|
25
|
+
def test_write_buffer
|
26
|
+
io = ::StringIO.new('')
|
27
|
+
buffer = ::Zip::OutputStream.write_buffer(io) do |zos|
|
28
|
+
zos.comment = TEST_ZIP.comment
|
29
|
+
write_test_zip(zos)
|
30
|
+
end
|
31
|
+
File.open(TEST_ZIP.zip_name, 'wb') { |f| f.write buffer.string }
|
32
|
+
assert_test_zip_contents(TEST_ZIP)
|
33
|
+
end
|
34
|
+
|
35
|
+
def test_write_buffer_with_temp_file
|
36
|
+
tmp_file = Tempfile.new('')
|
37
|
+
|
38
|
+
::Zip::OutputStream.write_buffer(tmp_file) do |zos|
|
39
|
+
zos.comment = TEST_ZIP.comment
|
40
|
+
write_test_zip(zos)
|
41
|
+
end
|
42
|
+
|
43
|
+
tmp_file.rewind
|
44
|
+
File.open(TEST_ZIP.zip_name, 'wb') { |f| f.write(tmp_file.read) }
|
45
|
+
tmp_file.unlink
|
46
|
+
|
47
|
+
assert_test_zip_contents(TEST_ZIP)
|
48
|
+
end
|
49
|
+
|
50
|
+
def test_writing_to_closed_stream
|
51
|
+
assert_i_o_error_in_closed_stream { |zos| zos << 'hello world' }
|
52
|
+
assert_i_o_error_in_closed_stream { |zos| zos.puts 'hello world' }
|
53
|
+
assert_i_o_error_in_closed_stream { |zos| zos.write 'hello world' }
|
54
|
+
end
|
55
|
+
|
56
|
+
def test_cannot_open_file
|
57
|
+
name = TestFiles::EMPTY_TEST_DIR
|
58
|
+
begin
|
59
|
+
::Zip::OutputStream.open(name)
|
60
|
+
rescue Exception
|
61
|
+
assert($!.kind_of?(Errno::EISDIR) || # Linux
|
62
|
+
$!.kind_of?(Errno::EEXIST) || # Windows/cygwin
|
63
|
+
$!.kind_of?(Errno::EACCES), # Windows
|
64
|
+
"Expected Errno::EISDIR (or on win/cygwin: Errno::EEXIST), but was: #{$!.class}")
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
def test_put_next_entry
|
69
|
+
stored_text = 'hello world in stored text'
|
70
|
+
entry_name = 'file1'
|
71
|
+
comment = 'my comment'
|
72
|
+
::Zip::OutputStream.open(TEST_ZIP.zip_name) do |zos|
|
73
|
+
zos.put_next_entry(entry_name, comment, nil, ::Zip::Entry::STORED)
|
74
|
+
zos << stored_text
|
75
|
+
end
|
76
|
+
|
77
|
+
assert(File.read(TEST_ZIP.zip_name)[stored_text])
|
78
|
+
::Zip::File.open(TEST_ZIP.zip_name) do |zf|
|
79
|
+
assert_equal(stored_text, zf.read(entry_name))
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
def test_put_next_entry_using_zip_entry_creates_entries_with_correct_timestamps
|
84
|
+
file = ::File.open('test/data/file2.txt', 'rb')
|
85
|
+
::Zip::OutputStream.open(TEST_ZIP.zip_name) do |zos|
|
86
|
+
zip_entry = ::Zip::Entry.new(zos, file.path, '', '', 0, 0, ::Zip::Entry::DEFLATED, 0, ::Zip::DOSTime.at(file.mtime))
|
87
|
+
zos.put_next_entry(zip_entry)
|
88
|
+
zos << file.read
|
89
|
+
end
|
90
|
+
|
91
|
+
::Zip::InputStream.open(TEST_ZIP.zip_name) do |io|
|
92
|
+
while (entry = io.get_next_entry)
|
93
|
+
assert(::Zip::DOSTime.at(file.mtime).dos_equals(::Zip::DOSTime.at(entry.mtime))) # Compare DOS Times, since they are stored with two seconds accuracy
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
def test_chained_put_into_next_entry
|
99
|
+
stored_text = 'hello world in stored text'
|
100
|
+
stored_text2 = 'with chain'
|
101
|
+
entry_name = 'file1'
|
102
|
+
comment = 'my comment'
|
103
|
+
::Zip::OutputStream.open(TEST_ZIP.zip_name) do |zos|
|
104
|
+
zos.put_next_entry(entry_name, comment, nil, ::Zip::Entry::STORED)
|
105
|
+
zos << stored_text << stored_text2
|
106
|
+
end
|
107
|
+
|
108
|
+
assert(File.read(TEST_ZIP.zip_name)[stored_text])
|
109
|
+
::Zip::File.open(TEST_ZIP.zip_name) do |zf|
|
110
|
+
assert_equal(stored_text + stored_text2, zf.read(entry_name))
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
114
|
+
def assert_i_o_error_in_closed_stream
|
115
|
+
assert_raises(IOError) do
|
116
|
+
zos = ::Zip::OutputStream.new('test/data/generated/test_putOnClosedStream.zip')
|
117
|
+
zos.close
|
118
|
+
yield zos
|
119
|
+
end
|
120
|
+
end
|
121
|
+
|
122
|
+
def write_test_zip(zos)
|
123
|
+
TEST_ZIP.entry_names.each do |entryName|
|
124
|
+
zos.put_next_entry(entryName)
|
125
|
+
File.open(entryName, 'rb') { |f| zos.write(f.read) }
|
126
|
+
end
|
127
|
+
end
|
128
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class PassThruCompressorTest < MiniTest::Test
|
4
|
+
include CrcTest
|
5
|
+
|
6
|
+
def test_size
|
7
|
+
File.open('test/data/generated/dummy.txt', 'wb') do |file|
|
8
|
+
compressor = ::Zip::PassThruCompressor.new(file)
|
9
|
+
|
10
|
+
assert_equal(0, compressor.size)
|
11
|
+
|
12
|
+
t1 = 'hello world'
|
13
|
+
t2 = ''
|
14
|
+
t3 = 'bingo'
|
15
|
+
|
16
|
+
compressor << t1
|
17
|
+
assert_equal(compressor.size, t1.size)
|
18
|
+
|
19
|
+
compressor << t2
|
20
|
+
assert_equal(compressor.size, t1.size + t2.size)
|
21
|
+
|
22
|
+
compressor << t3
|
23
|
+
assert_equal(compressor.size, t1.size + t2.size + t3.size)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
def test_crc
|
28
|
+
run_crc_test(::Zip::PassThruCompressor)
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
class PassThruDecompressorTest < MiniTest::Test
|
3
|
+
include DecompressorTests
|
4
|
+
|
5
|
+
def setup
|
6
|
+
super
|
7
|
+
@file = File.new(TEST_FILE)
|
8
|
+
@decompressor = ::Zip::PassThruDecompressor.new(@file, File.size(TEST_FILE))
|
9
|
+
end
|
10
|
+
|
11
|
+
def teardown
|
12
|
+
@file.close
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,141 @@
|
|
1
|
+
class PathTraversalTest < MiniTest::Test
|
2
|
+
TEST_FILE_ROOT = File.absolute_path('test/data/path_traversal')
|
3
|
+
|
4
|
+
def setup
|
5
|
+
# With apologies to anyone using these files... but they are the files in
|
6
|
+
# the sample zips, so we don't have much choice here.
|
7
|
+
FileUtils.rm_f '/tmp/moo'
|
8
|
+
FileUtils.rm_f '/tmp/file.txt'
|
9
|
+
end
|
10
|
+
|
11
|
+
def extract_path_traversal_zip(name)
|
12
|
+
Zip::File.open(File.join(TEST_FILE_ROOT, name)) do |zip_file|
|
13
|
+
zip_file.each do |entry|
|
14
|
+
entry.extract
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
def in_tmpdir
|
20
|
+
Dir.mktmpdir do |tmp|
|
21
|
+
test_path = File.join(tmp, 'test')
|
22
|
+
Dir.mkdir test_path
|
23
|
+
Dir.chdir test_path do
|
24
|
+
yield test_path
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
def test_leading_slash
|
30
|
+
in_tmpdir do
|
31
|
+
extract_path_traversal_zip 'jwilk/absolute1.zip'
|
32
|
+
refute File.exist?('/tmp/moo')
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
def test_multiple_leading_slashes
|
37
|
+
in_tmpdir do
|
38
|
+
extract_path_traversal_zip 'jwilk/absolute2.zip'
|
39
|
+
refute File.exist?('/tmp/moo')
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
def test_leading_dot_dot
|
44
|
+
in_tmpdir do
|
45
|
+
extract_path_traversal_zip 'jwilk/relative0.zip'
|
46
|
+
refute File.exist?('../moo')
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
def test_non_leading_dot_dot_with_existing_folder
|
51
|
+
in_tmpdir do
|
52
|
+
extract_path_traversal_zip 'relative1.zip'
|
53
|
+
assert Dir.exist?('tmp')
|
54
|
+
refute File.exist?('../moo')
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
def test_non_leading_dot_dot_without_existing_folder
|
59
|
+
in_tmpdir do
|
60
|
+
extract_path_traversal_zip 'jwilk/relative2.zip'
|
61
|
+
refute File.exist?('../moo')
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
def test_file_symlink
|
66
|
+
in_tmpdir do
|
67
|
+
extract_path_traversal_zip 'jwilk/symlink.zip'
|
68
|
+
assert File.exist?('moo')
|
69
|
+
refute File.exist?('/tmp/moo')
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
def test_directory_symlink
|
74
|
+
in_tmpdir do
|
75
|
+
# Can't create tmp/moo, because the tmp symlink is skipped.
|
76
|
+
assert_raises Errno::ENOENT do
|
77
|
+
extract_path_traversal_zip 'jwilk/dirsymlink.zip'
|
78
|
+
end
|
79
|
+
refute File.exist?('/tmp/moo')
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
def test_two_directory_symlinks_a
|
84
|
+
in_tmpdir do
|
85
|
+
# Can't create par/moo because the symlinks are skipped.
|
86
|
+
assert_raises Errno::ENOENT do
|
87
|
+
extract_path_traversal_zip 'jwilk/dirsymlink2a.zip'
|
88
|
+
end
|
89
|
+
refute File.exist?('cur')
|
90
|
+
refute File.exist?('par')
|
91
|
+
refute File.exist?('par/moo')
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
95
|
+
def test_two_directory_symlinks_b
|
96
|
+
in_tmpdir do
|
97
|
+
# Can't create par/moo, because the symlinks are skipped.
|
98
|
+
assert_raises Errno::ENOENT do
|
99
|
+
extract_path_traversal_zip 'jwilk/dirsymlink2b.zip'
|
100
|
+
end
|
101
|
+
refute File.exist?('cur')
|
102
|
+
refute File.exist?('../moo')
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
106
|
+
def test_entry_name_with_absolute_path_does_not_extract
|
107
|
+
in_tmpdir do
|
108
|
+
extract_path_traversal_zip 'tuzovakaoff/absolutepath.zip'
|
109
|
+
refute File.exist?('/tmp/file.txt')
|
110
|
+
end
|
111
|
+
end
|
112
|
+
|
113
|
+
def test_entry_name_with_absolute_path_extract_when_given_different_path
|
114
|
+
in_tmpdir do |test_path|
|
115
|
+
zip_path = File.join(TEST_FILE_ROOT, 'tuzovakaoff/absolutepath.zip')
|
116
|
+
Zip::File.open(zip_path) do |zip_file|
|
117
|
+
zip_file.each do |entry|
|
118
|
+
entry.extract(File.join(test_path, entry.name))
|
119
|
+
end
|
120
|
+
end
|
121
|
+
refute File.exist?('/tmp/file.txt')
|
122
|
+
end
|
123
|
+
end
|
124
|
+
|
125
|
+
def test_entry_name_with_relative_symlink
|
126
|
+
in_tmpdir do
|
127
|
+
# Doesn't create the symlink path, so can't create path/file.txt.
|
128
|
+
assert_raises Errno::ENOENT do
|
129
|
+
extract_path_traversal_zip 'tuzovakaoff/symlink.zip'
|
130
|
+
end
|
131
|
+
refute File.exist?('/tmp/file.txt')
|
132
|
+
end
|
133
|
+
end
|
134
|
+
|
135
|
+
def test_entry_name_with_tilde
|
136
|
+
in_tmpdir do
|
137
|
+
extract_path_traversal_zip 'tilde.zip'
|
138
|
+
assert File.exist?('~tilde~')
|
139
|
+
end
|
140
|
+
end
|
141
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
require 'fileutils'
|
3
|
+
require_relative '../../samples/example_recursive'
|
4
|
+
|
5
|
+
class ExampleRecursiveTest < MiniTest::Test
|
6
|
+
DIRECTORY_TO_ZIP = 'test/data/globTest'
|
7
|
+
OUTPUT_DIRECTORY = 'test/data/example_recursive.zip'
|
8
|
+
TEMP_DIRECTORY = 'test/data/tmp'
|
9
|
+
|
10
|
+
def setup
|
11
|
+
@generator = ::ZipFileGenerator.new(DIRECTORY_TO_ZIP, OUTPUT_DIRECTORY)
|
12
|
+
end
|
13
|
+
|
14
|
+
def teardown
|
15
|
+
FileUtils.rm_rf TEMP_DIRECTORY
|
16
|
+
FileUtils.rm_f OUTPUT_DIRECTORY
|
17
|
+
end
|
18
|
+
|
19
|
+
def test_write
|
20
|
+
@generator.write
|
21
|
+
unzip
|
22
|
+
assert_equal Dir.entries(DIRECTORY_TO_ZIP).sort, Dir.entries(TEMP_DIRECTORY).sort
|
23
|
+
end
|
24
|
+
|
25
|
+
private
|
26
|
+
|
27
|
+
def unzip(file = OUTPUT_DIRECTORY)
|
28
|
+
Zip::File.open(file) do |zip_file|
|
29
|
+
zip_file.each do |f|
|
30
|
+
file_path = File.join(TEMP_DIRECTORY, f.name)
|
31
|
+
FileUtils.mkdir_p(File.dirname(file_path))
|
32
|
+
|
33
|
+
zip_file.extract(f, file_path) unless File.exist?(file_path)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,95 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class ZipSettingsTest < MiniTest::Test
|
4
|
+
# TODO: Refactor out into common test module
|
5
|
+
include CommonZipFileFixture
|
6
|
+
|
7
|
+
TEST_OUT_NAME = 'test/data/generated/emptyOutDir'
|
8
|
+
|
9
|
+
def setup
|
10
|
+
super
|
11
|
+
|
12
|
+
Dir.rmdir(TEST_OUT_NAME) if File.directory? TEST_OUT_NAME
|
13
|
+
File.delete(TEST_OUT_NAME) if File.exist? TEST_OUT_NAME
|
14
|
+
end
|
15
|
+
|
16
|
+
def teardown
|
17
|
+
::Zip.reset!
|
18
|
+
end
|
19
|
+
|
20
|
+
def open_zip(&aProc)
|
21
|
+
assert(!aProc.nil?)
|
22
|
+
::Zip::File.open(TestZipFile::TEST_ZIP4.zip_name, &aProc)
|
23
|
+
end
|
24
|
+
|
25
|
+
def extract_test_dir(&aProc)
|
26
|
+
open_zip do |zf|
|
27
|
+
zf.extract(TestFiles::EMPTY_TEST_DIR, TEST_OUT_NAME, &aProc)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
def test_true_on_exists_proc
|
32
|
+
Zip.on_exists_proc = true
|
33
|
+
File.open(TEST_OUT_NAME, 'w') { |f| f.puts 'something' }
|
34
|
+
extract_test_dir
|
35
|
+
assert(File.directory?(TEST_OUT_NAME))
|
36
|
+
end
|
37
|
+
|
38
|
+
def test_false_on_exists_proc
|
39
|
+
Zip.on_exists_proc = false
|
40
|
+
File.open(TEST_OUT_NAME, 'w') { |f| f.puts 'something' }
|
41
|
+
assert_raises(Zip::DestinationFileExistsError) { extract_test_dir }
|
42
|
+
end
|
43
|
+
|
44
|
+
def test_false_continue_on_exists_proc
|
45
|
+
Zip.continue_on_exists_proc = false
|
46
|
+
|
47
|
+
assert_raises(::Zip::EntryExistsError) do
|
48
|
+
::Zip::File.open(TEST_ZIP.zip_name) do |zf|
|
49
|
+
zf.add(zf.entries.first.name, 'test/data/file2.txt')
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
def test_true_continue_on_exists_proc
|
55
|
+
Zip.continue_on_exists_proc = true
|
56
|
+
|
57
|
+
replacedEntry = nil
|
58
|
+
|
59
|
+
::Zip::File.open(TEST_ZIP.zip_name) do |zf|
|
60
|
+
replacedEntry = zf.entries.first.name
|
61
|
+
zf.add(replacedEntry, 'test/data/file2.txt')
|
62
|
+
end
|
63
|
+
|
64
|
+
::Zip::File.open(TEST_ZIP.zip_name) do |zf|
|
65
|
+
assert_contains(zf, replacedEntry, 'test/data/file2.txt')
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
def test_false_warn_invalid_date
|
70
|
+
test_file = File.join(File.dirname(__FILE__), 'data', 'WarnInvalidDate.zip')
|
71
|
+
Zip.warn_invalid_date = false
|
72
|
+
|
73
|
+
assert_output('', '') do
|
74
|
+
::Zip::File.open(test_file) do |_zf|
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
def test_true_warn_invalid_date
|
80
|
+
test_file = File.join(File.dirname(__FILE__), 'data', 'WarnInvalidDate.zip')
|
81
|
+
Zip.warn_invalid_date = true
|
82
|
+
|
83
|
+
assert_output('', /Invalid date\/time in zip entry/) do
|
84
|
+
::Zip::File.open(test_file) do |_zf|
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
private
|
90
|
+
|
91
|
+
def assert_contains(zf, entryName, filename = entryName)
|
92
|
+
assert(zf.entries.detect { |e| e.name == entryName } != nil, "entry #{entryName} not in #{zf.entries.join(', ')} in zip file #{zf}")
|
93
|
+
assert_entry_contents(zf, entryName, filename) if File.exist?(filename)
|
94
|
+
end
|
95
|
+
end
|
@@ -0,0 +1,234 @@
|
|
1
|
+
require 'simplecov'
|
2
|
+
require 'minitest/autorun'
|
3
|
+
require 'minitest/unit'
|
4
|
+
require 'fileutils'
|
5
|
+
require 'digest/sha1'
|
6
|
+
require 'zip'
|
7
|
+
require 'gentestfiles'
|
8
|
+
|
9
|
+
TestFiles.create_test_files
|
10
|
+
TestZipFile.create_test_zips
|
11
|
+
|
12
|
+
if defined? JRUBY_VERSION
|
13
|
+
require 'jruby'
|
14
|
+
JRuby.objectspace = true
|
15
|
+
end
|
16
|
+
|
17
|
+
::MiniTest.after_run do
|
18
|
+
FileUtils.rm_rf('test/data/generated')
|
19
|
+
end
|
20
|
+
|
21
|
+
module IOizeString
|
22
|
+
attr_reader :tell
|
23
|
+
|
24
|
+
def read(count = nil)
|
25
|
+
@tell ||= 0
|
26
|
+
count = size unless count
|
27
|
+
retVal = slice(@tell, count)
|
28
|
+
@tell += count
|
29
|
+
retVal
|
30
|
+
end
|
31
|
+
|
32
|
+
def seek(index, offset)
|
33
|
+
@tell ||= 0
|
34
|
+
case offset
|
35
|
+
when IO::SEEK_END
|
36
|
+
newPos = size + index
|
37
|
+
when IO::SEEK_SET
|
38
|
+
newPos = index
|
39
|
+
when IO::SEEK_CUR
|
40
|
+
newPos = @tell + index
|
41
|
+
else
|
42
|
+
raise 'Error in test method IOizeString::seek'
|
43
|
+
end
|
44
|
+
if newPos < 0 || newPos >= size
|
45
|
+
raise Errno::EINVAL
|
46
|
+
else
|
47
|
+
@tell = newPos
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
def reset
|
52
|
+
@tell = 0
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
module DecompressorTests
|
57
|
+
# expects @refText, @refLines and @decompressor
|
58
|
+
|
59
|
+
TEST_FILE = 'test/data/file1.txt'
|
60
|
+
|
61
|
+
def setup
|
62
|
+
@refText = ''
|
63
|
+
File.open(TEST_FILE) { |f| @refText = f.read }
|
64
|
+
@refLines = @refText.split($/)
|
65
|
+
end
|
66
|
+
|
67
|
+
def test_read_everything
|
68
|
+
assert_equal(@refText, @decompressor.sysread)
|
69
|
+
end
|
70
|
+
|
71
|
+
def test_read_in_chunks
|
72
|
+
chunkSize = 5
|
73
|
+
while (decompressedChunk = @decompressor.sysread(chunkSize))
|
74
|
+
assert_equal(@refText.slice!(0, chunkSize), decompressedChunk)
|
75
|
+
end
|
76
|
+
assert_equal(0, @refText.size)
|
77
|
+
end
|
78
|
+
|
79
|
+
def test_mixing_reads_and_produce_input
|
80
|
+
# Just some preconditions to make sure we have enough data for this test
|
81
|
+
assert(@refText.length > 1000)
|
82
|
+
assert(@refLines.length > 40)
|
83
|
+
|
84
|
+
assert_equal(@refText[0...100], @decompressor.sysread(100))
|
85
|
+
|
86
|
+
assert(!@decompressor.input_finished?)
|
87
|
+
buf = @decompressor.produce_input
|
88
|
+
assert_equal(@refText[100...(100 + buf.length)], buf)
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
92
|
+
module AssertEntry
|
93
|
+
def assert_next_entry(filename, zis)
|
94
|
+
assert_entry(filename, zis, zis.get_next_entry.name)
|
95
|
+
end
|
96
|
+
|
97
|
+
def assert_entry(filename, zis, entryName)
|
98
|
+
assert_equal(filename, entryName)
|
99
|
+
assert_entry_contents_for_stream(filename, zis, entryName)
|
100
|
+
end
|
101
|
+
|
102
|
+
def assert_entry_contents_for_stream(filename, zis, entryName)
|
103
|
+
File.open(filename, 'rb') do |file|
|
104
|
+
expected = file.read
|
105
|
+
actual = zis.read
|
106
|
+
if expected != actual
|
107
|
+
if (expected && actual) && (expected.length > 400 || actual.length > 400)
|
108
|
+
zipEntryFilename = entryName + '.zipEntry'
|
109
|
+
File.open(zipEntryFilename, 'wb') { |entryfile| entryfile << actual }
|
110
|
+
fail("File '#{filename}' is different from '#{zipEntryFilename}'")
|
111
|
+
else
|
112
|
+
assert_equal(expected, actual)
|
113
|
+
end
|
114
|
+
end
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
118
|
+
def self.assert_contents(filename, aString)
|
119
|
+
fileContents = ''
|
120
|
+
File.open(filename, 'rb') { |f| fileContents = f.read }
|
121
|
+
if fileContents != aString
|
122
|
+
if fileContents.length > 400 || aString.length > 400
|
123
|
+
stringFile = filename + '.other'
|
124
|
+
File.open(stringFile, 'wb') { |f| f << aString }
|
125
|
+
fail("File '#{filename}' is different from contents of string stored in '#{stringFile}'")
|
126
|
+
else
|
127
|
+
assert_equal(fileContents, aString)
|
128
|
+
end
|
129
|
+
end
|
130
|
+
end
|
131
|
+
|
132
|
+
def assert_stream_contents(zis, testZipFile)
|
133
|
+
assert(!zis.nil?)
|
134
|
+
testZipFile.entry_names.each do |entryName|
|
135
|
+
assert_next_entry(entryName, zis)
|
136
|
+
end
|
137
|
+
assert_nil(zis.get_next_entry)
|
138
|
+
end
|
139
|
+
|
140
|
+
def assert_test_zip_contents(testZipFile)
|
141
|
+
::Zip::InputStream.open(testZipFile.zip_name) do |zis|
|
142
|
+
assert_stream_contents(zis, testZipFile)
|
143
|
+
end
|
144
|
+
end
|
145
|
+
|
146
|
+
def assert_entry_contents(zipFile, entryName, filename = entryName.to_s)
|
147
|
+
zis = zipFile.get_input_stream(entryName)
|
148
|
+
assert_entry_contents_for_stream(filename, zis, entryName)
|
149
|
+
ensure
|
150
|
+
zis.close if zis
|
151
|
+
end
|
152
|
+
end
|
153
|
+
|
154
|
+
module CrcTest
|
155
|
+
class TestOutputStream
|
156
|
+
include ::Zip::IOExtras::AbstractOutputStream
|
157
|
+
|
158
|
+
attr_accessor :buffer
|
159
|
+
|
160
|
+
def initialize
|
161
|
+
@buffer = ''
|
162
|
+
end
|
163
|
+
|
164
|
+
def <<(data)
|
165
|
+
@buffer << data
|
166
|
+
self
|
167
|
+
end
|
168
|
+
end
|
169
|
+
|
170
|
+
def run_crc_test(compressorClass)
|
171
|
+
str = "Here's a nice little text to compute the crc for! Ho hum, it is nice nice nice nice indeed."
|
172
|
+
fakeOut = TestOutputStream.new
|
173
|
+
|
174
|
+
deflater = compressorClass.new(fakeOut)
|
175
|
+
deflater << str
|
176
|
+
assert_equal(0x919920fc, deflater.crc)
|
177
|
+
end
|
178
|
+
end
|
179
|
+
|
180
|
+
module Enumerable
|
181
|
+
def compare_enumerables(otherEnumerable)
|
182
|
+
otherAsArray = otherEnumerable.to_a
|
183
|
+
each_with_index do |element, index|
|
184
|
+
return false unless yield(element, otherAsArray[index])
|
185
|
+
end
|
186
|
+
size == otherAsArray.size
|
187
|
+
end
|
188
|
+
end
|
189
|
+
|
190
|
+
module CommonZipFileFixture
|
191
|
+
include AssertEntry
|
192
|
+
|
193
|
+
EMPTY_FILENAME = 'emptyZipFile.zip'
|
194
|
+
|
195
|
+
TEST_ZIP = TestZipFile::TEST_ZIP2.clone
|
196
|
+
TEST_ZIP.zip_name = 'test/data/generated/5entry_copy.zip'
|
197
|
+
|
198
|
+
def setup
|
199
|
+
File.delete(EMPTY_FILENAME) if File.exist?(EMPTY_FILENAME)
|
200
|
+
FileUtils.cp(TestZipFile::TEST_ZIP2.zip_name, TEST_ZIP.zip_name)
|
201
|
+
end
|
202
|
+
end
|
203
|
+
|
204
|
+
module ExtraAssertions
|
205
|
+
def assert_forwarded(anObject, method, retVal, *expectedArgs)
|
206
|
+
callArgs = nil
|
207
|
+
setCallArgsProc = proc { |args| callArgs = args }
|
208
|
+
anObject.instance_eval <<-"end_eval"
|
209
|
+
alias #{method}_org #{method}
|
210
|
+
def #{method}(*args)
|
211
|
+
ObjectSpace._id2ref(#{setCallArgsProc.object_id}).call(args)
|
212
|
+
ObjectSpace._id2ref(#{retVal.object_id})
|
213
|
+
end
|
214
|
+
end_eval
|
215
|
+
|
216
|
+
assert_equal(retVal, yield) # Invoke test
|
217
|
+
assert_equal(expectedArgs, callArgs)
|
218
|
+
ensure
|
219
|
+
anObject.instance_eval "undef #{method}; alias #{method} #{method}_org"
|
220
|
+
end
|
221
|
+
end
|
222
|
+
|
223
|
+
module ZipEntryData
|
224
|
+
TEST_ZIPFILE = 'someZipFile.zip'
|
225
|
+
TEST_COMMENT = 'a comment'
|
226
|
+
TEST_COMPRESSED_SIZE = 1234
|
227
|
+
TEST_CRC = 325_324
|
228
|
+
TEST_EXTRA = 'Some data here'
|
229
|
+
TEST_COMPRESSIONMETHOD = ::Zip::Entry::DEFLATED
|
230
|
+
TEST_NAME = 'entry name'
|
231
|
+
TEST_SIZE = 8432
|
232
|
+
TEST_ISDIRECTORY = false
|
233
|
+
TEST_TIME = Time.now
|
234
|
+
end
|