Class: FitCommit::Installer

Inherits:
Object
  • Object
show all
Defined in:
lib/fit-commit/installer.rb

Constant Summary collapse

HOOK_TEMPLATE_PATH =
File.expand_path("../../../templates/hooks/commit-msg", __FILE__)

Instance Method Summary collapse

Instance Method Details

#installObject



7
8
9
10
11
12
13
# File 'lib/fit-commit/installer.rb', line 7

def install
  FileUtils.mkdir_p(File.dirname(hook_path))
  FileUtils.cp(HOOK_TEMPLATE_PATH, hook_path)
  FileUtils.chmod(0755, hook_path)
  puts "Installed hook to #{hook_path}"
  true
end