has_many :questions

August 7, 2008

rake -T

Filed under: Ruby — gavinstark @ 8:44 am

Giles Bowkett recently posted an alias for rake. It runs rake -T and sends the output through grep. I’ve been doing this for a while even though rake -T takes a parameter. The reason being:

There is a subtle difference between rake -T xxxx and rake -T | grep xxxx

The former only search the NAME of the rake task while the latter searches all the text, including the textual description (the text is fixed to 80 characters regardless of my terminal width) Perhaps I will submit a patch for rake.

$ rake -T | grep -i recreate
rake db:mysql:recreate # Rebuild t…
rake db:test:clone # Recreate
rake db:test:clone_structure # Recreate

$ rake -T recreate
rake db:mysql:recreate # Rebuild the MySQL test databases

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

The Rubric Theme. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: