annotate_models rake task? Dave Thomas wrote it many years ago and it corrects one of the flaws in ActiveRecord: it describes the schema for a table as a comment inside the Ruby model file that it maps to. Unfortunately Dave hasn’t had time to maintain it, so a couple of years ago I cleaned up some bugs and re-published it as a pastie. Then Cuong Tran made it a gem and put it on Github, and since then, there’s been a whole lotta forkin’ goin’ on!
I recently pulled in a bunch of the forks into ctran’s master branch, and just pushed it to Gemcutter as version 2.4.0. Just run
gem sources and make sure http://gemcutter.org is in your list — otherwise do
gem source -a http://gemcutter.org — and
sudo gem install annotate and it’ll install a binary called
/usr/bin. See the README on github for more info and have fun!
One caveat: ImageMagick installs a tool called
annotate too (if you’re using MacPorts it’s in
/opt/local/bin/annotate). So if you see
Usage: annotate imagein.jpg imageout.jpg
/usr/bin ahead on the path and you’ll get ours instead.
About the AuthorMore Content by Alex Chaffee