(Maint) Convert to new block expects
(#22471) Rescue errors specific to the YAML parser

The different yaml parsers, which are used in different versions of
ruby, end up throwing incompatible errors when loading data. The
Psych::SyntaxError that is thrown by the ruby 1.9 Psych parser is not
catchable by a generic `rescue => detail` block. Instead it needs to
explicitly call out the errors that need to be rescued.

This duplicates the error logic in Puppet::Indirector::Yaml.
(Maint) Simplify code

There was some unused code, overly complicated conditionals, and a use
of YAML that didn't use the built in writing to a stream.
(Maint) Stop asserting nothingness

Assertions that something doesn't raise an error, are not normally very
useful. In the case of these tests they only served to obscure the test
that was actually being done.
(#22471) Extract YAML interaction into shared code

The extra logic that is needed to interact with both Psych and Syck was
duplicated in the Puppet::Util::Storage and Puppet::Indirector::Yaml
classes. This pulls out a common module that wraps YAML and provides
consistent, and safe, semantics for using YAML for reading and writing.

This also removes the check ofr ::ArgumentError in addition to
::StandardError because it seems that ::ArgumentError is a sublcass of
::StandardError.
(#22471) Remove duplication by using Puppet::Util::Yaml

The new Puppet::Util::Yaml provides a common way of dealing with YAML
differences across ruby versions. This changes to two places in the
codebase that cared about these differences to use this common code.
(#22384) Log 404 and 406 responses at info

When the specific exception classes for HTTP control flow were
introduced, they ended up changing the logging from info to notice.
Notice is a much more severe level, which doesn't warrant having simple
file not found errors showing up at it. This changes the level back to
info.
(#22530) Support both YAML and PSON

The problem with the previous version of this code was that it only
allowed the report to support exactly what the user had selected. This
is alright (for the most part) for the agent, but is incorrect for the
master since the master needs to understand both formats at once. The
remedy this the default_format is now selected based on the
report_serialization_format setting whereas the supported_formats are
always both PSON and YAML.
Merge remote-tracking branch 'andy/issue/stable/22530-master-with-older-agent-sending-reports' into stable

* andy/issue/stable/22530-master-with-older-agent-sending-reports:
  (#22530) Support both YAML and PSON
Merge remote-tracking branch 'upstream/stable'

* upstream/stable:
  (#22530) Support both YAML and PSON
(maint) Don't use subject in parsedfile spec
(#19994) Ensure that failed ParsedFile operations are marked flushed

Since ParsedFile maintains a global queue of records to be flushed and
attempts to flush all outstanding operations each time a resource is flushed,
any failed operations would be retried for each resource. This lead to
unrelated resources failing.
Merge pull request #1898 from pcarlisle/ticket/19994-parsedfile-flush-failed

Ensure failed ParsedFile operations are not retried for other resources
(#22356) Add api documentation for reports

This adds a draft of documentation for the reports "REST" api.

This version is a DRAFT with lots of questions.
(#22356) Add json schemas for the report objects
(#22356) add spec test and vanilla (useless) schema
(#22356) Add json schemas for the event object
(#22356) Add report API json-schema, validation, and documentation.

This adds documentation and a complete json-schema (draft 4) for the
report API endpoint. The documentation includes an example.

A report test validates the schema itself as well as a generated report
to ensure that the schema describes what is generated.
(#22356) Change POST to PUT, fix Ruby 1.8.7 and windows issue

1.8.7 does not have File.absolute_path which broke the test. Method not
needed since jsonschema for report is no "all in one file".

The schema gem does not work on windows; tests cannot run there.

HTTP PUT is the method used for the report API, not POST.
(#22356) Remove deprecated yaml from the description

This also updates the link to where the documentation is (will be).