Plugins within plugins


#1

can a plugin have a vendor/plugins directory within it and have that
automatically used?

I’m wondering if I have plugin A that depends on plugin B/C if I have to
install B/C in every project that uses A or if I can just install it
within
A once and then only install A in my projects that use A.

Thanks


#2

The engines plugin won’t do anything to load a plugin containing a
vendor/plugin directory, but it should be relatively trivial to create
such a directory, and then add the plugin lib dirs to the load path
and require the necessary files within the ‘top-level’ plugin’s
init.rb

HTH,

James


#3

Rails implements locating plugins as a strategy:

http://github.com/rails/rails/tree/master/railties/lib/rails/plugin/locator.rb

So, this seems to be a natural place to hook in.

Although I’m not sure if that’s a good idea, really :slight_smile:

On 18.07.2008, at 09:09, James A. wrote:

On Fri, Jul 18, 2008 at 12:58 AM, Miles G. removed_email_address@domain.invalid

Thanks

  • J *
    ~

Engine-Users mailing list
removed_email_address@domain.invalid
http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org


sven fuchs removed_email_address@domain.invalid
artweb design http://www.artweb-design.de
grünberger 65 + 49 (0) 30 - 47 98 69 96 (phone)
d-10245 berlin + 49 (0) 171 - 35 20 38 4 (mobile)