lib/kapify/base.rb in kapify-0.0.3 vs lib/kapify/base.rb in kapify-0.0.4

- old
+ new

@@ -18,9 +18,14 @@ set :user, old_user close_sessions end end + def run_interactively(command, server=nil) + server ||= find_servers_for_task(current_task).first + exec %Q(ssh #{user}@#{server.host} -p #{port} -t '#{command}') + end + set_default(:templates_path, "#{Dir.pwd}/config/deploy/templates") def template(from, to) erb = File.read(File.expand_path("#{templates_path}/#{from}", __FILE__)) put ERB.new(erb).result(binding), to