clean output dir after testing
This commit is contained in:
1
dist.ini
1
dist.ini
@@ -20,6 +20,7 @@ CSS::Minifier::XS = 0
|
|||||||
|
|
||||||
[GatherDir]
|
[GatherDir]
|
||||||
include_dotfiles = 1
|
include_dotfiles = 1
|
||||||
|
exclude_match = t/public
|
||||||
|
|
||||||
[PruneCruft]
|
[PruneCruft]
|
||||||
|
|
||||||
|
|||||||
@@ -238,8 +238,7 @@ sub copy_files {
|
|||||||
|
|
||||||
my $aggregate_digest = $self->full_digest->hexdigest;
|
my $aggregate_digest = $self->full_digest->hexdigest;
|
||||||
|
|
||||||
my $output_path = Path::Class::Dir->new( $self->output_path );
|
$self->clean_output();
|
||||||
$output_path->rmtree();
|
|
||||||
|
|
||||||
$l->info( 'Copying ', $self->asset_cache_count, ' files', );
|
$l->info( 'Copying ', $self->asset_cache_count, ' files', );
|
||||||
for my $value ( $self->asset_cache_values ) {
|
for my $value ( $self->asset_cache_values ) {
|
||||||
@@ -248,6 +247,13 @@ sub copy_files {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub clean_output {
|
||||||
|
my $self = shift;
|
||||||
|
my $output_path = Path::Class::Dir->new( $self->output_path );
|
||||||
|
$output_path->rmtree();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
sub _process_file {
|
sub _process_file {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my $asset = shift;
|
my $asset = shift;
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ for my $key ( keys %expected_result ) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$fap->clean_output();
|
||||||
done_testing();
|
done_testing();
|
||||||
|
|
||||||
sub expected_result {
|
sub expected_result {
|
||||||
|
|||||||
Reference in New Issue
Block a user