Description: move resources/ in /usr/share/ruby-json-schema
Author: Cédric Boutillier <boutil@debian.org>
Forwarded: no
Last-Update: 2016-06-07

--- a/lib/json-schema/schema/validator.rb
+++ b/lib/json-schema/schema/validator.rb
@@ -28,7 +28,13 @@
       end
 
       def metaschema
-        resources = File.expand_path('../../../../resources', __FILE__)
+        if File.exists?(File.expand_path('../../../../resources', __FILE__))
+            resources = File.expand_path('../../../../resources', __FILE__)
+        elsif File.exists?('/usr/share/ruby-json-schema/resources')
+            resources = 'usr/share/ruby-json-schema/resources'
+        else
+            resources = File.expand_path('../../../../../../share/ruby-json-schema/resources', __FILE__)
+        end
         File.join(resources, @metaschema_name)
       end
     end
