class Sambot::Chef::Hooks
Constants
- SCRIPTS
Public Class Methods
copy()
click to toggle source
# File lib/sambot/chef/hooks.rb, line 9 def self.copy SCRIPTS.each do |hook| working_path = ".git/hooks/#{hook}" template_path = Template.new("git_hooks/#{hook}").path File.delete(working_path) if File.exist?(working_path) FileUtils.cp(template_path, working_path) UI.debug("The #{hook} Git hook has been added to the cookbook.") end end