Skip to content

Instantly share code, notes, and snippets.

@sr3d
Created May 31, 2009 18:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sr3d/120970 to your computer and use it in GitHub Desktop.
Save sr3d/120970 to your computer and use it in GitHub Desktop.
# This plugin is used to automatically restart the Passenger Rails
# Useful if the Rails site is hooked into CC.rb and served by Passenger
# at the same time.
class Passenger
def initialize(project = nil)
@project = project
end
def build_finished(build)
restart_passenger build
end
def build_fixed(build, previous_build)
restart_passenger build
end
private
def restart_passenger( build )
restart_file = "#{@project.local_checkout}/tmp/restart.txt"
FileUtils.touch restart_file
CruiseControl::Log.event("Passenger Restarted")
end
end
Project.plugin :passenger
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment