summaryrefslogtreecommitdiff
path: root/lib/bundler/stub_specification.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bundler/stub_specification.rb')
-rw-r--r--lib/bundler/stub_specification.rb15
1 files changed, 10 insertions, 5 deletions
diff --git a/lib/bundler/stub_specification.rb b/lib/bundler/stub_specification.rb
index fa071901e5..da830cf8d4 100644
--- a/lib/bundler/stub_specification.rb
+++ b/lib/bundler/stub_specification.rb
@@ -9,6 +9,7 @@ module Bundler
spec
end
+ attr_reader :checksum
attr_accessor :stub, :ignored
def source=(source)
@@ -16,7 +17,8 @@ module Bundler
# Stub has no concept of source, which means that extension_dir may be wrong
# This is the case for git-based gems. So, instead manually assign the extension dir
return unless source.respond_to?(:extension_dir_name)
- path = File.join(stub.extensions_dir, source.extension_dir_name)
+ unique_extension_dir = [source.extension_dir_name, File.basename(full_gem_path)].uniq.join("-")
+ path = File.join(stub.extensions_dir, unique_extension_dir)
stub.extension_dir = File.expand_path(path)
end
@@ -56,7 +58,7 @@ module Bundler
end
def gem_build_complete_path
- File.join(extension_dir, "gem.build_complete")
+ stub.gem_build_complete_path
end
def default_gem?
@@ -64,9 +66,11 @@ module Bundler
end
def full_gem_path
- # deleted gems can have their stubs return nil, so in that case grab the
- # expired path from the full spec
- stub.full_gem_path || method_missing(:full_gem_path)
+ stub.full_gem_path
+ end
+
+ def full_gem_path=(path)
+ stub.full_gem_path = path
end
def full_require_paths
@@ -106,6 +110,7 @@ module Bundler
end
rs.source = source
+ rs.base_dir = stub.base_dir
rs
end