diff options
author | Jesse Wolfe <jes5199@gmail.com> | 2010-05-12 15:19:33 -0700 |
---|---|---|
committer | test branch <puppet-dev@googlegroups.com> | 2010-02-17 06:50:53 -0800 |
commit | 8f4d644210e7a6afc9e08d65a0c60987171747c6 (patch) | |
tree | db5570739e34e4177b8417ba65f9b8a53ea5d4bc /lib/puppet/application/master.rb | |
parent | 6b26a7c0f1793a74ca778383125b7e4618fcc9e2 (diff) | |
download | puppet-8f4d644210e7a6afc9e08d65a0c60987171747c6.tar.gz puppet-8f4d644210e7a6afc9e08d65a0c60987171747c6.tar.xz puppet-8f4d644210e7a6afc9e08d65a0c60987171747c6.zip |
Feature #2935: lazify require graph for applications
Because environments have to declare their mode before puppet tries to
load defaults.rb, it reduces the complexity considerably to have
application classes to load their lib dependencies at the last possible
moment.
Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
Diffstat (limited to 'lib/puppet/application/master.rb')
-rw-r--r-- | lib/puppet/application/master.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/puppet/application/master.rb b/lib/puppet/application/master.rb index 44c8c027b..993d7df44 100644 --- a/lib/puppet/application/master.rb +++ b/lib/puppet/application/master.rb @@ -1,8 +1,4 @@ -require 'puppet' require 'puppet/application' -require 'puppet/daemon' -require 'puppet/network/server' -require 'puppet/network/http/rack' if Puppet.features.rack? class Puppet::Application::Master < Puppet::Application @@ -37,6 +33,7 @@ class Puppet::Application::Master < Puppet::Application end # Create this first-off, so we have ARGV + require 'puppet/daemon' @daemon = Puppet::Daemon.new @daemon.argv = ARGV.dup end @@ -108,6 +105,7 @@ class Puppet::Application::Master < Puppet::Application end unless options[:rack] + require 'puppet/network/server' @daemon.server = Puppet::Network::Server.new(:xmlrpc_handlers => xmlrpc_handlers) @daemon.daemonize if Puppet[:daemonize] else |