[Rt-commit] rt branch, master, updated. rt-3.9.7-1164-gf52c95e
? sunnavy
sunnavy at bestpractical.com
Wed Jan 5 01:24:13 EST 2011
The branch, master has been updated
via f52c95effe45fd4138b60f90b293703b81fefaf3 (commit)
via b5d01d2d7b2ca42ccfec63331cc4bac6d4ee6773 (commit)
from 1effcc25a1d6e02752c04e223162724cf5b01324 (commit)
Summary of changes:
lib/RT/Installer.pm | 2 +-
lib/RT/Test.pm | 12 ++++++++++++
2 files changed, 13 insertions(+), 1 deletions(-)
- Log -----------------------------------------------------------------
commit b5d01d2d7b2ca42ccfec63331cc4bac6d4ee6773
Author: sunnavy <sunnavy at bestpractical.com>
Date: Wed Jan 5 13:50:44 2011 +0800
respect RT_SITE_CONFIG for installer
diff --git a/lib/RT/Installer.pm b/lib/RT/Installer.pm
index c9ab7dd..ff476ee 100644
--- a/lib/RT/Installer.pm
+++ b/lib/RT/Installer.pm
@@ -252,7 +252,7 @@ sub CurrentValues {
sub ConfigFile {
require File::Spec;
- return File::Spec->catfile( $RT::EtcPath, 'RT_SiteConfig.pm' );
+ return $ENV{RT_SITE_CONFIG} || File::Spec->catfile( $RT::EtcPath, 'RT_SiteConfig.pm' );
}
sub SaveConfig {
commit f52c95effe45fd4138b60f90b293703b81fefaf3
Author: sunnavy <sunnavy at bestpractical.com>
Date: Wed Jan 5 14:00:28 2011 +0800
allow RT->LoadConfig to load RT_SiteConfig.pm again and again in case it's updated
diff --git a/lib/RT/Test.pm b/lib/RT/Test.pm
index 2833b90..9f15002 100644
--- a/lib/RT/Test.pm
+++ b/lib/RT/Test.pm
@@ -135,6 +135,18 @@ sub import {
$class->bootstrap_config( %args );
use RT;
+ my $old_load_config = \&RT::LoadConfig;
+ {
+ no warnings 'redefine';
+ *RT::LoadConfig = sub {
+ $old_load_config->(@_);
+
+ # in case we want to load RT_SiteConfig again
+ # this is an equivalent in tests to "delete $INC{'RT_SiteConfig.pm'}" in code
+ delete $INC{ $tmp{'config'}{'RT'} };
+ };
+ }
+
RT::LoadConfig;
if (RT->Config->Get('DevelMode')) { require Module::Refresh; }
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list