Merge pull request #421 from daniel-pittman/bug/2.7.x/12188-pid-handling-warning-cleanup

Bug/2.7.x/12188 pid handling warning cleanup
(#12296) Test cycle detection on real Puppet::Type instances.

We have found a couple of places where the behaviour of the items tested, and
the behaviour of the real system, differ - because the tests were run over
simpler objects than the real Puppet::Type instances we work on in the field.

This moves from testing on fake things to testing on the real deal, which
gives us a much more solid basis to trust the tests.

Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
(#12296) Make `Puppet::Type` ordered.

Type instances have a reasonable natural order, which allows us to make them
Comparable.  This, in turn, makes any interaction where ordering is of
interest easier to deal with.

This implementation uses the string form of the resource as the basis for
comparison, which is a reasonable starting point from existing definitions of
ordering over resource instances.

Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
(#12296) Now that `Puppet::Type` is ordered, use that.

This eliminates the proxy sorting in the graph library, which was working
around the fact that Puppet::Type was not able to be ordered out of the box.

That makes the whole process significantly more robust.

Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
Make `Puppet::Provider` ordered.

Like types, our providers have a natural internal order.  Exposing that allows
us to eliminate proxy sorting everywhere that it is done, and have more
uniform treatment of our types.

Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
Use natural ordering of Puppet::Provider.

The module tool used to generate and sort by a proxy key for providers, when
detailing their content.  Instead, this can use the natural ordering of
providers previously introduced.

Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
(#12296) Acceptance test for cycle detection in graphs.

This adds a simple acceptance test that validates we detect and report cycles
in a catalog as we compile and try to execute it.

Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
(#11423) Better error when imported resources overlap.

When multiple nodes export a resource with a duplicate type and title, and you
import both, the error message misleadingly tells you that this was a *local*
duplication.

This improves the error message to cover all the bases, which is suboptimal -
it should tell you where the duplicate comes from - but at least doesn't lead
to a wild goose hunt for the *local* duplicate that doesn't exist.

Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
Merge branch 'bug/2.7.x/11423-better-collector-error-message' into 2.7.x

* bug/2.7.x/11423-better-collector-error-message:
  (#11423) Better error when imported resources overlap.
(#12268) String#each is not available in Ruby 1.9

In earlier versions of Ruby, String#each and String#each_line were identical.
In the 1.9 series the former was dropped; this audits the code for places that
should by using `each_line` instead.

This includes some fixes for tests that had very specific stubs around reading
file content, where the expectation - but not the test - was broken by
changing the method we invoke.

It also fixes a stub over `execpipe` that had a different return type to the
actual method, but which happened to work because `each` was defined on both
Array and String in earlier versions.

Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>
Merge pull request #419 from nicklewis/ticket/2.7.x/10064

Ticket/2.7.x/10064 Add environment to reports
(#12329) Allow faces when_rendering blocks to take options

When rendering for face actions was implemented it was assumed that all
the options that an action took would go toward determining the data
that the when_invoked block returned, and the rendering would make
decisions based on that data's structure.  However, there are times when
the data returned may be the same even with different options, and the
option will determine how it's rendered.

For example, the `module list` action has a --tree option that will
display the installed modules in a tree view based on dependencies. The
`module search` action will be able to highlight the word that was
searched for in the results.

This commit allows the when_rendering blocks to optionally add options
and arguments along with the invoked result.  I made the options and
arguments optional since most when_rendering blocks won't need the
them, and having them show up in the block declaration when not used
is confusing.  This also means that all faces previously written don't
need changes and this change is backward compatible.
Revert "Merge pull request #396 from jeffmccune/feature/2.7.x/12088_windows_build_tasks"

This reverts commit dd6bef5446a3ce892b503ac19830f810791560ad, reversing
changes made to 586074aca8dd49843ebfb9f160b408b7907cf886.

We've decided to back this out because the windows build system packages
Ruby and Facter in addition to Puppet.  Therefore, the windows build
system should be in a separate repository.

Please see http://projects.puppetlabs.com/issues/11205 for the location
of the new repository.
Merge pull request #431 from mmrobins/ticket/2.7.x/12329-faces_rendering_takes_args_and_options

Ticket/2.7.x/12329 faces rendering takes args and options
Merge pull request #432 from jeffmccune/ticket/2.7.x/12066_back_out_windows_build_tasks

Ticket/2.7.x/12066 back out windows build tasks
Merge pull request #426 from daniel-pittman/bug/2.7.x/12268-1.9.3-compatibility-fix

* 'bug/2.7.x/12268-1.9.3-compatibility-fix' of git://github.com/daniel-pittman/puppet:
  (#12268) String#each is not available in Ruby 1.9
Merge pull request #300 from nfagerlund/ticket/2.7.x/11451_duplicate_definition_error

(#11451) Fix improper use of "defined" in the duplicate declaration error
Merge pull request #310 from nicklewis/fix-inherited-stages

Fix stage inheritance between multiple included classes 
(#12268) Fix upstart test to work with String#each_line
Merge pull request #433 from pcarlisle/ticket/2.7.x/12268-upstart

(#12268) Fix upstart test to work with String#each_line

This is the correct fix, since the stub was returning data in a format different from the actual method.