On Wed, Nov 19, 2008 at 9:36 AM, Michael Klishin < [EMAIL PROTECTED]> wrote:
> > Just think of it as of a plugin API thing. > -- > MK This confuses me- how do plugins make use of push_path, or do they? push_path's implementation might actually be misleading- it doesn't actually push the path onto a path array, it sets it. Here's the code from merb-core.rb: def push_path(type, path, file_glob = "**/*.rb") enforce!(type => Symbol) load_paths[type] = [path, file_glob] end So if push_path(:lib) is called twice before the bootloader runs, the second :lib path is used, the first is ignored. Which is fine with me, unless this *is* a plugin API thing, in which case, plugins should have their own API that doesn't conflict with what's available in merb-core, otherwise who can trust that your invocation of push_path doesn't get wiped by some later invocation by some other plugin? Michael I'm hoping I'm misunderstanding your comment- otherwise, I still think that the current bootloading order (placing /lib after /app) makes push_path(:lib) impotent. I think there may be some confusion about what push_path actually does (re: http://explore.twitter.com/merbivore/status/962847488 push_path actually * does* require files, as it results in a call to load_file in bootloader.rb on each file in the path, which calls require), I'd like to be confident that we're not rejecting Jack Dempsey's patch due to a misunderstanding. liam --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
