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.
metadata CHANGED
@@ -1,36 +1,41 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ptools
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.5
4
+ version: 1.4.2
5
5
  platform: universal-mingw32
6
6
  authors:
7
7
  - Daniel J. Berger
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain:
11
11
  - |
12
12
  -----BEGIN CERTIFICATE-----
13
- MIIDcDCCAligAwIBAgIBATANBgkqhkiG9w0BAQUFADA/MREwDwYDVQQDDAhkamJl
13
+ MIIEcDCCAtigAwIBAgIBATANBgkqhkiG9w0BAQsFADA/MREwDwYDVQQDDAhkamJl
14
14
  cmc5NjEVMBMGCgmSJomT8ixkARkWBWdtYWlsMRMwEQYKCZImiZPyLGQBGRYDY29t
15
- MB4XDTE3MDkwMzE1MjMxM1oXDTE4MDkwMzE1MjMxM1owPzERMA8GA1UEAwwIZGpi
15
+ MB4XDTE4MDMxODE1MjIwN1oXDTI4MDMxNTE1MjIwN1owPzERMA8GA1UEAwwIZGpi
16
16
  ZXJnOTYxFTATBgoJkiaJk/IsZAEZFgVnbWFpbDETMBEGCgmSJomT8ixkARkWA2Nv
17
- bTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJ8y4kEssxNpAdPhNNw2
18
- p4zkERFndPAnmOKDdErczFYYUA9uYpA7/iTjkLlNyRwvsNHpnMXdSF7vy++YIU+F
19
- Ux3AGTmspupbdSzqBNUhSEJ9TmpjMer1dMYMR9fRw3r3qQreiO2u/O/tV4VpzrDj
20
- 28JC0b1PcKtfobxbnk+hporZqTH6ClOxDsRx+trlkr7q7FLZwTZn0ywjAV8WMVTO
21
- SMmkzXQ37s2Nnrq6r+dDZI0voBxyQkAUzmdBOQTrvOFAo3tuWcnJNR/RRdFhJ9nK
22
- mYMPmEd1z0s+cU0SUEeTvhGv/9LCmb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SAyFF2yzv/7idQHLJJq
24
+ 74BMnx0FIq6fCpu5slAipvxZ3ZkZpEXZFr3cIBtO1gFvQWW7E/Y3ijliWJS1GQFq
25
+ 058qERadHGu1yu1dojmFRo6W2KZvY9al2yIlbkpDrD5MYQIDAQABo3cwdTAJBgNV
26
+ HRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNVHQ4EFgQUFZsMapgzJimzsbaBG2Tm8j5e
27
+ AzgwHQYDVR0RBBYwFIESZGpiZXJnOTZAZ21haWwuY29tMB0GA1UdEgQWMBSBEmRq
28
+ YmVyZzk2QGdtYWlsLmNvbTANBgkqhkiG9w0BAQsFAAOCAYEAW2tnYixXQtKxgGXq
29
+ /3iSWG2bLwvxS4go3srO+aRXZHrFUMlJ5W0mCxl03aazxxKTsVVpZD8QZxvK91OQ
30
+ h9zr9JBYqCLcCVbr8SkmYCi/laxIZxsNE5YI8cC8vvlLI7AMgSfPSnn/Epq1GjGY
31
+ 6L1iRcEDtanGCIvjqlCXO9+BmsnCfEVehqZkQHeYczA03tpOWb6pon2wzvMKSsKH
32
+ ks0ApVdstSLz1kzzAqem/uHdG9FyXdbTAwH1G4ZPv69sQAFAOCgAqYmdnzedsQtE
33
+ 1LQfaQrx0twO+CZJPcRLEESjq8ScQxWRRkfuh2VeR7cEU7L7KqT10mtUwrvw7APf
34
+ DYoeCY9KyjIBjQXfbj2ke5u1hZj94Fsq9FfbEQg8ygCgwThnmkTrrKEiMSs3alYR
35
+ ORVCZpRuCPpmC8qmqxUnARDArzucjaclkxjLWvCVHeFa9UP7K3Nl9oTjJNv+7/jM
36
+ WZs4eecIcUc4tKdHxcAJ0MO/Dkqq7hGaiHpwKY76wQ1+8xAh
32
37
  -----END CERTIFICATE-----
33
- date: 2017-09-03 00:00:00.000000000 Z
38
+ date: 2021-05-22 00:00:00.000000000 Z
34
39
  dependencies:
35
40
  - !ruby/object:Gem::Dependency
36
41
  name: rake
@@ -47,33 +52,33 @@ dependencies:
47
52
  - !ruby/object:Gem::Version
48
53
  version: '0'
49
54
  - !ruby/object:Gem::Dependency
