[Bast-commits] r9211 - DBIx-Class-Tree DBIx-Class-Tree/trunk
DBIx-Class-Tree/trunk/lib/DBIx/Class/Tree
DBIx-Class-Tree/trunk/t DBIx-Class-Tree/trunk/t/lib trunk
ribasushi at dev.catalyst.perl.org
ribasushi at dev.catalyst.perl.org
Sun Apr 25 10:38:17 GMT 2010
Author: ribasushi
Date: 2010-04-25 11:38:17 +0100 (Sun, 25 Apr 2010)
New Revision: 9211
Removed:
trunk/DBIx-Class-Tree/
Modified:
DBIx-Class-Tree/
DBIx-Class-Tree/trunk/
DBIx-Class-Tree/trunk/Makefile.PL
DBIx-Class-Tree/trunk/lib/DBIx/Class/Tree/AdjacencyList.pm
DBIx-Class-Tree/trunk/t/
DBIx-Class-Tree/trunk/t/lib/TreeTest.pm
Log:
Migration finished
Property changes on: DBIx-Class-Tree/trunk
___________________________________________________________________
Added: svn:ignore
+ _build
blib
pm_to_blib
Build
Build.bat
Makefile
Makefile.old
inc
README
META.yml
MANIFEST
MANIFEST.bak
Modified: DBIx-Class-Tree/trunk/Makefile.PL
===================================================================
--- DBIx-Class-Tree/trunk/Makefile.PL 2010-04-25 10:21:00 UTC (rev 9210)
+++ DBIx-Class-Tree/trunk/Makefile.PL 2010-04-25 10:38:17 UTC (rev 9211)
@@ -1,13 +1,19 @@
use inc::Module::Install;
+BEGIN {
+ if ($Module::Install::AUTHOR) {
+ require Module::Install::ReadmeFromPod;
+ }
+}
+
name 'DBIx-Class-Tree';
+perl_version '5.008001';
all_from 'lib/DBIx/Class/Tree.pm';
-readme_from 'lib/DBIx/Class/Tree.pm';
-githubmeta;
+readme_from 'lib/DBIx/Class/Tree.pm';
-requires 'Carp' => 0;
+resources 'repository' => 'http://dev.catalyst.perl.org/repos/bast/DBIx-Class-Tree/';
+
requires 'DBIx::Class' => '0.08100';
-build_requires 'DBD::SQLite' => '0.42';
WriteAll;
Modified: DBIx-Class-Tree/trunk/lib/DBIx/Class/Tree/AdjacencyList.pm
===================================================================
--- DBIx-Class-Tree/trunk/lib/DBIx/Class/Tree/AdjacencyList.pm 2010-04-25 10:21:00 UTC (rev 9210)
+++ DBIx-Class-Tree/trunk/lib/DBIx/Class/Tree/AdjacencyList.pm 2010-04-25 10:38:17 UTC (rev 9211)
@@ -260,8 +260,6 @@
return $rs;
}
-=cut
-
=head2 attach_sibling
$obj->attach_sibling( $sibling );
Property changes on: DBIx-Class-Tree/trunk/t
___________________________________________________________________
Added: svn:ignore
+ var
Modified: DBIx-Class-Tree/trunk/t/lib/TreeTest.pm
===================================================================
--- DBIx-Class-Tree/trunk/t/lib/TreeTest.pm 2010-04-25 10:21:00 UTC (rev 9210)
+++ DBIx-Class-Tree/trunk/t/lib/TreeTest.pm 2010-04-25 10:38:17 UTC (rev 9211)
@@ -8,7 +8,7 @@
our $NODE_COUNT = 80;
sub count_tests {
- my $count = 22;
+ my $count = 13;
if( TreeTest::Schema::Node->can('position_column') ){
$count ++;
}
@@ -38,11 +38,11 @@
ok( ($nodes->find(22)->children->count()==2), 'node 22 has correct number of children' );
ok( ($nodes->find(22)->siblings->count()==3), 'node 22 has correct number of siblings' );
- $nodes->find(22)->add_child( $nodes->find(3) );
+ $nodes->find(22)->attach_child( $nodes->find(3) );
ok( ($nodes->find(22)->children->count()==3), 'node 22 has correct number of children' );
ok( ($nodes->find(22)->siblings->count()==2), 'node 22 has correct number of siblings' );
- $nodes->find(22)->add_sibling( $nodes->find(3) );
+ $nodes->find(22)->attach_sibling( $nodes->find(3) );
ok( ($nodes->find(22)->children->count()==2), 'node 22 has correct number of children' );
ok( ($nodes->find(22)->siblings->count()==3), 'node 22 has correct number of siblings' );
@@ -52,38 +52,6 @@
if( TreeTest::Schema::Node->can('position_column') ){
ok( check_positions(scalar $root->children()), 'positions are correct' );
}
-
- #$nodes->delete;
- $schema = TreeTest::Schema->connect();
- $nodes = $schema->resultset('Node');
- $root = $nodes->create({ name=>'root' });
- @parents = (
- 1,1,3,2,3,3,6,6,2,5,3,5,12,1
- );
- foreach my $parent_id (@parents) {
- my $node = $nodes->create({ name=>'child' });
- $node->parent( $parent_id );
- }
-
- ok ($nodes->find(1)->descendents == 14, 'root node has 14 descendents');
- ok ($nodes->find(2)->descendents == 4, 'node 2 has 4 descendents');
- ok ($nodes->find(6)->descendents == 2, 'node 6 has 2 descendents');
- ok ($nodes->find(10)->descendents == 0, 'node 10 has no descendents');
-
- $nodes->find(2)->pharaoh_delete;
- ok ($nodes->find(1)->descendents == 9, 'root node has 9 descendents after pharaohing node 2');
-
- ok ($nodes->find(3)->children == 4, 'node 3 has 4 children');
- $nodes->find(6)->grandmother_delete;
- ok ($nodes->find(3)->children == 5, 'node 3 has 5 children after node 6 dies');
-
- $nodes->find(3)->replace_with_and_delete($nodes->find(12));
- ok ($nodes->find(12)->children == 5, 'node 12 has 5 children after taking over from node 3');
- ok ($nodes->find(7)->parent->id == 12, 'node 7\'s parent is node 12');
-
-
-
-
}
sub check_positions {
More information about the Bast-commits
mailing list