Project

suvii

0.0
No commit activity in last 3 years
No release in over 3 years
Read from a remote tar.gz/zip archive easily
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.6
~> 5.4
>= 0
~> 1.24

Runtime

~> 1.0
 Project Readme

Suvii

Build Status Gem version

Suvii is a library that abstracts content reading from a remote tar.gz/zip archive. It fetches the archive and extracts it to a temp directory.

Name origin

"Сувій" [suʋii̯] in Ukrainian can mean a scroll, something which is rolled up or even a package.

Status

Production ready.

Documentation

Released version

Installation

Add this line to your application's Gemfile and run bundle:

gem 'suvii'

Usage

temp_directory = Suvii.fetch("https://registry.npmjs.org/coffee-script/-/coffee-script-2.0.0.tgz")
# do whatever you need with extracted content
Dir.glob("#{temp_directory}/**/*").each do |entry|
  # ...
end

Note, that fetching same URL twice will unpack to another temp directory. Such design decision was based on assumption, that generally you don't need everything in an archive, or even have to modify something. This extra copy/modify step should be totally independent from extraction, and you shouldn't worry about cleanup, or that another process could mess things up.

Origin

Extracted from Torba library since it looks more like a standalone component.