(#18214) Update gem dependency to json_pure from json

As the json gem requires ruby-dev, gcc, and other tools to install via
rubygems, this commit changes the dependency to json_pure for gems, which will
lessen the dependencies required for install, as json_pure is pure ruby, with
no compilation required.
Merge pull request #107 from haus/ticket/1.x/18214_update_gem_depends_to_json_pure

(#18214) Update gem dependency to json_pure from json
Update Hiera VERSION to 1.1.2-rc2
Update Hiera VERSION to 1.1.2
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
(maint) Add Travis CI support to active branches

Without this patch all active branches do not have proper Travis configuration
files.  This is a problem because Travis will exercise any branch pushed to the
puppetlabs organization repository on Github.  The default behavior is to email
notifications which is undesirable.

To address this problem Travis configuration settings are added to an active
branch.

Active branches are those that have recent activity when compared against the
following command:

    for k in `git branch -r |perl -pe s/^..//`
    do
      echo -e `git show --pretty=format:"%Cgreen%ci %Cblue%cr%Creset" $k|head -n 1`\\t$k;
    done | sort -r | grep origin

Which should produce output like:

    2013-01-06 00:03:10 -0800 14 hours ago  origin/master
    2012-12-27 09:50:20 -0800 10 days ago   origin/1.x
Merge pull request #111 from jeffmccune/feature/1.x/travis_active_branches

(maint) Add Travis CI support to active branches
Merge branch '1.x'

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

Conflicts:
	.gitignore
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
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 'deep_merge_1.x' into 1.x

* deep_merge_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
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.
(#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