At 10:42 -0800 11/26/08, Quin Hoxie wrote:
> The API does let you hook into the boot process at a point you
> specify.  Merb::BootLoader loads its subclasses in a particular
> order.  You can add to the boot process by simply extending
> Merb::BootLoader.  Use the before and after methods to determine
> when your script is executed in boot.  Logger is the first class
> loaded, so if you want to be right up front, load before that.
> Here is a skeleton (untested):  http://gist.github.com/29482

Thanks; I'll look into this.  However, I think that's going to run
a bit late for my needs.  Here's what I'm doing now:

  $ cat my_merb
  #!/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
  #
  # This file was generated by RubyGems.
  #
  # The application 'merb-core' is installed as part of a gem, and
  # this file is here to facilitate running it.

  require 'config/bare' if File.file? 'config/bare.rb'  # <- added

  require 'rubygems'

  version = ">= 0"

  if ARGV.first =~ /^_(.*)_$/ and Gem::Version.correct? $1 then
    version = $1
    ARGV.shift
  end

  gem 'merb-core', version
  load 'merb'

Unless your code gets brought into play by the shebang line, my guess
is that it has to wait until the "load 'merb'" line runs.  This is
_after_ the "require 'rubygems'", so the information I need (on the
classes and methods that Ruby itself provides) has already been
contaminated.  True?

-r
-- 
http://www.cfcl.com/rdm            Rich Morin
http://www.cfcl.com/rdm/resume     [EMAIL PROTECTED]
http://www.cfcl.com/rdm/weblog     +1 650-873-7841

Technical editing and writing, programming, and web development

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to