gitty 0.3.2 → 0.3.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -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
@@ -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 { |target| rm_f(base_directory + "#{target}.d" + name) }
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
@@ -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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitty
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Harper