Sha256: 7078fac0129add7ded73ef2b44a8f9705b0cb068279f6f5f8a229e644c6e836d

Contents?: true

Size: 374 Bytes

Versions: 6

Compression:

Stored size: 374 Bytes

Contents

require 'rubygems'
require 'zip'

class TerraspaceBundler::Extract
  class Zip
    def self.extract(file, dest)
      ::Zip::File.open(file) { |zip_file|
        zip_file.each { |f|
          f_path=File.join(dest, f.name)
          FileUtils.mkdir_p(File.dirname(f_path))
          zip_file.extract(f, f_path) unless File.exist?(f_path)
        }
      }
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
terraspace-bundler-0.5.0 lib/terraspace_bundler/extract/zip.rb
terraspace-bundler-0.4.4 lib/terraspace_bundler/extract/zip.rb
terraspace-bundler-0.4.3 lib/terraspace_bundler/extract/zip.rb
terraspace-bundler-0.4.2 lib/terraspace_bundler/extract/zip.rb
terraspace-bundler-0.4.1 lib/terraspace_bundler/extract/zip.rb
terraspace-bundler-0.4.0 lib/terraspace_bundler/extract/zip.rb