ctran / annotate_models

Annotate Rails classes with schema and routes info
Other
4.38k stars 597 forks source link

"annotate" => bin-clash #7

Closed grimen closed 12 years ago

grimen commented 14 years ago

annotate is a system command used in gdlib2

ctran commented 14 years ago

That's not good but I don't know what I can do about that. Any suggestion?

grimen commented 14 years ago

hah, maybe have an additional bin that do the same thing, named "annote-rails" or something like that. That's what I did before, just don't forget adding the new bin command to the Gem spec - I forgot that plenty of times in vain. =)

masa-iwasaki commented 14 years ago

I solved this issue on my fork.

http://github.com/masa-iwasaki/annotate_models/commit/27a0fe964e306a83a61aca886d505bea5150cb6c

ctran commented 14 years ago

What I'll do is to create 2 executables, "annotate" and "annotate-rails". People with the gdlib2 will use annotate-rails while others can still use annotate.

ari commented 14 years ago

How about making this gem work as a rake command rather than a system binary? Then you can have

rake annotate:all rake annotate:routes etc

LRDesign commented 14 years ago

+1 to ari's suggestion. This should create a rake task rather than make a binary. Or, if you want maximum flexibility, have it do both so that those of us with gdlib or ImageMagick installed can still run annotate without messing with $PATH.

pupeno commented 14 years ago

+1 for making it a rake task! If you do it, can you please follow thinking sphinx style so that it's easy to use it as a gem: http://github.com/freelancing-god/thinking-sphinx/blob/master/tasks/rails.rake