Module: YAVDB::Utils::Zip
- Defined in:
- lib/yavdb/utils/zip.rb
Class Method Summary collapse
Class Method Details
.get_contents(zip_url, with_cache = true, group_cache_key = 'zip') ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/yavdb/utils/zip.rb', line 27 def self.get_contents(zip_url, with_cache = true, group_cache_key = 'zip') puts "Requesting #{zip_url}" if Constants::DEBUG if with_cache YAVDB::Utils::Cache.cache_path(group_cache_key, zip_url) do |zip_path| do_request(zip_path, zip_url) zip_path end else zip_path = Dir.mktmpdir(group_cache_key) do_request(zip_path, zip_url) zip_path end end |