diff options
Diffstat (limited to 'modules/subversion/manifests/hook.pp')
-rw-r--r-- | modules/subversion/manifests/hook.pp | 31 |
1 files changed, 7 insertions, 24 deletions
diff --git a/modules/subversion/manifests/hook.pp b/modules/subversion/manifests/hook.pp index 5a347573..08b626ad 100644 --- a/modules/subversion/manifests/hook.pp +++ b/modules/subversion/manifests/hook.pp @@ -1,26 +1,9 @@ -class subversion { - class hook { - define post_commit($content) { - commit_hook { $name: - content => $content, - type => "post-commit", - } - } - define pre_commit($content) { - commit_hook { $name: - content => $content, - type => "pre-commit", - } - } - - define commit_hook($content, $type) { - $array = split($name,'\|') - $repo = $array[0] - $script = $array[1] - file { "$repo/hooks/$type.d/$script": - content => $content, - mode => 755, - } - } +define subversion::hook($content, $type) { + $array = split($name,'\|') + $repo = $array[0] + $script = $array[1] + file { "$repo/hooks/$type.d/$script": + content => $content, + mode => '0755', } } |