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.
Files changed (438) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +44 -0
  3. data/Gemfile.lock +10 -10
  4. data/LICENSE +1 -1
  5. data/README.md +10 -0
  6. data/RELEASE.md +11 -25
  7. data/contrib/bash/completion.sh +1 -1
  8. data/lib/vagrant/action/builtin/mixin_synced_folders.rb +7 -1
  9. data/lib/vagrant/action/general/package.rb +18 -0
  10. data/lib/vagrant/action/runner.rb +1 -1
  11. data/lib/vagrant/action/warden.rb +1 -1
  12. data/lib/vagrant/batch_action.rb +14 -0
  13. data/lib/vagrant/box_collection.rb +1 -1
  14. data/lib/vagrant/bundler.rb +29 -8
  15. data/lib/vagrant/cli.rb +1 -1
  16. data/lib/vagrant/environment.rb +50 -5
  17. data/lib/vagrant/machine.rb +4 -1
  18. data/lib/vagrant/plugin/v2/trigger.rb +12 -3
  19. data/lib/vagrant/shared_helpers.rb +8 -0
  20. data/lib/vagrant/util/guest_inspection.rb +19 -0
  21. data/lib/vagrant/vagrantfile.rb +18 -14
  22. data/plugins/commands/box/command/update.rb +8 -2
  23. data/plugins/commands/cloud/box/create.rb +1 -1
  24. data/plugins/commands/cloud/box/delete.rb +1 -1
  25. data/plugins/commands/cloud/provider/create.rb +1 -1
  26. data/plugins/commands/cloud/provider/delete.rb +1 -1
  27. data/plugins/commands/cloud/provider/update.rb +1 -1
  28. data/plugins/commands/cloud/provider/upload.rb +1 -1
  29. data/plugins/commands/cloud/publish.rb +1 -1
  30. data/plugins/commands/cloud/search.rb +1 -1
  31. data/plugins/commands/cloud/version/create.rb +1 -1
  32. data/plugins/commands/cloud/version/delete.rb +1 -1
  33. data/plugins/commands/cloud/version/release.rb +1 -1
  34. data/plugins/commands/cloud/version/revoke.rb +1 -1
  35. data/plugins/commands/cloud/version/update.rb +1 -1
  36. data/plugins/commands/global-status/command.rb +11 -0
  37. data/plugins/commands/snapshot/command/list.rb +2 -1
  38. data/plugins/commands/snapshot/command/pop.rb +3 -1
  39. data/plugins/communicators/ssh/communicator.rb +0 -1
  40. data/plugins/guests/bsd/cap/{virtualbox.rb → mount_virtualbox_shared_folder.rb} +1 -1
  41. data/plugins/guests/bsd/plugin.rb +2 -2
  42. data/plugins/guests/coreos/cap/change_host_name.rb +24 -7
  43. data/plugins/guests/coreos/cap/configure_networks.rb +48 -64
  44. data/plugins/guests/freebsd/cap/configure_networks.rb +2 -2
  45. data/plugins/guests/freebsd/cap/mount_virtualbox_shared_folder.rb +76 -0
  46. data/plugins/guests/freebsd/plugin.rb +10 -0
  47. data/plugins/hosts/bsd/cap/nfs.rb +1 -1
  48. data/plugins/hosts/freebsd/cap/nfs.rb +1 -1
  49. data/plugins/hosts/void/cap/nfs.rb +1 -1
  50. data/plugins/kernel_v2/config/vm_trigger.rb +1 -1
  51. data/plugins/providers/docker/action/connect_networks.rb +77 -0
  52. data/plugins/providers/docker/action/destroy_network.rb +50 -0
  53. data/plugins/providers/docker/action/prepare_networks.rb +355 -0
  54. data/plugins/providers/docker/action.rb +9 -3
  55. data/plugins/providers/docker/driver/compose.rb +13 -1
  56. data/plugins/providers/docker/driver.rb +148 -4
  57. data/plugins/providers/docker/errors.rb +28 -0
  58. data/plugins/providers/docker/provider.rb +8 -0
  59. data/plugins/providers/virtualbox/cap.rb +1 -0
  60. data/plugins/provisioners/ansible/cap/guest/debian/ansible_install.rb +5 -5
  61. data/plugins/provisioners/ansible/cap/guest/fedora/ansible_install.rb +5 -5
  62. data/plugins/provisioners/ansible/cap/guest/pip/pip.rb +15 -2
  63. data/plugins/provisioners/ansible/cap/guest/redhat/ansible_install.rb +5 -5
  64. data/plugins/provisioners/ansible/cap/guest/ubuntu/ansible_install.rb +2 -2
  65. data/plugins/provisioners/ansible/config/guest.rb +3 -0
  66. data/plugins/provisioners/ansible/provisioner/guest.rb +5 -2
  67. data/plugins/provisioners/chef/cap/freebsd/chef_installed.rb +1 -1
  68. data/plugins/provisioners/chef/cap/linux/chef_installed.rb +1 -1
  69. data/plugins/provisioners/chef/cap/omnios/chef_installed.rb +1 -1
  70. data/plugins/provisioners/chef/cap/windows/chef_installed.rb +2 -2
  71. data/plugins/provisioners/chef/provisioner/base.rb +1 -1
  72. data/plugins/synced_folders/rsync/command/rsync_auto.rb +5 -1
  73. data/plugins/synced_folders/rsync/default_unix_cap.rb +1 -1
  74. data/plugins/synced_folders/rsync/helper.rb +8 -7
  75. data/plugins/synced_folders/smb/synced_folder.rb +21 -0
  76. data/templates/locales/en.yml +8 -4
  77. data/templates/locales/providers_docker.yml +70 -0
  78. data/templates/nfs/{exports_freebsd.erb → exports_bsd.erb} +0 -0
  79. data/vendor/bundle/ruby/2.6.0/bundler/gems/vagrant-spec-abfc34474d12/vagrant-spec.gemspec +3 -3
  80. 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
  81. data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/bcrypt_pbkdf-1.0.1/gem.build_complete +0 -0
  82. data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/bcrypt_pbkdf-1.0.1/gem_make.out +19 -0
  83. 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
  84. 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
  85. data/vendor/bundle/ruby/2.6.0/extensions/x86_64-linux/2.6.0/unf_ext-0.0.7.6/mkmf.log +35 -0
  86. 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
  87. data/vendor/bundle/ruby/2.6.0/gems/bcrypt_pbkdf-1.0.1/.travis.yml +8 -0
  88. data/vendor/bundle/ruby/2.6.0/gems/bcrypt_pbkdf-1.0.1/CHANGELOG.md +3 -0
  89. data/vendor/bundle/ruby/2.6.0/gems/bcrypt_pbkdf-1.0.1/COPYING +23 -0
  90. data/vendor/bundle/ruby/2.6.0/gems/bcrypt_pbkdf-1.0.1/Gemfile +2 -0
  91. data/vendor/bundle/ruby/2.6.0/gems/bcrypt_pbkdf-1.0.1/Gemfile.lock +31 -0
  92. data/vendor/bundle/ruby/2.6.0/gems/bcrypt_pbkdf-1.0.1/README.md +31 -0
  93. data/vendor/bundle/ruby/2.6.0/gems/bcrypt_pbkdf-1.0.1/Rakefile +56 -0
  94. data/vendor/bundle/ruby/2.6.0/gems/bcrypt_pbkdf-1.0.1/bcrypt_pbkdf.gemspec +29 -0
  95. data/vendor/bundle/ruby/2.6.0/gems/bcrypt_pbkdf-1.0.1/ext/mri/.sitearchdir.time +0 -0
  96. data/vendor/bundle/ruby/2.6.0/gems/bcrypt_pbkdf-1.0.1/ext/mri/Makefile +265 -0
  97. data/vendor/bundle/ruby/2.6.0/gems/bcrypt_pbkdf-1.0.1/ext/mri/bcrypt_pbkdf.c +169 -0
  98. data/vendor/bundle/ruby/2.6.0/gems/bcrypt_pbkdf-1.0.1/ext/mri/bcrypt_pbkdf.o +0 -0
  99. data/vendor/bundle/ruby/2.6.0/gems/bcrypt_pbkdf-1.0.1/ext/mri/bcrypt_pbkdf_ext.c +44 -0
  100. data/vendor/bundle/ruby/2.6.0/gems/bcrypt_pbkdf-1.0.1/ext/mri/bcrypt_pbkdf_ext.o +0 -0
  101. data/vendor/bundle/ruby/2.6.0/gems/bcrypt_pbkdf-1.0.1/ext/mri/bcrypt_pbkdf_ext.so +0 -0
  102. data/vendor/bundle/ruby/2.6.0/gems/bcrypt_pbkdf-1.0.1/ext/mri/blf.h +90 -0
  103. data/vendor/bundle/ruby/2.6.0/gems/bcrypt_pbkdf-1.0.1/ext/mri/blowfish.c +698 -0
  104. data/vendor/bundle/ruby/2.6.0/gems/bcrypt_pbkdf-1.0.1/ext/mri/blowfish.o +0 -0
  105. data/vendor/bundle/ruby/2.6.0/gems/bcrypt_pbkdf-1.0.1/ext/mri/crypto_api.h +3 -0
  106. data/vendor/bundle/ruby/2.6.0/gems/bcrypt_pbkdf-1.0.1/ext/mri/crypto_hash_sha512.h +19 -0
  107. data/vendor/bundle/ruby/2.6.0/gems/bcrypt_pbkdf-1.0.1/ext/mri/explicit_bzero.c +20 -0
  108. data/vendor/bundle/ruby/2.6.0/gems/bcrypt_pbkdf-1.0.1/ext/mri/explicit_bzero.o +0 -0
  109. data/vendor/bundle/ruby/2.6.0/gems/bcrypt_pbkdf-1.0.1/ext/mri/extconf.rb +3 -0
  110. data/vendor/bundle/ruby/2.6.0/gems/bcrypt_pbkdf-1.0.1/ext/mri/hash_sha512.c +320 -0
  111. data/vendor/bundle/ruby/2.6.0/gems/bcrypt_pbkdf-1.0.1/ext/mri/hash_sha512.o +0 -0
  112. data/vendor/bundle/ruby/2.6.0/gems/bcrypt_pbkdf-1.0.1/ext/mri/includes.h +27 -0
  113. data/vendor/bundle/ruby/2.6.0/gems/bcrypt_pbkdf-1.0.1/ext/mri/sha2.h +13 -0
  114. data/vendor/bundle/ruby/2.6.0/gems/bcrypt_pbkdf-1.0.1/ext/mri/util.h +0 -0
  115. data/vendor/bundle/ruby/2.6.0/gems/bcrypt_pbkdf-1.0.1/ext/mri/utils.h +5 -0
  116. data/vendor/bundle/ruby/2.6.0/gems/bcrypt_pbkdf-1.0.1/lib/bcrypt_pbkdf.rb +24 -0
  117. data/vendor/bundle/ruby/2.6.0/gems/bcrypt_pbkdf-1.0.1/lib/bcrypt_pbkdf_ext.so +0 -0
  118. data/vendor/bundle/ruby/2.6.0/gems/bcrypt_pbkdf-1.0.1/test/bcrypt_pnkdf/engine_test.rb +76 -0
  119. data/vendor/bundle/ruby/2.6.0/gems/bcrypt_pbkdf-1.0.1/test/test_helper.rb +2 -0
  120. data/vendor/bundle/ruby/2.6.0/gems/domain_name-0.5.20190701/.document +5 -0
  121. data/vendor/bundle/ruby/2.6.0/gems/domain_name-0.5.20190701/.gitignore +17 -0
  122. data/vendor/bundle/ruby/2.6.0/gems/domain_name-0.5.20190701/.travis.yml +21 -0
  123. data/vendor/bundle/ruby/2.6.0/gems/domain_name-0.5.20190701/CHANGELOG.md +219 -0
  124. data/vendor/bundle/ruby/2.6.0/gems/domain_name-0.5.20190701/Gemfile +4 -0
  125. data/vendor/bundle/ruby/2.6.0/gems/domain_name-0.5.20190701/LICENSE.txt +78 -0
  126. data/vendor/bundle/ruby/2.6.0/gems/domain_name-0.5.20190701/README.md +67 -0
  127. data/vendor/bundle/ruby/2.6.0/gems/domain_name-0.5.20190701/Rakefile +111 -0
  128. data/vendor/bundle/ruby/2.6.0/gems/domain_name-0.5.20190701/data/public_suffix_list.dat +12985 -0
  129. data/vendor/bundle/ruby/2.6.0/gems/domain_name-0.5.20190701/domain_name.gemspec +36 -0
  130. data/vendor/bundle/ruby/2.6.0/gems/domain_name-0.5.20190701/lib/domain_name/etld_data.rb +8787 -0
  131. data/vendor/bundle/ruby/2.6.0/gems/domain_name-0.5.20190701/lib/domain_name/etld_data.rb.erb +11 -0
  132. data/vendor/bundle/ruby/2.6.0/gems/domain_name-0.5.20190701/lib/domain_name/punycode.rb +283 -0
  133. data/vendor/bundle/ruby/2.6.0/gems/domain_name-0.5.20190701/lib/domain_name/version.rb +3 -0
  134. data/vendor/bundle/ruby/2.6.0/gems/domain_name-0.5.20190701/lib/domain_name.rb +297 -0
  135. data/vendor/bundle/ruby/2.6.0/gems/domain_name-0.5.20190701/test/helper.rb +17 -0
  136. data/vendor/bundle/ruby/2.6.0/gems/domain_name-0.5.20190701/test/test_domain_name-punycode.rb +97 -0
  137. data/vendor/bundle/ruby/2.6.0/gems/domain_name-0.5.20190701/test/test_domain_name.rb +317 -0
  138. data/vendor/bundle/ruby/2.6.0/gems/domain_name-0.5.20190701/tool/gen_etld_data.rb +63 -0
  139. data/vendor/bundle/ruby/2.6.0/gems/gssapi-1.3.0/.gitignore +11 -0
  140. data/vendor/bundle/ruby/2.6.0/gems/gssapi-1.3.0/COPYING +18 -0
  141. data/vendor/bundle/ruby/2.6.0/gems/gssapi-1.3.0/Changelog.md +23 -0
  142. data/vendor/bundle/ruby/2.6.0/gems/gssapi-1.3.0/Gemfile +2 -0
  143. data/vendor/bundle/ruby/2.6.0/gems/gssapi-1.3.0/README.md +22 -0
  144. data/vendor/bundle/ruby/2.6.0/gems/gssapi-1.3.0/Rakefile +11 -0
  145. data/vendor/bundle/ruby/2.6.0/gems/gssapi-1.3.0/VERSION +1 -0
  146. data/vendor/bundle/ruby/2.6.0/gems/gssapi-1.3.0/examples/gss_client.rb +26 -0
  147. data/vendor/bundle/ruby/2.6.0/gems/gssapi-1.3.0/examples/gss_iov_client.rb +55 -0
  148. data/vendor/bundle/ruby/2.6.0/gems/gssapi-1.3.0/examples/gss_iov_helpers.rb +74 -0
  149. data/vendor/bundle/ruby/2.6.0/gems/gssapi-1.3.0/examples/gss_iov_server.rb +67 -0
  150. data/vendor/bundle/ruby/2.6.0/gems/gssapi-1.3.0/examples/gss_server.rb +31 -0
  151. data/vendor/bundle/ruby/2.6.0/gems/gssapi-1.3.0/gssapi.gemspec +34 -0
  152. data/vendor/bundle/ruby/2.6.0/gems/gssapi-1.3.0/lib/gssapi/exceptions.rb +50 -0
  153. data/vendor/bundle/ruby/2.6.0/gems/gssapi-1.3.0/lib/gssapi/extensions.rb +40 -0
  154. data/vendor/bundle/ruby/2.6.0/gems/gssapi-1.3.0/lib/gssapi/heimdal.rb +10 -0
  155. data/vendor/bundle/ruby/2.6.0/gems/gssapi-1.3.0/lib/gssapi/lib_gssapi.rb +414 -0
  156. data/vendor/bundle/ruby/2.6.0/gems/gssapi-1.3.0/lib/gssapi/lib_gssapi_loader.rb +80 -0
  157. data/vendor/bundle/ruby/2.6.0/gems/gssapi-1.3.0/lib/gssapi/simple.rb +269 -0
  158. data/vendor/bundle/ruby/2.6.0/gems/gssapi-1.3.0/lib/gssapi.rb +18 -0
  159. data/vendor/bundle/ruby/2.6.0/gems/gssapi-1.3.0/preamble +5 -0
  160. data/vendor/bundle/ruby/2.6.0/gems/gssapi-1.3.0/test/spec/gssapi_simple_spec.rb +70 -0
  161. data/vendor/bundle/ruby/2.6.0/gems/gssapi-1.3.0/test/spec/test_buffer_spec.rb +15 -0
  162. data/vendor/bundle/ruby/2.6.0/gems/mime-types-3.3/Code-of-Conduct.md +73 -0
  163. data/vendor/bundle/ruby/2.6.0/gems/mime-types-3.3/Contributing.md +141 -0
  164. data/vendor/bundle/ruby/2.6.0/gems/mime-types-3.3/History.md +223 -0
  165. data/vendor/bundle/ruby/2.6.0/gems/mime-types-3.3/Licence.md +25 -0
  166. data/vendor/bundle/ruby/2.6.0/gems/mime-types-3.3/Manifest.txt +31 -0
  167. data/vendor/bundle/ruby/2.6.0/gems/mime-types-3.3/README.rdoc +200 -0
  168. data/vendor/bundle/ruby/2.6.0/gems/mime-types-3.3/Rakefile +284 -0
  169. data/vendor/bundle/ruby/2.6.0/gems/mime-types-3.3/lib/mime/type/columnar.rb +57 -0
  170. data/vendor/bundle/ruby/2.6.0/gems/mime-types-3.3/lib/mime/type.rb +587 -0
  171. data/vendor/bundle/ruby/2.6.0/gems/mime-types-3.3/lib/mime/types/_columnar.rb +136 -0
  172. data/vendor/bundle/ruby/2.6.0/gems/mime-types-3.3/lib/mime/types/cache.rb +58 -0
  173. data/vendor/bundle/ruby/2.6.0/gems/mime-types-3.3/lib/mime/types/columnar.rb +3 -0
  174. data/vendor/bundle/ruby/2.6.0/gems/mime-types-3.3/lib/mime/types/container.rb +96 -0
  175. data/vendor/bundle/ruby/2.6.0/gems/mime-types-3.3/lib/mime/types/deprecations.rb +32 -0
  176. data/vendor/bundle/ruby/2.6.0/gems/mime-types-3.3/lib/mime/types/full.rb +19 -0
  177. data/vendor/bundle/ruby/2.6.0/gems/mime-types-3.3/lib/mime/types/loader.rb +146 -0
  178. data/vendor/bundle/ruby/2.6.0/gems/mime-types-3.3/lib/mime/types/logger.rb +39 -0
  179. data/vendor/bundle/ruby/2.6.0/gems/mime-types-3.3/lib/mime/types/registry.rb +90 -0
  180. data/vendor/bundle/ruby/2.6.0/gems/mime-types-3.3/lib/mime/types.rb +231 -0
  181. data/vendor/bundle/ruby/2.6.0/gems/mime-types-3.3/lib/mime-types.rb +3 -0
  182. data/vendor/bundle/ruby/2.6.0/gems/mime-types-3.3/test/bad-fixtures/malformed +9 -0
  183. data/vendor/bundle/ruby/2.6.0/gems/mime-types-3.3/test/fixture/json.json +1 -0
  184. data/vendor/bundle/ruby/2.6.0/gems/mime-types-3.3/test/fixture/old-data +9 -0
  185. data/vendor/bundle/ruby/2.6.0/gems/mime-types-3.3/test/fixture/yaml.yaml +55 -0
  186. data/vendor/bundle/ruby/2.6.0/gems/mime-types-3.3/test/minitest_helper.rb +13 -0
  187. data/vendor/bundle/ruby/2.6.0/gems/mime-types-3.3/test/test_mime_type.rb +610 -0
  188. data/vendor/bundle/ruby/2.6.0/gems/mime-types-3.3/test/test_mime_types.rb +169 -0
  189. data/vendor/bundle/ruby/2.6.0/gems/mime-types-3.3/test/test_mime_types_cache.rb +118 -0
  190. data/vendor/bundle/ruby/2.6.0/gems/mime-types-3.3/test/test_mime_types_class.rb +159 -0
  191. data/vendor/bundle/ruby/2.6.0/gems/mime-types-3.3/test/test_mime_types_lazy.rb +49 -0
  192. data/vendor/bundle/ruby/2.6.0/gems/mime-types-3.3/test/test_mime_types_loader.rb +32 -0
  193. data/vendor/bundle/ruby/2.6.0/gems/mime-types-data-3.2019.0904/Code-of-Conduct.md +75 -0
  194. data/vendor/bundle/ruby/2.6.0/gems/mime-types-data-3.2019.0904/Contributing.md +161 -0
  195. data/vendor/bundle/ruby/2.6.0/gems/mime-types-data-3.2019.0904/History.md +396 -0
  196. data/vendor/bundle/ruby/2.6.0/gems/mime-types-data-3.2019.0904/Licence.md +25 -0
  197. data/vendor/bundle/ruby/2.6.0/gems/mime-types-data-3.2019.0904/Manifest.txt +31 -0
  198. data/vendor/bundle/ruby/2.6.0/gems/mime-types-data-3.2019.0904/README.md +63 -0
  199. data/vendor/bundle/ruby/2.6.0/gems/mime-types-data-3.2019.0904/Rakefile +94 -0
  200. data/vendor/bundle/ruby/2.6.0/gems/mime-types-data-3.2019.0904/data/mime-types.json +1 -0
  201. data/vendor/bundle/ruby/2.6.0/gems/mime-types-data-3.2019.0904/data/mime.content_type.column +2212 -0
  202. data/vendor/bundle/ruby/2.6.0/gems/mime-types-data-3.2019.0904/data/mime.docs.column +2212 -0
  203. data/vendor/bundle/ruby/2.6.0/gems/mime-types-data-3.2019.0904/data/mime.encoding.column +2212 -0
  204. data/vendor/bundle/ruby/2.6.0/gems/mime-types-data-3.2019.0904/data/mime.flags.column +2212 -0
  205. data/vendor/bundle/ruby/2.6.0/gems/mime-types-data-3.2019.0904/data/mime.friendly.column +2212 -0
  206. data/vendor/bundle/ruby/2.6.0/gems/mime-types-data-3.2019.0904/data/mime.pext.column +2212 -0
  207. data/vendor/bundle/ruby/2.6.0/gems/mime-types-data-3.2019.0904/data/mime.use_instead.column +2212 -0
  208. data/vendor/bundle/ruby/2.6.0/gems/mime-types-data-3.2019.0904/data/mime.xrefs.column +2212 -0
  209. data/vendor/bundle/ruby/2.6.0/gems/mime-types-data-3.2019.0904/lib/mime/types/data.rb +21 -0
  210. data/vendor/bundle/ruby/2.6.0/gems/mime-types-data-3.2019.0904/lib/mime-types-data.rb +3 -0
  211. data/vendor/bundle/ruby/2.6.0/gems/mime-types-data-3.2019.0904/types/application.yaml +16342 -0
  212. data/vendor/bundle/ruby/2.6.0/gems/mime-types-data-3.2019.0904/types/audio.yaml +1644 -0
  213. data/vendor/bundle/ruby/2.6.0/gems/mime-types-data-3.2019.0904/types/chemical.yaml +71 -0
  214. data/vendor/bundle/ruby/2.6.0/gems/mime-types-data-3.2019.0904/types/conference.yaml +9 -0
  215. data/vendor/bundle/ruby/2.6.0/gems/mime-types-data-3.2019.0904/types/drawing.yaml +15 -0
  216. data/vendor/bundle/ruby/2.6.0/gems/mime-types-data-3.2019.0904/types/font.yaml +65 -0
  217. data/vendor/bundle/ruby/2.6.0/gems/mime-types-data-3.2019.0904/types/image.yaml +1069 -0
  218. data/vendor/bundle/ruby/2.6.0/gems/mime-types-data-3.2019.0904/types/message.yaml +200 -0
  219. data/vendor/bundle/ruby/2.6.0/gems/mime-types-data-3.2019.0904/types/model.yaml +302 -0
  220. data/vendor/bundle/ruby/2.6.0/gems/mime-types-data-3.2019.0904/types/multipart.yaml +179 -0
  221. data/vendor/bundle/ruby/2.6.0/gems/mime-types-data-3.2019.0904/types/text.yaml +1046 -0
  222. data/vendor/bundle/ruby/2.6.0/gems/mime-types-data-3.2019.0904/types/video.yaml +1070 -0
  223. data/vendor/bundle/ruby/2.6.0/gems/mime-types-data-3.2019.0904/types/world.yaml +8 -0
  224. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/README.md +313 -0
  225. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/Rakefile +18 -0
  226. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/TODO +15 -0
  227. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/central_directory.rb +208 -0
  228. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/compressor.rb +9 -0
  229. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/constants.rb +63 -0
  230. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/crypto/encryption.rb +11 -0
  231. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/crypto/null_encryption.rb +43 -0
  232. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/crypto/traditional_encryption.rb +99 -0
  233. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/decompressor.rb +13 -0
  234. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/deflater.rb +34 -0
  235. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/dos_time.rb +48 -0
  236. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/entry.rb +688 -0
  237. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/entry_set.rb +86 -0
  238. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/errors.rb +17 -0
  239. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/extra_field/generic.rb +43 -0
  240. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/extra_field/ntfs.rb +90 -0
  241. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/extra_field/old_unix.rb +44 -0
  242. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/extra_field/universal_time.rb +47 -0
  243. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/extra_field/unix.rb +37 -0
  244. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/extra_field/zip64.rb +68 -0
  245. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/extra_field/zip64_placeholder.rb +15 -0
  246. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/extra_field.rb +101 -0
  247. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/file.rb +436 -0
  248. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/filesystem.rb +627 -0
  249. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/inflater.rb +66 -0
  250. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/input_stream.rb +173 -0
  251. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/ioextras/abstract_input_stream.rb +111 -0
  252. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/ioextras/abstract_output_stream.rb +43 -0
  253. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/ioextras.rb +36 -0
  254. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/null_compressor.rb +15 -0
  255. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/null_decompressor.rb +27 -0
  256. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/null_input_stream.rb +10 -0
  257. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/output_stream.rb +189 -0
  258. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/pass_thru_compressor.rb +23 -0
  259. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/pass_thru_decompressor.rb +40 -0
  260. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/streamable_directory.rb +15 -0
  261. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/streamable_stream.rb +56 -0
  262. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip/version.rb +3 -0
  263. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/lib/zip.rb +69 -0
  264. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/samples/example.rb +81 -0
  265. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/samples/example_filesystem.rb +31 -0
  266. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/samples/example_recursive.rb +54 -0
  267. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/samples/gtk_ruby_zip.rb +84 -0
  268. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/samples/qtzip.rb +92 -0
  269. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/samples/write_simple.rb +12 -0
  270. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/samples/zipfind.rb +66 -0
  271. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/basic_zip_file_test.rb +60 -0
  272. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/case_sensitivity_test.rb +69 -0
  273. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/central_directory_entry_test.rb +69 -0
  274. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/central_directory_test.rb +100 -0
  275. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/crypto/null_encryption_test.rb +57 -0
  276. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/crypto/traditional_encryption_test.rb +80 -0
  277. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/WarnInvalidDate.zip +0 -0
  278. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/file1.txt +46 -0
  279. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/file1.txt.deflatedData +0 -0
  280. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/file2.txt +1504 -0
  281. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/globTest/foo/bar/baz/foo.txt +0 -0
  282. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/globTest/foo.txt +0 -0
  283. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/globTest/food.txt +0 -0
  284. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/globTest.zip +0 -0
  285. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/gpbit3stored.zip +0 -0
  286. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/mimetype +1 -0
  287. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/notzippedruby.rb +7 -0
  288. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/ntfs.zip +0 -0
  289. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/oddExtraField.zip +0 -0
  290. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/path_traversal/Makefile +10 -0
  291. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/path_traversal/jwilk/README.md +5 -0
  292. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/path_traversal/jwilk/absolute1.zip +0 -0
  293. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/path_traversal/jwilk/absolute2.zip +0 -0
  294. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/path_traversal/jwilk/dirsymlink.zip +0 -0
  295. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/path_traversal/jwilk/dirsymlink2a.zip +0 -0
  296. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/path_traversal/jwilk/dirsymlink2b.zip +0 -0
  297. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/path_traversal/jwilk/relative0.zip +0 -0
  298. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/path_traversal/jwilk/relative2.zip +0 -0
  299. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/path_traversal/jwilk/symlink.zip +0 -0
  300. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/path_traversal/relative1.zip +0 -0
  301. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/path_traversal/tilde.zip +0 -0
  302. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/path_traversal/tuzovakaoff/README.md +3 -0
  303. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/path_traversal/tuzovakaoff/absolutepath.zip +0 -0
  304. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/path_traversal/tuzovakaoff/symlink.zip +0 -0
  305. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/rubycode.zip +0 -0
  306. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/rubycode2.zip +0 -0
  307. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/test.xls +0 -0
  308. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/testDirectory.bin +0 -0
  309. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/zip64-sample.zip +0 -0
  310. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/zipWithDirs.zip +0 -0
  311. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/data/zipWithEncryption.zip +0 -0
  312. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/deflater_test.rb +65 -0
  313. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/encryption_test.rb +42 -0
  314. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/entry_set_test.rb +163 -0
  315. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/entry_test.rb +154 -0
  316. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/errors_test.rb +35 -0
  317. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/extra_field_test.rb +76 -0
  318. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/file_extract_directory_test.rb +54 -0
  319. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/file_extract_test.rb +83 -0
  320. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/file_permissions_test.rb +65 -0
  321. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/file_split_test.rb +57 -0
  322. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/file_test.rb +646 -0
  323. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/filesystem/dir_iterator_test.rb +58 -0
  324. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/filesystem/directory_test.rb +139 -0
  325. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/filesystem/file_mutating_test.rb +87 -0
  326. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/filesystem/file_nonmutating_test.rb +508 -0
  327. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/filesystem/file_stat_test.rb +64 -0
  328. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/gentestfiles.rb +126 -0
  329. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/inflater_test.rb +14 -0
  330. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/input_stream_test.rb +182 -0
  331. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/ioextras/abstract_input_stream_test.rb +102 -0
  332. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/ioextras/abstract_output_stream_test.rb +106 -0
  333. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/ioextras/fake_io_test.rb +18 -0
  334. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/local_entry_test.rb +154 -0
  335. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/output_stream_test.rb +128 -0
  336. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/pass_thru_compressor_test.rb +30 -0
  337. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/pass_thru_decompressor_test.rb +14 -0
  338. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/path_traversal_test.rb +141 -0
  339. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/samples/example_recursive_test.rb +37 -0
  340. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/settings_test.rb +95 -0
  341. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/test_helper.rb +234 -0
  342. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/unicode_file_names_and_comments_test.rb +62 -0
  343. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/zip64_full_test.rb +51 -0
  344. data/vendor/bundle/ruby/2.6.0/gems/rubyzip-1.2.4/test/zip64_support_test.rb +14 -0
  345. data/vendor/bundle/ruby/2.6.0/gems/unf_ext-0.0.7.6/.document +5 -0
  346. data/vendor/bundle/ruby/2.6.0/gems/unf_ext-0.0.7.6/.gitignore +19 -0
  347. data/vendor/bundle/ruby/2.6.0/gems/unf_ext-0.0.7.6/.travis.yml +24 -0
  348. data/vendor/bundle/ruby/2.6.0/gems/unf_ext-0.0.7.6/CHANGELOG.md +42 -0
  349. data/vendor/bundle/ruby/2.6.0/gems/unf_ext-0.0.7.6/Gemfile +4 -0
  350. data/vendor/bundle/ruby/2.6.0/gems/unf_ext-0.0.7.6/LICENSE.txt +22 -0
  351. data/vendor/bundle/ruby/2.6.0/gems/unf_ext-0.0.7.6/README.md +57 -0
  352. data/vendor/bundle/ruby/2.6.0/gems/unf_ext-0.0.7.6/Rakefile +31 -0
  353. data/vendor/bundle/ruby/2.6.0/gems/unf_ext-0.0.7.6/ext/unf_ext/.sitearchdir.time +0 -0
  354. data/vendor/bundle/ruby/2.6.0/gems/unf_ext-0.0.7.6/ext/unf_ext/Makefile +265 -0
  355. data/vendor/bundle/ruby/2.6.0/gems/unf_ext-0.0.7.6/ext/unf_ext/extconf.rb +50 -0
  356. data/vendor/bundle/ruby/2.6.0/gems/unf_ext-0.0.7.6/ext/unf_ext/unf/normalizer.hh +139 -0
  357. data/vendor/bundle/ruby/2.6.0/gems/unf_ext-0.0.7.6/ext/unf_ext/unf/table.hh +13617 -0
  358. data/vendor/bundle/ruby/2.6.0/gems/unf_ext-0.0.7.6/ext/unf_ext/unf/trie/char_stream.hh +150 -0
  359. data/vendor/bundle/ruby/2.6.0/gems/unf_ext-0.0.7.6/ext/unf_ext/unf/trie/node.hh +25 -0
  360. data/vendor/bundle/ruby/2.6.0/gems/unf_ext-0.0.7.6/ext/unf_ext/unf/trie/searcher.hh +194 -0
  361. data/vendor/bundle/ruby/2.6.0/gems/unf_ext-0.0.7.6/ext/unf_ext/unf/util.hh +24 -0
  362. data/vendor/bundle/ruby/2.6.0/gems/unf_ext-0.0.7.6/ext/unf_ext/unf.cc +75 -0
  363. data/vendor/bundle/ruby/2.6.0/gems/unf_ext-0.0.7.6/ext/unf_ext/unf.o +0 -0
  364. data/vendor/bundle/ruby/2.6.0/gems/unf_ext-0.0.7.6/ext/unf_ext/unf_ext.so +0 -0
  365. data/vendor/bundle/ruby/2.6.0/gems/unf_ext-0.0.7.6/lib/unf_ext/version.rb +5 -0
  366. data/vendor/bundle/ruby/2.6.0/gems/unf_ext-0.0.7.6/lib/unf_ext.rb +5 -0
  367. data/vendor/bundle/ruby/2.6.0/gems/unf_ext-0.0.7.6/lib/unf_ext.so +0 -0
  368. data/vendor/bundle/ruby/2.6.0/gems/unf_ext-0.0.7.6/test/helper.rb +18 -0
  369. data/vendor/bundle/ruby/2.6.0/gems/unf_ext-0.0.7.6/test/normalization-test.txt +112332 -0
  370. data/vendor/bundle/ruby/2.6.0/gems/unf_ext-0.0.7.6/test/test_unf_ext.rb +41 -0
  371. data/vendor/bundle/ruby/2.6.0/gems/unf_ext-0.0.7.6/unf_ext.gemspec +42 -0
  372. data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/LICENSE +202 -0
  373. data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/README.md +276 -0
  374. data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/bin/rwinrm +90 -0
  375. data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/connection.rb +84 -0
  376. data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/connection_opts.rb +90 -0
  377. data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/exceptions.rb +88 -0
  378. data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/http/response_handler.rb +127 -0
  379. data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/http/transport.rb +462 -0
  380. data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/http/transport_factory.rb +64 -0
  381. data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/output.rb +58 -0
  382. data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/psrp/create_pipeline.xml.erb +167 -0
  383. data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/psrp/fragment.rb +68 -0
  384. data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/psrp/init_runspace_pool.xml.erb +224 -0
  385. data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/psrp/message.rb +128 -0
  386. data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/psrp/message_data/base.rb +47 -0
  387. data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/psrp/message_data/error_record.rb +66 -0
  388. data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/psrp/message_data/pipeline_host_call.rb +30 -0
  389. data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/psrp/message_data/pipeline_output.rb +48 -0
  390. data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/psrp/message_data/pipeline_state.rb +38 -0
  391. data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/psrp/message_data/runspacepool_host_call.rb +30 -0
  392. data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/psrp/message_data/runspacepool_state.rb +37 -0
  393. data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/psrp/message_data/session_capability.rb +34 -0
  394. data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/psrp/message_data.rb +40 -0
  395. data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/psrp/message_defragmenter.rb +62 -0
  396. data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/psrp/message_factory.rb +74 -0
  397. data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/psrp/message_fragmenter.rb +58 -0
  398. data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/psrp/powershell_output_decoder.rb +142 -0
  399. data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/psrp/receive_response_reader.rb +95 -0
  400. data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/psrp/session_capability.xml.erb +7 -0
  401. data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/psrp/uuid.rb +39 -0
  402. data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/shells/base.rb +187 -0
  403. data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/shells/cmd.rb +63 -0
  404. data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/shells/power_shell.rb +206 -0
  405. data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/shells/retryable.rb +44 -0
  406. data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/shells/shell_factory.rb +56 -0
  407. data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/version.rb +5 -0
  408. data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/wsmv/base.rb +57 -0
  409. data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/wsmv/cleanup_command.rb +60 -0
  410. data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/wsmv/close_shell.rb +49 -0
  411. data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/wsmv/command.rb +100 -0
  412. data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/wsmv/command_output.rb +75 -0
  413. data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/wsmv/command_output_decoder.rb +54 -0
  414. data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/wsmv/configuration.rb +44 -0
  415. data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/wsmv/create_pipeline.rb +64 -0
  416. data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/wsmv/create_shell.rb +115 -0
  417. data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/wsmv/header.rb +213 -0
  418. data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/wsmv/init_runspace_pool.rb +96 -0
  419. data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/wsmv/iso8601_duration.rb +58 -0
  420. data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/wsmv/keep_alive.rb +66 -0
  421. data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/wsmv/receive_response_reader.rb +128 -0
  422. data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/wsmv/send_data.rb +66 -0
  423. data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/wsmv/soap.rb +49 -0
  424. data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/wsmv/wql_pull.rb +54 -0
  425. data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/wsmv/wql_query.rb +98 -0
  426. data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm/wsmv/write_stdin.rb +86 -0
  427. data/vendor/bundle/ruby/2.6.0/gems/winrm-2.3.2/lib/winrm.rb +37 -0
  428. data/vendor/bundle/ruby/2.6.0/specifications/bcrypt_pbkdf-1.0.1.gemspec +49 -0
  429. data/vendor/bundle/ruby/2.6.0/specifications/domain_name-0.5.20190701.gemspec +46 -0
  430. data/vendor/bundle/ruby/2.6.0/specifications/gssapi-1.3.0.gemspec +36 -0
  431. data/vendor/bundle/ruby/2.6.0/specifications/mime-types-3.3.gemspec +84 -0
  432. data/vendor/bundle/ruby/2.6.0/specifications/mime-types-data-3.2019.0904.gemspec +60 -0
  433. data/vendor/bundle/ruby/2.6.0/specifications/rubyzip-1.2.4.gemspec +44 -0
  434. data/vendor/bundle/ruby/2.6.0/specifications/unf_ext-0.0.7.6.gemspec +51 -0
  435. data/vendor/bundle/ruby/2.6.0/specifications/winrm-2.3.2.gemspec +73 -0
  436. data/version.txt +1 -1
  437. metadata +365 -6
  438. 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