diff options
| author | Josh Cooper <josh@puppetlabs.com> | 2012-10-05 14:45:37 -0700 |
|---|---|---|
| committer | Josh Cooper <josh@puppetlabs.com> | 2012-10-08 11:10:42 -0700 |
| commit | fd22019e7dc3dcb7eabe4665661cdcafdebe58c0 (patch) | |
| tree | 5c7e428cafeb521c5e9650f588d5d389ffba67fb /bin | |
| parent | 0ef65d10e33a1d451ba917eb158912e806bce056 (diff) | |
| download | puppet-fd22019e7dc3dcb7eabe4665661cdcafdebe58c0.tar.gz | |
(#16757) Move rubygems require to application entry point
The previous commit removed the side-effect of loading rubygems as a
result of evaluating the `Puppet.features.rubygems?` feature. As a
result, the puppet script was the only place where we loaded rubygems,
breaking rack setups.
This commit moves the loading of rubygems into the
Puppet::Util::CommandLine, which is effectively puppet's entry point
for both command line and rack setsups.
In addition, `Bundler::Setup` doesn't always seem to exist, at least
not in all versions of bundler, so instead we're using `::Bundler` to
detect if it's loaded.
Paired-with: Andy Parker <andy@puppetlabs.com>
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/puppet | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/bin/puppet b/bin/puppet index aa568174a..c03070291 100755 --- a/bin/puppet +++ b/bin/puppet @@ -1,12 +1,4 @@ #!/usr/bin/env ruby -# Load rubygems so we can require gems -unless defined? Bundler::Setup - begin - require 'rubygems' - rescue LoadError - end -end - require 'puppet/util/command_line' Puppet::Util::CommandLine.new.execute |
