Use Ruby Objects to Keep Your Rake Tasks Clean
In this article, I talk about how to keep ancillary pieces of your infrastructure fairly clean and minimalist. In terms of Rails, one place I’ve seen where it’s easy to end up with “bags of code” that aren’t really structured or straightforward to test are Rake tasks. Let’s look at a Rake task I recently refactored on a client project. In the spirit of DHH’s On Writing Software Well series, I’ll be demonstrating by looking at live production code.
Post a comment