Update `Gemfile` to reflect current gem dependencies

Over time the gem dependencies for Razor have changed, especially with the
introduction of a real unit test suite with a lighter weight dependency chain
than the acceptance suite.

This updates the `Gemfile` to reflect that, allowing us to use that for all
our automated testing needs.  That helps keep this accurate, which hopefully
also makes life easier for new developers on the project.

It also eliminates a number of unused gems, including `autotest`, that had
fairly heavy (and sometimes broken) dependencies.

Signed-off-by: Daniel Pittman <daniel@rimspace.net>
Merge pull request #414 from daniel-pittman/feature/master/update-gemfile-to-current-dependencies

Update `Gemfile` to reflect current gem dependencies

This allows the `bundler` tool to install the correct set of modules for running the Razor unit test suite.
(maint) Remove natty from build_defaults

Ubuntu's Natty has been EOL for 3 months
[http://en.wikipedia.org/wiki/List_of_Ubuntu_releases#Ubuntu_11.04_.28Natty_Narwhal.29],
so this commit removes the natty cow from build_defaults.
(maint) Remove rc_mocks from build_defaults

Packaging internals have been updated to no longer require rc_mocks, so this
commit removes the rc_mocks from the build_defaults.
(maint) Add f18 mocks to build_defaults

Fedora 18 has been released to the world, so we should build packages for it.
This commit adds the fedora 18 mocks to the build_defaults so we can easily
supply fedora 18 packages.
(maint) Update debian changelog template

This commit updates the debian changelog template to remove EOL ubuntu releases
and add the newest ubuntu release, quantal.
Merge pull request #415 from haus/remove_natty_from_cows_list

* Remove natty from build_defaults

Since the distribution no longer exists upstream, stop building packages for it.  Users who were on the platform are advised to upgrade to a supported version of Ubuntu.
Merge pull request #416 from haus/remove_rc_mocks

Packaging updates
[Persist] Add persist_username & persist_password to Config::Server.

Currently there is no mechanism to pass authentication credentials to a
local or remote persistence service (such as MongoDB or PostgreSQL).
While a non-authenticated connection works out of the box with a local
MongoDB server, this is not the case with a local PostgreSQL server.

Furthermore there is no way to configure Razor to use a remote MongoDB
server protected by a username/password authentication.

As a result the PersistPlugin#connect method signature was augmented to
take `username` and `password` parameters. Each persistence
implementation is responsible for using or ignoring these additional
parameters when establishing a database connection.
[Postgres] Bugfix: uuid variable not defined in #object_doc_get_by_uuid.
[Postgres] Ensure Ruby symbols are (de)serialized.

In the MongoPlugin Ruby symbols are preserved in hash values thanks to
BSON, but in other persistence plugins symbols will be coerced to
strings (via a JSON.generate in the Postgres case) before saving. When
the object is deserialized the values that were Ruby symbols are now
strings which is not expected by the rest of the codebase.

Instead, we can "encode" the hash data structures containing symbols by
transforming any symbols to strings, for example: :symbol -> ":symbol".
When the data is read back out of the database we can "decode" these
data structures and reconstitute the symbols.
[Postgres] Allow ID of type VARCHAR only for policy_table.

A single row is inserted into this table with a "uuid" set to
"policy_table" which is not a valid UUID.
[Postgres] Insert active_model object if '@version' attr is < 0.

The object document that is persisted to the :active collection is a
PolicyTemplate and as such will have a version attribute greater than 1.
[packaging] Update mocks for rpmbuilder mock format

The Puppet Labs mocks created by rpmbuilder have assumed a new naming format,
pl-el-* vs el-* and pl-fedora-* vs fedora-*, in order to avoid overwriting the
configurations supplied by the mock package. This commit updates the mocks in
Razor to reflect the new standard, so that we can continue to build packages
with builders created with the rpmbuilder module. As we add new builders that
do not have legacy configurations, this will become critical to avoid broken
pipelines.

Signed-off-by: Moses Mendoza <moses@puppetlabs.com>
(#417) Add gems over-zealously removed from Gemfile

The Chef cookbook currently depends on the Gemfile for runtime installation of
the dependent gems in Razor; they discovered that a couple of gems that are
still needed, daemons and pg, were eliminated in the last update of this file.

This restores them to their place in the order of things, and should fix the
third party chef cookbook, at least for now, and so closes #417.

Signed-off-by: Daniel Pittman <daniel@rimspace.net>
Merge pull request #422 from daniel-pittman/bug/master/417-overzealous-gem-removal

(#417) Add gems over-zealously removed from Gemfile
Remove hard rspec dependency in Rakefile

Razor's Rakefile requires rspec/core/rake_task to add spec tasks to the task
list. This is useful when running tests, but should not be required when
building packages. This commit addresses that by rescuing the LoadError on
rspec/core/rake_task and only adding the spec related tasks if the
Rspec::Core::RakeTask constant is defined. This allows packaging tasks to be
run without rspec installed, but will still allow tests to be run and displayed
if rspec is installed and available.
Remove trailing whitespace in Rakefile
(#418) Resolve symlinks when determining razor install location

The `razor` binary installs in a non-standard location, and depends on the
value of the `__FILE__` variable supplied by the Ruby interpreter to find the
library code it depends on.

This didn't work when a symlink was used for the top-level file, since the
ruby interpreter would supply the symlink, not the resolved path, and that
could be outside the install tree.

This updates the command line and daemon scripts to resolve the absolute real
path on disk from `__FILE__` using the standard Pathname library, before
using it.

This closes #418.

Signed-off-by: Daniel Pittman <daniel@rimspace.net>
Update contributor license agreement URL

This updates the contributor license agreement URL to reflect a change
made externally to the project.