[DRE-commits] [ruby-json-schema] 03/06: Modify patch to handle all possible file locations

Balasankar C balasankarc-guest at moszumanska.debian.org
Sun Nov 13 10:21:42 UTC 2016


This is an automated email from the git hooks/post-receive script.

balasankarc-guest pushed a commit to branch master
in repository ruby-json-schema.

commit 81b364f285c773140d67d20a284c4436dc62e9a0
Author: Balasankar C <balasankarc at autistici.org>
Date:   Sun Nov 13 15:37:37 2016 +0530

    Modify patch to handle all possible file locations
---
 debian/patches/move-resource-draft.patch | 10 ++++++++--
 debian/patches/series                    |  2 --
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/debian/patches/move-resource-draft.patch b/debian/patches/move-resource-draft.patch
index 0ec0390..3206821 100644
--- a/debian/patches/move-resource-draft.patch
+++ b/debian/patches/move-resource-draft.patch
@@ -5,12 +5,18 @@ Last-Update: 2016-06-07
 
 --- a/lib/json-schema/schema/validator.rb
 +++ b/lib/json-schema/schema/validator.rb
-@@ -28,7 +28,7 @@
+@@ -28,7 +28,13 @@
        end
  
        def metaschema
 -        resources = File.expand_path('../../../../resources', __FILE__)
-+        resources = File.expand_path('../../../../../../share/ruby-json-schema/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
diff --git a/debian/patches/series b/debian/patches/series
index 45c3af4..8e3f419 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1 @@
-update-addressable-24.patch
 move-resource-draft.patch
-no-loadpath-overload-in-tests.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-json-schema.git



More information about the Pkg-ruby-extras-commits mailing list