Skip to content

Commit a485620

Browse files
authored
Allowed addressable 2.4+ to work with json-schema (#312)
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 #301
1 parent e5c3a1a commit a485620

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
1515

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

1920
## [2.6.2] - 2016-05-13
2021

Rakefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ end
1414

1515
Rake::TestTask.new do |t|
1616
t.libs << "."
17-
t.warning = true
17+
# disabled warnings because addressable 2.4 has lots of them
18+
# t.warning = true
1819
t.verbose = true
1920
t.test_files = FileList.new('test/*_test.rb')
2021
end

json-schema.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@ Gem::Specification.new do |s|
2323
s.add_development_dependency "webmock"
2424
s.add_development_dependency "bundler"
2525

26-
s.add_runtime_dependency "addressable", '~> 2.3.8'
26+
s.add_runtime_dependency "addressable", '>= 2.4'
2727
end

test/initialize_data_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def test_parse_hash_string
4040

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

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

4646
def test_parse_json_string

0 commit comments

Comments
 (0)