mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update to RubyGems 1.3.4 r2223
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a6afbaeb3b
commit
31c94ffeb5
126 changed files with 7610 additions and 3747 deletions
|
@ -23,7 +23,9 @@ module Gem::LocalRemoteOptions
|
|||
raise OptionParser::InvalidArgument, value
|
||||
end
|
||||
|
||||
raise OptionParser::InvalidArgument, value unless uri.scheme == 'http'
|
||||
unless ['http', 'https', 'file'].include?(uri.scheme)
|
||||
raise OptionParser::InvalidArgument, value
|
||||
end
|
||||
|
||||
value
|
||||
end
|
||||
|
@ -90,7 +92,7 @@ module Gem::LocalRemoteOptions
|
|||
source << '/' if source !~ /\/\z/
|
||||
|
||||
if options[:added_source] then
|
||||
Gem.sources << source
|
||||
Gem.sources << source unless Gem.sources.include?(source)
|
||||
else
|
||||
options[:added_source] = true
|
||||
Gem.sources.replace [source]
|
||||
|
@ -99,10 +101,9 @@ module Gem::LocalRemoteOptions
|
|||
end
|
||||
|
||||
##
|
||||
# Add the --update-source option
|
||||
# Add the --update-sources option
|
||||
|
||||
def add_update_sources_option
|
||||
|
||||
add_option(:"Local/Remote", '-u', '--[no-]update-sources',
|
||||
'Update local source cache') do |value, options|
|
||||
Gem.configuration.update_sources = value
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue