vagrant-powder 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Vagrantfile +3 -0
- data/lib/vagrant-powder/action.rb +16 -11
- data/lib/vagrant-powder/config.rb +22 -0
- data/lib/vagrant-powder/plugin.rb +5 -0
- data/lib/vagrant-powder/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 378d32ed09595c009f149416c3c282ed53ea0f6a
|
4
|
+
data.tar.gz: f2f8d19adb8b729b851de6753a09986c377bede6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9dda6cdfe5438bcd5814e9bf91e234a78008be753403415c334a5e91eb7e3c453f618b92c8b907973b0cf739722ea691669700742cfd3445d57a738e78c7dbc8
|
7
|
+
data.tar.gz: dc8a93128fcf838eaa53c093a7070a859ae438846ee7f0afada2b6f72c73adbacf367a330490bf89ccee793a53ef110b2699bd904c66442d0a140266e32fc730
|
data/Vagrantfile
CHANGED
@@ -11,6 +11,7 @@ module VagrantPlugins
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def call(env)
|
14
|
+
|
14
15
|
# Before machine action
|
15
16
|
state = env[:machine].state.id
|
16
17
|
|
@@ -18,20 +19,24 @@ module VagrantPlugins
|
|
18
19
|
@app.call(env)
|
19
20
|
|
20
21
|
# After execute machine action
|
21
|
-
config = env[:machine].config.
|
22
|
+
config = env[:machine].config.powder
|
22
23
|
action = env[:machine_action]
|
23
24
|
provision = env[:provision_enabled]
|
24
25
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
26
|
+
if config.enabled
|
27
|
+
|
28
|
+
case action
|
29
|
+
when :up
|
30
|
+
puts "Powder unlink #{config.link_name}"
|
31
|
+
`powder unlink #{config.link_name}`
|
32
|
+
when :halt
|
33
|
+
puts "Powder link #{config.link_name}"
|
34
|
+
`powder link #{config.link_name}`
|
35
|
+
when :destroy
|
36
|
+
puts "powder link #{config.link_name}"
|
37
|
+
`powder link #{config.link_name}`
|
38
|
+
end
|
39
|
+
|
35
40
|
end
|
36
41
|
end
|
37
42
|
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module VagrantPlugins
|
2
|
+
module Powder
|
3
|
+
|
4
|
+
class Config < Vagrant.plugin('2', :config)
|
5
|
+
|
6
|
+
attr_accessor :enabled
|
7
|
+
attr_accessor :link_name
|
8
|
+
|
9
|
+
def initialize
|
10
|
+
@enabled = UNSET_VALUE
|
11
|
+
@link_name = UNSET_VALUE
|
12
|
+
end
|
13
|
+
|
14
|
+
def finalize!
|
15
|
+
@enabled = false if @enabled == UNSET_VALUE
|
16
|
+
@link_name = File.basename(Dir.getwd) if @link_name == UNSET_VALUE
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
20
|
+
|
21
|
+
end
|
22
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-powder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joe Kratzat
|
@@ -82,6 +82,7 @@ files:
|
|
82
82
|
- lib/vagrant-powder.rb
|
83
83
|
- lib/vagrant-powder/action.rb
|
84
84
|
- lib/vagrant-powder/command.rb
|
85
|
+
- lib/vagrant-powder/config.rb
|
85
86
|
- lib/vagrant-powder/plugin.rb
|
86
87
|
- lib/vagrant-powder/version.rb
|
87
88
|
- vagrant-powder.gemspec
|