summaryrefslogtreecommitdiff
path: root/lib/bundler/stub_specification.rb
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2017-04-06 20:53:57 -0500
committerSamuel Giddins <segiddins@segiddins.me>2017-04-07 12:03:15 -0500
commitaba5e40d174bd8127377718013b0f2fb78939d40 (patch)
treedb47022ea484a3f5a48c60fe3711463fa1168a09 /lib/bundler/stub_specification.rb
parent4e1ff77ec1148c3170e746d42e77c07d6c1cb19a (diff)
downloadbundler-aba5e40d174bd8127377718013b0f2fb78939d40.tar.gz
[StubSpecification] Properly handle full_gem_path for git gems
Diffstat (limited to 'lib/bundler/stub_specification.rb')
-rw-r--r--lib/bundler/stub_specification.rb11
1 files changed, 1 insertions, 10 deletions
diff --git a/lib/bundler/stub_specification.rb b/lib/bundler/stub_specification.rb
index 2e8938e12d..9e43f06364 100644
--- a/lib/bundler/stub_specification.rb
+++ b/lib/bundler/stub_specification.rb
@@ -36,17 +36,8 @@ module Bundler
stub.default_gem
end
- # This is what we do in bundler/rubygems_ext
def full_gem_path
- # this cannot check source.is_a?(Bundler::Plugin::API::Source)
- # because that _could_ trip the autoload, and if there are unresolved
- # gems at that time, this method could be called inside another require,
- # thus raising with that constant being undefined. Better to check a method
- if source.respond_to?(:path) || (source.respond_to?(:bundler_plugin_api_source?) && source.bundler_plugin_api_source?)
- Pathname.new(loaded_from).dirname.expand_path(source.root).to_s.untaint
- else
- rg_full_gem_path
- end
+ stub.full_gem_path
end
def full_require_paths