ffi-libarchive 1.0.4 → 1.0.17
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
- data/lib/ffi-libarchive.rb +1 -1
- data/lib/ffi-libarchive/reader.rb +8 -1
- data/lib/ffi-libarchive/version.rb +1 -1
- metadata +3 -3
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 27c509a1d26618d51623cca95acc84cfeb8c804bdf818b999c8d10ac173a99ae
         | 
| 4 | 
            +
              data.tar.gz: 7d2a2184aa944ff1e91917be83e58be06d1df592154ce1a1bc33c8c1a6e1dd5e
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: e6ba3e6ccb7c1ce9656a6bf399e4d6050bf9b8bc813d4eb6f9435c0be177dda9c861d9387913e8220eb7e27067ce93cbd891f221efcdc62c11e61f0b9284b055
         | 
| 7 | 
            +
              data.tar.gz: 84bec17cb6e83978bd5241c116668ade6e4b2cf25595bdd44f10267c8274f42eaec00ec9719ecec2020cc1d927c13d55c437de89f4b5a8c387ed1ee1083b3797
         | 
    
        data/lib/ffi-libarchive.rb
    CHANGED
    
    
| @@ -97,9 +97,16 @@ module Archive | |
| 97 97 | 
             
                  raise
         | 
| 98 98 | 
             
                end
         | 
| 99 99 |  | 
| 100 | 
            -
                def extract(entry, flags = 0)
         | 
| 100 | 
            +
                def extract(entry, flags = 0, destination: nil)
         | 
| 101 101 | 
             
                  raise ArgumentError, "Expected Archive::Entry as first argument" unless entry.is_a? Entry
         | 
| 102 102 | 
             
                  raise ArgumentError, "Expected Integer as second argument" unless flags.is_a? Integer
         | 
| 103 | 
            +
                  raise ArgumentError, "Expected String as destination" if destination && !destination.is_a?(String)
         | 
| 104 | 
            +
             | 
| 105 | 
            +
                  if destination
         | 
| 106 | 
            +
                    # We update the pathname here so this will change for the caller as a side effect, but this seems convenient and accurate?
         | 
| 107 | 
            +
                    pathname = C.archive_entry_pathname(entry.entry)
         | 
| 108 | 
            +
                    C.archive_entry_set_pathname(entry.entry, "#{destination}/#{pathname}")
         | 
| 109 | 
            +
                  end
         | 
| 103 110 |  | 
| 104 111 | 
             
                  flags |= EXTRACT_FFLAGS
         | 
| 105 112 | 
             
                  raise Error, @archive if C.archive_read_extract(archive, entry.entry, flags) != C::OK
         | 
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: ffi-libarchive
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 1.0. | 
| 4 | 
            +
              version: 1.0.17
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - John Bellone
         | 
| @@ -10,7 +10,7 @@ authors: | |
| 10 10 | 
             
            autorequire: 
         | 
| 11 11 | 
             
            bindir: bin
         | 
| 12 12 | 
             
            cert_chain: []
         | 
| 13 | 
            -
            date:  | 
| 13 | 
            +
            date: 2021-02-10 00:00:00.000000000 Z
         | 
| 14 14 | 
             
            dependencies:
         | 
| 15 15 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 16 16 | 
             
              name: ffi
         | 
| @@ -76,7 +76,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement | |
| 76 76 | 
             
                - !ruby/object:Gem::Version
         | 
| 77 77 | 
             
                  version: '0'
         | 
| 78 78 | 
             
            requirements: []
         | 
| 79 | 
            -
            rubygems_version: 3. | 
| 79 | 
            +
            rubygems_version: 3.1.4
         | 
| 80 80 | 
             
            signing_key: 
         | 
| 81 81 | 
             
            specification_version: 4
         | 
| 82 82 | 
             
            summary: A Ruby FFI binding to libarchive.
         |