file-find 0.3.9 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 8bb373058d59475e6718a6dbc9a61c999142b55d
4
- data.tar.gz: 5c0c4c3ff84d2b317744f62ce888bc7ad18a10db
2
+ SHA256:
3
+ metadata.gz: 68ea64b77319de8fe9035272d2fb5f3f62053fac3436412f377aa8d784a9e325
4
+ data.tar.gz: 1f719308185c8dd79c6074441b9333f3b151ed1d467f79fdb25d66d96eaa3353
5
5
  SHA512:
6
- metadata.gz: d6475bfdc5f278e1394fafe3658f8684ec7692fd43e11c88fc84e76777f5c48293f8f3f066f04cde5256cbf009033c892182c412f9f834dbebbd1b5b53444d7f
7
- data.tar.gz: 703d0bd5d05b6006be1c7a689aa015811aa3b2f878013d8eaaed867cb0e040782c0904b7c3a2ce03104d5fbaacb1a7e3b3b92fa00748883e8bde7bc55cdfc664
6
+ metadata.gz: c291ffb114be00097a9d45298dc0b5ddc5ae2b749cc0aaaab2880c97724be80cc8ceea4400220aaa9416cb7c84b10ebb57a0b142dd8221cfef573461e922aae6
7
+ data.tar.gz: 47a283df9c87c82be58ec18912e96b72b3659ba0c806738beb9a8a562e56c57ae26c05b6162c530a641c937c1e15710888f3974b6dde6dfe67078e4901a467b6
Binary file
data.tar.gz.sig CHANGED
Binary file
data/CHANGES CHANGED
@@ -1,3 +1,10 @@
1
+ == 0.4.0 - 26-Dec-2018
2
+ * License changed to Apache-2.0.
3
+ * Fixed a bug where mindepth and maxdepth would break if more than one
4
+ path was specified as part of the rule. Thanks go to flagos for the spot.
5
+ * The VERSION constant is now frozen.
6
+ * The cert has been updated.
7
+
1
8
  == 0.3.9 - 16-Dec-2015
2
9
  * This gem is now signed.
3
10
  * Added a file-find.rb file for convenience.
data/README CHANGED
@@ -69,18 +69,11 @@
69
69
  * ok - This is not interactive software.
70
70
 
71
71
  = Known Issues
72
- The mindepth and maxdepth options do not work for more than 1 path.
73
-
74
72
  The :perm option is limited to 0644 and 0444 on MS Windows.
75
73
 
76
74
  The :user, :group, and :inum options require the win32-file gem to work
77
75
  properly on MS Windows. However, it is not officially a dependency.
78
76
 
79
- There are 3 test failures with JRuby, all related to the 'perm' option. I
80
- have not been able to reduce them to a simple test case and discern the
81
- exact cause of the failures, though I suspect a bug in the JRuby
82
- implementation of File.chmod.
83
-
84
77
  = Bugs
85
78
  None that I'm aware of beyond the ones mentioned in the Known Issues. Please
86
79
  log any bug reports on the project page at:
@@ -94,10 +87,10 @@
94
87
  * Hal Fulton for his implementation of symbolic permissions.
95
88
 
96
89
  = License
97
- Artistic 2.0
90
+ Apache-2.0
98
91
 
99
92
  = Copyright
100
- (C) 2007-2015, Daniel J. Berger, All Rights Reserved
93
+ (C) 2007-2018, Daniel J. Berger, All Rights Reserved
101
94
 
102
95
  = Author
103
96
  Daniel J. Berger
@@ -1,21 +1,26 @@
1
1
  -----BEGIN CERTIFICATE-----
2
- MIIDcDCCAligAwIBAgIBATANBgkqhkiG9w0BAQUFADA/MREwDwYDVQQDDAhkamJl
2
+ MIIEcDCCAtigAwIBAgIBATANBgkqhkiG9w0BAQsFADA/MREwDwYDVQQDDAhkamJl
3
3
  cmc5NjEVMBMGCgmSJomT8ixkARkWBWdtYWlsMRMwEQYKCZImiZPyLGQBGRYDY29t
4
- MB4XDTE1MDkwMjIwNDkxOFoXDTE2MDkwMTIwNDkxOFowPzERMA8GA1UEAwwIZGpi
4
+ MB4XDTE4MDMxODE1MjIwN1oXDTI4MDMxNTE1MjIwN1owPzERMA8GA1UEAwwIZGpi
5
5
  ZXJnOTYxFTATBgoJkiaJk/IsZAEZFgVnbWFpbDETMBEGCgmSJomT8ixkARkWA2Nv
