Meet Marshmallow, the campfire Bot
Courtenay : April 14th, 2006
With financial sponsorship by "CollectiveX":http://collectivex.com, I'm proud to announce the release of Marshmallow.
script/plugin install svn://collectivex.net/plugins/marshmallow
Please view the README for instructions. I except this won't work for many of you because it was kinda hacked out of our codebase.
bot = Marshmallow.new(:domain => 'yoursubdomain')
bot.login( :url => 'u2Dsa' )
bot.say("ponies!!")
bot.paste("your code\n here")
Once the bot is connected, you can keep using say or paste. You may like to wrap it all in a fork { } so it doesn't slow down your app while connecting.
h2. adding deploy notifications
Here are some pseudo-patches for y'all:
Edit your capistrano deploy.rb and change these lines:
task :after_Deploy ....
+ snitch_campfire
end
task :snitch_campfire
bot = Marshmallow.new(:domain => 'yourdomain')
bot.login( :url => 'WDs3S' )
bot.say("DEPLOY NOTICE: #{ENV['USER']} deployed rev #{revision} to #{ENV['DEPLOY_TYPE']}")
end
h2. add a post-commit hook
Add this to your subversion repo's post-commit file
#!/usr/bin/env ruby
require '/path/to/marshmallow'
svnlook = "/usr/local/bin/svnlook"
bot = Marshmallow.new(:domain => 'yourdomain')
bot.login( :url => 'AsDf4' )
if ARGV.size > 1
revision = ARGV[1]
path = ARGV[0]
author = `#{svnlook} author -r #{revision} #{path}`
paths = `#{svnlook} changed -r #{revision} #{path}`
log = `#{svnlook} log -r #{revision} #{path}`
message = [log,paths].join.strip
url = "Changeset \##{revision} by #{author} (http://www.your.scm.tracker.url/repository/changesets/#{revision})"
bot.say(url)
bot.say(message, true)
else
bot.say(ARGV[0])
end
We're welcoming contributions, so please send 'em our way!!
5 Responses to “Meet Marshmallow, the campfire Bot”
Sorry, comments are closed for this article.
April 16th, 2006 at 10:41 AM Nifty!, although I'm not able to get it working via Capistrano. Works fine via ./script/console, but the deploy task (copied from your example) bails with.... * executing task after_deploy * executing task snitch_campfire rake aborted! uninitialized constant Capistrano::Configuration::Marshmallow I'm certainly missing a require or include somewhere.
April 16th, 2006 at 12:55 PM yeah, you gotta require the file with a relative path, and also, probably remove the Reloadable include from marshmallow.
May 17th, 2007 at 01:37 AM
Nice
May 17th, 2007 at 03:58 AM
Nice!
May 17th, 2007 at 08:19 AM
interesting