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,508 @@
1
+ require 'test_helper'
2
+ require 'zip/filesystem'
3
+
4
+ class ZipFsFileNonmutatingTest < MiniTest::Test
5
+ def setup
6
+ @zipsha = Digest::SHA1.file('test/data/zipWithDirs.zip')
7
+ @zip_file = ::Zip::File.new('test/data/zipWithDirs.zip')
8
+ end
9
+
10
+ def teardown
11
+ @zip_file.close if @zip_file
12
+ assert_equal(@zipsha, Digest::SHA1.file('test/data/zipWithDirs.zip'))
13
+ end
14
+
15
+ def test_umask
16
+ assert_equal(::File.umask, @zip_file.file.umask)
17
+ @zip_file.file.umask(0o006)
18
+ end
19
+
20
+ def test_exists?
21
+ assert(!@zip_file.file.exists?('notAFile'))
22
+ assert(@zip_file.file.exists?('file1'))
23
+ assert(@zip_file.file.exists?('dir1'))
24
+ assert(@zip_file.file.exists?('dir1/'))
25
+ assert(@zip_file.file.exists?('dir1/file12'))
26
+ assert(@zip_file.file.exist?('dir1/file12')) # notice, tests exist? alias of exists? !
27
+
28
+ @zip_file.dir.chdir 'dir1/'
29
+ assert(!@zip_file.file.exists?('file1'))
30
+ assert(@zip_file.file.exists?('file12'))
31
+ end
32
+
33
+ def test_open_read
34
+ blockCalled = false
35
+ @zip_file.file.open('file1', 'r') do |f|
36
+ blockCalled = true
37
+ assert_equal("this is the entry 'file1' in my test archive!",
38
+ f.readline.chomp)
39
+ end
40
+ assert(blockCalled)
41
+
42
+ blockCalled = false
43
+ @zip_file.file.open('file1', 'rb') do |f| # test binary flag is ignored
44
+ blockCalled = true
45
+ assert_equal("this is the entry 'file1' in my test archive!",
46
+ f.readline.chomp)
47
+ end
48
+ assert(blockCalled)
49
+
50
+ blockCalled = false
51
+ @zip_file.dir.chdir 'dir2'
52
+ @zip_file.file.open('file21', 'r') do |f|
53
+ blockCalled = true
54
+ assert_equal("this is the entry 'dir2/file21' in my test archive!",
55
+ f.readline.chomp)
56
+ end
57
+ assert(blockCalled)
58
+ @zip_file.dir.chdir '/'
59
+
60
+ assert_raises(Errno::ENOENT) do
61
+ @zip_file.file.open('noSuchEntry')
62
+ end
63
+
64
+ begin
65
+ is = @zip_file.file.open('file1')
66
+ assert_equal("this is the entry 'file1' in my test archive!",
67
+ is.readline.chomp)
68
+ ensure
69
+ is.close if is
70
+ end
71
+ end
72
+
73
+ def test_new
74
+ begin
75
+ is = @zip_file.file.new('file1')
76
+ assert_equal("this is the entry 'file1' in my test archive!",
77
+ is.readline.chomp)
78
+ ensure
79
+ is.close if is
80
+ end
81
+ begin
82
+ is = @zip_file.file.new('file1') do
83
+ fail 'should not call block'
84
+ end
85
+ ensure
86
+ is.close if is
87
+ end
88
+ end
89
+
90
+ def test_symlink
91
+ assert_raises(NotImplementedError) do
92
+ @zip_file.file.symlink('file1', 'aSymlink')
93
+ end
94
+ end
95
+
96
+ def test_size
97
+ assert_raises(Errno::ENOENT) { @zip_file.file.size('notAFile') }
98
+ assert_equal(72, @zip_file.file.size('file1'))
99
+ assert_equal(0, @zip_file.file.size('dir2/dir21'))
100
+
101
+ assert_equal(72, @zip_file.file.stat('file1').size)
102
+ assert_equal(0, @zip_file.file.stat('dir2/dir21').size)
103
+ end
104
+
105
+ def test_size?
106
+ assert_nil(@zip_file.file.size?('notAFile'))
107
+ assert_equal(72, @zip_file.file.size?('file1'))
108
+ assert_nil(@zip_file.file.size?('dir2/dir21'))
109
+
110
+ assert_equal(72, @zip_file.file.stat('file1').size?)
111
+ assert_nil(@zip_file.file.stat('dir2/dir21').size?)
112
+ end
113
+
114
+ def test_file?
115
+ assert(@zip_file.file.file?('file1'))
116
+ assert(@zip_file.file.file?('dir2/file21'))
117
+ assert(!@zip_file.file.file?('dir1'))
118
+ assert(!@zip_file.file.file?('dir1/dir11'))
119
+
120
+ assert(@zip_file.file.stat('file1').file?)
121
+ assert(@zip_file.file.stat('dir2/file21').file?)
122
+ assert(!@zip_file.file.stat('dir1').file?)
123
+ assert(!@zip_file.file.stat('dir1/dir11').file?)
124
+ end
125
+
126
+ include ExtraAssertions
127
+
128
+ def test_dirname
129
+ assert_forwarded(File, :dirname, 'retVal', 'a/b/c/d') do
130
+ @zip_file.file.dirname('a/b/c/d')
131
+ end
132
+ end
133
+
134
+ def test_basename
135
+ assert_forwarded(File, :basename, 'retVal', 'a/b/c/d') do
136
+ @zip_file.file.basename('a/b/c/d')
137
+ end
138
+ end
139
+
140
+ def test_split
141
+ assert_forwarded(File, :split, 'retVal', 'a/b/c/d') do
142
+ @zip_file.file.split('a/b/c/d')
143
+ end
144
+ end
145
+
146
+ def test_join
147
+ assert_equal('a/b/c', @zip_file.file.join('a/b', 'c'))
148
+ assert_equal('a/b/c/d', @zip_file.file.join('a/b', 'c/d'))
149
+ assert_equal('/c/d', @zip_file.file.join('', 'c/d'))
150
+ assert_equal('a/b/c/d', @zip_file.file.join('a', 'b', 'c', 'd'))
151
+ end
152
+
153
+ def test_utime
154
+ t_now = ::Zip::DOSTime.now
155
+ t_bak = @zip_file.file.mtime('file1')
156
+ @zip_file.file.utime(t_now, 'file1')
157
+ assert_equal(t_now, @zip_file.file.mtime('file1'))
158
+ @zip_file.file.utime(t_bak, 'file1')
159
+ assert_equal(t_bak, @zip_file.file.mtime('file1'))
160
+ end
161
+
162
+ def assert_always_false(operation)
163
+ assert(!@zip_file.file.send(operation, 'noSuchFile'))
164
+ assert(!@zip_file.file.send(operation, 'file1'))
165
+ assert(!@zip_file.file.send(operation, 'dir1'))
166
+ assert(!@zip_file.file.stat('file1').send(operation))
167
+ assert(!@zip_file.file.stat('dir1').send(operation))
168
+ end
169
+
170
+ def assert_true_if_entry_exists(operation)
171
+ assert(!@zip_file.file.send(operation, 'noSuchFile'))
172
+ assert(@zip_file.file.send(operation, 'file1'))
173
+ assert(@zip_file.file.send(operation, 'dir1'))
174
+ assert(@zip_file.file.stat('file1').send(operation))
175
+ assert(@zip_file.file.stat('dir1').send(operation))
176
+ end
177
+
178
+ def test_pipe?
179
+ assert_always_false(:pipe?)
180
+ end
181
+
182
+ def test_blockdev?
183
+ assert_always_false(:blockdev?)
184
+ end
185
+
186
+ def test_symlink?
187
+ assert_always_false(:symlink?)
188
+ end
189
+
190
+ def test_socket?
191
+ assert_always_false(:socket?)
192
+ end
193
+
194
+ def test_chardev?
195
+ assert_always_false(:chardev?)
196
+ end
197
+
198
+ def test_truncate
199
+ assert_raises(StandardError, 'truncate not supported') do
200
+ @zip_file.file.truncate('file1', 100)
201
+ end
202
+ end
203
+
204
+ def assert_e_n_o_e_n_t(operation, args = ['NoSuchFile'])
205
+ assert_raises(Errno::ENOENT) do
206
+ @zip_file.file.send(operation, *args)
207
+ end
208
+ end
209
+
210
+ def test_ftype
211
+ assert_e_n_o_e_n_t(:ftype)
212
+ assert_equal('file', @zip_file.file.ftype('file1'))
213
+ assert_equal('directory', @zip_file.file.ftype('dir1/dir11'))
214
+ assert_equal('directory', @zip_file.file.ftype('dir1/dir11/'))
215
+ end
216
+
217
+ def test_link
218
+ assert_raises(NotImplementedError) do
219
+ @zip_file.file.link('file1', 'someOtherString')
220
+ end
221
+ end
222
+
223
+ def test_directory?
224
+ assert(!@zip_file.file.directory?('notAFile'))
225
+ assert(!@zip_file.file.directory?('file1'))
226
+ assert(!@zip_file.file.directory?('dir1/file11'))
227
+ assert(@zip_file.file.directory?('dir1'))
228
+ assert(@zip_file.file.directory?('dir1/'))
229
+ assert(@zip_file.file.directory?('dir2/dir21'))
230
+
231
+ assert(!@zip_file.file.stat('file1').directory?)
232
+ assert(!@zip_file.file.stat('dir1/file11').directory?)
233
+ assert(@zip_file.file.stat('dir1').directory?)
234
+ assert(@zip_file.file.stat('dir1/').directory?)
235
+ assert(@zip_file.file.stat('dir2/dir21').directory?)
236
+ end
237
+
238
+ def test_chown
239
+ assert_equal(2, @zip_file.file.chown(1, 2, 'dir1', 'file1'))
240
+ assert_equal(1, @zip_file.file.stat('dir1').uid)
241
+ assert_equal(2, @zip_file.file.stat('dir1').gid)
242
+ assert_equal(2, @zip_file.file.chown(nil, nil, 'dir1', 'file1'))
243
+ end
244
+
245
+ def test_zero?
246
+ assert(!@zip_file.file.zero?('notAFile'))
247
+ assert(!@zip_file.file.zero?('file1'))
248
+ assert(@zip_file.file.zero?('dir1'))
249
+ blockCalled = false
250
+ ::Zip::File.open('test/data/generated/5entry.zip') do |zf|
251
+ blockCalled = true
252
+ assert(zf.file.zero?('test/data/generated/empty.txt'))
253
+ end
254
+ assert(blockCalled)
255
+
256
+ assert(!@zip_file.file.stat('file1').zero?)
257
+ assert(@zip_file.file.stat('dir1').zero?)
258
+ blockCalled = false
259
+ ::Zip::File.open('test/data/generated/5entry.zip') do |zf|
260
+ blockCalled = true
261
+ assert(zf.file.stat('test/data/generated/empty.txt').zero?)
262
+ end
263
+ assert(blockCalled)
264
+ end
265
+
266
+ def test_expand_path
267
+ ::Zip::File.open('test/data/zipWithDirs.zip') do |zf|
268
+ assert_equal('/', zf.file.expand_path('.'))
269
+ zf.dir.chdir 'dir1'
270
+ assert_equal('/dir1', zf.file.expand_path('.'))
271
+ assert_equal('/dir1/file12', zf.file.expand_path('file12'))
272
+ assert_equal('/', zf.file.expand_path('..'))
273
+ assert_equal('/dir2/dir21', zf.file.expand_path('../dir2/dir21'))
274
+ end
275
+ end
276
+
277
+ def test_mtime
278
+ assert_equal(::Zip::DOSTime.at(1_027_694_306),
279
+ @zip_file.file.mtime('dir2/file21'))
280
+ assert_equal(::Zip::DOSTime.at(1_027_690_863),
281
+ @zip_file.file.mtime('dir2/dir21'))
282
+ assert_raises(Errno::ENOENT) do
283
+ @zip_file.file.mtime('noSuchEntry')
284
+ end
285
+
286
+ assert_equal(::Zip::DOSTime.at(1_027_694_306),
287
+ @zip_file.file.stat('dir2/file21').mtime)
288
+ assert_equal(::Zip::DOSTime.at(1_027_690_863),
289
+ @zip_file.file.stat('dir2/dir21').mtime)
290
+ end
291
+
292
+ def test_ctime
293
+ assert_nil(@zip_file.file.ctime('file1'))
294
+ assert_nil(@zip_file.file.stat('file1').ctime)
295
+ end
296
+
297
+ def test_atime
298
+ assert_nil(@zip_file.file.atime('file1'))
299
+ assert_nil(@zip_file.file.stat('file1').atime)
300
+ end
301
+
302
+ def test_ntfs_time
303
+ ::Zip::File.open('test/data/ntfs.zip') do |zf|
304
+ t = ::Zip::DOSTime.at(1_410_496_497.405178)
305
+ assert_equal(zf.file.mtime('data.txt'), t)
306
+ assert_equal(zf.file.atime('data.txt'), t)
307
+ assert_equal(zf.file.ctime('data.txt'), t)
308
+ end
309
+ end
310
+
311
+ def test_readable?
312
+ assert(!@zip_file.file.readable?('noSuchFile'))
313
+ assert(@zip_file.file.readable?('file1'))
314
+ assert(@zip_file.file.readable?('dir1'))
315
+ assert(@zip_file.file.stat('file1').readable?)
316
+ assert(@zip_file.file.stat('dir1').readable?)
317
+ end
318
+
319
+ def test_readable_real?
320
+ assert(!@zip_file.file.readable_real?('noSuchFile'))
321
+ assert(@zip_file.file.readable_real?('file1'))
322
+ assert(@zip_file.file.readable_real?('dir1'))
323
+ assert(@zip_file.file.stat('file1').readable_real?)
324
+ assert(@zip_file.file.stat('dir1').readable_real?)
325
+ end
326
+
327
+ def test_writable?
328
+ assert(!@zip_file.file.writable?('noSuchFile'))
329
+ assert(@zip_file.file.writable?('file1'))
330
+ assert(@zip_file.file.writable?('dir1'))
331
+ assert(@zip_file.file.stat('file1').writable?)
332
+ assert(@zip_file.file.stat('dir1').writable?)
333
+ end
334
+
335
+ def test_writable_real?
336
+ assert(!@zip_file.file.writable_real?('noSuchFile'))
337
+ assert(@zip_file.file.writable_real?('file1'))
338
+ assert(@zip_file.file.writable_real?('dir1'))
339
+ assert(@zip_file.file.stat('file1').writable_real?)
340
+ assert(@zip_file.file.stat('dir1').writable_real?)
341
+ end
342
+
343
+ def test_executable?
344
+ assert(!@zip_file.file.executable?('noSuchFile'))
345
+ assert(!@zip_file.file.executable?('file1'))
346
+ assert(@zip_file.file.executable?('dir1'))
347
+ assert(!@zip_file.file.stat('file1').executable?)
348
+ assert(@zip_file.file.stat('dir1').executable?)
349
+ end
350
+
351
+ def test_executable_real?
352
+ assert(!@zip_file.file.executable_real?('noSuchFile'))
353
+ assert(!@zip_file.file.executable_real?('file1'))
354
+ assert(@zip_file.file.executable_real?('dir1'))
355
+ assert(!@zip_file.file.stat('file1').executable_real?)
356
+ assert(@zip_file.file.stat('dir1').executable_real?)
357
+ end
358
+
359
+ def test_owned?
360
+ assert_true_if_entry_exists(:owned?)
361
+ end
362
+
363
+ def test_grpowned?
364
+ assert_true_if_entry_exists(:grpowned?)
365
+ end
366
+
367
+ def test_setgid?
368
+ assert_always_false(:setgid?)
369
+ end
370
+
371
+ def test_setuid?
372
+ assert_always_false(:setgid?)
373
+ end
374
+
375
+ def test_sticky?
376
+ assert_always_false(:sticky?)
377
+ end
378
+
379
+ def test_readlink
380
+ assert_raises(NotImplementedError) do
381
+ @zip_file.file.readlink('someString')
382
+ end
383
+ end
384
+
385
+ def test_stat
386
+ s = @zip_file.file.stat('file1')
387
+ assert(s.kind_of?(File::Stat)) # It pretends
388
+ assert_raises(Errno::ENOENT, 'No such file or directory - noSuchFile') do
389
+ @zip_file.file.stat('noSuchFile')
390
+ end
391
+ end
392
+
393
+ def test_lstat
394
+ assert(@zip_file.file.lstat('file1').file?)
395
+ end
396
+
397
+ def test_pipe
398
+ assert_raises(NotImplementedError) do
399
+ @zip_file.file.pipe
400
+ end
401
+ end
402
+
403
+ def test_foreach
404
+ ::Zip::File.open('test/data/generated/zipWithDir.zip') do |zf|
405
+ ref = []
406
+ File.foreach('test/data/file1.txt') { |e| ref << e }
407
+ index = 0
408
+
409
+ zf.file.foreach('test/data/file1.txt') do |l|
410
+ # Ruby replaces \n with \r\n automatically on windows
411
+ newline = Zip::RUNNING_ON_WINDOWS ? l.gsub(/\r\n/, "\n") : l
412
+ assert_equal(ref[index], newline)
413
+ index = index.next
414
+ end
415
+ assert_equal(ref.size, index)
416
+ end
417
+
418
+ ::Zip::File.open('test/data/generated/zipWithDir.zip') do |zf|
419
+ ref = []
420
+ File.foreach('test/data/file1.txt', ' ') { |e| ref << e }
421
+ index = 0
422
+
423
+ zf.file.foreach('test/data/file1.txt', ' ') do |l|
424
+ # Ruby replaces \n with \r\n automatically on windows
425
+ newline = Zip::RUNNING_ON_WINDOWS ? l.gsub(/\r\n/, "\n") : l
426
+ assert_equal(ref[index], newline)
427
+ index = index.next
428
+ end
429
+ assert_equal(ref.size, index)
430
+ end
431
+ end
432
+
433
+ def test_glob
434
+ ::Zip::File.open('test/data/globTest.zip') do |zf|
435
+ {
436
+ 'globTest/foo.txt' => ['globTest/foo.txt'],
437
+ '*/foo.txt' => ['globTest/foo.txt'],
438
+ '**/foo.txt' => ['globTest/foo.txt', 'globTest/foo/bar/baz/foo.txt'],
439
+ '*/foo/**/*.txt' => ['globTest/foo/bar/baz/foo.txt']
440
+ }.each do |spec, expected_results|
441
+ results = zf.glob(spec)
442
+ assert results.all? { |entry| entry.is_a? ::Zip::Entry }
443
+
444
+ result_strings = results.map(&:to_s)
445
+ missing_matches = expected_results - result_strings
446
+ extra_matches = result_strings - expected_results
447
+
448
+ assert extra_matches.empty?, "spec #{spec.inspect} has extra results #{extra_matches.inspect}"
449
+ assert missing_matches.empty?, "spec #{spec.inspect} missing results #{missing_matches.inspect}"
450
+ end
451
+ end
452
+
453
+ ::Zip::File.open('test/data/globTest.zip') do |zf|
454
+ results = []
455
+ zf.glob('**/foo.txt') do |match|
456
+ results << "<#{match.class.name}: #{match}>"
457
+ end
458
+ assert(!results.empty?, 'block not run, or run out of context')
459
+ assert_equal 2, results.size
460
+ assert_operator results, :include?, '<Zip::Entry: globTest/foo.txt>'
461
+ assert_operator results, :include?, '<Zip::Entry: globTest/foo/bar/baz/foo.txt>'
462
+ end
463
+ end
464
+
465
+ def test_popen
466
+ if Zip::RUNNING_ON_WINDOWS
467
+ # This is pretty much projectile vomit but it allows the test to be
468
+ # run on windows also
469
+ system_dir = ::File.popen('dir') { |f| f.read }.gsub(/Dir\(s\).*$/, '')
470
+ zipfile_dir = @zip_file.file.popen('dir') { |f| f.read }.gsub(/Dir\(s\).*$/, '')
471
+ assert_equal(system_dir, zipfile_dir)
472
+ else
473
+ assert_equal(::File.popen('ls') { |f| f.read },
474
+ @zip_file.file.popen('ls') { |f| f.read })
475
+ end
476
+ end
477
+
478
+ # Can be added later
479
+ # def test_select
480
+ # fail "implement test"
481
+ # end
482
+
483
+ def test_readlines
484
+ ::Zip::File.open('test/data/generated/zipWithDir.zip') do |zf|
485
+ orig_file = ::File.readlines('test/data/file1.txt')
486
+ zip_file = zf.file.readlines('test/data/file1.txt')
487
+
488
+ # Ruby replaces \n with \r\n automatically on windows
489
+ zip_file.each { |l| l.gsub!(/\r\n/, "\n") } if Zip::RUNNING_ON_WINDOWS
490
+
491
+ assert_equal(orig_file, zip_file)
492
+ end
493
+ end
494
+
495
+ def test_read
496
+ ::Zip::File.open('test/data/generated/zipWithDir.zip') do |zf|
497
+ orig_file = ::File.read('test/data/file1.txt')
498
+
499
+ # Ruby replaces \n with \r\n automatically on windows
500
+ zip_file = if Zip::RUNNING_ON_WINDOWS
501
+ zf.file.read('test/data/file1.txt').gsub(/\r\n/, "\n")
502
+ else
503
+ zf.file.read('test/data/file1.txt')
504
+ end
505
+ assert_equal(orig_file, zip_file)
506
+ end
507
+ end
508
+ end
@@ -0,0 +1,64 @@
1
+ require 'test_helper'
2
+ require 'zip/filesystem'
3
+
4
+ class ZipFsFileStatTest < MiniTest::Test
5
+ def setup
6
+ @zip_file = ::Zip::File.new('test/data/zipWithDirs.zip')
7
+ end
8
+
9
+ def teardown
10
+ @zip_file.close if @zip_file
11
+ end
12
+
13
+ def test_blocks
14
+ assert_nil(@zip_file.file.stat('file1').blocks)
15
+ end
16
+
17
+ def test_ino
18
+ assert_equal(0, @zip_file.file.stat('file1').ino)
19
+ end
20
+
21
+ def test_uid
22
+ assert_equal(0, @zip_file.file.stat('file1').uid)
23
+ end
24
+
25
+ def test_gid
26
+ assert_equal(0, @zip_file.file.stat('file1').gid)
27
+ end
28
+
29
+ def test_ftype
30
+ assert_equal('file', @zip_file.file.stat('file1').ftype)
31
+ assert_equal('directory', @zip_file.file.stat('dir1').ftype)
32
+ end
33
+
34
+ def test_mode
35
+ assert_equal(0o600, @zip_file.file.stat('file1').mode & 0o777)
36
+ assert_equal(0o600, @zip_file.file.stat('file1').mode & 0o777)
37
+ assert_equal(0o755, @zip_file.file.stat('dir1').mode & 0o777)
38
+ assert_equal(0o755, @zip_file.file.stat('dir1').mode & 0o777)
39
+ end
40
+
41
+ def test_dev
42
+ assert_equal(0, @zip_file.file.stat('file1').dev)
43
+ end
44
+
45
+ def test_rdev
46
+ assert_equal(0, @zip_file.file.stat('file1').rdev)
47
+ end
48
+
49
+ def test_rdev_major
50
+ assert_equal(0, @zip_file.file.stat('file1').rdev_major)
51
+ end
52
+
53
+ def test_rdev_minor
54
+ assert_equal(0, @zip_file.file.stat('file1').rdev_minor)
55
+ end
56
+
57
+ def test_nlink
58
+ assert_equal(1, @zip_file.file.stat('file1').nlink)
59
+ end
60
+
61
+ def test_blksize
62
+ assert_nil(@zip_file.file.stat('file1').blksize)
63
+ end
64
+ end
@@ -0,0 +1,126 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ $VERBOSE = true
4
+
5
+ class TestFiles
6
+ RANDOM_ASCII_FILE1 = 'test/data/generated/randomAscii1.txt'
7
+ RANDOM_ASCII_FILE2 = 'test/data/generated/randomAscii2.txt'
8
+ RANDOM_ASCII_FILE3 = 'test/data/generated/randomAscii3.txt'
9
+ RANDOM_BINARY_FILE1 = 'test/data/generated/randomBinary1.bin'
10
+ RANDOM_BINARY_FILE2 = 'test/data/generated/randomBinary2.bin'
11
+
12
+ NULL_FILE = 'test/data/generated/null.zip' # Zero length, so not a zip file.
13
+
14
+ EMPTY_TEST_DIR = 'test/data/generated/emptytestdir'
15
+
16
+ ASCII_TEST_FILES = [RANDOM_ASCII_FILE1, RANDOM_ASCII_FILE2, RANDOM_ASCII_FILE3]
17
+ BINARY_TEST_FILES = [RANDOM_BINARY_FILE1, RANDOM_BINARY_FILE2]
18
+ TEST_DIRECTORIES = [EMPTY_TEST_DIR]
19
+ TEST_FILES = [ASCII_TEST_FILES, BINARY_TEST_FILES, EMPTY_TEST_DIR].flatten!
20
+
21
+ class << self
22
+ def create_test_files
23
+ Dir.mkdir 'test/data/generated' unless Dir.exist?('test/data/generated')
24
+
25
+ ASCII_TEST_FILES.each_with_index do |filename, index|
26
+ create_random_ascii(filename, 1E4 * (index + 1))
27
+ end
28
+
29
+ BINARY_TEST_FILES.each_with_index do |filename, index|
30
+ create_random_binary(filename, 1E4 * (index + 1))
31
+ end
32
+
33
+ system("touch #{NULL_FILE}")
34
+
35
+ ensure_dir(EMPTY_TEST_DIR)
36
+ end
37
+
38
+ private
39
+
40
+ def create_random_ascii(filename, size)
41
+ File.open(filename, 'wb') do |file|
42
+ file << rand while file.tell < size
43
+ end
44
+ end
45
+
46
+ def create_random_binary(filename, size)
47
+ File.open(filename, 'wb') do |file|
48
+ file << [rand].pack('V') while file.tell < size
49
+ end
50
+ end
51
+
52
+ def ensure_dir(name)
53
+ if File.exist?(name)
54
+ return if File.stat(name).directory?
55
+ File.delete(name)
56
+ end
57
+ Dir.mkdir(name)
58
+ end
59
+ end
60
+ end
61
+
62
+ # For representation and creation of
63
+ # test data
64
+ class TestZipFile
65
+ attr_accessor :zip_name, :entry_names, :comment
66
+
67
+ def initialize(zip_name, entry_names, comment = '')
68
+ @zip_name = zip_name
69
+ @entry_names = entry_names
70
+ @comment = comment
71
+ end
72
+
73
+ def self.create_test_zips
74
+ raise "failed to create test zip '#{TEST_ZIP1.zip_name}'" unless system("/usr/bin/zip -q #{TEST_ZIP1.zip_name} test/data/file2.txt")
75
+ raise "failed to remove entry from '#{TEST_ZIP1.zip_name}'" unless system("/usr/bin/zip -q #{TEST_ZIP1.zip_name} -d test/data/file2.txt")
76
+
77
+ File.open('test/data/generated/empty.txt', 'w') {}
78
+ File.open('test/data/generated/empty_chmod640.txt', 'w') {}
79
+ ::File.chmod(0o640, 'test/data/generated/empty_chmod640.txt')
80
+
81
+ File.open('test/data/generated/short.txt', 'w') { |file| file << 'ABCDEF' }
82
+ ziptestTxt = ''
83
+ File.open('test/data/file2.txt') { |file| ziptestTxt = file.read }
84
+ File.open('test/data/generated/longAscii.txt', 'w') do |file|
85
+ file << ziptestTxt while file.tell < 1E5
86
+ end
87
+
88
+ testBinaryPattern = ''
89
+ File.open('test/data/generated/empty.zip') { |file| testBinaryPattern = file.read }
90
+ testBinaryPattern *= 4
91
+
92
+ File.open('test/data/generated/longBinary.bin', 'wb') do |file|
93
+ file << testBinaryPattern << rand << "\0" while file.tell < 6E5
94
+ end
95
+
96
+ raise "failed to create test zip '#{TEST_ZIP2.zip_name}'" unless system("/usr/bin/zip -q #{TEST_ZIP2.zip_name} #{TEST_ZIP2.entry_names.join(' ')}")
97
+
98
+ if RUBY_PLATFORM =~ /mswin|mingw|cygwin/
99
+ raise "failed to add comment to test zip '#{TEST_ZIP2.zip_name}'" unless system("echo #{TEST_ZIP2.comment}| /usr/bin/zip -zq #{TEST_ZIP2.zip_name}\"")
100
+ else
101
+ # without bash system interprets everything after echo as parameters to
102
+ # echo including | zip -z ...
103
+ raise "failed to add comment to test zip '#{TEST_ZIP2.zip_name}'" unless system("bash -c \"echo #{TEST_ZIP2.comment} | /usr/bin/zip -zq #{TEST_ZIP2.zip_name}\"")
104
+ end
105
+
106
+ raise "failed to create test zip '#{TEST_ZIP3.zip_name}'" unless system("/usr/bin/zip -q #{TEST_ZIP3.zip_name} #{TEST_ZIP3.entry_names.join(' ')}")
107
+
108
+ raise "failed to create test zip '#{TEST_ZIP4.zip_name}'" unless system("/usr/bin/zip -q #{TEST_ZIP4.zip_name} #{TEST_ZIP4.entry_names.join(' ')}")
109
+ rescue
110
+ # If there are any Windows developers wanting to use a command line zip.exe
111
+ # to help create the following files, there's a free one available from
112
+ # http://stahlworks.com/dev/index.php?tool=zipunzip
113
+ # that works with the above code
114
+ raise $!.to_s +
115
+ "\n\nziptest.rb requires the Info-ZIP program 'zip' in the path\n" \
116
+ "to create test data. If you don't have it you can download\n" \
117
+ 'the necessary test files at http://sf.net/projects/rubyzip.'
118
+ end
119
+
120
+ TEST_ZIP1 = TestZipFile.new('test/data/generated/empty.zip', [])
121
+ TEST_ZIP2 = TestZipFile.new('test/data/generated/5entry.zip', %w[test/data/generated/longAscii.txt test/data/generated/empty.txt test/data/generated/empty_chmod640.txt test/data/generated/short.txt test/data/generated/longBinary.bin],
122
+ 'my zip comment')
123
+ TEST_ZIP3 = TestZipFile.new('test/data/generated/test1.zip', %w[test/data/file1.txt])
124
+ TEST_ZIP4 = TestZipFile.new('test/data/generated/zipWithDir.zip', ['test/data/file1.txt',
125
+ TestFiles::EMPTY_TEST_DIR])
126
+ end