vagrant_hook 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/vagrant_hook/plugin.rb +16 -0
- data/lib/vagrant_hook/version.rb +1 -1
- data/pkg/vagrant_hook-0.1.4.gem +0 -0
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: '0509aa90dd104d4c5c76ba0ff1b25b5a329e0657'
|
|
4
|
+
data.tar.gz: 4d7a93213e4c1f8faca6a89d409ac4590c023fab
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 75afc2da3d66e16be39886281d7c975f274f1f4882d457a70ccebe0247dbe2370ed7fb5f73f7df3df99cec03b526f57c9edbf2138ea06a50d00e1c51f5901399
|
|
7
|
+
data.tar.gz: 13a6f07f7ad47fe333de9dfaef9785c58f94effef2763af9986d33982fdd4db2b1a27994cf598142d4fdaee158e729e3d0791b4f7b3d4e773048f432bff77c47
|
data/lib/vagrant_hook/plugin.rb
CHANGED
|
@@ -3,10 +3,12 @@ module VagrantPlugins
|
|
|
3
3
|
class HooksConfig < Vagrant.plugin(2, :config)
|
|
4
4
|
attr_accessor :check_outdated_callbacks
|
|
5
5
|
attr_accessor :add_box_callbacks
|
|
6
|
+
attr_accessor :prepare_clone_callbacks
|
|
6
7
|
|
|
7
8
|
def initialize
|
|
8
9
|
@check_outdated_callbacks = []
|
|
9
10
|
@add_box_callbacks = []
|
|
11
|
+
@prepare_clone_callbacks = []
|
|
10
12
|
end
|
|
11
13
|
|
|
12
14
|
def on_check_outdated(&proc)
|
|
@@ -16,6 +18,10 @@ module VagrantPlugins
|
|
|
16
18
|
def on_add_box(&proc)
|
|
17
19
|
@add_box_callbacks << {:mproc => proc}
|
|
18
20
|
end
|
|
21
|
+
|
|
22
|
+
def on_prepare_clone(&proc)
|
|
23
|
+
@prepare_clone_callbacks << {:mproc => proc}
|
|
24
|
+
end
|
|
19
25
|
end
|
|
20
26
|
|
|
21
27
|
class HookActionAbstract
|
|
@@ -47,6 +53,12 @@ module VagrantPlugins
|
|
|
47
53
|
end
|
|
48
54
|
end
|
|
49
55
|
|
|
56
|
+
class PrepareCloneHook < HookActionAbstract
|
|
57
|
+
def initialize(app, env)
|
|
58
|
+
super(app, env, Proc.new { env[:machine].config.vagrant_hook.prepare_clone_callbacks } )
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
|
|
50
62
|
class Plugin < Vagrant.plugin("2")
|
|
51
63
|
name "vagrant_hook"
|
|
52
64
|
|
|
@@ -61,6 +73,10 @@ module VagrantPlugins
|
|
|
61
73
|
action_hook(:vagrant_hook, Plugin::ALL_ACTIONS) do |hook|
|
|
62
74
|
hook.after(Vagrant::Action::Builtin::BoxAdd, VagrantPlugins::VagrantHook::AddBoxHook)
|
|
63
75
|
end
|
|
76
|
+
|
|
77
|
+
action_hook(:vagrant_hook, Plugin::ALL_ACTIONS) do |hook|
|
|
78
|
+
hook.after(Vagrant::Action::Builtin::PrepareClone, VagrantPlugins::VagrantHook::PrepareCloneHook)
|
|
79
|
+
end
|
|
64
80
|
end
|
|
65
81
|
end
|
|
66
82
|
end
|
data/lib/vagrant_hook/version.rb
CHANGED
|
Binary file
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: vagrant_hook
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ruben
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-08-
|
|
11
|
+
date: 2017-08-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -55,6 +55,7 @@ files:
|
|
|
55
55
|
- lib/vagrant_hook/version.rb
|
|
56
56
|
- pkg/vagrant_hook-0.1.2.gem
|
|
57
57
|
- pkg/vagrant_hook-0.1.3.gem
|
|
58
|
+
- pkg/vagrant_hook-0.1.4.gem
|
|
58
59
|
- vagrant_hook.gemspec
|
|
59
60
|
homepage: http://www.github.com/lqbweb
|
|
60
61
|
licenses: []
|