carlhuda/bundler — pull request #1597 by cowboyd (2011-12-21 18:49:32+00:00)
Title: Generate static groups for  Bundle.require when creating a standalone bundle.

For every group we create a file that requires all of the code for its gems.
So, for example if you have the following Gemfile:

gem "abc"

group :foo do
gem "xyz"
gem "zzz"
end

The standalone will generate

bundler/setup/default.rb
bundler/setup/foo.rb

so that when you call Bundler.require(:default, :foo), it will load
those files which contain a listing of requires for that group.

As I see it, there is still some work to be done in standalone because all dependency information is lost at runtime, but that's a separate bit of work.