-
-
Save failshell/71de09d6b7723acdb1c1 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
require 'yaml' | |
require 'hipchat' | |
module Robut::API | |
def initialize | |
@config = YAML.load_file('hal9000.yml') | |
@token = @config['hipchat_token'] | |
@room = @config['hipchat_room_id'] | |
@client = HipChat::Client.new(@token, :api_version => 'v2') | |
end | |
def info(msg) | |
@client[@room].send('HAL 9000', msg, :color => 'green', :notify => true) | |
end | |
def warning(msg) | |
@client[@room].send('HAL 9000', msg, :color => 'yellow', :notify => true) | |
end | |
def error(msg) | |
@client[@room].send('HAL 9000', msg, :color => 'red', :notify => true) | |
end | |
end |
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
class Robut::Plugin::WorkFlow | |
include Robut::API | |
include Robut::Plugin | |
desc 'Terraform workflow' | |
def usage | |
'migrate stack source destination' | |
end | |
def handle(time, sender_nick, message) | |
if message =~ /^migrate/ | |
info('info') | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment