Deb Lewis
2007-Feb-14 00:27 UTC
[Masterview-devel] Code review request: mv Configuration#add_plugin_directives
Jeff - look this over and let me know what you think. I desk-checked the rails 1.2.2 config/init logic to confirm that this should also work on 1.2. I''m using this in my own site right now, not sure if this is solid enough to expose as part of MasterView. Tho if you think this looks reasonable we can put out an inquiry on the users list to see if this has wider interest. Background: I''m finding it useful to package a masterview directives dir in plugins that I build for my apps and want a simple notation in my masterview config to say "add all {plugin_dir}/directives directories found on my rails plugin load path to the masterview directives load path". There doesn''t seem to be a clear, separable notion of "the plugin directories" in rails, so with regret I cloned the find_plugins method out of rails''s init logic so I could build find_plugin_directives on top of that. This implementation does not support the new notion in rails 1.2 that allows app developer to configure the *order* in which plugins are loaded. ~ Deb
Jeff Barczewski
2007-Feb-14 04:15 UTC
[Masterview-devel] Code review request: mv Configuration#add_plugin_directives
On 2/13/07, Deb Lewis <djlewis at acm.org> wrote:> > Jeff - look this over and let me know what you think. I desk-checked the > rails 1.2.2 config/init logic to confirm that this should also work on 1.2 > . > > I''m using this in my own site right now, not sure if this is solid enough > to > expose as part of MasterView. Tho if you think this looks reasonable we > can > put out an inquiry on the users list to see if this has wider interest. > > Background: I''m finding it useful to package a masterview directives dir > in > plugins that I build for my apps and want a simple notation in my > masterview > config to say "add all {plugin_dir}/directives directories found on my > rails > plugin load path to the masterview directives load path". > > There doesn''t seem to be a clear, separable notion of "the plugin > directories" in rails, so with regret I cloned the find_plugins method out > of rails''s init logic so I could build find_plugin_directives on top of > that. > > This implementation does not support the new notion in rails 1.2 that > allows > app developer to configure the *order* in which plugins are loaded. > >Looks good to me. I am fine with including this especially if you find it useful for your own work, those are exactly the kinds of changes we should put in. And if I understand correctly this is optionally called from config by adding in config.add_plugin_directives(...). Thus if one doesn''t call that method on config then this code isn''t even invoked. So I think it looks good. If you want to hold off on publicizing that for a while we can do that, but otherwise I think it sounds like a good add and lets get it in there. So I think we are getting close to a release here. I need to take a quick look if I can fix Ed''s problem he found and then we should get it out there. Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-devel/attachments/20070213/84ddbef1/attachment.html