puppetlabs/puppet — pull request #1562 by zaphod42 (2013-03-26 18:17:13+00:00)
Title: (Maint) Re-structure require statements to avoid loop

The way in which the require statements for the puppet/interface module
worked caused a dependency loop that could only be resolved by using the
modules and classes in a very specific order. The tests showed this problem
if they were run in a different order:

````
/export/home/jenkins/workspace/Puppet Specs Solaris
(master)/solaris10-i386/solaris10-i386/lib/puppet/interface/action_builder.rb:128:
uninitialized constant Puppet::Interface::Action (NameError)
from /opt/csw/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
`gem_original_require'
from /opt/csw/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
`require'
from /export/home/jenkins/workspace/Puppet Specs Solaris
(master)/solaris10-i386/solaris10-i386/lib/puppet/interface/action_manager.rb:2
from /opt/csw/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
`gem_original_require'
from /opt/csw/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
`require'
from /export/home/jenkins/workspace/Puppet Specs Solaris
(master)/solaris10-i386/solaris10-i386/lib/puppet/interface.rb:13
from /opt/csw/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
`gem_original_require'
from /opt/csw/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
`require'
from /export/home/jenkins/workspace/Puppet Specs Solaris
(master)/solaris10-i386/solaris10-i386/lib/puppet/interface/action.rb:1
from /opt/csw/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
`gem_original_require'
from /opt/csw/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
`require'
from /export/home/jenkins/workspace/Puppet Specs Solaris
(master)/solaris10-i386/solaris10-i386/spec/unit/interface/action_spec.rb:3
from
/opt/csw/lib/ruby/gems/1.8/gems/rspec-core-2.9.0/lib/rspec/core/configuration.rb:746:in
`load'
from
/opt/csw/lib/ruby/gems/1.8/gems/rspec-core-2.9.0/lib/rspec/core/configuration.rb:746:in
`load_spec_files'
from
/opt/csw/lib/ruby/gems/1.8/gems/rspec-core-2.9.0/lib/rspec/core/configuration.rb:746:in
`map'
from
/opt/csw/lib/ruby/gems/1.8/gems/rspec-core-2.9.0/lib/rspec/core/configuration.rb:746:in
`load_spec_files'
from
/opt/csw/lib/ruby/gems/1.8/gems/rspec-core-2.9.0/lib/rspec/core/command_line.rb:22:in
`run'
from
/opt/csw/lib/ruby/gems/1.8/gems/rspec-core-2.9.0/lib/rspec/core/runner.rb:69:in
`run'
from
/opt/csw/lib/ruby/gems/1.8/gems/rspec-core-2.9.0/lib/rspec/core/runner.rb:10:in
`autorun'
from /opt/csw/bin/rspec:19
````

This re-orders the requires so that only the top level module
(Puppet::Interface) requires all of the components that are part of it.

Paired-with: patrick@puppetlabs.com