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,587 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
##
|
4
|
+
module MIME
|
5
|
+
end
|
6
|
+
|
7
|
+
# The definition of one MIME content-type.
|
8
|
+
#
|
9
|
+
# == Usage
|
10
|
+
# require 'mime/types'
|
11
|
+
#
|
12
|
+
# plaintext = MIME::Types['text/plain'].first
|
13
|
+
# # returns [text/plain, text/plain]
|
14
|
+
# text = plaintext.first
|
15
|
+
# print text.media_type # => 'text'
|
16
|
+
# print text.sub_type # => 'plain'
|
17
|
+
#
|
18
|
+
# puts text.extensions.join(" ") # => 'asc txt c cc h hh cpp'
|
19
|
+
#
|
20
|
+
# puts text.encoding # => 8bit
|
21
|
+
# puts text.binary? # => false
|
22
|
+
# puts text.ascii? # => true
|
23
|
+
# puts text == 'text/plain' # => true
|
24
|
+
# puts MIME::Type.simplified('x-appl/x-zip') # => 'appl/zip'
|
25
|
+
#
|
26
|
+
# puts MIME::Types.any? { |type|
|
27
|
+
# type.content_type == 'text/plain'
|
28
|
+
# } # => true
|
29
|
+
# puts MIME::Types.all?(&:registered?)
|
30
|
+
# # => false
|
31
|
+
class MIME::Type
|
32
|
+
# Reflects a MIME content-type specification that is not correctly
|
33
|
+
# formatted (it isn't +type+/+subtype+).
|
34
|
+
class InvalidContentType < ArgumentError
|
35
|
+
# :stopdoc:
|
36
|
+
def initialize(type_string)
|
37
|
+
@type_string = type_string
|
38
|
+
end
|
39
|
+
|
40
|
+
def to_s
|
41
|
+
"Invalid Content-Type #{@type_string.inspect}"
|
42
|
+
end
|
43
|
+
# :startdoc:
|
44
|
+
end
|
45
|
+
|
46
|
+
# Reflects an unsupported MIME encoding.
|
47
|
+
class InvalidEncoding < ArgumentError
|
48
|
+
# :stopdoc:
|
49
|
+
def initialize(encoding)
|
50
|
+
@encoding = encoding
|
51
|
+
end
|
52
|
+
|
53
|
+
def to_s
|
54
|
+
"Invalid Encoding #{@encoding.inspect}"
|
55
|
+
end
|
56
|
+
# :startdoc:
|
57
|
+
end
|
58
|
+
|
59
|
+
# The released version of the mime-types library.
|
60
|
+
VERSION = '3.3'
|
61
|
+
|
62
|
+
include Comparable
|
63
|
+
|
64
|
+
# :stopdoc:
|
65
|
+
# TODO verify mime-type character restrictions; I am pretty sure that this is
|
66
|
+
# too wide open.
|
67
|
+
MEDIA_TYPE_RE = %r{([-\w.+]+)/([-\w.+]*)}.freeze
|
68
|
+
I18N_RE = /[^[:alnum:]]/.freeze
|
69
|
+
BINARY_ENCODINGS = %w(base64 8bit).freeze
|
70
|
+
ASCII_ENCODINGS = %w(7bit quoted-printable).freeze
|
71
|
+
# :startdoc:
|
72
|
+
|
73
|
+
private_constant :MEDIA_TYPE_RE, :I18N_RE, :BINARY_ENCODINGS,
|
74
|
+
:ASCII_ENCODINGS
|
75
|
+
|
76
|
+
# Builds a MIME::Type object from the +content_type+, a MIME Content Type
|
77
|
+
# value (e.g., 'text/plain' or 'applicaton/x-eruby'). The constructed object
|
78
|
+
# is yielded to an optional block for additional configuration, such as
|
79
|
+
# associating extensions and encoding information.
|
80
|
+
#
|
81
|
+
# * When provided a Hash or a MIME::Type, the MIME::Type will be
|
82
|
+
# constructed with #init_with.
|
83
|
+
# * When provided an Array, the MIME::Type will be constructed using
|
84
|
+
# the first element as the content type and the remaining flattened
|
85
|
+
# elements as extensions.
|
86
|
+
# * Otherwise, the content_type will be used as a string.
|
87
|
+
#
|
88
|
+
# Yields the newly constructed +self+ object.
|
89
|
+
def initialize(content_type) # :yields self:
|
90
|
+
@friendly = {}
|
91
|
+
@obsolete = @registered = false
|
92
|
+
@preferred_extension = @docs = @use_instead = nil
|
93
|
+
self.extensions = []
|
94
|
+
|
95
|
+
case content_type
|
96
|
+
when Hash
|
97
|
+
init_with(content_type)
|
98
|
+
when Array
|
99
|
+
self.content_type = content_type.shift
|
100
|
+
self.extensions = content_type.flatten
|
101
|
+
when MIME::Type
|
102
|
+
init_with(content_type.to_h)
|
103
|
+
else
|
104
|
+
self.content_type = content_type
|
105
|
+
end
|
106
|
+
|
107
|
+
self.encoding ||= :default
|
108
|
+
self.xrefs ||= {}
|
109
|
+
|
110
|
+
yield self if block_given?
|
111
|
+
end
|
112
|
+
|
113
|
+
# Indicates that a MIME type is like another type. This differs from
|
114
|
+
# <tt>==</tt> because <tt>x-</tt> prefixes are removed for this comparison.
|
115
|
+
def like?(other)
|
116
|
+
other = if other.respond_to?(:simplified)
|
117
|
+
MIME::Type.simplified(other.simplified, remove_x_prefix: true)
|
118
|
+
else
|
119
|
+
MIME::Type.simplified(other.to_s, remove_x_prefix: true)
|
120
|
+
end
|
121
|
+
MIME::Type.simplified(simplified, remove_x_prefix: true) == other
|
122
|
+
end
|
123
|
+
|
124
|
+
# Compares the +other+ MIME::Type against the exact content type or the
|
125
|
+
# simplified type (the simplified type will be used if comparing against
|
126
|
+
# something that can be treated as a String with #to_s). In comparisons, this
|
127
|
+
# is done against the lowercase version of the MIME::Type.
|
128
|
+
def <=>(other)
|
129
|
+
if other.nil?
|
130
|
+
-1
|
131
|
+
elsif other.respond_to?(:simplified)
|
132
|
+
simplified <=> other.simplified
|
133
|
+
else
|
134
|
+
filtered = 'silent' if other == :silent
|
135
|
+
filtered ||= 'true' if other == true
|
136
|
+
filtered ||= other.to_s
|
137
|
+
|
138
|
+
simplified <=> MIME::Type.simplified(filtered)
|
139
|
+
end
|
140
|
+
end
|
141
|
+
|
142
|
+
# Compares the +other+ MIME::Type based on how reliable it is before doing a
|
143
|
+
# normal <=> comparison. Used by MIME::Types#[] to sort types. The
|
144
|
+
# comparisons involved are:
|
145
|
+
#
|
146
|
+
# 1. self.simplified <=> other.simplified (ensures that we
|
147
|
+
# don't try to compare different types)
|
148
|
+
# 2. IANA-registered definitions < other definitions.
|
149
|
+
# 3. Complete definitions < incomplete definitions.
|
150
|
+
# 4. Current definitions < obsolete definitions.
|
151
|
+
# 5. Obselete with use-instead names < obsolete without.
|
152
|
+
# 6. Obsolete use-instead definitions are compared.
|
153
|
+
#
|
154
|
+
# While this method is public, its use is strongly discouraged by consumers
|
155
|
+
# of mime-types. In mime-types 3, this method is likely to see substantial
|
156
|
+
# revision and simplification to ensure current registered content types sort
|
157
|
+
# before unregistered or obsolete content types.
|
158
|
+
def priority_compare(other)
|
159
|
+
pc = simplified <=> other.simplified
|
160
|
+
if pc.zero? || !(extensions & other.extensions).empty?
|
161
|
+
pc = if (reg = registered?) != other.registered?
|
162
|
+
reg ? -1 : 1 # registered < unregistered
|
163
|
+
elsif (comp = complete?) != other.complete?
|
164
|
+
comp ? -1 : 1 # complete < incomplete
|
165
|
+
elsif (obs = obsolete?) != other.obsolete?
|
166
|
+
obs ? 1 : -1 # current < obsolete
|
167
|
+
elsif obs and ((ui = use_instead) != (oui = other.use_instead))
|
168
|
+
if ui.nil?
|
169
|
+
1
|
170
|
+
elsif oui.nil?
|
171
|
+
-1
|
172
|
+
else
|
173
|
+
ui <=> oui
|
174
|
+
end
|
175
|
+
else
|
176
|
+
0
|
177
|
+
end
|
178
|
+
end
|
179
|
+
|
180
|
+
pc
|
181
|
+
end
|
182
|
+
|
183
|
+
# Returns +true+ if the +other+ object is a MIME::Type and the content types
|
184
|
+
# match.
|
185
|
+
def eql?(other)
|
186
|
+
other.kind_of?(MIME::Type) and self == other
|
187
|
+
end
|
188
|
+
|
189
|
+
# Returns the whole MIME content-type string.
|
190
|
+
#
|
191
|
+
# The content type is a presentation value from the MIME type registry and
|
192
|
+
# should not be used for comparison. The case of the content type is
|
193
|
+
# preserved, and extension markers (<tt>x-</tt>) are kept.
|
194
|
+
#
|
195
|
+
# text/plain => text/plain
|
196
|
+
# x-chemical/x-pdb => x-chemical/x-pdb
|
197
|
+
# audio/QCELP => audio/QCELP
|
198
|
+
attr_reader :content_type
|
199
|
+
# A simplified form of the MIME content-type string, suitable for
|
200
|
+
# case-insensitive comparison, with any extension markers (<tt>x-</tt)
|
201
|
+
# removed and converted to lowercase.
|
202
|
+
#
|
203
|
+
# text/plain => text/plain
|
204
|
+
# x-chemical/x-pdb => x-chemical/x-pdb
|
205
|
+
# audio/QCELP => audio/qcelp
|
206
|
+
attr_reader :simplified
|
207
|
+
# Returns the media type of the simplified MIME::Type.
|
208
|
+
#
|
209
|
+
# text/plain => text
|
210
|
+
# x-chemical/x-pdb => x-chemical
|
211
|
+
# audio/QCELP => audio
|
212
|
+
attr_reader :media_type
|
213
|
+
# Returns the media type of the unmodified MIME::Type.
|
214
|
+
#
|
215
|
+
# text/plain => text
|
216
|
+
# x-chemical/x-pdb => x-chemical
|
217
|
+
# audio/QCELP => audio
|
218
|
+
attr_reader :raw_media_type
|
219
|
+
# Returns the sub-type of the simplified MIME::Type.
|
220
|
+
#
|
221
|
+
# text/plain => plain
|
222
|
+
# x-chemical/x-pdb => pdb
|
223
|
+
# audio/QCELP => QCELP
|
224
|
+
attr_reader :sub_type
|
225
|
+
# Returns the media type of the unmodified MIME::Type.
|
226
|
+
#
|
227
|
+
# text/plain => plain
|
228
|
+
# x-chemical/x-pdb => x-pdb
|
229
|
+
# audio/QCELP => qcelp
|
230
|
+
attr_reader :raw_sub_type
|
231
|
+
|
232
|
+
##
|
233
|
+
# The list of extensions which are known to be used for this MIME::Type.
|
234
|
+
# Non-array values will be coerced into an array with #to_a. Array values
|
235
|
+
# will be flattened, +nil+ values removed, and made unique.
|
236
|
+
#
|
237
|
+
# :attr_accessor: extensions
|
238
|
+
def extensions
|
239
|
+
@extensions.to_a
|
240
|
+
end
|
241
|
+
|
242
|
+
##
|
243
|
+
def extensions=(value) # :nodoc:
|
244
|
+
@extensions = Set[*Array(value).flatten.compact].freeze
|
245
|
+
MIME::Types.send(:reindex_extensions, self)
|
246
|
+
end
|
247
|
+
|
248
|
+
# Merge the +extensions+ provided into this MIME::Type. The extensions added
|
249
|
+
# will be merged uniquely.
|
250
|
+
def add_extensions(*extensions)
|
251
|
+
self.extensions += extensions
|
252
|
+
end
|
253
|
+
|
254
|
+
##
|
255
|
+
# The preferred extension for this MIME type. If one is not set and there are
|
256
|
+
# exceptions defined, the first extension will be used.
|
257
|
+
#
|
258
|
+
# When setting #preferred_extensions, if #extensions does not contain this
|
259
|
+
# extension, this will be added to #xtensions.
|
260
|
+
#
|
261
|
+
# :attr_accessor: preferred_extension
|
262
|
+
|
263
|
+
##
|
264
|
+
def preferred_extension
|
265
|
+
@preferred_extension || extensions.first
|
266
|
+
end
|
267
|
+
|
268
|
+
##
|
269
|
+
def preferred_extension=(value) # :nodoc:
|
270
|
+
add_extensions(value) if value
|
271
|
+
@preferred_extension = value
|
272
|
+
end
|
273
|
+
|
274
|
+
##
|
275
|
+
# The encoding (+7bit+, +8bit+, <tt>quoted-printable</tt>, or +base64+)
|
276
|
+
# required to transport the data of this content type safely across a
|
277
|
+
# network, which roughly corresponds to Content-Transfer-Encoding. A value of
|
278
|
+
# +nil+ or <tt>:default</tt> will reset the #encoding to the
|
279
|
+
# #default_encoding for the MIME::Type. Raises ArgumentError if the encoding
|
280
|
+
# provided is invalid.
|
281
|
+
#
|
282
|
+
# If the encoding is not provided on construction, this will be either
|
283
|
+
# 'quoted-printable' (for text/* media types) and 'base64' for eveything
|
284
|
+
# else.
|
285
|
+
#
|
286
|
+
# :attr_accessor: encoding
|
287
|
+
|
288
|
+
##
|
289
|
+
attr_reader :encoding
|
290
|
+
|
291
|
+
##
|
292
|
+
def encoding=(enc) # :nodoc:
|
293
|
+
if enc.nil? or enc == :default
|
294
|
+
@encoding = default_encoding
|
295
|
+
elsif BINARY_ENCODINGS.include?(enc) or ASCII_ENCODINGS.include?(enc)
|
296
|
+
@encoding = enc
|
297
|
+
else
|
298
|
+
fail InvalidEncoding, enc
|
299
|
+
end
|
300
|
+
end
|
301
|
+
|
302
|
+
# Returns the default encoding for the MIME::Type based on the media type.
|
303
|
+
def default_encoding
|
304
|
+
@media_type == 'text' ? 'quoted-printable' : 'base64'
|
305
|
+
end
|
306
|
+
|
307
|
+
##
|
308
|
+
# Returns the media type or types that should be used instead of this media
|
309
|
+
# type, if it is obsolete. If there is no replacement media type, or it is
|
310
|
+
# not obsolete, +nil+ will be returned.
|
311
|
+
#
|
312
|
+
# :attr_accessor: use_instead
|
313
|
+
|
314
|
+
##
|
315
|
+
def use_instead
|
316
|
+
obsolete? ? @use_instead : nil
|
317
|
+
end
|
318
|
+
|
319
|
+
##
|
320
|
+
attr_writer :use_instead
|
321
|
+
|
322
|
+
# Returns +true+ if the media type is obsolete.
|
323
|
+
attr_accessor :obsolete
|
324
|
+
alias obsolete? obsolete
|
325
|
+
|
326
|
+
# The documentation for this MIME::Type.
|
327
|
+
attr_accessor :docs
|
328
|
+
|
329
|
+
# A friendly short description for this MIME::Type.
|
330
|
+
#
|
331
|
+
# call-seq:
|
332
|
+
# text_plain.friendly # => "Text File"
|
333
|
+
# text_plain.friendly('en') # => "Text File"
|
334
|
+
def friendly(lang = 'en')
|
335
|
+
@friendly ||= {}
|
336
|
+
|
337
|
+
case lang
|
338
|
+
when String, Symbol
|
339
|
+
@friendly[lang.to_s]
|
340
|
+
when Array
|
341
|
+
@friendly.update(Hash[*lang])
|
342
|
+
when Hash
|
343
|
+
@friendly.update(lang)
|
344
|
+
else
|
345
|
+
fail ArgumentError,
|
346
|
+
"Expected a language or translation set, not #{lang.inspect}"
|
347
|
+
end
|
348
|
+
end
|
349
|
+
|
350
|
+
# A key suitable for use as a lookup key for translations, such as with
|
351
|
+
# the I18n library.
|
352
|
+
#
|
353
|
+
# call-seq:
|
354
|
+
# text_plain.i18n_key # => "text.plain"
|
355
|
+
# 3gpp_xml.i18n_key # => "application.vnd-3gpp-bsf-xml"
|
356
|
+
# # from application/vnd.3gpp.bsf+xml
|
357
|
+
# x_msword.i18n_key # => "application.word"
|
358
|
+
# # from application/x-msword
|
359
|
+
attr_reader :i18n_key
|
360
|
+
|
361
|
+
##
|
362
|
+
# The cross-references list for this MIME::Type.
|
363
|
+
#
|
364
|
+
# :attr_accessor: xrefs
|
365
|
+
|
366
|
+
##
|
367
|
+
attr_reader :xrefs
|
368
|
+
|
369
|
+
##
|
370
|
+
def xrefs=(xrefs) # :nodoc:
|
371
|
+
@xrefs = MIME::Types::Container.new(xrefs)
|
372
|
+
end
|
373
|
+
|
374
|
+
# The decoded cross-reference URL list for this MIME::Type.
|
375
|
+
def xref_urls
|
376
|
+
xrefs.flat_map { |type, values|
|
377
|
+
name = :"xref_url_for_#{type.tr('-', '_')}"
|
378
|
+
respond_to?(name, true) and xref_map(values, name) or values.to_a
|
379
|
+
}
|
380
|
+
end
|
381
|
+
|
382
|
+
# Indicates whether the MIME type has been registered with IANA.
|
383
|
+
attr_accessor :registered
|
384
|
+
alias registered? registered
|
385
|
+
|
386
|
+
# MIME types can be specified to be sent across a network in particular
|
387
|
+
# formats. This method returns +true+ when the MIME::Type encoding is set
|
388
|
+
# to <tt>base64</tt>.
|
389
|
+
def binary?
|
390
|
+
BINARY_ENCODINGS.include?(encoding)
|
391
|
+
end
|
392
|
+
|
393
|
+
# MIME types can be specified to be sent across a network in particular
|
394
|
+
# formats. This method returns +false+ when the MIME::Type encoding is
|
395
|
+
# set to <tt>base64</tt>.
|
396
|
+
def ascii?
|
397
|
+
ASCII_ENCODINGS.include?(encoding)
|
398
|
+
end
|
399
|
+
|
400
|
+
# Indicateswhether the MIME type is declared as a signature type.
|
401
|
+
attr_accessor :signature
|
402
|
+
alias signature? signature
|
403
|
+
|
404
|
+
# Returns +true+ if the MIME::Type specifies an extension list,
|
405
|
+
# indicating that it is a complete MIME::Type.
|
406
|
+
def complete?
|
407
|
+
!@extensions.empty?
|
408
|
+
end
|
409
|
+
|
410
|
+
# Returns the MIME::Type as a string.
|
411
|
+
def to_s
|
412
|
+
content_type
|
413
|
+
end
|
414
|
+
|
415
|
+
# Returns the MIME::Type as a string for implicit conversions. This allows
|
416
|
+
# MIME::Type objects to appear on either side of a comparison.
|
417
|
+
#
|
418
|
+
# 'text/plain' == MIME::Type.new('text/plain')
|
419
|
+
def to_str
|
420
|
+
content_type
|
421
|
+
end
|
422
|
+
|
423
|
+
# Converts the MIME::Type to a JSON string.
|
424
|
+
def to_json(*args)
|
425
|
+
require 'json'
|
426
|
+
to_h.to_json(*args)
|
427
|
+
end
|
428
|
+
|
429
|
+
# Converts the MIME::Type to a hash. The output of this method can also be
|
430
|
+
# used to initialize a MIME::Type.
|
431
|
+
def to_h
|
432
|
+
encode_with({})
|
433
|
+
end
|
434
|
+
|
435
|
+
# Populates the +coder+ with attributes about this record for
|
436
|
+
# serialization. The structure of +coder+ should match the structure used
|
437
|
+
# with #init_with.
|
438
|
+
#
|
439
|
+
# This method should be considered a private implementation detail.
|
440
|
+
def encode_with(coder)
|
441
|
+
coder['content-type'] = @content_type
|
442
|
+
coder['docs'] = @docs unless @docs.nil? or @docs.empty?
|
443
|
+
coder['friendly'] = @friendly unless @friendly.nil? or @friendly.empty?
|
444
|
+
coder['encoding'] = @encoding
|
445
|
+
coder['extensions'] = @extensions.to_a unless @extensions.empty?
|
446
|
+
coder['preferred-extension'] = @preferred_extension if @preferred_extension
|
447
|
+
if obsolete?
|
448
|
+
coder['obsolete'] = obsolete?
|
449
|
+
coder['use-instead'] = use_instead if use_instead
|
450
|
+
end
|
451
|
+
unless xrefs.empty?
|
452
|
+
{}.tap do |hash|
|
453
|
+
xrefs.each do |k, v|
|
454
|
+
hash[k] = v.to_a.sort
|
455
|
+
end
|
456
|
+
coder['xrefs'] = hash
|
457
|
+
end
|
458
|
+
end
|
459
|
+
coder['registered'] = registered?
|
460
|
+
coder['signature'] = signature? if signature?
|
461
|
+
coder
|
462
|
+
end
|
463
|
+
|
464
|
+
# Initialize an empty object from +coder+, which must contain the
|
465
|
+
# attributes necessary for initializing an empty object.
|
466
|
+
#
|
467
|
+
# This method should be considered a private implementation detail.
|
468
|
+
def init_with(coder)
|
469
|
+
self.content_type = coder['content-type']
|
470
|
+
self.docs = coder['docs'] || ''
|
471
|
+
self.encoding = coder['encoding']
|
472
|
+
self.extensions = coder['extensions'] || []
|
473
|
+
self.preferred_extension = coder['preferred-extension']
|
474
|
+
self.obsolete = coder['obsolete'] || false
|
475
|
+
self.registered = coder['registered'] || false
|
476
|
+
self.signature = coder['signature']
|
477
|
+
self.xrefs = coder['xrefs'] || {}
|
478
|
+
self.use_instead = coder['use-instead']
|
479
|
+
|
480
|
+
friendly(coder['friendly'] || {})
|
481
|
+
end
|
482
|
+
|
483
|
+
def inspect # :nodoc:
|
484
|
+
# We are intentionally lying here because MIME::Type::Columnar is an
|
485
|
+
# implementation detail.
|
486
|
+
"#<MIME::Type: #{self}>"
|
487
|
+
end
|
488
|
+
|
489
|
+
class << self
|
490
|
+
# MIME media types are case-insensitive, but are typically presented in a
|
491
|
+
# case-preserving format in the type registry. This method converts
|
492
|
+
# +content_type+ to lowercase.
|
493
|
+
#
|
494
|
+
# In previous versions of mime-types, this would also remove any extension
|
495
|
+
# prefix (<tt>x-</tt>). This is no longer default behaviour, but may be
|
496
|
+
# provided by providing a truth value to +remove_x_prefix+.
|
497
|
+
def simplified(content_type, remove_x_prefix: false)
|
498
|
+
simplify_matchdata(match(content_type), remove_x_prefix)
|
499
|
+
end
|
500
|
+
|
501
|
+
# Converts a provided +content_type+ into a translation key suitable for
|
502
|
+
# use with the I18n library.
|
503
|
+
def i18n_key(content_type)
|
504
|
+
simplify_matchdata(match(content_type), joiner: '.') { |e|
|
505
|
+
e.gsub!(I18N_RE, '-')
|
506
|
+
}
|
507
|
+
end
|
508
|
+
|
509
|
+
# Return a +MatchData+ object of the +content_type+ against pattern of
|
510
|
+
# media types.
|
511
|
+
def match(content_type)
|
512
|
+
case content_type
|
513
|
+
when MatchData
|
514
|
+
content_type
|
515
|
+
else
|
516
|
+
MEDIA_TYPE_RE.match(content_type)
|
517
|
+
end
|
518
|
+
end
|
519
|
+
|
520
|
+
private
|
521
|
+
|
522
|
+
def simplify_matchdata(matchdata, remove_x = false, joiner: '/')
|
523
|
+
return nil unless matchdata
|
524
|
+
|
525
|
+
matchdata.captures.map { |e|
|
526
|
+
e.downcase!
|
527
|
+
e.sub!(/^x-/, '') if remove_x
|
528
|
+
yield e if block_given?
|
529
|
+
e
|
530
|
+
}.join(joiner)
|
531
|
+
end
|
532
|
+
end
|
533
|
+
|
534
|
+
private
|
535
|
+
|
536
|
+
def content_type=(type_string)
|
537
|
+
match = MEDIA_TYPE_RE.match(type_string)
|
538
|
+
fail InvalidContentType, type_string if match.nil?
|
539
|
+
|
540
|
+
@content_type = intern_string(type_string)
|
541
|
+
@raw_media_type, @raw_sub_type = match.captures
|
542
|
+
@simplified = intern_string(MIME::Type.simplified(match))
|
543
|
+
@i18n_key = intern_string(MIME::Type.i18n_key(match))
|
544
|
+
@media_type, @sub_type = MEDIA_TYPE_RE.match(@simplified).captures
|
545
|
+
|
546
|
+
@raw_media_type = intern_string(@raw_media_type)
|
547
|
+
@raw_sub_type = intern_string(@raw_sub_type)
|
548
|
+
@media_type = intern_string(@media_type)
|
549
|
+
@sub_type = intern_string(@sub_type)
|
550
|
+
end
|
551
|
+
|
552
|
+
if String.method_defined?(:-@)
|
553
|
+
def intern_string(string)
|
554
|
+
-string
|
555
|
+
end
|
556
|
+
else
|
557
|
+
# MRI 2.2 and older don't have a method for string interning,
|
558
|
+
# so we simply freeze them for keeping a similar interface
|
559
|
+
def intern_string(string)
|
560
|
+
string.freeze
|
561
|
+
end
|
562
|
+
end
|
563
|
+
|
564
|
+
def xref_map(values, helper)
|
565
|
+
values.map { |value| send(helper, value) }
|
566
|
+
end
|
567
|
+
|
568
|
+
def xref_url_for_rfc(value)
|
569
|
+
'http://www.iana.org/go/%s' % value
|
570
|
+
end
|
571
|
+
|
572
|
+
def xref_url_for_draft(value)
|
573
|
+
'http://www.iana.org/go/%s' % value.sub(/\ARFC/, 'draft')
|
574
|
+
end
|
575
|
+
|
576
|
+
def xref_url_for_rfc_errata(value)
|
577
|
+
'http://www.rfc-editor.org/errata_search.php?eid=%s' % value
|
578
|
+
end
|
579
|
+
|
580
|
+
def xref_url_for_person(value)
|
581
|
+
'http://www.iana.org/assignments/media-types/media-types.xhtml#%s' % value
|
582
|
+
end
|
583
|
+
|
584
|
+
def xref_url_for_template(value)
|
585
|
+
'http://www.iana.org/assignments/media-types/%s' % value
|
586
|
+
end
|
587
|
+
end
|
@@ -0,0 +1,136 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'mime/type/columnar'
|
4
|
+
|
5
|
+
# MIME::Types::Columnar is used to extend a MIME::Types container to load data
|
6
|
+
# by columns instead of from JSON or YAML. Column loads of MIME types loaded
|
7
|
+
# through the columnar store are synchronized with a Mutex.
|
8
|
+
#
|
9
|
+
# MIME::Types::Columnar is not intended to be used directly, but will be added
|
10
|
+
# to an instance of MIME::Types when it is loaded with
|
11
|
+
# MIME::Types::Loader#load_columnar.
|
12
|
+
module MIME::Types::Columnar
|
13
|
+
LOAD_MUTEX = Mutex.new # :nodoc:
|
14
|
+
|
15
|
+
def self.extended(obj) # :nodoc:
|
16
|
+
super
|
17
|
+
obj.instance_variable_set(:@__mime_data__, [])
|
18
|
+
obj.instance_variable_set(:@__files__, Set.new)
|
19
|
+
end
|
20
|
+
|
21
|
+
# Load the first column data file (type and extensions).
|
22
|
+
def load_base_data(path) #:nodoc:
|
23
|
+
@__root__ = path
|
24
|
+
|
25
|
+
each_file_line('content_type', false) do |line|
|
26
|
+
line = line.split
|
27
|
+
content_type = line.shift
|
28
|
+
extensions = line
|
29
|
+
# content_type, *extensions = line.split
|
30
|
+
|
31
|
+
type = MIME::Type::Columnar.new(self, content_type, extensions)
|
32
|
+
@__mime_data__ << type
|
33
|
+
add(type)
|
34
|
+
end
|
35
|
+
|
36
|
+
self
|
37
|
+
end
|
38
|
+
|
39
|
+
private
|
40
|
+
|
41
|
+
def each_file_line(name, lookup = true)
|
42
|
+
LOAD_MUTEX.synchronize do
|
43
|
+
next if @__files__.include?(name)
|
44
|
+
|
45
|
+
i = -1
|
46
|
+
column = File.join(@__root__, "mime.#{name}.column")
|
47
|
+
|
48
|
+
IO.readlines(column, encoding: 'UTF-8').each do |line|
|
49
|
+
line.chomp!
|
50
|
+
|
51
|
+
if lookup
|
52
|
+
type = @__mime_data__[i += 1] or next
|
53
|
+
yield type, line
|
54
|
+
else
|
55
|
+
yield line
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
@__files__ << name
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
def load_encoding
|
64
|
+
each_file_line('encoding') do |type, line|
|
65
|
+
pool ||= {}
|
66
|
+
type.instance_variable_set(:@encoding, (pool[line] ||= line))
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
def load_docs
|
71
|
+
each_file_line('docs') do |type, line|
|
72
|
+
type.instance_variable_set(:@docs, opt(line))
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
def load_preferred_extension
|
77
|
+
each_file_line('pext') do |type, line|
|
78
|
+
type.instance_variable_set(:@preferred_extension, opt(line))
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
def load_flags
|
83
|
+
each_file_line('flags') do |type, line|
|
84
|
+
line = line.split
|
85
|
+
type.instance_variable_set(:@obsolete, flag(line.shift))
|
86
|
+
type.instance_variable_set(:@registered, flag(line.shift))
|
87
|
+
type.instance_variable_set(:@signature, flag(line.shift))
|
88
|
+
end
|
89
|
+
end
|
90
|
+
|
91
|
+
def load_xrefs
|
92
|
+
each_file_line('xrefs') { |type, line|
|
93
|
+
type.instance_variable_set(:@xrefs, dict(line, array: true))
|
94
|
+
}
|
95
|
+
end
|
96
|
+
|
97
|
+
def load_friendly
|
98
|
+
each_file_line('friendly') { |type, line|
|
99
|
+
type.instance_variable_set(:@friendly, dict(line))
|
100
|
+
}
|
101
|
+
end
|
102
|
+
|
103
|
+
def load_use_instead
|
104
|
+
each_file_line('use_instead') do |type, line|
|
105
|
+
type.instance_variable_set(:@use_instead, opt(line))
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
109
|
+
def dict(line, array: false)
|
110
|
+
if line == '-'
|
111
|
+
{}
|
112
|
+
else
|
113
|
+
line.split('|').each_with_object({}) { |l, h|
|
114
|
+
k, v = l.split('^')
|
115
|
+
v = nil if v.empty?
|
116
|
+
h[k] = array ? Array(v) : v
|
117
|
+
}
|
118
|
+
end
|
119
|
+
end
|
120
|
+
|
121
|
+
def arr(line)
|
122
|
+
if line == '-'
|
123
|
+
[]
|
124
|
+
else
|
125
|
+
line.split('|').flatten.compact.uniq
|
126
|
+
end
|
127
|
+
end
|
128
|
+
|
129
|
+
def opt(line)
|
130
|
+
line unless line == '-'
|
131
|
+
end
|
132
|
+
|
133
|
+
def flag(line)
|
134
|
+
line == '1'
|
135
|
+
end
|
136
|
+
end
|