ptools 1.3.2-universal-mingw32 → 1.4.0-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 +200 -168
- data/Gemfile +12 -12
- data/MANIFEST +27 -19
- data/README +68 -66
- data/Rakefile +87 -139
- data/certs/djberg96_pub.pem +26 -0
- data/lib/ptools.rb +476 -482
- data/ptools.gemspec +30 -30
- data/spec/binary_spec.rb +59 -0
- data/spec/constants_spec.rb +33 -0
- data/spec/head_spec.rb +41 -0
- data/spec/image_spec.rb +51 -0
- data/{test → spec}/img/test.gif +0 -0
- data/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/{.gemtest → spec/txt/empty.txt} +0 -0
- data/{test → spec}/txt/english.txt +1 -1
- data/spec/txt/english.utf16 +0 -0
- data/{test → spec}/txt/korean.txt +1 -1
- data/spec/wc_spec.rb +65 -0
- data/spec/whereis_spec.rb +87 -0
- data/spec/which_spec.rb +112 -0
- metadata +60 -44
- metadata.gz.sig +0 -0
- data/test/test_binary.rb +0 -65
- data/test/test_constants.rb +0 -38
- data/test/test_head.rb +0 -48
- data/test/test_image.rb +0 -57
- 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: 2511ed84e4a1ce0ebc834b5827455ec5d635c371a322d796605ded4415986dc0
|
4
|
+
data.tar.gz: 4a1cd91f42be4f4c8f8800aa47c15d0b60eb47b60f86a861edecec6f428d1f34
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 307c82262a8d4319b8dfb4b8fe40ffc3d19d922ff49b119d3b59b2e511c19be4c0e8e38ff23809e12462be64ad6f74c611f94d6c675251ebb5458bc3acd01b1a
|
7
|
+
data.tar.gz: f9cfc533c43421df79e433b8076784ce94dc90d1b0211da54dbb8817e699cfc362a6d065ab106938b9a6ce39d57f38610f30803c541621eadc501cb2d1613fb5
|
checksums.yaml.gz.sig
ADDED
Binary file
|
data.tar.gz.sig
ADDED
Binary file
|
data/CHANGES
CHANGED
@@ -1,168 +1,200 @@
|
|
1
|
-
== 1.
|
2
|
-
*
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
*
|
17
|
-
|
18
|
-
|
19
|
-
*
|
20
|
-
*
|
21
|
-
*
|
22
|
-
|
23
|
-
== 1.
|
24
|
-
*
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
*
|
32
|
-
*
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
*
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
*
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
*
|
50
|
-
|
51
|
-
*
|
52
|
-
|
53
|
-
*
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
== 1.2.
|
61
|
-
* Added
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
*
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
*
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
*
|
75
|
-
|
76
|
-
*
|
77
|
-
*
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
*
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
*
|
86
|
-
*
|
87
|
-
|
88
|
-
|
89
|
-
* Added
|
90
|
-
*
|
91
|
-
|
92
|
-
== 1.
|
93
|
-
*
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
*
|
99
|
-
|
100
|
-
|
101
|
-
*
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
*
|
108
|
-
*
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
*
|
114
|
-
* Added
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
*
|
119
|
-
|
120
|
-
|
121
|
-
* Added
|
122
|
-
*
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
* Added
|
128
|
-
|
129
|
-
== 1.
|
130
|
-
*
|
131
|
-
|
132
|
-
|
133
|
-
*
|
134
|
-
|
135
|
-
|
136
|
-
*
|
137
|
-
|
138
|
-
|
139
|
-
*
|
140
|
-
*
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
*
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
*
|
155
|
-
|
156
|
-
*
|
157
|
-
|
158
|
-
|
159
|
-
*
|
160
|
-
|
161
|
-
|
162
|
-
*
|
163
|
-
*
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
*
|
1
|
+
== 1.4.0 - 20-Aug-2020
|
2
|
+
* Switched from test-unit to rspec, and reworked the tests bit in general.
|
3
|
+
* Removed the File.null method since Ruby has IO::NULL.
|
4
|
+
|
5
|
+
== 1.3.7 - 24-Jun-2020
|
6
|
+
* Fixed a bug where the File.binary? method would bomb on a zero byte file.
|
7
|
+
Thanks go to Alexandru Emil Lupu for the spot and patch.
|
8
|
+
* Remove Gemfile.lock from repo. You can generate that yourself locally if
|
9
|
+
you want.
|
10
|
+
|
11
|
+
== 1.3.6 - 7-Jun-2020
|
12
|
+
* Updated gemspec, added more versions to .travis.yml file, fixed typo.
|
13
|
+
Thanks go to Al Snow for the updates.
|
14
|
+
* Fixed a bug where the File.binary? method would return true for utf16
|
15
|
+
or utf32 encoded files. Thanks go to Andrew McAndre for the spot.
|
16
|
+
* Updated cert.
|
17
|
+
|
18
|
+
== 1.3.5 - 3-Sep-2017
|
19
|
+
* The File.image? method now checks against .ico files.
|
20
|
+
* Eliminated Fixnum warning that showed up in Ruby 2.4.x.
|
21
|
+
* Updated cert.
|
22
|
+
|
23
|
+
== 1.3.4 - 4-Jul-2017
|
24
|
+
* The File.binary? method now lets you set your own percentage for the
|
25
|
+
internal heuristic as an optional second argument.
|
26
|
+
* The VERSION constant is now frozen.
|
27
|
+
* Minor updates to the Rakefile and gemspec.
|
28
|
+
* Updated cert file.
|
29
|
+
|
30
|
+
== 1.3.3 - 25-Sep-2015
|
31
|
+
* This gem is now signed.
|
32
|
+
* The Rakefile tasks now assume Rubygems 2.x.
|
33
|
+
|
34
|
+
== 1.3.2 - 11-Dec-2014
|
35
|
+
* Update to the File.tail method that prevents potential line ending issues in JRuby.
|
36
|
+
* Added known issues with JRuby to the README.
|
37
|
+
|
38
|
+
== 1.3.1 - 9-Dec-2014
|
39
|
+
* Fixed some potential issues with File.tail. Thanks go to Matt Hoyle for
|
40
|
+
the patch.
|
41
|
+
|
42
|
+
== 1.3.0 - 8-Dec-2014
|
43
|
+
* Made the File.tail method efficient. It's no longer slurpy, and it also no
|
44
|
+
longer includes line endings in the result.
|
45
|
+
* Removed the File.middle method. I don't think it's useful.
|
46
|
+
|
47
|
+
== 1.2.7 - 6-Dec-2014
|
48
|
+
* File.which now expands ~ for paths. Thanks go to dg-vrnetze for the patch.
|
49
|
+
* Use /dev/null for cygwin instead of NUL.
|
50
|
+
* Use mv instead of cp in the nl_convert method.
|
51
|
+
* Solaris now handled explicitly in nl_convert, and OSX now considered Unix.
|
52
|
+
* Modified the binary? method to check 4096 bytes at most.
|
53
|
+
* Thanks to Matt Hoyle for many of the changes implemented in this release.
|
54
|
+
|
55
|
+
== 1.2.6 - 14-Jul-2014
|
56
|
+
* Updated the png? and jpg? methods so they explicitly specify the
|
57
|
+
offset argument so that it works with 1.9.2 and earlier. Thanks go to
|
58
|
+
Anurag Priyam for the spot.
|
59
|
+
|
60
|
+
== 1.2.5 - 11-Jul-2014
|
61
|
+
* Added a Gemfile, mostly for Travis CI.
|
62
|
+
* Added rake as a development dependency.
|
63
|
+
* Revert back to hash syntax supported by 1.8.x.
|
64
|
+
* Removed rubyforge_project from gemspec.
|
65
|
+
* Updated the tests for File.sparse? so that it doesn't rely on
|
66
|
+
an external file.
|
67
|
+
|
68
|
+
== 1.2.4 - 25-Feb-2014
|
69
|
+
* The File.binary method now always returns false for images. It is meant to
|
70
|
+
detect executables, shared objects, etc. Use File.image? to detect images.
|
71
|
+
* Encoding fixes for the File.image? method.
|
72
|
+
|
73
|
+
== 1.2.3 - 19-Feb-2014
|
74
|
+
* Fixed a bug where File.binary? would return true for unicode text. Thanks go
|
75
|
+
to Ben Hollis for the spot.
|
76
|
+
* Updated the win32-file and test-unit dependencies.
|
77
|
+
* Replace all instances of File.exists? with File.exist? because the former
|
78
|
+
is deprecated in Ruby 2.1 and later.
|
79
|
+
|
80
|
+
== 1.2.2 - 6-Apr-2012
|
81
|
+
* Yet another sparse file test fix for OSX, which does not support
|
82
|
+
sparse file generation on HFS+.
|
83
|
+
* Fixed a bug in the File.whereis method on Windows when dealing with
|
84
|
+
absolute paths.
|
85
|
+
* Some Config vs RbConfig fixes to silence 1.9.3 warnings.
|
86
|
+
* Refactored and cleaned up some tests.
|
87
|
+
|
88
|
+
== 1.2.1 - 20-May-2011
|
89
|
+
* Added an (empty) .gemtest file so that it can be used with test.rubygems.org.
|
90
|
+
* Fixed a sparse file test.
|
91
|
+
|
92
|
+
== 1.2.0 - 8-Jan-2011
|
93
|
+
* Added the File.sparse? method for Unix platforms. This method already
|
94
|
+
exists on Windows courtesy of the win32-file library.
|
95
|
+
|
96
|
+
== 1.1.9 - 25-Mar-2010
|
97
|
+
* Refactored File.which and File.whereis and added additional tests for each.
|
98
|
+
* Removed the block form of File.whereis.
|
99
|
+
* Reorganized the Rakefile a bit and put the test tasks under the 'test'
|
100
|
+
namespace, and the gem tasks under the 'gem' namespace.
|
101
|
+
* Updated the test-unit development dependency.
|
102
|
+
* Updates the README.
|
103
|
+
|
104
|
+
== 1.1.8 - 6-Oct-2009
|
105
|
+
* Fixed some bad variable names that crept into the File.nl_convert method.
|
106
|
+
* Added the File.null_device alias for File.null.
|
107
|
+
* Added cygwin and mingw to Windows detection code.
|
108
|
+
* One of the nlconvert tests is now skipped on Windows.
|
109
|
+
* Two text files that were previously bundled as part of this library for
|
110
|
+
testing purposes have been removed. Those are now dynamically generated
|
111
|
+
within the tests themselves.
|
112
|
+
* Gemspec updates.
|
113
|
+
* Documentation updates.
|
114
|
+
* Added the :gem rake task.
|
115
|
+
|
116
|
+
== 1.1.7 - 28-Jul-2009
|
117
|
+
* Now compatible with Ruby 1.9.x.
|
118
|
+
* Replaced RUBY_PLATFORM with rbconfig check for the sake of other
|
119
|
+
implementations, such as JRuby.
|
120
|
+
* Updated the tests to be more friendly to JRuby.
|
121
|
+
* Added Test::Unit 2.x as a development dependency.
|
122
|
+
* Renamed the test files.
|
123
|
+
|
124
|
+
== 1.1.6 - 31-Aug-2007
|
125
|
+
* Fixed the File.touch method so that it doesn't whack existing files. Thanks
|
126
|
+
go to Thomas Preymesser for the spot.
|
127
|
+
* Added corresponding tests to the tc_touch.rb file.
|
128
|
+
|
129
|
+
== 1.1.5 - 19-Jul-2007
|
130
|
+
* Added the File.image? method. Inspired by ruby-talk: 260487.
|
131
|
+
|
132
|
+
== 1.1.4 - 21-May-2007
|
133
|
+
* Removed the install.rb file. Installation is now handled exclusively by the
|
134
|
+
rake install task.
|
135
|
+
* Updated the MANIFEST file, and made it rdoc friendly.
|
136
|
+
* Manual installation corrections in the README file.
|
137
|
+
|
138
|
+
== 1.1.3 - 29-Apr-2007
|
139
|
+
* I changed the way that the constants IS_WINDOWS and WIN32EXTS are defined.
|
140
|
+
* The IS_WINDOWS and WIN32EXTS are no long documented publically. They were
|
141
|
+
never meant for public use.
|
142
|
+
* The tc_constants.rb file was modified to only run certain tests on Windows.
|
143
|
+
|
144
|
+
== 1.1.2 - 28-Apr-2007
|
145
|
+
* Fixed a require line that could cause problems on MS Windows.
|
146
|
+
* Added a Rakefile which includes tasks for installation and testing.
|
147
|
+
* Some cleanup and improvement in the various test files.
|
148
|
+
|
149
|
+
== 1.1.1 - 24-Aug-2006
|
150
|
+
* Added the File.binary? method, based on code from Ryan Davis.
|
151
|
+
|
152
|
+
== 1.1.0 - 23-Aug-2006
|
153
|
+
* Added the File.null method which returns the bit bucket on your platform.
|
154
|
+
* The suffixes on MS Windows are now based on the PATHEXT environment variable,
|
155
|
+
and defaults to '.com', '.bat' and '.exe' only if it's not defined.
|
156
|
+
* The File.which and File.whereis methods were tweaked a bit for Windows so
|
157
|
+
that they ignore the case of suffixes.
|
158
|
+
* Modified the platform checking and path separator handling.
|
159
|
+
* Added and tweaked some tests.
|
160
|
+
|
161
|
+
== 1.0.0 - 2-Jun-2005
|
162
|
+
* Modified the File.middle method to accept an optional block.
|
163
|
+
* File.whereis is now limited to unique values so that redundant PATH entries
|
164
|
+
do not cause redundant entries in the returned array (or block).
|
165
|
+
* File.nl_convert and File.touch now return self.
|
166
|
+
* File.nl_convert now raises ArgumentError (instead of StandardError) if
|
167
|
+
an unknown platform is provided.
|
168
|
+
* File.wc now raises ArgumentError (instead of RuntimeError) if a bad option
|
169
|
+
is provided.
|
170
|
+
* Made documentation rdoc friendly.
|
171
|
+
* Test suite updates, corrections and additions.
|
172
|
+
* Removed the INSTALL file. See the README instead.
|
173
|
+
* Moved project to RubyForge.
|
174
|
+
|
175
|
+
== 0.1.3 - 5-Dec-2003
|
176
|
+
* Modified File#which and File#whereis for Win32 to handle extensions better,
|
177
|
+
i.e. you can send "ruby" or "ruby.exe" and get back the same result.
|
178
|
+
* Minor test changes to tc_which.rb and tc_whereis.rb.
|
179
|
+
|
180
|
+
== 0.1.2 - 14-May-2003
|
181
|
+
* Modified nl_convert() to allow the destination filename to be the same as the
|
182
|
+
source file. In that case, a tempfile is used and copied back over the
|
183
|
+
original file.
|
184
|
+
* The target file name for nl_convert() now defaults to the source file name and
|
185
|
+
the default format is now "dos".
|
186
|
+
* Added a tc_constants.rb test suite.
|
187
|
+
* Test suite additions/fixes.
|
188
|
+
* Updates to MANIFEST.
|
189
|
+
|
190
|
+
== 0.1.1 - 21-Mar-2003
|
191
|
+
* Modified File.tail to return data in the same order that 'tail' does.
|
192
|
+
* Modified File.which to return nil if the program is not found.
|
193
|
+
* Modified File.whereis now uses '\' instead of '/' on MS Windows.
|
194
|
+
* Added File.middle class method.
|
195
|
+
* Test suite modification & additions.
|
196
|
+
* Thanks go to Shanko for both the spot and patch for tail, which, whereis
|
197
|
+
and middle.
|
198
|
+
|
199
|
+
== 0.1.0 - 18-Mar-2003
|
200
|
+
* 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 '
|
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 'rspec'
|
12
|
+
end
|
data/MANIFEST
CHANGED
@@ -1,19 +1,27 @@
|
|
1
|
-
* CHANGES
|
2
|
-
* README
|
3
|
-
* MANIFEST
|
4
|
-
*
|
5
|
-
*
|
6
|
-
*
|
7
|
-
*
|
8
|
-
*
|
9
|
-
*
|
10
|
-
*
|
11
|
-
*
|
12
|
-
*
|
13
|
-
*
|
14
|
-
*
|
15
|
-
*
|
16
|
-
*
|
17
|
-
*
|
18
|
-
*
|
19
|
-
*
|
1
|
+
* CHANGES
|
2
|
+
* README
|
3
|
+
* MANIFEST
|
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
|