Class: Gitshot::Hook

Inherits:
Object
  • Object
show all
Defined in:
lib/gitshot.rb

Constant Summary collapse

POST_COMMIT_HOOK_PATH =
'.git/hooks/post-commit'

Instance Method Summary collapse

Instance Method Details

#installObject



7
8
9
10
11
# File 'lib/gitshot.rb', line 7

def install
  hook_template = File.expand_path("../gitshot/hooks/post-commit-template", __FILE__)
  FileUtils.cp(hook_template, POST_COMMIT_HOOK_PATH)
  FileUtils.chmod(0755, POST_COMMIT_HOOK_PATH)
end