File: move-resource-draft.patch

package info (click to toggle)
ruby-json-schema 2.7.0-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 748 kB
  • ctags: 656
  • sloc: ruby: 5,380; makefile: 6
file content (22 lines) | stat: -rw-r--r-- 846 bytes parent folder | download
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