lib/capistrano_extensions/files/local.rb in joekhoobyar-capistrano-extensions-0.0.0 vs lib/capistrano_extensions/files/local.rb in joekhoobyar-capistrano-extensions-0.0.1
- old
+ new
@@ -3,14 +3,13 @@
module CapistranoExtensions
module Files
module Local
def tail_f(file, n=10)
- unless defined? File::Tail::Logfile
- gem 'file-tail'
- require 'file/tail'
- end
+ unless defined? File::Tail::Logfile then gem 'file-tail'; require 'file/tail' end
File::Tail::Logfile.tail(file, :backward=>n) do |line| puts line end
+ rescue Interrupt
+ logger.trace "interrupted (Ctrl-C)" if logger
end
def upload(from, to)
cp(from, to)
end