justinweiss/robut — pull request #29 by ejholmes (2013-04-30 05:44:34+00:00)
Title: HTTP handler

This adds support for receiving events (heroku deploy hooks, GitHub post receive hooks, etc.) and outputting messages to all rooms.

**Example**

```ruby
# config.ru

require 'rubygems'
require 'bundler/setup'
Bundler.require :default

require 'robut'
require 'ostruct'
require 'logger'

load ARGV[0] || './Chatfile'

Robut::Web.set :connection, Robut::Connection.new.connect

run Robut::Web
```

```ruby
# lib/robut/plugin/heroku.rb

class Robut::Plugin::Heroku
include Robut::Plugin

http do
post '/_heroku' do
payload = Hashie::Mash.new(params)
say "#{payload.user} deployed #{payload.head} to #{payload.app}", nil
halt 200
end
end
end
```