gitty 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- data/assets/helpers/hookd_wrapper +1 -0
- data/lib/gitty/hook.rb +5 -1
- data/spec/gitty/hook_spec.rb +2 -0
- metadata +1 -1
@@ -17,6 +17,7 @@ remote_branch=$(git show-ref origin/--hooks--)
|
|
17
17
|
for base_dir in "${dirname}"/{shared,local}; do
|
18
18
|
[ -d "${base_dir}/${hooktype}.d" ] || continue
|
19
19
|
for script in "${base_dir}/${hooktype}.d"/*; do
|
20
|
+
[ -x "$script" ] || continue
|
20
21
|
HELPERS="${base_dir}/helpers" "${script}" "$*" || exit $?
|
21
22
|
done
|
22
23
|
done
|
data/lib/gitty/hook.rb
CHANGED
@@ -132,7 +132,11 @@ class Gitty::Hook
|
|
132
132
|
def uninstall
|
133
133
|
target_hook_path = path
|
134
134
|
base_directory = self.class.installed_path(install_kind)
|
135
|
-
meta_data["targets"].each
|
135
|
+
meta_data["targets"].each do |target|
|
136
|
+
targetd_path = base_directory + "#{target}.d"
|
137
|
+
rm_f(targetd_path + name)
|
138
|
+
FileUtils.rmdir(targetd_path) if Dir.glob(targetd_path + "*").empty?
|
139
|
+
end
|
136
140
|
rm(target_hook_path)
|
137
141
|
# TODO - clean up helpers
|
138
142
|
end
|
data/spec/gitty/hook_spec.rb
CHANGED
@@ -134,6 +134,8 @@ EOF
|
|
134
134
|
File.exist?(".git/hooks/local/hooks/submodule_updater").should be_false
|
135
135
|
File.symlink?(".git/hooks/local/post-checkout.d/submodule_updater").should be_false
|
136
136
|
File.symlink?(".git/hooks/local/post-merge.d/submodule_updater").should be_false
|
137
|
+
File.directory?(".git/hooks/local/post-checkout.d").should be_false
|
138
|
+
File.directory?(".git/hooks/local/post-merge.d").should be_false
|
137
139
|
end
|
138
140
|
end
|
139
141
|
end
|