vagrant-unbundled 2.0.3.0 → 2.0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (164) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +43 -10
  3. data/Gemfile.lock +16 -2
  4. data/README.md +1 -0
  5. data/bin/vagrant +1 -1
  6. data/lib/vagrant/action/builtin/handle_box.rb +1 -1
  7. data/lib/vagrant/action/general/package.rb +1 -1
  8. data/lib/vagrant/action.rb +3 -1
  9. data/lib/vagrant/alias.rb +56 -0
  10. data/lib/vagrant/bundler.rb +1 -1
  11. data/lib/vagrant/capability_host.rb +1 -1
  12. data/lib/vagrant/cli.rb +8 -0
  13. data/lib/vagrant/config/version_base.rb +1 -1
  14. data/lib/vagrant/environment.rb +7 -1
  15. data/lib/vagrant/errors.rb +4 -0
  16. data/lib/vagrant/host.rb +1 -1
  17. data/lib/vagrant/machine.rb +1 -1
  18. data/lib/vagrant/machine_index.rb +1 -1
  19. data/lib/vagrant/plugin/v1/guest.rb +1 -1
  20. data/lib/vagrant/plugin/v1/host.rb +1 -1
  21. data/lib/vagrant/plugin/v1/plugin.rb +1 -1
  22. data/lib/vagrant/plugin/v1/provider.rb +1 -1
  23. data/lib/vagrant/plugin/v2/guest.rb +1 -1
  24. data/lib/vagrant/plugin/v2/host.rb +1 -1
  25. data/lib/vagrant/plugin/v2/plugin.rb +1 -1
  26. data/lib/vagrant/plugin/v2/provider.rb +1 -1
  27. data/lib/vagrant/shared_helpers.rb +30 -9
  28. data/lib/vagrant/util/checkpoint_client.rb +8 -0
  29. data/lib/vagrant/util/downloader.rb +1 -1
  30. data/lib/vagrant/util/platform.rb +11 -3
  31. data/lib/vagrant/util/powershell.rb +17 -1
  32. data/lib/vagrant/util/safe_exec.rb +1 -1
  33. data/lib/vagrant/util/ssh.rb +4 -1
  34. data/lib/vagrant/util/stacked_proc_runner.rb +1 -1
  35. data/lib/vagrant/util/template_renderer.rb +2 -2
  36. data/lib/vagrant/vagrantfile.rb +1 -1
  37. data/lib/vagrant.rb +8 -0
  38. data/plugins/commands/plugin/gem_helper.rb +1 -1
  39. data/plugins/commands/powershell/command.rb +2 -2
  40. data/plugins/commands/powershell/scripts/enable_psremoting.ps1 +1 -1
  41. data/plugins/communicators/ssh/communicator.rb +10 -1
  42. data/plugins/communicators/winrm/command_filters/mkdir.rb +4 -2
  43. data/plugins/communicators/winrm/command_filters/rm.rb +5 -3
  44. data/plugins/communicators/winrm/command_filters/test.rb +3 -1
  45. data/plugins/communicators/winrm/command_filters/which.rb +4 -2
  46. data/plugins/communicators/winrm/communicator.rb +3 -3
  47. data/plugins/guests/amazon/cap/flavor.rb +1 -1
  48. data/plugins/guests/coreos/cap/configure_networks.rb +1 -1
  49. data/plugins/guests/coreos/guest.rb +1 -1
  50. data/plugins/guests/debian/cap/configure_networks.rb +1 -1
  51. data/plugins/guests/freebsd/cap/configure_networks.rb +1 -1
  52. data/plugins/guests/photon/guest.rb +1 -1
  53. data/plugins/guests/windows/cap/change_host_name.rb +6 -1
  54. data/plugins/guests/windows/cap/mount_shared_folder.rb +1 -1
  55. data/plugins/hosts/alt/plugin.rb +1 -1
  56. data/plugins/hosts/arch/plugin.rb +1 -1
  57. data/plugins/hosts/gentoo/plugin.rb +1 -1
  58. data/plugins/hosts/linux/plugin.rb +1 -1
  59. data/plugins/hosts/redhat/plugin.rb +1 -1
  60. data/plugins/hosts/slackware/plugin.rb +2 -2
  61. data/plugins/kernel_v2/config/push.rb +1 -1
  62. data/plugins/kernel_v2/config/vm.rb +1 -1
  63. data/plugins/providers/docker/action/compare_synced_folders.rb +1 -1
  64. data/plugins/providers/virtualbox/action/network.rb +9 -5
  65. data/plugins/providers/virtualbox/action/network_fix_ipv6.rb +1 -1
  66. data/plugins/provisioners/chef/config/chef_zero.rb +1 -1
  67. data/plugins/provisioners/chef/provisioner/chef_solo.rb +2 -2
  68. data/plugins/provisioners/chef/provisioner/chef_zero.rb +3 -3
  69. data/plugins/provisioners/puppet/config/puppet.rb +2 -0
  70. data/plugins/provisioners/puppet/provisioner/puppet.rb +18 -1
  71. data/plugins/provisioners/salt/config.rb +6 -0
  72. data/plugins/provisioners/salt/provisioner.rb +11 -1
  73. data/templates/locales/command_ps.yml +1 -1
  74. data/templates/locales/en.yml +13 -4
  75. data/templates/locales/guest_windows.yml +1 -1
  76. data/templates/locales/providers_docker.yml +1 -1
  77. data/templates/locales/synced_folder_smb.yml +2 -2
  78. data/vagrant.gemspec +2 -0
  79. data/vendor/bundle/ruby/2.5.0/bundler/gems/vagrant-spec-f3daedaac493/vagrant-spec.gemspec +1 -1
  80. data/vendor/bundle/ruby/2.5.0/gems/domain_name-0.5.20180417/.document +5 -0
  81. data/vendor/bundle/ruby/2.5.0/gems/domain_name-0.5.20180417/.gitignore +17 -0
  82. data/vendor/bundle/ruby/2.5.0/gems/domain_name-0.5.20180417/.travis.yml +21 -0
  83. data/vendor/bundle/ruby/2.5.0/gems/domain_name-0.5.20180417/CHANGELOG.md +209 -0
  84. data/vendor/bundle/ruby/2.5.0/gems/domain_name-0.5.20180417/Gemfile +4 -0
  85. data/vendor/bundle/ruby/2.5.0/gems/domain_name-0.5.20180417/LICENSE.txt +78 -0
  86. data/vendor/bundle/ruby/2.5.0/gems/domain_name-0.5.20180417/README.md +67 -0
  87. data/vendor/bundle/ruby/2.5.0/gems/domain_name-0.5.20180417/Rakefile +88 -0
  88. data/vendor/bundle/ruby/2.5.0/gems/domain_name-0.5.20180417/data/public_suffix_list.dat +12440 -0
  89. data/vendor/bundle/ruby/2.5.0/gems/domain_name-0.5.20180417/domain_name.gemspec +36 -0
  90. data/vendor/bundle/ruby/2.5.0/gems/domain_name-0.5.20180417/lib/domain_name/etld_data.rb +8474 -0
  91. data/vendor/bundle/ruby/2.5.0/gems/domain_name-0.5.20180417/lib/domain_name/etld_data.rb.erb +11 -0
  92. data/vendor/bundle/ruby/2.5.0/gems/domain_name-0.5.20180417/lib/domain_name/punycode.rb +283 -0
  93. data/vendor/bundle/ruby/2.5.0/gems/domain_name-0.5.20180417/lib/domain_name/version.rb +3 -0
  94. data/vendor/bundle/ruby/2.5.0/gems/domain_name-0.5.20180417/lib/domain_name.rb +297 -0
  95. data/vendor/bundle/ruby/2.5.0/gems/domain_name-0.5.20180417/test/helper.rb +17 -0
  96. data/vendor/bundle/ruby/2.5.0/gems/domain_name-0.5.20180417/test/test_domain_name-punycode.rb +97 -0
  97. data/vendor/bundle/ruby/2.5.0/gems/domain_name-0.5.20180417/test/test_domain_name.rb +317 -0
  98. data/vendor/bundle/ruby/2.5.0/gems/domain_name-0.5.20180417/tool/gen_etld_data.rb +63 -0
  99. data/vendor/bundle/ruby/2.5.0/gems/ffi-win32-extensions-1.0.3/CHANGES +13 -0
  100. data/vendor/bundle/ruby/2.5.0/gems/ffi-win32-extensions-1.0.3/LICENSE +201 -0
  101. data/vendor/bundle/ruby/2.5.0/gems/ffi-win32-extensions-1.0.3/MANIFEST +9 -0
  102. data/vendor/bundle/ruby/2.5.0/gems/ffi-win32-extensions-1.0.3/README +48 -0
  103. data/vendor/bundle/ruby/2.5.0/gems/ffi-win32-extensions-1.0.3/Rakefile +42 -0
  104. data/vendor/bundle/ruby/2.5.0/gems/ffi-win32-extensions-1.0.3/certs/djberg96_pub.pem +21 -0
  105. data/vendor/bundle/ruby/2.5.0/gems/ffi-win32-extensions-1.0.3/ffi-win32-extensions.gemspec +25 -0
  106. data/vendor/bundle/ruby/2.5.0/gems/ffi-win32-extensions-1.0.3/lib/ffi/win32/extensions.rb +96 -0
  107. data/vendor/bundle/ruby/2.5.0/gems/ffi-win32-extensions-1.0.3/lib/ffi-win32-extensions.rb +1 -0
  108. data/vendor/bundle/ruby/2.5.0/gems/ffi-win32-extensions-1.0.3/test/test_ffi_extensions.rb +41 -0
  109. data/vendor/bundle/ruby/2.5.0/gems/ffi-win32-extensions-1.0.3/test/test_string_extensions.rb +20 -0
  110. data/vendor/bundle/ruby/2.5.0/gems/win32-file-0.8.1/CHANGES +235 -0
  111. data/vendor/bundle/ruby/2.5.0/gems/win32-file-0.8.1/MANIFEST +16 -0
  112. data/vendor/bundle/ruby/2.5.0/gems/win32-file-0.8.1/README +73 -0
  113. data/vendor/bundle/ruby/2.5.0/gems/win32-file-0.8.1/Rakefile +49 -0
  114. data/vendor/bundle/ruby/2.5.0/gems/win32-file-0.8.1/appveyor.yml +50 -0
  115. data/vendor/bundle/ruby/2.5.0/gems/win32-file-0.8.1/certs/djberg96_pub.pem +21 -0
  116. data/vendor/bundle/ruby/2.5.0/gems/win32-file-0.8.1/lib/win32/file/constants.rb +33 -0
  117. data/vendor/bundle/ruby/2.5.0/gems/win32-file-0.8.1/lib/win32/file/functions.rb +42 -0
  118. data/vendor/bundle/ruby/2.5.0/gems/win32-file-0.8.1/lib/win32/file/structs.rb +54 -0
  119. data/vendor/bundle/ruby/2.5.0/gems/win32-file-0.8.1/lib/win32/file.rb +585 -0
  120. data/vendor/bundle/ruby/2.5.0/gems/win32-file-0.8.1/lib/win32-file.rb +1 -0
  121. data/vendor/bundle/ruby/2.5.0/gems/win32-file-0.8.1/test/test_win32_file_link.rb +141 -0
  122. data/vendor/bundle/ruby/2.5.0/gems/win32-file-0.8.1/test/test_win32_file_misc.rb +16 -0
  123. data/vendor/bundle/ruby/2.5.0/gems/win32-file-0.8.1/test/test_win32_file_path.rb +282 -0
  124. data/vendor/bundle/ruby/2.5.0/gems/win32-file-0.8.1/test/test_win32_file_stat.rb +330 -0
  125. data/vendor/bundle/ruby/2.5.0/gems/win32-file-0.8.1/win32-file.gemspec +33 -0
  126. data/vendor/bundle/ruby/2.5.0/gems/win32-file-security-1.0.10/CHANGES +63 -0
  127. data/vendor/bundle/ruby/2.5.0/gems/win32-file-security-1.0.10/MANIFEST +18 -0
  128. data/vendor/bundle/ruby/2.5.0/gems/win32-file-security-1.0.10/README +47 -0
  129. data/vendor/bundle/ruby/2.5.0/gems/win32-file-security-1.0.10/Rakefile +66 -0
  130. data/vendor/bundle/ruby/2.5.0/gems/win32-file-security-1.0.10/appveyor.yml +53 -0
  131. data/vendor/bundle/ruby/2.5.0/gems/win32-file-security-1.0.10/certs/djberg96_pub.pem +21 -0
  132. data/vendor/bundle/ruby/2.5.0/gems/win32-file-security-1.0.10/lib/win32/file/security/constants.rb +149 -0
  133. data/vendor/bundle/ruby/2.5.0/gems/win32-file-security-1.0.10/lib/win32/file/security/functions.rb +63 -0
  134. data/vendor/bundle/ruby/2.5.0/gems/win32-file-security-1.0.10/lib/win32/file/security/structs.rb +68 -0
  135. data/vendor/bundle/ruby/2.5.0/gems/win32-file-security-1.0.10/lib/win32/file/security.rb +963 -0
  136. data/vendor/bundle/ruby/2.5.0/gems/win32-file-security-1.0.10/lib/win32-file-security.rb +1 -0
  137. data/vendor/bundle/ruby/2.5.0/gems/win32-file-security-1.0.10/test/test_win32_file_security_acls.rb +34 -0
  138. data/vendor/bundle/ruby/2.5.0/gems/win32-file-security-1.0.10/test/test_win32_file_security_constants.rb +54 -0
  139. data/vendor/bundle/ruby/2.5.0/gems/win32-file-security-1.0.10/test/test_win32_file_security_encryption.rb +90 -0
  140. data/vendor/bundle/ruby/2.5.0/gems/win32-file-security-1.0.10/test/test_win32_file_security_ffi.rb +33 -0
  141. data/vendor/bundle/ruby/2.5.0/gems/win32-file-security-1.0.10/test/test_win32_file_security_ownership.rb +174 -0
  142. data/vendor/bundle/ruby/2.5.0/gems/win32-file-security-1.0.10/test/test_win32_file_security_permissions.rb +88 -0
  143. data/vendor/bundle/ruby/2.5.0/gems/win32-file-security-1.0.10/test/test_win32_file_security_version.rb +14 -0
  144. data/vendor/bundle/ruby/2.5.0/gems/win32-file-security-1.0.10/win32-file-security.gemspec +28 -0
  145. data/vendor/bundle/ruby/2.5.0/gems/win32-file-stat-1.5.5/CHANGES +169 -0
  146. data/vendor/bundle/ruby/2.5.0/gems/win32-file-stat-1.5.5/MANIFEST +12 -0
  147. data/vendor/bundle/ruby/2.5.0/gems/win32-file-stat-1.5.5/README +94 -0
  148. data/vendor/bundle/ruby/2.5.0/gems/win32-file-stat-1.5.5/Rakefile +28 -0
  149. data/vendor/bundle/ruby/2.5.0/gems/win32-file-stat-1.5.5/appveyor.yml +48 -0
  150. data/vendor/bundle/ruby/2.5.0/gems/win32-file-stat-1.5.5/certs/djberg96_pub.pem +21 -0
  151. data/vendor/bundle/ruby/2.5.0/gems/win32-file-stat-1.5.5/lib/win32/file/stat.rb +1008 -0
  152. data/vendor/bundle/ruby/2.5.0/gems/win32-file-stat-1.5.5/lib/win32/file/windows/constants.rb +94 -0
  153. data/vendor/bundle/ruby/2.5.0/gems/win32-file-stat-1.5.5/lib/win32/file/windows/functions.rb +68 -0
  154. data/vendor/bundle/ruby/2.5.0/gems/win32-file-stat-1.5.5/lib/win32/file/windows/structs.rb +196 -0
  155. data/vendor/bundle/ruby/2.5.0/gems/win32-file-stat-1.5.5/lib/win32-file-stat.rb +1 -0
  156. data/vendor/bundle/ruby/2.5.0/gems/win32-file-stat-1.5.5/test/test_file_stat.rb +677 -0
  157. data/vendor/bundle/ruby/2.5.0/gems/win32-file-stat-1.5.5/win32-file-stat.gemspec +30 -0
  158. data/vendor/bundle/ruby/2.5.0/specifications/domain_name-0.5.20180417.gemspec +46 -0
  159. data/vendor/bundle/ruby/2.5.0/specifications/ffi-win32-extensions-1.0.3.gemspec +38 -0
  160. data/vendor/bundle/ruby/2.5.0/specifications/win32-file-0.8.1.gemspec +51 -0
  161. data/vendor/bundle/ruby/2.5.0/specifications/win32-file-security-1.0.10.gemspec +47 -0
  162. data/vendor/bundle/ruby/2.5.0/specifications/win32-file-stat-1.5.5.gemspec +48 -0
  163. data/version.txt +1 -1
  164. metadata +114 -2
