Mailinglist Archive: yast-devel (36 mails)

< Previous Next >
Re: [yast-devel] Yast webservice - sharing .rake files
  • From: Ladislav Slezak <lslezak@xxxxxxx>
  • Date: Fri, 29 May 2009 14:42:40 +0200
  • Message-id: <4A1FD840.5080003@xxxxxxx>
Stefan Schubert wrote:
I think it is an good idea. But before we are splitting the rakefiles we
check if there is an "overloading mechanism" available. E.G. "rake package".
Is it
possible to overload the "rake package" call defined in webservice by a "rake
package" call defined in the plugin ?

I have improved the task loader, in the simple case (no need to redefine a task)
just add

require 'tasks/webservice'

to the Rakefile.

If you need to redefine a task then it must be explicitly excluded in the
code so it is defined just once. There is an extra helper class to do this, use
this instead of the above code:

require 'tasks/webservice_tasks'
WebserviceTasks.loadTasks(:exclude => ["package.rake"])

This example loads all tasks except :package task which can be defined later.
(This code is used in rubygem-yast2-webservice-tasks package itself, it's a gem
package which is packaged in a different way.)

See rest-service/webservice-tasks/README for more details (it also supports


Best Regards

Ladislav Slez√°k
Yast Developer
SUSE LINUX, s.r.o. e-mail: lslezak@xxxxxxx
Lihovarsk√° 1060/12 tel: +420 284 028 960
190 00 Prague 9 fax: +420 284 028 951
Czech Republic
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-devel+help@xxxxxxxxxxxx

< Previous Next >