Can rake tasks take paramaters?
Thanks
Tim
Can rake tasks take paramaters?
Thanks
Tim
Yes,
task :my_task do
puts ENV[‘MESSAGE’]
end
rake my_task MESSAGE=Testing
-Shawn
Ahhh brilliant
Thanks shawn
Tim
Shawn Roske wrote:
Yes,
task :my_task do
puts ENV[‘MESSAGE’]
endrake my_task MESSAGE=Testing
-Shawn
Shawn Roske wrote:
task :my_task do
puts ENV[‘MESSAGE’]
endrake 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!!
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs