win32-file 0.5.3 → 0.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,18 +1,11 @@
1
1
  #############################################################################
2
2
  # tc_file_attributes.rb
3
3
  #
4
- # Test case for the attribute related methods of win32-file.
4
+ # Test case for the attribute related methods of win32-file. You should run
5
+ # this via the 'rake test' or 'rake test_attributes' task.
5
6
  #############################################################################
6
- base = File.basename(Dir.pwd)
7
-
8
- if base == 'test' || base =~ /win32-file/
9
- Dir.chdir('..') if base == 'test'
10
- $LOAD_PATH.unshift(Dir.pwd + '/lib')
11
- Dir.chdir('test') rescue nil
12
- end
13
-
14
- require "test/unit"
15
- require "win32/file"
7
+ require 'test/unit'
8
+ require 'win32/file'
16
9
 
17
10
  class TC_Win32_File_Attributes < Test::Unit::TestCase
18
11
  include Windows::File
@@ -23,7 +16,7 @@ class TC_Win32_File_Attributes < Test::Unit::TestCase
23
16
  end
24
17
 
25
18
  def test_version
26
- assert_equal('0.5.3', File::VERSION)
19
+ assert_equal('0.5.4', File::VERSION)
27
20
  end
28
21
 
29
22
  def test_temporary
@@ -1,18 +1,11 @@
1
1
  #############################################################################
2
2
  # tc_file_constants.rb
3
3
  #
4
- # Test case for the path related methods of win32-file.
4
+ # Test case for the path related methods of win32-file. Run this test via
5
+ # the 'rake test' or 'rake test_constants' task.
5
6
  #############################################################################
6
- base = File.basename(Dir.pwd)
7
-
8
- if base == 'test' || base =~ /win32-file/
9
- Dir.chdir('..') if base == 'test'
10
- $LOAD_PATH.unshift(Dir.pwd + '/lib')
11
- Dir.chdir('test') rescue nil
12
- end
13
-
14
- require "test/unit"
15
- require "win32/file"
7
+ require 'test/unit'
8
+ require 'win32/file'
16
9
 
17
10
  class TC_Win32_File_Constants < Test::Unit::TestCase
18
11
  def test_file_attribute_constants
@@ -1,18 +1,13 @@
1
1
  #############################################################################
2
2
  # tc_file_encryption.rb
3
3
  #
4
- # Test case for the encryption related methods of win32-file.
4
+ # Test case for the encryption related methods of win32-file. You should
5
+ # run this test via the 'rake test' or 'rake test_encryption' task.
6
+ #
7
+ # Note: These tests may fail based on the security setup of your system.
5
8
  #############################################################################
6
- base = File.basename(Dir.pwd)
7
-
8
- if base == 'test' || base =~ /win32-file/
9
- Dir.chdir('..') if base == 'test'
10
- $LOAD_PATH.unshift(Dir.pwd + '/lib')
11
- Dir.chdir('test') rescue nil
12
- end
13
-
14
- require "test/unit"
15
- require "win32/file"
9
+ require 'test/unit'
10
+ require 'win32/file'
16
11
 
17
12
  class TC_Win32_File_Encryption < Test::Unit::TestCase
18
13
  def setup
@@ -1,18 +1,11 @@
1
1
  #############################################################################
2
2
  # tc_file_path.rb
3
3
  #
4
- # Test case for the path related methods of win32-file.
4
+ # Test case for the path related methods of win32-file. You should run this
5
+ # test via the 'rake test' or 'rake test_path' task.
5
6
  #############################################################################
6
- base = File.basename(Dir.pwd)
7
-
8
- if base == 'test' || base =~ /win32-file/
9
- Dir.chdir('..') if base == 'test'
10
- $LOAD_PATH.unshift(Dir.pwd + '/lib')
11
- Dir.chdir('test') rescue nil
12
- end
13
-
14
- require "test/unit"
15
- require "win32/file"
7
+ require 'test/unit'
8
+ require 'win32/file'
16
9
 
17
10
  class TC_Win32_File_Path < Test::Unit::TestCase
