Top Level Namespace

Defined Under Namespace

Modules: Kibana

Instance Method Summary collapse

Instance Method Details

#unzip_file(file, destination) ⇒ Object



46
47
48
49
50
51
52
53
54
# File 'lib/tasks/update.rb', line 46

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