vagrant-ebcommon 0.5.6 → 0.5.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f0151d959c362384a92f4bf52e8391bcee6c4d28
4
- data.tar.gz: afc9aa340870d8f2e6bf5096df29c7f2bd37164c
3
+ metadata.gz: 6cc62c505d9129561ab7547bb1947674e17af3c0
4
+ data.tar.gz: 094ff634213b9f11b54e0fd48834cd5de4891dad
5
5
  SHA512:
6
- metadata.gz: 0848f25162bc52bb3bc9c7701d6a9ce39983a478f5dfa46fd327ac8f84dd876d1cf30b851f078580eefc3a836cf71112dc7742285f0e96b2794278ec97605184
7
- data.tar.gz: 68d209327436ab0bb8e71636f6fc024e52352f07a4501fee53b4e892bc77d1c11508849dbe771e1e338b07cae506b65df7f001e04c4e5b887f22d76967d4909b
6
+ metadata.gz: 0c6975602d103e33aaba1b7aef099aa2f6b3203d955373559334bc0db9dec1ded55c67943380a4aba992b27f0f3fea83ea1e65f356a3b90f4b7f75d1f942305e
7
+ data.tar.gz: a77ddd637939a778f6d004d0f66180d9caaab7cf32bf9cd197ba1f2d4d98d82c5980ad753dc9f531a2da577af8e3981003e06102429889bd68b085e6439e987b
@@ -46,22 +46,31 @@ module VagrantPlugins
46
46
 
47
47
  # Copy over our git commit hooks
48
48
  def setup_git_hooks
49
- if @ebcommon.git_hook_repos
50
- plugin_hooks_dir = File.expand_path File.join(File.dirname(__FILE__), '..', 'files', 'git_hooks')
51
- git_hooks = Dir.entries(plugin_hooks_dir).select {|f| !File.directory? f}
52
- @env[:ui].info 'Copying over git commit hooks...'
53
-
54
- @ebcommon.git_hook_repos.each do |repo_path|
55
- target_hooks_dir = File.join @ebcommon.git_hook_root_dir, repo_path, '.git', 'hooks'
56
- if not File.directory? target_hooks_dir
57
- @env[:ui].info "Creating #{target_hooks_dir} directory..."
58
- FileUtils.mkdir target_hooks_dir
59
- end
60
- git_hooks.each do |hook|
61
- @env[:ui].success "Copying over git hook: #{hook} to #{target_hooks_dir}"
62
- source = File.join plugin_hooks_dir, hook
63
- FileUtils.cp source, target_hooks_dir
64
- end
49
+ # repos to be hook'ed
50
+ return unless @ebcommon.git_hook_repos
51
+
52
+ # source
53
+ plugin_hooks_dir = File.expand_path File.join(File.dirname(__FILE__), '..', 'files', 'git_hooks')
54
+ git_hooks = Dir.entries(plugin_hooks_dir).select {|f| !File.directory? f}
55
+
56
+ @env[:ui].info 'Copying over git commit hooks...'
57
+ @ebcommon.git_hook_repos.each do |repo_path|
58
+ # repo
59
+ repo_dir = File.join @ebcommon.git_hook_root_dir, repo_path, '.git'
60
+ next unless File.directory? repo_dir
61
+
62
+ # create repo hooks dir if needed
63
+ target_hooks_dir = File.join repo_dir, 'hooks'
64
+ unless File.directory? target_hooks_dir
65
+ @env[:ui].info "Creating #{target_hooks_dir} directory..."
66
+ FileUtils.mkdir target_hooks_dir
67
+ end
68
+
69
+ # copy source hooks to repo
70
+ git_hooks.each do |hook|
71
+ @env[:ui].success "Copying over git hook: #{hook} to #{target_hooks_dir}"
72
+ source = File.join plugin_hooks_dir, hook
73
+ FileUtils.cp source, target_hooks_dir
65
74
  end
66
75
  end
67
76
  end
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module Ebcommon
3
- VERSION = "0.5.6"
3
+ VERSION = "0.5.7"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-ebcommon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.6
4
+ version: 0.5.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Hahn