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.rb20
1 files changed, 16 insertions, 4 deletions
diff --git a/lib/bundler/stub_specification.rb b/lib/bundler/stub_specification.rb
index d45f80a80a..c87b66ee19 100644
--- a/lib/bundler/stub_specification.rb
+++ b/lib/bundler/stub_specification.rb
@@ -28,9 +28,13 @@ module Bundler
# @!group Stub Delegates
- # This is defined directly to avoid having to load every installed spec
+ # This is defined directly to avoid having to loading the full spec
def missing_extensions?
- stub.missing_extensions?
+ return false if default_gem?
+ return false if extensions.empty?
+ return false if File.exist? gem_build_complete_path
+
+ true
end
def activated
@@ -41,8 +45,16 @@ module Bundler
stub.instance_variable_set(:@activated, activated)
end
- def default_gem
- stub.default_gem
+ def extensions
+ stub.extensions
+ end
+
+ def gem_build_complete_path
+ File.join(extension_dir, "gem.build_complete")
+ end
+
+ def default_gem?
+ stub.default_gem?
end
def full_gem_path