RGitHook is a ruby wrapper to edit hooks. All hooks are stored in just one ruby file.
sudo gem install rgithook
cd repo rgithook --install rgithook --edit # Edit your hooks
And make some git action that make rgithook run.
The typical use of rgithook is for post-receive hooks. These hook is invoked when a remote machine push to ours.
It can be run with bare repo or repos with a working tree.