ptools 1.2.6-universal-mingw32 → 1.2.7-universal-mingw32

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 8373c1a60771a64c0223717242859cf9f3e2c053
4
- data.tar.gz: 77b98e2e54785592c8d1d4887a2c23964b8d69f6
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ NDMxZTBhOTQ5MTAzMDU5ODRmMTQ0MjRjZGQyM2Y4NjEyMGYyMmJhYQ==
5
+ data.tar.gz: !binary |-
6
+ NGI1MmIyZWE2NGY4YTc2ZTA3ZjAzODJiMzcxMjM2OWFmY2QwMTZlOQ==
5
7
  SHA512:
6
- metadata.gz: a19b9892f623478c012bf40366f5b434f2298978d8ca91ba79baa53f966bf11a608941b17781c9cddef6b88cdd48a34959bd5a6976e21ddbf73d605fa050015f
7
- data.tar.gz: bc405a72c8e5f7fb489ebaf4c06f9bbf124cd6b0997f7ef26cf5b7312f77146a6a85d4dcaac757ab166e25b299b80189f81a7f96f732bb13b2c81760858c6550
8
+ metadata.gz: !binary |-
9
+ N2VjZmYxZGUwOTI2OGI1MjY3ZDY3NzJlMDRmMDViZGZmM2FiOGI3MmNlNDk1
10
+ ODAyMjFkOTliM2U4MGQ2MzIxNGU0MTBiM2Q1OWRkNzdkOTQ3NzcyNDc3OWNj
11
+ OTFhMzQxMDM0NDliYjBjZjkwY2E2OTYxZWE3ZTlkMzdjYjE2ZDE=
12
+ data.tar.gz: !binary |-
13
+ ZmFjYWM0Y2EyZDhkZjUxYTI5ZTE2N2Q3NjFkYmFjNWRkMWJmYTc4YWRiOTg4
14
+ YzAwYjM1YTkzZjQyNGZhZWUzODdjNTg3OGJmZDM0ZWQwZDIzM2EwM2NjZTU1
15
+ OWI3ZGJjNTMzZmI5ZjQ5YzAwMWUzNjNlOGU4M2NkM2IyMTVhYmE=
data/CHANGES CHANGED
@@ -1,146 +1,154 @@
1
- == 1.2.6 - 14-Jul-2014
2
- * Updated the png? and jpg? methods so they explicitly specify the
3
- offset argument so that it works with 1.9.2 and earlier. Thanks go to
4
- Anurag Priyam for the spot.
5
-
6
- == 1.2.5 - 11-Jul-2014
7
- * Added a Gemfile, mostly for Travis CI.
8
- * Added rake as a development dependency.
9
- * Revert back to hash syntax supported by 1.8.x.
10
- * Removed rubyforge_project from gemspec.
11
- * Updated the tests for File.sparse? so that it doesn't rely on
12
- an external file.
13
-
14
- == 1.2.4 - 25-Feb-2014
15
- * The File.binary method now always returns false for images. It is meant to
16
- detect executables, shared objects, etc. Use File.image? to detect images.
17
- * Encoding fixes for the File.image? method.
18
-
19
- == 1.2.3 - 19-Feb-2014
20
- * Fixed a bug where File.binary? would return true for unicode text. Thanks go
21
- to Ben Hollis for the spot.
22
- * Updated the win32-file and test-unit dependencies.
23
- * Replace all instances of File.exists? with File.exist? because the former
24
- is deprecated in Ruby 2.1 and later.
25
-
26
- == 1.2.2 - 6-Apr-2012
27
- * Yet another sparse file test fix for OSX, which does not support
28
- sparse file generation on HFS+.
29
- * Fixed a bug in the File.whereis method on Windows when dealing with
30
- absolute paths.
31
- * Some Config vs RbConfig fixes to silence 1.9.3 warnings.
32
- * Refactored and cleaned up some tests.
33
-
34
- == 1.2.1 - 20-May-2011
35
- * Added an (empty) .gemtest file so that it can be used with test.rubygems.org.
36
- * Fixed a sparse file test.
37
-
38
- == 1.2.0 - 8-Jan-2011
39
- * Added the File.sparse? method for Unix platforms. This method already
40
- exists on Windows courtesy of the win32-file library.
41
-
42
- == 1.1.9 - 25-Mar-2010
43
- * Refactored File.which and File.whereis and added additional tests for each.
44
- * Removed the block form of File.whereis.
45
- * Reorganized the Rakefile a bit and put the test tasks under the 'test'
46
- namespace, and the gem tasks under the 'gem' namespace.
47
- * Updated the test-unit development dependency.
48
- * Updates the README.
49
-
50
- == 1.1.8 - 6-Oct-2009
51
- * Fixed some bad variable names that crept into the File.nl_convert method.
52
- * Added the File.null_device alias for File.null.
53
- * Added cygwin and mingw to Windows detection code.
54
- * One of the nlconvert tests is now skipped on Windows.
55
- * Two text files that were previously bundled as part of this library for
56
- testing purposes have been removed. Those are now dynamically generated
57
- within the tests themselves.
58
- * Gemspec updates.
59
- * Documentation updates.
60
- * Added the :gem rake task.
61
-
62
- == 1.1.7 - 28-Jul-2009
63
- * Now compatible with Ruby 1.9.x.
64
- * Replaced RUBY_PLATFORM with rbconfig check for the sake of other
65
- implementations, such as JRuby.
66
- * Updated the tests to be more friendly to JRuby.
67
- * Added Test::Unit 2.x as a development dependency.
68
- * Renamed the test files.
69
-
70
- == 1.1.6 - 31-Aug-2007
71
- * Fixed the File.touch method so that it doesn't whack existing files. Thanks
72
- go to Thomas Preymesser for the spot.
73
- * Added corresponding tests to the tc_touch.rb file.
74
-
75
- == 1.1.5 - 19-Jul-2007
76
- * Added the File.image? method. Inspired by ruby-talk: 260487.
77
-
78
- == 1.1.4 - 21-May-2007
79
- * Removed the install.rb file. Installation is now handled exclusively by the
80
- rake install task.
81
- * Updated the MANIFEST file, and made it rdoc friendly.
82
- * Manual installation corrections in the README file.
83
-
84
- == 1.1.3 - 29-Apr-2007
85
- * I changed the way that the constants IS_WINDOWS and WIN32EXTS are defined.
86
- * The IS_WINDOWS and WIN32EXTS are no long documented publically. They were
87
- never meant for public use.
88
- * The tc_constants.rb file was modified to only run certain tests on Windows.
89
-
90
- == 1.1.2 - 28-Apr-2007
91
- * Fixed a require line that could cause problems on MS Windows.
92
- * Added a Rakefile which includes tasks for installation and testing.
93
- * Some cleanup and improvement in the various test files.
94
-
95
- == 1.1.1 - 24-Aug-2006
96
- * Added the File.binary? method, based on code from Ryan Davis.
97
-
98
- == 1.1.0 - 23-Aug-2006
99
- * Added the File.null method which returns the bit bucket on your platform.
100
- * The suffixes on MS Windows are now based on the PATHEXT environment variable,
101
- and defaults to '.com', '.bat' and '.exe' only if it's not defined.
102
- * The File.which and File.whereis methods were tweaked a bit for Windows so
103
- that they ignore the case of suffixes.
104
- * Modified the platform checking and path separator handling.
105
- * Added and tweaked some tests.
106
-
107
- == 1.0.0 - 2-Jun-2005
108
- * Modified the File.middle method to accept an optional block.
109
- * File.whereis is now limited to unique values so that redundant PATH entries
110
- do not cause redundant entries in the returned array (or block).
111
- * File.nl_convert and File.touch now return self.
112
- * File.nl_convert now raises ArgumentError (instead of StandardError) if
113
- an unknown platform is provided.
114
- * File.wc now raises ArgumentError (instead of RuntimeError) if a bad option
115
- is provided.
116
- * Made documentation rdoc friendly.
117
- * Test suite updates, corrections and additions.
118
- * Removed the INSTALL file. See the README instead.
119
- * Moved project to RubyForge.
120
-
121
- == 0.1.3 - 5-Dec-2003
122
- * Modified File#which and File#whereis for Win32 to handle extensions better,
123
- i.e. you can send "ruby" or "ruby.exe" and get back the same result.
124
- * Minor test changes to tc_which.rb and tc_whereis.rb.
125
-
126
- == 0.1.2 - 14-May-2003
127
- * Modified nl_convert() to allow the destination filename to be the same as the
128
- source file. In that case, a tempfile is used and copied back over the
129
- original file.
130
- * The target file name for nl_convert() now defaults to the source file name and
131
- the default format is now "dos".
132
- * Added a tc_constants.rb test suite.
133
- * Test suite additions/fixes.
134
- * Updates to MANIFEST.
135
-
136
- == 0.1.1 - 21-Mar-2003
137
- * Modified File.tail to return data in the same order that 'tail' does.
138
- * Modified File.which to return nil if the program is not found.
139
- * Modified File.whereis now uses '\' instead of '/' on MS Windows.
140
- * Added File.middle class method.
141
- * Test suite modification & additions.
142
- * Thanks go to Shanko for both the spot and patch for tail, which, whereis
143
- and middle.
144
-
145
- == 0.1.0 - 18-Mar-2003
146
- * Initial release
1
+ == 1.2.7 - 6-Dec-2014
2
+ * File.which now expands ~ for paths. Thanks go to dg-vrnetze for the patch.
3
+ * Use /dev/null for cygwin instead of NUL.
4
+ * Use mv instead of cp in the nl_convert method.
5
+ * Solaris now handled explicitly in nl_convert, and OSX now considered Unix.
6
+ * Modified the binary? method to check 4096 bytes at most.
7
+ * Thanks to Matt Hoyle for many of the changes implemented in this release.
8
+
9
+ == 1.2.6 - 14-Jul-2014
10
+ * Updated the png? and jpg? methods so they explicitly specify the
11
+ offset argument so that it works with 1.9.2 and earlier. Thanks go to
12
+ Anurag Priyam for the spot.
13
+
14
+ == 1.2.5 - 11-Jul-2014
15
+ * Added a Gemfile, mostly for Travis CI.
16
+ * Added rake as a development dependency.
17
+ * Revert back to hash syntax supported by 1.8.x.
18
+ * Removed rubyforge_project from gemspec.
19
+ * Updated the tests for File.sparse? so that it doesn't rely on
20
+ an external file.
21
+
22
+ == 1.2.4 - 25-Feb-2014
23
+ * The File.binary method now always returns false for images. It is meant to
24
+ detect executables, shared objects, etc. Use File.image? to detect images.
25
+ * Encoding fixes for the File.image? method.
26
+
27
+ == 1.2.3 - 19-Feb-2014
28
+ * Fixed a bug where File.binary? would return true for unicode text. Thanks go
29
+ to Ben Hollis for the spot.
30
+ * Updated the win32-file and test-unit dependencies.
31
+ * Replace all instances of File.exists? with File.exist? because the former
32
+ is deprecated in Ruby 2.1 and later.
33
+
34
+ == 1.2.2 - 6-Apr-2012
35
+ * Yet another sparse file test fix for OSX, which does not support
36
+ sparse file generation on HFS+.
37
+ * Fixed a bug in the File.whereis method on Windows when dealing with
38
+ absolute paths.
39
+ * Some Config vs RbConfig fixes to silence 1.9.3 warnings.
40
+ * Refactored and cleaned up some tests.
41
+
42
+ == 1.2.1 - 20-May-2011
43
+ * Added an (empty) .gemtest file so that it can be used with test.rubygems.org.
44
+ * Fixed a sparse file test.
45
+
46
+ == 1.2.0 - 8-Jan-2011
47
+ * Added the File.sparse? method for Unix platforms. This method already
48
+ exists on Windows courtesy of the win32-file library.
49
+
50
+ == 1.1.9 - 25-Mar-2010
51
+ * Refactored File.which and File.whereis and added additional tests for each.
52
+ * Removed the block form of File.whereis.
53
+ * Reorganized the Rakefile a bit and put the test tasks under the 'test'
54
+ namespace, and the gem tasks under the 'gem' namespace.
55
+ * Updated the test-unit development dependency.
56
+ * Updates the README.
57
+
58
+ == 1.1.8 - 6-Oct-2009
59
+ * Fixed some bad variable names that crept into the File.nl_convert method.
60
+ * Added the File.null_device alias for File.null.
61
+ * Added cygwin and mingw to Windows detection code.
62
+ * One of the nlconvert tests is now skipped on Windows.
63
+ * Two text files that were previously bundled as part of this library for
64
+ testing purposes have been removed. Those are now dynamically generated
65
+ within the tests themselves.
66
+ * Gemspec updates.
67
+ * Documentation updates.
68
+ * Added the :gem rake task.
69
+
70
+ == 1.1.7 - 28-Jul-2009
71
+ * Now compatible with Ruby 1.9.x.
72
+ * Replaced RUBY_PLATFORM with rbconfig check for the sake of other
73
+ implementations, such as JRuby.
74
+ * Updated the tests to be more friendly to JRuby.
75
+ * Added Test::Unit 2.x as a development dependency.
76
+ * Renamed the test files.
77
+
78
+ == 1.1.6 - 31-Aug-2007
79
+ * Fixed the File.touch method so that it doesn't whack existing files. Thanks
80
+ go to Thomas Preymesser for the spot.
81
+ * Added corresponding tests to the tc_touch.rb file.
82
+
83
+ == 1.1.5 - 19-Jul-2007
84
+ * Added the File.image? method. Inspired by ruby-talk: 260487.
85
+
86
+ == 1.1.4 - 21-May-2007
87
+ * Removed the install.rb file. Installation is now handled exclusively by the
88
+ rake install task.
89
+ * Updated the MANIFEST file, and made it rdoc friendly.
90
+ * Manual installation corrections in the README file.
91
+
92
+ == 1.1.3 - 29-Apr-2007
93
+ * I changed the way that the constants IS_WINDOWS and WIN32EXTS are defined.
94
+ * The IS_WINDOWS and WIN32EXTS are no long documented publically. They were
95
+ never meant for public use.
96
+ * The tc_constants.rb file was modified to only run certain tests on Windows.
97
+
98
+ == 1.1.2 - 28-Apr-2007
99
+ * Fixed a require line that could cause problems on MS Windows.
100
+ * Added a Rakefile which includes tasks for installation and testing.
101
+ * Some cleanup and improvement in the various test files.
102
+
103
+ == 1.1.1 - 24-Aug-2006
104
+ * Added the File.binary? method, based on code from Ryan Davis.
105
+
106
+ == 1.1.0 - 23-Aug-2006
107
+ * Added the File.null method which returns the bit bucket on your platform.
108
+ * The suffixes on MS Windows are now based on the PATHEXT environment variable,
109
+ and defaults to '.com', '.bat' and '.exe' only if it's not defined.
110
+ * The File.which and File.whereis methods were tweaked a bit for Windows so
111
+ that they ignore the case of suffixes.
112
+ * Modified the platform checking and path separator handling.
113
+ * Added and tweaked some tests.
114
+
115
+ == 1.0.0 - 2-Jun-2005
116
+ * Modified the File.middle method to accept an optional block.
117
+ * File.whereis is now limited to unique values so that redundant PATH entries
118
+ do not cause redundant entries in the returned array (or block).
119
+ * File.nl_convert and File.touch now return self.
120
+ * File.nl_convert now raises ArgumentError (instead of StandardError) if
121
+ an unknown platform is provided.
122
+ * File.wc now raises ArgumentError (instead of RuntimeError) if a bad option
123
+ is provided.
124
+ * Made documentation rdoc friendly.
125
+ * Test suite updates, corrections and additions.
126
+ * Removed the INSTALL file. See the README instead.
127
+ * Moved project to RubyForge.
128
+
129
+ == 0.1.3 - 5-Dec-2003
130
+ * Modified File#which and File#whereis for Win32 to handle extensions better,
131
+ i.e. you can send "ruby" or "ruby.exe" and get back the same result.
132
+ * Minor test changes to tc_which.rb and tc_whereis.rb.
133
+
134
+ == 0.1.2 - 14-May-2003
135
+ * Modified nl_convert() to allow the destination filename to be the same as the
136
+ source file. In that case, a tempfile is used and copied back over the
137
+ original file.
138
+ * The target file name for nl_convert() now defaults to the source file name and
139
+ the default format is now "dos".
140
+ * Added a tc_constants.rb test suite.
141
+ * Test suite additions/fixes.
142
+ * Updates to MANIFEST.
143
+
144
+ == 0.1.1 - 21-Mar-2003
145
+ * Modified File.tail to return data in the same order that 'tail' does.
146
+ * Modified File.which to return nil if the program is not found.
147
+ * Modified File.whereis now uses '\' instead of '/' on MS Windows.
148
+ * Added File.middle class method.
149
+ * Test suite modification & additions.
150
+ * Thanks go to Shanko for both the spot and patch for tail, which, whereis
151
+ and middle.
152
+
153
+ == 0.1.0 - 18-Mar-2003
154
+ * Initial release
data/Gemfile CHANGED
@@ -1,12 +1,12 @@
1
- source 'https://rubygems.org'
2
-
3
- gem 'structured_warnings'
4
-
5
- group :production do
6
- gem 'win32-file' if File::ALT_SEPARATOR
7
- end
8
-
9
- group :test do
10
- gem 'rake'
11
- gem 'test-unit'
12
- end
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'structured_warnings'
4
+
5
+ group :production do
6
+ gem 'win32-file' if File::ALT_SEPARATOR
7
+ end
8
+
9
+ group :test do
10
+ gem 'rake'
11
+ gem 'test-unit'
12
+ end
data/MANIFEST CHANGED
@@ -15,3 +15,6 @@
15
15
  * test/test_wc.rb
