(maint) Fix typo in yardoc
(PUP-2557) Add deprecation of node inheritance

This makes a deprecation warning being logged whenever a
node is instantiated with a parent in 3x, and a warning is issued
during validation of the source text when future parser is used.

The intent is to remove the support for node inheritance in
Puppet 4.0.0.
(maint) Fix a typo in reserved word symbol
(PUP-2755) Move iterative functions to the new API

This moves all the iterative functions to the 4x function API.
Functions are now simpler to read. A shared utility module
was created for repeated asserts.

While testing it was clear that it is difficult to use
Puppet.lookup(:loaders), and the evaluator was changed to get the
loaders via the compiler instead.

The evaluator tests are changed to make use of the simplified
handling of the loaders.

The tests for the functions that have moved, were also moved, but
are unchanged in what they test.
(maint) Add leaky local scope tests

This adds tests that local and match scope handling is corrent
and does not leak variable bindings.
(PUP-2755) Fix issues after changes from PUP-514

This fixes merge issues that were not automatically done due to files
being moved and changed structurally.

The support for captures_rest was lost. This is now reinstated in
the shared IterativeSupport module and in reduce and slice where the
semantics of "serving_size" are slightly different.
(maint) Remove warning about expect().to in specs

The Puppet Gemfile is pinned against RSpec 2.11.x, so there should be any
reason to worry about RSpec 2.9.x.
Merge pull request #2775 from Sharpie/remove-rspec-29-warning

(maint) Remove warning about expect().to in specs
(PUP-2738) FFI::Pointer#read_win32_local_pointer

 - Create new block style helper that automatically calls LocalFree on
   a returned pointer after it's done being used. Since the ptr is no
   longer valid after the block yields, return nil from the method
 - Move FFI definition for LocalFree into FFI::WIN32 and out of
   Puppet::Util::Windows::Error and Puppet::Util::Windows::SID
 - Ensure that proper wide string is resolved / passed out of
   Puppet::Util::Windows::Error.format_error_code and
   Puppet::Util::Windows::SID.sid_ptr_to_string when resolving string
   inside of a block
 - Refactor Puppet::Util::Windows::SID.valid_sid? to read ptr inside
   block, use closure to store the 'valid' return value
Merge pull request #2658 from jpartlow/maint/master/util-dev-puppet-master-no-loglevel-defaults

(maint) Change dev-puppet-master script not to log debug and trace
(maint) Refactor file content remote source specs

The "from an explicit fileserver" describe block mostly duplicted the original
"from remote source" block and so the two have been merged. Additionally, some
specific improvements have been made to the tests:

  - Tests for `puppet:///` vs. `puppet://` have been fixed and moved to
    explicit scenarios rather than implicit expectations in the global
    `before` block

  - The number of lines written to test files has been reduced from
    10000 to 10. This speeds up the suite and prevents failing tests from
    belching a wall of red text.

  - Replace instances of `.should` with `expect().to`.
(PUP-2700) Fix regression in file_content requests

The resolution of PUP-1892 caused percent encoding of file_content requests to
be doubled. This created a regression where Puppet file servers would respond
with a 404 not found status unless multiple decode operations were applied.

This patch fixes the issue by building the file_content indirector request
directly from the file source parameter instead of casting it to an escaped
URI. The `Indirector::Request` class handles the necessary URI escaping during
initialization.
Merge pull request #2772 from Sharpie/fix-double-uri-escape

(PUP-2700) Fix double uri escape
Merge branch 'stable'
Merge branch 'master' into puppet-4
Merge pull request #2604 from johnduarte/pup-2401-ssh_authorized_key-acceptance

(PUP-2401) Add ssh_authorized_key acceptance tests
(PUP-2557) Issue deprecation warning for AST::Node inheritance

Puppet.deprecation_warning constructs an internal stack trace and is
mostly useful for internal deprecation notices as opposed to notices of
deprecation in Puppet manifests. Because of this, a regular warning was
being used in its place for the node inheritance deprecation. But this
would bypass limits on deprecation warnings and the ability to suppress
deprecation warnings added in PUP-2650.

This commit adds a puppet_deprecation_warning() which shares code now
with deprecation_warning, and which traces to the file and line of the
node's context. The AST::Node inheritance warning uses this method now.
(maint) Disable future parser warnings based on :disable_warnings

Work on PUP-2650 missed that the future parser has a separate method of
handling deprecation warnings. This changes IssueReporter to muzzle
deprecations when 'deprecations' is in Puppet[:disable_warnings].  It
also adjusts the max_warnings/deprecations counts to be one-based, so a
setting of Puppet[:max_warnings] = 4 emits at most 4 warnings per
manifest from future parser.  A setting of 0 blocks the warnings
altogether.

Adds specs for the current behavior.
(maint) Refactor EvaluatingParser to use IssueReporter

There was some older code in the EvaluatingParser for logging
warnings/errors which duplicated the Puppet::Pops::IssueReporter.
This just refactors Puppet::Pops::Parser::EvaluatingParser to use the
IssueReporter directly.
Merge pull request #2777 from jpartlow/issue/master/pup-2557-deprecate-and-remove-node-inheritence

Issue/master/pup 2557 deprecate and remove node inheritence