vagrant-config_builder 0.10.0 → 0.10.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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ad642e21b08ad1ad7baf002cd01ec1167758a332
|
4
|
+
data.tar.gz: 8f473ceb06a835407c996de34a96c609ab8a0cc0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8cc9a6ba0eeb0dff69ff001b477b5e4473c072d29ca76f554840a630bdd6cd348df9562d80d645954ff846dbbb365bee82b55bd890b3104b6c62c0525822a443
|
7
|
+
data.tar.gz: ed2c49b370655683309dbffe8cabc7b38bb505ed68e4f92eda5e6a4722d43878a3294a37d50fbd03e5105f23fc39e5ec5e11cd937c99de5d1f7be095238fab17
|
data/CHANGELOG
CHANGED
@@ -1,6 +1,18 @@
|
|
1
1
|
CHANGELOG
|
2
2
|
=========
|
3
3
|
|
4
|
+
0.10.1
|
5
|
+
------
|
6
|
+
|
7
|
+
2014-07-08
|
8
|
+
|
9
|
+
This is a backwards bugfix release.
|
10
|
+
|
11
|
+
* Fixed an issue where VM definitions would end up with linked copies of an
|
12
|
+
array because cloning was not used.
|
13
|
+
|
14
|
+
* The `id` attribute can now be specified for `forwarded_port`.
|
15
|
+
|
4
16
|
0.10.0
|
5
17
|
------
|
6
18
|
|
@@ -15,8 +15,12 @@ class ConfigBuilder::Model::Network::ForwardedPort < ConfigBuilder::Model::Base
|
|
15
15
|
# @return [Boolean] Whether to automatically correct port collisions
|
16
16
|
def_model_attribute :auto_correct
|
17
17
|
|
18
|
+
# @!attribute [rw] id
|
19
|
+
# @return [String, nil] An optional name used to identify this port forward
|
20
|
+
def_model_attribute :id
|
21
|
+
|
18
22
|
def initialize
|
19
|
-
@defaults = {:auto_correct => false}
|
23
|
+
@defaults = {:auto_correct => false, :id => nil}
|
20
24
|
end
|
21
25
|
|
22
26
|
def to_proc
|
@@ -25,7 +29,8 @@ class ConfigBuilder::Model::Network::ForwardedPort < ConfigBuilder::Model::Base
|
|
25
29
|
:forwarded_port,
|
26
30
|
:guest => attr(:guest),
|
27
31
|
:host => attr(:host),
|
28
|
-
:auto_correct => attr(:auto_correct)
|
32
|
+
:auto_correct => attr(:auto_correct),
|
33
|
+
:id => attr(:id),
|
29
34
|
)
|
30
35
|
end
|
31
36
|
end
|
@@ -35,6 +35,11 @@ describe ConfigBuilder::Filter::Roles do
|
|
35
35
|
{'guest_path' => '/guest-3', 'host_path' => './host-3'},
|
36
36
|
{'guest_path' => '/guest-4', 'host_path' => './host-4'},
|
37
37
|
],
|
38
|
+
},
|
39
|
+
'shared-networks' => {
|
40
|
+
'private_networks' => [
|
41
|
+
{'ip' => '1.2.3.4'}
|
42
|
+
]
|
38
43
|
}
|
39
44
|
}
|
40
45
|
end
|
@@ -183,11 +188,11 @@ describe ConfigBuilder::Filter::Roles do
|
|
183
188
|
[
|
184
189
|
{
|
185
190
|
'name' => 'master',
|
186
|
-
'roles' => ['shell-provisioner', 'potato-provisioner', 'folders-12', 'folders-34'],
|
191
|
+
'roles' => ['shell-provisioner', 'potato-provisioner', 'folders-12', 'folders-34', 'shared-networks'],
|
187
192
|
},
|
188
193
|
{
|
189
194
|
'name' => 'agent',
|
190
|
-
'roles' => ['shell-provisioner', 'puppet-provisioner', 'folders-34'],
|
195
|
+
'roles' => ['shell-provisioner', 'puppet-provisioner', 'folders-34', 'shared-networks'],
|
191
196
|
}
|
192
197
|
]
|
193
198
|
end
|
@@ -251,6 +256,16 @@ describe ConfigBuilder::Filter::Roles do
|
|
251
256
|
expect(vm['synced_folders']).to eq expected
|
252
257
|
end
|
253
258
|
end
|
259
|
+
|
260
|
+
context 'when modifying an array inherited from a role' do
|
261
|
+
before :each do
|
262
|
+
filtered_vms[0]['private_networks'].push 'ip' => '5.6.7.8'
|
263
|
+
end
|
264
|
+
|
265
|
+
it 'other VMs using that role are not affected' do
|
266
|
+
expect(filtered_vms[1]['private_networks']).to eq roles['shared-networks']['private_networks']
|
267
|
+
end
|
268
|
+
end
|
254
269
|
end
|
255
270
|
|
256
271
|
describe 'when a class references a non-existent role' do
|
@@ -259,14 +274,14 @@ describe ConfigBuilder::Filter::Roles do
|
|
259
274
|
'vms' => [{'name' => 'master', 'roles' => 'nope'}],
|
260
275
|
'roles' => {'yep' => {'box' => 'moxxi'}}
|
261
276
|
}
|
277
|
+
end
|
262
278
|
|
263
|
-
|
264
|
-
|
265
|
-
|
279
|
+
before do
|
280
|
+
subject.set_config(dup(config))
|
281
|
+
end
|
266
282
|
|
267
|
-
|
268
|
-
|
269
|
-
end
|
283
|
+
it 'raises an error' do
|
284
|
+
expect { subject.run }.to raise_error(/^Requested role "nope" is not defined/)
|
270
285
|
end
|
271
286
|
end
|
272
287
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-config_builder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adrien Thebo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-07-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: deep_merge
|
@@ -114,3 +114,4 @@ signing_key:
|
|
114
114
|
specification_version: 4
|
115
115
|
summary: Generate Vagrant configurations from arbitrary data
|
116
116
|
test_files: []
|
117
|
+
has_rdoc: true
|