16
16
  * test/test_which.rb
17
17
  * test/test_whereis.rb
18
+ * test/img/test.gif
19
+ * test/img/test.jpg
20
+ * test/img/test.png
data/README CHANGED
@@ -1,64 +1,64 @@
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 project page.
32
-
33
- http://www.github.com/djberg96/ptools
34
-
35
- == Acknowledgements
36
- The File.which method was originally adopted from the FileWhich code posted
37
- by Michael Granger on the now defunct rubygarden.org website. That code was
38
- later replaced by a version based on the ruby-which library.
39
-
40
- The File.nl_convert method is based on the nlcvt program found at
41
- http://www.perl.com/language/ppt/src/nlcvt/nlcvt, written by Tom Christiansen.
42
-
43
- The middle() method was provided by Shashank Date.
44
-
45
- The binary?() method was based almost entirely on a blog post by Ryan
46
- Davis (who, in turn, based his code on Perl's -B switch).
47
-
48
- == Future Plans
49
- Add whatever other tools people think might be useful.
50
-
51
- == License
52
- Artistic 2.0
53
-
54
- == Copyright
55
- (C) 2003-2014 Daniel J. Berger
56
- All Rights Reserved.
57
-
58
- == Warranty
59
- This package is provided "as is" and without any express or
60
- implied warranties, including, without limitation, the implied
61
- warranties of merchantability and fitness for a particular purpose.
62
-
63
- == Author
64
- 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 project page.
32
+
33
+ http://www.github.com/djberg96/ptools
34
+
35
+ == Acknowledgements
36
+ The File.which method was originally adopted from the FileWhich code posted
37
+ by Michael Granger on the now defunct rubygarden.org website. That code was
38
+ later replaced by a version based on the ruby-which library.
39
+
40
+ The File.nl_convert method is based on the nlcvt program found at
41
+ http://www.perl.com/language/ppt/src/nlcvt/nlcvt, written by Tom Christiansen.
42
+
43
+ The middle() method was provided by Shashank Date.
44
+
45
+ The binary?() method was based almost entirely on a blog post by Ryan
46
+ Davis (who, in turn, based his code on Perl's -B switch).
47
+
48
+ == Future Plans
49
+ Add whatever other tools people think might be useful.
50
+
51
+ == License
52
+ Artistic 2.0
53
+
54
+ == Copyright
55
+ (C) 2003-2014 Daniel J. Berger
56
+ All Rights Reserved.
57
+
58
+ == Warranty
59
+ This package is provided "as is" and without any express or
60
+ implied warranties, including, without limitation, the implied
61
+ warranties of merchantability and fitness for a particular purpose.
62
+
63
+ == Author
64
+ Daniel J. Berger