I'm strongly against pre-loading lib code, because lib can have directory structures in them that expect to be loaded by an entry-point method. I usually treat lib as a location for larval libraries, so I have a bunch of files like foo.rb, which a foo directory and a bunch of .rb's inside. Since people's needs are different (I've heard other people say they do the same as me), preloading lib seems like too strong an opinion for me. It seems like we need a way to prepend push_path. What about Merb.unshift_path?
-- Yehuda On Sun, Nov 16, 2008 at 11:28 AM, Michael Klishin < [EMAIL PROTECTED]> wrote: > > 2008/11/16 Ben Burkert <[EMAIL PROTECTED]>: > > In that case, why not add a lib_dependency/ies method for dependencies > > vendored in the lib directory: > > > > lib_dependency :model_fu # adds a dependency that loads Merb.root / > :lib / > > :model_fu > > lib_dependency :model_fu, :require_as => 'foo/bar/model_fu' #adds a > > dependency that loads Merb.root / :lib / :foo / :bar / :model_fu > > To me it's no improvement over require with hooks and adds more > "magical dependency methods" > to mostly simple Merb core. > -- > MK > > > > -- Yehuda Katz Developer | Engine Yard (ph) 718.877.1325 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "merb" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/merb?hl=en -~----------~----~----~----~------~----~------~--~---
