1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
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
|