Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dbgrandi/383350 to your computer and use it in GitHub Desktop.
Save dbgrandi/383350 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
#
# Speak into the fire.
#
require 'rubygems' rescue nil
require 'broach'
require 'yaml'
@conf = YAML.load(File.read(File.expand_path("~/.housefire")))
@conf['ssl'] ||= false
Broach.settings = {
'account' => @conf['account'],
'token' => @conf['token'],
'use_ssl' => @conf['ssl'],
}
if(ARGV.count == 2)
@room_name = ARGV[0]
@message = ARGV[1]
else
@room_name = @conf['room']
@message = ARGV[0]
end
@room = Broach::Room.find_by_name(@room_name)
@room.speak(@message)
# Add this to line 86 on git-achievements
# ruby basecamp.rb "`git config user.name`" "$@" "$2"
# then create a file called basecamp.rb with the rest of this file in it
#!/usr/bin/env ruby
require 'rubygems' rescue nil
require 'broach'
@username = ARGV[0]
@achievement = ARGV[1]
@description = ARGV[2]
@roomname = "room"
# Add your Basecamp username and your API token here
Broach.settings = {
'account' => '',
'token' => '',
'use_ssl' => true
}
Broach.speak(@roomname, @username + " achieved " + @achievement + " because they " + @description)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment