Created
July 16, 2009 17:17
-
-
Save coderberry/148541 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| #!/usr/bin/env ruby | |
| require "rubygems" | |
| require "integrity" | |
| # If you want to add any notifiers, install the gems and then require them here | |
| # For example, to enable the Email notifier: install the gem (from github: | |
| # | |
| # sudo gem install -s http://gems.github.com foca-integrity-email | |
| # | |
| # And then uncomment the following line: | |
| # | |
| # require "notifier/email" | |
| # Load configuration and initialize Integrity | |
| Integrity.new(File.dirname(__FILE__) + "/config.yml") | |
| # You probably don't want to edit anything below | |
| Integrity::App.set :environment, ENV["RACK_ENV"] || :production | |
| Integrity::App.set :port, 8910 | |
| Integrity::Notifier::Base.class_eval { | |
| def self.notify_of_build(build, config) | |
| begin | |
| Integrity.log "Notifying of build #{build.commit.short_identifier} using the #{to_s} notifier" | |
| Timeout.timeout(8) { new(build.commit, config).deliver! } | |
| rescue Timeout::Error | |
| Integrity.log "#{to_s} notifier timed out" | |
| false | |
| end | |
| end | |
| } | |
| run Integrity::App |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment