return transform_exceptions {
my @lines = output_from_file $self->resources_file;
chomp @lines;
- return { list => [ map {
+ return [ map {
m{^(\w+)\[(.*)\]$}
? [$1, $2]
: [__error__ => $_];
- } @lines ] };
+ } @lines ];
};
}
return transform_exceptions {
my @lines = output_from_file $self->classes_file;
chomp @lines;
- return { list => \@lines };
+ return \@lines;
};
}
local $ENV{GIT_DIR} = $dir;
my @lines = lines_from_command
['git', 'diff', '--name-only', $local, $remote];
- return { list => \@lines };
+ return \@lines;
}
sub _gather_git_config {
sub _gather_user_groups {
my ($self, $user) = @_;
my $groups = output_from_command [groups => $user];
- return { list => [split m{\s+}, $groups] };
+ return [split m{\s+}, $groups];
}
sub _deparse_htpasswd_line {
);
my $data = $probe->gather;
-is_deeply $data->{classes}{list},
+is_deeply $data->{classes},
[qw( user::foo settings user::foo user::bar )],
'classes parsing';
-is_deeply $data->{resources}{list},
+is_deeply $data->{resources},
[[user => 'foo'],
[exec => 'ls -lha'],
[file => '/home/foo/quux'],
},
}, 'ssh key data';
- is_deeply $user->{groups}, {
- list => [qw( testfoo_group_A testfoo_group_B testfoo_group_C )],
- }, 'groups list';
+ is_deeply $user->{groups}, [qw(
+ testfoo_group_A
+ testfoo_group_B
+ testfoo_group_C
+ )], 'groups list';
my $tab = $user->{crontab};
ok $tab, 'got crontab results';