mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/rubygems: update to 1.3.6.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26728 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
65544f575b
commit
b551e8c8b3
119 changed files with 2735 additions and 2613 deletions
|
@ -17,6 +17,7 @@ class Gem::Commands::FetchCommand < Gem::Command
|
|||
|
||||
add_version_option
|
||||
add_platform_option
|
||||
add_prerelease_option
|
||||
end
|
||||
|
||||
def arguments # :nodoc:
|
||||
|
@ -39,12 +40,12 @@ class Gem::Commands::FetchCommand < Gem::Command
|
|||
|
||||
gem_names.each do |gem_name|
|
||||
dep = Gem::Dependency.new gem_name, version
|
||||
dep.prerelease = options[:prerelease]
|
||||
|
||||
specs_and_sources = Gem::SpecFetcher.fetcher.fetch dep, all
|
||||
specs_and_sources = Gem::SpecFetcher.fetcher.fetch(dep, false, true,
|
||||
dep.prerelease?)
|
||||
|
||||
specs_and_sources.sort_by { |spec,| spec.version }
|
||||
|
||||
spec, source_uri = specs_and_sources.last
|
||||
spec, source_uri = specs_and_sources.sort_by { |s,| s.version }.last
|
||||
|
||||
if spec.nil? then
|
||||
alert_error "Could not find #{gem_name} in any repository"
|
||||
|
@ -52,7 +53,7 @@ class Gem::Commands::FetchCommand < Gem::Command
|
|||
end
|
||||
|
||||
path = Gem::RemoteFetcher.fetcher.download spec, source_uri
|
||||
FileUtils.mv path, "#{spec.full_name}.gem"
|
||||
FileUtils.mv path, spec.file_name
|
||||
|
||||
say "Downloaded #{spec.full_name}"
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue