/[transports]/trunk/lib/Transports/Bootstrap.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /trunk/lib/Transports/Bootstrap.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 24 - (show annotations)
Fri May 26 19:02:40 2006 UTC (17 years, 11 months ago) by dpavlin
File size: 871 byte(s)
and really create another user
1 use warnings;
2 use strict;
3
4 package Transports::Bootstrap;
5 use base qw(Jifty::Bootstrap);
6
7 =head1 Bootstrap application data
8
9 Create initial data
10
11 =cut
12
13 sub run {
14 my $self = shift;
15
16 my $system_user = Transports::CurrentUser->superuser;
17
18 my $u = Transports::Model::User->new(current_user => $system_user);
19
20 $u->create(
21 name => 'System administrator',
22 email => 'admin@example.com',
23 password => 'admin',
24 );
25
26 Transports::Model::User->new(current_user => $system_user)->create(
27 name => 'Normal User',
28 email => 'user@example.com',
29 password => 'user',
30 );
31
32 my $s = Transports::Model::Source->new(current_user => $system_user);
33 $s->create(
34 name => 'SRC/1',
35 );
36 $s->create(
37 name => 'SRC/2',
38 );
39
40 my $d = Transports::Model::Destination->new(current_user => $system_user);
41 $d->create(
42 name => 'DEST/1',
43 );
44 $d->create(
45 name => 'DEST/2',
46 );
47 }
48
49
50 1;

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26