Class Gem::Commands::ServerCommand
In: lib/rubygems/commands/server_command.rb
Parent: Gem::Command

Methods

execute   new  

Public Class methods

[Source]

    # File lib/rubygems/commands/server_command.rb, line 6
 6:   def initialize
 7:     super 'server', 'Documentation and gem repository HTTP server',
 8:           :port => 8808, :gemdir => Gem.dir, :daemon => false
 9: 
10:     add_option '-p', '--port=PORT', Integer,
11:                'port to listen on' do |port, options|
12:       options[:port] = port
13:     end
14: 
15:     add_option '-d', '--dir=GEMDIR',
16:                'directory from which to serve gems' do |gemdir, options|
17:       options[:gemdir] = File.expand_path gemdir
18:     end
19: 
20:     add_option '--[no-]daemon', 'run as a daemon' do |daemon, options|
21:       options[:daemon] = daemon
22:     end
23:   end

Public Instance methods

[Source]

    # File lib/rubygems/commands/server_command.rb, line 44
44:   def execute
45:     Gem::Server.run options
46:   end

[Validate]