[Catalyst-commits] r11055 - in trunk/Catalyst-Plugin-ConfigLoader:
. lib/Catalyst/Plugin t
bricas at dev.catalyst.perl.org
bricas at dev.catalyst.perl.org
Fri Aug 7 11:44:24 GMT 2009
Author: bricas
Date: 2009-08-07 11:44:24 +0000 (Fri, 07 Aug 2009)
New Revision: 11055
Added:
trunk/Catalyst-Plugin-ConfigLoader/t/22-suffix_env.t
trunk/Catalyst-Plugin-ConfigLoader/t/23-path_env.t
Removed:
trunk/Catalyst-Plugin-ConfigLoader/t/30-catalyst_test_suffix.t
Modified:
trunk/Catalyst-Plugin-ConfigLoader/Changes
trunk/Catalyst-Plugin-ConfigLoader/lib/Catalyst/Plugin/ConfigLoader.pm
Log:
fix for get_config_path also
Modified: trunk/Catalyst-Plugin-ConfigLoader/Changes
===================================================================
--- trunk/Catalyst-Plugin-ConfigLoader/Changes 2009-08-07 11:27:50 UTC (rev 11054)
+++ trunk/Catalyst-Plugin-ConfigLoader/Changes 2009-08-07 11:44:24 UTC (rev 11055)
@@ -1,8 +1,8 @@
Revision history for Perl extension Catalyst::Plugin::ConfigLoader.
0.25 Fri Aug 07 2009
- - Test case for RT #47937 - MYAPP_CONFIG_LOCAL_SUFFIX ignored w/
- Catalyst::Test (Dan Dascalescu) and patch (prestemon)
+ - Fix get_config_local_suffix and get_config_path when finding values
+ from ENV vars (RT #47937)
0.24 Mon Jun 29 2009
- Add an __ENV(foo)__ macro + tests (Stuart Watt)
Modified: trunk/Catalyst-Plugin-ConfigLoader/lib/Catalyst/Plugin/ConfigLoader.pm
===================================================================
--- trunk/Catalyst-Plugin-ConfigLoader/lib/Catalyst/Plugin/ConfigLoader.pm 2009-08-07 11:27:50 UTC (rev 11054)
+++ trunk/Catalyst-Plugin-ConfigLoader/lib/Catalyst/Plugin/ConfigLoader.pm 2009-08-07 11:44:24 UTC (rev 11055)
@@ -179,7 +179,7 @@
my $appname = ref $c || $c;
my $prefix = Catalyst::Utils::appprefix( $appname );
- my $path = Catalyst::Utils::env_value( $c, 'CONFIG' )
+ my $path = Catalyst::Utils::env_value( $appname, 'CONFIG' )
|| $c->config->{ 'Plugin::ConfigLoader' }->{ file }
|| $c->path_to( $prefix );
Added: trunk/Catalyst-Plugin-ConfigLoader/t/22-suffix_env.t
===================================================================
--- trunk/Catalyst-Plugin-ConfigLoader/t/22-suffix_env.t (rev 0)
+++ trunk/Catalyst-Plugin-ConfigLoader/t/22-suffix_env.t 2009-08-07 11:44:24 UTC (rev 11055)
@@ -0,0 +1,16 @@
+use strict;
+use warnings;
+
+use FindBin;
+use lib "$FindBin::Bin/lib";
+
+use Test::More tests => 3;
+
+BEGIN {
+ $ENV{ TESTAPP_CONFIG_LOCAL_SUFFIX } = 'test';
+ use_ok 'Catalyst::Test', 'TestApp';
+}
+
+ok my ( $res, $c ) = ctx_request( '/' ), 'context object';
+
+is $c->get_config_local_suffix, 'test', 'suffix is "test"';
Added: trunk/Catalyst-Plugin-ConfigLoader/t/23-path_env.t
===================================================================
--- trunk/Catalyst-Plugin-ConfigLoader/t/23-path_env.t (rev 0)
+++ trunk/Catalyst-Plugin-ConfigLoader/t/23-path_env.t 2009-08-07 11:44:24 UTC (rev 11055)
@@ -0,0 +1,16 @@
+use strict;
+use warnings;
+
+use FindBin;
+use lib "$FindBin::Bin/lib";
+
+use Test::More tests => 3;
+
+BEGIN {
+ $ENV{ TESTAPP_CONFIG } = 'test.perl';
+ use_ok 'Catalyst::Test', 'TestApp';
+}
+
+ok my ( $res, $c ) = ctx_request( '/' ), 'context object';
+
+is_deeply [ $c->get_config_path ], [ qw( test.perl perl ) ], 'path is "test.perl"';
Deleted: trunk/Catalyst-Plugin-ConfigLoader/t/30-catalyst_test_suffix.t
===================================================================
--- trunk/Catalyst-Plugin-ConfigLoader/t/30-catalyst_test_suffix.t 2009-08-07 11:27:50 UTC (rev 11054)
+++ trunk/Catalyst-Plugin-ConfigLoader/t/30-catalyst_test_suffix.t 2009-08-07 11:44:24 UTC (rev 11055)
@@ -1,16 +0,0 @@
-use strict;
-use warnings;
-
-use FindBin;
-use lib "$FindBin::Bin/lib";
-
-use Test::More tests => 2;
-
-BEGIN {
- $ENV{TESTAPP_CONFIG_LOCAL_SUFFIX} = 'test';
-}
-use Catalyst::Test 'TestApp';
-
-ok my ($res, $c) = ctx_request('/'), 'context object';
-
-is $c->get_config_local_suffix, 'test', 'RT #47937';
More information about the Catalyst-commits
mailing list