-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
As we have to demo on Tuesday, and on Thursday it was pretty broken :-), I went over all the code to make it work again. I did some pretty important changes which I detail below, and I enumerate below some topics we need to discuss this week in a separate mail. Also at the end I enumerate some code related issues I found, in a separate mail.
- - First, moved all *-plugin to plugins/* plugins don't have src/ directory anymore, they start at the top-level (app, controller...) and the spec and dist files are in the package/ directory. Reasoning: 1.- all rails plugins are hosted that way. If some day we split a plugin, the plugin has to start in the directory where lib, app, etc are. That allows people to use script/plugin. It is a convention, changing it breaks any existing rails tools. 2.- originally, goal was to avoid symlinking and finding plugins automatically in the source code. We have to make running from the source tree easy if we want lazy people to help. 3.- Originally, I wrote my own Rails::Plugin::Locator which was able to find plugins with /src directory in the source tree. It worked pretty well, but Rails::Plugin defines Rails::Plugin#name as File.basename(@directory), which means, all plugins got the name :src. So Rails assume the directory is the name of the plugin.
AI: update wiki page, installation, unless someone has good arguments for keeping src/ ;-)
- - Changed how service routes are loaded. We don't go over vendor/plugins/* anymore, but over loaded plugins directory(). That allows for what is below. - - We automatically find plugins in the source tree RAILS_ROOT/../plugins by adding it to the plugin search path, so no need to symlink. Later we could also find plugins one level more up, so plugins checked out from a separate git repo are also found, and make development a breeze. - - Therefore ResourceRegistration has now register_plugin() method, and that one is used. We don't iterate vendor/plugins anymore but just go over found plugins and look there.
- - I disabled the use of namespace and domain for now. Just because the client stopped working, and the discussion with Klaus about it was still in the middle. Note, everything is there, just the route_all method does not take them into account.
- - what is still broken: * permissions, see discussion mail.