18
11
  def setup
@@ -1,16 +1,9 @@
1
1
  #####################################################################
2
2
  # tc_file_security.rb
3
3
  #
4
- # Test case for security related methods of win32-file.
4
+ # Test case for security related methods of win32-file. You should
5
+ # use the 'rake test' or 'rake test_security' task to run this.
5
6
  #####################################################################
6
- base = File.basename(Dir.pwd)
7
-
8
- if base == 'test' || base =~ /win32-file/
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'
16
9
  require 'socket'
@@ -1,18 +1,11 @@
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 run
5
+ # this via the 'rake test' or 'rake test_stat' task.
5
6
  #####################################################################
6
- base = File.basename(Dir.pwd)
7
-
8
- if base == 'test' || base =~ /win32-file/
9
- Dir.chdir('..') if base == 'test'
10
- $LOAD_PATH.unshift(Dir.pwd + '/lib')
11
- Dir.chdir('test') rescue nil
12
- end
13
-
14
- require "test/unit"
15
- require "win32/file"
7
+ require 'test/unit'
8
+ require 'win32/file'
16
9
 
17
10
  class TC_Win32_File_Stat < Test::Unit::TestCase
18
11
  def setup
@@ -39,10 +32,11 @@ class TC_Win32_File_Stat < Test::Unit::TestCase
39
32
  assert_raises(ArgumentError){ File.blksize(@file, "foo") }
40
33
  end
41
34
 
35
+ # The test for a block device will fail unless the D: drive is a CDROM.
42
36
  def test_blockdev
43
37
  assert_respond_to(File, :blockdev?)
44
38
  assert_nothing_raised{ File.blockdev?("C:\\") }
45
- assert_equal(true, File.blockdev?("C:\\"))
39
+ assert_equal(true, File.blockdev?("D:\\"), '+Will fail unless CDROM+')
46
40
  assert_equal(false, File.blockdev?("NUL"))
47
41
  end
48
42
 
@@ -1,8 +1,3 @@
1
- $LOAD_PATH.unshift(Dir.pwd)
2
- $LOAD_PATH.unshift(Dir.pwd + '/lib')
3
- $LOAD_PATH.unshift(Dir.pwd + '/lib/win32')
4
- $LOAD_PATH.unshift(Dir.pwd + '/test')
5
-
6
1
  require 'tc_file_encryption'
7
2
  require 'tc_file_path'
8
3
  require 'tc_file_stat'
@@ -2,7 +2,7 @@ require "rubygems"
2
2
 
3
3
  spec = Gem::Specification.new do |gem|
4
4
  gem.name = "win32-file"
5
- gem.version = "0.5.3"
5
+ gem.version = "0.5.4"
6
6
  gem.author = "Daniel J. Berger"
7
7
  gem.email = "djberg96@gmail.com"
8
8
  gem.homepage = "http://www.rubyforge.org/projects/win32utils"
metadata CHANGED
@@ -1,10 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.9.0
2
+ rubygems_version: 0.9.0.8
3
3
  specification_version: 1
4
4
  name: win32-file
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.5.3
7
- date: 2006-11-02 00:00:00 -07:00
6
+ version: 0.5.4
7
+ date: 2007-04-08 00:00:00 -06:00
8
8
  summary: Extra or redefined methods for the File class on Windows.
9
9
  require_paths:
10
10
  - lib
@@ -30,6 +30,7 @@ authors:
30
30
  - Daniel J. Berger
31
31
  files:
32
32
  - lib/win32/file.rb
33
+ - test/CVS
33
34
  - test/sometestfile.txt
34
35
  - test/tc_file_attributes.rb
35
36
  - test/tc_file_constants.rb
@@ -39,9 +40,11 @@ files:
39
40
  - test/tc_file_stat.rb
40
41
  - test/ts_all.rb
41
42
  - CHANGES
43
+ - CVS
42
44
  - install.rb
43
45
  - lib
44
46
  - MANIFEST
47
+ - Rakefile
45
48
  - README
46
49
  - test
47
50
  - win32-file.gemspec