[Catalyst-commits] r7655 - / trunk/examples/NewAuthApp
trunk/examples/NewAuthApp/lib
trunk/examples/NewAuthApp/lib/NewAuthApp/Model
trunk/examples/NewAuthApp/lib/Schema trunk/examples/NewAuthApp/t
zarquon at dev.catalyst.perl.org
zarquon at dev.catalyst.perl.org
Wed Apr 30 11:43:24 BST 2008
Author: zarquon
Date: 2008-04-30 11:43:24 +0100 (Wed, 30 Apr 2008)
New Revision: 7655
Added:
trunk/examples/NewAuthApp/auth.db
trunk/examples/NewAuthApp/bin/
trunk/examples/NewAuthApp/lib/NewAuthApp/Model/AuthSchema.pm
trunk/examples/NewAuthApp/t/model_AuthSchema.t
Modified:
/
trunk/examples/NewAuthApp/Makefile.PL
trunk/examples/NewAuthApp/lib/Schema.pm
trunk/examples/NewAuthApp/lib/Schema/Role.pm
trunk/examples/NewAuthApp/lib/Schema/User.pm
trunk/examples/NewAuthApp/lib/Schema/UserRole.pm
trunk/examples/NewAuthApp/t/controller_Auth.t
Log:
r13000 at zaphod: kd | 2008-04-30 20:39:12 +1000
moving over to dbic schema instead of minimal
Property changes on:
___________________________________________________________________
Name: svk:merge
- 1b129c88-ebf4-0310-add9-f09427935aba:/local/catalyst:4278
1c72fc7c-9ce4-42af-bf25-3bfe470ff1e8:/local/Catalyst:12999
3b9770f9-e80c-0410-a7de-cd203d167417:/local/catalyst:3514
dd8ad9ea-0304-0410-a433-df5f223e7bc0:/local/Catalyst:6909
+ 1b129c88-ebf4-0310-add9-f09427935aba:/local/catalyst:4278
1c72fc7c-9ce4-42af-bf25-3bfe470ff1e8:/local/Catalyst:13000
3b9770f9-e80c-0410-a7de-cd203d167417:/local/catalyst:3514
dd8ad9ea-0304-0410-a433-df5f223e7bc0:/local/Catalyst:6909
Modified: trunk/examples/NewAuthApp/Makefile.PL
===================================================================
--- trunk/examples/NewAuthApp/Makefile.PL 2008-04-30 10:42:47 UTC (rev 7654)
+++ trunk/examples/NewAuthApp/Makefile.PL 2008-04-30 10:43:24 UTC (rev 7655)
@@ -11,6 +11,7 @@
requires 'Catalyst::Plugin::Session';
requires 'Catalyst::Plugin::Session::State::Cookie';
requires 'Catalyst::Plugin::Session::Store::FastMmapp';
+requires 'Catalyst::Authentication::Store::DBIx::Class';
requires 'Catalyst::View::TT';
requires 'Catalyst::Action::RenderView';
requires 'YAML'; # This should reflect the config file format you've chosen
Added: trunk/examples/NewAuthApp/auth.db
===================================================================
(Binary files differ)
Property changes on: trunk/examples/NewAuthApp/auth.db
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/examples/NewAuthApp/lib/NewAuthApp/Model/AuthSchema.pm
===================================================================
--- trunk/examples/NewAuthApp/lib/NewAuthApp/Model/AuthSchema.pm (rev 0)
+++ trunk/examples/NewAuthApp/lib/NewAuthApp/Model/AuthSchema.pm 2008-04-30 10:43:24 UTC (rev 7655)
@@ -0,0 +1,9 @@
+package NewAuthApp::Model::AuthSchema;
+
+use strict;
+use warnings;
+use base 'Catalyst::Model::DBIC::Schema';
+__PACKAGE__->config(
+ schema_class => 'Schema',
+ connect_info => [ "dbi:SQLite:auth.db",'','',{AutoCommit => 1},]);
+1;
Modified: trunk/examples/NewAuthApp/lib/Schema/Role.pm
===================================================================
--- trunk/examples/NewAuthApp/lib/Schema/Role.pm 2008-04-30 10:42:47 UTC (rev 7654)
+++ trunk/examples/NewAuthApp/lib/Schema/Role.pm 2008-04-30 10:43:24 UTC (rev 7655)
@@ -1,15 +1,24 @@
-package TestApp::Schema::Role;
+package Schema::Role;
use strict;
use warnings;
+
use base 'DBIx::Class';
-__PACKAGE__->load_components(qw/ Core /);
+__PACKAGE__->load_components("Core");
+__PACKAGE__->table("role");
+__PACKAGE__->add_columns(
+ "id",
+ { data_type => "INTEGER", is_nullable => 0, size => undef },
+ "role",
+ { data_type => "TEXT", is_nullable => 0, size => undef },
+);
+__PACKAGE__->set_primary_key("id");
-__PACKAGE__->table( 'role' );
-__PACKAGE__->add_columns( qw/id role/ );
-__PACKAGE__->set_primary_key( 'id' );
-#__PACKAGE__->has_many( map_user_role => 'TestApp::Schema::UserRole' => 'roleid' );
+# Created by DBIx::Class::Schema::Loader v0.04004 @ 2008-04-30 15:54:19
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:A55sLyGZSrhE0Tr98QTwxw
+
+# You can replace this text with custom content, and it will be preserved on regeneration
1;
Modified: trunk/examples/NewAuthApp/lib/Schema/User.pm
===================================================================
--- trunk/examples/NewAuthApp/lib/Schema/User.pm 2008-04-30 10:42:47 UTC (rev 7654)
+++ trunk/examples/NewAuthApp/lib/Schema/User.pm 2008-04-30 10:43:24 UTC (rev 7655)
@@ -1,17 +1,39 @@
-package TestApp::Schema::User;
+package Schema::User;
use strict;
use warnings;
+
use base 'DBIx::Class';
-__PACKAGE__->load_components(qw/ Core /);
+__PACKAGE__->load_components("Core");
+__PACKAGE__->table("user");
+__PACKAGE__->add_columns(
+ "id",
+ { data_type => "INTEGER", is_nullable => 0, size => undef },
+ "username",
+ { data_type => "TEXT", is_nullable => 0, size => undef },
+ "email",
+ { data_type => "TEXT", is_nullable => 0, size => undef },
+ "password",
+ { data_type => "TEXT", is_nullable => 0, size => undef },
+ "status",
+ { data_type => "TEXT", is_nullable => 0, size => undef },
+ "role_text",
+ { data_type => "TEXT", is_nullable => 0, size => undef },
+ "session_data",
+ { data_type => "TEXT", is_nullable => 0, size => undef },
+);
+__PACKAGE__->set_primary_key("id");
-__PACKAGE__->table( 'user' );
-__PACKAGE__->add_columns( qw/id username email password status role_text session_data/ );
-__PACKAGE__->set_primary_key( 'id' );
-__PACKAGE__->has_many( 'map_user_role' => 'TestApp::Schema::UserRole' => 'user' );
+# Created by DBIx::Class::Schema::Loader v0.04004 @ 2008-04-30 15:54:19
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:Ve4gGdBYHK4WkUKEPK9p9w
+
+# You can replace this text with custom content, and it will be preserved on regeneration
+
+__PACKAGE__->has_many( 'map_user_role' => 'Schema::UserRole' => 'user' );
__PACKAGE__->many_to_many( roles => 'map_user_role', 'role');
+
1;
Modified: trunk/examples/NewAuthApp/lib/Schema/UserRole.pm
===================================================================
--- trunk/examples/NewAuthApp/lib/Schema/UserRole.pm 2008-04-30 10:42:47 UTC (rev 7654)
+++ trunk/examples/NewAuthApp/lib/Schema/UserRole.pm 2008-04-30 10:43:24 UTC (rev 7655)
@@ -1,15 +1,28 @@
-package TestApp::Schema::UserRole;
+package Schema::UserRole;
use strict;
use warnings;
+
use base 'DBIx::Class';
-__PACKAGE__->load_components(qw/ Core /);
+__PACKAGE__->load_components("Core");
+__PACKAGE__->table("user_role");
+__PACKAGE__->add_columns(
+ "id",
+ { data_type => "INTEGER", is_nullable => 0, size => undef },
+ "user",
+ { data_type => "INTEGER", is_nullable => 0, size => undef },
+ "roleid",
+ { data_type => "INTEGER", is_nullable => 0, size => undef },
+);
+__PACKAGE__->set_primary_key("id");
-__PACKAGE__->table( 'user_role' );
-__PACKAGE__->add_columns( qw/id user roleid/ );
-__PACKAGE__->set_primary_key( qw/id/ );
-__PACKAGE__->belongs_to('role', 'TestApp::Schema::Role', { 'foreign.id' => 'self.roleid'});
+# Created by DBIx::Class::Schema::Loader v0.04004 @ 2008-04-30 15:54:19
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:E1wTbZtsp6Ge8mHwpbLnGw
+
+# You can replace this text with custom content, and it will be preserved on regeneration
+__PACKAGE__->belongs_to('role', 'Schema::Role', { 'foreign.id' => 'self.roleid'});
+
1;
Modified: trunk/examples/NewAuthApp/lib/Schema.pm
===================================================================
--- trunk/examples/NewAuthApp/lib/Schema.pm 2008-04-30 10:42:47 UTC (rev 7654)
+++ trunk/examples/NewAuthApp/lib/Schema.pm 2008-04-30 10:43:24 UTC (rev 7655)
@@ -1,7 +1,5 @@
-package TestApp::Schema;
+package Schema;
-# Created by DBIx::Class::Schema::Loader v0.03007 @ 2006-10-18 12:38:33
-
use strict;
use warnings;
@@ -9,4 +7,10 @@
__PACKAGE__->load_classes;
-1;
\ No newline at end of file
+
+# Created by DBIx::Class::Schema::Loader v0.04004 @ 2008-04-30 15:54:19
+# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:d+ohIdId2P6eNpCSzDIhmQ
+
+
+# You can replace this text with custom content, and it will be preserved on regeneration
+1;
Modified: trunk/examples/NewAuthApp/t/controller_Auth.t
===================================================================
--- trunk/examples/NewAuthApp/t/controller_Auth.t 2008-04-30 10:42:47 UTC (rev 7654)
+++ trunk/examples/NewAuthApp/t/controller_Auth.t 2008-04-30 10:43:24 UTC (rev 7655)
@@ -1,6 +1,6 @@
use strict;
use warnings;
-use Test::More qw/no_plan/;
+use Test::More tests => 8;
BEGIN { use_ok 'Test::WWW::Mechanize::Catalyst', 'NewAuthApp' }
BEGIN { use_ok 'NewAuthApp::Controller::Auth' }
Added: trunk/examples/NewAuthApp/t/model_AuthSchema.t
===================================================================
--- trunk/examples/NewAuthApp/t/model_AuthSchema.t (rev 0)
+++ trunk/examples/NewAuthApp/t/model_AuthSchema.t 2008-04-30 10:43:24 UTC (rev 7655)
@@ -0,0 +1,6 @@
+use strict;
+use warnings;
+use Test::More tests => 1;
+
+BEGIN { use_ok 'NewAuthApp::Model::AuthSchema' }
+
More information about the Catalyst-commits
mailing list