Sha256: c792b1c5ecef5d273473a2ea7ff68e42bfa618bab1bba8300ca7e04b1635f850
Contents?: true
Size: 668 Bytes
Versions: 1
Compression:
Stored size: 668 Bytes
Contents
unless defined? $__rq_backer__ module RQ #{{{ LIBDIR = File::dirname(File::expand_path(__FILE__)) + File::SEPARATOR unless defined? LIBDIR require LIBDIR + 'mainhelper' class Backer < MainHelper #{{{ def backup #{{{ set_q bak = @argv.shift bak ||= "#{ File::basename(@qpath) }.#{ Util::timestamp.gsub(/[:\s\.-]/,'_') }.bak" raise "<#{ bak }> exists" if bak and test(?e, bak) debug{ "bak <#{ bak }>" } @q.lock{ FileUtils::cp_r @qpath, bak } info{ "created backup <#{ bak }>" } #}}} end #}}} end # class Backer #}}} end # module RQ $__rq_backer__ = __FILE__ end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rq-0.1.7 | lib/rq-0.1.7/backer.rb |