From 75222ee5b6ebd3b625f35d5109d082159d84e537 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Fri, 21 Nov 2008 17:01:32 -0500 Subject: [PATCH] I take that last commit back. Now the relative include path issue is fixed. The previous commit fails to include all of the website classes since the Dir.glob method doesn't necessarily (usually) look in the correct place. --- bin/whatever-dl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/whatever-dl b/bin/whatever-dl index 79cbbee..99183f6 100755 --- a/bin/whatever-dl +++ b/bin/whatever-dl @@ -36,9 +36,14 @@ $: << File.dirname(executable) + '/../' require 'src/uri_utilities' +# The Dir.glob that's coming up doesn't use the +# Ruby library path so we need to tell it where to +# look explicitly. +websites_pattern = File.dirname(executable) + '/../src/websites/*.rb' + # All of the website classes are located in one # directory, so we can 'require' them automatically. -Dir.glob('src/websites/*.rb').each do |r| +Dir.glob(websites_pattern).each do |r| require r end -- 2.43.2