require 'webrick' require 'rdoc/template' require 'yaml' require 'zlib' require 'rubygems' ## # Gem::Server and allows users to serve gems for consumption by # `gem --remote-install`. # # gem_server starts an HTTP server on the given port and serves the folowing: # * "/" - Browsing of gem spec files for installed gems # * "/Marshal" - Full SourceIndex dump of metadata for installed gems # * "/yaml" - YAML dump of metadata for installed gems - deprecated # * "/gems" - Direct access to download the installable gems # # == Usage # # gem server [-p portnum] [-d gem_path] # # port_num:: The TCP port the HTTP server will bind to # gem_path:: # Root gem directory containing both "cache" and "specifications" # subdirectories. class Gem::Server include Gem::UserInteraction DOC_TEMPLATE = <<-WEBPAGE
There are %gem_count% gems installed:
START:specs IFNOT:is_last %name%, ENDIF:is_last IF:is_last %name%. ENDIF:is_last END:specs