50
- name: test-unit
55
+ name: rspec
51
56
  requirement: !ruby/object:Gem::Requirement
52
57
  requirements:
53
- - - ">="
58
+ - - "~>"
54
59
  - !ruby/object:Gem::Version
55
- version: 2.5.0
60
+ version: '3.9'
56
61
  type: :development
57
62
  prerelease: false
58
63
  version_requirements: !ruby/object:Gem::Requirement
59
64
  requirements:
60
- - - ">="
65
+ - - "~>"
61
66
  - !ruby/object:Gem::Version
62
- version: 2.5.0
67
+ version: '3.9'
63
68
  - !ruby/object:Gem::Dependency
64
69
  name: win32-file
65
70
  requirement: !ruby/object:Gem::Requirement
66
71
  requirements:
67
72
  - - ">="
68
73
  - !ruby/object:Gem::Version
69
- version: 0.7.0
74
+ version: '0'
70
75
  type: :runtime
71
76
  prerelease: false
72
77
  version_requirements: !ruby/object:Gem::Requirement
73
78
  requirements:
74
79
  - - ">="
75
80
  - !ruby/object:Gem::Version
76
- version: 0.7.0
81
+ version: '0'
77
82
  description: |2
78
83
  The ptools (power tools) library provides several handy methods to
79
84
  Ruby's core File class, such as File.which for finding executables,
@@ -81,47 +86,46 @@ description: |2
81
86
  email: djberg96@gmail.com
82
87
  executables: []
83
88
  extensions: []
84
- extra_rdoc_files:
85
- - README
86
- - CHANGES
87
- - MANIFEST
89
+ extra_rdoc_files: []
88
90
  files:
89
- - certs
90
- - certs/djberg96_pub.pem
91
- - CHANGES
91
+ - CHANGES.md
92
92
  - Gemfile
93
- - lib
93
+ - MANIFEST.md
94
+ - README.md
95
+ - Rakefile
96
+ - certs/djberg96_pub.pem
94
97
  - lib/ptools.rb
95
- - MANIFEST
96
98
  - ptools.gemspec
97
- - Rakefile
98
- - README
99
- - test
100
- - test/img
101
- - test/img/test.gif
102
- - test/img/test.ico
103
- - test/img/test.jpg
104
- - test/img/test.png
105
- - test/test_binary.rb
106
- - test/test_constants.rb
107
- - test/test_head.rb
108
- - test/test_image.rb
109
- - test/test_is_sparse.rb
110
- - test/test_nlconvert.rb
111
- - test/test_null.rb
112
- - test/test_tail.rb
113
- - test/test_touch.rb
114
- - test/test_wc.rb
115
- - test/test_whereis.rb
116
- - test/test_which.rb
117
- - test/txt
118
- - test/txt/english.txt
119
- - test/txt/korean.txt
99
+ - spec/binary_spec.rb
100
+ - spec/constants_spec.rb
101
+ - spec/head_spec.rb
102
+ - spec/image_spec.rb
103
+ - spec/img/test.gif
104
+ - spec/img/test.ico
105
+ - spec/img/test.jpg
106
+ - spec/img/test.png
107
+ - spec/nlconvert_spec.rb
108
+ - spec/sparse_spec.rb
109
+ - spec/tail_spec.rb
110
+ - spec/touch_spec.rb
111
+ - spec/txt/empty.txt
112
+ - spec/txt/english.txt
113
+ - spec/txt/english.utf16
114
+ - spec/txt/korean.txt
115
+ - spec/wc_spec.rb
116
+ - spec/whereis_spec.rb
117
+ - spec/which_spec.rb
120
118
  homepage: https://github.com/djberg96/ptools
121
119
  licenses:
122
120
  - Artistic-2.0
123
- metadata: {}
124
- post_install_message:
121
+ metadata:
122
+ homepage_uri: https://github.com/djberg96/ptools
123
+ bug_tracker_uri: https://github.com/djberg96/ptools/issues
124
+ changelog_uri: https://github.com/djberg96/ptools/blob/master/CHANGES.md
125
+ documentation_uri: https://github.com/djberg96/ptools/wiki
126
+ source_code_uri: https://github.com/djberg96/ptools
127
+ wiki_uri: https://github.com/djberg96/ptools/wiki
128
+ post_install_message:
125
129
  rdoc_options: []
126
130
  require_paths:
127
131
  - lib
@@ -136,21 +140,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
136
140
  - !ruby/object:Gem::Version
137
141
  version: '0'
138
142
  requirements: []
139
- rubyforge_project:
140
- rubygems_version: 2.6.12
141
- signing_key:
143
+ rubygems_version: 3.1.4
144
+ signing_key:
142
145
  specification_version: 4
