diff options
author | Terence Lee <hone02@gmail.com> | 2011-06-17 00:27:44 -0700 |
---|---|---|
committer | Terence Lee <hone02@gmail.com> | 2011-06-17 00:28:00 -0700 |
commit | 8c4cac4d7069cfacc037c2e9feab58cc96b8dcd6 (patch) | |
tree | 3df4898e2089105c6a0e0db775718dde81a6acb3 /lib/bundler | |
parent | ae1390da290ff49e4b4d8132e29e9845a85fd270 (diff) | |
download | bundler-8c4cac4d7069cfacc037c2e9feab58cc96b8dcd6.tar.gz |
#1240, fix standalone when using the endpoint
Diffstat (limited to 'lib/bundler')
-rw-r--r-- | lib/bundler/endpoint_specification.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/bundler/endpoint_specification.rb b/lib/bundler/endpoint_specification.rb index e840ed84d9..fd72ddad70 100644 --- a/lib/bundler/endpoint_specification.rb +++ b/lib/bundler/endpoint_specification.rb @@ -18,5 +18,24 @@ module Bundler def fetch_platform @plaftorm end + + # needed for standalone, load required_paths from local gemspec + # after the gem in installed + def require_paths + if _local_specification + _local_specification.require_paths + else + super + end + end + + def _local_specification + eval(File.read(local_specification_path)) if @loaded_from && File.exists?(local_specification_path) + end + + private + def local_specification_path + "#{installation_path}/specifications/#{full_name}.gemspec" + end end end |