(#12882) Make functions reloadable

This just changes the error to a warning when a function is reloaded. There
don't appear to be any actual technical barriers to reloading.
(#11988) Don't overwrite symlinks in augeas provider

Previously, if not running with `force` set, we would try to write the
file in SAVE_NEWFILE mode to create a <filename>.augnew file with the
changes. We determined whether there were changes to be made based on
that file (and used it to show a diff). When it came time to actually
make the changes, we would simply move the .augnew file over the file
being managed. Unfortunately, if the file being managed were a symlink,
this would clobber it.

There was a fallback path in the case of force (or older versions of
augeas not supporting SAVE_NEWFILE) in which we would make the
changes in SAVE_OVERWRITE mode as normal. Now, the behavior is a
combination of the two; we still use SAVE_NEWFILE to determine whether
changes need to be made and to show a diff, but then remove the .augnew
file and always run again in SAVE_OVERWRITE mode to save the changes.
This effectively delegates the behavior of preserving the file, etc.
to augeas, so we don't duplicate effort or bugs.
(#12126) Fix autoload for ruby 1.8.5

Don't use String.end_with.
Fix up2date spec for ruby 1.8.5
Merge pull request #547 from pcarlisle/ticket/master/12126-fix-ruby1.8.5-acceptance

Ruby 1.8.5 fix for autoload and up2date
Fix ruby 1.8.5 failures for execution_spec
Merge pull request #548 from cprice-puppet/cleanup/master/ruby-185-execution-spec-failures

Fix ruby 1.8.5 failures for execution_spec
(#11988) Work around Augeas reload bug when changing save modes

After saving a file in one save mode and switching to another, Augeas realise
to reload the file when Augeas#load is called again.  Work around this by
explicitly reloading all files we saved while using the first save mode.
More fixes / cleanup for 1.8.5
Merge pull request #549 from cprice-puppet/cleanup/master/ruby-185-execution-spec-failures

More fixes / cleanup for 1.8.5
Revert "(#12844) Backwards compatibility for 'puppet agent --enable'"

This reverts commit fcac8f7163c99884fc6b75e3851c4a5e16a3ff07, which
was a backwards-compatibility workaround intended to handle some new
behavior related to puppet agent lockfiles that was introduced in
2.7.10.  The fix is being reverted because we've decided to remove
the new lockfile behavior from the 2.7.x series entirely, and push
it out to 3.x.
Revert "Merge remote-tracking branch 'masterzen/tickets/2.7.x/3757' into 2.7.x"

This reverts commit 86a806f595f8b7bb280c8c445eef51dfd71bf39d, reversing
changes made to ac81771a9cc70b5fb58f86439ebb0585ce92d4e8.

See tickets #3757, #12844, #4836, #11057.  These changes were deemed to
be breaking public APIs, and thus are being reverted from 2.7.x.  They'll
be reintroduced in 3.x.

(The changes in question were relating to how puppet agent creates /
manages its lockfiles.)

Conflicts:

	lib/puppet/util/pidlock.rb
	spec/unit/agent_spec.rb
	spec/unit/util/pidlock_spec.rb
(#10722) Display errors on HTTP report submission failures

We were failing silently if the report submission to http
returned a non-200 response code.
Merge pull request #542 from jeffmccune/ticket/2.7rc/12881_fix_cron_missing_provider_error_message

(#12881) Fix cron type default name error on windows
Merge pull request #546 from nicklewis/ticket/2.7.x/11988

(#11988) Don't overwrite symlinks in augeas provider
(#12844) Agent lockfiles: backwards compatibility with 2.7.10/2.7.11

In 2.7.10 there was a change in behavior introduced with regards
to agent lockfiles.  Basically we split the concept of "an agent
is currently running" apart from the concept of "the agent has
been administratively disabled" by using 2 different lockfiles.

That change was determined to have broken compatibility with
mcollective, so it has been reverted as of 2.7.12.

This commit provides backwards compatibility between 2.7.12+
and 2.7.10/2.7.11 for cases where a user may have administratively
disabled their agent and then upgraded to a newer version of puppet.
(#7592) Remove redundant call to String#to_s

Previously, the augeas provider made calls like the following:

 @aug.get(key).to_s

Since the Augeas#get method returns a String not an array, the to_s
call is redundant. (Note the #match method does return an array.)

The augeas tests were stubbing the #get method to return an array in
some places (and a string in others). Prior to 1.9.2, ruby will
automatically convert ["foo"].to_s to "foo", so everything worked as
expected. However, under 1.9.2, ["foo"].to_s becomes "[\"foo\"]".

These failures weren't noticed earlier, because our 1.9.2@allFeatures
jenkins nodes do not have ruby-augeas installed. In other words, tests
that require Puppet.features.augeas? were never running in
Jenkins. The recent change to improve augeas testing, removed the
dependency on this feature being installed, so these tests started
failing.

This commit just removes the redundant call to String#to_s, and
updates the spec tests to match what the Augeas#get method really
returns.
Merge pull request #552 from nicklewis/ticket/2.7.x/11988

Ticket/2.7.x/11988 Augeas spec fixes on Ruby 1.9
(#12933) Better error message when agent is administratively disabled

Detect the difference between the cases where an agent run is
aborted due to another agent run already in progress vs. being
aborted due to the agent being administratively disabled via
'--disable', and print a more useful message for the latter case.
(#12914) Allow puppet to be interrupted while waiting for child

Previously, puppet on Windows could not be interrupted, e.g. Ctrl-C,
while waiting for a child process it executed to exit. For example,
when executing a pre/post run command.

This commit changes puppet to poll the state of the child process'
handle, sleeping for 1 second in between.