[Catalyst-commits] r7423 - in trunk/Catalyst-Example-InstantCRUD: .
lib/Catalyst/Example lib/Catalyst/Example/Controller
lib/Catalyst/Example/InstantCRUD lib/Catalyst/Helper
lib/Catalyst/Helper/View lib/Catalyst/Plugin/Auth
zby at dev.catalyst.perl.org
zby at dev.catalyst.perl.org
Tue Jan 29 21:02:38 GMT 2008
Author: zby
Date: 2008-01-29 21:02:37 +0000 (Tue, 29 Jan 2008)
New Revision: 7423
Modified:
trunk/Catalyst-Example-InstantCRUD/Changes
trunk/Catalyst-Example-InstantCRUD/MANIFEST
trunk/Catalyst-Example-InstantCRUD/Makefile.PL
trunk/Catalyst-Example-InstantCRUD/lib/Catalyst/Example/Controller/InstantCRUD.pm
trunk/Catalyst-Example-InstantCRUD/lib/Catalyst/Example/InstantCRUD.pm
trunk/Catalyst-Example-InstantCRUD/lib/Catalyst/Example/InstantCRUD/Utils.pm
trunk/Catalyst-Example-InstantCRUD/lib/Catalyst/Helper/InstantCRUD.pm
trunk/Catalyst-Example-InstantCRUD/lib/Catalyst/Helper/View/InstantCRUD.pm
trunk/Catalyst-Example-InstantCRUD/lib/Catalyst/Plugin/Auth/Utils.pm
Log:
Vesrion 0.0.20
Modified: trunk/Catalyst-Example-InstantCRUD/Changes
===================================================================
--- trunk/Catalyst-Example-InstantCRUD/Changes 2008-01-28 22:20:24 UTC (rev 7422)
+++ trunk/Catalyst-Example-InstantCRUD/Changes 2008-01-29 21:02:37 UTC (rev 7423)
@@ -46,4 +46,6 @@
- Schema moved to application directory (name changed)
- HTML::Widget::DBIC published separately
+0.0.20 Wed Sep 12
+- upgraded to newer versions of DBIC and other libraries
Modified: trunk/Catalyst-Example-InstantCRUD/MANIFEST
===================================================================
--- trunk/Catalyst-Example-InstantCRUD/MANIFEST 2008-01-28 22:20:24 UTC (rev 7422)
+++ trunk/Catalyst-Example-InstantCRUD/MANIFEST 2008-01-29 21:02:37 UTC (rev 7423)
@@ -1,6 +1,5 @@
Changes
MANIFEST
-META.yml # Will be created by "make dist"
Makefile.PL
README
script/instantcrud.pl
@@ -24,3 +23,4 @@
lib/Catalyst/Example/Controller/InstantCRUD.pm
lib/Catalyst/Example/InstantCRUD/Utils.pm
+META.yml Module meta-data (added by MakeMaker)
Modified: trunk/Catalyst-Example-InstantCRUD/Makefile.PL
===================================================================
--- trunk/Catalyst-Example-InstantCRUD/Makefile.PL 2008-01-28 22:20:24 UTC (rev 7422)
+++ trunk/Catalyst-Example-InstantCRUD/Makefile.PL 2008-01-29 21:02:37 UTC (rev 7423)
@@ -12,9 +12,9 @@
'Catalyst::Runtime' => '5.7000',
'Catalyst::Devel' => '1.00',
'Catalyst::View::TT' => '0.21',
- 'DBIx::Class' => '0.07000',
+ 'DBIx::Class' => '0.08003',
'DBIx::Class::Schema::Loader' => '0.03',
- 'DBIx::Class::DigestColumns' => 0,
+ 'DBIx::Class::DigestColumns' => 0,
'Template::Plugin::Class' => 0,
'Catalyst::Model::DBIC::Schema' => 0,
'Catalyst::Helper::Model::DBIC::Schema' => 0,
@@ -26,7 +26,7 @@
'Catalyst::Plugin::Authentication::Store::DBIC' => '0.07',
'Catalyst::Plugin::Authentication::Credential::Password' => 0,
'Catalyst::Plugin::Session::State::Cookie' => 0,
- 'Catalyst::Plugin::Session::Store::FastMmap' => 0,
+ 'Catalyst::Plugin::Session::Store::FastMmap' => 0,
'Test::More' => 0,
'version' => 0,
'URI::Escape' => 0,
@@ -36,6 +36,7 @@
'File::Spec' => 0,
'File::Slurp' => 0,
'Pod::Usage' => 0,
+ 'Digest::SHA1' => 0,
},
dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
clean => { FILES => 'Catalyst-Example-InstantCRUD-*' },
Modified: trunk/Catalyst-Example-InstantCRUD/lib/Catalyst/Example/Controller/InstantCRUD.pm
===================================================================
--- trunk/Catalyst-Example-InstantCRUD/lib/Catalyst/Example/Controller/InstantCRUD.pm 2008-01-28 22:20:24 UTC (rev 7422)
+++ trunk/Catalyst-Example-InstantCRUD/lib/Catalyst/Example/Controller/InstantCRUD.pm 2008-01-29 21:02:37 UTC (rev 7423)
@@ -10,6 +10,8 @@
use Path::Class;
use HTML::Widget::DBIC;
+use version; our $VERSION = qv('0.0.12');
+
sub auto : Local {
my ( $self, $c ) = @_;
$c->stash->{additional_template_paths} = [ dir( $c->config->{root}, $self->source_name) . '', $c->config->{root} . ''];
@@ -72,7 +74,7 @@
->action( $c->uri_for( 'destroy', $id ) );
$w->element( 'Submit', 'ok' )->value('Delete ?');
$c->stash->{destroywidget} = $w->process;
- $c->stash->{template} = 'destroy';
+ $c->stash->{template} = 'destroy.tt';
}
}
@@ -84,7 +86,7 @@
my $result = $w->action( $c->uri_for('do_add') )->process( $c->request );
if ( $result->has_errors ) {
$c->stash->{widget} = $result;
- $c->stash->{template} = 'edit';
+ $c->stash->{template} = 'edit.tt';
}
else {
my $item = $result->save_to_db();
@@ -98,7 +100,7 @@
my $fs = $w->element( 'Fieldset', 'Submit' );
$fs->element( 'Submit', 'ok' )->value('Create');
$c->stash->{widget} = $w->action( $c->uri_for('do_add') )->process;
- $c->stash->{template} = 'edit';
+ $c->stash->{template} = 'edit.tt';
}
sub do_edit : Local {
@@ -110,7 +112,7 @@
my $result = $w->action( $c->uri_for('do_edit') )->process( $c->request );
if ( $result->has_errors ) {
$c->stash->{widget} = $result;
- $c->stash->{template} = 'edit';
+ $c->stash->{template} = 'edit.tt';
}
else {
$result->save_to_db();
@@ -125,7 +127,7 @@
my $fs = $w->element( 'Fieldset', 'Submit' );
$fs->element( 'Submit', 'ok' )->value('Update');
$c->stash->{widget} = $w->action( $c->uri_for('do_edit', $id) )->process();
- $c->stash->{template} = 'edit';
+ $c->stash->{template} = 'edit.tt';
}
sub view : Local {
@@ -133,7 +135,7 @@
die "You need to pass an id" unless $id;
my $item = $self->model_item( $c, $id );
$c->stash->{item} = $item;
- $c->stash->{template} = 'view';
+ $c->stash->{template} = 'view.tt';
}
sub get_resultset {
@@ -181,7 +183,7 @@
($c->stash->{pri}) = $source->primary_columns;
$c->stash->{order_by_column_link} = $self->create_col_link($c, $source);
$c->stash->{result} = $result;
- $c->stash->{template} = 'list';
+ $c->stash->{template} = 'list.tt';
}
Modified: trunk/Catalyst-Example-InstantCRUD/lib/Catalyst/Example/InstantCRUD/Utils.pm
===================================================================
--- trunk/Catalyst-Example-InstantCRUD/lib/Catalyst/Example/InstantCRUD/Utils.pm 2008-01-28 22:20:24 UTC (rev 7422)
+++ trunk/Catalyst-Example-InstantCRUD/lib/Catalyst/Example/InstantCRUD/Utils.pm 2008-01-29 21:02:37 UTC (rev 7423)
@@ -276,15 +276,15 @@
for my $rel (@relationships) {
my $info = $source->relationship_info($rel);
push @rel_info, $info;
- my $d = Data::Dumper->new( [ @$info{qw(class cond)} ] );
+ my $rel_class = _strip_class( $info->{class} );
+ my $d = Data::Dumper->new( [ $info->{cond} ] );
$d->Purity(1)->Terse(1)->Deepcopy(1)->Indent(0);
+ my $rel_cond = $d->Dump;
my $relationship =
$info->{attrs}{accessor} eq 'multi' ? 'has_many' : 'belongs_to';
push @rel_type, $relationship;
$rels{$c} .=
- "__PACKAGE__->$relationship('$rel', "
- . join( ', ', $d->Dump ) . ");\n";
-
+ "__PACKAGE__->$relationship( '$rel', '$rel_class', $rel_cond );\n";
my ( $widgettype, @args );
if ( $info->{attrs}{accessor} eq 'multi' ) {
$widgettype = 'DoubleSelect';
@@ -297,7 +297,7 @@
$config{$class}{fields}{$rel} = {
name => $rel,
label => _mk_label($rel),
- foreign_class => $info->{class},
+ foreign_class => _strip_class( $info->{class} ),
'widget_element' => [ $widgettype, @args ]
};
}
Modified: trunk/Catalyst-Example-InstantCRUD/lib/Catalyst/Example/InstantCRUD.pm
===================================================================
--- trunk/Catalyst-Example-InstantCRUD/lib/Catalyst/Example/InstantCRUD.pm 2008-01-28 22:20:24 UTC (rev 7422)
+++ trunk/Catalyst-Example-InstantCRUD/lib/Catalyst/Example/InstantCRUD.pm 2008-01-29 21:02:37 UTC (rev 7423)
@@ -1,6 +1,6 @@
package Catalyst::Example::InstantCRUD;
-use version; $VERSION = qv('0.0.18');
+use version; $VERSION = qv('0.0.20');
use warnings;
use strict;
Modified: trunk/Catalyst-Example-InstantCRUD/lib/Catalyst/Helper/InstantCRUD.pm
===================================================================
--- trunk/Catalyst-Example-InstantCRUD/lib/Catalyst/Helper/InstantCRUD.pm 2008-01-28 22:20:24 UTC (rev 7422)
+++ trunk/Catalyst-Example-InstantCRUD/lib/Catalyst/Helper/InstantCRUD.pm 2008-01-29 21:02:37 UTC (rev 7423)
@@ -147,7 +147,7 @@
my ( $self, $c ) = @_;
my @additional_paths = ( $c->config->{root} );
$c->stash->{additional_template_paths} = \@additional_paths;
- $c->stash->{template} = 'home';
+ $c->stash->{template} = 'home.tt';
}
[% IF auth %]
@@ -203,7 +203,7 @@
name: [% name %]
View::TT:
- WRAPPER: 'wrapper'
+ WRAPPER: 'wrapper.tt'
InstantCRUD:
model_name: [% model_name %]
Modified: trunk/Catalyst-Example-InstantCRUD/lib/Catalyst/Helper/View/InstantCRUD.pm
===================================================================
--- trunk/Catalyst-Example-InstantCRUD/lib/Catalyst/Helper/View/InstantCRUD.pm 2008-01-28 22:20:24 UTC (rev 7422)
+++ trunk/Catalyst-Example-InstantCRUD/lib/Catalyst/Helper/View/InstantCRUD.pm 2008-01-29 21:02:37 UTC (rev 7423)
@@ -25,13 +25,13 @@
for my $c (@classes) {
$table_menu .= ' <a href="[% base %]' . lc($c) . qq{">$c</a> |};
}
- $helper->mk_file( file( $dir, 'table_menu' ), $table_menu );
+ $helper->mk_file( file( $dir, 'table_menu.tt' ), $table_menu );
# static files
- $helper->render_file( home => file( $dir, 'home' ) );
- $helper->render_file( restricted => file( $dir, 'restricted' ) );
- $helper->mk_file( file( $dir, 'wrapper' ), $helper->get_file( __PACKAGE__, 'wrapper' ) );
- $helper->mk_file( file( $dir, 'login' ), $helper->get_file( __PACKAGE__, 'login' ) );
+ $helper->render_file( home => file( $dir, 'home.tt' ) );
+ $helper->render_file( restricted => file( $dir, 'restricted.tt' ) );
+ $helper->mk_file( file( $dir, 'wrapper.tt' ), $helper->get_file( __PACKAGE__, 'wrapper' ) );
+ $helper->mk_file( file( $dir, 'login.tt' ), $helper->get_file( __PACKAGE__, 'login' ) );
my $staticdir = dir( $helper->{dir}, 'root', 'static' );
$helper->mk_dir( $staticdir );
$helper->render_file( style => file( $staticdir, 'pagingandsort.css' ) );
@@ -44,7 +44,7 @@
for my $class (@classes){
my $classdir = dir( $helper->{dir}, 'root', $class );
$helper->mk_dir( $classdir );
- $helper->mk_file( file( $classdir, $_ ), $helper->get_file( __PACKAGE__, $_ ) )
+ $helper->mk_file( file( $classdir, $_ . '.tt'), $helper->get_file( __PACKAGE__, $_ ) )
for qw/edit destroy pager/;
my @fields;
my @field_configs;
@@ -58,8 +58,8 @@
my $fields = join "', '", @fields;
$helper->{fields} = "[ '$fields' ]";
$helper->{field_configs} = \@field_configs;
- $helper->render_file( list => file( $classdir, 'list' ));
- $helper->render_file( view => file( $classdir, 'view' ));
+ $helper->render_file( list => file( $classdir, 'list.tt' ));
+ $helper->render_file( view => file( $classdir, 'view.tt' ));
}
return 1;
}
@@ -99,7 +99,7 @@
</tr>
[% END %]
</table>
-[% PROCESS pager %]
+[% PROCESS pager.tt %]
<br/>
<a href="[% c.uri_for( 'add' ) %]">Add</a>
@@ -136,7 +136,7 @@
</head>
<body>
<div class="table_menu">
-[% PROCESS table_menu %]
+[% PROCESS table_menu.tt %]
</div>
<div class="content">
[% content %]
Modified: trunk/Catalyst-Example-InstantCRUD/lib/Catalyst/Plugin/Auth/Utils.pm
===================================================================
--- trunk/Catalyst-Example-InstantCRUD/lib/Catalyst/Plugin/Auth/Utils.pm 2008-01-28 22:20:24 UTC (rev 7422)
+++ trunk/Catalyst-Example-InstantCRUD/lib/Catalyst/Plugin/Auth/Utils.pm 2008-01-29 21:02:37 UTC (rev 7423)
@@ -112,7 +112,7 @@
if (!$c->user_exists) {
$c->log->debug("User not found, forwarding to /$action");
# Redirect the user to the login page
- $c->response->redirect($c->uri_for("/$action?",
+ $c->response->redirect($c->uri_for("/$action",
{ request_uri => $c->req->uri->as_string }));
# Return 0 to cancel 'post-auto' processing and prevent use of application
return 0;
More information about the Catalyst-commits
mailing list