diff options
-rw-r--r-- | lib/bundler/endpoint_specification.rb | 19 | ||||
-rw-r--r-- | spec/install/gems/dependency_api_spec.rb | 12 |
2 files changed, 30 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" diff --git a/spec/install/gems/dependency_api_spec.rb b/spec/install/gems/dependency_api_spec.rb index a8d0e21d3f..6a33c3cb06 100644 --- a/spec/install/gems/dependency_api_spec.rb +++ b/spec/install/gems/dependency_api_spec.rb @@ -258,4 +258,16 @@ describe "gemcutter's dependency API" do bundle :install, :artifice => "endpoint" should_be_installed "rails 2.3.2" end + + it "installs the binstubs" do + gemfile <<-G + source "#{source_uri}" + gem "rack" + G + + bundle "install --binstubs", :artifice => "endpoint" + + gembin "rackup" + out.should == "1.0.0" + end end |