lib/json-schema/validator.rb in json-schema-0.9.7 vs lib/json-schema/validator.rb in json-schema-0.9.8

- old
+ new

@@ -291,10 +291,12 @@ end if begin Gem::Specification::find_by_name('json') + rescue Gem::LoadError + false rescue Gem.available?('json') end require 'json' @@available_json_backends << 'json' @@ -302,10 +304,12 @@ end if begin Gem::Specification::find_by_name('yajl-ruby') + rescue Gem::LoadError + false rescue Gem.available?('yajl-ruby') end require 'yajl' @@available_json_backends << 'yajl' @@ -315,9 +319,11 @@ private if begin Gem::Specification::find_by_name('uuidtools') + rescue Gem::LoadError + false rescue Gem.available?('uuidtools') end require 'uuidtools' @@fake_uri_generator = lambda{|s| UUIDTools::UUID.sha1_create(UUIDTools::UUID_URL_NAMESPACE, s).to_s }