A Weblog written, styled and hacked by Joel Moss
For the last few days, I have been thinking about how me and the team around me can improve productivity and communications when developing. Currently, the system we use is a little disjointed, and utilizes several different systems and solutions. Fortunately one such solution is Basecamp, which happens to be one of the best around and has been in use by the company for a while now. So after spending a little time with the web based application, I realised that it should be able to do, or at least manage everything we do.
So last night I sat down and played with the Basecamp API, to see what could be done with it. And I came up with a post-commit hook for Subversion, that posts a message for each subversion commit. This message tells me the change log, what files were changed, and who made the commit. So now we can all see and receive Basecamp notices for every single changeset.
We have also started using Campfire, so I then had a little play with Tinder; Campfire’s unofficial API, and added some more code to the Subversion hook. So as well as creating a message in Basecamp detailing each Changeset, the same changeset is also posted in the appropriate Campfire room. So we have a real time view of our development progress.
So here is the code. It’s all in Ruby, as it was easy peasy. And it utilises the Basecamp API Wrapper.
Simply copy and paste this into a file called ‘post-commit.rb’ and save that in your subversion repository’s hooks directory. Don’t forget to set its permissions as required (chmod 755 on linux/unix). Then create another file in your hooks directory and call it ‘post-commit’ and do the same with the permissions. In the ‘post-commit’ file, paste the following code:
#!/bin/shIf ‘post-commit’ already exists, just append the last line above to the end of the file.
You will then need to install a few Ruby Gems. Namely Tinder and XML-Simple. So just run the following command:
sudo gem install tinder xml-simple --include-dependencies
And finally, you will need the Basecamp API wrapper. You can get that at http://www.basecamphq.com/api/basecamp.rb. Save that in somewhere in your Ruby path. Ideally, that would be in your ’siteruby’ directly. On my Mac, that is at ‘/usr/local/lib/ruby/siteruby/1.8/’.
And now you should be good to go. As long as you have enabled the API in your Basecamp and your settings are correct, whenever anyone makes a commit to Subversion, you will all be able to see it in Basecamp and Campfire.
I plan to do more with this, as we will need a better bug management system, as Bugzilla is just so damn ugly. But I will leave that to another post.
Enjoy!
My name is Joel Moss, a web developer and all round nice guy, living in Manchester, England. I am currently working full time for ShermansTravel.com, but I fill whatever spare time I have with lots of good and wholesome "stuff"! Like developing my own ideas; such as Tooum, contributing to the excellent CakePHP framework, and doing more work for ShermansTravel.
So this is my blog - my soap box! Here I attempt to share my likes, my dislikes, and my opinions. As well as providing some occasional respite from the daily crap we all endure. Enjoy ;)
Hey, if you want to reach me, i'm available via email:joel[at]developwithstyle[dot]com, and AIM:joelkmoss.
Making Campfire Work for Me (and More Like IRC) | Hello, I am Sean Murphy
June 21st, 2008 at 12:12 am
[...] guys at collectiveidea came up with an interesting way of writing Campfire plugins for things like post_commit VCS hooks. It’s called Tinder. [...]
Making Campfire Work for Me (and More Like IRC) | Statiksoft, LLC
June 21st, 2008 at 1:05 am
[...] guys at collectiveidea came up with an interesting way of writing Campfire plugins for things like post_commit VCS hooks. It’s called Tinder. Enjoy! ShareThis This entry was written by Sean Murphy, posted on June [...]