1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
drbrain 2010-04-22 08:24:42 +00:00
parent d0e5a34ac7
commit 372dcece3f
64 changed files with 759 additions and 240 deletions

View file

@ -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