track_dependency (Kernel)

    # File lib/merb-core/core_ext/kernel.rb, line 21
      def track_dependency(name, clr, *ver, &blk)
        options = ver.last.is_a?(Hash) ? ver.pop : {}
        new_dep = Gem::Dependency.new(name, ver.empty? ? nil : ver)
        new_dep.require_block = blk
        new_dep.require_as = options.key?(:require_as) ? options[:require_as] : name
        new_dep.original_caller = clr

        deps = Merb::BootLoader::Dependencies.dependencies

        idx = deps.each_with_index {|d,i| break i if d.name == new_dep.name}

        idx = idx.is_a?(Array) ? deps.size + 1 : idx
        deps.delete_at(idx)
        deps.insert(idx - 1, new_dep)

        new_dep
      end