6
- bTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMyTkvXqRp6hLs9eoJOS
7
- Hmi8kRYbq9Vkf15/hMxJpotYMgJVHHWrmDcC5Dye2PbnXjTkKf266Zw0PtT9h+lI
8
- S3ts9H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Nv+7/jM
25
+ WZs4eecIcUc4tKdHxcAJ0MO/Dkqq7hGaiHpwKY76wQ1+8xAh
21
26
  -----END CERTIFICATE-----
@@ -2,9 +2,9 @@ require 'rubygems'
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = 'file-find'
5
- spec.version = '0.3.9'
5
+ spec.version = '0.4.0'
6
6
  spec.author = 'Daniel Berger'
7
- spec.license = 'Artistic 2.0'
7
+ spec.license = 'Apache-2.0'
8
8
  spec.summary = 'A better way to find files'
9
9
  spec.email = 'djberg96@gmail.com'
10
10
  spec.homepage = 'http://github.com/djberg96/file-find'
@@ -9,7 +9,7 @@ end
9
9
 
10
10
  class File::Find
11
11
  # The version of the file-find library
12
- VERSION = '0.3.9'
12
+ VERSION = '0.4.0'.freeze
13
13
 
14
14
  # :stopdoc:
15
15
  VALID_OPTIONS = %w[
@@ -258,7 +258,9 @@ class File::Find
258
258
 
259
259
  if @maxdepth || @mindepth
260
260
  file_depth = file.split(File::SEPARATOR).length
261
- path_depth = @path.split(File::SEPARATOR).length
261
+ current_base_path = [@path].flatten.find{ |tpath| file.include?(tpath) }
262
+ path_depth = current_base_path.split(File::SEPARATOR).length
263
+
262
264
  depth = file_depth - path_depth
263
265
 
264
266
  if @maxdepth && (depth > @maxdepth)
@@ -68,7 +68,8 @@ class TC_File_Find < Test::Unit::TestCase
68
68
  end
69
69
 
70
70
  test "version constant is set to expected value" do
71
- assert_equal('0.3.9', File::Find::VERSION)
71
+ assert_equal('0.4.0', File::Find::VERSION)
72
+ assert_true(File::Find::VERSION.frozen?)
72
73
  end
73
74
 
74
75
  test "path accessor basic functionality" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: file-find
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.9
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Berger
@@ -10,27 +10,32 @@ bindir: bin
10
10
  cert_chain:
11
11
  - |
12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haWwuY29tMB0GA1UdEgQWMBSBEmRq
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: 2015-12-16 00:00:00.000000000 Z
38
+ date: 2018-12-26 00:00:00.000000000 Z
34
39
  dependencies:
35
40
  - !ruby/object:Gem::Dependency
36
41
  name: sys-admin
@@ -87,22 +92,22 @@ extra_rdoc_files:
87
92
  - CHANGES
88
93
  - MANIFEST
89
94
  files:
90
- - certs
91
- - certs/djberg96_pub.pem
92
95
  - CHANGES
96
+ - test
97
+ - test/test_file_find.rb
98
+ - README
99
+ - Rakefile
100
+ - MANIFEST
93
101
  - file-find.gemspec
94
102
  - lib
103
+ - lib/file-find.rb
95
104
  - lib/file
96
105
  - lib/file/find.rb
97
- - lib/file-find.rb
98
- - MANIFEST
99
- - Rakefile
100
- - README
101
- - test
102
- - test/test_file_find.rb
106
+ - certs
107
+ - certs/djberg96_pub.pem
103
108
  homepage: http://github.com/djberg96/file-find
104
109
  licenses:
105
- - Artistic 2.0
110
+ - Apache-2.0
106
111
  metadata: {}
107
112
  post_install_message:
108
113
  rdoc_options: []
@@ -120,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
120
125
  version: '0'
121
126
  requirements: []
122
127
  rubyforge_project:
123
- rubygems_version: 2.5.1
128
+ rubygems_version: 2.7.6
124
129
  signing_key:
125
130
  specification_version: 4
126
131
  summary: A better way to find files
metadata.gz.sig CHANGED
Binary file