vagrant-auto_network 0.2.1 → 0.2.2
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 +15 -0
- data/CHANGELOG +11 -0
- data/README.markdown +1 -2
- data/lib/auto_network/action/load_pool.rb +17 -6
- data/lib/auto_network/version.rb +1 -1
- metadata +5 -7
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
NzlhOTk0NThjMzA5MTNkYzZhYzFiNTJkZDU1ODQzOGE0YWU2NDU4Mg==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
YzIxNzVkYzI0N2RlMTkyZjAyYjA3OWNlNjgzMjhlN2JhZTcyMDlkYg==
|
7
|
+
SHA512:
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
NGUxNjYyM2JlYTRmZTEwOTI4ZjMxZGJkMmIxMzljYjRhZjUxMzBjNmQ1NGRj
|
10
|
+
YTg4NjVjY2ZlNzdiOGM3ZTZhNmM4Yjk5N2QwZmIyZTAwOGY2MjNlMDFkOTVm
|
11
|
+
NTlmYjBlN2JiMWI3MGY4Yjg3OWUwYTQ0NWQyMjg3ZTFkYTY1MTc=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
NjgwZTBlYmMwMmZlZTUyNjM2YTUxMWY5NDgwZDg2ZmU3ZjllYTNjNmMzOGE2
|
14
|
+
ZDE3NDNlNjhjZDZmNDc0MDA1MzZlNGQ2MTg5OTExOTFjMjJjMWY2YzhkMmU1
|
15
|
+
YjY2YTMyODY2ZmI0NjM4MmI0ZjM1YTQ4NTRiNGRkNGY2Y2QzODU=
|
data/CHANGELOG
CHANGED
@@ -1,6 +1,17 @@
|
|
1
1
|
vagrant-auto_network
|
2
2
|
====================
|
3
3
|
|
4
|
+
0.2.2
|
5
|
+
-----
|
6
|
+
|
7
|
+
2014-03-19
|
8
|
+
|
9
|
+
This is a backwards compatible feature release
|
10
|
+
|
11
|
+
* (GH-7) Only use load_pool middleware when Vagrant environment is fully
|
12
|
+
initialized.
|
13
|
+
|
14
|
+
|
4
15
|
0.2.1
|
5
16
|
-----
|
6
17
|
|
data/README.markdown
CHANGED
@@ -25,7 +25,6 @@ Usage
|
|
25
25
|
config.vm.define 'first' do |node|
|
26
26
|
node.vm.box = "centos-5-i386"
|
27
27
|
|
28
|
-
node.vm.extend AutoNetwork::Mixin
|
29
28
|
node.vm.network :private_network, :auto_network => true
|
30
29
|
end
|
31
30
|
|
@@ -48,7 +47,7 @@ The default pool range has been hardcoded as '10.20.1.2/24', pending the
|
|
48
47
|
ability to query the host virtual network adapters for their configuration.
|
49
48
|
To change this, add the following _before_ the Vagrant configuration block:
|
50
49
|
|
51
|
-
AutoNetwork.default_pool = '172.16.0.0/
|
50
|
+
AutoNetwork.default_pool = '172.16.0.0/24'
|
52
51
|
|
53
52
|
Contact
|
54
53
|
-------
|
@@ -5,9 +5,6 @@ class AutoNetwork::Action::LoadPool
|
|
5
5
|
|
6
6
|
def initialize(app, env)
|
7
7
|
@app, @env = app, env
|
8
|
-
|
9
|
-
@config_path = @env[:home_path].join('auto_network')
|
10
|
-
@statefile = @config_path.join('pool.yaml')
|
11
8
|
end
|
12
9
|
|
13
10
|
# Handle the loading and unloading of the auto_network pool
|
@@ -22,13 +19,27 @@ class AutoNetwork::Action::LoadPool
|
|
22
19
|
def call(env)
|
23
20
|
@env = env
|
24
21
|
|
25
|
-
|
26
|
-
|
27
|
-
|
22
|
+
if env_ready?
|
23
|
+
setup_ivars
|
24
|
+
deserialize!
|
25
|
+
@app.call(@env)
|
26
|
+
serialize!
|
27
|
+
else
|
28
|
+
@app.call(@env)
|
29
|
+
end
|
28
30
|
end
|
29
31
|
|
30
32
|
private
|
31
33
|
|
34
|
+
def env_ready?
|
35
|
+
!!@env[:home_path]
|
36
|
+
end
|
37
|
+
|
38
|
+
def setup_ivars
|
39
|
+
@config_path = @env[:home_path].join('auto_network')
|
40
|
+
@statefile = @config_path.join('pool.yaml')
|
41
|
+
end
|
42
|
+
|
32
43
|
def deserialize!
|
33
44
|
pool = nil
|
34
45
|
if @statefile.exist?
|
data/lib/auto_network/version.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-auto_network
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
5
|
-
prerelease:
|
4
|
+
version: 0.2.2
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Adrien Thebo
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2014-03-19 00:00:00.000000000 Z
|
13
12
|
dependencies: []
|
14
13
|
description:
|
15
14
|
email: adrien@somethingsinistral.net
|
@@ -38,27 +37,26 @@ files:
|
|
38
37
|
homepage: https://github.com/adrienthebo/vagrant-auto_network
|
39
38
|
licenses:
|
40
39
|
- Apache 2.0
|
40
|
+
metadata: {}
|
41
41
|
post_install_message:
|
42
42
|
rdoc_options: []
|
43
43
|
require_paths:
|
44
44
|
- lib
|
45
45
|
required_ruby_version: !ruby/object:Gem::Requirement
|
46
|
-
none: false
|
47
46
|
requirements:
|
48
47
|
- - ! '>='
|
49
48
|
- !ruby/object:Gem::Version
|
50
49
|
version: '0'
|
51
50
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
52
|
-
none: false
|
53
51
|
requirements:
|
54
52
|
- - ! '>='
|
55
53
|
- !ruby/object:Gem::Version
|
56
54
|
version: '0'
|
57
55
|
requirements: []
|
58
56
|
rubyforge_project:
|
59
|
-
rubygems_version:
|
57
|
+
rubygems_version: 2.2.1
|
60
58
|
signing_key:
|
61
|
-
specification_version:
|
59
|
+
specification_version: 4
|
62
60
|
summary: Automatically create an internal network for all vagrant boxes
|
63
61
|
test_files: []
|
64
62
|
has_rdoc:
|