class Spork::Diagnoser

def install_hook!(entry_file = nil, dir = Dir.pwd)

* +dir+ - The project directory. Any file loaded outside of this directory will not be logged.
* +entry_file+ - The file that is used to load the project. Used to filter the backtrace so anything that happens after it is hidden.

== Parameters

Installs the diagnoser hook into Kernel#require and Kernel#load
def install_hook!(entry_file = nil, dir = Dir.pwd)
  @dir = File.expand_path(Dir.pwd, dir)
  @entry_file = entry_file
  
  Kernel.class_eval do
    alias :require_without_diagnoser :require
    alias :load_without_diagnoser :load
    
    def require(string)
      ::Spork::Diagnoser.add_included_file(string, caller)
      require_without_diagnoser(string)
    end
    private :require
    
    def load(string, wrap = false)
      ::Spork::Diagnoser.add_included_file(string, caller)
      load_without_diagnoser(string)
    end
    private :load
  end
end