App-GitHooks-Plugin-ForceRegularUpdate
view release on metacpan or search on metacpan
environment => 'development',
config => "max_update_age = 10 # 10 seconds\n"
. "update_file = .last_update.txt\n",
expected => qr/^\Qx It appears that you haven't performed $description on this machine for a long time. Please do that and try to commit again.\E/,
},
# Make sure the env variable check works.
{
name => 'Commit in production.',
environment => 'production',
config => "max_update_age = 172800 # 2 days\n"
. "update_file = .does_not_exist.txt\n",
expected => qr/^(?!.*\Q$description\E)/s,
},
{
name => 'Commit in development.',
environment => 'development',
config => "max_update_age = 172800 # 2 days\n"
. "update_file = .does_not_exist.txt\n",
expected => qr/^\Qx It appears that you have never performed $description on this machine - please do that before committing.\E/,
},
];
# Bail out if Git isn't available.
test_requires_git();
plan( tests => scalar( @$tests ) );
foreach my $test ( @$tests )
{
( run in 0.552 second using v1.01-cache-2.11-cpan-cc502c75498 )