From f7c2816e136baee905250afc4a9a930ba8851671 Mon Sep 17 00:00:00 2001 From: Eric Davis Date: Sun, 30 Nov 2008 01:58:52 -0800 Subject: [PATCH] Allow rake tasks to use the REDMINE_ROOT environment also --- Rakefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Rakefile b/Rakefile index a2613fe..906621e 100755 --- a/Rakefile +++ b/Rakefile @@ -8,8 +8,11 @@ Dir[File.expand_path(File.dirname(__FILE__)) + "/lib/tasks/**/*.rake"].sort.each # Modifided from the RSpec on Rails plugins PLUGIN_ROOT = File.expand_path(File.dirname(__FILE__)) -REDMINE_APP = File.expand_path(File.dirname(__FILE__) + '/../../../app') -REDMINE_LIB = File.expand_path(File.dirname(__FILE__) + '/../../../lib') + +# Allows loading of an environment config based on the environment +REDMINE_ROOT = ENV["REDMINE_ROOT"] || File.dirname(__FILE__) + "/../../../.." +REDMINE_APP = File.expand_path(REDMINE_ROOT + '/app') +REDMINE_LIB = File.expand_path(REDMINE_ROOT + '/lib') require 'rake' require 'rake/clean'