mirror of
https://github.com/ruby/ruby.git
synced 2025-09-18 01:54:00 +02:00
* lib/rubygems: RubyGems 2.2.2 which contains the following bug fixes:
http://rubygems.rubyforge.org/rubygems-update/History_txt.html#label-2.2.2+%2F+2014-02-05 https://bugs.ruby-lang.org/issues/9489 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_1@44858 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
39cb784095
commit
9b9d3bac4d
64 changed files with 934 additions and 299 deletions
|
@ -23,6 +23,11 @@ class Gem::Source::Git < Gem::Source
|
|||
|
||||
attr_reader :reference
|
||||
|
||||
##
|
||||
# When false the cache for this repository will not be updated.
|
||||
|
||||
attr_accessor :remote
|
||||
|
||||
##
|
||||
# The git repository this gem is sourced from.
|
||||
|
||||
|
@ -53,6 +58,7 @@ class Gem::Source::Git < Gem::Source
|
|||
@reference = reference
|
||||
@need_submodules = submodules
|
||||
|
||||
@remote = true
|
||||
@root_dir = Gem.dir
|
||||
@git = ENV['git'] || 'git'
|
||||
end
|
||||
|
@ -85,6 +91,8 @@ class Gem::Source::Git < Gem::Source
|
|||
def checkout # :nodoc:
|
||||
cache
|
||||
|
||||
return false unless File.exist? repo_cache_dir
|
||||
|
||||
unless File.exist? install_dir then
|
||||
system @git, 'clone', '--quiet', '--no-checkout',
|
||||
repo_cache_dir, install_dir
|
||||
|
@ -107,6 +115,8 @@ class Gem::Source::Git < Gem::Source
|
|||
# Creates a local cache repository for the git gem.
|
||||
|
||||
def cache # :nodoc:
|
||||
return unless @remote
|
||||
|
||||
if File.exist? repo_cache_dir then
|
||||
Dir.chdir repo_cache_dir do
|
||||
system @git, 'fetch', '--quiet', '--force', '--tags',
|
||||
|
@ -142,6 +152,8 @@ class Gem::Source::Git < Gem::Source
|
|||
# The directory where the git gem will be installed.
|
||||
|
||||
def install_dir # :nodoc:
|
||||
return unless File.exist? repo_cache_dir
|
||||
|
||||
File.join base_dir, 'gems', "#{@name}-#{dir_shortref}"
|
||||
end
|
||||
|
||||
|
@ -177,6 +189,8 @@ class Gem::Source::Git < Gem::Source
|
|||
def specs
|
||||
checkout
|
||||
|
||||
return [] unless install_dir
|
||||
|
||||
Dir.chdir install_dir do
|
||||
Dir['{,*,*/*}.gemspec'].map do |spec_file|
|
||||
directory = File.dirname spec_file
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue