Checking in changes prior to tagging of version 0.10018. v0.10018
Tomas Doran [Fri, 29 Jul 2011 08:03:52 +0000 (08:03 +0000)]
Changelog diff is:

Index: Changes
===================================================================
--- Changes (revision 14000)
+++ Changes (working copy)
@@ -1,5 +1,8 @@
Revision history for Perl extension Catalyst::Plugin::Authentication

+0.10018 29 Jul 2011
+     - Fix failing tests with the new PSGI Catalyst dev release
+
0.10017 24 Jan 2010
- Fix failing tests with the new PSGI Catalyst dev release

Changes
MANIFEST.SKIP
lib/Catalyst/Plugin/Authentication.pm
t/author/notabs.t
t/lib/RemoteTestApp1.pm
t/lib/RemoteTestApp2.pm
t/lib/RemoteTestEngineRole.pm [new file with mode: 0644]

diff --git a/Changes b/Changes
index 1b03929..6958fac 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,5 +1,8 @@
 Revision history for Perl extension Catalyst::Plugin::Authentication
 
+0.10018 29 Jul 2011
+     - Fix failing tests with the new PSGI Catalyst dev release
+
 0.10017 24 Jan 2010
      - Fix failing tests with the new PSGI Catalyst dev release
 
index 15b7288..d259216 100644 (file)
@@ -6,6 +6,7 @@
 \B\.git\b
 
 # Avoid Makemaker generated and utility files.
+\bMYMETA.yml$
 \bMakefile$
 \bblib
 \bMakeMaker-\d
index 5fed39e..e95c425 100644 (file)
@@ -12,7 +12,7 @@ use Tie::RefHash;
 use Class::Inspector;
 use Catalyst::Authentication::Realm;
 
-our $VERSION = "0.10017";
+our $VERSION = "0.10018";
 
 sub set_authenticated {
     my ( $c, $user, $realmname ) = @_;
index 70b743a..ad02a43 100644 (file)
@@ -1,5 +1,6 @@
 use strict;
 use warnings;
+use Test::More;
 use Test::NoTabs;
 
 all_perl_files_ok;
index 669cf10..30c3831 100644 (file)
@@ -6,7 +6,9 @@ use Catalyst qw/
 /;
 
 use base qw/Catalyst/;
-__PACKAGE__->engine_class('RemoteTestEngine');
+unless ($Catalyst::VERSION >= 5.89000) {
+    __PACKAGE__->engine_class('RemoteTestEngine');
+}
 __PACKAGE__->config(
     'Plugin::Authentication' => {
         default_realm => 'remote',
@@ -25,8 +27,11 @@ __PACKAGE__->config(
         },
     },
 );
-
 __PACKAGE__->setup;
+if ($Catalyst::VERSION >= 5.89000) {
+    require RemoteTestEngineRole;
+    RemoteTestEngineRole->meta->apply(__PACKAGE__->engine);
+}
 
 1;
 
index 159020f..1ec5185 100644 (file)
@@ -7,7 +7,9 @@ use Catalyst qw/
 /;
 
 use base qw/Catalyst/;
-__PACKAGE__->engine_class('RemoteTestEngine');
+unless ($Catalyst::VERSION >= 5.89000) {
+    __PACKAGE__->engine_class('RemoteTestEngine');
+}
 __PACKAGE__->config(
     'Plugin::Authentication' => {
         default_realm => 'remote',
@@ -28,8 +30,11 @@ __PACKAGE__->config(
         },
     },
 );
-
 __PACKAGE__->setup;
+if ($Catalyst::VERSION >= 5.89000) {
+    require RemoteTestEngineRole;
+    RemoteTestEngineRole->meta->apply(__PACKAGE__->engine);
+}
 
 1;
 
diff --git a/t/lib/RemoteTestEngineRole.pm b/t/lib/RemoteTestEngineRole.pm
new file mode 100644 (file)
index 0000000..50a28e3
--- /dev/null
@@ -0,0 +1,15 @@
+package RemoteTestEngineRole;
+use Moose::Role;
+require Catalyst;
+
+around env => sub {
+    my ($orig, $self, @args) = @_;
+    my $e = $self->$orig(@args);
+
+    $e->{REMOTE_USER} = $RemoteTestEngine::REMOTE_USER;
+    $e->{SSL_CLIENT_S_DN} = $RemoteTestEngine::SSL_CLIENT_S_DN;
+    return $e;
+};
+
+1;
+