class Astrails::Safe::Archive
Public Instance Methods
command()
click to toggle source
# File lib/astrails/safe/archive.rb, line 5 def command "tar -cf - #{config[:options]} #{tar_exclude_files} #{tar_files}" end
extension()
click to toggle source
# File lib/astrails/safe/archive.rb, line 9 def extension; '.tar'; end
Protected Instance Methods
tar_exclude_files()
click to toggle source
# File lib/astrails/safe/archive.rb, line 13 def tar_exclude_files [*config[:exclude]].compact.map{|x| "--exclude=#{x}"}.join(" ") end
tar_files()
click to toggle source
# File lib/astrails/safe/archive.rb, line 17 def tar_files raise RuntimeError, "missing files for tar" unless config[:files] [*config[:files]].map{|s| s.strip}.join(" ") end