This post originated from an RSS feed registered with Ruby Buzz
by Robby Russell.
Original Post: the bizarre love triangle of rbot, subversion, and drb
Feed Title: Robby on Rails
Feed URL: http://www.contegix.com/rss/feed.xml
Feed Description: My reflections on programming with Ruby, Rails, PostgreSQL... and learning how to run a business...
In our pursuit to get stuff ready for the PDX.rb hackfest this weekend, Ben Bleything and I decided that it would be a cool idea to get rbot to monitor the groups subversion repositories.
We asked around a few IRC channels and people had different ways of handling this. The easy route looked to be to parse a RSS feed from Trac. (boring!)
So, in an effort to make it interesting and allow for a little creativity with rbot—and potentially open the doors to other ideas—we opted to build 2 pieces. One would be a post-commit script that would run after a svn commit and the other would be a new plugin in rbot, which started an instance of DRb.
The basic idea…
rbot starts drb on start
svn commit calls drb client, sends notifcation
Yes! I managed to sneak DRb somewhere else that it probably didn’t need to be. It was actually a good way to figure out how to properly tame the crazy lion that is DRb. It’s so sexy, but I am so afraid that it will scratch me if I get too close. It scratched a little tonight, but then the kind folks in #ruby-lang gave me a band-aid and I was on my way. Guess what? I tamed the lion!
The sad part is that I got the thing to properly work about 25 seconds after Ben logged off of IRC and here I am a few horus later amusing myself with test svn commits and telling the whole world. That’s right… he’s sleeping… and dreaming about how the lion is still out to attack him and you all know that the lion is nicely tucked away.
Thread.new{# the lion is here }
We couldn’t have the lion holding the rbot in a headlock the whole time.
So, the lion is nice and it is our new friend. We now have instant notifications of when our repositories get commits in #pdx.rb.
Once we get it to format everything nice and pretty (color-wise), we’ll make it available for all of you rbot and subversion folks.