[Catalyst-commits] r9132 - in Catalyst-Action-REST/0.60/trunk: . lib/Catalyst/Action lib/Catalyst/Request t

jshirley at dev.catalyst.perl.org jshirley at dev.catalyst.perl.org
Wed Jan 28 16:59:17 GMT 2009


Author: jshirley
Date: 2009-01-28 16:59:16 +0000 (Wed, 28 Jan 2009)
New Revision: 9132

Modified:
   Catalyst-Action-REST/0.60/trunk/Makefile.PL
   Catalyst-Action-REST/0.60/trunk/lib/Catalyst/Action/REST.pm
   Catalyst-Action-REST/0.60/trunk/lib/Catalyst/Request/REST.pm
   Catalyst-Action-REST/0.60/trunk/t/catalyst-action-rest.t
   Catalyst-Action-REST/0.60/trunk/t/catalyst-action-serialize-accept.t
Log:
Fixing Makefile.PL, RT#42859

Modified: Catalyst-Action-REST/0.60/trunk/Makefile.PL
===================================================================
--- Catalyst-Action-REST/0.60/trunk/Makefile.PL	2009-01-28 16:13:14 UTC (rev 9131)
+++ Catalyst-Action-REST/0.60/trunk/Makefile.PL	2009-01-28 16:59:16 UTC (rev 9132)
@@ -5,7 +5,7 @@
 name 'Catalyst-Action-REST';
 all_from 'lib/Catalyst/Action/REST.pm';
 
-requires('Catalyst'                  => '5.7001');
+requires('Catalyst-Runtime'          => '5.7001');
 requires('Params::Validate'          => '0.76');
 requires('YAML::Syck'                => '0.67');
 requires('Module::Pluggable::Object' => undef);

Modified: Catalyst-Action-REST/0.60/trunk/lib/Catalyst/Action/REST.pm
===================================================================
--- Catalyst-Action-REST/0.60/trunk/lib/Catalyst/Action/REST.pm	2009-01-28 16:13:14 UTC (rev 9131)
+++ Catalyst-Action-REST/0.60/trunk/lib/Catalyst/Action/REST.pm	2009-01-28 16:59:16 UTC (rev 9132)
@@ -18,7 +18,7 @@
 
 BEGIN { require 5.008001; }
 
-our $VERSION = '0.65';
+our $VERSION = '0.67';
 
 # This is wrong in several ways. First, there's no guarantee that
 # Catalyst.pm has not been subclassed. Two, there's no guarantee that

Modified: Catalyst-Action-REST/0.60/trunk/lib/Catalyst/Request/REST.pm
===================================================================
--- Catalyst-Action-REST/0.60/trunk/lib/Catalyst/Request/REST.pm	2009-01-28 16:13:14 UTC (rev 9131)
+++ Catalyst-Action-REST/0.60/trunk/lib/Catalyst/Request/REST.pm	2009-01-28 16:59:16 UTC (rev 9132)
@@ -10,7 +10,7 @@
 use strict;
 use warnings;
 
-use base 'Catalyst::Request';
+use base qw/Catalyst::Request Class::Accessor::Fast/;
 use HTTP::Headers::Util qw(split_header_words);
 
 
@@ -35,8 +35,6 @@
 
 =head1 METHODS
 
-=over 4 data
-
 If the request went through the Deserializer action, this method will
 returned the deserialized data structure.
 
@@ -44,6 +42,8 @@
 
 __PACKAGE__->mk_accessors(qw(data accept_only));
 
+=over 4 
+
 =item accepted_content_types
 
 Returns an array reference of content types accepted by the
@@ -141,10 +141,16 @@
     return grep { $_ eq $type } @{ $self->accepted_content_types };
 }
 
+=back
+
 =head1 AUTHOR
 
 Adam Jacob <adam at stalecoffee.org>, with lots of help from mst and jrockway
 
+=head1 MAINTAINER
+
+J. Shirley <jshirley at cpan.org>
+
 =head1 LICENSE
 
 You may distribute this code under the same terms as Perl itself.

Modified: Catalyst-Action-REST/0.60/trunk/t/catalyst-action-rest.t
===================================================================
--- Catalyst-Action-REST/0.60/trunk/t/catalyst-action-rest.t	2009-01-28 16:13:14 UTC (rev 9131)
+++ Catalyst-Action-REST/0.60/trunk/t/catalyst-action-rest.t	2009-01-28 16:59:16 UTC (rev 9132)
@@ -81,6 +81,15 @@
     $c->forward('ok');
 }
 
+sub not_modified : Local : ActionClass('REST') { }
+
+sub not_modified_GET {
+    my ( $self, $c ) = @_;
+    $c->res->status(304);
+    return 1;
+}
+
+
 sub ok : Private {
     my ( $self, $c ) = @_;
 
@@ -135,6 +144,9 @@
 is( $options_res->header('allow'),
     "GET", "OPTIONS request allow header properly set." );
 
+my $modified_res = request( $t->get( url => '/not_modified' ) );
+is( $modified_res->code, 304, "Not Modified request handler succeeded" );
+
 my $ni_res = request( $t->delete( url => '/not_implemented' ) );
 is( $ni_res->code, 200, "Custom not_implemented handler succeeded" );
 is(

Modified: Catalyst-Action-REST/0.60/trunk/t/catalyst-action-serialize-accept.t
===================================================================
--- Catalyst-Action-REST/0.60/trunk/t/catalyst-action-serialize-accept.t	2009-01-28 16:13:14 UTC (rev 9131)
+++ Catalyst-Action-REST/0.60/trunk/t/catalyst-action-serialize-accept.t	2009-01-28 16:59:16 UTC (rev 9132)
@@ -82,7 +82,7 @@
 }
 
 SKIP: {
-    eval 'require JSON';
+    eval 'require JSON 2.12;';
     skip "can't test application/json without JSON support", 3 if $@;
     my $json = JSON->new;
     my $at = Test::Rest->new('content_type' => 'text/doesnt-exist');




More information about the Catalyst-commits mailing list