[Capistrano] Re: -s magic not appearing to work

2007-04-14 Thread Wayne E. Seguin
Nic, What I do is something like this: task :log do run tail -n #{lines || 100} #{deploy_to}/#{shared_dir}/log/ #{rails_env || ENV[RAILS_ENV] || production}.log do |ch, stream, out| puts out end end Not only does it work great with the -s option, it has the benefit of being much

[Capistrano] Re: -s magic not appearing to work

2007-04-14 Thread Wayne E. Seguin
Oh and you can also shorten the code more using 'shared_path': run tail -n #{lines || 100} #{shared_path}/log/... ~Wayne --~--~-~--~~~---~--~~ To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at

[Capistrano] Re: -s magic not appearing to work

2007-04-11 Thread Nic Williams
That's the odd part, the lines = lines || 100 doesn't seem to work either. task :log do lines = lines || 100 rails_env = rails_env || 'production' # lines = configuration.variables[:lines] || 100 # rails_env = configuration.variables[:rails_env] || 'production' env =

[Capistrano] Re: -s magic not appearing to work

2007-04-11 Thread Jamis Buck
On Apr 11, 2007, at 5:06 AM, Nic Williams wrote: That's the odd part, the lines = lines || 100 doesn't seem to work either. Right, it won't, because it is semantically identical to lines ||= 100. BUT, lines = lines || foobar || 100 works if I pass -s foobar=10, so lines might be a