File: fix-relative-lib-require.patch

package info (click to toggle)
ruby-spider 0.7.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 252 kB
  • sloc: ruby: 1,125; makefile: 4
file content (22 lines) | stat: -rw-r--r-- 577 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: Require the correct path for both build + autopkgtests
Author: Simon Quigley <tsimonq2@debian.org>
Origin: vendor
Forwarded: not-needed
Last-Update: 2026-03-05
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -7,7 +7,11 @@ require_relative 'mock_redis'
 
 def local_require(*files)
   files.each do |file|
-    require File.dirname(__FILE__)+'/../lib/'+file
+    begin
+      require File.dirname(__FILE__)+'/../lib/'+file
+    rescue LoadError
+      require file
+    end
   end
 end