Merge pull request #3 from hoxworth/master

Update fork.
Remove the trailing # when passing uri to open()
Added tests for definitions using relative $ref.
Added ruby 1.8 to .travis

Wasn't there before, but we want to support ruby 1.8
Added json_gem as a dependency for ruby 1.8 (only)
Changed "-> () {}" for "proc {}" so tests will work on ruby 1.8
Replaced json-style hashes for spaceship operator hashes

For ruby 1.8 compatibility
Stopped using skip for common test suite tests

There are two good reasons to do this:

1. skip isn't supported in ruby 1.8
2. much less verbose ouput
Ignore failures on the ruby 1.8 build

There are many failures due to ruby 1.8 hashes being unordered and
encodings being different to ruby 1.9. But at least there's a build
Removed jruby 1.8 mode from the build matrix because of ruby 1.8 test issues

At least we have mri 1.8 in the build matrix. Better than nothing
Moved the dependency for the json gem from the gemspec into the Gemfile

As @pd pointed out, putting conditional flags in the gemspec only has an
affect when packaging the gem, and does not help end users.

I've put it in the Gemfile instead, which will only help developers, but
at least bundler has the concept of platforms
Replaced add_indifferent_access with stringify

This is a fix for #96

Previously, add_indifferent_access would modify the data and schema
hashes in place, to make them accept strings or hashes as keys. However,
there are two problems with this:

1. It works for accessing the hash (eg. fetch or []) but it does not
work if we use .has_key? or .keys
2. It does not convert arrays of symbols into arrays of strings (which
can be a problem when the symbols in the array refer to attributes, eg.
required)

To resolve this, I've removed add_indifferent_access in favour of
stringify, which returns a new copy of the hash, with all symbols
converted to strings. This is probably a better approximation of json
anyway, but it also makes accessing values from the hash easier, because
we always know that we'll be dealing with strings (not symbols).
Removed rogue puts statement
Moved the code to clear the cache into an ensure block

Removes the duplication
Removed monkey patching of Hash#default_proc

No longer used, because we use stringify instead of add_indifferent_access
Made insert_default supplement the original data structure with any new
values added during validation, rather than replacing completely

This is a fix so that the existing behaviour of insert_default is
maintained (ie. anything that is already in the object is left as it
was), but still allowing us to use a stringified hash internally and not
modifyingt the default proc of the data object.
Merge pull request #154 from iainbeeston/ruby_1_8_support

Add ruby 1.8 to travis
Version 2.4.0
Merge pull request #142 from iainbeeston/better_handling_of_symbols

Replaced #add_indifferent_access with #stringify
Version 2.4.1