partition_dependencies (GemManagement)

    # File lib/merb-core/tasks/gem_management.rb, line 248
      def partition_dependencies(dependencies, gem_dir)
        system_specs, local_specs, missing_deps = [], [], []
        if gem_dir && File.directory?(gem_dir)
          gem_dir = File.expand_path(gem_dir)
          ::Gem.clear_paths; ::Gem.path.unshift(gem_dir)
          ::Gem.source_index.refresh!
          dependencies.each do |dep|
            gemspecs = ::Gem.source_index.search(dep)
            local = gemspecs.reverse.find { |s| s.loaded_from.index(gem_dir) == 0 }
            if local
              local_specs << local
            elsif gemspecs.last
              system_specs << gemspecs.last
            else
              missing_deps << dep
            end
          end
          ::Gem.clear_paths
        else
          dependencies.each do |dep|
            gemspecs = ::Gem.source_index.search(dep)
            if gemspecs.last
              system_specs << gemspecs.last
            else
              missing_deps << dep
            end
          end
        end
        [system_specs, local_specs, missing_deps]
      end