summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Arko <andre@arko.net>2015-05-30 21:57:24 -0700
committerAndre Arko <andre@arko.net>2015-05-30 21:57:24 -0700
commit39a711c12df05eed3cbc4d5fe9c25914a9219347 (patch)
tree1942d62fd3ce26fa465315e4fac388b742542199
parent4726b45b8fc8e16a9c36142c36df481328417dd5 (diff)
downloadbundler-39a711c12df05eed3cbc4d5fe9c25914a9219347.tar.gz
forward @loaded_from into _local_specification
this fixes the “not installed” exceptions seen on RubyGems < 1.8
-rw-r--r--lib/bundler/endpoint_specification.rb19
1 files changed, 17 insertions, 2 deletions
diff --git a/lib/bundler/endpoint_specification.rb b/lib/bundler/endpoint_specification.rb
index 31365e5b42..b27b0f5040 100644
--- a/lib/bundler/endpoint_specification.rb
+++ b/lib/bundler/endpoint_specification.rb
@@ -29,6 +29,16 @@ module Bundler
end
end
+ # needed for inline
+ def load_paths
+ # remote specs aren't installed, and can't have load_paths
+ if _local_specification
+ _local_specification.load_paths
+ else
+ super
+ end
+ end
+
# needed for binstubs
def executables
if @remote_specification
@@ -61,14 +71,19 @@ module Bundler
end
def _local_specification
- eval(File.read(local_specification_path)) if @loaded_from && File.exist?(local_specification_path)
+ if @loaded_from && File.exist?(local_specification_path)
+ eval(File.read(local_specification_path)).tap do |spec|
+ spec.loaded_from = @loaded_from
+ end
+ end
end
def __swap__(spec)
@remote_specification = spec
end
- private
+ private
+
def local_specification_path
"#{base_dir}/specifications/#{full_name}.gemspec"
end