Merge trunk into here, fix tests to pass again with the newer versions of Plack
Tomas Doran [Mon, 24 May 2010 15:44:03 +0000 (15:44 +0000)]
1  2 
Makefile.PL
lib/Catalyst.pm
lib/Catalyst/Engine.pm
lib/Catalyst/ScriptRole.pm
lib/Catalyst/Test.pm
t/aggregate/unit_core_script_cgi.t
t/aggregate/unit_core_script_fastcgi.t
t/aggregate/unit_core_script_server.t

diff --cc Makefile.PL
@@@ -21,8 -19,7 +19,8 @@@ requires 'namespace::clean' => '0.13'
  requires 'B::Hooks::EndOfScope' => '0.08';
  requires 'MooseX::Emulate::Class::Accessor::Fast' => '0.00903';
  requires 'Class::MOP' => '0.95';
 +requires 'Data::OptList';
- requires 'Moose' => '0.93';
+ requires 'Moose' => '1.03';
  requires 'MooseX::MethodAttributes::Inheritable' => '0.19';
  requires 'MooseX::Role::WithOverloading' => '0.05';
  requires 'Carp';
diff --cc lib/Catalyst.pm
Simple merge
Simple merge
@@@ -3,7 -3,6 +3,7 @@@ use Moose::Role
  use MooseX::Types::Moose qw/Str Bool/;
  use Pod::Usage;
  use MooseX::Getopt;
++use Plack::Loader;
  use namespace::autoclean;
  
  with 'MooseX::Getopt' => {
Simple merge
@@@ -15,8 -15,6 +15,8 @@@ lives_ok 
      Catalyst::Script::CGI->new_with_options(application_name => 'TestAppToTestScripts')->run;
  } "new_with_options";
  shift @TestAppToTestScripts::RUN_ARGS;
- my $server = shift @TestAppToTestScripts::RUN_ARGS;
- like ref($server), qr/^Plack::Server/, 'Is a Plack Server';
++my $server = pop @TestAppToTestScripts::RUN_ARGS;
++like ref($server), qr/^Plack::Handler/, 'Is a Plack::Handler';
  is_deeply \@TestAppToTestScripts::RUN_ARGS, [], "no args";
  
  done_testing;
@@@ -51,8 -51,6 +51,8 @@@ sub testOption 
      } "new_with_options";
      # First element of RUN_ARGS will be the script name, which we don't care about
      shift @TestAppToTestScripts::RUN_ARGS;
-     my $server = shift @TestAppToTestScripts::RUN_ARGS;
-     like ref($server), qr/^Plack::Server/, 'Is a Plack Server';
++    my $server = pop @TestAppToTestScripts::RUN_ARGS;
++    like ref($server), qr/^Plack::Handler/, 'Is a Plack::Handler';
      is_deeply \@TestAppToTestScripts::RUN_ARGS, $resultarray, "is_deeply comparison";
  }
  
@@@ -89,8 -89,6 +89,8 @@@ sub testOption 
      };
      # First element of RUN_ARGS will be the script name, which we don't care about
      shift @TestAppToTestScripts::RUN_ARGS;
-     my $server = shift @TestAppToTestScripts::RUN_ARGS;
-     like ref($server), qr/^Plack::Server/, 'Is a Plack Server';
++    my $server = pop @TestAppToTestScripts::RUN_ARGS;
++    like ref($server), qr/^Plack::Handler/, 'Is a Plack::Handler';
      # Mangle argv into the options..
      $resultarray->[-1]->{argv} = $argstring;
      is_deeply \@TestAppToTestScripts::RUN_ARGS, $resultarray, "is_deeply comparison " . join(' ', @$argstring);