Skip to content

Commit

Permalink
Allowed addressable 2.4+ to work with json-schema (voxpupuli#312)
Browse files Browse the repository at this point in the history
I've had to change one of the specs because of this. It seems that
addressable now raises an error if you parse a uri that looks like a
json text, which was one of our test cases.

This fixes and supersedes voxpupuli#301
  • Loading branch information
iainbeeston authored Sep 29, 2016
1 parent e5c3a1a commit a485620
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).

### Changed
- Made all `validate*` methods on `JSON::Validator` ultimately call `validate!`
- Updated addressable dependency to 2.4.0

## [2.6.2] - 2016-05-13

Expand Down
3 changes: 2 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ end

Rake::TestTask.new do |t|
t.libs << "."
t.warning = true
# disabled warnings because addressable 2.4 has lots of them
# t.warning = true
t.verbose = true
t.test_files = FileList.new('test/*_test.rb')
end
Expand Down
2 changes: 1 addition & 1 deletion json-schema.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ Gem::Specification.new do |s|
s.add_development_dependency "webmock"
s.add_development_dependency "bundler"

s.add_runtime_dependency "addressable", '~> 2.3.8'
s.add_runtime_dependency "addressable", '>= 2.4'
end
2 changes: 1 addition & 1 deletion test/initialize_data_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def test_parse_hash_string

assert(JSON::Validator.validate(schema, data, :json => true))

assert_raises(JSON::Schema::JsonLoadError) { JSON::Validator.validate(schema, data, :uri => true) }
assert_raises(JSON::Schema::UriError) { JSON::Validator.validate(schema, data, :uri => true) }
end

def test_parse_json_string
Expand Down

0 comments on commit a485620

Please sign in to comment.