143
146
  summary: Extra methods for the File class
144
- test_files:
145
- - test/test_binary.rb
146
- - test/test_constants.rb
147
- - test/test_head.rb
148
- - test/test_image.rb
149
- - test/test_is_sparse.rb
150
- - test/test_nlconvert.rb
151
- - test/test_null.rb
152
- - test/test_tail.rb
153
- - test/test_touch.rb
154
- - test/test_wc.rb
155
- - test/test_whereis.rb
156
- - test/test_which.rb
147
+ test_files: []
metadata.gz.sig CHANGED
Binary file
data/MANIFEST DELETED
@@ -1,21 +0,0 @@
1
- * CHANGES
2
- * README
3
- * MANIFEST
4
- * Rakefile
5
- * ptools.gemspec
6
- * certs/djberg96_pub.pem
7
- * lib/ptools.rb
8
- * test/test_constants.rb
9
- * test/test_head.rb
10
- * test/test_image.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
18
- * test/img/test.gif
19
- * test/img/test.jpg
20
- * test/img/test.png
21
- * test/img/test.ico
data/test/test_binary.rb DELETED
@@ -1,70 +0,0 @@
1
- #####################################################################
2
- # test_binary.rb
3
- #
4
- # Test case for the File.binary? method. You should run this test
5
- # via the 'rake test_binary' task.
6
- #####################################################################
7
- require 'rubygems'
8
- require 'test-unit'
9
- require 'ptools'
10
-
11
- class TC_Ptools_Binary < Test::Unit::TestCase
12
- def self.startup
13
- if File::ALT_SEPARATOR
14
- @@bin_file = File.join(ENV['windir'], 'notepad.exe')
15
- else
16
- @@bin_file = '/bin/ls'
17
- end
18
-
19
- @@dirname = File.dirname(__FILE__)
20
- end
21
-
22
- def setup
23
- @txt_file = File.join(@@dirname, 'txt', 'english.txt')
24
- @uni_file = File.join(@@dirname, 'txt', 'korean.txt')
25
- @png_file = File.join(@@dirname, 'img', 'test.png')
26
- @jpg_file = File.join(@@dirname, 'img', 'test.jpg')
27
- @gif_file = File.join(@@dirname, 'img', 'test.gif')
28
- end
29
-
30
- test "File.binary? basic functionality" do
31
- assert_respond_to(File, :binary?)
32
- assert_nothing_raised{ File.binary?(@txt_file) }
33
- end
34
-
35
- test "File.binary? returns true for binary files" do
36
- assert_true(File.binary?(@@bin_file))
37
- end
38
-
39
- test "File.binary? returns false for text files" do
40
- assert_false(File.binary?(@txt_file))
41
- assert_false(File.binary?(@uni_file))
42
- end
43
-
44
- test "File.binary? returns false for image files" do
45
- assert_false(File.binary?(@png_file))
46
- assert_false(File.binary?(@jpg_file))
47
- assert_false(File.binary?(@gif_file))
48
- end
49
-
50
- test "File.binary? accepts an optional percentage argument" do
51
- assert_false(File.binary?(@txt_file, 0.50))
52
- assert_true(File.binary?(@txt_file, 0.05))
53
- end
54
-
55
- test "File.binary? raises an error if the file cannot be found" do
56
- assert_raise_kind_of(SystemCallError){ File.binary?('bogus') }
57
- end
58
-
59
- test "File.binary? only accepts one argument" do
60
- assert_raise_kind_of(ArgumentError){ File.binary?(@txt_file, @@bin_file) }
61
- end
62
-
63
- def teardown
64
- @txt_file = nil
65
- @uni_file = nil
66
- @png_file = nil
67
- @jpg_file = nil
68
- @gif_file = nil
69
- end
70
- end
@@ -1,38 +0,0 @@
1
- #####################################################################
2
- # test_constants.rb
3
- #
4
- # Tests the constants that have been defined for our package. This
5
- # test case should be run via the 'rake test_constants' task.
6
- #####################################################################
7
- require 'rubygems'
8
- require 'test-unit'
9
- require 'rbconfig'
10
- require 'ptools'
11
-
12
- class TC_Ptools_Constants < Test::Unit::TestCase
13
- def self.startup
14
- @@windows = File::ALT_SEPARATOR
15
- end
16
-
17
- test "PTOOLS_VERSION constant is set to expected value" do
18
- assert_equal('1.3.5', File::PTOOLS_VERSION)
19
- end
20
-
21
- test "IMAGE_EXT constant is set to array of values" do
22
- assert_equal(%w[.bmp .gif .jpeg .jpg .png], File::IMAGE_EXT.sort)
23
- end
24
-
25
- test "WINDOWS constant is defined on MS Windows" do
26
- omit_unless(@@windows, "Skipping on Unix systems")
27
- assert_not_nil(File::MSWINDOWS)
28
- end
29
-
30
- test "WIN32EXTS constant is defiend on MS Windows" do
31
- omit_unless(@@windows, "Skipping on Unix systems")
32
- assert_not_nil(File::WIN32EXTS)
33
- end
34
-
35
- def self.shutdown
36
- @@windows = nil
37
- end
38
- end
data/test/test_head.rb DELETED
@@ -1,48 +0,0 @@
1
- ######################################################################
2
- # test_head.rb
3
- #
4
- # Test case for the File.head method. This test should be run via
5
- # the 'rake test_head' task.
6
- ######################################################################
7
- require 'test-unit'
8
- require 'ptools'
9
-
10
- class TC_FileHead < Test::Unit::TestCase
11
- def self.startup
12
- Dir.chdir('test') if File.exist?('test')
13
- File.open('test_file1.txt', 'w'){ |fh| 25.times{ |n| fh.puts "line#{n+1}" } }
14
- end
15
-
16
- def setup
17
- @test_file = 'test_file1.txt'
18
- @expected_head1 = ["line1\n","line2\n","line3\n","line4\n","line5\n"]
19
- @expected_head1.push("line6\n","line7\n","line8\n","line9\n","line10\n")
20
- @expected_head2 = ["line1\n","line2\n","line3\n","line4\n","line5\n"]
21
- end
22
-
23
- def test_head_basic
24
- assert_respond_to(File, :head)
25
- assert_nothing_raised{ File.head(@test_file) }
26
- assert_nothing_raised{ File.head(@test_file, 5) }
27
- assert_nothing_raised{ File.head(@test_file){} }
28
- end
29
-
30
- def test_head_expected_results
31
- assert_kind_of(Array, File.head(@test_file))
32
- assert_equal(@expected_head1, File.head(@test_file))
33
- assert_equal(@expected_head2, File.head(@test_file, 5))
34
- end
35
-
36
- def test_head_expected_errors
37
- assert_raises(ArgumentError){ File.head(@test_file, 5, "foo") }
38
- assert_raises(Errno::ENOENT){ File.head("bogus") }
39
- end
40
-
41
- def teardown
42
- @test_file = nil
43
- end
44
-
45
- def self.shutdown
46
- File.delete('test_file1.txt') if File.exist?('test_file1.txt')
47
- end
48
- end
data/test/test_image.rb DELETED
@@ -1,62 +0,0 @@
1
- #####################################################################
2
- # test_image.rb
3
- #
4
- # Test case for the File.image? method. You should run this test
5
- # via the 'rake test:image' task.
6
- #####################################################################
7
- require 'test-unit'
8
- require 'ptools'
9
-
10
- class TC_Ptools_Image < Test::Unit::TestCase
11
- def self.startup
12
- Dir.chdir('test') if File.exist?('test')
13
- end
14
-
15
- def setup
16
- @txt_file = File.join(Dir.pwd, 'txt', 'english.txt')
17
- @uni_file = File.join(Dir.pwd, 'txt', 'korean.txt')
18
- @jpg_file = File.join(Dir.pwd, 'img', 'test.jpg')
19
- @png_file = File.join(Dir.pwd, 'img', 'test.png')
20
- @gif_file = File.join(Dir.pwd, 'img', 'test.gif')
21
- @ico_file = File.join(Dir.pwd, 'img', 'test.ico')
22
- end
23
-
24
- test "image? method basic functionality" do
25
- assert_respond_to(File, :image?)
26
- assert_nothing_raised{ File.image?(@txt_file) }
27
- assert_boolean(File.image?(@txt_file))
28
- end
29
-
30
- test "image? method returns false for a text file" do
31
- assert_false(File.image?(@txt_file))
32
- assert_false(File.image?(@uni_file))
33
- end
34
-
35
- test "image? method returns true for a gif" do
36
- assert_true(File.image?(@gif_file))
37
- end
38
-
39
- test "image? method returns true for a jpeg" do
40
- assert_true(File.image?(@jpg_file))
41
- end
42
-
43
- test "image? method returns true for a png" do
44
- assert_true(File.image?(@png_file))
45
- end
46
-
47
- test "image? method returns true for an ico" do
48
- assert_true(File.image?(@ico_file))
49
- end
50
-
51
- test "image? method raises an error if the file does not exist" do
52
- assert_raises(Errno::ENOENT, ArgumentError){ File.image?('bogus') }
53
- end
54
-
55
- def teardown
56
- @txt_file = nil
57
- @uni_file = nil
58
- @jpg_file = nil
59
- @png_file = nil
60
- @gif_file = nil
61
- end
62
- end