This project is archived and is in readonly mode.

#1436 ✓stale
Daniel Schierbeck

An extensible API for plugin management

Reported by Daniel Schierbeck | November 22nd, 2008 @ 05:22 PM | in 3.x

As discussed in ticket #1284, an API for managing plugins would add some benefits to users of alternative version control systems, as it would allow gems and plugins to add-in support for such a system.

My initial idea for the design would be something akin to:

  • PluginManager
    • GitPluginManager
    • HTTPPluginManager
    • BazaarPluginManager
    • SubversionPluginManager
    • ...

A plugin manager should at least respond to #install, taking a single Plugin instance as argument, as well as an options hash.

It can also define #update and #remove, which may come in handy when installing plugins using Git submodules or Subversion externals.

I'll begin working on this as soon as I find the time for it -- my biggest concern is how to test all this, but I guess I'll get some clues from the implementation of the Generators API, which is my main source of inspiration.

Any thoughts or ideas would be greatly appreciated.

Comments and changes to this ticket

  • Daniel Schierbeck

    Daniel Schierbeck November 22nd, 2008 @ 05:23 PM

    • Assigned user set to “Jeremy Kemper”

    As per this comment by David.

  • Daniel Schierbeck

    Daniel Schierbeck November 22nd, 2008 @ 07:05 PM

    I've pushed the first bits of code to a GitHub branch. It currently supports installing through Git checkout and Git submodule.

  • Chad Woolley

    Chad Woolley November 22nd, 2008 @ 08:53 PM

    This sounds like a great idea. Just yesterday I was getting annoyed about how hard plugin dependencies are to manage compared to gems. Dependency hell....

    Please provide some mechanism to specify versions or branches of plugins - either a Git revision number, or a branch.

    The hook approach for #update and #remove sounds great as well. Ideally, this facility would be completely decoupled from the rest of Rails (especially the config/initialization/environment), so it could be done as part of app startup from config/preinitializer.rb. That way, your piston/braid/giternal config could be leveraged to automatically bring the plugin up to the version you want.

  • Bounga

    Bounga November 24th, 2008 @ 09:20 AM

    Chad: That's what we thought about, all SCM plugins should be loaded automatically and system-wide without having to tweak the config files.

  • Bounga

    Bounga November 24th, 2008 @ 09:22 AM

    Chad: and yes, revision, branch and all these things will be handle by the manager.

  • Pratik

    Pratik December 5th, 2008 @ 11:17 PM

    NOTE : Update Rails::TemplateRunner to make use of script/plugin features. Git submodules for an example

  • Ryan Bigg

    Ryan Bigg April 10th, 2010 @ 08:34 AM

    Is this still valid?

  • Jeremy Kemper

    Jeremy Kemper May 4th, 2010 @ 06:48 PM

    • Milestone changed from 2.x to 3.x
  • Ryan Bigg

    Ryan Bigg October 11th, 2010 @ 04:50 AM

    • State changed from “new” to “stale”
    • Importance changed from “” to “”

    No updates since my ping in April, closing.

  • Ryan Bigg

    Ryan Bigg October 11th, 2010 @ 04:51 AM

    Just a little update too: I would say this is handled fairly enough by Bundler now by using the git comment in Gemfile. If you want to use a specific version of a plugin, it's best practice if it was a gem.

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Referenced by

Pages