Skip to content

Instantly share code, notes, and snippets.

@ryanza
Created May 6, 2010 14:13
Show Gist options
  • Save ryanza/392166 to your computer and use it in GitHub Desktop.
Save ryanza/392166 to your computer and use it in GitHub Desktop.
%p.normal
%label{ :for => "statusboard_url" } Statusboard URL
%input.text#statusboard_url{ :name => "notifiers[Statusboard][url]", :type => "text", :value => config["url"] }
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