Class: FPM::Fry::Source::Archive::PlainCache

Inherits:
Cache
  • Object
show all
Defined in:
lib/fpm/fry/source/archive.rb

Instance Attribute Summary

Attributes inherited from Cache

#package, #tempdir

Instance Method Summary collapse

Methods inherited from Cache

#cachekey

Instance Method Details

#copy_to(dst) ⇒ Object



255
256
257
258
# File 'lib/fpm/fry/source/archive.rb', line 255

def copy_to(dst)
  update!
  FileUtils.cp( tempfile, dst )
end

#prefixObject



260
261
262
# File 'lib/fpm/fry/source/archive.rb', line 260

def prefix
  ""
end

#tar_ioObject



249
250
251
252
253
# File 'lib/fpm/fry/source/archive.rb', line 249

def tar_io
  update!
  dir = File.dirname(tempfile)
  Exec::popen('tar','-c',::File.basename(tempfile), logger: logger, chdir: dir)
end