class DockerHouston::Hipchat::Message

Public Class Methods

new(room, text) click to toggle source
# File lib/docker_houston/hipchat/message.rb, line 4
def initialize(room, text)
  @uri = URI("http://api.hipchat.com/v1/rooms/message")
  @room = room
  @text = text
  @token = ENV['HIPCHAT_TOKEN']
end

Public Instance Methods

notify() click to toggle source
# File lib/docker_houston/hipchat/message.rb, line 11
def notify
  response = Net::HTTP.post_form(@uri, {
                                        "auth_token" => @token,
                                        "room_id" => @room,
                                        "message" => @text,
                                        "from" => "Docker Houston",
                                        "message_format" => "text"
                                    })
end