puppetlabs/puppet — pull request #888 by kbarber (2012-06-27 19:18:40+00:00)
Title: (#14598) Add SSL support for forge interaction

This patch turn on SSL support when an HTTPS url is provided, and also changes
the default URL to https://forge.puppetlabs.com so that now all interaction is
done via SSL.

As not all Ruby setups on weird operating systems are proven to work, effort
was spent in making sure validation errors are captured and returned as a
meaningful error to the user. This was also captured as a simple acceptance
test by testing against a self-signed certificate (in our case, a puppet
master).

The forge error handling in Puppet::Forge::Repository was changed to return
a new set of exceptions specific to the Puppet::Forge API set, so they can
be captured by consumers and displayed. This also helps a lot with test mocking
and tests have been changed accordingly.

To reflect the new error handling in Puppet::Forge::Repository the search face
was changed to capture exceptions and hand them off to the rendering parts as
data in a hash, to mimic how the rest of the puppet/face/module components
work.

All the existing acceptance tests were changed to now test against SSL, and
existing unit tests were also changed to reflect changes herein. New tests were
added for Puppet::ModuleTool::Applications::Searcher as previously this had no
coverage.