Daniel Schierbeck
2008-Nov-22 20:47 UTC
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] <http://rails.lighthouseapp.com/projects/8994-ruby-on-rails/ tickets/1436> [2] <http://github.com/dasch/rails/tree/plugin-manager> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---