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, and the code is residing in a GitHub branch.
Again, all comments are welcome.
Cheers, Daniel Schierbeck
 <http://rails.lighthouseapp.com/projects/8994-ruby-on-rails/ tickets/1436>  <http://github.com/dasch/rails/tree/plugin-manager>