Merge commit 'origin/master'
t0m [Mon, 22 Mar 2010 22:44:14 +0000 (22:44 +0000)]
24 files changed:
Changes
lib/Catalyst/Action/Deserialize.pm
lib/Catalyst/Action/Deserialize/Data/Serializer.pm
lib/Catalyst/Action/Deserialize/JSON.pm
lib/Catalyst/Action/Deserialize/View.pm
lib/Catalyst/Action/Deserialize/XML/Simple.pm
lib/Catalyst/Action/Deserialize/YAML.pm
lib/Catalyst/Action/REST.pm
lib/Catalyst/Action/Serialize.pm
lib/Catalyst/Action/Serialize/Data/Serializer.pm
lib/Catalyst/Action/Serialize/JSON.pm
lib/Catalyst/Action/Serialize/JSON/XS.pm
lib/Catalyst/Action/Serialize/JSONP.pm
lib/Catalyst/Action/Serialize/View.pm
lib/Catalyst/Action/Serialize/XML/Simple.pm
lib/Catalyst/Action/Serialize/YAML.pm
lib/Catalyst/Action/Serialize/YAML/HTML.pm
lib/Catalyst/Action/SerializeBase.pm
lib/Catalyst/Controller/REST.pm
lib/Catalyst/Request/REST.pm
lib/Catalyst/Request/REST/ForBrowsers.pm
lib/Catalyst/TraitFor/Request/REST.pm
lib/Catalyst/TraitFor/Request/REST/ForBrowsers.pm
t/lib/Test/Serialize/Controller/REST.pm

