Add support for python and ruby local hooks

This commit is contained in:
Thierry Deo 2017-02-13 14:37:03 +01:00
parent e5669ca135
commit 377cffbd27
12 changed files with 54 additions and 11 deletions

View file

@ -66,14 +66,14 @@ def modify_config(path='.', commit=True):
cmd_output('git', 'commit', '-am', 'update config', cwd=path)
def config_with_local_hooks():
def config_with_local_hooks(language='pcre'):
return OrderedDict((
('repo', 'local'),
('hooks', [OrderedDict((
('id', 'do_not_commit'),
('name', 'Block if "DO NOT COMMIT" is found'),
('entry', 'DO NOT COMMIT'),
('language', 'pcre'),
('id', language),
('name', language),
('entry', language),
('language', language),
('files', '^(.*)$'),
))])
))