[Jifty-commit] r1212 - in jifty/trunk: lib/Jifty
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Thu Jun 8 16:18:34 EDT 2006
Author: jesse
Date: Thu Jun 8 16:18:34 2006
New Revision: 1212
Modified:
jifty/trunk/ (props changed)
jifty/trunk/lib/Jifty/Config.pm
Log:
r12360 at pinglin: jesse | 2006-06-08 16:17:35 -0400
* Added a hook for a test config file
Modified: jifty/trunk/lib/Jifty/Config.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Config.pm (original)
+++ jifty/trunk/lib/Jifty/Config.pm Thu Jun 8 16:18:34 2006
@@ -79,6 +79,12 @@
the framework's C<SiteConfig> or the C<JIFTY_SITE_CONFIG> environment
variable.
+After loading the site configuration file (if it exists), the
+framework will look for a test configuration file, specified in either
+the framework's C<TestConfig> or the C<JIFTY_TEST_CONFIG> environment
+variable.
+
+Values in the test configuration will clobber the site configuration.
Values in the site configuration file clobber those in the vendor
configuration file. Values in the vendor configuration file clobber
those in the application configuration file.
@@ -133,6 +139,21 @@
$config = Hash::Merge::merge( $self->stash, $site );
$self->stash($config);
+ my $test = $self->load_file(
+ Jifty::Util->absolute_path(
+ $self->framework('TestConfig') || $ENV{'JIFTY_TEST_CONFIG'}
+ )
+ );
+
+ $config = Hash::Merge::merge( $self->stash, $test );
+ $self->stash($config);
+
+
+
+
+
+
+
# Merge guessed values in for anything we didn't explicitly define
# Whatever's in the stash overrides anything we guess
$self->stash( Hash::Merge::merge( $self->guess, $self->stash ));
More information about the Jifty-commit
mailing list