Add some tests

This commit adds the initial unit tests for the
data compilation tools.

This commit refuters the code a bit to add better
unit test coverage:
- all config file lookup is done through a method
(to make it easier to mock)

It also resolves a few issues that were discovered
during the testing process:
- arrays could not be interpolated
- all hiera values were not being interpolated
- duplicate classes should be removed from list
Add fact lookup

This commit adds the ability to use Puppet's facts
terminus to retrieve fact values for testing.
Merge pull request #2 from dachary/master

fix typos
fix bug

some compile bugs slipped past me
introduce cert_for_facts option

The previous implementation of fact retrieval for
a different machine that what you were running on
was a but naive.

It tried to use Puppet[:certname] for this purpose.
This seemed to work for most use cases, but failed
for the puppetdb facts terminus b/c this terminus
uses the certname to find the certificates to use
for ssl auth.

This commit adds its own option cert_for_facts that
can be used to specify an external cert name to
lookup.
Fix faces method call issue

changed invocation of defaultto to
default_to
Make fact interpolation optional

This commit makes the interpolation of facts
from hiera_data optional.

This allows users to see what value is being
looked-up from globals without having to
rely on the tricky configuraiton requiered
to get the facts to find the right source.
pass options to get_classes

fixes a small bug where the wrong data
was being passed to the get_classes method.
Adds hiera key lookup

Reimplements lookup methods to allow them to accep
a block.

resolve two data_mapping compile issues

1. If the hiera value was false, it did not retrieve the
value correctly (b/c it did not distinguish between
nil and false keys)
2. It was returning the interpolated string even when there was
no interpolation.
Minor comment and log changes.
More logging
Ensure class list of never nil

It the class list for Puppet::Node is ever
nil, Puppet blow up with the error:

  Error: Invalid tag "" on node setup

This commit adds logic to ensure that it is
set to [] when no classes need to be added.
Add Apache2 License.
Continued dev effort

This patch does two things:

1. Decouples the Puppet::Node object from the helper.

This is done to simply the helper tests so it is
not as coupled with Puppet

2. Allow scenarios to interpolate classes and class_groups

3. Expands test coverage
Fix typo config -> config

facts were not being used proposely
b/c of this typo
Do not load bodepd directory from top-scope

Puppet pluginsync is stupid about resolving
top scope requires.

This commit moves those requires into code that
will not be executed during pluginsync.
Add tests for data_mapping compilation
Add tests for hiera_data compilation
Better error handling when role does not exist

Adds error handling when role does not exist
Add get_scenario and get_roles

Adds subcommands to return the list of roles
and the current scenario.