diff options
-rw-r--r-- | lib/rubygems/source/git.rb | 34 | ||||
-rw-r--r-- | lib/rubygems/source/installed.rb | 3 | ||||
-rw-r--r-- | lib/rubygems/source/local.rb | 3 | ||||
-rw-r--r-- | lib/rubygems/source/lock.rb | 44 | ||||
-rw-r--r-- | lib/rubygems/source/vendor.rb | 2 |
5 files changed, 79 insertions, 7 deletions
@@ -31,6 +31,11 @@ class Gem::Source::Git < Gem::Source attr_reader :repository ## # Does this repository need submodules checked out too? attr_reader :need_submodules @@ -50,14 +55,16 @@ class Gem::Source::Git < Gem::Source @reference = reference @need_submodules = submodules - @git = ENV['git'] || 'git' end def <=> other case other when Gem::Source::Git then 0 - when Gem::Source::Installed then -1 when Gem::Source then 1 @@ -114,6 +121,13 @@ class Gem::Source::Git < Gem::Source end ## # A short reference for use in git gem directories def dir_shortref # :nodoc: @@ -130,14 +144,14 @@ class Gem::Source::Git < Gem::Source # The directory where the git gem will be installed. def install_dir # :nodoc: - File.join Gem.dir, 'bundler', 'gems', "#{@name}-#{dir_shortref}" end ## # The directory where the git gem's repository will be cached. def repo_cache_dir # :nodoc: - File.join Gem.dir, 'cache', 'bundler', 'git', "#{@name}-#{uri_hash}" end ## @@ -162,7 +176,17 @@ class Gem::Source::Git < Gem::Source Dir.chdir directory do spec = Gem::Specification.load file - spec.full_gem_path = File.expand_path '.' if spec spec end end.compact @@ -12,7 +12,8 @@ class Gem::Source::Installed < Gem::Source def <=> other case other - when Gem::Source::Vendor then -1 when Gem::Source::Installed then 0 @@ -15,7 +15,8 @@ class Gem::Source::Local < Gem::Source def <=> other case other - when Gem::Source::Installed then -1 when Gem::Source::Local then 0 @@ -0,0 +1,44 @@ @@ -12,6 +12,8 @@ class Gem::Source::Vendor < Gem::Source::Installed def <=> other case other when Gem::Source::Vendor then 0 when Gem::Source then |