diff options
author | Hiroshi SHIBATA <[email protected]> | 2020-05-21 21:05:07 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2020-05-22 20:32:30 +0900 |
commit | 1d889c96562e9619d2cab443da711e82daeb983c (patch) | |
tree | 0a6a142360be987ceaff6cbf24a03fd5797ecb66 /lib/bundler/stub_specification.rb | |
parent | 93ebf9643dc0913693157e6b4bb391a549a9b8ae (diff) |
Sync Bundler PR #3624 with HEAD commits
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/3114
Diffstat (limited to 'lib/bundler/stub_specification.rb')
-rw-r--r-- | lib/bundler/stub_specification.rb | 20 |
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 |