Class: Gitshot::Hook
- Inherits:
-
Object
- Object
- Gitshot::Hook
- Defined in:
- lib/gitshot.rb
Constant Summary collapse
- POST_COMMIT_HOOK_PATH =
'.git/hooks/post-commit'
Instance Method Summary collapse
Instance Method Details
#install ⇒ Object
7 8 9 10 11 |
# File 'lib/gitshot.rb', line 7 def install hook_template = File.("../gitshot/hooks/post-commit-template", __FILE__) FileUtils.cp(hook_template, POST_COMMIT_HOOK_PATH) FileUtils.chmod(0755, POST_COMMIT_HOOK_PATH) end |