opscode/omnibus — pull request #343 by schisamo (2014-09-16 15:46:24+00:00)
Title: Leaky Ruby ENV fix

We experienced some strange build failures while working on the ChefDK 0.2.2 release which seemed directly related to the build slave's Ruby environment. After digging deeper I discovered the EL6 builder which was failing had a different version of Bundler (1.5.3 vs 1.7.2). This shouldn't be that big of a deal as the [ChefDK project installs Bundler 1.7.2](https://github.com/opscode/omnibus-chef/blob/release/chefdk-0.2.2/config/projects/chefdk.rb#L40) and this is the version which should be used by the `bundle` function in the Omnibus::Builder DSL. After some well-placed debug statements I realized [`Omnibus::Builder#with_clean_env `](https://github.com/opscode/omnibus/blob/v4.0.0.beta.1/lib/omnibus/builder.rb#L701-L728) wasn't cleaning enough of the Ruby environment.

This change also allows us to revert 697560d which was partially treating the symptoms of this ENV leaking.

/cc @opscode/release-engineers @opscode/client-engineers