summaryrefslogtreecommitdiff
path: root/lib/bundler/endpoint_specification.rb
diff options
context:
space:
mode:
authorTerence Lee <hone02@gmail.com>2011-08-13 15:58:39 -0500
committerTerence Lee <hone02@gmail.com>2011-08-13 15:58:39 -0500
commit9de287af0c34b0002f6136e3b4412a474ba1ac1f (patch)
tree2f926f9321e1a2e4b1d0ec70969d04c27dfc6c73 /lib/bundler/endpoint_specification.rb
parent53a9bf0563c92a5fb42572af9905c5c8527be942 (diff)
downloadbundler-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.rb19
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"