Created
May 6, 2010 14:13
-
-
Save ryanza/392166 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
%p.normal | |
%label{ :for => "statusboard_url" } Statusboard URL | |
%input.text#statusboard_url{ :name => "notifiers[Statusboard][url]", :type => "text", :value => config["url"] } |
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
begin | |
require "httparty" | |
rescue LoadError | |
abort "Install Httparty to use the Statusboard notifier" | |
end | |
module Integrity | |
class Notifier | |
class Statusboard < Notifier::Base | |
attr_reader :config | |
def self.to_haml | |
@haml ||= File.read(File.dirname(__FILE__) + "/statusboard.haml") | |
end | |
def deliver! | |
HTTParty.get(config["url"] + build_status) | |
end | |
private | |
def build_status | |
build.failed? ? "failed" : "passed" | |
end | |
end | |
register Statusboard | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment