diff options
author | Julian Nadeau <julian@jnadeau.ca> | 2017-04-18 15:56:56 -0400 |
---|---|---|
committer | Julian Nadeau <julian@jnadeau.ca> | 2017-04-18 19:57:07 -0400 |
commit | f89408c10294749c3b1c83bc4da733aa3b546866 (patch) | |
tree | 42e9ed50498320edf6dfb294210c82033d2a9ff5 /lib | |
parent | f153ef72f8572eee86e8b1672e29a6a206efb91a (diff) | |
download | bundler-f89408c10294749c3b1c83bc4da733aa3b546866.tar.gz |
Apply source to calculate stub spec extension
Diffstat (limited to 'lib')
-rw-r--r-- | lib/bundler/stub_specification.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/bundler/stub_specification.rb b/lib/bundler/stub_specification.rb index 257a472224..c0a8d92252 100644 --- a/lib/bundler/stub_specification.rb +++ b/lib/bundler/stub_specification.rb @@ -11,6 +11,18 @@ module Bundler attr_accessor :stub, :ignored + def source=(source) + super + # 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 + if source.respond_to?(:extension_dir_name) + path = File.join(stub.extensions_dir, source.extension_dir_name) + stub.extension_dir = File.expand_path(path) + else + stub.extension_dir = nil + end + end + def to_yaml _remote_specification.to_yaml end |