vagrant-auto_network 0.2.0 → 0.2.1

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.
data/CHANGELOG CHANGED
@@ -1,6 +1,14 @@
1
1
  vagrant-auto_network
2
2
  ====================
3
3
 
4
+ 0.2.1
5
+ -----
6
+
7
+ 2013-08-10
8
+
9
+ * Fix issue where running vagrant outside of an environment could cause
10
+ stacktraces.
11
+
4
12
  0.2.0
5
13
  -----
6
14
 
@@ -23,20 +23,28 @@ class AutoNetwork::Action::FilterNetworks
23
23
  def call(env)
24
24
  @env = env
25
25
 
26
- @pool = @env[:auto_network_pool]
27
- global_env = @env[:env]
26
+ @pool = @env[:auto_network_pool]
27
+ @global_env = @env[:env]
28
28
 
29
- machines_for_env(global_env).each do |machine|
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 machines_for_env(global_env)
39
- global_env.active_machines.map { |vm_id| global_env.machine(*vm_id) }
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)
@@ -1,3 +1,3 @@
1
1
  module AutoNetwork
2
- VERSION = '0.2.0'
2
+ VERSION = '0.2.1'
3
3
  end
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.0
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-08 00:00:00.000000000 Z
12
+ date: 2013-08-10 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description:
15
15
  email: adrien@somethingsinistral.net