[DRE-commits] [ruby-unicode-display-width] 01/01: adjust patch for data directory to work in tests

Michael Moll mmoll-guest at moszumanska.debian.org
Sat Nov 19 19:24:49 UTC 2016


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

mmoll-guest pushed a commit to branch master
in repository ruby-unicode-display-width.

commit 54289979c030b2dff420e934f48f37372265f968
Author: Michael Moll <Michael Moll kvedulv at kvedulv.de>
Date:   Sat Nov 19 20:24:10 2016 +0100

    adjust patch for data directory to work in tests
---
 debian/patches/use_debian_datadir.patch | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/debian/patches/use_debian_datadir.patch b/debian/patches/use_debian_datadir.patch
index eef8bc4..bfaf495 100644
--- a/debian/patches/use_debian_datadir.patch
+++ b/debian/patches/use_debian_datadir.patch
@@ -1,11 +1,12 @@
 --- a/lib/unicode/display_width/constants.rb
 +++ b/lib/unicode/display_width/constants.rb
-@@ -2,7 +2,7 @@
+@@ -2,7 +2,8 @@
    module DisplayWidth
      VERSION = '1.1.1'
      UNICODE_VERSION = "9.0.0".freeze
 -    DATA_DIRECTORY = File.expand_path(File.dirname(__FILE__) + '/../../../data/').freeze
-+    DATA_DIRECTORY = '/usr/share/ruby-unicode-display-width/'.freeze
++    DEBIAN_DATA_DIRECTORY = '/usr/share/ruby-unicode-display-width/'
++    DATA_DIRECTORY = (File.directory?(DEBIAN_DATA_DIRECTORY) ? DEBIAN_DATA_DIRECTORY : File.expand_path(File.dirname(__FILE__) + '/../../../data/')).freeze
      INDEX_FILENAME = (DATA_DIRECTORY + '/display_width.marshal.gz').freeze
    end
  end

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-unicode-display-width.git



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