@@ -0,0 +1,235 @@
1
+ == 0.8.1 - 25-Jun-2016
2
+ * Removed the custom wstrip method, use ffi-win32-extensions instead,
3
+ which was added as a dependency.
4
+ * Added appveyor.yml file.
5
+
6
+ == 0.8.0 - 30-Oct-2015
7
+ * The File.atime, File.ctime and File.mtime methods now accept an optional
8
+ second argument. If present, those values are set to whatever value that
9
+ you provided.
10
+
11
+ == 0.7.3 - 26-Oct-2015
12
+ * This gem is now signed.
13
+ * Fixed a test for File.file?
14
+ * Added a win32-file.rb file for convenience.
15
+
16
+ == 0.7.2 - 7-Oct-2014
17
+ * Replaced File.exists? with File.exist? to avoid deprecation warnings
18
+ for Ruby 2.x.
19
+ * Some minor memory improvements by explicitly freeing some pointers.
20
+ * Minor README updates.
21
+
22
+ == 0.7.1 - 28-Apr-2014
23
+ * Modified all custom singleton methods to accept arguments that define either
24
+ to_str or to_path to be in line with MRI's behavior.
25
+ * Some internal changes for the long_path and short_path methods.
26
+ * Added some path tests.
27
+
28
+ == 0.7.0 - 16-Dec-2013
29
+ * Now requires Ruby 1.9 or later.
30
+ * Converted to use FFI instead of win32-api. Now works with JRuby, too.
31
+ * Removed the atribute methods (hidden?, normal?, etc). These are now in
32
+ the win32-file-attributes gem instead.
33
+ * The encryption and security related methods were removed. These are now in
34
+ the win32-security and win32-file-security gems instead.
35
+ * Added implementations of readable?, readable_real?, writable?,
36
+ writable_real?, world_readable? and world_writable?, courtesy of the
37
+ win32-file-stat library.
38
+
39
+ == 0.6.8 - 6-Apr-2012
40
+ * Fixed some unused variable warnings for 1.9.3.
41
+ * Minor cleanup of the Rakefile.
42
+ * Fixed an issue with a blockdev test.
43
+
44
+ == 0.6.7 - 23-Nov-2011
45
+ * Fixed an encoding problem with File.set_permissions for Ruby 1.9.x.
46
+ * Fixed a bug in File.basename where an error could be caused by trailing
47
+ slashes. Thanks go to paz for the spot and patch.
48
+ * Updated the clean task in the Rakefile.
49
+
50
+ == 0.6.6 - 3-Sep-2010
51
+ * Fixed a bug in the custom File.dirname where trailing slashes were
52
+ affecting the result. Trailing slashes are now ignored.
53
+ * Added a global test task and a default rake task. Both run all tests.
54
+
55
+ == 0.6.5 - 19-Jul-2010
56
+ * Removed debug print statement (oops!).
57
+
58
+ == 0.6.4 - 3-Jun-2010
59
+ * Redefined the File.join method so that it converts all forward slashes
60
+ to back slashes.
61
+ * Refactored the Rakefile and path tests a bit.
62
+ * Bumped the minimum test-unit version to 2.0.7.
63
+
64
+ == 0.6.3 - 24-Aug-2009
65
+ * Refactored the File.directory? method so that it checks against the
66
+ INVALID_FILE_ATTRIBUTES constant instead of a hard coded value.
67
+ * Updated windows-pr dependency to 1.0.8.
68
+
69
+ == 0.6.2 - 19-Dec-2009
70
+ * Changed the license to Artistic 2.0.
71
+ * Several gemspec updates, including the license and description.
72
+
73
+ == 0.6.1 - 9-Feb-2009
74
+ * Fixed a bug in the custom File.directory? method with regards to
75
+ non-existent directories. Thanks go to Montgomery Kosma for the spot.
76
+
77
+ == 0.6.0 - 14-Nov-2008
78
+ * Converted methods to use wide character handling.
79
+ * Added working implementations for the File.readlink, File.symlink and
80
+ File.symlink? singleton methods. These require Windows Vista or later to
81
+ work properly. Otherwise, they follow current MRI behavior.
82
+ * To work properly in conjunction with win32-file-stat, a custom version
83
+ of the File.directory? method was implemented.
84
+ * Changed VERSION to WIN32_FILE_VERSION to be more consistent with other
85
+ Win32Utils libraries, and to avoid any potential conflicts with Ruby itself.
86
+ * Prerequisite updates.
87
+
88
+ == 0.5.6 - 30-Sep-2008
89
+ * The File.long_path and File.short_path methods now return the full path
90
+ instead of just the basename of the path. I really have no idea why I was
91
+ doing that before, but it's fixed now.
92
+ * Fixed error handling in the File#compressed= and File#sparse= methods.
93
+ * All tests were renamed and refactored to use test-unix 2.x, which is now
94
+ a pre-requisite for this library.
95
+ * Some gemspec updates, including a rubyforge project.
96
+
97
+ == 0.5.5 - 22-Nov-2007
98
+ * Fixed a bug in the File.dirname method with regards to relative paths.
99
+ Thanks go to an Laust Rud for the spot.
100
+ * Removed the install.rb file. Use the 'rake install' task instead.
101
+ * Added more tests to ensure the File.dirname method works properly and
102
+ did some test refactoring in general.
103
+
104
+ == 0.5.4 - 8-Apr-2007
105
+ * Now runs -w clean.
106
+ * Added a Rakefile. Manual installation and testing should now be handled
107
+ by the Rake tasks.
108
+ * Some updates to the README file.
109
+
110
+ == 0.5.3 - 2-Nov-2006
111
+ * Added the File.lstat method. It's abscence caused problems for cross
112
+ platform packages (such as the 'find' module) which were expecting a result
113
+ for File.lstat. Thanks go to "Oliver" (python152) from the mailing list
114
+ for the spot.
115
+
116
+ == 0.5.2 - 12-May-2006
117
+ * Added explicit File.stat and File#stat methods to ensure that the File::Stat
118
+ object returned is the one defined in the win32-file-stat package.
119
+
120
+ == 0.5.1 - 27-Apr-2006
121
+ * Added the File.content_indexed? alias for File.indexed?
122
+ * Added the corresponding File::CONTENT_INDEXED constant alias.
123
+ * Fixed an issue with the Windows::Error module not being extended the way
124
+ it should have been.
125
+ * Updated the ts_all.rb file to actually include *all* the tests.
126
+
127
+ == 0.5.0 - 22-Apr-2006
128
+ * Replaced C version with pure Ruby version.
129
+ * Added a gem.
130
+ * Requires the win32-file-stat package. Some methods are just a facade for
131
+ File::Stat methods.
132
+ * Removed the native IO methods and related attributes - nread, nwrite, flags,
133
+ creation_mode, share_mode, access_mode. These will be moved into their own
134
+ package (win32-io) eventually.
135
+ * The File.get_permissions method now takes an optional hostname as the second
136
+ argument. If it isn't provided, it defaults to localhost.
137
+ * The File.set_attr method was renamed to File.set_attributes (though an alias
138
+ has been provided for backwards compatibility).
139
+ * The File.unset_attr method was renamed to File.remove_attributes. Again, an
140
+ alias was created for backwards compatibility.
141
+ * The File.content_indexed? method is now just File.indexed? Likewise, the
142
+ File::CONTENT_INDEXED constant is now just File::INDEXED.
143
+
144
+ == 0.4.6 - 20-Nov-2005
145
+ * Fixed potential segfaults caused by passing invalid types. This affects
146
+ most methods.
147
+ * Added more tests to look for explicit TypeError's.
148
+
149
+ == 0.4.5 - 17-Sep-2005
150
+ * Fixed bug in File.basename and File.dirname where receiver was being
151
+ modified.
152
+ * Overrode the File.split method to handle UNC paths properly.
153
+ * More tests.
154
+
155
+ == 0.4.4 - 20-Aug-2005
156
+ * Fixed some bugs in the File.basename method.
157
+ * Added more tests for the File.basename method.
158
+
159
+ == 0.4.3 - 25-May-2005
160
+ * Added custom versions of File.basename and File.dirname so that they work
161
+ with UNC paths correctly. This requires linking against libshlwapi, which
162
+ was added in the extconf.rb file.
163
+ * Better Unicode support (I think).
164
+ * Added some safe string handling.
165
+ * Tests added for File.basename and File.dirname.
166
+ * Removed the file.rd file. You can run rdoc over the file.txt file to
167
+ generate html documentation if you wish.
168
+
169
+ == 0.4.2 - 1-Feb-2005
170
+ * Added a macro check for EncryptFile(), which turns out to only be supported
171
+ on Windows 2000 or later. Thanks go to Takaaki Tateishi for the spot.
172
+
173
+ == 0.4.1 - 30-Nov-2004
174
+ * Added working implementations for File.blockdev? and File.chardev?
175
+ * Corresponding test suite and doc additions.
176
+ * Corrected the release date for 0.4.0.
177
+
178
+ == 0.4.0 - 26-Nov-2004
179
+ * Added the File.nopen class method, and File#nread and File#nwrite instance
180
+ methods. These are wrappers for Window's native methods. See documentation
181
+ for more details. Also see some examples in the 'examples' directory.
182
+ * Added my own implementation of File.size, because the current version is not
183
+ 64 bit aware (i.e. does not return correct values for sizes over 2 GB). I
184
+ will remove this once Ruby has been updated.
185
+ * Modified File#path to use GetFullPathName() internally if Ruby's own
186
+ File#path method fails. This was mostly done for internal usage, but it
187
+ has the effect of making File#path a little more robust on Windows I think.
188
+
189
+ == 0.3.0 - 10-Nov-2004
190
+ * Added the archive=, hidden=, normal=, compressed=, content_indexed=,
191
+ offline=, readonly=, sparse=, system=, and temporary= instance methods.
192
+ * Changed set_permission to set_permissions, and get_permission to
193
+ get_permissions, respectively.
194
+ * Moved the examples directory to the toplevel directory.
195
+ * Added and/or modified some files to be rdoc friendly.
196
+ * Documentation and test suite updates.
197
+
198
+ == 0.2.2 - 17-Aug-2004
199
+ * Added the encrypt() and decrypt() class methods. These are wrappers
200
+ for the EncryptFile() and DecryptFile() Win32 functions.
201
+ * Corresponding test suite and documentation additions.
202
+ * Added a crypt and decrypt test example, crypt_test.rb, under doc/examples.
203
+
204
+ == 0.2.1 - 10-Aug-2004
205
+ * Replaced all occurrences of the deprecated STR2CSTR() function with
206
+ StringValuePtr(). That means that, as of this release, this package
207
+ requires Ruby 1.8.0 or later.
208
+ * Added the long_path method (may not be supported on NT).
209
+ * Documentation and test suite additions
210
+ * Some code cleanup and reorganization.
211
+ * Moved sample scripts to doc/examples.
212
+ * Removed the file.html file from the doc directory. You can generate the
213
+ html documentation with rd2 if you like.
214
+
215
+ == 0.2.0 - 8-May-2004
216
+ * Removed the toplevel Win32 module/namespace (except for the require line).
217
+ I felt that having to put "Win32::" in front of all the methods was too
218
+ painful.
219
+ * Added the CACLS attribute getter and setter (Park).
220
+ * Updated docs to reflect changes, added warranty information.
221
+ * Moved the pure ruby version to its own directory. In lieu of the installer
222
+ now available for our packages, this version is no longer guaranteed to be
223
+ maintained, but I'll leave it in the package for now.
224
+
225
+ == 0.1.1 - 3-Nov-2003
226
+ * Added the content_indexed? method
227
+ * Added the set_attr and unset_attr methods
228
+ * Added constants that apply to set_attr and unset_attr
229
+ * Replaced GetFileAttributesEx() with the simpler GetFileAttributes().
230
+ The former provides no additional information that isn't already covered by File::Stat.
231
+ * Test suite additions
232
+ * Documentation additions
233
+
234
+ == 0.1.0 - 29-Oct-2003
235
+ * Initial release
@@ -0,0 +1,16 @@
1
+ * appveyor.yml
2
+ * CHANGES
3
+ * MANIFEST
4
+ * Rakefile
5
+ * README
6
+ * win32-file.gemspec
7
+ * certs/djberg96_pub.pem
8
+ * lib/win32-file.rb
9
+ * lib/win32/file.rb
10
+ * lib/win32/file/constants.rb
11
+ * lib/win32/file/functions.rb
12
+ * lib/win32/file/structs.rb
13
+ * test/test_win32_file_path.rb
14
+ * test/test_win32_file_link.rb
15
+ * test/test_win32_file_misc.rb
16
+ * test/test_win32_file_stat.rb
@@ -0,0 +1,73 @@
1
+ == Description
2
+ Additional methods for the File class on MS Windows. Plus, several existing
3
+ methods have been redefined to make them work properly on MS Windows.
4
+
5
+ == Prerequisites
6
+ * win32-file-stat
7
+
8
+ == Installation
9
+ gem install win32-file
10
+
11
+ == Synopsis
12
+ require 'win32/file'
13
+
14
+ p File.long_path("C:/Progra~1") # => C:\Program Files
15
+ p File.short_path("C:/Program Files") # => C:\Progra~1
16
+
17
+ # See redefined methods below
18
+
19
+ == Singleton Methods Added
20
+ * File.long_path
21
+ * File.short_path
22
+
23
+ == Singleton Methods Redefined
24
+ * File.atime # Takes an optional 2nd argument to set the value.
25
+ * File.basename # UNC path issues, root path differences.
26
+ * File.blksize # Not implemented in MRI
27
+ * File.blockdev? # Not implemented in MRI
28
+ * File.chardev? # Not implemented in MRI
29
+ * File.ctime # Takes an optional 2nd argument to set the value.
30
+ * File.directory? # Better wide character string handling than MRI
31
+ * File.dirname # UNC path issues in MRI
32
+ * File.executable? # Not implemented in MRI
33
+ * File.file? # Handles non-regular files better than MRI
34
+ * File.ftype # Handles non-regular files better than MRI
35
+ * File.join # For uniform handling of path separators.
36
+ * File.grpowned? # Not implemented in MRI
37
+ * File.lstat # Not implemented in MRI
38
+ * File.mtime # Takes an optional 2nd argument to set the value.
39
+ * File.owned? # Not implemented in MRI
40
+ * File.pipe? # Not implemented in MRI
41
+ * File.readable? # Not implemented in MRI
42
+ * File.realpath # MRI doesn't handle symlinks
43
+ * File.realdirpath # MRI doesn't handle symlinks
44
+ * File.socket? # Not implemented in MRI
45
+ * File.readlink # Not implemented in MRI
46
+ * File.split # UNC path issues in MRI
47
+ * File.stat # Uses object returned by win32-file-stat
48
+ * File.symlink # Not implemented in MRI
49
+ * File.symlink? # Not implemented in MRI
50
+ * File.writable? # Not implemented in MRI
51
+ * File.world_writable? # Not implemented in MRI
52
+
53
+ == Known issues or bugs
54
+ The File.exist? method will return true on stale symlinks.
55
+
56
+ Please report any other issues you find on the github page at:
57
+
58
+ https://github.com/djberg96/win32-file/issues
59
+
60
+ == License
61
+ Artistic 2.0
62
+
63
+ == Copyright
64
+ (C) 2003-2015, Daniel J. Berger, All Rights Reserved
65
+
66
+ == Warranty
67
+ This package is provided "as is" and without any express or
68
+ implied warranties, including, without limitation, the implied
69
+ warranties of merchantability and fitness for a particular purpose.
70
+
71
+ == Authors
72
+ * Daniel J. Berger
73
+ * Park Heesob
@@ -0,0 +1,49 @@
1
+ require 'rake'
2
+ require 'rake/testtask'
3
+ require 'rake/clean'
4
+
5
+ CLEAN.include("**/*.txt", "**/*.gem", "**/*.rbc")
6
+
7
+ namespace 'gem' do
8
+ desc 'Create the win32-file gem'
9
+ task :create => [:clean] do
10
+ require 'rubygems/package'
11
+ spec = eval(IO.read('win32-file.gemspec'))
12
+ spec.signing_key = File.join(Dir.home, '.ssh', 'gem-private_key.pem')
13
+ Gem::Package.build(spec, true)
14
+ end
15
+
16
+ desc 'Install the win32-file gem'
17
+ task :install => [:create] do
18
+ file = Dir['win32-file*.gem'].first
19
+ sh "gem install -l #{file}"
20
+ end
21
+ end
22
+
23
+ namespace 'test' do
24
+ Rake::TestTask.new("all") do |t|
25
+ t.verbose = true
26
+ t.warning = true
27
+ end
28
+
29
+ Rake::TestTask.new("link") do |t|
30
+ t.verbose = true
31
+ t.warning = true
32
+ t.test_files = FileList['test/test_win32_file_link.rb']
33
+ end
34
+
35
+ Rake::TestTask.new("path") do |t|
36
+ t.verbose = true
37
+ t.warning = true
38
+ t.test_files = FileList['test/test_win32_file_path.rb']
39
+ end
40
+
41
+ Rake::TestTask.new("stat") do |t|
42
+ t.verbose = true
43
+ t.warning = true
44
+ t.test_files = FileList['test/test_win32_file_stat.rb']
45
+ end
46
+ end
47
+
48
+ task :test => ['test:all']
49
+ task :default => ['test:all']
@@ -0,0 +1,50 @@
1
+ version: '{build}'
2
+ branches:
3
+ only:
4
+ - ffi
5
+ skip_tags: true
6
+ clone_depth: 10
7
+ environment:
8
+ matrix:
9
+ - ruby_version: 193
10
+ ruby_dir: 1.9.1
11
+ - ruby_version: 200
12
+ ruby_dir: 2.0.0
13
+ - ruby_version: 200-x64
14
+ ruby_dir: 2.0.0
15
+ - ruby_version: 21
16
+ ruby_dir: 2.1.0
17
+ - ruby_version: 21-x64
18
+ ruby_dir: 2.1.0
19
+ - ruby_version: 22
20
+ ruby_dir: 2.2.0
21
+ - ruby_version: 22-x64
22
+ ruby_dir: 2.2.0
23
+ install:
24
+ - ps: >-
25
+ $env:path = "C:\Ruby" + $env:ruby_version + "\bin;" + $env:path
26
+
27
+ $tpath = "C:\Ruby" + $env:ruby_version + "\lib\ruby\" + $env:ruby_dir + "\test"
28
+
29
+ if ((test-path $tpath) -eq $True){ rm -recurse -force $tpath }
30
+
31
+ gem update --system > $null
32
+
33
+ if ((gem query -i ffi) -eq $False){ gem install ffi --no-document }
34
+
35
+ if ((gem query -i test-unit -v ">= 3.0") -eq $False){ gem install test-unit --no-document }
36
+
37
+ if ((gem query -i win32-file-stat) -eq $False){ gem install win32-file-stat --no-document }
38
+
39
+ if ((gem query -i win32-security) -eq $False){ gem install win32-security --no-document }
40
+ cache:
41
+ - C:\Ruby193\lib\ruby\gems\1.9.1
42
+ - C:\Ruby200\lib\ruby\gems\2.0.0
43
+ - C:\Ruby200-x64\lib\ruby\gems\2.0.0
44
+ - C:\Ruby21\lib\ruby\gems\2.1.0
45
+ - C:\Ruby21-x64\lib\ruby\gems\2.1.0
46
+ - C:\Ruby22\lib\ruby\gems\2.2.0
47
+ - C:\Ruby22-x64\lib\ruby\gems\2.2.0
48
+ build: off
49
+ test_script:
50
+ - cmd: rake
@@ -0,0 +1,21 @@
1
+ -----BEGIN CERTIFICATE-----
2
+ MIIDcDCCAligAwIBAgIBATANBgkqhkiG9w0BAQUFADA/MREwDwYDVQQDDAhkamJl
3
+ cmc5NjEVMBMGCgmSJomT8ixkARkWBWdtYWlsMRMwEQYKCZImiZPyLGQBGRYDY29t
4
+ MB4XDTE1MDkwMjIwNDkxOFoXDTE2MDkwMTIwNDkxOFowPzERMA8GA1UEAwwIZGpi
5
+ ZXJnOTYxFTATBgoJkiaJk/IsZAEZFgVnbWFpbDETMBEGCgmSJomT8ixkARkWA2Nv
6
+ bTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMyTkvXqRp6hLs9eoJOS
7
+ Hmi8kRYbq9Vkf15/hMxJpotYMgJVHHWrmDcC5Dye2PbnXjTkKf266Zw0PtT9h+lI
8
+ S3ts9HO+vaCFSMwFFZmnWJSpQ3CNw2RcHxjWkk9yF7imEM8Kz9ojhiDXzBetdV6M
9
+ gr0lV/alUr7TNVBDngbXEfTWscyXh1qd7xZ4EcOdsDktCe5G45N/o3662tPQvJsi
10
+ FOF0CM/KuBsa/HL1/eoEmF4B3EKIRfTHrQ3hu20Kv3RJ88QM4ec2+0dd97uX693O
11
+ zv6981fyEg+aXLkxrkViM/tz2qR2ZE0jPhHTREPYeMEgptRkTmWSKAuLVWrJEfgl
12
+ DtkCAwEAAaN3MHUwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAwHQYDVR0OBBYEFEwe
13
+ nn6bfJADmuIDiMSOzedOrL+xMB0GA1UdEQQWMBSBEmRqYmVyZzk2QGdtYWlsLmNv
14
+ bTAdBgNVHRIEFjAUgRJkamJlcmc5NkBnbWFpbC5jb20wDQYJKoZIhvcNAQEFBQAD
15
+ ggEBAHmNOCWoDVD75zHFueY0viwGDVP1BNGFC+yXcb7u2GlK+nEMCORqzURbYPf7
16
+ tL+/hzmePIRz7i30UM//64GI1NLv9jl7nIwjhPpXpf7/lu2I9hOTsvwSumb5UiKC
17
+ /sqBxI3sfj9pr79Wpv4MuikX1XPik7Ncb7NPsJPw06Lvyc3Hkg5X2XpPtLtS+Gr2
18
+ wKJnmzb5rIPS1cmsqv0M9LPWflzfwoZ/SpnmhagP+g05p8bRNKjZSA2iImM/GyYZ
19
+ EJYzxdPOrx2n6NYR3Hk+vHP0U7UBSveI6+qx+ndQYaeyCn+GRX2PKS9h66YF/Q1V
20
+ tGSHgAmcLlkdGgan182qsE/4kKM=
21
+ -----END CERTIFICATE-----
@@ -0,0 +1,33 @@
1
+ require 'ffi'
2
+
3
+ module Windows
4
+ module File
5
+ module Constants
6
+ FILE_ATTRIBUTE_NORMAL = 0x00000080
7
+ FILE_ATTRIBUTE_REPARSE_POINT = 0x00000400
8
+ FILE_FLAG_BACKUP_SEMANTICS = 0x02000000
9
+ FILE_FLAG_OPEN_REPARSE_POINT = 0x00200000
10
+
11
+ FILE_SHARE_READ = 1
12
+ FILE_SHARE_WRITE = 2
13
+
14
+ FILE_WRITE_ATTRIBUTES = 256
15
+
16
+ FILE_TYPE_UNKNOWN = 0x0000
17
+ FILE_TYPE_CHAR = 0x0002
18
+ NO_ERROR = 0
19
+
20
+ GENERIC_READ = 0x80000000
21
+ GENERIC_WRITE = 0x40000000
22
+
23
+ INVALID_HANDLE_VALUE = (1 << FFI::Platform::ADDRESS_SIZE) - 1
24
+ INVALID_FILE_ATTRIBUTES = (1 << FFI::Platform::ADDRESS_SIZE) - 1
25
+ IO_REPARSE_TAG_SYMLINK = 0xA000000C
26
+ OPEN_EXISTING = 3
27
+
28
+ DRIVE_REMOVABLE = 2
29
+ DRIVE_CDROM = 5
30
+ DRIVE_RAMDISK = 6
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,42 @@
1
+ module Windows
2
+ module File
3
+ module Functions
4
+ extend FFI::Library
5
+ ffi_lib :kernel32
6
+
7
+ typedef :ulong, :dword
8
+ typedef :uintptr_t, :handle
9
+ typedef :pointer, :ptr
10
+
11
+ def self.attach_pfunc(*args)
12
+ attach_function(*args)
13
+ private args[0]
14
+ end
15
+
16
+ attach_pfunc :CloseHandle, [:handle], :bool
17
+ attach_pfunc :CreateFileW, [:buffer_in, :dword, :dword, :pointer, :dword, :dword, :handle], :handle
18
+ attach_pfunc :CreateSymbolicLinkW, [:buffer_in, :buffer_in, :dword], :bool
19
+ attach_pfunc :FindFirstFileW, [:buffer_in, :pointer], :handle
20
+ attach_pfunc :GetDiskFreeSpaceW, [:buffer_in, :pointer, :pointer, :pointer, :pointer], :bool
21
+ attach_pfunc :GetDriveTypeW, [:buffer_in], :uint
22
+ attach_pfunc :GetFileType, [:handle], :dword
23
+ attach_pfunc :GetFileAttributesW, [:buffer_in], :dword
24
+ attach_pfunc :GetFinalPathNameByHandleW, [:handle, :buffer_out, :dword, :dword], :dword
25
+ attach_pfunc :GetShortPathNameW, [:buffer_in, :buffer_out, :dword], :dword
26
+ attach_pfunc :GetLongPathNameW, [:buffer_in, :buffer_out, :dword], :dword
27
+ attach_pfunc :QueryDosDeviceA, [:string, :buffer_out, :dword], :dword
28
+ attach_pfunc :SetFileTime, [:handle, :ptr, :ptr, :ptr], :bool
29
+ attach_pfunc :SystemTimeToFileTime, [:ptr, :ptr], :bool
30
+
31
+ ffi_lib :shlwapi
32
+
33
+ attach_pfunc :PathFindExtensionW, [:buffer_in], :pointer
34
+ attach_pfunc :PathIsRootW, [:buffer_in], :bool
35
+ attach_pfunc :PathStripPathW, [:pointer], :void
36
+ attach_pfunc :PathRemoveBackslashW, [:buffer_in], :string
37
+ attach_pfunc :PathRemoveFileSpecW, [:pointer], :bool
38
+ attach_pfunc :PathRemoveExtensionW, [:buffer_in], :void
39
+ attach_pfunc :PathStripToRootW, [:buffer_in], :bool
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,54 @@
1
+ module Windows
2
+ module File
3
+ module Structs
4
+ class FILETIME < FFI::Struct
5
+ layout(:dwLowDateTime, :ulong, :dwHighDateTime, :ulong)
6
+ end
7
+
8
+ class SYSTEMTIME < FFI::Struct
9
+ layout(
10
+ :wYear, :ushort,
11
+ :wMonth, :ushort,
12
+ :wDayOfWeek, :ushort,
13
+ :wDay, :ushort,
14
+ :wHour, :ushort,
15
+ :wMinute, :ushort,
16
+ :wSecond, :ushort,
17
+ :wMilliseconds, :ushort
18
+ )
19
+
20
+ # Allow a time object or raw numeric in constructor
21
+ def initialize(time = nil)
22
+ super()
23
+
24
+ time = Time.at(time) if time.is_a?(Numeric)
25
+ time = time.utc unless time.utc?
26
+
27
+ self[:wYear] = time.year
28
+ self[:wMonth] = time.month
29
+ self[:wDayOfWeek] = time.wday
30
+ self[:wDay] = time.day
31
+ self[:wHour] = time.hour
32
+ self[:wMinute] = time.min
33
+ self[:wSecond] = time.sec
34
+ self[:wMilliseconds] = time.nsec / 1000000
35
+ end
36
+ end
37
+
38
+ class WIN32_FIND_DATA < FFI::Struct
39
+ layout(
40
+ :dwFileAttributes, :ulong,
41
+ :ftCreationTime, FILETIME,
42
+ :ftLastAccessTime, FILETIME,
43
+ :ftLastWriteTime, FILETIME,
44
+ :nFileSizeHigh, :ulong,
45
+ :nFileSizeLow, :ulong,
46
+ :dwReserved0, :ulong,
47
+ :dwReserved1, :ulong,
48
+ :cFileName, [:uint8, 260*2],
49
+ :cAlternateFileName, [:uint8, 14*2]
50
+ )
51
+ end
52
+ end
53
+ end
54
+ end