class BundleDepot::PackingDecorator
Public Instance Methods
cached?(file)
click to toggle source
Calls superclass method
# File lib/bundle_depot/cache.rb, line 93 def cached?(file) super(packed_file(file)) end
fetch(file, dest_dir)
click to toggle source
Calls superclass method
# File lib/bundle_depot/cache.rb, line 113 def fetch(file, dest_dir) source = packed_file(file) target = File.join(dest_dir, source) super(source, dest_dir) puts "=> Unpacking #{target}" `tar -C #{dest_dir} -xf #{target}` raise ArchivingFailed unless $?.exitstatus == 0 end
packed_file(file)
click to toggle source
# File lib/bundle_depot/cache.rb, line 124 def packed_file(file) file + ".tar.gz" end
store(file)
click to toggle source
Calls superclass method
# File lib/bundle_depot/cache.rb, line 97 def store(file) working_dir = File.expand_path(File.dirname(file)) source = File.basename(file) target = packed_file(file) raise BundleNotFound unless File.exists? file unless File.exist?(target) puts "=> Packing bundle" `tar -C #{working_dir} -czf #{target} #{source}` raise ArchivingFailed unless $?.exitstatus == 0 end super(target) end