Recently I reported a bug for Formtastic. Justin French, the author of Formtastic, created a branch and made a fix. He then asked me for my feedback.
I look at the code and then decided to give it a try. In a pre-Bundler world that would have required this:
- Find a directory to play with this.
- Clone the Formtastic repository with Git from http://github.com/justinfrench/formtastic.git
- Create a local branch tracking the remote branch with the fix, GH-264. This is something I don’t do often enough with Git and every time I have to look it up.
- Figure out how to build a gem out of it. Is it rake? is it rake build? is it rake gem? This might also fail and need fixing some stuff.
- Install said gem, which is not that trivial. Should I install as my user or as root? Should I remove the currently installed version of the gem? If the branch didn’t have an increase in version number it could be problematic.
- Test my application. Make sure it’s picking up the new gem.
- Uninstall the gem, maybe re-install the stock gem.
- Delete the temporary directories I’ve created to hold the cloned repository (this is something I always forget to do and a month later I’m wondering: what’s this? is there any important changes I’ve did in this repo?).
The tasks are not that big, but are very inconvenient to do and uncomfortable for a perfectionist like me. Thankfully I’m using Bundler, so the above was like this:
- Add :git => "http://github.com/justinfrench/formtastic.git", :branch => "GH-264" to the Formtastic line in Gemfile.
- Run bundle install.
- Test app.
- Revert the Gemfile change.
- Run bundle install.
I really love Bundler.
Leave a Reply