Created
May 31, 2009 18:06
-
-
Save sr3d/120970 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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