File Coverage

blib/lib/Mojolicious/Command/generate/heroku.pm
Criterion Covered Total %
statement 1 3 33.3
branch n/a
condition n/a
subroutine 1 1 100.0
pod n/a
total 2 4 50.0


line stmt bran cond sub pod time code
1             package Mojolicious::Command::generate::heroku;
2 1     1   25825 use Mojo::Base 'Mojolicious::Command';
  0            
  0            
3             use Mojo::Util 'class_to_file';
4              
5             has description => qq/Generate Heroku configuration.\n/;
6             has usage => "usage: $0 generate heroku\n";
7             has file => 'Perloku';
8              
9             sub run {
10             my $self = shift;
11             my $class = ref $self->app;
12              
13             my $script_name =
14             $class eq 'Mojolicious::Lite'
15             ? $0
16             : 'script/' . class_to_file($class);
17              
18             $self->render_to_rel_file(perloku => $self->file => $script_name);
19             $self->chmod_file($self->file => 0744);
20             }
21              
22             1;
23             __DATA__