ptools 1.3.5-universal-mingw32 → 1.4.2-universal-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/{CHANGES → CHANGES.md} +59 -31
- data/Gemfile +1 -10
- data/MANIFEST.md +27 -0
- data/{README → README.md} +30 -26
- data/Rakefile +30 -78
- data/certs/djberg96_pub.pem +22 -17
- data/lib/ptools.rb +48 -35
- data/ptools.gemspec +13 -7
- data/spec/binary_spec.rb +59 -0
- data/spec/constants_spec.rb +23 -0
- data/spec/head_spec.rb +41 -0
- data/spec/image_spec.rb +51 -0
- data/{test → spec}/img/test.gif +0 -0
- data/{test → spec}/img/test.ico +0 -0
- data/{test → spec}/img/test.jpg +0 -0
- data/{test → spec}/img/test.png +0 -0
- data/spec/nlconvert_spec.rb +104 -0
- data/spec/sparse_spec.rb +43 -0
- data/spec/tail_spec.rb +107 -0
- data/spec/touch_spec.rb +47 -0
- data/spec/txt/empty.txt +0 -0
- data/{test → spec}/txt/english.txt +0 -0
- data/spec/txt/english.utf16 +0 -0
- data/{test → spec}/txt/korean.txt +0 -0
- data/spec/wc_spec.rb +65 -0
- data/spec/whereis_spec.rb +87 -0
- data/spec/which_spec.rb +112 -0
- metadata +68 -77
- metadata.gz.sig +0 -0
- data/MANIFEST +0 -21
- data/test/test_binary.rb +0 -70
- data/test/test_constants.rb +0 -38
- data/test/test_head.rb +0 -48
- data/test/test_image.rb +0 -62
- data/test/test_is_sparse.rb +0 -53
- data/test/test_nlconvert.rb +0 -110
- data/test/test_null.rb +0 -40
- data/test/test_tail.rb +0 -124
- data/test/test_touch.rb +0 -53
- data/test/test_wc.rb +0 -73
- data/test/test_whereis.rb +0 -98
- data/test/test_which.rb +0 -126
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 9694f9c933387b24ebb3d67fd25dd3f317d1f770fb3a60cf6dad28d4f377d478
|
4
|
+
data.tar.gz: 1cc7c6ac40de18d9d1681399b15d6a911a19e0ae546f7e350824c18358e706fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4af9fe9d5e99b81958b6bc50c45fa0deb8a0fd9362c8dbe9aafb157a9d5054519827d2f912521ee5b7e8d40fe17838d72e800b1ae9d7f2218f1ba21c87feb23f
|
7
|
+
data.tar.gz: 48e8ea182f3b809bb1c732082274f0568593f720964566718ea4bd61f7302e57b3917e6700fc0504b14b377a78fd77c25e97abf5ffdc19550b63bbabee311846
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/{CHANGES → CHANGES.md}
RENAMED
@@ -1,34 +1,62 @@
|
|
1
|
-
|
1
|
+
## 1.4.2 - 6-Jan-2021
|
2
|
+
* Fixed a private access modifier that wasn't actually working as intended.
|
3
|
+
* Two Windows constants that were never meant for public consumption have been marked private.
|
4
|
+
* Minor tweak to one of the touch specs.
|
5
|
+
* The Gemfile now just uses the gemspec.
|
6
|
+
* The image? singleton method was effectively ignoring filename extensions. This
|
7
|
+
has been fixed, though with the option to disable that check if desired.
|
8
|
+
|
9
|
+
## 1.4.1 - 29-Dec-2020
|
10
|
+
* Switch from rdoc to markdown since github is not rendering rdoc properly.
|
11
|
+
* Added metadata to gemspec.
|
12
|
+
|
13
|
+
## 1.4.0 - 20-Aug-2020
|
14
|
+
* Switched from test-unit to rspec, and reworked the tests bit in general.
|
15
|
+
* Removed the File.null method since Ruby has IO::NULL.
|
16
|
+
|
17
|
+
## 1.3.7 - 24-Jun-2020
|
18
|
+
* Fixed a bug where the File.binary? method would bomb on a zero byte file.
|
19
|
+
Thanks go to Alexandru Emil Lupu for the spot and patch.
|
20
|
+
* Remove Gemfile.lock from repo. You can generate that yourself locally if
|
21
|
+
you want.
|
22
|
+
|
23
|
+
## 1.3.6 - 7-Jun-2020
|
24
|
+
* Updated gemspec, added more versions to .travis.yml file, fixed typo.
|
25
|
+
Thanks go to Al Snow for the updates.
|
26
|
+
* Fixed a bug where the File.binary? method would return true for utf16
|
27
|
+
or utf32 encoded files. Thanks go to Andrew McAndre for the spot.
|
28
|
+
* Updated cert.
|
29
|
+
|
30
|
+
## 1.3.5 - 3-Sep-2017
|
2
31
|
* The File.image? method now checks against .ico files.
|
3
32
|
* Eliminated Fixnum warning that showed up in Ruby 2.4.x.
|
4
33
|
* Updated cert.
|
5
34
|
|
6
|
-
|
35
|
+
## 1.3.4 - 4-Jul-2017
|
7
36
|
* The File.binary? method now lets you set your own percentage for the
|
8
37
|
internal heuristic as an optional second argument.
|
9
38
|
* The VERSION constant is now frozen.
|
10
39
|
* Minor updates to the Rakefile and gemspec.
|
11
40
|
* Updated cert file.
|
12
41
|
|
13
|
-
|
42
|
+
## 1.3.3 - 25-Sep-2015
|
14
43
|
* This gem is now signed.
|
15
44
|
* The Rakefile tasks now assume Rubygems 2.x.
|
16
45
|
|
17
|
-
|
18
|
-
* Update to the File.tail method that
|
19
|
-
issues in JRuby.
|
46
|
+
## 1.3.2 - 11-Dec-2014
|
47
|
+
* Update to the File.tail method that prevents potential line ending issues in JRuby.
|
20
48
|
* Added known issues with JRuby to the README.
|
21
49
|
|
22
|
-
|
50
|
+
## 1.3.1 - 9-Dec-2014
|
23
51
|
* Fixed some potential issues with File.tail. Thanks go to Matt Hoyle for
|
24
52
|
the patch.
|
25
53
|
|
26
|
-
|
54
|
+
## 1.3.0 - 8-Dec-2014
|
27
55
|
* Made the File.tail method efficient. It's no longer slurpy, and it also no
|
28
56
|
longer includes line endings in the result.
|
29
57
|
* Removed the File.middle method. I don't think it's useful.
|
30
58
|
|
31
|
-
|
59
|
+
## 1.2.7 - 6-Dec-2014
|
32
60
|
* File.which now expands ~ for paths. Thanks go to dg-vrnetze for the patch.
|
33
61
|
* Use /dev/null for cygwin instead of NUL.
|
34
62
|
* Use mv instead of cp in the nl_convert method.
|
@@ -36,12 +64,12 @@
|
|
36
64
|
* Modified the binary? method to check 4096 bytes at most.
|
37
65
|
* Thanks to Matt Hoyle for many of the changes implemented in this release.
|
38
66
|
|
39
|
-
|
67
|
+
## 1.2.6 - 14-Jul-2014
|
40
68
|
* Updated the png? and jpg? methods so they explicitly specify the
|
41
69
|
offset argument so that it works with 1.9.2 and earlier. Thanks go to
|
42
70
|
Anurag Priyam for the spot.
|
43
71
|
|
44
|
-
|
72
|
+
## 1.2.5 - 11-Jul-2014
|
45
73
|
* Added a Gemfile, mostly for Travis CI.
|
46
74
|
* Added rake as a development dependency.
|
47
75
|
* Revert back to hash syntax supported by 1.8.x.
|
@@ -49,19 +77,19 @@
|
|
49
77
|
* Updated the tests for File.sparse? so that it doesn't rely on
|
50
78
|
an external file.
|
51
79
|
|
52
|
-
|
80
|
+
## 1.2.4 - 25-Feb-2014
|
53
81
|
* The File.binary method now always returns false for images. It is meant to
|
54
82
|
detect executables, shared objects, etc. Use File.image? to detect images.
|
55
83
|
* Encoding fixes for the File.image? method.
|
56
84
|
|
57
|
-
|
85
|
+
## 1.2.3 - 19-Feb-2014
|
58
86
|
* Fixed a bug where File.binary? would return true for unicode text. Thanks go
|
59
87
|
to Ben Hollis for the spot.
|
60
88
|
* Updated the win32-file and test-unit dependencies.
|
61
89
|
* Replace all instances of File.exists? with File.exist? because the former
|
62
90
|
is deprecated in Ruby 2.1 and later.
|
63
91
|
|
64
|
-
|
92
|
+
## 1.2.2 - 6-Apr-2012
|
65
93
|
* Yet another sparse file test fix for OSX, which does not support
|
66
94
|
sparse file generation on HFS+.
|
67
95
|
* Fixed a bug in the File.whereis method on Windows when dealing with
|
@@ -69,15 +97,15 @@
|
|
69
97
|
* Some Config vs RbConfig fixes to silence 1.9.3 warnings.
|
70
98
|
* Refactored and cleaned up some tests.
|
71
99
|
|
72
|
-
|
100
|
+
## 1.2.1 - 20-May-2011
|
73
101
|
* Added an (empty) .gemtest file so that it can be used with test.rubygems.org.
|
74
102
|
* Fixed a sparse file test.
|
75
103
|
|
76
|
-
|
104
|
+
## 1.2.0 - 8-Jan-2011
|
77
105
|
* Added the File.sparse? method for Unix platforms. This method already
|
78
106
|
exists on Windows courtesy of the win32-file library.
|
79
107
|
|
80
|
-
|
108
|
+
## 1.1.9 - 25-Mar-2010
|
81
109
|
* Refactored File.which and File.whereis and added additional tests for each.
|
82
110
|
* Removed the block form of File.whereis.
|
83
111
|
* Reorganized the Rakefile a bit and put the test tasks under the 'test'
|
@@ -85,7 +113,7 @@
|
|
85
113
|
* Updated the test-unit development dependency.
|
86
114
|
* Updates the README.
|
87
115
|
|
88
|
-
|
116
|
+
## 1.1.8 - 6-Oct-2009
|
89
117
|
* Fixed some bad variable names that crept into the File.nl_convert method.
|
90
118
|
* Added the File.null_device alias for File.null.
|
91
119
|
* Added cygwin and mingw to Windows detection code.
|
@@ -97,7 +125,7 @@
|
|
97
125
|
* Documentation updates.
|
98
126
|
* Added the :gem rake task.
|
99
127
|
|
100
|
-
|
128
|
+
## 1.1.7 - 28-Jul-2009
|
101
129
|
* Now compatible with Ruby 1.9.x.
|
102
130
|
* Replaced RUBY_PLATFORM with rbconfig check for the sake of other
|
103
131
|
implementations, such as JRuby.
|
@@ -105,35 +133,35 @@
|
|
105
133
|
* Added Test::Unit 2.x as a development dependency.
|
106
134
|
* Renamed the test files.
|
107
135
|
|
108
|
-
|
136
|
+
## 1.1.6 - 31-Aug-2007
|
109
137
|
* Fixed the File.touch method so that it doesn't whack existing files. Thanks
|
110
138
|
go to Thomas Preymesser for the spot.
|
111
139
|
* Added corresponding tests to the tc_touch.rb file.
|
112
140
|
|
113
|
-
|
141
|
+
## 1.1.5 - 19-Jul-2007
|
114
142
|
* Added the File.image? method. Inspired by ruby-talk: 260487.
|
115
143
|
|
116
|
-
|
144
|
+
## 1.1.4 - 21-May-2007
|
117
145
|
* Removed the install.rb file. Installation is now handled exclusively by the
|
118
146
|
rake install task.
|
119
147
|
* Updated the MANIFEST file, and made it rdoc friendly.
|
120
148
|
* Manual installation corrections in the README file.
|
121
149
|
|
122
|
-
|
150
|
+
## 1.1.3 - 29-Apr-2007
|
123
151
|
* I changed the way that the constants IS_WINDOWS and WIN32EXTS are defined.
|
124
152
|
* The IS_WINDOWS and WIN32EXTS are no long documented publically. They were
|
125
153
|
never meant for public use.
|
126
154
|
* The tc_constants.rb file was modified to only run certain tests on Windows.
|
127
155
|
|
128
|
-
|
156
|
+
## 1.1.2 - 28-Apr-2007
|
129
157
|
* Fixed a require line that could cause problems on MS Windows.
|
130
158
|
* Added a Rakefile which includes tasks for installation and testing.
|
131
159
|
* Some cleanup and improvement in the various test files.
|
132
160
|
|
133
|
-
|
161
|
+
## 1.1.1 - 24-Aug-2006
|
134
162
|
* Added the File.binary? method, based on code from Ryan Davis.
|
135
163
|
|
136
|
-
|
164
|
+
## 1.1.0 - 23-Aug-2006
|
137
165
|
* Added the File.null method which returns the bit bucket on your platform.
|
138
166
|
* The suffixes on MS Windows are now based on the PATHEXT environment variable,
|
139
167
|
and defaults to '.com', '.bat' and '.exe' only if it's not defined.
|
@@ -142,7 +170,7 @@
|
|
142
170
|
* Modified the platform checking and path separator handling.
|
143
171
|
* Added and tweaked some tests.
|
144
172
|
|
145
|
-
|
173
|
+
## 1.0.0 - 2-Jun-2005
|
146
174
|
* Modified the File.middle method to accept an optional block.
|
147
175
|
* File.whereis is now limited to unique values so that redundant PATH entries
|
148
176
|
do not cause redundant entries in the returned array (or block).
|
@@ -156,12 +184,12 @@
|
|
156
184
|
* Removed the INSTALL file. See the README instead.
|
157
185
|
* Moved project to RubyForge.
|
158
186
|
|
159
|
-
|
187
|
+
## 0.1.3 - 5-Dec-2003
|
160
188
|
* Modified File#which and File#whereis for Win32 to handle extensions better,
|
161
189
|
i.e. you can send "ruby" or "ruby.exe" and get back the same result.
|
162
190
|
* Minor test changes to tc_which.rb and tc_whereis.rb.
|
163
191
|
|
164
|
-
|
192
|
+
## 0.1.2 - 14-May-2003
|
165
193
|
* Modified nl_convert() to allow the destination filename to be the same as the
|
166
194
|
source file. In that case, a tempfile is used and copied back over the
|
167
195
|
original file.
|
@@ -171,7 +199,7 @@
|
|
171
199
|
* Test suite additions/fixes.
|
172
200
|
* Updates to MANIFEST.
|
173
201
|
|
174
|
-
|
202
|
+
## 0.1.1 - 21-Mar-2003
|
175
203
|
* Modified File.tail to return data in the same order that 'tail' does.
|
176
204
|
* Modified File.which to return nil if the program is not found.
|
177
205
|
* Modified File.whereis now uses '\' instead of '/' on MS Windows.
|
@@ -180,5 +208,5 @@
|
|
180
208
|
* Thanks go to Shanko for both the spot and patch for tail, which, whereis
|
181
209
|
and middle.
|
182
210
|
|
183
|
-
|
211
|
+
## 0.1.0 - 18-Mar-2003
|
184
212
|
* Initial release
|
data/Gemfile
CHANGED
data/MANIFEST.md
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
* CHANGES.md
|
2
|
+
* README.md
|
3
|
+
* MANIFEST.md
|
4
|
+
* Gemfile
|
5
|
+
* Rakefile
|
6
|
+
* ptools.gemspec
|
7
|
+
* certs/djberg96_pub.pem
|
8
|
+
* lib/ptools.rb
|
9
|
+
* spec/binary_spec.rb
|
10
|
+
* spec/constants_spec.rb
|
11
|
+
* spec/head_spec.rb
|
12
|
+
* spec/image_spec.rb
|
13
|
+
* spec/nlconvert_spec.rb
|
14
|
+
* spec/sparse_spec.rb
|
15
|
+
* spec/tail_spec.rb
|
16
|
+
* spec/touch_spec.rb
|
17
|
+
* spec/wc_spec.rb
|
18
|
+
* spec/whereis_spec.rb
|
19
|
+
* spec/which_spec.rb
|
20
|
+
* spec/img/test.gif
|
21
|
+
* spec/img/test.ico
|
22
|
+
* spec/img/test.jpg
|
23
|
+
* spec/img/test.png
|
24
|
+
* spec/txt/empty.txt
|
25
|
+
* spec/txt/english.txt
|
26
|
+
* spec/txt/english.utf16
|
27
|
+
* spec/txt/korean.txt
|
data/{README → README.md}
RENAMED
@@ -1,32 +1,34 @@
|
|
1
|
-
|
1
|
+
## Description
|
2
2
|
The ptools (power tools) library is an additional set of commands for the
|
3
3
|
File class based on Unix command line tools.
|
4
4
|
|
5
|
-
|
5
|
+
## Prerequisites
|
6
6
|
On MS Windows you will need the win32-file gem.
|
7
7
|
|
8
|
-
|
9
|
-
|
8
|
+
## Installation
|
9
|
+
`gem install ptools`
|
10
10
|
|
11
|
-
|
12
|
-
|
11
|
+
## Synopsis
|
12
|
+
```ruby
|
13
|
+
require "ptools"
|
13
14
|
|
14
|
-
|
15
|
-
|
15
|
+
File.which("ruby") # '/usr/local/bin/ruby'
|
16
|
+
File.whereis("ruby") # ['/usr/local/bin/ruby','/opt/bin/ruby']
|
16
17
|
|
17
|
-
|
18
|
-
|
19
|
-
|
18
|
+
File.head("myfile") # Returns first 10 lines 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'
|
20
21
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
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
|
25
26
|
|
26
|
-
|
27
|
-
|
27
|
+
# Creates a copy of 'myfile' called 'newfile', in DOS format
|
28
|
+
File.nl_convert("myfile", "newfile", "dos")
|
29
|
+
```
|
28
30
|
|
29
|
-
|
31
|
+
## Known Bugs
|
30
32
|
The File.which and File.whereis methods may fail when using JRuby on Windows.
|
31
33
|
See https://github.com/jruby/jruby/issues/2291 for details.
|
32
34
|
|
@@ -34,7 +36,7 @@
|
|
34
36
|
|
35
37
|
http://www.github.com/djberg96/ptools
|
36
38
|
|
37
|
-
|
39
|
+
## Acknowledgements
|
38
40
|
The File.which method was originally adopted from the FileWhich code posted
|
39
41
|
by Michael Granger on the now defunct rubygarden.org website. That code was
|
40
42
|
later replaced by a version based on the ruby-which library.
|
@@ -47,20 +49,22 @@
|
|
47
49
|
|
48
50
|
Thanks go to Matt Hoyle for help with the File.tail method.
|
49
51
|
|
50
|
-
|
52
|
+
And thanks to any and all contributors!
|
53
|
+
|
54
|
+
## Future Plans
|
51
55
|
Add whatever other tools people think might be useful.
|
52
56
|
|
53
|
-
|
54
|
-
Artistic
|
57
|
+
## License
|
58
|
+
Artistic-2.0
|
55
59
|
|
56
|
-
|
57
|
-
(C) 2003-
|
60
|
+
## Copyright
|
61
|
+
(C) 2003-2020 Daniel J. Berger
|
58
62
|
All Rights Reserved.
|
59
63
|
|
60
|
-
|
64
|
+
## Warranty
|
61
65
|
This package is provided "as is" and without any express or
|
62
66
|
implied warranties, including, without limitation, the implied
|
63
67
|
warranties of merchantability and fitness for a particular purpose.
|
64
68
|
|
65
|
-
|
69
|
+
## Author
|
66
70
|
Daniel J. Berger
|
data/Rakefile
CHANGED
@@ -2,9 +2,10 @@ require 'rake'
|
|
2
2
|
require 'rake/clean'
|
3
3
|
require 'rake/testtask'
|
4
4
|
require 'rbconfig'
|
5
|
+
require 'rspec/core/rake_task'
|
5
6
|
include RbConfig
|
6
7
|
|
7
|
-
CLEAN.include("**/*.gem", "**/*.rbc", "**/*coverage*")
|
8
|
+
CLEAN.include("**/*.gem", "**/*.rbc", "**/*coverage*", "**/*.lock")
|
8
9
|
|
9
10
|
desc 'Install the ptools package (non-gem)'
|
10
11
|
task :install do
|
@@ -19,7 +20,7 @@ namespace 'gem' do
|
|
19
20
|
require 'rubygems/package'
|
20
21
|
spec = eval(IO.read('ptools.gemspec'))
|
21
22
|
spec.signing_key = File.join(Dir.home, '.ssh', 'gem-private_key.pem')
|
22
|
-
Gem::Package.build(spec
|
23
|
+
Gem::Package.build(spec)
|
23
24
|
end
|
24
25
|
|
25
26
|
desc 'Install the ptools gem'
|
@@ -33,103 +34,54 @@ namespace 'gem' do
|
|
33
34
|
end
|
34
35
|
end
|
35
36
|
|
36
|
-
|
37
|
-
|
38
|
-
|
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"
|
37
|
+
namespace 'spec' do
|
38
|
+
RSpec::Core::RakeTask.new(:binary) do |t|
|
39
|
+
t.pattern = 'spec/binary_spec.rb'
|
48
40
|
end
|
49
41
|
|
50
|
-
|
51
|
-
t.
|
52
|
-
t.verbose = true
|
53
|
-
t.warning = true
|
54
|
-
t.test_files = FileList['test/test_binary.rb']
|
42
|
+
RSpec::Core::RakeTask.new(:constants) do |t|
|
43
|
+
t.pattern = 'spec/constants_spec.rb'
|
55
44
|
end
|
56
45
|
|
57
|
-
|
58
|
-
t.
|
59
|
-
t.verbose = true
|
60
|
-
t.warning = true
|
61
|
-
t.test_files = FileList['test/test_constants.rb']
|
46
|
+
RSpec::Core::RakeTask.new(:head) do |t|
|
47
|
+
t.pattern = 'spec/head_spec.rb'
|
62
48
|
end
|
63
49
|
|
64
|
-
|
65
|
-
t.
|
66
|
-
t.verbose = true
|
67
|
-
t.warning = true
|
68
|
-
t.test_files = FileList['test/test_head.rb']
|
50
|
+
RSpec::Core::RakeTask.new(:image) do |t|
|
51
|
+
t.pattern = 'spec/image_spec.rb'
|
69
52
|
end
|
70
53
|
|
71
|
-
|
72
|
-
t.
|
73
|
-
t.verbose = true
|
74
|
-
t.warning = true
|
75
|
-
t.test_files = FileList['test/test_image.rb']
|
54
|
+
RSpec::Core::RakeTask.new(:nlconvert) do |t|
|
55
|
+
t.pattern = 'spec/nlconvert_spec.rb'
|
76
56
|
end
|
77
57
|
|
78
|
-
|
79
|
-
t.
|
80
|
-
t.verbose = true
|
81
|
-
t.warning = true
|
82
|
-
t.test_files = FileList['test/test_nlconvert.rb']
|
58
|
+
RSpec::Core::RakeTask.new(:sparse) do |t|
|
59
|
+
t.pattern = 'spec/sparse_spec.rb'
|
83
60
|
end
|
84
61
|
|
85
|
-
|
86
|
-
t.
|
87
|
-
t.verbose = true
|
88
|
-
t.warning = true
|
89
|
-
t.test_files = FileList['test/test_null.rb']
|
62
|
+
RSpec::Core::RakeTask.new(:tail) do |t|
|
63
|
+
t.pattern = 'spec/tail_spec.rb'
|
90
64
|
end
|
91
65
|
|
92
|
-
|
93
|
-
t.
|
94
|
-
t.verbose = true
|
95
|
-
t.warning = true
|
96
|
-
t.test_files = FileList['test/test_is_sparse.rb']
|
66
|
+
RSpec::Core::RakeTask.new(:touch) do |t|
|
67
|
+
t.pattern = 'spec/touch_spec.rb'
|
97
68
|
end
|
98
69
|
|
99
|
-
|
100
|
-
t.
|
101
|
-
t.verbose = true
|
102
|
-
t.warning = true
|
103
|
-
t.test_files = FileList['test/test_tail.rb']
|
70
|
+
RSpec::Core::RakeTask.new(:wc) do |t|
|
71
|
+
t.pattern = 'spec/wc_spec.rb'
|
104
72
|
end
|
105
|
-
|
106
|
-
|
107
|
-
t.
|
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']
|
73
|
+
|
74
|
+
RSpec::Core::RakeTask.new(:whereis) do |t|
|
75
|
+
t.pattern = 'spec/whereis_spec.rb'
|
118
76
|
end
|
119
77
|
|
120
|
-
|
121
|
-
t.
|
122
|
-
t.verbose = true
|
123
|
-
t.warning = true
|
124
|
-
t.test_files = FileList['test/test_whereis.rb']
|
78
|
+
RSpec::Core::RakeTask.new(:which) do |t|
|
79
|
+
t.pattern = 'spec/which_spec.rb'
|
125
80
|
end
|
126
81
|
|
127
|
-
|
128
|
-
t.
|
129
|
-
t.verbose = true
|
130
|
-
t.warning = true
|
131
|
-
t.test_files = FileList['test/test_which.rb']
|
82
|
+
RSpec::Core::RakeTask.new(:all) do |t|
|
83
|
+
t.pattern = 'spec/*_spec.rb'
|
132
84
|
end
|
133
85
|
end
|
134
86
|
|
135
|
-
task :default => :
|
87
|
+
task :default => 'spec:all'
|