rubyworks / smeagol

Read-Only Gollum Server
http://rubyworks.github.com/smeagol
Other
92 stars 5 forks source link

Plugins vs Serving Multiple Repos #47

Open trans opened 12 years ago

trans commented 12 years ago

I was attempting to add plugin support when I finally understood what repositories was all about --it lets a single process server multiple sites. That's very clever. Unfortunately it means there really can't be per wiki plugins.

There are four solutions to this:

  1. Don't support plugins.
  2. Only support gemified plugins and only on a per-systems basis, not per-project.
  3. Somehow make the entire code base an instance to which plugins are applied.
  4. Don't support multiple repositories.

For now we will have to do 1.

I do not think 2 is a very good idea b/c it divorces plugins from the target wiki, which could cause bad code conflicts.

While 3 is no doubt doable, it seems a rather difficult thing to do and certainly would require restructuing the code in some rather unorthodox ways. Albeit maybe that would ultimately be a good thing --I am just not sure how to make it work. Would all classes have to be anonymous?

I'd hate to do 4, now that I realize this feature exists. I can see how it can quite useful for hosting. Buy one account and run all your sites through it. But maybe there is another way to do that without having to support it internally in the Sinatra app?

If anyone else has insight into this matter please tell.