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 +4 -4
 - checksums.yaml.gz.sig +0 -0
 - data.tar.gz.sig +0 -0
 - data/CHANGES +3 -0
 - data/file-find.gemspec +1 -1
 - data/lib/file/find.rb +5 -3
 - data/test/test_file_find.rb +22 -1
 - metadata +2 -2
 - metadata.gz.sig +0 -0
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 97856aefde25218603e2094d0034a491441291c277fc88b11ae39e811ac31ab6
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: f3b1061dcdc66c673983caa648e8c580d84957522ac27476a09f2494c035ca9c
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 4e22e2d823397614eb4341875b3098e049c8cea6107aaf7f5b000eb2df18856f5a2aef95ee7c649f1342e1233569f76cc9ab83dc80721a31fb0b08f58f6706ff
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: a8d03101ccd31356d8e735fad4a82e0abbde94d1d82c42ea17cdcc39fe935be4063818addb9f6275cf04b992bdb69d6676f177da395de095c577683543a20df1
         
     | 
    
        checksums.yaml.gz.sig
    CHANGED
    
    | 
         Binary file 
     | 
    
        data.tar.gz.sig
    CHANGED
    
    | 
         Binary file 
     | 
    
        data/CHANGES
    CHANGED
    
    
    
        data/file-find.gemspec
    CHANGED
    
    
    
        data/lib/file/find.rb
    CHANGED
    
    | 
         @@ -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. 
     | 
| 
      
 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  
     | 
| 
       239 
     | 
    
         
            -
             
     | 
| 
      
 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.
         
     | 
    
        data/test/test_file_find.rb
    CHANGED
    
    | 
         @@ -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. 
     | 
| 
      
 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. 
     | 
| 
      
 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. 
     | 
| 
      
 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 
     |