Change from reduce to inject for ruby 1.8.5 compat
Update documentation headers for 1.6.x

Signed-off-by: Ken Barber <ken@bob.sh>
Update version docs to include a bogus version string

Signed-off-by: Ken Barber <ken@bob.sh>
Merge pull request #783 from kbarber/ticket/1.6.x/update-doc-headers

Update documentation headers for 1.6.x
PDB-273 Fix stubs for HTTP tests to stub a higher level

There was a change to the internals of Puppet in commit 747076f00ce7c6b3b86acf2823be9c6536a821d4
which meant that the way that Net::HTTP was being used changed. In short it was
a change from using Net::HTTP.get to using the full object based methodology
with Net::HTTP::Get.new instead.

Unfortunately we had a stub around Net::HTTP.get which broke when this changed.

This patch corrects our use of that lower level stub, by instead stubbing
the http_get instance method on the subject. This fulfills the spirit of the
stub while also making sure we only rely on the stable and non-internal
http_get API only.

I've also tried to preserve the expectation inside the stub 'when' block to
preserve the spirit of that test as well.

This should also be backwards compatible with the 2.7.x and stable branches.

Signed-off-by: Ken Barber <ken@bob.sh>
Merge pull request #786 from kbarber/ticket/1.5.x/PDB-273-fix_get_stubs_to_stub_higher_level

PDB-273 Fix stubs for HTTP tests to stub a higher level
Merge branch '1.5.x' into 1.6.x

* 1.5.x:
  PDB-273 Fix stubs for HTTP tests to stub a higher level
  Change from reduce to inject for ruby 1.8.5 compat
Merge branch '1.6.x'

* 1.6.x:
  PDB-273 Fix stubs for HTTP tests to stub a higher level
  Update version docs to include a bogus version string
  Update documentation headers for 1.6.x
  Change from reduce to inject for ruby 1.8.5 compat
(PDB-107) Support chained CA certificates

This patch makes puppetdb load all of the certificates in the CA .pem
file into the in-memory truststore. This allows users to use a
certificate chain (typically represented as a sequence of certs in a
single file) for trust.
Merge pull request #788 from grimradical/PDB-107-cert-chains

(PDB-107) Support chained CA certificates
Merge remote-tracking branch 'upstream/1.6.x'

* 1.6.x
  (PDB-107) Support chained CA certificates
Port PuppetDB to run on trapperkeeper

Conflicts:

	project.clj
	src/com/puppetlabs/puppetdb/cli/services.clj
	src/com/puppetlabs/puppetdb/config.clj
	test/com/puppetlabs/puppetdb/fixtures.clj
	test/com/puppetlabs/puppetdb/test/config.clj
Introduce `error-shutdown!` function for handling fatal errors

This commit does the following:

* Introduces a `context` atom in services.clj, whose value is a
  map used to keep references to the various stateful bits of
  the PuppetDB subsystems.  This is something that has been
  discussed previously as a means for potentially allowing more
  interactive development in the REPL, and for doing things
  like dynamically reloading subsystems when configuration
  changes occur.  In this commit, it's used to provide a way
  to shutdown those subsystems when a fatal error occurs.

* Adds the new `error-shutdown!` function, which is responsible
  for shutting down threads and subsystems from the `context`
  when a fatal error has occurred.
Add environment variable to allow SNAPSHOT dependencies

By default, leinengen doesn't allow SNAPSHOT dependencies when
running `uberjar` on a project that is not also a SNAPSHOT.
Because of the way that we handle the project version in the
PuppetDB project.clj file, PuppetDB is *never* in a SNAPSHOT
state.

This commit adds an environment variable that will cause
leinengen to allow SNAPSHOT deps, but only when running
acceptance tests FROM SOURCE.  Packaging jobs should still
fail if this kind of scenario is encountered for now.
Properly handle cli! errors
Properly handle cli! --help
Hit actual endpoint to see if PuppetDB started
Update to released versions of deps, use new cli exceptions

This commit does the following:
* Update to a released version of trapperkeper
* Update to a released version of kitchensink
* Change cli error handling to use new namespaced keywords
Add clarifying comments to `bootstrap.cfg`
Remove SNAPSHOT dependency from test profile