diff options
author | Terence Lee <hone02@gmail.com> | 2011-08-13 15:58:39 -0500 |
---|---|---|
committer | Terence Lee <hone02@gmail.com> | 2011-08-13 15:58:39 -0500 |
commit | 9de287af0c34b0002f6136e3b4412a474ba1ac1f (patch) | |
tree | 2f926f9321e1a2e4b1d0ec70969d04c27dfc6c73 /lib/bundler/endpoint_specification.rb | |
parent | 53a9bf0563c92a5fb42572af9905c5c8527be942 (diff) | |
download | bundler-9de287af0c34b0002f6136e3b4412a474ba1ac1f.tar.gz |
fix binstubs not being installed when using the api endpoint
Diffstat (limited to 'lib/bundler/endpoint_specification.rb')
-rw-r--r-- | lib/bundler/endpoint_specification.rb | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/lib/bundler/endpoint_specification.rb b/lib/bundler/endpoint_specification.rb index fd72ddad70..bdce44cab8 100644 --- a/lib/bundler/endpoint_specification.rb +++ b/lib/bundler/endpoint_specification.rb @@ -22,17 +22,34 @@ module Bundler # needed for standalone, load required_paths from local gemspec # after the gem in installed def require_paths - if _local_specification + if @remote_specification + @remote_specification.require_paths + elsif _local_specification _local_specification.require_paths else super end end + # needed for binstubs + def executables + if @remote_specification + @remote_specification.executables + elsif _local_specification + _local_specification.executables + else + super + end + end + def _local_specification eval(File.read(local_specification_path)) if @loaded_from && File.exists?(local_specification_path) end + def __swap__(spec) + @remote_specification = spec + end + private def local_specification_path "#{installation_path}/specifications/#{full_name}.gemspec" |