file-find 0.4.2 → 0.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2d8c5c8fe59b53934405e4cb077bceddb29f988518ccf79f7083ad40357b25fc
4
- data.tar.gz: 9bad3ffcce8d90697e66b4e445bf54d5a4b899a8449c6a589ca6a558fea4a84c
3
+ metadata.gz: 97856aefde25218603e2094d0034a491441291c277fc88b11ae39e811ac31ab6
4
+ data.tar.gz: f3b1061dcdc66c673983caa648e8c580d84957522ac27476a09f2494c035ca9c
5
5
  SHA512:
6
- metadata.gz: 4d0ba5a6cefdb49e55bbec64b6e6105c6e95fac8a73206039d74656b4681795a1c09726c19b5150937037dc1f433eef6144c5be5e0704d9c7b82aede164545c0
7
- data.tar.gz: 190060624d7f5e47846ae7a69c5f3cdaf18d1ce0cb44037cea24951c67579dd40a492426ba0720e3186c710bd1b77f1be109c7658472e7a05d23ad37acbb3773
6
+ metadata.gz: 4e22e2d823397614eb4341875b3098e049c8cea6107aaf7f5b000eb2df18856f5a2aef95ee7c649f1342e1233569f76cc9ab83dc80721a31fb0b08f58f6706ff
7
+ data.tar.gz: a8d03101ccd31356d8e735fad4a82e0abbde94d1d82c42ea17cdcc39fe935be4063818addb9f6275cf04b992bdb69d6676f177da395de095c577683543a20df1
Binary file
data.tar.gz.sig CHANGED
Binary file
data/CHANGES CHANGED
@@ -1,3 +1,6 @@
1
+ == 0.4.3 - 8-Jun-2020
2
+ * Fixed a bug with ELOOP handling. Thanks go to joast for the spot and fix.
3
+
1
4
  == 0.4.2 - 6-May-2020
2
5
  * Added LICENSE file as required by the Apache-2.0 license.
3
6
 
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = 'file-find'
5
- spec.version = '0.4.2'
5
+ spec.version = '0.4.3'
6
6
  spec.author = 'Daniel Berger'
7
7
  spec.license = 'Apache-2.0'
8
8
  spec.summary = 'A better way to find files'
@@ -9,7 +9,7 @@ end
9
9
 
10
10
  class File::Find
11
11
  # The version of the file-find library
12
- VERSION = '0.4.2'.freeze
12
+ VERSION = '0.4.3'.freeze
13
13
 
14
14
  # :stopdoc:
15
15
  VALID_OPTIONS = %w[
@@ -235,8 +235,10 @@ class File::Find
235
235
  rescue Errno::ENOENT, Errno::EACCES
236
236
  next
237
237
  rescue Errno::ELOOP
238
- stat_method = :lstat # Handle recursive symlinks
239
- retry if stat_method.to_s != 'lstat'
238
+ if stat_method.to_s != 'lstat'
239
+ stat_method = :lstat # Handle recursive symlinks
240
+ retry
241
+ end
240
242
  end
241
243
 
242
244
  # We need to escape any brackets in the directory name.
@@ -8,6 +8,7 @@ require 'test-unit'
8
8
  require 'fileutils'
9
9
  require 'file/find'
10
10
  require 'sys/admin'
11
+ require 'tmpdir'
11
12
 
12
13
  if File::ALT_SEPARATOR
13
14
  require 'win32/file'
@@ -68,7 +69,7 @@ class TC_File_Find < Test::Unit::TestCase
68
69
  end
69
70
 
70
71
  test "version constant is set to expected value" do
71
- assert_equal('0.4.2', File::Find::VERSION)
72
+ assert_equal('0.4.3', File::Find::VERSION)
72
73
  assert_true(File::Find::VERSION.frozen?)
73
74
  end
74
75
 
@@ -538,6 +539,26 @@ class TC_File_Find < Test::Unit::TestCase
538
539
  assert_raise(ArgumentError){ File::Find.new(:bogus? => true) }
539
540
  end
540
541
 
542
+ # TODO: Update test for Windows
543
+ test 'eloop handling works as expected' do
544
+ omit_if(@@windows, 'eloop handling test skipped on MS Windows')
545
+
546
+ begin
547
+ dir_eloop = ::Dir.mktmpdir
548
+
549
+ Dir.chdir(dir_eloop) do
550
+ File.symlink('eloop0', 'eloop1')
551
+ File.symlink('eloop1', 'eloop0')
552
+ expecting = ['./eloop0', './eloop1']
553
+
554
+ results = File::Find.new(:path => '.', :follow => true).find
555
+ assert_equal(expecting, results.sort)
556
+ end
557
+ ensure
558
+ rm_rf(dir_eloop)
559
+ end
560
+ end
561
+
541
562
  def teardown
542
563
  rm_rf(@file_rb)
543
564
  rm_rf(@file_txt1)
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.4.2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Berger
@@ -131,7 +131,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
131
131
  - !ruby/object:Gem::Version
132
132
  version: '0'
133
133
  requirements: []
134
- rubygems_version: 3.0.6
134
+ rubygems_version: 3.0.8
135
135
  signing_key:
136
136
  specification_version: 4
137
137
  summary: A better way to find files
metadata.gz.sig CHANGED
Binary file