PluginManager: An extensible plugin management API for Rails

I've begun implementing an API for installing, updating and removing plugins. This will allow for pluggable plugin managers, e.g. to support other version control systems than those built into Rails.

I haven't got a lot of expertise in this area, so if anyone has some good comments on the design/approach, please say so.

My current design is this:

A plugin manager, e.g. GitPluginManager, inherits from PluginManager::Base. It can override #install, #update and #remove. It hooks into a URI scheme (e.g. "git://...") by calling PluginManager.add_plugin_manager(uri_scheme, manager).

PluginManager.install(uri[, options]) installs the plugin identified by the URI. Behind the scene, a suitable plugin manager is found, and its #install method is called.

PluginManager.update(name[, options]) updates the named plugin (e.g. "acts_as_awesome"). I have not begun work on this yet.

PluginManager.remove(name[, options]) removes the named plugin. Behind the scenes, PluginManager finds out which plugin manager has installed the plugin using heuristics. So far, I've got support for removing plain directories and git submodules (the latter needs extra cleanup in .gitmodules). Subversion externals is planned.

The progress will be tracked in Lighthouse[1], and the code is residing in a GitHub branch[2].

Again, all comments are welcome.

Cheers, Daniel Schierbeck

[1] < tickets/1436> [2] <;