Skip to content

Commit

Permalink
Fix silly bug of non-report on list
Browse files Browse the repository at this point in the history
  • Loading branch information
gryphonshafer committed Jun 20, 2018
1 parent ad7ee55 commit 5b10a82
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
7 changes: 3 additions & 4 deletions lib/App/Dest.pm
Original file line number Diff line number Diff line change
Expand Up @@ -197,12 +197,10 @@ sub make {
die "Failed to fully make $path; check permissions or existing files\n";
};

$self->list($path);
$self->expand($path);
return 0;
}



sub expand {
my ( $self, $path ) = @_;
print join( ' ', map { <"$path/$_*"> } qw( deploy verify revert ) ), "\n";
Expand All @@ -222,15 +220,16 @@ sub list {
wanted => sub {
return unless ( m|/deploy(?:\.[^\/]+)?| );
( my $action = $_ ) =~ s|/deploy(?:\.[^\/]+)?||;

push( @actions, $action ) if (
not defined $filter or
index( $action, $filter ) > -1
);
},
}, $path );

print $path, "\n";
if (@actions) {
print $path, "\n";
print ' ', $_, "\n" for ( sort @actions );
}
}
Expand Down
10 changes: 5 additions & 5 deletions t/watches.t
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ sub main {
add();
rm();
make();
list();
expand_and_list();
watches();

_setup_watch_lists();
Expand Down Expand Up @@ -91,16 +91,16 @@ sub make {
);
}

sub list {
sub expand_and_list {
mkpath('new');
t_module->add('new');

ok( ( t_capture( sub { t_module->list } ) )[0] eq "atd\n atd/state\nnew\n", 'list (blank)' );
ok( ( t_capture( sub { t_module->list } ) )[0] eq "atd\n atd/state\nnew\n", 'list' );
ok(
( t_capture(
sub { t_module->list('atd/state') }
sub { t_module->expand('atd/state') }
) )[0] eq "atd/state/deploy atd/state/verify atd/state/revert\n",
'list (action)',
'expand',
);

t_module->rm('new');
Expand Down

0 comments on commit 5b10a82

Please sign in to comment.