carlhuda/bundler — pull request #1588 by cowboyd (2011-12-12 18:47:12+00:00)
Title: Ensure binstubs generated when using --standalone point to the standalonde bundle

The binstubs generated by Bundler currently require both rubygems and bundler to be installed in order to execute: requirements not guaranteed at runtime for a standalone bundle.

This introduces a separate method to generate binstubs when generating a standalone bundle. It first adds the root of the standalone to the load path, and then requiring `bundler/setup` from there.

I was on the fence whether to leave the load path alone and load bundler/setup.rb directly via its path relative to the generated executeable, but in the end decided to go the way I did so that application code requiring 'bundler/setup' will continue to function.

I'm pretty excited about the standalone feature, and I hope that this makes it into 1.1