From: Tomas Doran Date: Fri, 29 Jul 2011 08:03:52 +0000 (+0000) Subject: Checking in changes prior to tagging of version 0.10018. X-Git-Tag: v0.10018^0 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Plugin-Authentication.git;a=commitdiff_plain;h=afa31b0172e05d85451eb7b56ea663d5f765b7b7 Checking in changes prior to tagging of version 0.10018. 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 --- diff --git a/Changes b/Changes index 1b03929..6958fac 100644 --- 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 diff --git a/MANIFEST.SKIP b/MANIFEST.SKIP index 15b7288..d259216 100644 --- a/MANIFEST.SKIP +++ b/MANIFEST.SKIP @@ -6,6 +6,7 @@ \B\.git\b # Avoid Makemaker generated and utility files. +\bMYMETA.yml$ \bMakefile$ \bblib \bMakeMaker-\d diff --git a/lib/Catalyst/Plugin/Authentication.pm b/lib/Catalyst/Plugin/Authentication.pm index 5fed39e..e95c425 100644 --- a/lib/Catalyst/Plugin/Authentication.pm +++ b/lib/Catalyst/Plugin/Authentication.pm @@ -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 ) = @_; diff --git a/t/author/notabs.t b/t/author/notabs.t index 70b743a..ad02a43 100644 --- a/t/author/notabs.t +++ b/t/author/notabs.t @@ -1,5 +1,6 @@ use strict; use warnings; +use Test::More; use Test::NoTabs; all_perl_files_ok; diff --git a/t/lib/RemoteTestApp1.pm b/t/lib/RemoteTestApp1.pm index 669cf10..30c3831 100644 --- a/t/lib/RemoteTestApp1.pm +++ b/t/lib/RemoteTestApp1.pm @@ -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; diff --git a/t/lib/RemoteTestApp2.pm b/t/lib/RemoteTestApp2.pm index 159020f..1ec5185 100644 --- a/t/lib/RemoteTestApp2.pm +++ b/t/lib/RemoteTestApp2.pm @@ -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 index 0000000..50a28e3 --- /dev/null +++ b/t/lib/RemoteTestEngineRole.pm @@ -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; +