lib/pre-commit/installer.rb in pre-commit-0.29.0 vs lib/pre-commit/installer.rb in pre-commit-0.30.0
- old
+ new
@@ -1,20 +1,19 @@
require 'fileutils'
require 'pre-commit/configuration'
module PreCommit
-
class Installer
TARGET_GIT_PATH = '.git'
TARGET_HOOKS_PATH = 'hooks/pre-commit'
TEMPLATE_DIR = File.expand_path("../../../templates/hooks/", __FILE__)
attr_reader :key
def initialize(key = nil)
- @key = key || "default"
+ @key = key || "automatic"
end
def hook
templates[key.sub(/^--/, "")]
end
@@ -40,11 +39,9 @@
else
warn "Could not find template #{key}"
false
end
end
-
- private
def templates
return @templates if @templates
pattern = File.join(TEMPLATE_DIR, "*")