(maint) Code base cleanup, use 2 space indention.

Before this patch the hiera code base used two different number of
spaces to indent code. In some cases 2 spaces where used, and the rest 4
spaces.

This patch normalizes the number of spaces used for indenting code, and
now uses 2 spaces which is in-line with the Puppetlabs style guide.
Merge pull request #30 from kelseyhightower/maint/master/use_2_space_indention

(maint) Code base cleanup, use 2 space indention.
hiera working on ruby 1.9.2/1.9.3, issue #10975 (http://projects.puppetlabs.com/issues/10975)
Merge pull request #33 from mindreframer/master

just applied the patch from issue #10975, could you please release a minor update? thx
Fix VERSION contant in lib/hiera.rb

When the gem is packaged up, the VERSION field is created based on the
last signed tag from this git repository; however after that change
happened and the gem was shipped, I foolishly forgot to commit that
change so the lib/hiera.rb file thought it was still at 0.2.1 even
though it was really at 0.3.0. This fixes my mistake.

Signed-off-by: Michael Stahnke <stahnma@puppetlabs.com>
Merge pull request #34 from stahnma/fix_hiera_version

Fix VERSION contant in lib/hiera.rb
Commit caching on YAML Backend

Previously, the YAML backend would read from disk every time it needed
to check a hierarchy. This commit introduces memoization through an
instance variable so a file is read only if the instance variable is
empty, and only if the file has not changed. To check if the file has
changed (or if the cache is stale), we stat the file and compare the
mtime, size, and inode. Tests have been added for this new
functionality.

Fix Bugs and Commit Tests
(#13641) Fix Hiera::Backend#parse_string to support :undefined in extra_data

The method #parse_string supports an extra field 'extra_data' which is used by
hiera-mysql. When combined with hiera-puppet, sometimes the symbol :undefined
is returned, to signify that the data is undefined in Puppet.

While we do have tests and code to capture this state, the method does not
support falling back to 'extra_data' in this situation.

This patch supports the proper fallback to extra_data if it sees the special
symbol :undefined, so that these backends can be properly combined.
Merge branch 'ticket/master/13641'

* ticket/master/13641:
  (#13641) Fix Hiera::Backend#parse_string to support :undefined in extra_data

Reviewed-by: Daniel Pittman <daniel@rimspace.net>
Reviewed-by: Ken Barber <ken@bob.sh>
(#14124) Load rake tasks directly to fix tests for Ruby 1.9.x

The way we loaded rake tasks was not compatible with Ruby 1.9.x, as it relied
on the fact that Ruby 1.8.x included . in its load path. This patch loads our
rake tasks directly instead.
(#14147) Handle lack of rubygems gracefully

Hiera previously expected rubygems to be available. When running from source or
a package, rubygems may not be available. This fix rescues the load error on
rubygem and silently ignores it so that if rubygems is present, it can be used,
but if it isn't present, hiera can still function.
(#14148) Add docs to Hiera packaging

Previously hiera packaging did not include CHANGES.txt, COPYING, or README.md.
This commit adds them to the gem spec and the tarball, so they can appear in
future releases.
(#14150) Use tar_gz instead of tar

This replaces tar with tar_gz so that the package task will produce tar.gz
instead of .tgz, which is more in line with other puppet products.
Merge pull request #40 from kbarber/ticket/master/14124_ruby19_broken_rake

(#14124) Load rake tasks directly to fix tests for Ruby 1.9.x
(maint) Fix failing spec test on Ruby 1.9.3

Without this patch the specs tests do no pass on Ruby 1.9. The output
for `Load Errors` has changed between Ruby 1.8.7 and 1.9.3. This causes
the `Hiera#logger` spec to fail on Ruby 1.9.3 as we are relying on the
output from 1.8.7.

Instead of relying on a string which is subject to change in the future,
we are now checking that the correct logger is being used.
Merge pull request #42 from haus/ticket/master/14148_add_docs_to_package_rake_task

(#14148) Add docs to Hiera packaging
Merge pull request #43 from haus/ticket/master/14150_use_tar_gz_for_packaging

(#14150) Use tar_gz instead of tar
Merge pull request #44 from kelseyhightower/maint/master/fix_failing_spec_on_19

(maint) Fix failing spec test on Ruby 1.9.3
Merge pull request #41 from haus/ticket/master/14147_handle_rubygems_gracefully

(#14147) Handle lack of rubygems gracefully
(maint) Make noop logger work on Ruby 1.9.x

With out this patch the noop logger does not load on Ruby 1.9.x when
running Hiera from the CLI. Instead we get the follow error:

    LoadError: cannot load such file -- hiera/noop_logger

This patch resolves this issue by moving the noop_logger definition from
`bin/hiera` to `lib/hiera/noop_logger.rb`