[Catalyst-commits] r10913 - in
Catalyst-Devel/1.00/branches/helper_refactor: lib/Catalyst t
dhoss at dev.catalyst.perl.org
dhoss at dev.catalyst.perl.org
Fri Jul 17 01:51:03 GMT 2009
Author: dhoss
Date: 2009-07-17 01:51:03 +0000 (Fri, 17 Jul 2009)
New Revision: 10913
Modified:
Catalyst-Devel/1.00/branches/helper_refactor/lib/Catalyst/Helper.pm
Catalyst-Devel/1.00/branches/helper_refactor/t/generated_app.t
Log:
added DBIx::Class schema "migration" script + test in generated_app.t
Modified: Catalyst-Devel/1.00/branches/helper_refactor/lib/Catalyst/Helper.pm
===================================================================
--- Catalyst-Devel/1.00/branches/helper_refactor/lib/Catalyst/Helper.pm 2009-07-17 01:44:07 UTC (rev 10912)
+++ Catalyst-Devel/1.00/branches/helper_refactor/lib/Catalyst/Helper.pm 2009-07-17 01:51:03 UTC (rev 10913)
@@ -110,6 +110,7 @@
$self->_mk_cgi;
$self->_mk_fastcgi;
$self->_mk_server;
+ $self->_mk_dbic_deploy;
$self->_mk_test;
$self->_mk_create;
$self->_mk_information;
@@ -473,6 +474,14 @@
}
+sub _mk_dbic_deploy {
+ my $self = shift;
+ my $script = $self->{script};
+ my $appprefix = $self->{appprefix};
+ $self->render_sharedir_file( File::Spec->catfile('script', 'myapp_deploy_schema.pl.tt'), "$script\/$appprefix\_deploy_schema.pl" );
+ chmod 0700, "$script/$appprefix\_deploy_schema.pl";
+}
+
sub _deprecate_file {
my ( $self, $file ) = @_;
if ( -e $file ) {
@@ -516,6 +525,10 @@
The catalyst test server, starts an HTTPD which outputs debugging to
the terminal.
+=head2 _deploy_dbic.pl
+
+Deploy a L<DBIx::Class> schema to the database of your choice.
+
=head2 _test.pl
A script for running tests from the command-line.
Modified: Catalyst-Devel/1.00/branches/helper_refactor/t/generated_app.t
===================================================================
--- Catalyst-Devel/1.00/branches/helper_refactor/t/generated_app.t 2009-07-17 01:44:07 UTC (rev 10912)
+++ Catalyst-Devel/1.00/branches/helper_refactor/t/generated_app.t 2009-07-17 01:51:03 UTC (rev 10913)
@@ -49,6 +49,7 @@
script/testapp_server.pl
script/testapp_test.pl
script/testapp_create.pl
+script/testapp_deploy_schema.pl
|;
plan 'tests' => scalar @files + 4;
More information about the Catalyst-commits
mailing list