Skip to content

Commit

Permalink
renamed create_database command to "setup"
Browse files Browse the repository at this point in the history
  • Loading branch information
jberger committed Jul 29, 2012
1 parent 0478378 commit 8ffbc1f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.markdown
Expand Up @@ -13,7 +13,7 @@ If you don't have `cpanm` (and you should), you may

After that, in order to create the database, simply run

$ ./script/galileo create_database
$ ./script/galileo setup

which will create the sqlite database file in the root of the distribution. In the process it will ask for a username and password for your admin user. This password is no longer stored in clear text!

Expand Down
@@ -1,10 +1,10 @@
package Galileo::Command::create_database;
package Galileo::Command::setup;
use Mojo::Base 'Mojolicious::Command';

use Term::Prompt qw/prompt/;

has description => "Create the database for your Galileo CMS application.\n";
has usage => "usage: $0 create_database\n";
has usage => "usage: $0 setup\n";

use Mojo::JSON;
my $json = Mojo::JSON->new();
Expand Down
4 changes: 2 additions & 2 deletions t/basic.t
Expand Up @@ -3,7 +3,7 @@ use warnings;

use Galileo;
use Galileo::DB::Schema;
use Galileo::Command::create_database;
use Galileo::Command::setup;

use Mojo::JSON;
use Test::More;
Expand All @@ -12,7 +12,7 @@ END{ done_testing(); }
use Test::Mojo;

my $db = Galileo::DB::Schema->connect('dbi:SQLite:dbname=:memory:');
Galileo::Command::create_database->inject_sample_data('admin', 'pass', $db);
Galileo::Command::setup->inject_sample_data('admin', 'pass', $db);
ok( $db->resultset('User')->single({name => 'admin'})->check_password('pass'), 'DB user checks out' );

my $t = Test::Mojo->new(Galileo->new(db => $db));
Expand Down

0 comments on commit 8ffbc1f

Please sign in to comment.