[Catalyst-commits] r9581 - in
trunk/Catalyst-Plugin-Session-State-URI: .
lib/Catalyst/Plugin/Session/State t t/lib/Catalyst/Plugin/Test
t0m at dev.catalyst.perl.org
t0m at dev.catalyst.perl.org
Thu Mar 26 10:04:09 GMT 2009
Author: t0m
Date: 2009-03-26 10:04:09 +0000 (Thu, 26 Mar 2009)
New Revision: 9581
Added:
trunk/Catalyst-Plugin-Session-State-URI/.shipit
trunk/Catalyst-Plugin-Session-State-URI/t/uri_find_regression_avoid_RT44593.t
Modified:
trunk/Catalyst-Plugin-Session-State-URI/
trunk/Catalyst-Plugin-Session-State-URI/Changes
trunk/Catalyst-Plugin-Session-State-URI/MANIFEST.SKIP
trunk/Catalyst-Plugin-Session-State-URI/lib/Catalyst/Plugin/Session/State/URI.pm
trunk/Catalyst-Plugin-Session-State-URI/t/lib/Catalyst/Plugin/Test/Errors.pm
trunk/Catalyst-Plugin-Session-State-URI/t/lib/Catalyst/Plugin/Test/Plugin.pm
Log:
Checking in changes prior to tagging of version 0.09. Changelog diff is:
Index: Changes
===================================================================
--- Changes (revision 9580)
+++ Changes (working copy)
@@ -1,5 +1,9 @@
Revision history for Perl extension Catalyst::Plugin::Session::State::URI
+0.09 2009-03-26
+ - Avoid bug in URI::Find causing test fails (RT#44593)
+ - Remove use of NEXT missed last time from the test suite.
+
0.08 2009-02-08
- Switch from NEXT to MRO::Compat (t0m)
- Switch to Module::Install
Property changes on: trunk/Catalyst-Plugin-Session-State-URI
___________________________________________________________________
Name: svn:ignore
+ Makefile
META.yml
blib
pm_to_blib
MANIFEST
inc
Added: trunk/Catalyst-Plugin-Session-State-URI/.shipit
===================================================================
--- trunk/Catalyst-Plugin-Session-State-URI/.shipit (rev 0)
+++ trunk/Catalyst-Plugin-Session-State-URI/.shipit 2009-03-26 10:04:09 UTC (rev 9581)
@@ -0,0 +1,5 @@
+# auto-generated shipit config file.
+steps = FindVersion, ChangeVersion, CheckChangeLog, DistTest, Commit, Tag, MakeDist, UploadCPAN
+
+svn.tagpattern = http://dev.catalyst.perl.org/repos/Catalyst/tags/Catalyst-Plugin-Session-State-URI/%v
+CheckChangeLog.files = Changes
Modified: trunk/Catalyst-Plugin-Session-State-URI/Changes
===================================================================
--- trunk/Catalyst-Plugin-Session-State-URI/Changes 2009-03-26 09:31:17 UTC (rev 9580)
+++ trunk/Catalyst-Plugin-Session-State-URI/Changes 2009-03-26 10:04:09 UTC (rev 9581)
@@ -1,5 +1,9 @@
Revision history for Perl extension Catalyst::Plugin::Session::State::URI
+0.09 2009-03-26
+ - Avoid bug in URI::Find causing test fails (RT#44593)
+ - Remove use of NEXT missed last time from the test suite.
+
0.08 2009-02-08
- Switch from NEXT to MRO::Compat (t0m)
- Switch to Module::Install
Modified: trunk/Catalyst-Plugin-Session-State-URI/MANIFEST.SKIP
===================================================================
--- trunk/Catalyst-Plugin-Session-State-URI/MANIFEST.SKIP 2009-03-26 09:31:17 UTC (rev 9580)
+++ trunk/Catalyst-Plugin-Session-State-URI/MANIFEST.SKIP 2009-03-26 10:04:09 UTC (rev 9581)
@@ -30,3 +30,5 @@
# Module::Bane
\bBuild.PL$
+
+^.shipit$
Modified: trunk/Catalyst-Plugin-Session-State-URI/lib/Catalyst/Plugin/Session/State/URI.pm
===================================================================
--- trunk/Catalyst-Plugin-Session-State-URI/lib/Catalyst/Plugin/Session/State/URI.pm 2009-03-26 09:31:17 UTC (rev 9580)
+++ trunk/Catalyst-Plugin-Session-State-URI/lib/Catalyst/Plugin/Session/State/URI.pm 2009-03-26 10:04:09 UTC (rev 9581)
@@ -11,7 +11,7 @@
use URI::Find;
use URI::QueryParam;
-our $VERSION = '0.08';
+our $VERSION = '0.09';
__PACKAGE__->mk_accessors(qw/_sessionid_from_uri _sessionid_to_rewrite/);
@@ -85,7 +85,7 @@
if (
($c->response->content_type || '') =~ /html/ # XML too?
or
- (!$c->response->content_type and $c->response->body =~ /^\s*<[?!]?\s*\w+/ ), # if it looks like html
+ (!$c->response->content_type and $c->response->body =~ /^\s*\w*\s*<[?!]?\s*\w+/ ), # if it looks like html
) {
$c->rewrite_html_with_session_id($sid);
} else {
@@ -553,6 +553,8 @@
=item Hu Hailin
+=item Tomas Doran, C<bobtfish at bobtfish.net> (Current maintainer)
+
=back
=head1 COPYRIGHT
Modified: trunk/Catalyst-Plugin-Session-State-URI/t/lib/Catalyst/Plugin/Test/Errors.pm
===================================================================
--- trunk/Catalyst-Plugin-Session-State-URI/t/lib/Catalyst/Plugin/Test/Errors.pm 2009-03-26 09:31:17 UTC (rev 9580)
+++ trunk/Catalyst-Plugin-Session-State-URI/t/lib/Catalyst/Plugin/Test/Errors.pm 2009-03-26 10:04:09 UTC (rev 9581)
@@ -6,7 +6,7 @@
my $c = shift;
unless ( $_[0] ) {
- return $c->NEXT::error(@_);
+ return $c->next::method(@_);
}
if ( $_[0] =~ /^(Unknown resource|No default action defined)/ ) {
@@ -26,7 +26,7 @@
$c->response->headers->push_header( 'X-Catalyst-Error' => $error );
- $c->NEXT::error(@_);
+ $c->next::method(@_);
}
1;
Modified: trunk/Catalyst-Plugin-Session-State-URI/t/lib/Catalyst/Plugin/Test/Plugin.pm
===================================================================
--- trunk/Catalyst-Plugin-Session-State-URI/t/lib/Catalyst/Plugin/Test/Plugin.pm 2009-03-26 09:31:17 UTC (rev 9580)
+++ trunk/Catalyst-Plugin-Session-State-URI/t/lib/Catalyst/Plugin/Test/Plugin.pm 2009-03-26 10:04:09 UTC (rev 9581)
@@ -15,7 +15,7 @@
my $class = shift;
- my $c = $class->NEXT::prepare(@_);
+ my $c = $class->next::method(@_);
$c->response->header( 'X-Catalyst-Plugin-Setup' => $c->ran_setup );
return $c;
Added: trunk/Catalyst-Plugin-Session-State-URI/t/uri_find_regression_avoid_RT44593.t
===================================================================
--- trunk/Catalyst-Plugin-Session-State-URI/t/uri_find_regression_avoid_RT44593.t (rev 0)
+++ trunk/Catalyst-Plugin-Session-State-URI/t/uri_find_regression_avoid_RT44593.t 2009-03-26 10:04:09 UTC (rev 9581)
@@ -0,0 +1,46 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use Test::More tests => 1;
+use Test::MockObject::Extends;
+use URI;
+use Catalyst::Plugin::Session::State::URI;
+
+{
+
+ package HashObj;
+ use base qw/Class::Accessor/;
+
+ __PACKAGE__->mk_accessors(qw/body path base content_type location status/);
+}
+
+my $req = Test::MockObject::Extends->new( HashObj->new );
+$req->base( URI->new( "http://server/app/" ));
+
+my $res = Test::MockObject::Extends->new( HashObj->new );
+
+my $uri = "http://www.woobling.org/";
+
+my $cxt =
+ Test::MockObject::Extends->new("Catalyst::Plugin::Session::State::URI");
+
+$cxt->set_always( config => {} );
+$cxt->set_always( request => $req );
+$cxt->set_always( response => $res );
+$cxt->set_false("debug");
+
+$cxt->setup_session;
+
+$req->path("-/the session id"); # sri's bug
+$cxt->prepare_action;
+
+$res->body( my $body_ext_url = qq{foo <a href="$uri"></a> blah} );
+
+my $called = 0;
+$cxt->mock('rewrite_html_with_session_id', sub { $called++ });
+
+$cxt->rewrite_body_with_session_id('foo');
+ok $called;
+
More information about the Catalyst-commits
mailing list