ruby - Default task for namespace in Rake -


Something like this has been given:

  namespace: my_tasks do the job: foo do Do some tasks: Do the bar do_something_else Finish: all = & gt; [: Foo,: bar] end  

How do I make : all the default task, so that rake my_tasks is running Call (instead of calling rake my_tasks: all )?

Put it outside the named location like this:

  Namespace: My_tasks work: foo do dos Finish a few tasks: Do not do do_something_else termination tasks: all = & gt; Apart from this, if your tasks require a logic:  
  namespace: ["My_tasks: foo", "my_tasks: bar"]  

: My_tasks work: Foo ,: arg1 ,: arg2 do | T, args | Do_something End Function: Bar ,: arg1,: arg2 do | T, args | Do_something_else end-end work: my_tasks ,: arg1 ,: arg2 do | T, args | Rack :: Task ["my_tasks: foo"]. Call (args.arg1, args.arg2) Reiki :: Task ["my_tasks: bar"]. Call (args.arg1, args.arg2) termination

Note that in the second example, you can call the name of namespace, i.e. 'my_tasks'


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -