(Maint) Remove duplicate test

There are other tests that use the module tool to search for modules.
This kind of check is better done in one of those where the system just
"has to work" as part of some larger narrative arc.
(PUP-672) Add acceptance test for trusted data

This adds a check that the certificate extensions show up as trusted
data. Does not yet pass as the feature isn't implemented yet.
(Maint) Remove use of mocking

Using the mocks is not absolutely necessary in this case. It is easy to
construct the certificate and using it makes it a little clearer what
kind of object we are dealing with.
(PUP-672) Add nested context capabilities

A major problem in puppet is keeping track of contextual information.
The Puppet::Indirector::Request attempts to do this, but it isn't able
to pass that information between indirector requests. This adds a
global context system, where once a value is set it cannot be changed,
but a subcontext can be created.
(maint) Log exception using log_exception

The master application was not using Puppet.log_exception to log out any
errors that might occur during --compile. This meant that there was no
backtrace information available to diagnose the problem.
(PUP-672) Add defaults for context lookups

Before it wasn't possible to get a value from the context that might not
have the requested binding. This adds the ability to provide a default
in the case where there is no finding for the name.
(PUP-672) Track trusted information using the context

This pulls apart the indirector request and the trusted information. The
trusted information is stored in the Puppet::Context and overridden by
the remote request handler to allow the injection of various elements of
trusted information. The reason to separate it from the indirector
request is because the indirector requests are hard to control, as they
are contstructed from hashes of information passed around and
manipulated. This should provide a more straightforward mechanism for
managing this kind of "contextual" information.
(PUP-672) Provide certificate extensions as trusted data

This extends the trusted information that is exposed to the system and
manifests to include the certificate extensions that are part of the
certificate provided by the agent. Only the custom extensions that are
part of the puppet extension arc are included.
(PUP-672) Updated test to match trusted data structure

During implementation of the trusted extensions the layout of the
trusted hash changed a little bit. This updates the acceptance test to
reflect that and also changes it to be much more straightforward to
read for the expected structure.
(PUP-672) Puppet::Context is immutable.

Previous implementation exposed a bind method allowing you to add
bindings to the current context. This method has been removed. Now
every context is generated only once, either from an initial push or
override, both of which require a hash of bindings which are merged into
the parent's binding state.
(PUP-672) Move TrustedInformation into Puppet::Context

This is just a refactor putting Puppet::Indirector::TrustedInformation
into the Puppet::Context module instead.
(PUP-1255) Don't be sensitive to pseudo-inherited ACEs

Previously, the test would fail on Windows 2012, as the access control
entries in the Temp directory's DACL are missing the INHERITED_ACE bit:

    > setacl -on  temp -ot file -actn list  -lst "f:tab;w:d,s,o,g;i:y"
    temp

    Owner: WIN-61G7FSKJ7JI\josh
    Group: WIN-61G7FSKJ7JI\None
    DACL(not_protected):
    NT AUTHORITY\SYSTEM    full   allow container_inherit+object_inherit
    BUILTIN\Administrators full   allow container_inherit+object_inherit
    WIN-61G7FSKJ7JI\josh   full   allow container_inherit+object_inherit

Note how none of the entries granting 'full' access are "inherited".

The test creates two empty temp files (the source is generated in the
call to Puppet::Util.replace_file) each with permissions:

    WIN-61G7FSKJ7JI\josh
    WIN-61G7FSKJ7JI\None
      NT AUTHORITY\SYSTEM:(I)                       0x1f01ff
      BUILTIN\Administrators:(I)                    0x1f01ff
      WIN-61G7FSKJ7JI\josh:(I)                      0x1f01ff

Each ACE is inherited and grants full access as expected. But when the Win32
API `ReplaceFile` is called, it prepends non-inherited ACEs to the destination
file:

    WIN-61G7FSKJ7JI\josh
    WIN-61G7FSKJ7JI\None
      NT AUTHORITY\SYSTEM:                          0x1f01ff
      BUILTIN\Administrators:                       0x1f01ff
      WIN-61G7FSKJ7JI\josh:                         0x1f01ff
      NT AUTHORITY\SYSTEM:(I)                       0x1f01ff
      BUILTIN\Administrators:(I)                    0x1f01ff
      WIN-61G7FSKJ7JI\josh:(I)                      0x1f01ff

While the merging behavior is unexpected, it doesn't alter the effective
security of the file.

This commit marks the directory as protected, which breaks inheritance
at that point. As a result, ReplaceFile behaves as expected.

Also note that if the Temp ACLs are reset recursively:

    icacls Temp /reset /t

Then the merging behavior does not occur and the test passes (without
this commit).

See also pseudo-inherited ACEs:
http://helgeklein.com/setacl/faq/#what-are-pseudo-protected-acls-and-pseudo-inherited-aces-setacl-2-1
(maint) Add temp workaround for travis

Rubygems broke travis builds on ruby 1.8.7:

https://github.com/travis-ci/travis-ci/issues/1793
https://github.com/rubygems/rubygems/pull/763

This patch is a temporary workaround until rubygems is
updated.
Merge remote-tracking branch 'joshcooper/issue/stable/pup-1255-windows-2012' into stable
(PUP-672) Fail fast if pop root of Context stack

Rather than silently accept a root pop and return the root binding, fail
fast with a StackUnderflow exception if attempt to pop the root of
Puppet::Context.
Merge branch 'stable'
Merge pull request #2210 from jpartlow/feature/master/pup-672-csr-extensions-as-trusted

Feature/master/pup 672 csr extensions as trusted
Merge branch 'master' of https://github.com/puppetlabs/puppet