Add deep-merge feature to backend lookups

- Config option :merge_behavior => :native|:deep|:deeper
- Add optional requirement on deep_merge gem to support
  :deep and :deeper options
- Update Yaml backend to use Backend.merge_answer
- Update Json backend to use Backend.merge_answer
Allow both symbols and strings when deciding behavior of merge_answer
Spelling.
Merge pull request #102 from mrwacky42/master

(#17708) Fix spelling error.
Merge branch '1.x'
Fix undefined method `[]' for nil:NilClass error in yaml_backend_spec.rb

Fix configuration assumptions in yaml backend tests

Without this patch applied the following spec tests are failing.  This
patch fixes the problem by making sure the configuration is initialized
to the default values before running the example group.

    $ rake test
    ............FF.F..................................................................................

    Failures:

      1) Hiera::Backend::Yaml_backend#lookup should ignore empty hash of data sources for hash searches
         Failure/Error: @backend.lookup("key", {}, nil, :hash).should == {"a" => "answer"}
         NoMethodError:
           undefined method `[]' for nil:NilClass
         # ./lib/hiera/config.rb:51:in `[]'
         # ./lib/hiera/backend.rb:153:in `merge_answer'
         # ./lib/hiera/backend/yaml_backend.rb:55:in `block in lookup'
         # ./lib/hiera/backend/yaml_backend.rb:16:in `lookup'
         # ./spec/unit/backend/yaml_backend_spec.rb:74:in `block (3 levels) in <module:Backend>'

      2) Hiera::Backend::Yaml_backend#lookup should build a merged hash of data sources for hash searches
         Failure/Error: @backend.lookup("key", {}, nil, :hash).should == {"a" => "answer", "b" => "answer"}
         NoMethodError:
           undefined method `[]' for nil:NilClass
         # ./lib/hiera/config.rb:51:in `[]'
         # ./lib/hiera/backend.rb:153:in `merge_answer'
         # ./lib/hiera/backend/yaml_backend.rb:55:in `block in lookup'
         # ./lib/hiera/backend/yaml_backend.rb:16:in `lookup'
         # ./spec/unit/backend/yaml_backend_spec.rb:85:in `block (3 levels) in <module:Backend>'

      3) Hiera::Backend::Yaml_backend#lookup should fail when trying to merge an Array
         Failure/Error: lambda {@backend.lookup("key", {}, nil, :hash)}.should raise_error(Exception, "Hiera type mismatch: expected Hash and got Array")
           expected Exception with "Hiera type mismatch: expected Hash and got Array", got #<NoMethodError: undefined method `[]' for nil:NilClass> with backtrace:
             # ./lib/hiera/config.rb:51:in `[]'
             # ./lib/hiera/backend.rb:153:in `merge_answer'
             # ./lib/hiera/backend/yaml_backend.rb:55:in `block in lookup'
             # ./lib/hiera/backend/yaml_backend.rb:16:in `lookup'
             # ./spec/unit/backend/yaml_backend_spec.rb:107:in `block (4 levels) in <module:Backend>'
             # ./spec/unit/backend/yaml_backend_spec.rb:107:in `block (3 levels) in <module:Backend>'
         # ./spec/unit/backend/yaml_backend_spec.rb:107:in `block (3 levels) in <module:Backend>'

    Finished in 0.08651 seconds
    98 examples, 3 failures
Merge branch 'justenwalker-master' (Pull Request 100)

https://github.com/puppetlabs/hiera/pull/100

* justenwalker-master:
  Fix undefined method `[]' for nil:NilClass error in yaml_backend_spec.rb
  Allow both symbols and strings when deciding behavior of merge_answer
  Add deep-merge feature to backend lookups
Merge branch '1.x'
(maint) Add Travis CI Support

This patch enables Travis CI support using the travis configuration.
Email notifications are turned off to reduce inbox clutter.

This patch should coincide with enabling Travis CI support for pull requests.
A build status image is also included in the project README.
Merge branch 'feature/master/travis_ci'

* feature/master/travis_ci:
  (maint) Add Travis CI Support
16644 - should have a generic file cache

Add a general file cacher in Hiera::Filecache based on the work that was
done in the YAML backend.

Adjust the YAML and JSON backends to use this cache and update tests

The YAML tests had a bunch of unneeded calls to YAML.load in them so
refactored those to have the already-parsed data in them like the JSON
backend has
Merge branch 'ripienaar-feature/master/16644'

* ripienaar-feature/master/16644:
  16644 - should have a generic file cache
Merge branch '1.x'

* 1.x:
  (maint) Add Travis CI support to active branches

Conflicts:
	.gitignore
Merge branch '1.x'

* 1.x:
  Fix undefined method `[]' for nil:NilClass error in yaml_backend_spec.rb
  Allow both symbols and strings when deciding behavior of merge_answer
  Add deep-merge feature to backend lookups
(#16089) Reduce scope lookups in parse_string

Slightly modified version of patch from Jeff Goldschrafe (see
https://projects.puppetlabs.com/issues/16089). This version only optimizes the
lookup to the main scope, since this appears to be the only used code path.
This version only optimizes the lookup to the main scope, since this appears
to be the only used code path. This version only optimizes the lookup to the
main scope, since this appears to be the only used code path. This version
only optimizes the lookup to the main scope, since this appears to be the only
used code path.
Merge branch '1.x'

* 1.x:
  (#16089) Reduce scope lookups in parse_string
comment typo fix in lib/hiera/backend.rb
Merge pull request #118 from floatingatoll/patch-1

comment typo fix in lib/hiera/backend.rb
Merge branch '1.x'

* 1.x:
  (maint) Add Ruby 2.0.0 to Travis build matrix
Merge branch '1.x'