[Catalyst-commits] r12650 - in Catalyst-Model-DBIC-Schema/trunk: .
lib/Catalyst/Helper/Model/DBIC lib/Catalyst/Model/DBIC t
caelum at dev.catalyst.perl.org
caelum at dev.catalyst.perl.org
Thu Jan 14 15:30:56 GMT 2010
Author: caelum
Date: 2010-01-14 15:30:55 +0000 (Thu, 14 Jan 2010)
New Revision: 12650
Modified:
Catalyst-Model-DBIC-Schema/trunk/Changes
Catalyst-Model-DBIC-Schema/trunk/Makefile.PL
Catalyst-Model-DBIC-Schema/trunk/lib/Catalyst/Helper/Model/DBIC/Schema.pm
Catalyst-Model-DBIC-Schema/trunk/lib/Catalyst/Model/DBIC/Schema.pm
Catalyst-Model-DBIC-Schema/trunk/t/07connect_info.t
Log:
test for single replicant hashref coercion, release
Modified: Catalyst-Model-DBIC-Schema/trunk/Changes
===================================================================
--- Catalyst-Model-DBIC-Schema/trunk/Changes 2010-01-14 14:59:33 UTC (rev 12649)
+++ Catalyst-Model-DBIC-Schema/trunk/Changes 2010-01-14 15:30:55 UTC (rev 12650)
@@ -1,5 +1,8 @@
Revision history for Perl extension Catalyst::Model::DBIC::Schema
+0.37 Thu Jan 14 10:20:43 EST 2010
+ - support single replicant hashref from config
+
0.36 Thu Jan 14 09:21:10 EST 2010
- upgrading a schema to use_namespaces=1 will also turn on
components=InflateColumn::DateTime (the default.)
Modified: Catalyst-Model-DBIC-Schema/trunk/Makefile.PL
===================================================================
--- Catalyst-Model-DBIC-Schema/trunk/Makefile.PL 2010-01-14 14:59:33 UTC (rev 12649)
+++ Catalyst-Model-DBIC-Schema/trunk/Makefile.PL 2010-01-14 15:30:55 UTC (rev 12650)
@@ -15,7 +15,7 @@
requires 'List::MoreUtils';
requires 'Tie::IxHash';
-test_requires 'Test::More' => '0.92';
+test_requires 'Test::More' => '0.94';
test_requires 'Test::Exception';
feature 'Catalyst::Helper support',
Modified: Catalyst-Model-DBIC-Schema/trunk/lib/Catalyst/Helper/Model/DBIC/Schema.pm
===================================================================
--- Catalyst-Model-DBIC-Schema/trunk/lib/Catalyst/Helper/Model/DBIC/Schema.pm 2010-01-14 14:59:33 UTC (rev 12649)
+++ Catalyst-Model-DBIC-Schema/trunk/lib/Catalyst/Helper/Model/DBIC/Schema.pm 2010-01-14 15:30:55 UTC (rev 12650)
@@ -4,7 +4,7 @@
use Moose;
no warnings 'uninitialized';
-our $VERSION = '0.36';
+our $VERSION = '0.37';
$VERSION = eval $VERSION;
use Carp;
Modified: Catalyst-Model-DBIC-Schema/trunk/lib/Catalyst/Model/DBIC/Schema.pm
===================================================================
--- Catalyst-Model-DBIC-Schema/trunk/lib/Catalyst/Model/DBIC/Schema.pm 2010-01-14 14:59:33 UTC (rev 12649)
+++ Catalyst-Model-DBIC-Schema/trunk/lib/Catalyst/Model/DBIC/Schema.pm 2010-01-14 15:30:55 UTC (rev 12650)
@@ -5,7 +5,7 @@
extends 'Catalyst::Model';
with 'CatalystX::Component::Traits';
-our $VERSION = '0.36';
+our $VERSION = '0.37';
$VERSION = eval $VERSION;
use namespace::autoclean;
Modified: Catalyst-Model-DBIC-Schema/trunk/t/07connect_info.t
===================================================================
--- Catalyst-Model-DBIC-Schema/trunk/t/07connect_info.t 2010-01-14 14:59:33 UTC (rev 12649)
+++ Catalyst-Model-DBIC-Schema/trunk/t/07connect_info.t 2010-01-14 15:30:55 UTC (rev 12650)
@@ -52,8 +52,6 @@
{ pg_enable_utf8 => 1 }, { AutoCommit => 1 }, { auto_savepoint => 1 }],
);
-plan tests => @tests / 2 + @invalid + 1 + 1;
-
# ignore redefined warnings, and uninitialized warnings from old
# ::Storage::DBI::Replicated
local $SIG{__WARN__} = sub {
@@ -89,6 +87,11 @@
replicants => \@replicants
);
+lives_and {
+ is_deeply(TryConnectInfos->new(replicants => $tests[1])->replicants,
+ [ $tests[1] ])
+} 'single replicant hashref coerces correctly';
+
is_deeply $m->replicants, [
map $tests[$_], grep $_ % 2, 0 .. $#tests
], 'replicant connect_infos coerced correctly';
@@ -101,6 +104,8 @@
'connect_info coerced correctly when defining connection in the schema class';
}
+done_testing;
+
sub instance {
Catalyst::Model::DBIC::Schema->new({
schema_class => 'ASchemaClass',
More information about the Catalyst-commits
mailing list