Sha256: 2788a319d957d41ba4c287c2f4765caf804bc58b623cc628ac086ee10141eaa5

Contents?: true

Size: 330 Bytes

Versions: 16

Compression:

Stored size: 330 Bytes

Contents

module Excavate
  module Extractors
    class GzipExtractor < Extractor
      def extract(target)
        Zlib::GzipReader.open(@archive) do |gz|
          basename = File.basename(@archive, ".*")
          path = File.join(target, basename)
          File.write(path, gz.read, mode: "wb")
        end
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
excavate-0.3.7 lib/excavate/extractors/gzip_extractor.rb
excavate-0.3.6 lib/excavate/extractors/gzip_extractor.rb
excavate-0.3.5 lib/excavate/extractors/gzip_extractor.rb
excavate-0.3.4 lib/excavate/extractors/gzip_extractor.rb
excavate-0.3.3 lib/excavate/extractors/gzip_extractor.rb
excavate-0.3.2 lib/excavate/extractors/gzip_extractor.rb
excavate-0.3.1 lib/excavate/extractors/gzip_extractor.rb
excavate-0.3.0 lib/excavate/extractors/gzip_extractor.rb
excavate-0.2.5 lib/excavate/extractors/gzip_extractor.rb
excavate-0.2.4 lib/excavate/extractors/gzip_extractor.rb
excavate-0.2.3 lib/excavate/extractors/gzip_extractor.rb
excavate-0.2.2 lib/excavate/extractors/gzip_extractor.rb
excavate-0.2.1 lib/excavate/extractors/gzip_extractor.rb
excavate-0.2.0 lib/excavate/extractors/gzip_extractor.rb
excavate-0.1.1 lib/excavate/extractors/gzip_extractor.rb
excavate-0.1.0 lib/excavate/extractors/gzip_extractor.rb