vagrant-auto_network 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +8 -0
- data/lib/auto_network/action/filter_networks.rb +15 -7
- data/lib/auto_network/version.rb +1 -1
- metadata +2 -2
data/CHANGELOG
CHANGED
@@ -23,20 +23,28 @@ class AutoNetwork::Action::FilterNetworks
|
|
23
23
|
def call(env)
|
24
24
|
@env = env
|
25
25
|
|
26
|
-
@pool
|
27
|
-
global_env = @env[:env]
|
26
|
+
@pool = @env[:auto_network_pool]
|
27
|
+
@global_env = @env[:env]
|
28
28
|
|
29
|
-
|
30
|
-
assign_address(machine) if machine_has_address?(machine)
|
31
|
-
end
|
29
|
+
filter if has_working_env?
|
32
30
|
|
33
31
|
@app.call(@env)
|
34
32
|
end
|
35
33
|
|
36
34
|
private
|
37
35
|
|
38
|
-
def
|
39
|
-
global_env.
|
36
|
+
def has_working_env?
|
37
|
+
!!(@global_env.local_data_path)
|
38
|
+
end
|
39
|
+
|
40
|
+
def filter
|
41
|
+
machines_for_env.each do |machine|
|
42
|
+
assign_address(machine) if machine_has_address?(machine)
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
def machines_for_env
|
47
|
+
@global_env.active_machines.map { |vm_id| @global_env.machine(*vm_id) }
|
40
48
|
end
|
41
49
|
|
42
50
|
def assign_address(machine)
|
data/lib/auto_network/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-auto_network
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-08-
|
12
|
+
date: 2013-08-10 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description:
|
15
15
|
email: adrien@somethingsinistral.net
|