Add docs badge to README
(PUP-1892) File resources do not work with fileservers that are not the current puppetmaster.

the source parameter makes the 'uri' method private; assumably for security, the actual result is that
noone can get the full URI from the source param. The end result is that when collecting the source data
the file_content class uses full_path instead, which gets magically completed to use the puppetmaster.

If your fileserver is in fact some other remote host, that data is lost. This change makes 'uri' public
and adjusts the content handler so that it properly delivers either a URI as a string, or a
full path without leading slash (which is what the previous state was.)
(PUP-1986) Ignore source_permissions when downloading plugins on POSIX

Module pluginsync is handled by creating a Catalog with a File resource,
and Puppet's File resource defaults to replicating the source file
owner, group and mode. However, owner/group are additionally set to
Process.owner/group for a pluginsync download on POSIX, which will
typically be root during an agent run.

This combination of behavior meant that a root agent run on the puppet
master would cause Puppet's $libdir to be reset to the mode of the first
source module lib, but owned by root.

The puppet master, running as root, chuser's to the service user.  In a
Webrick setup, requests are handled by that service user; in a Rack
setup, it depends on how the Rack service has been setup, but typically
it is the service user again.  So, if the source module had restrictive
permissions, the puppet master, running as the service user, could end
up no longer being able to read $libdir.

On Windows, we were already setting the File type's source_permissions
parameter to :ignore when pluginsyncing.  This commit sets
source_permissions to ignore regardless of the platform, leaving
$libdir's mode unchanged on POSIX as well.

TODO unfortunately this means that owner/group of $libdir are still
being managed on POSIX by pluginsync, which will take precedence over
settings. This seems wrong.
(PUP-2237) Improve puppet-mode indentation, XEmacs compatibility

Handle a closing brace followed by a comma, which is the end of a
selector inside a resource.  Keep indentation at the same level in
that case.

Correctly indent the line following an array ending with :, which
is an array of resource names at the start of a resource definition.

Restore proper indentation following a line with a closing paren
and opening brace.

Properly highlight the resource name when setting defaults for that
resource.

Also clean up some places where \( or \) was used in a string to
represent a literal paren.  The backslash is extraneous here and is
ignored, so omit it.

Fix compatibility with XEmacs.
(PUP-2237) Fix end of string in Emacs autoload for puppet-mode

Autoload file match patterns should end in \\' to match the actual
end of string, not $ to match end of line, just in case file names
contain newlines (not that this is horribly likely, but this is
Emacs best practice).
(PUP-2101) resource parser: add the resource name on the validation error message when using create_resources
(PUP-2241) Simplify dispatching of logging functions

This uses a simpler dispatching mechanism. Not meaningful to test
against 0-infinity of Optional[Object].
(packaging) Update PUPPETVERSION to 3.5.1
Merge branch 'stable'

* stable:
  (packaging) Update PUPPETVERSION to 3.5.1
Merge pull request #2474 from rrrene/patch-1

Add docs badge to README
Merge pull request #2530 from rra/emacs

(PUP-2237) Updates to Emacs puppet-mode for indentation, XEmacs, file name matching
(PUP-2009) Add acceptance test for dynamic environments

Adds a test scenario for dynamic environment interpolation in manifest,
modulepath and hiera settings.
Merge branch 'issue/master/pup-2009-dynamic-environment-acceptance'

* issue/master/pup-2009-dynamic-environment-acceptance:
  (PUP-2009) Add acceptance test for dynamic environments
(PUP-2282) Allow deprecation warnings to supply optional key

Puppet::Util::Logging#deprecation_warning keeps track of issued
deprecations keyed by the originating code line.  This works reasonably
well for tracing API deprecations, but can cause a problem for
notifications coming from internal calls which might happen to be called
multiple times by other code sections. It also causes problems if the
same line of code issues different deprecation warnings (say by
interpolating some parameter into the message).

This patch allows an optional key string to be submitted with the
deprecation_warning which takes precedence over using the
originating call line as the key.
(PUP-2176) Propagate non-autoloaded function to loader

This makes it possible to write functions in site.pp, or directly
in apply -e. When encountered, the PopsBridge will define them in
the appropriate loader.

A new SimpleEnvironmentLoader was introduced (it is basically a loader
that does not find anything, but can be given entries from an external
source). The functionality to instantiate from a model was added to the
PuppetFunctionInstantiator. The ability to produce a URI with the source
location was added to SourcePosAdapter.

The compiler initialization sequence is altered in this commit because
the very early loading and parsing of site.pp (or equivalent), and the
compilers context overrides (environment, injector, global_scope, etc)
was done too late. Now, the overrides are constructed once, but used
twice (in the initvars method, and in the compile method).
(maint) Make context handle lazy initialization

This makes it possible to store a Proc in the context. On lookup
the Proc is called and the result is memoized for subseqent lookups.
(PUP-2176) Use lazy initialization of context in compiler

This makes the compiler initialize its context lazily wrt. the
injector and loader when using the future branch of the logic.

This is required because loaders and injector would otherwise
need to be initialized twice; once for the initial import and
a second time when doing the compilation. Now the values are retained.

The initial problem was that compiler's initial import is triggered
before loaders and injector was initialized (from initvars). This is
required for using logic from the loader subsystem. Specifically for
being able to define a function on the command line using puppet apply.
(maint) fix (loader) tests that now get different error message text

The loaders expected an error from validation that qualified
names for puppet functions were not allowed. This changed, and the
error is now that the function in question has a mismatched name.
(PUP-2282) Change environment setting deprecations to use keys

Ensures that deprecation warnings are issued for each deprecated
setting.
(maint) Remove unused helper method