ptools 1.2.2-universal-mingw32 → 1.2.3-universal-mingw32

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 5aab93763e9329f79313e50cb5f7137312c9fc0d
4
+ data.tar.gz: e58c83afbb52f088b766b21e50b8c65ebae1348d
5
+ SHA512:
6
+ metadata.gz: 4b3c28fa6066055f6b68dbc169aadba02b46f0c31a0547c39508ec2252ec4ca9ba9e6e776d553fa7b06d8a10c5149a372a9b76701584fac0d03ab7632b12555d
7
+ data.tar.gz: efaf6a4e6a98ce9267febbf05a1dd320152dde55af0443e87b90794f9949585b010528ec0c5bca95f7f2571e16bae28fc2c39b8f0417fa8918e23733141b32d3
data/CHANGES CHANGED
@@ -1,121 +1,126 @@
1
- == 1.2.2 - 6-Apr-2012
2
- * Yet another sparse file test fix for OSX, which does not support
3
- sparse file generation on HFS+.
4
- * Fixed a bug in the File.whereis method on Windows when dealing with
5
- absolute paths.
6
- * Some Config vs RbConfig fixes to silence 1.9.3 warnings.
7
- * Refactored and cleaned up some tests.
8
-
9
- == 1.2.1 - 20-May-2011
10
- * Added an (empty) .gemtest file so that it can be used with test.rubygems.org.
11
- * Fixed a sparse file test.
12
-
13
- == 1.2.0 - 8-Jan-2011
14
- * Added the File.sparse? method for Unix platforms. This method already
15
- exists on Windows courtesy of the win32-file library.
16
-
17
- == 1.1.9 - 25-Mar-2010
18
- * Refactored File.which and File.whereis and added additional tests for each.
19
- * Removed the block form of File.whereis.
20
- * Reorganized the Rakefile a bit and put the test tasks under the 'test'
21
- namespace, and the gem tasks under the 'gem' namespace.
22
- * Updated the test-unit development dependency.
23
- * Updates the README.
24
-
25
- == 1.1.8 - 6-Oct-2009
26
- * Fixed some bad variable names that crept into the File.nl_convert method.
27
- * Added the File.null_device alias for File.null.
28
- * Added cygwin and mingw to Windows detection code.
29
- * One of the nlconvert tests is now skipped on Windows.
30
- * Two text files that were previously bundled as part of this library for
31
- testing purposes have been removed. Those are now dynamically generated
32
- within the tests themselves.
33
- * Gemspec updates.
34
- * Documentation updates.
35
- * Added the :gem rake task.
36
-
37
- == 1.1.7 - 28-Jul-2009
38
- * Now compatible with Ruby 1.9.x.
39
- * Replaced RUBY_PLATFORM with rbconfig check for the sake of other
40
- implementations, such as JRuby.
41
- * Updated the tests to be more friendly to JRuby.
42
- * Added Test::Unit 2.x as a development dependency.
43
- * Renamed the test files.
44
-
45
- == 1.1.6 - 31-Aug-2007
46
- * Fixed the File.touch method so that it doesn't whack existing files. Thanks
47
- go to Thomas Preymesser for the spot.
48
- * Added corresponding tests to the tc_touch.rb file.
49
-
50
- == 1.1.5 - 19-Jul-2007
51
- * Added the File.image? method. Inspired by ruby-talk: 260487.
52
-
53
- == 1.1.4 - 21-May-2007
54
- * Removed the install.rb file. Installation is now handled exclusively by the
55
- rake install task.
56
- * Updated the MANIFEST file, and made it rdoc friendly.
57
- * Manual installation corrections in the README file.
58
-
59
- == 1.1.3 - 29-Apr-2007
60
- * I changed the way that the constants IS_WINDOWS and WIN32EXTS are defined.
61
- * The IS_WINDOWS and WIN32EXTS are no long documented publically. They were
62
- never meant for public use.
63
- * The tc_constants.rb file was modified to only run certain tests on Windows.
64
-
65
- == 1.1.2 - 28-Apr-2007
66
- * Fixed a require line that could cause problems on MS Windows.
67
- * Added a Rakefile which includes tasks for installation and testing.
68
- * Some cleanup and improvement in the various test files.
69
-
70
- == 1.1.1 - 24-Aug-2006
71
- * Added the File.binary? method, based on code from Ryan Davis.
72
-
73
- == 1.1.0 - 23-Aug-2006
74
- * Added the File.null method which returns the bit bucket on your platform.
75
- * The suffixes on MS Windows are now based on the PATHEXT environment variable,
76
- and defaults to '.com', '.bat' and '.exe' only if it's not defined.
77
- * The File.which and File.whereis methods were tweaked a bit for Windows so
78
- that they ignore the case of suffixes.
79
- * Modified the platform checking and path separator handling.
80
- * Added and tweaked some tests.
81
-
82
- == 1.0.0 - 2-Jun-2005
83
- * Modified the File.middle method to accept an optional block.
84
- * File.whereis is now limited to unique values so that redundant PATH entries
85
- do not cause redundant entries in the returned array (or block).
86
- * File.nl_convert and File.touch now return self.
87
- * File.nl_convert now raises ArgumentError (instead of StandardError) if
88
- an unknown platform is provided.
89
- * File.wc now raises ArgumentError (instead of RuntimeError) if a bad option
90
- is provided.
91
- * Made documentation rdoc friendly.
92
- * Test suite updates, corrections and additions.
93
- * Removed the INSTALL file. See the README instead.
94
- * Moved project to RubyForge.
95
-
96
- == 0.1.3 - 5-Dec-2003
97
- * Modified File#which and File#whereis for Win32 to handle extensions better,
98
- i.e. you can send "ruby" or "ruby.exe" and get back the same result.
99
- * Minor test changes to tc_which.rb and tc_whereis.rb.
100
-
101
- == 0.1.2 - 14-May-2003
102
- * Modified nl_convert() to allow the destination filename to be the same as the
103
- source file. In that case, a tempfile is used and copied back over the
104
- original file.
105
- * The target file name for nl_convert() now defaults to the source file name and
106
- the default format is now "dos".
107
- * Added a tc_constants.rb test suite.
108
- * Test suite additions/fixes.
109
- * Updates to MANIFEST.
110
-
111
- == 0.1.1 - 21-Mar-2003
112
- * Modified File.tail to return data in the same order that 'tail' does.
113
- * Modified File.which to return nil if the program is not found.
114
- * Modified File.whereis now uses '\' instead of '/' on MS Windows.
115
- * Added File.middle class method.
116
- * Test suite modification & additions.
117
- * Thanks go to Shanko for both the spot and patch for tail, which, whereis
118
- and middle.
119
-
120
- == 0.1.0 - 18-Mar-2003
121
- * Initial release
1
+ == 1.2.3 - 19-Feb-2014
2
+ * Fixed a bug where File.binary? would return true for unicode text. Thanks go
3
+ to Ben Hollis for the spot.
4
+ * Updated the win32-file and test-unit dependencies.
5
+
6
+ == 1.2.2 - 6-Apr-2012
7
+ * Yet another sparse file test fix for OSX, which does not support
8
+ sparse file generation on HFS+.
9
+ * Fixed a bug in the File.whereis method on Windows when dealing with
10
+ absolute paths.
11
+ * Some Config vs RbConfig fixes to silence 1.9.3 warnings.
12
+ * Refactored and cleaned up some tests.
13
+
14
+ == 1.2.1 - 20-May-2011
15
+ * Added an (empty) .gemtest file so that it can be used with test.rubygems.org.
16
+ * Fixed a sparse file test.
17
+
18
+ == 1.2.0 - 8-Jan-2011
19
+ * Added the File.sparse? method for Unix platforms. This method already
20
+ exists on Windows courtesy of the win32-file library.
21
+
22
+ == 1.1.9 - 25-Mar-2010
23
+ * Refactored File.which and File.whereis and added additional tests for each.
24
+ * Removed the block form of File.whereis.
25
+ * Reorganized the Rakefile a bit and put the test tasks under the 'test'
26
+ namespace, and the gem tasks under the 'gem' namespace.
27
+ * Updated the test-unit development dependency.
28
+ * Updates the README.
29
+
30
+ == 1.1.8 - 6-Oct-2009
31
+ * Fixed some bad variable names that crept into the File.nl_convert method.
32
+ * Added the File.null_device alias for File.null.
33
+ * Added cygwin and mingw to Windows detection code.
34
+ * One of the nlconvert tests is now skipped on Windows.
35
+ * Two text files that were previously bundled as part of this library for
36
+ testing purposes have been removed. Those are now dynamically generated
37
+ within the tests themselves.
38
+ * Gemspec updates.
39
+ * Documentation updates.
40
+ * Added the :gem rake task.
41
+
42
+ == 1.1.7 - 28-Jul-2009
43
+ * Now compatible with Ruby 1.9.x.
44
+ * Replaced RUBY_PLATFORM with rbconfig check for the sake of other
45
+ implementations, such as JRuby.
46
+ * Updated the tests to be more friendly to JRuby.
47
+ * Added Test::Unit 2.x as a development dependency.
48
+ * Renamed the test files.
49
+
50
+ == 1.1.6 - 31-Aug-2007
51
+ * Fixed the File.touch method so that it doesn't whack existing files. Thanks
52
+ go to Thomas Preymesser for the spot.
53
+ * Added corresponding tests to the tc_touch.rb file.
54
+
55
+ == 1.1.5 - 19-Jul-2007
56
+ * Added the File.image? method. Inspired by ruby-talk: 260487.
57
+
58
+ == 1.1.4 - 21-May-2007
59
+ * Removed the install.rb file. Installation is now handled exclusively by the
60
+ rake install task.
61
+ * Updated the MANIFEST file, and made it rdoc friendly.
62
+ * Manual installation corrections in the README file.
63
+
64
+ == 1.1.3 - 29-Apr-2007
65
+ * I changed the way that the constants IS_WINDOWS and WIN32EXTS are defined.
66
+ * The IS_WINDOWS and WIN32EXTS are no long documented publically. They were
67
+ never meant for public use.
68
+ * The tc_constants.rb file was modified to only run certain tests on Windows.
69
+
70
+ == 1.1.2 - 28-Apr-2007
71
+ * Fixed a require line that could cause problems on MS Windows.
72
+ * Added a Rakefile which includes tasks for installation and testing.
73
+ * Some cleanup and improvement in the various test files.
74
+
75
+ == 1.1.1 - 24-Aug-2006
76
+ * Added the File.binary? method, based on code from Ryan Davis.
77
+
78
+ == 1.1.0 - 23-Aug-2006
79
+ * Added the File.null method which returns the bit bucket on your platform.
80
+ * The suffixes on MS Windows are now based on the PATHEXT environment variable,
81
+ and defaults to '.com', '.bat' and '.exe' only if it's not defined.
82
+ * The File.which and File.whereis methods were tweaked a bit for Windows so
83
+ that they ignore the case of suffixes.
84
+ * Modified the platform checking and path separator handling.
85
+ * Added and tweaked some tests.
86
+
87
+ == 1.0.0 - 2-Jun-2005
88
+ * Modified the File.middle method to accept an optional block.
89
+ * File.whereis is now limited to unique values so that redundant PATH entries
90
+ do not cause redundant entries in the returned array (or block).
91
+ * File.nl_convert and File.touch now return self.
92
+ * File.nl_convert now raises ArgumentError (instead of StandardError) if
93
+ an unknown platform is provided.
94
+ * File.wc now raises ArgumentError (instead of RuntimeError) if a bad option
95
+ is provided.
96
+ * Made documentation rdoc friendly.
97
+ * Test suite updates, corrections and additions.
98
+ * Removed the INSTALL file. See the README instead.
99
+ * Moved project to RubyForge.
100
+
101
+ == 0.1.3 - 5-Dec-2003
102
+ * Modified File#which and File#whereis for Win32 to handle extensions better,
103
+ i.e. you can send "ruby" or "ruby.exe" and get back the same result.
104
+ * Minor test changes to tc_which.rb and tc_whereis.rb.
105
+
106
+ == 0.1.2 - 14-May-2003
107
+ * Modified nl_convert() to allow the destination filename to be the same as the
108
+ source file. In that case, a tempfile is used and copied back over the
109
+ original file.
110
+ * The target file name for nl_convert() now defaults to the source file name and
111
+ the default format is now "dos".
112
+ * Added a tc_constants.rb test suite.
113
+ * Test suite additions/fixes.
114
+ * Updates to MANIFEST.
115
+
116
+ == 0.1.1 - 21-Mar-2003
117
+ * Modified File.tail to return data in the same order that 'tail' does.
118
+ * Modified File.which to return nil if the program is not found.
119
+ * Modified File.whereis now uses '\' instead of '/' on MS Windows.
120
+ * Added File.middle class method.
121
+ * Test suite modification & additions.
122
+ * Thanks go to Shanko for both the spot and patch for tail, which, whereis
123
+ and middle.
124
+
125
+ == 0.1.0 - 18-Mar-2003
126
+ * Initial release
data/MANIFEST CHANGED
@@ -1,17 +1,17 @@
1
- * CHANGES
2
- * README
3
- * MANIFEST
4
- * Rakefile
5
- * ptools.gemspec
6
- * lib/ptools.rb
7
- * test/test_constants.rb
8
- * test/test_head.rb
9
- * test/test_image.rb
10
- * test/test_middle.rb
11
- * test/test_nlconvert.rb
12
- * test/test_null.rb
13
- * test/test_tail.rb
14
- * test/test_touch.rb
15
- * test/test_wc.rb
16
- * test/test_which.rb
17
- * test/test_whereis.rb
1
+ * CHANGES
2
+ * README
3
+ * MANIFEST
4
+ * Rakefile
5
+ * ptools.gemspec
6
+ * lib/ptools.rb
7
+ * test/test_constants.rb
8
+ * test/test_head.rb
9
+ * test/test_image.rb
10
+ * test/test_middle.rb
11
+ * test/test_nlconvert.rb
12
+ * test/test_null.rb
13
+ * test/test_tail.rb
14
+ * test/test_touch.rb
15
+ * test/test_wc.rb
16
+ * test/test_which.rb
17
+ * test/test_whereis.rb
data/README CHANGED
@@ -1,65 +1,65 @@
1
- == Description
2
- The ptools (power tools) library is an additional set of commands for the
3
- File class based on Unix command line tools.
4
-
5
- == Prerequisites
6
- On MS Windows you will need win32-file 0.5.4 or later.
7
-
8
- == Installation
9
- gem install ptools
10
-
11
- == Synopsis
12
- require "ptools"
13
-
14
- File.which("ruby") # '/usr/local/bin/ruby'
15
- File.whereis("ruby") # ['/usr/local/bin/ruby','/opt/bin/ruby']
16
-
17
- File.head("myfile") # Returns first 10 lines of 'myfile'
18
- File.middle("myfile",8,12) # Returns lines 8-12 of 'myfile'
19
- File.tail("myfile",3) # Returns last 3 lines of 'myfile'
20
- File.wc("myfile",'words') # Returns the number of words in 'myfile'
21
-
22
- File.touch("newfile") # "newfile" now exists
23
- File.null # '/dev/null' on Unix, 'NUL' on Windows
24
- File.binary?('some_file') # true or false
25
- File.sparse?('some_file') # true or false
26
-
27
- # Creates a copy of 'myfile' called 'newfile', in DOS format
28
- File.nl_convert("myfile", "newfile", "dos")
29
-
30
- == Known Bugs
31
- None known. Please report any bugs on the github or RubyForge project page.
32
-
33
- http://www.rubyforge.org/projects/shards
34
- http://www.github.com/djberg96/ptools
35
-
36
- == Acknowledgements
37
- The File.which method was originally adopted from the FileWhich code posted
38
- by Michael Granger on the now defunct rubygarden.org website. That code was
39
- later replaced by a version based on the ruby-which library.
40
-
41
- The File.nl_convert method is based on the nlcvt program found at
42
- http://www.perl.com/language/ppt/src/nlcvt/nlcvt, written by Tom Christiansen.
43
-
44
- The middle() method was provided by Shashank Date.
45
-
46
- The binary?() method was based almost entirely on a blog post by Ryan
47
- Davis (who, in turn, based his code on Perl's -B switch).
48
-
49
- == Future Plans
50
- Add whatever other tools people think might be useful.
51
-
52
- == License
53
- Artistic 2.0
54
-
55
- == Copyright
56
- (C) 2003-2012 Daniel J. Berger
57
- All Rights Reserved.
58
-
59
- == Warranty
60
- This package is provided "as is" and without any express or
61
- implied warranties, including, without limitation, the implied
62
- warranties of merchantability and fitness for a particular purpose.
63
-
64
- == Author
65
- Daniel J. Berger
1
+ == Description
2
+ The ptools (power tools) library is an additional set of commands for the
3
+ File class based on Unix command line tools.
4
+
5
+ == Prerequisites
6
+ On MS Windows you will need win32-file 0.5.4 or later.
7
+
8
+ == Installation
9
+ gem install ptools
10
+
11
+ == Synopsis
12
+ require "ptools"
13
+
14
+ File.which("ruby") # '/usr/local/bin/ruby'
15
+ File.whereis("ruby") # ['/usr/local/bin/ruby','/opt/bin/ruby']
16
+
17
+ File.head("myfile") # Returns first 10 lines of 'myfile'
18
+ File.middle("myfile",8,12) # Returns lines 8-12 of 'myfile'
19
+ File.tail("myfile",3) # Returns last 3 lines of 'myfile'
20
+ File.wc("myfile",'words') # Returns the number of words in 'myfile'
21
+
22
+ File.touch("newfile") # "newfile" now exists
23
+ File.null # '/dev/null' on Unix, 'NUL' on Windows
24
+ File.binary?('some_file') # true or false
25
+ File.sparse?('some_file') # true or false
26
+
27
+ # Creates a copy of 'myfile' called 'newfile', in DOS format
28
+ File.nl_convert("myfile", "newfile", "dos")
29
+
30
+ == Known Bugs
31
+ None known. Please report any bugs on the github or RubyForge project page.
32
+
33
+ http://www.rubyforge.org/projects/shards
34
+ http://www.github.com/djberg96/ptools
35
+
36
+ == Acknowledgements
37
+ The File.which method was originally adopted from the FileWhich code posted
38
+ by Michael Granger on the now defunct rubygarden.org website. That code was
39
+ later replaced by a version based on the ruby-which library.
40
+
41
+ The File.nl_convert method is based on the nlcvt program found at
42
+ http://www.perl.com/language/ppt/src/nlcvt/nlcvt, written by Tom Christiansen.
43
+
44
+ The middle() method was provided by Shashank Date.
45
+
46
+ The binary?() method was based almost entirely on a blog post by Ryan
47
+ Davis (who, in turn, based his code on Perl's -B switch).
48
+
49
+ == Future Plans
50
+ Add whatever other tools people think might be useful.
51
+
52
+ == License
53
+ Artistic 2.0
54
+
55
+ == Copyright
56
+ (C) 2003-2012 Daniel J. Berger
57
+ All Rights Reserved.
58
+
59
+ == Warranty
60
+ This package is provided "as is" and without any express or
61
+ implied warranties, including, without limitation, the implied
62
+ warranties of merchantability and fitness for a particular purpose.
63
+
64
+ == Author
65
+ Daniel J. Berger
data/Rakefile CHANGED
@@ -1,130 +1,135 @@
1
- require 'rake'
2
- require 'rake/clean'
3
- require 'rake/testtask'
4
- require 'rbconfig'
5
- include RbConfig
6
-
7
- CLEAN.include("**/*.gem", "**/*.rbc", "**/*coverage*")
8
-
9
- desc 'Install the ptools package (non-gem)'
10
- task :install do
11
- sitelibdir = CONFIG["sitelibdir"]
12
- file = "lib/ptools.rb"
13
- FileUtils.cp(file, sitelibdir, :verbose => true)
14
- end
15
-
16
- namespace 'gem' do
17
- desc 'Create the ptools gem'
18
- task :create => [:clean] do
19
- Dir["*.gem"].each{ |f| File.delete(f) } # Clean first
20
- spec = eval(IO.read('ptools.gemspec'))
21
- Gem::Builder.new(spec).build
22
- end
23
-
24
- desc 'Install the ptools gem'
25
- task :install => [:create] do
26
- file = Dir["*.gem"].first
27
- sh "gem install #{file}"
28
- end
29
- end
30
-
31
- Rake::TestTask.new do |t|
32
- task :test => :clean
33
- t.verbose = true
34
- t.warning = true
35
- end
36
-
37
- namespace 'test' do
38
- desc "Check test coverage using rcov"
39
- task :coverage => [:clean] do
40
- require 'rcov'
41
- rm_rf 'coverage'
42
- sh "rcov -Ilib test/test*.rb"
43
- end
44
-
45
- Rake::TestTask.new('binary') do |t|
46
- t.libs << 'test'
47
- t.verbose = true
48
- t.warning = true
49
- t.test_files = FileList['test/test_binary.rb']
50
- end
51
-
52
- Rake::TestTask.new('constants') do |t|
53
- t.libs << 'test'
54
- t.verbose = true
55
- t.warning = true
56
- t.test_files = FileList['test/test_constants.rb']
57
- end
58
-
59
- Rake::TestTask.new('head') do |t|
60
- t.libs << 'test'
61
- t.verbose = true
62
- t.warning = true
63
- t.test_files = FileList['test/test_head.rb']
64
- end
65
-
66
- Rake::TestTask.new('middle') do |t|
67
- t.libs << 'test'
68
- t.verbose = true
69
- t.warning = true
70
- t.test_files = FileList['test/test_middle.rb']
71
- end
72
-
73
- Rake::TestTask.new('nlconvert') do |t|
74
- t.libs << 'test'
75
- t.verbose = true
76
- t.warning = true
77
- t.test_files = FileList['test/test_nlconvert.rb']
78
- end
79
-
80
- Rake::TestTask.new('null') do |t|
81
- t.libs << 'test'
82
- t.verbose = true
83
- t.warning = true
84
- t.test_files = FileList['test/test_null.rb']
85
- end
86
-
87
- Rake::TestTask.new('sparse') do |t|
88
- t.libs << 'test'
89
- t.verbose = true
90
- t.warning = true
91
- t.test_files = FileList['test/test_is_sparse.rb']
92
- end
93
-
94
- Rake::TestTask.new('tail') do |t|
95
- t.libs << 'test'
96
- t.verbose = true
97
- t.warning = true
98
- t.test_files = FileList['test/test_tail.rb']
99
- end
100
-
101
- Rake::TestTask.new('touch') do |t|
102
- t.libs << 'test'
103
- t.verbose = true
104
- t.warning = true
105
- t.test_files = FileList['test/test_touch.rb']
106
- end
107
-
108
- Rake::TestTask.new('wc') do |t|
109
- t.libs << 'test'
110
- t.verbose = true
111
- t.warning = true
112
- t.test_files = FileList['test/test_wc.rb']
113
- end
114
-
115
- Rake::TestTask.new('whereis') do |t|
116
- t.libs << 'test'
117
- t.verbose = true
118
- t.warning = true
119
- t.test_files = FileList['test/test_whereis.rb']
120
- end
121
-
122
- Rake::TestTask.new('which') do |t|
123
- t.libs << 'test'
124
- t.verbose = true
125
- t.warning = true
126
- t.test_files = FileList['test/test_which.rb']
127
- end
128
- end
129
-
130
- task :default => :test
1
+ require 'rake'
2
+ require 'rake/clean'
3
+ require 'rake/testtask'
4
+ require 'rbconfig'
5
+ include RbConfig
6
+
7
+ CLEAN.include("**/*.gem", "**/*.rbc", "**/*coverage*")
8
+
9
+ desc 'Install the ptools package (non-gem)'
10
+ task :install do
11
+ sitelibdir = CONFIG["sitelibdir"]
12
+ file = "lib/ptools.rb"
13
+ FileUtils.cp(file, sitelibdir, :verbose => true)
14
+ end
15
+
16
+ namespace 'gem' do
17
+ desc 'Create the ptools gem'
18
+ task :create => [:clean] do
19
+ Dir["*.gem"].each{ |f| File.delete(f) } # Clean first
20
+ spec = eval(IO.read('ptools.gemspec'))
21
+ if Gem::VERSION < "2.0.0"
22
+ Gem::Builder.new(spec).build
23
+ else
24
+ require 'rubygems/package'
25
+ Gem::Package.build(spec)
26
+ end
27
+ end
28
+
29
+ desc 'Install the ptools gem'
30
+ task :install => [:create] do
31
+ file = Dir["*.gem"].first
32
+ sh "gem install #{file}"
33
+ end
34
+ end
35
+
36
+ Rake::TestTask.new do |t|
37
+ task :test => :clean
38
+ t.verbose = true
39
+ t.warning = true
40
+ end
41
+
42
+ namespace 'test' do
43
+ desc "Check test coverage using rcov"
44
+ task :coverage => [:clean] do
45
+ require 'rcov'
46
+ rm_rf 'coverage'
47
+ sh "rcov -Ilib test/test*.rb"
48
+ end
49
+
50
+ Rake::TestTask.new('binary') do |t|
51
+ t.libs << 'test'
52
+ t.verbose = true
53
+ t.warning = true
54
+ t.test_files = FileList['test/test_binary.rb']
55
+ end
56
+
57
+ Rake::TestTask.new('constants') do |t|
58
+ t.libs << 'test'
59
+ t.verbose = true
60
+ t.warning = true
61
+ t.test_files = FileList['test/test_constants.rb']
62
+ end
63
+
64
+ Rake::TestTask.new('head') do |t|
65
+ t.libs << 'test'
66
+ t.verbose = true
67
+ t.warning = true
68
+ t.test_files = FileList['test/test_head.rb']
69
+ end
70
+
71
+ Rake::TestTask.new('middle') do |t|
72
+ t.libs << 'test'
73
+ t.verbose = true
74
+ t.warning = true
75
+ t.test_files = FileList['test/test_middle.rb']
76
+ end
77
+
78
+ Rake::TestTask.new('nlconvert') do |t|
79
+ t.libs << 'test'
80
+ t.verbose = true
81
+ t.warning = true
82
+ t.test_files = FileList['test/test_nlconvert.rb']
83
+ end
84
+
85
+ Rake::TestTask.new('null') do |t|
86
+ t.libs << 'test'
87
+ t.verbose = true
88
+ t.warning = true
89
+ t.test_files = FileList['test/test_null.rb']
90
+ end
91
+
92
+ Rake::TestTask.new('sparse') do |t|
93
+ t.libs << 'test'
94
+ t.verbose = true
95
+ t.warning = true
96
+ t.test_files = FileList['test/test_is_sparse.rb']
97
+ end
98
+
99
+ Rake::TestTask.new('tail') do |t|
100
+ t.libs << 'test'
101
+ t.verbose = true
102
+ t.warning = true
103
+ t.test_files = FileList['test/test_tail.rb']
104
+ end
105
+
106
+ Rake::TestTask.new('touch') do |t|
107
+ t.libs << 'test'
108
+ t.verbose = true
109
+ t.warning = true
110
+ t.test_files = FileList['test/test_touch.rb']
111
+ end
112
+
113
+ Rake::TestTask.new('wc') do |t|
114
+ t.libs << 'test'
115
+ t.verbose = true
116
+ t.warning = true
117
+ t.test_files = FileList['test/test_wc.rb']
118
+ end
119
+
120
+ Rake::TestTask.new('whereis') do |t|
121
+ t.libs << 'test'
122
+ t.verbose = true
123
+ t.warning = true
124
+ t.test_files = FileList['test/test_whereis.rb']
125
+ end
126
+
127
+ Rake::TestTask.new('which') do |t|
128
+ t.libs << 'test'
129
+ t.verbose = true
130
+ t.warning = true
131
+ t.test_files = FileList['test/test_which.rb']
132
+ end
133
+ end
134
+
135
+ task :default => :test