Deb Lewis
2007-May-29 07:07 UTC
[Masterview-devel] Explicit dependency on Rails Inflector module
Jeff - Ran into this while checking out my rails dev system on mac (yay!). Was trying to run the unit tests w/out having Rails installed to see if MasterView can be run completely independently, which might be a useful scenario to consider. Interesting exercise in any case to explore unintended dependencies which often creep in. But... TemplateSpec uses ActiveSupport''s Inflector module for mapping controller/action names onto snake-case names used in file system refs, with explicit require in masterview.rb. Take a look when you get a chance and give me opinion on this dependency - if MasterView::TemplateSpec.create_empty_shell_for_action is only invoked in ops which would only be performed w/in a rails context, we could redo the require so it quietly nop''s or in some other fashion ensure that the dependency is only activate when suitable. All the unit tests run except three tests in template_test which are explicitly excercising this function. ~ Deb
Jeff Barczewski
2007-May-29 22:55 UTC
[Masterview-devel] Explicit dependency on Rails Inflector module
Great! Yes, we can certainly do something to fix this. And yes, create_empty_shell_for_action only currently makes sense in rails where we are using layouts. On 5/29/07, Deb Lewis <djlewis at acm.org> wrote:> > Jeff - Ran into this while checking out my rails dev system on mac (yay!). > Was trying to run the unit tests w/out having Rails installed to see if > MasterView can be run completely independently, which might be a useful > scenario to consider. Interesting exercise in any case to explore > unintended dependencies which often creep in. > > But... TemplateSpec uses ActiveSupport''s Inflector module for mapping > controller/action names onto snake-case names used in file system refs, > with > explicit require in masterview.rb. > > Take a look when you get a chance and give me opinion on this dependency - > if MasterView::TemplateSpec.create_empty_shell_for_action is only invoked > in > ops which would only be performed w/in a rails context, we could redo the > require so it quietly nop''s or in some other fashion ensure that the > dependency is only activate when suitable. All the unit tests run except > three tests in template_test which are explicitly excercising this > function. > > ~ Deb > > _______________________________________________ > Masterview-devel mailing list > Masterview-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/masterview-devel >-- Jeff Barczewski, MasterView core team Inspired Horizons Ruby on Rails Training and Consultancy http://inspiredhorizons.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-devel/attachments/20070529/40f81326/attachment-0001.html