summaryrefslogtreecommitdiff
path: root/lib/rubygems/commands/server_command.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rubygems/commands/server_command.rb')
-rw-r--r--lib/rubygems/commands/server_command.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/rubygems/commands/server_command.rb b/lib/rubygems/commands/server_command.rb
index 34e5e46fec..992ae1c8f8 100644
--- a/lib/rubygems/commands/server_command.rb
+++ b/lib/rubygems/commands/server_command.rb
@@ -7,17 +7,17 @@ class Gem::Commands::ServerCommand < Gem::Command
super 'server', 'Documentation and gem repository HTTP server',
:port => 8808, :gemdir => Gem.dir, :daemon => false
- add_option '-p', '--port=PORT',
+ add_option '-p', '--port=PORT', Integer,
'port to listen on' do |port, options|
options[:port] = port
end
add_option '-d', '--dir=GEMDIR',
'directory from which to serve gems' do |gemdir, options|
- options[:gemdir] = gemdir
+ options[:gemdir] = File.expand_path gemdir
end
- add_option '--[no]-daemon', 'run as a daemon' do |daemon, options|
+ add_option '--[no-]daemon', 'run as a daemon' do |daemon, options|
options[:daemon] = daemon
end
end