hoxworth/json-schema — pull request #130 by iainbeeston (2014-09-29 15:35:17+00:00)
Title: Refactor classes and validator accessor methods

There are a few things that have been bugging me in the json-schema codebase, that I thought I could clean up. Here's a summary:

| Before | After |
| ------------- | ------------- |
| `json-schema/validator.rb` defined several classes: errors classes, `JSON::Schema::Validator` as well as `JSON::Validator` | I've pulled these out to their own files |
| The code for getting a validator (from `JSON::Validator.validators[]`) was duplicated in a number of places, including the internal url format used by `JSON::Validator` to store schemas | I've made an accessor method that takes a uri string instead |
| `JSON::Validator` included the methods for getting the version string and metaschema for a validator, making it harder to add new validators | I've made each validator now know about it's own version strings and metaschema instead |

Hopefully this will make the code easier to understand, and make future changes easier.