This post originated from an RSS feed registered with Ruby Buzz
by James Britt.
Original Post: Rake Task Cook Book
Feed Title: James Britt: Ruby Development
Feed URL: http://feeds.feedburner.com/JamesBritt-Home
Feed Description: James Britt: Playing with better toys
I recently found myself following a development pattern:
Do something over and over
Get tired of doing something over and over
Write hacky batch file or Ruby script to do something over and over
Decide to share this with others
Realize that my hacky script is too quirky/context-dependent to work well for others without massive explanation
Re-write hacky script as a Rake task
Move on to Real Work, eventually to discover that I’m doing something over and over.
Now I try to short-circuit the process and go straight to a Rake task.
Yesterday I wanted to add numerous tickets to a Trac project. I was going through some code, and running down a list of requests, and wanted a simple way to add tickets to Trac from the command line. Trac is Web-based, and new tickets are posted through a form, so, if nothing else, one should be able to use Net::HTTP.
I thought to ask on ruby-talk if anyone had, or knew of, any Rake tasks for Trac, and mentioned in passing that a quick Google did not turn up any Rake task cookbook site.
But that was then; Jim Weirich (Rake's creator) thought this a good idea, and created this very thing: The Rake Task Cookbook.
So, go dig up those handy, clever Rake tasks you've been hoarding and post them up on the task cookbook.