def initialize(gem_dirs, port, daemon, launch = nil, addresses = nil)
    Socket.do_not_reverse_lookup = true

    @gem_dirs = Array gem_dirs
    @port = port
    @daemon = daemon
    @launch = launch
    @addresses = addresses
    logger = WEBrick::Log.new nil, WEBrick::BasicLog::FATAL
    @server = WEBrick::HTTPServer.new :DoNotListen => true, :Logger => logger

    @spec_dirs = @gem_dirs.map do |gem_dir|
      spec_dir = File.join gem_dir, 'specifications'

      unless File.directory? spec_dir then
        raise ArgumentError, "#{gem_dir} does not appear to be a gem repository"
      end

      spec_dir
    end

    Gem::Specification.dirs = @gem_dirs
  end
#
Only the first directory in gem_dirs is used for serving gems