diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-04-22 08:24:42 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-04-22 08:24:42 +0000 |
commit | 372dcece3f69989d133f720468f1e24aa1133cda (patch) | |
tree | c173ca48a23ce18afa44feb15bf68d2dd14ac619 /lib/rubygems/commands/server_command.rb | |
parent | d0e5a34ac7c34e70c145024a0fed8f6042814f29 (diff) | |
download | ruby-372dcece3f69989d133f720468f1e24aa1133cda.tar.gz |
Update to RubyGems 1.3.7.pre.1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/commands/server_command.rb')
-rw-r--r-- | lib/rubygems/commands/server_command.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/rubygems/commands/server_command.rb b/lib/rubygems/commands/server_command.rb index 6bc58367e9..4277787035 100644 --- a/lib/rubygems/commands/server_command.rb +++ b/lib/rubygems/commands/server_command.rb @@ -5,7 +5,7 @@ class Gem::Commands::ServerCommand < Gem::Command def initialize super 'server', 'Documentation and gem repository HTTP server', - :port => 8808, :gemdir => Gem.dir, :daemon => false + :port => 8808, :gemdir => [], :daemon => false OptionParser.accept :Port do |port| if port =~ /\A\d+\z/ then @@ -29,8 +29,9 @@ class Gem::Commands::ServerCommand < Gem::Command end add_option '-d', '--dir=GEMDIR', - 'directory from which to serve gems' do |gemdir, options| - options[:gemdir] = File.expand_path gemdir + 'directories from which to serve gems', + 'multiple directories may be provided' do |gemdir, options| + options[:gemdir] << File.expand_path(gemdir) end add_option '--[no-]daemon', 'run as a daemon' do |daemon, options| @@ -69,6 +70,7 @@ You can set up a shortcut to gem server documentation using the URL: end def execute + options[:gemdir] << Gem.dir if options[:gemdir].empty? Gem::Server.run options end |