(#12402) split log messages into individual lines before sending to syslog
(#12359) Improve logging of backtraces

There were a ton of places in the code where we were doing this:

    rescue => detail
       puts detail.backtrace if Puppet[:trace]

In addition to this not being very DRY, it was making it harder to debug the puppet master from within the acceptance testing framework (because when puppet is run in a daemon mode, stdout is swallowed... the "puts" messages were not showing up in the log files or anywhere else, so it was impossible to see the backtrace when something went wrong on the master).

This commit refactors all(?) occurrences of this pattern to call a new utility method:  Puppet::Util::Logging.log_exception(), which provides one single code path for handling exception logging.  It still only logs the backtrace if Puppet[:trace] == true, but it now logs it through the standard Puppet logging framework rather than via "puts".
(#12336) Util::'which' may fail if user's path contains a tilde

In certain circumstances (user's HOME environment variable is not set, or has
been unset during ruby execution, plus PATH contains a literal ~ character), Util::w
hich would raise an ArgumentError.  Handle this error by logging a warning (one time only) and ignoring this element of the PATH.
(#12490) execution_spec causes failures on windows

With regards to calling "execute_posix" during test runs:

a) It should not be called during windows test runs, and

b) We needs to take more care not to inadvertently set
environment variables in the main ruby process.
Merge pull request #476 from joshcooper/maint/master/test-fixes

Maint: Fix parenthesize warning message
Merge pull request #473 from cprice-puppet/bug/master/12336-PATH-contains-tilde

(#12336) Util::'which' may fail if user's path contains a tilde
Merge branch 'bug/master/12490-execution_spec-sets-ENV' of https://github.com/cprice-puppet/puppet

* 'bug/master/12490-execution_spec-sets-ENV' of https://github.com/cprice-puppet/puppet:
  (#12490) execution_spec causes failures on windows
Updates and bug fixes to puppet-mode.el

A jumbo update for the Puppet Emacs mode.  This update does the
following:

* Fix indentation of array contents when the first element of the
  array isn't on the same line as the opening of the array.

* Fix indentation of the else and elsif line and after a ") {" line
  that ends the parameters to a define and starts the body of the
  define.

* Indenting a line no longer moves the point to the position following
  the indentation unless the line is entirely whitespace.

* Update font lock keywords with all the latest Puppet keywords.

* The type face is now used properly for all resource types.
  Previously, some of them would show up as the keyword face because
  they were also keywords. puppet-mode is now smarter about figuring
  out the context.

* regexp-opt is now used to make keyword matching more efficient.

* Clean up unnecessarily-complex code and refactor somewhat.

* Add standard elisp library file headers and footer.
Merge pull request #456 from cprice-puppet/refactor/master/12359-improve-backtrace-logging

Refactor/master/12359 improve backtrace logging
Merge pull request #462 from lurkermike/master

(#12402) split log messages into individual lines before sending to syslog
(#12490) fixing windows spec tests

This should fix the failures in exec_spec.rb and util_spec.rb.  Has
been tested on Win2k3.
Merge pull request #478 from cprice-puppet/bug/master/12490-execution_spec-sets-ENV

(#12490) fixing windows spec tests
Add support for Yaourt (AUR helper) to Pacman provider
Correctly check that Yaourt is present
Just fixed the indentation on a couple lines so the website doesn't use
smart quotes!
Merge pull request #484 from binford2k/master

Indentation fix
Fix a few acceptance tests that were checking stderr

We recently made a change that tried to fix places where we had been
writing output directly to stdout/stderr rather than using the
Puppet::Util::Logging framework.  There were a few acceptance tests
that were not updated properly in accordance with this change; this
should fix "ticket_8740_should_not_enumerate_root_directory.rb" and
"should_not_reassing.rb".
Merge pull request #491 from cprice-puppet/bugs/master/fix_stderr_acceptance_tests

Fix a few acceptance tests that were checking stderr
Clean up deprecation warning

Puppet::Util.execute deprecation warning message had a typo; also
fixed a few places that were calling the deprecated code path.
Merge pull request #495 from cprice-puppet/cleanup/master/deprecated-util-execution-message

Clean up deprecation warning