class Bundler::Source::Path

def run_hooks(type, installer)

def run_hooks(type, installer)
  hooks_meth = "#{type}_hooks"
  return unless Gem.respond_to?(hooks_meth)
  Gem.send(hooks_meth).each do |hook|
    result = hook.call(installer)
    if result == false
      location = " at #{$1}" if hook.inspect =~ /@(.*:\d+)/
      message = "#{type} hook#{location} failed for #{installer.spec.full_name}"
      raise InstallHookError, message
    end
  end
end