Hi, With so many good plugins around at the moment, I''d perhaps like to require some of these in one of my own rather than try to re-write their functionality. Is there a mechanism available for making a plugin dependent on another plugin(s)? Cheers Dan -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060803/80c90210/attachment.html
There are two different types of dependency. Controlling the load order is currently impossible without resorting to some send()-based trickery (or the patch here - http://dev.rubyonrails.org/ticket/5468, or using init_engine.rb and the engines plugin''s Engines.start method). However, I''m guessing that you might be looking for a more general form of dependency, i.e. "for plugin X to operate, plugin Y needs to be installed". There are a couple of ways around that at the moment, which aren''t too ardous. 1. If you''re the developer behind Plugin X, you can include a hook in install.rb which ensures that Plugin Y is also installed if it isn''t already: (from login engine''s install.rb) # Install the engines plugin if it has been already unless File.exist?(File.dirname(__FILE__) + "/../engines") Commands::Plugin.parse!([''install'', ''http://svn.rails-engines.org/plugins/engines'']) end 2. If you''re *not* the developer of Plugin X, try using Plugin Packs (http://www.lukeredpath.co.uk/index.php/2006/07/28/rails-plugin-packs-coming-to-rapt/), a neat way to install collections of plugins in one go. We''ve got some ideas in development at the moment which will make this even simpler, in the future. If you want to be able to use some of the functionality from Plugin Y while Plugin X is loading (i.e. in init.rb), then you''ll need some of the cunning at the top of this email. Some people have mooted using gems to install and load plugins, which might give you *all* of this functionality in the future. I''m not crazy about this idea, but we''ll see what happens. - james On 8/3/06, Daniel N <has.sox@gmail.com> wrote:> Hi, > > With so many good plugins around at the moment, I''d perhaps like to require > some of these in one of my own rather than try to re-write their > functionality. > > Is there a mechanism available for making a plugin dependent on another > plugin(s)? > > Cheers > > Dan > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >-- * J * ~
On 8/4/06, James Adam <james.adam@gmail.com> wrote:> > There are two different types of dependency. Controlling the load > order is currently impossible without resorting to some send()-based > trickery (or the patch here - http://dev.rubyonrails.org/ticket/5468, > or using init_engine.rb and the engines plugin''s Engines.start > method). > > However, I''m guessing that you might be looking for a more general > form of dependency, i.e. "for plugin X to operate, plugin Y needs to > be installed". There are a couple of ways around that at the moment, > which aren''t too ardous. > > 1. If you''re the developer behind Plugin X, you can include a hook in > install.rb which ensures that Plugin Y is also installed if it isn''t > already: > > (from login engine''s install.rb) > # Install the engines plugin if it has been already > unless File.exist?(File.dirname(__FILE__) + "/../engines") > Commands::Plugin.parse!([''install'', > ''http://svn.rails-engines.org/plugins/engines'']) > end > > 2. If you''re *not* the developer of Plugin X, try using Plugin Packs > ( > http://www.lukeredpath.co.uk/index.php/2006/07/28/rails-plugin-packs-coming-to-rapt/ > ), > a neat way to install collections of plugins in one go. We''ve got some > ideas in development at the moment which will make this even simpler, > in the future. > > If you want to be able to use some of the functionality from Plugin Y > while Plugin X is loading (i.e. in init.rb), then you''ll need some of > the cunning at the top of this email. Some people have mooted using > gems to install and load plugins, which might give you *all* of this > functionality in the future. I''m not crazy about this idea, but we''ll > see what happens. > > - james > > On 8/3/06, Daniel N <has.sox@gmail.com> wrote: > > Hi, > > > > With so many good plugins around at the moment, I''d perhaps like to > require > > some of these in one of my own rather than try to re-write their > > functionality. > > > > Is there a mechanism available for making a plugin dependent on another > > plugin(s)? > > > > Cheers > > > > Dan > > > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > > -- > * J * > ~ > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >Thanx for the heads up James. I''ll certainly keep an eye on progress on Rapt. I''ve had a quick look at Rapt a while ago but couldn''t get it to work. (I''m on winXP) Thanx again -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060803/2398c6ae/attachment.html
Apparently Analagous Threads
- controllers, models and views in plugins
- Login_Engine: trouble configuring
- Login generator errors.
- Rails Plugins: How to copy artefacts to the public directory during install? When is install.rb executed anyway?
- is there a way to not repeat installing plugins?