Skip to content

Instantly share code, notes, and snippets.

@terrbear
Created February 23, 2011 17:56
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save terrbear/840822 to your computer and use it in GitHub Desktop.
Save terrbear/840822 to your computer and use it in GitHub Desktop.
saves the deploy output up to the deployed location
alias :pputs :puts
def puts(str = "")
pputs(str)
$out << "#{str}"
end
STDOUT.instance_eval do
alias :pputs :puts
def puts(str = "")
pputs(str)
$out << "#{str}"
end
end
$stderr.instance_eval do
alias :pputs :puts
def puts(str = "")
pputs(str)
$out << "#{str}"
end
end
task :write_deploy_log, :roles => :app, :except => {:no_release => true} do
put $out, "#{deploy_to}/current/deploy.log", :mode => 0644
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment