lib/capsaicin/files/remote.rb in joekhoobyar-capsaicin-0.1.4 vs lib/capsaicin/files/remote.rb in joekhoobyar-capsaicin-0.1.5

- old
+ new

@@ -71,10 +71,19 @@ cp(*args) else @config.download(*args) end end + + def put(from, to) + case _via + when :system, :local_run + FileUtils::Verbose.copy_stream StringIO.new(from), to + else + @config.put(*args) + end + end def cd(dir, options={}) if block_given? dir, dir2 = pwd, dir _r 'cd', dir2 @@ -99,9 +108,25 @@ def tar_cj(dest, src, options={}, &filter) filter and abort "tar_cj: remote mode does not support a filtering proc" _r 'tar -cjf', Array(src).unshift(dest) end + + def tar_t(src, options={}, &filter) + filter and abort "tar_t: remote mode does not support a filtering proc" + _t 'tar -tf', [src] + end + + def tar_tz(src, options={}, &filter) + filter and abort "tar_tz: remote mode does not support a filtering proc" + _t 'tar -tzf', [src] + end + + def tar_tj(src, options={}, &filter) + filter and abort "tar_tj: remote mode does not support a filtering proc" + _t 'tar -tjf', [src] + end + private def _t(cmd, args=nil, min=nil) cmd = _a cmd, args, min