[Catalyst-commits] r13249 - in CatalystX-CRUD/CatalystX-CRUD/trunk:
. lib/CatalystX lib/CatalystX/CRUD
lib/CatalystX/CRUD/Iterator lib/CatalystX/CRUD/Model
lib/CatalystX/CRUD/ModelAdapter lib/CatalystX/CRUD/Object
lib/CatalystX/CRUD/Test t
karpet at dev.catalyst.perl.org
karpet at dev.catalyst.perl.org
Fri May 14 04:25:12 GMT 2010
Author: karpet
Date: 2010-05-14 05:25:12 +0100 (Fri, 14 May 2010)
New Revision: 13249
Modified:
CatalystX-CRUD/CatalystX-CRUD/trunk/Changes
CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD.pm
CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Controller.pm
CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Iterator.pm
CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Iterator/File.pm
CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Model.pm
CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Model/File.pm
CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Model/Utils.pm
CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/ModelAdapter/File.pm
CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Object.pm
CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Object/File.pm
CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/REST.pm
CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Results.pm
CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Test/Controller.pm
CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Test/Form.pm
CatalystX-CRUD/CatalystX-CRUD/trunk/t/02-controller.t
Log:
release 0.50
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/Changes
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/Changes 2010-05-13 16:33:41 UTC (rev 13248)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/Changes 2010-05-14 04:25:12 UTC (rev 13249)
@@ -240,3 +240,5 @@
* uri_for_view_on_single_result() will return uri for 'view' action,
regardless of value of can_write().
+0.50 13 May 2010
+ * fix make_primary_key_string() to get rid of bad sprintf() call
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Controller.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Controller.pm 2010-05-13 16:33:41 UTC (rev 13248)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Controller.pm 2010-05-14 04:25:12 UTC (rev 13249)
@@ -37,7 +37,7 @@
naked_results => 0,
);
-our $VERSION = '0.49';
+our $VERSION = '0.50';
=head1 NAME
@@ -242,7 +242,7 @@
for my $field (@$pk) {
my $v = scalar $obj->$field;
$v = '' unless defined $v;
- $v =~ s/;/ sprintf( "%%%02X", ';' ) /eg;
+ $v =~ s/;/\%3b/g;
push( @vals, $v );
}
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Iterator/File.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Iterator/File.pm 2010-05-13 16:33:41 UTC (rev 13248)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Iterator/File.pm 2010-05-14 04:25:12 UTC (rev 13249)
@@ -3,7 +3,7 @@
use warnings;
use Carp;
-our $VERSION = '0.49';
+our $VERSION = '0.50';
=head1 NAME
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Iterator.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Iterator.pm 2010-05-13 16:33:41 UTC (rev 13248)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Iterator.pm 2010-05-14 04:25:12 UTC (rev 13249)
@@ -4,7 +4,7 @@
use Carp;
use base qw( CatalystX::CRUD );
-our $VERSION = '0.49';
+our $VERSION = '0.50';
=head1 NAME
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Model/File.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Model/File.pm 2010-05-13 16:33:41 UTC (rev 13248)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Model/File.pm 2010-05-14 04:25:12 UTC (rev 13249)
@@ -10,7 +10,7 @@
__PACKAGE__->mk_accessors(qw( inc_path ));
-our $VERSION = '0.49';
+our $VERSION = '0.50';
# test whether symlink() works at compile time
my $SYMLINK_SUPPORTED = eval { symlink( "", "" ); 1 };
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Model/Utils.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Model/Utils.pm 2010-05-13 16:33:41 UTC (rev 13248)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Model/Utils.pm 2010-05-14 04:25:12 UTC (rev 13249)
@@ -9,7 +9,7 @@
__PACKAGE__->mk_accessors(qw( use_ilike ne_sign ));
-our $VERSION = '0.49';
+our $VERSION = '0.50';
=head1 NAME
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Model.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Model.pm 2010-05-13 16:33:41 UTC (rev 13248)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Model.pm 2010-05-14 04:25:12 UTC (rev 13249)
@@ -9,7 +9,7 @@
Catalyst::Model
);
-our $VERSION = '0.49';
+our $VERSION = '0.50';
__PACKAGE__->mk_accessors(qw( object_class page_size ));
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/ModelAdapter/File.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/ModelAdapter/File.pm 2010-05-13 16:33:41 UTC (rev 13248)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/ModelAdapter/File.pm 2010-05-14 04:25:12 UTC (rev 13249)
@@ -3,7 +3,7 @@
use warnings;
use base qw( CatalystX::CRUD::ModelAdapter );
-our $VERSION = '0.49';
+our $VERSION = '0.50';
=head1 NAME
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Object/File.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Object/File.pm 2010-05-13 16:33:41 UTC (rev 13248)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Object/File.pm 2010-05-14 04:25:12 UTC (rev 13249)
@@ -13,7 +13,7 @@
__PACKAGE__->mk_accessors(qw( content file ));
__PACKAGE__->delegate_class('Path::Class::File');
-our $VERSION = '0.49';
+our $VERSION = '0.50';
=head1 NAME
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Object.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Object.pm 2010-05-13 16:33:41 UTC (rev 13248)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Object.pm 2010-05-14 04:25:12 UTC (rev 13249)
@@ -12,7 +12,7 @@
__PACKAGE__->mk_ro_accessors(qw( delegate ));
__PACKAGE__->mk_classdata('delegate_class');
-our $VERSION = '0.49';
+our $VERSION = '0.50';
=head1 NAME
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/REST.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/REST.pm 2010-05-13 16:33:41 UTC (rev 13248)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/REST.pm 2010-05-14 04:25:12 UTC (rev 13249)
@@ -10,7 +10,7 @@
__PACKAGE__->mk_accessors(qw( enable_rpc_compat ));
__PACKAGE__->config( enable_rpc_compat => 0 );
-our $VERSION = '0.49';
+our $VERSION = '0.50';
#warn "REST VERSION = $VERSION";
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Results.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Results.pm 2010-05-13 16:33:41 UTC (rev 13248)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Results.pm 2010-05-14 04:25:12 UTC (rev 13249)
@@ -8,7 +8,7 @@
__PACKAGE__->mk_ro_accessors(qw( count pager query results ));
-our $VERSION = '0.49';
+our $VERSION = '0.50';
=head1 NAME
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Test/Controller.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Test/Controller.pm 2010-05-13 16:33:41 UTC (rev 13248)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Test/Controller.pm 2010-05-14 04:25:12 UTC (rev 13249)
@@ -8,7 +8,7 @@
__PACKAGE__->mk_accessors( qw( form_fields ) );
-our $VERSION = '0.49';
+our $VERSION = '0.50';
=head1 NAME
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Test/Form.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Test/Form.pm 2010-05-13 16:33:41 UTC (rev 13248)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD/Test/Form.pm 2010-05-14 04:25:12 UTC (rev 13249)
@@ -7,7 +7,7 @@
__PACKAGE__->mk_accessors(qw( params fields ));
-our $VERSION = '0.49';
+our $VERSION = '0.50';
=head1 NAME
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD.pm
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD.pm 2010-05-13 16:33:41 UTC (rev 13248)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/lib/CatalystX/CRUD.pm 2010-05-14 04:25:12 UTC (rev 13249)
@@ -4,7 +4,7 @@
use strict;
use Carp;
-our $VERSION = '0.49';
+our $VERSION = '0.50';
=head1 NAME
Modified: CatalystX-CRUD/CatalystX-CRUD/trunk/t/02-controller.t
===================================================================
--- CatalystX-CRUD/CatalystX-CRUD/trunk/t/02-controller.t 2010-05-13 16:33:41 UTC (rev 13248)
+++ CatalystX-CRUD/CatalystX-CRUD/trunk/t/02-controller.t 2010-05-14 04:25:12 UTC (rev 13249)
@@ -1,5 +1,7 @@
-use Test::More tests => 7;
+#!/usr/bin/env perl
use strict;
+use warnings;
+use Test::More tests => 10;
use_ok('CatalystX::CRUD::Controller');
ok( my $controller = CatalystX::CRUD::Controller->new( 'MyApp', {} ),
@@ -12,9 +14,20 @@
package MyC;
@MyC::ISA = ('CatalystX::CRUD::Controller');
- MyC->config( page_size => 30 );
+ MyC->config( page_size => 30, primary_key => [qw( foo bar )] );
}
+{
+ package MyObj;
+ sub new { return bless( {}, 'MyObj' ) }
+ sub foo { return '1;2' }
+ sub bar { return '3/4' }
+}
+
ok( my $myc = MyC->new( 'MyApp', {} ), "new MyC" );
is( $myc->page_size, 30, "set page_size in package config" );
+ok( my $obj = MyObj->new, "new MyObj" );
+ok( my $pk_escaped = $myc->make_primary_key_string($obj),
+ "make_primary_key_string" );
+is( $pk_escaped, "1%3b2;;3%2f4", "pk escaped" );
More information about the Catalyst-commits
mailing list