Commits

Anonymous committed cd5145f

Updated to recent Mojolicious'es.

Comments (0)

Files changed (4)

Test-WWW-Mechanize-Mojo/CHANGES

 Revision history for Perl module Test::WWW::Mechanize::Mojo :
 
+v0.0.7      Mon Jan 17 15:55:00 IST 2011
+    - Fixed mojjy.pl and the lib/Test/WWW/Mechanize/Mojo.pm code in recent
+    Mojo versions.
+        - app->start instead of shagadelic.
+        - some tweaks to the ->$method->res.
+
 v0.0.6      Fri Sep  3 20:43:26 IDT 2010
     - Fixed mojjy.pl to avoid double encoding in recent Mojo versions.
 

Test-WWW-Mechanize-Mojo/META.yml

 provides:
   Test::WWW::Mechanize::Mojo:
     file: lib/Test/WWW/Mechanize/Mojo.pm
-    version: v0.0.6
+    version: v0.0.7
 requires:
   Carp: 0
   Encode: 0
   homepage: http://web-cpan.berlios.de/modules/Test-WWW-Mechanize-Mojo/
   license: http://dev.perl.org/licenses/
   repository: http://svn.berlios.de/svnroot/repos/web-cpan/Test-WWW-Mechanize-Mojo
-version: v0.0.6
+version: v0.0.7

Test-WWW-Mechanize-Mojo/lib/Test/WWW/Mechanize/Mojo.pm

 
 use Test::Mojo;
 
-our $VERSION = '0.0.6';
+our $VERSION = '0.0.7';
 
 our $APP_CLASS;
 my $Test = Test::Builder->new();
 
 =cut
 
+  my $tester = delete($args->{tester});
+
   my $self = $class->SUPER::new(%$args);
 
-  if ($args->{tester})
+  if ($tester)
   {
-      $self->tester($args->{tester});
+      $self->tester($tester);
   }
   else
   {
         $request->header_field_names()
     );
 
-    $client->$method($uri->path_query(), 
-        # TODO : fix this to pass it as a ref.
-        %headers,
+    my $mojo_res = $client->$method($uri->path_query(), 
+        { %headers },
         $request->content,
-        sub { my (undef, $tx) = @_; 
-            $t->tx($tx)
-        }
-    )->process;
-
-    my $mojo_res = $t->tx->res;
+    )->res;
 
     my $response = HTTP::Response->new(
         $mojo_res->code(),

Test-WWW-Mechanize-Mojo/t/lib/mojjy.pl

     return;
 };
 
-shagadelic;
+app->start;
 
 =head1 TODO