rake task with arguments – Ruby Forum

Of course csh is evil! That’s nothing new.
http://ooblick.com/text/CshProgrammingConsideredHarmful.html

This works just fine with bash:

rab://tmp $ cat Rakefile
namespace :foo do
   desc 'lol'
   task :bar, :num do |t, args|
     puts "num = #{args.num}"
   end
end
rab://tmp $ rake foo:bar[123]
(in /private/tmp)
num = 123

Hey look. Arguments in Rake. I’ve been looking for this for a while now. No more using env variables.

Advertisements

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