Can rake tasks take paramaters?


#1

Can rake tasks take paramaters?

Thanks

Tim


#2

Yes,

task :my_task do
puts ENV[‘MESSAGE’]
end

rake my_task MESSAGE=Testing

-Shawn


#3

Ahhh brilliant

Thanks shawn

Tim

Shawn Roske wrote:

Yes,

task :my_task do
puts ENV[‘MESSAGE’]
end

rake my_task MESSAGE=Testing

-Shawn


#4

Shawn Roske wrote:

task :my_task do
puts ENV[‘MESSAGE’]
end

rake my_task MESSAGE=Testing

One might even shortcut that, for svn commits:

task :ci => [:test] do
system(“svn ci -m=#{ENV[‘m’]}”)
end

rake ci m=‘what we did’


Phlip
http://c2.com/cgi/wiki?ZeekLand <-- NOT a blog!!