in lib/gdk/package_helper.rb [120:140]
def extract_package(destination_path)
destination_path.mkpath
Dir.mktmpdir do |tmp_dir|
tmp_download_path = Pathname.new(tmp_dir)
File.open(package_path, 'rb') do |file|
Zlib::GzipReader.wrap(file) do |gzip|
Gem::Package::TarReader.new(gzip) do |tar|
tar.each do |entry|
extract_entry(entry, tmp_download_path)
end
end
end
end
copy_entries(tmp_download_path, destination_path)
GDK::Output.success("Package extracted successfully to #{destination_path}")
end
end