win32-dir 0.3.1 → 0.3.2
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.
- data/CHANGES +5 -0
- data/MANIFEST +8 -9
- data/README +16 -18
- data/Rakefile +22 -0
- data/lib/win32/dir.rb +1 -1
- data/test/tc_dir.rb +6 -12
- data/win32-dir.gemspec +2 -2
- metadata +7 -5
- data/install.rb +0 -11
- data/win32-dir-0.3.1.gem +0 -0
data/CHANGES
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
== 0.3.2 - 25-Jul-2007
|
2
|
+
* Added a Rakefile with tasks for testing and installation.
|
3
|
+
* Removed the install.rb file (the Rakefile handles installation).
|
4
|
+
* Minor updates the README, MANIFEST, and test file.
|
5
|
+
|
1
6
|
== 0.3.1 - 16-Oct-2006
|
2
7
|
* Added the Dir.empty? method.
|
3
8
|
* Changed the Dir.reparse_dir? method to Dir.junction? (but kept an alias
|
data/MANIFEST
CHANGED
@@ -1,9 +1,8 @@
|
|
1
|
-
README
|
2
|
-
MANIFEST
|
3
|
-
CHANGES
|
4
|
-
|
5
|
-
win32-dir.gemspec
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
test/tc_dir.rb
|
1
|
+
* README
|
2
|
+
* MANIFEST
|
3
|
+
* CHANGES
|
4
|
+
* Rakefile
|
5
|
+
* win32-dir.gemspec
|
6
|
+
* examples/dir_test.rb
|
7
|
+
* lib/win32/dir.rb
|
8
|
+
* test/tc_dir.rb
|
data/README
CHANGED
@@ -1,18 +1,14 @@
|
|
1
1
|
= Description
|
2
2
|
A series of extra constants for the Dir class that define special folders
|
3
|
-
on Win32 systems,
|
3
|
+
on Win32 systems, as well as methods for creating and detecting junctions
|
4
4
|
(i.e. symlinks for directories).
|
5
5
|
|
6
6
|
= Installation
|
7
|
-
|
8
|
-
|
9
|
-
ruby install.rb
|
10
|
-
== Gems
|
11
|
-
ruby win32-dir.gemspec
|
12
|
-
gem install win32-dir-X.Y.Z-mswin32.gem
|
7
|
+
rake test (optional)
|
8
|
+
rake install (non-gem) or rake install_gem (gem).
|
13
9
|
|
14
10
|
= Notes
|
15
|
-
Some tests may fail.
|
11
|
+
Some tests may fail. That is expected, because not all constants are
|
16
12
|
necessarily defined on your system.
|
17
13
|
|
18
14
|
= Synopsis
|
@@ -28,8 +24,8 @@
|
|
28
24
|
Dir.create_junction('C:\to', 'C:\from')
|
29
25
|
|
30
26
|
= Constants
|
31
|
-
Not all of these are guaranteed to be defined on your system.
|
32
|
-
that the directories are merely defined.
|
27
|
+
Not all of these are guaranteed to be defined on your system. Also note
|
28
|
+
that the directories are merely defined. It doesn't necessarily mean they
|
33
29
|
actually exist.
|
34
30
|
|
35
31
|
== The following constants should be defined:
|
@@ -45,9 +41,11 @@ Dir::COMMON_ADMINTOOLS
|
|
45
41
|
Dir::APPDATA
|
46
42
|
The file system directory that serves as a common repository for
|
47
43
|
application-specific data. A typical path is
|
48
|
-
C:\Documents and Settings\username\Application Data.
|
49
|
-
|
50
|
-
|
44
|
+
C:\Documents and Settings\username\Application Data.
|
45
|
+
|
46
|
+
This CSIDL is supported by the redistributable Shfolder.dll for
|
47
|
+
systems that do not have the Microsoft Internet Explorer 4.0
|
48
|
+
integrated Shell installed.
|
51
49
|
|
52
50
|
Dir::COMMON_APPDATA
|
53
51
|
The file system directory containing application data for all users. A
|
@@ -144,8 +142,8 @@ Dir::COMMON_STARTUP
|
|
144
142
|
Startup folder for all users.
|
145
143
|
|
146
144
|
Dir::COMMON_TEMPLATES
|
147
|
-
|
148
|
-
|
145
|
+
The file system directory that contains the templates that are available
|
146
|
+
to all users.
|
149
147
|
|
150
148
|
Dir::COMMON_VIDEO
|
151
149
|
The file system directory that serves as a repository for video files
|
@@ -236,11 +234,11 @@ Dir::TEMPLATES
|
|
236
234
|
== Developer's Notes
|
237
235
|
The SHGetFolderPath() documentation on MSDN is somewhat vague about which
|
238
236
|
CSIDL constants are guaranteed to be defined. However, there are 15 which
|
239
|
-
*should* be defined (see docs above).
|
237
|
+
*should* be defined (see docs above). The rest I cannot vouch for. On
|
240
238
|
my own Windows XP SP 2 system, all but 7 were defined.
|
241
239
|
|
242
240
|
== Known Bugs
|
243
|
-
The Unicode support is not quite there for Dir.create_junction.
|
241
|
+
The Unicode support is not quite there for Dir.create_junction. It creates
|
244
242
|
the directory and junction fine, but the +to+ name appears to get garbled
|
245
243
|
with regards to the character set.
|
246
244
|
|
@@ -265,7 +263,7 @@ Dir::TEMPLATES
|
|
265
263
|
Ruby's
|
266
264
|
|
267
265
|
== Copyright
|
268
|
-
(C) 2003-
|
266
|
+
(C) 2003-2007 Daniel J. Berger, All Rights Reserved
|
269
267
|
|
270
268
|
== Warranty
|
271
269
|
This package is provided "as is" and without any express or
|
data/Rakefile
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'rake'
|
2
|
+
require 'rake/testtask'
|
3
|
+
|
4
|
+
desc "Install the win32-dir package (non-gem)"
|
5
|
+
task :install do
|
6
|
+
dest = File.join(Config::CONFIG['sitelibdir'], 'win32')
|
7
|
+
Dir.mkdir(dest) unless File.exists? dest
|
8
|
+
cp 'lib/win32/dir.rb', dest, :verbose => true
|
9
|
+
end
|
10
|
+
|
11
|
+
desc "Install the win32-dir package as a gem"
|
12
|
+
task :install_gem do
|
13
|
+
ruby 'win32-dir.gemspec'
|
14
|
+
file = Dir["*.gem"].first
|
15
|
+
sh "gem install #{file}"
|
16
|
+
end
|
17
|
+
|
18
|
+
Rake::TestTask.new do |t|
|
19
|
+
t.libs << 'lib'
|
20
|
+
t.warning = true
|
21
|
+
t.test_files = FileList['test/tc*']
|
22
|
+
end
|
data/lib/win32/dir.rb
CHANGED
data/test/tc_dir.rb
CHANGED
@@ -4,15 +4,9 @@
|
|
4
4
|
# Test suite for the win32-dir package. Note that some of these tests
|
5
5
|
# may fail, because some constants are simply not defined, depending on
|
6
6
|
# your operating system and version of certain DLL files.
|
7
|
+
#
|
8
|
+
# You should run this test case via the 'rake test' task.
|
7
9
|
###########################################################################
|
8
|
-
base = File.basename(Dir.pwd)
|
9
|
-
|
10
|
-
if base == 'test' || base =~ /win32-dir/
|
11
|
-
Dir.chdir('..') if base == 'test'
|
12
|
-
$LOAD_PATH.unshift(Dir.pwd + '/lib')
|
13
|
-
Dir.chdir('test') rescue nil
|
14
|
-
end
|
15
|
-
|
16
10
|
require 'test/unit'
|
17
11
|
require 'win32/dir'
|
18
12
|
require 'fileutils'
|
@@ -29,7 +23,7 @@ class TC_Win32_Dir < Test::Unit::TestCase
|
|
29
23
|
end
|
30
24
|
|
31
25
|
def test_version
|
32
|
-
assert_equal('0.3.
|
26
|
+
assert_equal('0.3.2', Dir::VERSION)
|
33
27
|
end
|
34
28
|
|
35
29
|
def test_create_junction
|
@@ -313,8 +307,8 @@ class TC_Win32_Dir < Test::Unit::TestCase
|
|
313
307
|
end
|
314
308
|
|
315
309
|
def teardown
|
316
|
-
|
317
|
-
|
318
|
-
FileUtils.rm_rf(@from)
|
310
|
+
FileUtils.rm_rf(@ascii_to)
|
311
|
+
FileUtils.rm_rf(@unicode_to)
|
312
|
+
FileUtils.rm_rf(@from)
|
319
313
|
end
|
320
314
|
end
|
data/win32-dir.gemspec
CHANGED
@@ -2,7 +2,7 @@ require "rubygems"
|
|
2
2
|
|
3
3
|
spec = Gem::Specification.new do |gem|
|
4
4
|
gem.name = "win32-dir"
|
5
|
-
gem.version = "0.3.
|
5
|
+
gem.version = "0.3.2"
|
6
6
|
gem.author = "Daniel J. Berger"
|
7
7
|
gem.email = "djberg96@gmail.com"
|
8
8
|
gem.homepage = "http://www.rubyforge.org/projects/win32utils"
|
@@ -14,7 +14,7 @@ spec = Gem::Specification.new do |gem|
|
|
14
14
|
gem.files = Dir["lib/win32/*.rb"] + Dir["test/*"] + Dir["[A-Z]*"]
|
15
15
|
gem.files.reject! { |fn| fn.include? "CVS" }
|
16
16
|
gem.require_path = "lib"
|
17
|
-
gem.extra_rdoc_files = [
|
17
|
+
gem.extra_rdoc_files = ['README', 'CHANGES', 'MANIFEST']
|
18
18
|
gem.add_dependency("windows-pr", ">= 0.5.1")
|
19
19
|
end
|
20
20
|
|
metadata
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: 0.9.
|
2
|
+
rubygems_version: 0.9.2
|
3
3
|
specification_version: 1
|
4
4
|
name: win32-dir
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.3.
|
7
|
-
date:
|
6
|
+
version: 0.3.2
|
7
|
+
date: 2007-07-25 00:00:00 -06:00
|
8
8
|
summary: Extra constants and methods for the Dir class on Windows.
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -30,15 +30,16 @@ authors:
|
|
30
30
|
- Daniel J. Berger
|
31
31
|
files:
|
32
32
|
- lib/win32/dir.rb
|
33
|
+
- test/CVS
|
33
34
|
- test/tc_dir.rb
|
34
35
|
- CHANGES
|
36
|
+
- CVS
|
35
37
|
- examples
|
36
|
-
- install.rb
|
37
38
|
- lib
|
38
39
|
- MANIFEST
|
40
|
+
- Rakefile
|
39
41
|
- README
|
40
42
|
- test
|
41
|
-
- win32-dir-0.3.1.gem
|
42
43
|
- win32-dir.gemspec
|
43
44
|
test_files:
|
44
45
|
- test/tc_dir.rb
|
@@ -47,6 +48,7 @@ rdoc_options: []
|
|
47
48
|
extra_rdoc_files:
|
48
49
|
- README
|
49
50
|
- CHANGES
|
51
|
+
- MANIFEST
|
50
52
|
executables: []
|
51
53
|
|
52
54
|
extensions: []
|
data/install.rb
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
# For those who don't like gems...
|
2
|
-
require 'rbconfig'
|
3
|
-
require 'ftools'
|
4
|
-
include Config
|
5
|
-
|
6
|
-
sitelibdir = CONFIG['sitelibdir']
|
7
|
-
installdir = sitelibdir + '/win32'
|
8
|
-
file = 'lib\win32\dir.rb'
|
9
|
-
|
10
|
-
Dir.mkdir(installdir) unless File.exists?(installdir)
|
11
|
-
File.copy(file, installdir, true)
|
data/win32-dir-0.3.1.gem
DELETED
File without changes
|