win32-file-stat 1.2.6 → 1.2.7

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES CHANGED
@@ -1,3 +1,7 @@
1
+ == 1.2.7 - 1-Oct-2007
2
+ * Changed an error type in a private method in order to maintain
3
+ compatibility with the FileUtils module.
4
+
1
5
  == 1.2.6 - 29-Sep-2007
2
6
  * Minor tweak to the way I handle redefining the initialize method. The
3
7
  old_init alias is now removed.
@@ -21,7 +21,7 @@ class File::Stat
21
21
  include Windows::Volume
22
22
  include Comparable
23
23
 
24
- VERSION = '1.2.6'
24
+ VERSION = '1.2.7'
25
25
 
26
26
  # Defined in Ruby's win32.h. Not meant for public consumption.
27
27
  S_IWGRP = 0020
@@ -568,10 +568,12 @@ class File::Stat
568
568
 
569
569
  error_num = GetLastError()
570
570
 
571
- # Ignore errors caused by open/empty/used block devices.
571
+ # Ignore errors caused by open/empty/used block devices. We raise a
572
+ # SystemCallError explicitly here in order to maintain compatibility
573
+ # with the FileUtils module.
572
574
  if handle == INVALID_HANDLE_VALUE
573
575
  unless error_num == ERROR_NOT_READY
574
- raise ArgumentError, get_last_error(error_num)
576
+ raise SystemCallError, get_last_error(error_num)
575
577
  end
576
578
  end
577
579
 
data/test/tc_file_stat.rb CHANGED
@@ -1,16 +1,9 @@
1
1
  #####################################################################
2
2
  # tc_file_stat.rb
3
3
  #
4
- # Test case for stat related methods of win32-file.
4
+ # Test case for stat related methods of win32-file. You should use
5
+ # the 'rake test' task to run these tests.
5
6
  #####################################################################
6
- base = File.basename(Dir.pwd)
7
-
8
- if base == 'test' || base =~ /win32-file-stat/
9
- Dir.chdir('..') if base == 'test'
10
- $LOAD_PATH.unshift(Dir.pwd + '/lib')
11
- Dir.chdir('test') rescue nil
12
- end
13
-
14
7
  require 'test/unit'
15
8
  require 'win32/file/stat'
16
9
  include Windows::Volume
@@ -29,6 +22,7 @@ class TC_Win32_File_Stat < Test::Unit::TestCase
29
22
  include Windows::File
30
23
 
31
24
  def setup
25
+ Dir.chdir('test') unless File.basename(Dir.pwd) == 'test'
32
26
  @file = 'sometestfile.txt'
33
27
  @exe = 'sometestfile.exe'
34
28
  @dir = Dir.pwd
@@ -36,7 +30,7 @@ class TC_Win32_File_Stat < Test::Unit::TestCase
36
30
  end
37
31
 
38
32
  def test_version
39
- assert_equal('1.2.6', File::Stat::VERSION)
33
+ assert_equal('1.2.7', File::Stat::VERSION)
40
34
  end
41
35
 
42
36
  # One or more tests will fail if the archive attribute on @file is not set.
@@ -2,7 +2,7 @@ require "rubygems"
2
2
 
3
3
  spec = Gem::Specification.new do |gem|
4
4
  gem.name = "win32-file-stat"
5
- gem.version = "1.2.6"
5
+ gem.version = "1.2.7"
6
6
  gem.author = "Daniel J. Berger"
7
7
  gem.email = "djberg96@gmail.com"
8
8
  gem.homepage = "http://www.rubyforge.org/projects/win32utils"
@@ -21,4 +21,4 @@ end
21
21
  if $0 == __FILE__
22
22
  Gem.manage_gems
23
23
  Gem::Builder.new(spec).build
24
- end
24
+ end
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.4
3
3
  specification_version: 1
4
4
  name: win32-file-stat
5
5
  version: !ruby/object:Gem::Version
6
- version: 1.2.6
7
- date: 2007-09-29 00:00:00 -06:00
6
+ version: 1.2.7
7
+ date: 2007-10-01 00:00:00 -06:00
8
8
  summary: A File::Stat class tailored to MS Windows
9
9
  require_paths:
10
10
  - lib