win32-file-stat 1.5.1 → 1.5.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 75bb3ff1b6a06d263f6c2889c0fb0b65ff58cd3d
4
- data.tar.gz: 38edc506a14074f9b03ec850dc26d30416e0488c
3
+ metadata.gz: f3840cb754937cf959eec54d9b3e3bbef118f548
4
+ data.tar.gz: 1459708b0e2ff8d1fd7f1e1989b36059abe2c97c
5
5
  SHA512:
6
- metadata.gz: b77bde2136ca2582504014257f2be8bad69f3cd6709cfe94fc47821bbf387597be76e2bb9b3a7542830aabbb8583a9d6651b39879310a18023853201640ae0ea
7
- data.tar.gz: 870e7223034d3c07928e78ecc259424a2cbf3f714273e3c38d816fde593c9e8f1821773eb48e8fac4c8fc488d9b0f7f890e37e75b93380b5ab3573e0ce7784a7
6
+ metadata.gz: 5214572035217bd130c4076e81e9ece7dde302ac940c8f3be38ac0a83118e656a6909e9a806259c922f67f4f22862a8e1f7cf482452eba9225a4ba86fd93dc3a
7
+ data.tar.gz: 150f3c2757be969aa5e01181590e1cf49e79608069e838a098d7d13283dabc85c724d9d5fe88f018d16a29657ecef4b7d3e2f7126d5c6f2cf7016f30ced6e805
data/CHANGES CHANGED
@@ -1,148 +1,154 @@
1
- == 1.5.1 - 8-Dec-2014
2
- * Added code to work around 64-bit JRuby bug.
3
- * Some minor refactoring for the get_current_process_sid method.
4
-
5
- == 1.5.0 - 10-Nov-2014
6
- * Added the #streams method, which shows alt streams for the file.
7
- * Use require_relative where appropriate.
8
- * Removed reference to rubyforge_project in gemspec.
9
-
10
- == 1.4.3 - 8-May-2014
11
- * The #writable? method now ignores the readonly attribute if it's a directory.
12
- * Replaced File.exists? with File.exist? to avoid warnings in Ruby 2.1.x.
13
-
14
- == 1.4.2 - 28-Apr-2014
15
- * Allow the File::Stat.new method to accept objects that respond to to_str
16
- or to_path to mimic MRI.
17
-
18
- == 1.4.1 - 12-Feb-2014
19
- * The #writable? and #writable_real? methods now always return false if the
20
- file has been marked readonly.
21
- * Fixed an rdev test and added a writable test.
22
-
23
- == 1.4.0 - 16-Dec-2013
24
- * Conversion to FFI.
25
- * Now requires Ruby 1.9 or later.
26
- * The #mode method now more closely matches core MRI.
27
- * The #executable? method now simply checks the extension name. The Windows
28
- API method I was using before (GetBinaryType) was limited to .exe files and
29
- could return false positives. The current version checks for .bat, .cmd,
30
- .com and .exe.
31
- * The #dev method returns the volume serial number instead of a drive letter.
32
- * The #symlink? method was implemented.
33
- * The #uid method was implemented. It now returns an actual user id. It can
34
- optionally be passed a boolean argument. If true, it will return the full
35
- string SID.
36
- * The #owned? method was implemented.
37
- * The #gid method was implemented. It now returns an actual group id. It can
38
- optionally be passed a boolean argument. If true, it will return the full
39
- string SID.
40
- * The #grpowned? method was implemented.
41
- * The #ino method was implemented.
42
- * Added working implementations of the #readable?, #writable?,
43
- #world_readable? and #world_writable? methods.
44
- * The VERSION constant was changed to WIN32_FILE_STAT_VERSION.
45
-
46
- == 1.3.6 - 24-Mar-2012
47
- * Eliminated some warnings for Ruby 1.9.3.
48
-
49
- == 1.3.5 - 21-Nov-2011
50
- * Fixed a bug in the dev method for 1.9.x.
51
- * Fixed some method redefinition warnings.
52
- * Refactored the Rakefile and gemspec. The old install task has been
53
- removed from the Rakefile.
54
-
55
- == 1.3.4 - 13-Aug-2009
56
- * Changed license to Artistic 2.0.
57
- * Some gemspec updates, including the addition of a license, an updated
58
- description, and changing test-unit from a runtime dependency to a
59
- development dependency.
60
- * Some documentation updates, mostly to make certain things invisible that
61
- aren't meant for public consumption.
62
- * One test now skipped on 64-bit versions of Windows.
63
-
64
- == 1.3.3 - 9-Feb-2009
65
- * Fixed a bug where File::Stat.new failed on locked files. Thanks go to
66
- Montgomery Kosma for the spot.
67
- * Now requires windows-pr 1.0.0 or later.
68
- * Updated the README to note that 32 bit versions of Ruby which attempt
69
- to access locked system files on 64 bit versions of MS Windows will fail.
70
-
71
- == 1.3.2 - 1-Oct-2008
72
- * Fixed an issue with the private get_blksize method.
73
- * Updated the test suite to use Test::Unit 2.x, which also makes it a
74
- required dependency.
75
- * Removed the pre-generated .txt and .exe files that were used for testing.
76
- These are now generated within the test suite itself.
77
- * Fixed two broken size tests, and now omits one blockdev test if there's no
78
- media in the drive.
79
-
80
- == 1.3.1 - 9-Aug-2008
81
- * Fixed the stat buf to be the proper size (I had too many struct members).
82
- * Modified the tests slightly.
83
-
84
- == 1.3.0 - 1-Aug-2008
85
- * Fixed a couple of function calls where I had forgotten to call an
86
- explicitly wide version.
87
- * No longer ignores failures on empty block devices, e.g. CD-ROM drives
88
- without any media in them. A SystemCallError is raised instead.
89
- * Added blockdev boolean to the inspect/pp output.
90
- * Fixed a potential issue with an internal helper function and the new 'S'
91
- prototype from win32-api 1.2.0 or later.
92
-
93
- == 1.2.8 - 29-Jul-2008
94
- * Internally now always uses wide character functions.
95
- * A private alias was made private.
96
- * Now requires windows-pr 0.9.1 or later.
97
-
98
- == 1.2.7 - 1-Oct-2007
99
- * Changed an error type in a private method in order to maintain
100
- compatibility with the FileUtils module.
101
-
102
- == 1.2.6 - 29-Sep-2007
103
- * Minor tweak to the way I handle redefining the initialize method. The
104
- old_init alias is now removed.
105
- * Now handles a potential failure in getting the atime, ctime and mtime,
106
- caused by the underlying filesystem, e.g. Samba. If it fails, these
107
- fields are set to the epoch. Thanks go an anonymous user for the spot.
108
- * Added a Rakefile that includes tasks for installation and testing.
109
- * Removed the install.rb file. That has been inlined into the Rakefile.
110
-
111
- == 1.2.5 - 5-Apr-2007
112
- * Now runs -w clean.
113
-
114
- == 1.2.4 - 22-Jan-2007
115
- * Improved block device handling.
116
-
117
- == 1.2.3 - 4-Nov-2006
118
- * Bug fix for file sizes over 4gb.
119
-
120
- == 1.2.2 - 13-May-2006
121
- * Yet another blksize bug fix.
122
- * Minor tweak to the pretty_print method with regards to handling nil values.
123
- * Bumped the minimum required windows-pr version to 0.4.0 in the gemspec.
124
-
125
- == 1.2.1 - 12-May-2006
126
- * Fixed a bug with regards to the block count where the constructor would die
127
- with a FloatDomainError if the blksize returned 0 or nil. It now defaults
128
- to nil in that event.
129
-
130
- == 1.2.0 - 23-Apr-2006
131
- * Removed the attribute setters. From now on this class provides readonly
132
- methods. Use the win32-file library for attribute setters.
133
- * Added the content_indexed? alias for the indexed? method.
134
- * Corresponding test suite changes.
135
- * Fixed the pp issue by writing a custom pretty_print method.
136
-
137
- == 1.1.0 - 15-Apr-2006
138
- * Added the chardev?, dev_major, dev_minor directory?, file?, executable?,
139
- executable_real?, ftype, grpowned?, owned?, pipe?, readable?, readable_real?,
140
- rdev_major, rdev_minor, setgid?, setuid?, size?, socket?, sticky?, symlink?,
141
- writable?, writable_real? and zero? methods. Note that not all of these
142
- methods return meaningful values and were merely added to match the current
143
- spec. See documentation for details.
144
- * Added a VERSION constant.
145
- * Some optimization in the constructor.
146
-
147
- == 1.0.0 - 13-Apr-2006
148
- * Initial release
1
+ == 1.5.2 - 9-Jul-2015
2
+ * A working File::Stat#socket? method is now implemented. It is no longer
3
+ just an alias for the File::Stat#pipe? method.
4
+ * Fixed a bug in File::Stat#file? where it could return true for directories and
5
+ reparse points. Thanks go to zinga666 for the spot.
6
+
7
+ == 1.5.1 - 8-Dec-2014
8
+ * Added code to work around 64-bit JRuby bug.
9
+ * Some minor refactoring for the get_current_process_sid method.
10
+
11
+ == 1.5.0 - 10-Nov-2014
12
+ * Added the #streams method, which shows alt streams for the file.
13
+ * Use require_relative where appropriate.
14
+ * Removed reference to rubyforge_project in gemspec.
15
+
16
+ == 1.4.3 - 8-May-2014
17
+ * The #writable? method now ignores the readonly attribute if it's a directory.
18
+ * Replaced File.exists? with File.exist? to avoid warnings in Ruby 2.1.x.
19
+
20
+ == 1.4.2 - 28-Apr-2014
21
+ * Allow the File::Stat.new method to accept objects that respond to to_str
22
+ or to_path to mimic MRI.
23
+
24
+ == 1.4.1 - 12-Feb-2014
25
+ * The #writable? and #writable_real? methods now always return false if the
26
+ file has been marked readonly.
27
+ * Fixed an rdev test and added a writable test.
28
+
29
+ == 1.4.0 - 16-Dec-2013
30
+ * Conversion to FFI.
31
+ * Now requires Ruby 1.9 or later.
32
+ * The #mode method now more closely matches core MRI.
33
+ * The #executable? method now simply checks the extension name. The Windows
34
+ API method I was using before (GetBinaryType) was limited to .exe files and
35
+ could return false positives. The current version checks for .bat, .cmd,
36
+ .com and .exe.
37
+ * The #dev method returns the volume serial number instead of a drive letter.
38
+ * The #symlink? method was implemented.
39
+ * The #uid method was implemented. It now returns an actual user id. It can
40
+ optionally be passed a boolean argument. If true, it will return the full
41
+ string SID.
42
+ * The #owned? method was implemented.
43
+ * The #gid method was implemented. It now returns an actual group id. It can
44
+ optionally be passed a boolean argument. If true, it will return the full
45
+ string SID.
46
+ * The #grpowned? method was implemented.
47
+ * The #ino method was implemented.
48
+ * Added working implementations of the #readable?, #writable?,
49
+ #world_readable? and #world_writable? methods.
50
+ * The VERSION constant was changed to WIN32_FILE_STAT_VERSION.
51
+
52
+ == 1.3.6 - 24-Mar-2012
53
+ * Eliminated some warnings for Ruby 1.9.3.
54
+
55
+ == 1.3.5 - 21-Nov-2011
56
+ * Fixed a bug in the dev method for 1.9.x.
57
+ * Fixed some method redefinition warnings.
58
+ * Refactored the Rakefile and gemspec. The old install task has been
59
+ removed from the Rakefile.
60
+
61
+ == 1.3.4 - 13-Aug-2009
62
+ * Changed license to Artistic 2.0.
63
+ * Some gemspec updates, including the addition of a license, an updated
64
+ description, and changing test-unit from a runtime dependency to a
65
+ development dependency.
66
+ * Some documentation updates, mostly to make certain things invisible that
67
+ aren't meant for public consumption.
68
+ * One test now skipped on 64-bit versions of Windows.
69
+
70
+ == 1.3.3 - 9-Feb-2009
71
+ * Fixed a bug where File::Stat.new failed on locked files. Thanks go to
72
+ Montgomery Kosma for the spot.
73
+ * Now requires windows-pr 1.0.0 or later.
74
+ * Updated the README to note that 32 bit versions of Ruby which attempt
75
+ to access locked system files on 64 bit versions of MS Windows will fail.
76
+
77
+ == 1.3.2 - 1-Oct-2008
78
+ * Fixed an issue with the private get_blksize method.
79
+ * Updated the test suite to use Test::Unit 2.x, which also makes it a
80
+ required dependency.
81
+ * Removed the pre-generated .txt and .exe files that were used for testing.
82
+ These are now generated within the test suite itself.
83
+ * Fixed two broken size tests, and now omits one blockdev test if there's no
84
+ media in the drive.
85
+
86
+ == 1.3.1 - 9-Aug-2008
87
+ * Fixed the stat buf to be the proper size (I had too many struct members).
88
+ * Modified the tests slightly.
89
+
90
+ == 1.3.0 - 1-Aug-2008
91
+ * Fixed a couple of function calls where I had forgotten to call an
92
+ explicitly wide version.
93
+ * No longer ignores failures on empty block devices, e.g. CD-ROM drives
94
+ without any media in them. A SystemCallError is raised instead.
95
+ * Added blockdev boolean to the inspect/pp output.
96
+ * Fixed a potential issue with an internal helper function and the new 'S'
97
+ prototype from win32-api 1.2.0 or later.
98
+
99
+ == 1.2.8 - 29-Jul-2008
100
+ * Internally now always uses wide character functions.
101
+ * A private alias was made private.
102
+ * Now requires windows-pr 0.9.1 or later.
103
+
104
+ == 1.2.7 - 1-Oct-2007
105
+ * Changed an error type in a private method in order to maintain
106
+ compatibility with the FileUtils module.
107
+
108
+ == 1.2.6 - 29-Sep-2007
109
+ * Minor tweak to the way I handle redefining the initialize method. The
110
+ old_init alias is now removed.
111
+ * Now handles a potential failure in getting the atime, ctime and mtime,
112
+ caused by the underlying filesystem, e.g. Samba. If it fails, these
113
+ fields are set to the epoch. Thanks go an anonymous user for the spot.
114
+ * Added a Rakefile that includes tasks for installation and testing.
115
+ * Removed the install.rb file. That has been inlined into the Rakefile.
116
+
117
+ == 1.2.5 - 5-Apr-2007
118
+ * Now runs -w clean.
119
+
120
+ == 1.2.4 - 22-Jan-2007
121
+ * Improved block device handling.
122
+
123
+ == 1.2.3 - 4-Nov-2006
124
+ * Bug fix for file sizes over 4gb.
125
+
126
+ == 1.2.2 - 13-May-2006
127
+ * Yet another blksize bug fix.
128
+ * Minor tweak to the pretty_print method with regards to handling nil values.
129
+ * Bumped the minimum required windows-pr version to 0.4.0 in the gemspec.
130
+
131
+ == 1.2.1 - 12-May-2006
132
+ * Fixed a bug with regards to the block count where the constructor would die
133
+ with a FloatDomainError if the blksize returned 0 or nil. It now defaults
134
+ to nil in that event.
135
+
136
+ == 1.2.0 - 23-Apr-2006
137
+ * Removed the attribute setters. From now on this class provides readonly
138
+ methods. Use the win32-file library for attribute setters.
139
+ * Added the content_indexed? alias for the indexed? method.
140
+ * Corresponding test suite changes.
141
+ * Fixed the pp issue by writing a custom pretty_print method.
142
+
143
+ == 1.1.0 - 15-Apr-2006
144
+ * Added the chardev?, dev_major, dev_minor directory?, file?, executable?,
145
+ executable_real?, ftype, grpowned?, owned?, pipe?, readable?, readable_real?,
146
+ rdev_major, rdev_minor, setgid?, setuid?, size?, socket?, sticky?, symlink?,
147
+ writable?, writable_real? and zero? methods. Note that not all of these
148
+ methods return meaningful values and were merely added to match the current
149
+ spec. See documentation for details.
150
+ * Added a VERSION constant.
151
+ * Some optimization in the constructor.
152
+
153
+ == 1.0.0 - 13-Apr-2006
154
+ * Initial release
data/MANIFEST CHANGED
@@ -1,10 +1,10 @@
1
- * CHANGES
2
- * README
3
- * MANIFEST
4
- * Rakefile
5
- * win32-file-stat.gemspec
6
- * lib/win32/file/stat.rb
7
- * lib/win32/file/windows/constants.rb
8
- * lib/win32/file/windows/functions.rb
9
- * lib/win32/file/windows/structs.rb
10
- * test/test_file_stat.rb
1
+ * CHANGES
2
+ * README
3
+ * MANIFEST
4
+ * Rakefile
5
+ * win32-file-stat.gemspec
6
+ * lib/win32/file/stat.rb
7
+ * lib/win32/file/windows/constants.rb
8
+ * lib/win32/file/windows/functions.rb
9
+ * lib/win32/file/windows/structs.rb
10
+ * test/test_file_stat.rb
data/README CHANGED
@@ -1,93 +1,94 @@
1
- == Description
2
- A redefinition of the File::Stat class for MS Windows.
3
-
4
- == Prerequisites
5
- * ffi
6
- * Ruby 1.9 or later
7
-
8
- == Installation
9
- gem install win32-file-stat
10
-
11
- == Synopsis
12
- # require 'win32/file/stat' # Unwise. See below.
13
- require 'win32/file' # Preferred. See below.
14
-
15
- stat = File::Stat.new('file.txt')
16
- p stat.size
17
- p stat.readonly?
18
- p stat.hidden?
19
- p stat.uid
20
- p stat.streams
21
-
22
- == Differences between Ruby's File::Stat and this version:
23
- * The File::Stat#blksize method returns a meaningful value.
24
- * The File::Stat#blockdev method works more accurately.
25
- * The File::Stat#blocks method returns a meaningful value.
26
- * The File::Stat#executable? method works properly.
27
- * The File::Stat#executable_real? is an alias for File::Stat#executable?
28
- * The File::Stat#file? method works properly.
29
- * The File::Stat#ftype method works more accurately.
30
- * The File::Stat#pipe method works properly.
31
- * The File::Stat#socket method works more accurately.
32
- * The File::Stat#ino method now returns a file identifier.
33
- * The File::Stat#symlink? method works properly.
34
- * The File::Stat#uid method returns a meaningful value.
35
- * The File::Stat#gid method returns a meaningful value.
36
- * The File::Stat#owned? method now works properly.
37
- * The File::Stat#grpowned? method now works properly.
38
- * The File::Stat#rdev method returns the volume serial number.
39
- * The inspect and pretty print output has been customized.
40
- * The File::Stat#streams was added. Returns an array of alt streams.
41
-
42
- == Changes between this version and the previous versions.
43
- * The File::Stat#dev method has reverted to returning a drive number by
44
- default. However, you can pass an optional boolean argument to make it
45
- return the drive letter instead.
46
-
47
- == Known issues
48
- You should not require 'win32/file/stat' directly. Instead, require the
49
- win32-file library which will, in turn, require win32-file-stat. This is
50
- the preferred approach because some modules (i.e. 'find') use the pass-through
51
- methods of the File class, such as File.lstat. Many of the pass through
52
- methods have been redefined in the win32-file library to work in conjunction
53
- with the custom File::Stat objects created by this library.
54
-
55
- Failure to follow these instructions could lead to cases where the core Ruby
56
- File class attempts to use the custom File::Stat object defined in this class,
57
- and that will likely cause problems.
58
-
59
- If run in verbose mode you will see a warning about initialize being
60
- redefined. I can do nothing about that since my old trick of aliasing and
61
- undefining initialize now causes a warning as well!
62
-
63
- == Known bugs
64
- None that I'm aware of beyond the "Known Issues" listed above. Please report
65
- any bugs you find on the project page at:
66
-
67
- http://www.github.com/djberg96/win32-file-stat
68
-
69
- == Miscellaneous
70
- I had to require 'pp' explicitly in order to deal with the fact that pp.rb
71
- has a builtin pretty_print method for File::Stat. If I didn't do this
72
- you would end up using the pretty_print in pp.rb, which would break.
73
-
74
- == Contributions
75
- Although this library is free, please consider having your company
76
- setup a gittip if used by your company professionally.
77
-
78
- http://www.gittip.com/djberg96/
79
-
80
- == Copyright
81
- (C) 2003-2014, Daniel J. Berger, All Rights Reserved.
82
-
83
- == License
84
- Artistic 2.0
85
-
86
- = Warranty
87
- This library is provided "as is" and without any express or
88
- implied warranties, including, without limitation, the implied
89
- warranties of merchantability and fitness for a particular purpose.
90
-
91
- = Authors
92
- Daniel J. Berger
93
- Park Heesob
1
+ == Description
2
+ A redefinition of the File::Stat class for MS Windows.
3
+
4
+ == Prerequisites
5
+ * ffi
6
+ * Ruby 1.9 or later
7
+
8
+ == Installation
9
+ gem install win32-file-stat
10
+
11
+ == Synopsis
12
+ # require 'win32/file/stat' # Unwise. See below.
13
+ require 'win32/file' # Preferred. See below.
14
+
15
+ stat = File::Stat.new('file.txt')
16
+ p stat.size
17
+ p stat.readonly?
18
+ p stat.hidden?
19
+ p stat.uid
20
+ p stat.streams
21
+
22
+ == Differences between Ruby's File::Stat and this version:
23
+ * The File::Stat#blksize method returns a meaningful value.
24
+ * The File::Stat#blockdev method works more accurately.
25
+ * The File::Stat#blocks method returns a meaningful value.
26
+ * The File::Stat#executable? method works properly.
27
+ * The File::Stat#executable_real? is an alias for File::Stat#executable?
28
+ * The File::Stat#file? method works properly.
29
+ * The File::Stat#ftype method works more accurately.
30
+ * The File::Stat#pipe method works properly.
31
+ * The File::Stat#socket method works more accurately.
32
+ * The File::Stat#ino method now returns a file identifier.
33
+ * The File::Stat#socket? method works properly.
34
+ * The File::Stat#symlink? method works properly.
35
+ * The File::Stat#uid method returns a meaningful value.
36
+ * The File::Stat#gid method returns a meaningful value.
37
+ * The File::Stat#owned? method now works properly.
38
+ * The File::Stat#grpowned? method now works properly.
39
+ * The File::Stat#rdev method returns the volume serial number.
40
+ * The inspect and pretty print output has been customized.
41
+ * The File::Stat#streams was added. Returns an array of alt streams.
42
+
43
+ == Changes between this version and the previous versions.
44
+ The File::Stat#dev method has reverted to returning a drive number by
45
+ default. However, you can pass an optional boolean argument to make it
46
+ return the drive letter instead.
47
+
48
+ == Known issues
49
+ You should not require 'win32/file/stat' directly. Instead, require the
50
+ win32-file library which will, in turn, require win32-file-stat. This is
51
+ the preferred approach because some modules (i.e. 'find') use the pass-through
52
+ methods of the File class, such as File.lstat. Many of the pass through
53
+ methods have been redefined in the win32-file library to work in conjunction
54
+ with the custom File::Stat objects created by this library.
55
+
56
+ Failure to follow these instructions could lead to cases where the core Ruby
57
+ File class attempts to use the custom File::Stat object defined in this class,
58
+ and that will likely cause problems.
59
+
60
+ If run in verbose mode you will see a warning about initialize being
61
+ redefined. I can do nothing about that since my old trick of aliasing and
62
+ undefining initialize now causes a warning as well!
63
+
64
+ == Known bugs
65
+ None that I'm aware of beyond the "Known Issues" listed above. Please report
66
+ any bugs you find on the project page at:
67
+
68
+ http://www.github.com/djberg96/win32-file-stat
69
+
70
+ == Miscellaneous
71
+ I had to require 'pp' explicitly in order to deal with the fact that pp.rb
72
+ has a builtin pretty_print method for File::Stat. If I didn't do this
73
+ you would end up using the pretty_print in pp.rb, which would break.
74
+
75
+ == Contributions
76
+ Although this library is free, please consider having your company
77
+ setup a gittip if used by your company professionally.
78
+
79
+ http://www.gittip.com/djberg96/
80
+
81
+ == Copyright
82
+ (C) 2003-2015, Daniel J. Berger, All Rights Reserved.
83
+
84
+ == License
85
+ Artistic 2.0
86
+
87
+ = Warranty
88
+ This library is provided "as is" and without any express or
89
+ implied warranties, including, without limitation, the implied
90
+ warranties of merchantability and fitness for a particular purpose.
91
+
92
+ = Authors
93
+ Daniel J. Berger
94
+ Park Heesob