diff options
-rw-r--r-- | lib/rubygems/source/git.rb | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -24,6 +24,11 @@ class Gem::Source::Git < Gem::Source attr_reader :reference ## # The git repository this gem is sourced from. attr_reader :repository @@ -53,6 +58,7 @@ class Gem::Source::Git < Gem::Source @reference = reference @need_submodules = submodules @root_dir = Gem.dir @git = ENV['git'] || 'git' end @@ -85,6 +91,8 @@ class Gem::Source::Git < Gem::Source def checkout # :nodoc: cache 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: 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: File.join base_dir, 'gems', "#{@name}-#{dir_shortref}" end @@ -177,6 +189,8 @@ class Gem::Source::Git < Gem::Source def specs checkout Dir.chdir install_dir do Dir['{,*,*/*}.gemspec'].map do |spec_file| directory = File.dirname spec_file |