Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions lib/god/contacts/hipchat.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ def initialize(options)

def base_url
scheme = @options[:ssl] ? 'https' : 'http'
"#{scheme}://api.hipchat.com/v1/rooms"
host = @options[:host] || 'api.hipchat.com'
"#{scheme}://#{host}/v1/rooms"
end

def find_room_id_by_name(room_name)
Expand Down Expand Up @@ -75,7 +76,7 @@ module Contacts

class Hipchat < Contact
class << self
attr_accessor :token, :room, :ssl, :from
attr_accessor :token, :room, :ssl, :from, :host
attr_accessor :format
end

Expand All @@ -101,7 +102,8 @@ def notify(message, time, priority, category, host)
conn = Marshmallow::Connection.new(
:token => arg(:token),
:ssl => arg(:ssl),
:from => arg(:from)
:from => arg(:from),
:host => arg(:host)
)

conn.speak(arg(:room), body)
Expand Down