Update lib/hiera.rb for 1.1.1-rc1
Update lib/hiera.rb for 1.1.1
Spelling.
(Maint) Make Hiera operate with /dev/null config file

Without this patch applied, some Puppet spec tests cause the following
exceptional behavior:

    $ rspec -fp spec/unit/parser/functions/hiera_include_spec.rb
    Failure/Error: scope.function_hiera_include(['key'])
    TypeError: no implicit conversion from nil to integer
    # /workspace/puppet-3.x/src/hiera/lib/hiera/config.rb:15:in `load'
    # ./lib/hiera_puppet.rb:64:in `hiera_config'
    # ./lib/hiera_puppet.rb:57:in `hiera'
    # ./lib/hiera_puppet.rb:13:in `lookup'
    # ./lib/puppet/parser/functions/hiera_include.rb:5:in `block in <module:Functions>'
    # ./lib/puppet/parser/functions.rb:63:in `block in newfunction'
    # ./lib/puppet/parser/scope.rb:445:in `method_missing'

The root cause of this problem is that the Psych YAML parser can't handle
loading from '/dev/null':

    >> YAML.load_file('/dev/null')
    TypeError: no implicit conversion from nil to integer
        from /Users/jeff/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/psych.rb:297:in `initialize'
        from /Users/jeff/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/psych.rb:297:in `open'
        from /Users/jeff/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/psych.rb:297:in `load_file'
        from (irb):2
        from /Users/jeff/.rbenv/versions/1.9.3-p194/bin/irb:12:in `<main>'

This patch fixes the problem by catching the exception inside of Hiera and
returning `false` instead of raising an exception.  The default configuration
settings are then used instead of causing an unhandled exception.
Merge pull request #103 from jeffmccune/fix/master/dev_null_config

(Maint) Make Hiera operate with /dev/null config file
Merge pull request #102 from mrwacky42/master

(#17708) Fix spelling error.
Add quantal to default cows list in build_defaults.
Remove fedora 15 mocks from default mocks in build_defaults.
Merge pull request #104 from haus/maint/1.x/update_build_defaults

Maint/1.x/update build defaults
(#17087) Fix backend key in hiera.yaml

Previously the hiera.yaml that is laid down in packaged installs used 'backend'
instead of 'backends' which means that hiera falls through to the default yaml
backend, as no 'backends' key exists in the config. This commit fixes the
hiera.yaml file to use 'backends' instead.
Merge pull request #105 from haus/ticket/1.x/17087_fixup_hiera_yaml

(#17087) Fix backend key in hiera.yaml
(maint) Handle lack of RSpec::Core::RakeTask gracefully

Having a hard dependency of RSpec to run rake tasks, specifically packaging
tasks, is unnecessary. This commit rescues any LoadError from loading rubygems
and rspec and also only presents the spec task if RSpec::Core::RakeTask is
defined/loaded.
Merge pull request #106 from haus/maint/1.x/make_rspec_optional

(maint) Handle lack of RSpec::Core::RakeTask gracefully
Spelling.
Update Hiera VERSION to 1.1.2-rc1
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