diff --git a/Changes b/Changes
index cf9cf76..d0724eb 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,3 +1,12 @@
+Mon  8 Feb 2010 22:17:12 GMT - Release 0.83
+  Make it possible to deserialize a request with a DELETE method. This probably
+  breaks 'strict' REST guidelines, but is useful for being able to delete multiple
+  resources from a single call by providing a batch delete method.
+
+  Remove JSONP from the list of default serializers (RT#54336)
+
+  Fix MANIFEST (RT#54408)
+
 Thu  4 Feb 2010 22:31:57 GMT - Release 0.82
 
   Integrated Catalyst::Request::REST::ForBrowsers as
index ead726d..504fc30 100644 (file)
@@ -7,7 +7,7 @@ extends 'Catalyst::Action::SerializeBase';
 use Module::Pluggable::Object;
 use MRO::Compat;
 
-our $VERSION = '0.82';
+our $VERSION = '0.83';
 $VERSION = eval $VERSION;
 
 has plugins => ( is => 'rw' );
@@ -16,7 +16,7 @@ sub execute {
     my $self = shift;
     my ( $controller, $c ) = @_;
 
-    my @demethods = qw(POST PUT OPTIONS);
+    my @demethods = qw(POST PUT OPTIONS DELETE);
     my $method    = $c->request->method;
     if ( grep /^$method$/, @demethods ) {
         my ( $sclass, $sarg, $content_type ) =
index b91a6b5..4a49c8a 100644 (file)
@@ -6,7 +6,7 @@ use namespace::autoclean;
 extends 'Catalyst::Action';
 use Data::Serializer;
 
-our $VERSION = '0.82';
+our $VERSION = '0.83';
 $VERSION = eval $VERSION;
 
 sub execute {
index 6e7657d..1b7e677 100644 (file)
@@ -6,7 +6,7 @@ use namespace::autoclean;
 extends 'Catalyst::Action';
 use JSON qw( decode_json );
 
-our $VERSION = '0.82';
+our $VERSION = '0.83';
 $VERSION = eval $VERSION;
 
 sub execute {
index 0c40420..342a789 100644 (file)
@@ -5,7 +5,7 @@ use namespace::autoclean;
 
 extends 'Catalyst::Action';
 
-our $VERSION = '0.82';
+our $VERSION = '0.83';
 $VERSION = eval $VERSION;
 
 sub execute {
index 2e53359..58bbbb3 100644 (file)
@@ -5,7 +5,7 @@ use namespace::autoclean;
 
 extends 'Catalyst::Action';
 
-our $VERSION = '0.82';
+our $VERSION = '0.83';
 $VERSION = eval $VERSION;
 
 sub execute {
index e84ccc6..af9f2fd 100644 (file)
@@ -6,7 +6,7 @@ use namespace::autoclean;
 extends 'Catalyst::Action';
 use YAML::Syck;
 
-our $VERSION = '0.82';
+our $VERSION = '0.83';
 $VERSION = eval $VERSION;
 
 sub execute {
index cbd2095..6c7692c 100644 (file)
@@ -10,7 +10,7 @@ use Catalyst::Controller::REST;
 
 BEGIN { require 5.008001; }
 
-our $VERSION = '0.82';
+our $VERSION = '0.83';
 $VERSION = eval $VERSION;
 
 sub new {
index 74e3af3..1ee6e1c 100644 (file)
@@ -7,7 +7,7 @@ extends 'Catalyst::Action::SerializeBase';
 use Module::Pluggable::Object;
 use MRO::Compat;
 
-our $VERSION = '0.82';
+our $VERSION = '0.83';
 $VERSION = eval $VERSION;
 
 has _encoders => (
index c7971a2..98024a8 100644 (file)
@@ -6,7 +6,7 @@ use namespace::autoclean;
 extends 'Catalyst::Action';
 use Data::Serializer;
 
-our $VERSION = '0.82';
+our $VERSION = '0.83';
 $VERSION = eval $VERSION;
 
 sub execute {
index 764ba5f..0b10fb7 100644 (file)
@@ -6,7 +6,7 @@ use namespace::autoclean;
 extends 'Catalyst::Action';
 use JSON ();
 
-our $VERSION = '0.82';
+our $VERSION = '0.83';
 $VERSION = eval $VERSION;
 
 has encoder => (
index 79a8844..9aedbb9 100644 (file)
@@ -6,7 +6,7 @@ use namespace::autoclean;
 extends 'Catalyst::Action::Serialize::JSON';
 use JSON::XS ();
 
-our $VERSION = '0.82';
+our $VERSION = '0.83';
 $VERSION = eval $VERSION;
 
 sub _build_encoder {
index 4420af1..cb15920 100644 (file)
@@ -4,7 +4,7 @@ use namespace::autoclean;
 
 extends 'Catalyst::Action::Serialize::JSON';
 
-our $VERSION = '0.82';
+our $VERSION = '0.83';
 $VERSION = eval $VERSION;
 
 after 'execute' => sub {
index 62e6b75..bce9933 100644 (file)
@@ -4,7 +4,7 @@ use namespace::autoclean;
 
 extends 'Catalyst::Action';
 
-our $VERSION = '0.82';
+our $VERSION = '0.83';
 $VERSION = eval $VERSION;
 
 sub execute {
index 644656c..50b9097 100644 (file)
@@ -5,7 +5,7 @@ use namespace::autoclean;
 
 extends 'Catalyst::Action';
 
-our $VERSION = '0.82';
+our $VERSION = '0.83';
 $VERSION = eval $VERSION;
 
 sub execute {
index 4607b9e..fbfdb0e 100644 (file)
@@ -6,7 +6,7 @@ use namespace::autoclean;
 extends 'Catalyst::Action';
 use YAML::Syck;
 
-our $VERSION = '0.82';
+our $VERSION = '0.83';
 $VERSION = eval $VERSION;
 
 sub execute {
index acfbc03..de0b7c8 100644 (file)
@@ -7,7 +7,7 @@ extends 'Catalyst::Action';
 use YAML::Syck;
 use URI::Find;
 
-our $VERSION = '0.82';
+our $VERSION = '0.83';
 $VERSION = eval $VERSION;
 
 sub execute {
index 7c66b8d..b4447f7 100644 (file)
@@ -8,7 +8,7 @@ use Module::Pluggable::Object;
 use Catalyst::Request::REST;
 use Catalyst::Utils ();
 
-our $VERSION = '0.82';
+our $VERSION = '0.83';
 $VERSION = eval $VERSION;
 
 after BUILDARGS => sub {
index 7ffe413..fe3d49f 100644 (file)
@@ -2,7 +2,7 @@ package Catalyst::Controller::REST;
 use Moose;
 use namespace::autoclean;
 
-our $VERSION = '0.82';
+our $VERSION = '0.83';
 $VERSION = eval $VERSION;
 
 =head1 NAME
@@ -150,6 +150,11 @@ deprecated and you will receive warnings in your log.
 
 If a callback=? parameter is passed, this returns javascript in the form of: $callback($serializedJSON);
 
+Note - this is disabled by default as it can be a security risk if you are unaware.
+
+The usual MIME types for this serialization format are: 'text/javascript', 'application/x-javascript',
+'application/javascript'.
+
 =item * C<text/x-data-dumper> => C<Data::Serializer>
 
 Uses the L<Data::Serializer> module to generate L<Data::Dumper> output.
@@ -272,9 +277,6 @@ __PACKAGE__->config(
         'text/x-yaml'        => 'YAML',
         'application/json'   => 'JSON',
         'text/x-json'        => 'JSON',
-        'application/x-javascript'  => 'JSONP',
-        'application/javascript'    => 'JSONP',
-        'text/javascript'    => 'JSONP',
         'text/x-data-dumper' => [ 'Data::Serializer', 'Data::Dumper' ],
         'text/x-data-denter' => [ 'Data::Serializer', 'Data::Denter' ],
         'text/x-data-taxi'   => [ 'Data::Serializer', 'Data::Taxi'   ],
@@ -509,9 +511,6 @@ This class provides a default configuration for Serialization.  It is currently:
          'text/x-yaml'        => 'YAML',
          'application/json'   => 'JSON',
          'text/x-json'        => 'JSON',
-         'application/x-javascript' => 'JSONP',
-         'application/javascript'   => 'JSONP',
-         'text/javascript'    => 'JSONP',
          'text/x-data-dumper' => [ 'Data::Serializer', 'Data::Dumper' ],
          'text/x-data-denter' => [ 'Data::Serializer', 'Data::Denter' ],
          'text/x-data-taxi'   => [ 'Data::Serializer', 'Data::Taxi'   ],
index e1b6772..a6156b4 100644 (file)
@@ -7,7 +7,7 @@ use namespace::autoclean;
 extends 'Catalyst::Request';
 with 'Catalyst::TraitFor::Request::REST';
 
-our $VERSION = '0.82';
+our $VERSION = '0.83';
 $VERSION = eval $VERSION;
 
 # Please don't take this as a recommended way to do things.
index 38e2f57..01c1693 100644 (file)
@@ -3,7 +3,7 @@ use Moose;
 
 use namespace::autoclean;
 
-our $VERSION = '0.82';
+our $VERSION = '0.83';
 $VERSION = eval $VERSION;
 
 extends 'Catalyst::Request::REST';
index 1b9c872..2d54b7e 100644 (file)
@@ -3,7 +3,7 @@ use Moose::Role;
 use HTTP::Headers::Util qw(split_header_words);
 use namespace::autoclean;
 
-our $VERSION = '0.82';
+our $VERSION = '0.83';
 $VERSION = eval $VERSION;
 
 has [qw/ data accept_only /] => ( is => 'rw' );
index cdb79a1..c2e4d95 100644 (file)
@@ -4,7 +4,7 @@ use namespace::autoclean;
 
 with 'Catalyst::TraitFor::Request::REST';
 
-our $VERSION = '0.82';
+our $VERSION = '0.83';
 $VERSION = eval $VERSION;
 
 has _determined_real_method => (
index 4e7d1ba..5b7c4ec 100644 (file)
@@ -27,6 +27,9 @@ __PACKAGE__->config(
         'text/view'   => [ 'View', 'Simple' ],
         'text/explodingview' => [ 'View', 'Awful' ],
         'text/broken' => 'Broken',
+        'text/javascript', => 'JSONP',
+        'application/x-javascript' => 'JSONP',
+        'application/javascript' => 'JSONP',
     },
 );