vagrantup 0.6.9 → 0.7.0
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 +4 -4
- data/.gitignore +2 -0
- data/CHANGELOG.md +37 -0
- data/Gemfile +0 -8
- data/README.md +5 -0
- data/config/default.rb +1 -3
- data/contrib/README.md +12 -0
- data/contrib/emacs/vagrant.el +8 -0
- data/contrib/vim/vagrantfile.vim +9 -0
- data/lib/vagrant/action/box/download.rb +0 -1
- data/lib/vagrant/action/box.rb +11 -0
- data/lib/vagrant/action/builtin.rb +1 -2
- data/lib/vagrant/action/env.rb +7 -0
- data/lib/vagrant/action/general.rb +8 -0
- data/lib/vagrant/action/vm/boot.rb +3 -2
- data/lib/vagrant/action/vm/check_box.rb +1 -0
- data/lib/vagrant/action/vm/clean_machine_folder.rb +1 -1
- data/lib/vagrant/action/vm/destroy.rb +1 -1
- data/lib/vagrant/action/vm/destroy_unused_network_interfaces.rb +7 -12
- data/lib/vagrant/action/vm/network.rb +1 -1
- data/lib/vagrant/action/vm/nfs.rb +3 -1
- data/lib/vagrant/action/vm/provision.rb +14 -25
- data/lib/vagrant/action/vm/share_folders.rb +11 -4
- data/lib/vagrant/action/vm.rb +30 -0
- data/lib/vagrant/action.rb +12 -0
- data/lib/vagrant/command.rb +25 -0
- data/lib/vagrant/config/base.rb +17 -3
- data/lib/vagrant/config/ssh.rb +2 -2
- data/lib/vagrant/config/top.rb +61 -0
- data/lib/vagrant/config/vagrant.rb +1 -6
- data/lib/vagrant/config/vm/provisioner.rb +56 -0
- data/lib/vagrant/config/vm/sub_vm.rb +17 -0
- data/lib/vagrant/config/vm.rb +34 -20
- data/lib/vagrant/config.rb +78 -128
- data/lib/vagrant/downloaders/file.rb +1 -0
- data/lib/vagrant/downloaders/http.rb +9 -0
- data/lib/vagrant/downloaders.rb +7 -0
- data/lib/vagrant/environment.rb +26 -14
- data/lib/vagrant/errors.rb +5 -15
- data/lib/vagrant/hosts.rb +7 -0
- data/lib/vagrant/provisioners/base.rb +19 -1
- data/lib/vagrant/provisioners/chef.rb +31 -52
- data/lib/vagrant/provisioners/chef_server.rb +34 -10
- data/lib/vagrant/provisioners/chef_solo.rb +31 -9
- data/lib/vagrant/provisioners/puppet.rb +111 -60
- data/lib/vagrant/provisioners/puppet_server.rb +57 -0
- data/lib/vagrant/provisioners.rb +8 -0
- data/lib/vagrant/ssh/session.rb +81 -0
- data/lib/vagrant/ssh.rb +6 -76
- data/lib/vagrant/systems/base.rb +16 -1
- data/lib/vagrant/systems/debian.rb +26 -0
- data/lib/vagrant/systems/gentoo.rb +27 -0
- data/lib/vagrant/systems/linux/config.rb +21 -0
- data/lib/vagrant/systems/linux/error.rb +9 -0
- data/lib/vagrant/systems/linux.rb +14 -56
- data/lib/vagrant/systems/redhat.rb +31 -0
- data/lib/vagrant/systems.rb +9 -0
- data/lib/vagrant/test_helpers.rb +1 -1
- data/lib/vagrant/version.rb +1 -1
- data/lib/vagrant/vm.rb +25 -5
- data/lib/vagrant.rb +14 -18
- data/templates/chef_solo_solo.erb +11 -3
- data/templates/commands/init/Vagrantfile.erb +13 -11
- data/templates/locales/en.yml +76 -26
- data/templates/{network_entry.erb → network_entry_debian.erb} +0 -0
- data/templates/network_entry_gentoo.erb +7 -0
- data/templates/network_entry_redhat.erb +8 -0
- data/templates/ssh_config.erb +1 -1
- data/test/vagrant/action/vm/check_box_test.rb +1 -0
- data/test/vagrant/action/vm/clean_machine_folder_test.rb +6 -4
- data/test/vagrant/action/vm/destroy_test.rb +1 -1
- data/test/vagrant/action/vm/destroy_unused_network_interfaces_test.rb +10 -7
- data/test/vagrant/action/vm/nfs_test.rb +7 -1
- data/test/vagrant/action/vm/provision_test.rb +24 -79
- data/test/vagrant/action/vm/share_folders_test.rb +6 -1
- data/test/vagrant/command/helpers_test.rb +2 -2
- data/test/vagrant/config/base_test.rb +0 -6
- data/test/vagrant/config/vagrant_test.rb +0 -8
- data/test/vagrant/config/vm/provisioner_test.rb +92 -0
- data/test/vagrant/config/vm_test.rb +8 -0
- data/test/vagrant/config_test.rb +49 -89
- data/test/vagrant/downloaders/file_test.rb +18 -4
- data/test/vagrant/environment_test.rb +36 -12
- data/test/vagrant/provisioners/base_test.rb +28 -1
- data/test/vagrant/provisioners/chef_server_test.rb +50 -41
- data/test/vagrant/provisioners/chef_solo_test.rb +39 -16
- data/test/vagrant/provisioners/chef_test.rb +11 -81
- data/test/vagrant/provisioners/puppet_server_test.rb +69 -0
- data/test/vagrant/provisioners/puppet_test.rb +116 -69
- data/test/vagrant/{ssh_session_test.rb → ssh/session_test.rb} +0 -0
- data/test/vagrant/ssh_test.rb +20 -7
- data/test/vagrant/systems/base_test.rb +18 -0
- data/test/vagrant/systems/linux_test.rb +2 -2
- data/test/vagrant/vm_test.rb +33 -5
- data/vagrant.gemspec +6 -5
- metadata +38 -14
- data/lib/vagrant/action/vm/disable_networks.rb +0 -34
- data/lib/vagrant/util/glob_loader.rb +0 -24
- data/test/vagrant/action/vm/disable_networks_test.rb +0 -48
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: vagrantup
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.7.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Mitchell Hashimoto
|
|
@@ -87,56 +87,56 @@ dependencies:
|
|
|
87
87
|
requirements:
|
|
88
88
|
- - ~>
|
|
89
89
|
- !ruby/object:Gem::Version
|
|
90
|
-
version: 1.0.
|
|
90
|
+
version: 1.0.4
|
|
91
91
|
type: :runtime
|
|
92
92
|
prerelease: false
|
|
93
93
|
version_requirements: !ruby/object:Gem::Requirement
|
|
94
94
|
requirements:
|
|
95
95
|
- - ~>
|
|
96
96
|
- !ruby/object:Gem::Version
|
|
97
|
-
version: 1.0.
|
|
97
|
+
version: 1.0.4
|
|
98
98
|
- !ruby/object:Gem::Dependency
|
|
99
99
|
name: i18n
|
|
100
100
|
requirement: !ruby/object:Gem::Requirement
|
|
101
101
|
requirements:
|
|
102
102
|
- - ~>
|
|
103
103
|
- !ruby/object:Gem::Version
|
|
104
|
-
version: 0.
|
|
104
|
+
version: 0.5.0
|
|
105
105
|
type: :runtime
|
|
106
106
|
prerelease: false
|
|
107
107
|
version_requirements: !ruby/object:Gem::Requirement
|
|
108
108
|
requirements:
|
|
109
109
|
- - ~>
|
|
110
110
|
- !ruby/object:Gem::Version
|
|
111
|
-
version: 0.
|
|
111
|
+
version: 0.5.0
|
|
112
112
|
- !ruby/object:Gem::Dependency
|
|
113
113
|
name: thor
|
|
114
114
|
requirement: !ruby/object:Gem::Requirement
|
|
115
115
|
requirements:
|
|
116
116
|
- - ~>
|
|
117
117
|
- !ruby/object:Gem::Version
|
|
118
|
-
version: 0.14.
|
|
118
|
+
version: 0.14.6
|
|
119
119
|
type: :runtime
|
|
120
120
|
prerelease: false
|
|
121
121
|
version_requirements: !ruby/object:Gem::Requirement
|
|
122
122
|
requirements:
|
|
123
123
|
- - ~>
|
|
124
124
|
- !ruby/object:Gem::Version
|
|
125
|
-
version: 0.14.
|
|
125
|
+
version: 0.14.6
|
|
126
126
|
- !ruby/object:Gem::Dependency
|
|
127
127
|
name: virtualbox
|
|
128
128
|
requirement: !ruby/object:Gem::Requirement
|
|
129
129
|
requirements:
|
|
130
130
|
- - ~>
|
|
131
131
|
- !ruby/object:Gem::Version
|
|
132
|
-
version: 0.
|
|
132
|
+
version: 0.8.2
|
|
133
133
|
type: :runtime
|
|
134
134
|
prerelease: false
|
|
135
135
|
version_requirements: !ruby/object:Gem::Requirement
|
|
136
136
|
requirements:
|
|
137
137
|
- - ~>
|
|
138
138
|
- !ruby/object:Gem::Version
|
|
139
|
-
version: 0.
|
|
139
|
+
version: 0.8.2
|
|
140
140
|
- !ruby/object:Gem::Dependency
|
|
141
141
|
name: rake
|
|
142
142
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -212,12 +212,16 @@ files:
|
|
|
212
212
|
- Rakefile
|
|
213
213
|
- bin/vagrant
|
|
214
214
|
- config/default.rb
|
|
215
|
+
- contrib/README.md
|
|
216
|
+
- contrib/emacs/vagrant.el
|
|
217
|
+
- contrib/vim/vagrantfile.vim
|
|
215
218
|
- keys/README.md
|
|
216
219
|
- keys/vagrant
|
|
217
220
|
- keys/vagrant.ppk
|
|
218
221
|
- keys/vagrant.pub
|
|
219
222
|
- lib/vagrant.rb
|
|
220
223
|
- lib/vagrant/action.rb
|
|
224
|
+
- lib/vagrant/action/box.rb
|
|
221
225
|
- lib/vagrant/action/box/destroy.rb
|
|
222
226
|
- lib/vagrant/action/box/download.rb
|
|
223
227
|
- lib/vagrant/action/box/package.rb
|
|
@@ -225,10 +229,13 @@ files:
|
|
|
225
229
|
- lib/vagrant/action/box/verify.rb
|
|
226
230
|
- lib/vagrant/action/builder.rb
|
|
227
231
|
- lib/vagrant/action/builtin.rb
|
|
232
|
+
- lib/vagrant/action/env.rb
|
|
228
233
|
- lib/vagrant/action/env/set.rb
|
|
229
234
|
- lib/vagrant/action/environment.rb
|
|
235
|
+
- lib/vagrant/action/general.rb
|
|
230
236
|
- lib/vagrant/action/general/package.rb
|
|
231
237
|
- lib/vagrant/action/general/validate.rb
|
|
238
|
+
- lib/vagrant/action/vm.rb
|
|
232
239
|
- lib/vagrant/action/vm/boot.rb
|
|
233
240
|
- lib/vagrant/action/vm/check_box.rb
|
|
234
241
|
- lib/vagrant/action/vm/check_guest_additions.rb
|
|
@@ -239,7 +246,6 @@ files:
|
|
|
239
246
|
- lib/vagrant/action/vm/customize.rb
|
|
240
247
|
- lib/vagrant/action/vm/destroy.rb
|
|
241
248
|
- lib/vagrant/action/vm/destroy_unused_network_interfaces.rb
|
|
242
|
-
- lib/vagrant/action/vm/disable_networks.rb
|
|
243
249
|
- lib/vagrant/action/vm/discard_state.rb
|
|
244
250
|
- lib/vagrant/action/vm/export.rb
|
|
245
251
|
- lib/vagrant/action/vm/forward_ports.rb
|
|
@@ -260,6 +266,7 @@ files:
|
|
|
260
266
|
- lib/vagrant/box.rb
|
|
261
267
|
- lib/vagrant/box_collection.rb
|
|
262
268
|
- lib/vagrant/cli.rb
|
|
269
|
+
- lib/vagrant/command.rb
|
|
263
270
|
- lib/vagrant/command/base.rb
|
|
264
271
|
- lib/vagrant/command/box.rb
|
|
265
272
|
- lib/vagrant/command/destroy.rb
|
|
@@ -285,32 +292,45 @@ files:
|
|
|
285
292
|
- lib/vagrant/config/nfs.rb
|
|
286
293
|
- lib/vagrant/config/package.rb
|
|
287
294
|
- lib/vagrant/config/ssh.rb
|
|
295
|
+
- lib/vagrant/config/top.rb
|
|
288
296
|
- lib/vagrant/config/vagrant.rb
|
|
289
297
|
- lib/vagrant/config/vm.rb
|
|
298
|
+
- lib/vagrant/config/vm/provisioner.rb
|
|
299
|
+
- lib/vagrant/config/vm/sub_vm.rb
|
|
290
300
|
- lib/vagrant/data_store.rb
|
|
301
|
+
- lib/vagrant/downloaders.rb
|
|
291
302
|
- lib/vagrant/downloaders/base.rb
|
|
292
303
|
- lib/vagrant/downloaders/file.rb
|
|
293
304
|
- lib/vagrant/downloaders/http.rb
|
|
294
305
|
- lib/vagrant/environment.rb
|
|
295
306
|
- lib/vagrant/errors.rb
|
|
307
|
+
- lib/vagrant/hosts.rb
|
|
296
308
|
- lib/vagrant/hosts/base.rb
|
|
297
309
|
- lib/vagrant/hosts/bsd.rb
|
|
298
310
|
- lib/vagrant/hosts/linux.rb
|
|
299
311
|
- lib/vagrant/plugin.rb
|
|
312
|
+
- lib/vagrant/provisioners.rb
|
|
300
313
|
- lib/vagrant/provisioners/base.rb
|
|
301
314
|
- lib/vagrant/provisioners/chef.rb
|
|
302
315
|
- lib/vagrant/provisioners/chef_server.rb
|
|
303
316
|
- lib/vagrant/provisioners/chef_solo.rb
|
|
304
317
|
- lib/vagrant/provisioners/puppet.rb
|
|
318
|
+
- lib/vagrant/provisioners/puppet_server.rb
|
|
305
319
|
- lib/vagrant/ssh.rb
|
|
320
|
+
- lib/vagrant/ssh/session.rb
|
|
321
|
+
- lib/vagrant/systems.rb
|
|
306
322
|
- lib/vagrant/systems/base.rb
|
|
323
|
+
- lib/vagrant/systems/debian.rb
|
|
324
|
+
- lib/vagrant/systems/gentoo.rb
|
|
307
325
|
- lib/vagrant/systems/linux.rb
|
|
326
|
+
- lib/vagrant/systems/linux/config.rb
|
|
327
|
+
- lib/vagrant/systems/linux/error.rb
|
|
328
|
+
- lib/vagrant/systems/redhat.rb
|
|
308
329
|
- lib/vagrant/systems/solaris.rb
|
|
309
330
|
- lib/vagrant/test_helpers.rb
|
|
310
331
|
- lib/vagrant/ui.rb
|
|
311
332
|
- lib/vagrant/util.rb
|
|
312
333
|
- lib/vagrant/util/busy.rb
|
|
313
|
-
- lib/vagrant/util/glob_loader.rb
|
|
314
334
|
- lib/vagrant/util/hash_with_indifferent_access.rb
|
|
315
335
|
- lib/vagrant/util/plain_logger.rb
|
|
316
336
|
- lib/vagrant/util/platform.rb
|
|
@@ -325,7 +345,9 @@ files:
|
|
|
325
345
|
- templates/commands/init/Vagrantfile.erb
|
|
326
346
|
- templates/config/validation_failed.erb
|
|
327
347
|
- templates/locales/en.yml
|
|
328
|
-
- templates/
|
|
348
|
+
- templates/network_entry_debian.erb
|
|
349
|
+
- templates/network_entry_gentoo.erb
|
|
350
|
+
- templates/network_entry_redhat.erb
|
|
329
351
|
- templates/nfs/exports.erb
|
|
330
352
|
- templates/nfs/exports_linux.erb
|
|
331
353
|
- templates/package_Vagrantfile.erb
|
|
@@ -352,7 +374,6 @@ files:
|
|
|
352
374
|
- test/vagrant/action/vm/customize_test.rb
|
|
353
375
|
- test/vagrant/action/vm/destroy_test.rb
|
|
354
376
|
- test/vagrant/action/vm/destroy_unused_network_interfaces_test.rb
|
|
355
|
-
- test/vagrant/action/vm/disable_networks_test.rb
|
|
356
377
|
- test/vagrant/action/vm/discard_state_test.rb
|
|
357
378
|
- test/vagrant/action/vm/export_test.rb
|
|
358
379
|
- test/vagrant/action/vm/forward_ports_helpers_test.rb
|
|
@@ -382,6 +403,7 @@ files:
|
|
|
382
403
|
- test/vagrant/config/error_recorder_test.rb
|
|
383
404
|
- test/vagrant/config/ssh_test.rb
|
|
384
405
|
- test/vagrant/config/vagrant_test.rb
|
|
406
|
+
- test/vagrant/config/vm/provisioner_test.rb
|
|
385
407
|
- test/vagrant/config/vm_test.rb
|
|
386
408
|
- test/vagrant/config_test.rb
|
|
387
409
|
- test/vagrant/data_store_test.rb
|
|
@@ -398,9 +420,11 @@ files:
|
|
|
398
420
|
- test/vagrant/provisioners/chef_server_test.rb
|
|
399
421
|
- test/vagrant/provisioners/chef_solo_test.rb
|
|
400
422
|
- test/vagrant/provisioners/chef_test.rb
|
|
423
|
+
- test/vagrant/provisioners/puppet_server_test.rb
|
|
401
424
|
- test/vagrant/provisioners/puppet_test.rb
|
|
402
|
-
- test/vagrant/
|
|
425
|
+
- test/vagrant/ssh/session_test.rb
|
|
403
426
|
- test/vagrant/ssh_test.rb
|
|
427
|
+
- test/vagrant/systems/base_test.rb
|
|
404
428
|
- test/vagrant/systems/linux_test.rb
|
|
405
429
|
- test/vagrant/ui_test.rb
|
|
406
430
|
- test/vagrant/util/busy_test.rb
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
module Vagrant
|
|
2
|
-
class Action
|
|
3
|
-
module VM
|
|
4
|
-
# Middleware to disable all host only networks on the
|
|
5
|
-
# VM
|
|
6
|
-
class DisableNetworks
|
|
7
|
-
def initialize(app, env)
|
|
8
|
-
@app = app
|
|
9
|
-
@env = env
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
def call(env)
|
|
13
|
-
if env["vm"].created?
|
|
14
|
-
logged = false
|
|
15
|
-
|
|
16
|
-
env["vm"].vm.network_adapters.each do |adapter|
|
|
17
|
-
next if adapter.attachment_type != :host_only
|
|
18
|
-
|
|
19
|
-
if !logged
|
|
20
|
-
env.ui.info I18n.t("vagrant.actions.vm.disable_networks.disabling")
|
|
21
|
-
logged = true
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
adapter.enabled = false
|
|
25
|
-
adapter.save
|
|
26
|
-
end
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
@app.call(env)
|
|
30
|
-
end
|
|
31
|
-
end
|
|
32
|
-
end
|
|
33
|
-
end
|
|
34
|
-
end
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
module Vagrant
|
|
2
|
-
module Util
|
|
3
|
-
# Eases the processes of loading specific files then globbing
|
|
4
|
-
# the rest from a specified directory.
|
|
5
|
-
module GlobLoader
|
|
6
|
-
# Glob requires all ruby files in a directory, optionally loading select
|
|
7
|
-
# files initially (since others may depend on them).
|
|
8
|
-
#
|
|
9
|
-
# @param [String] dir The directory to glob
|
|
10
|
-
# @param [Array<String>] initial_files Initial files (relative to `dir`)
|
|
11
|
-
# to load
|
|
12
|
-
def self.glob_require(dir, initial_files=[])
|
|
13
|
-
initial_files.each do |file|
|
|
14
|
-
require File.expand_path(file, dir)
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
# Glob require the rest
|
|
18
|
-
Dir[File.join(dir, "**", "*.rb")].each do |f|
|
|
19
|
-
require File.expand_path(f)
|
|
20
|
-
end
|
|
21
|
-
end
|
|
22
|
-
end
|
|
23
|
-
end
|
|
24
|
-
end
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
require "test_helper"
|
|
2
|
-
|
|
3
|
-
class DisableNetworksVMActionTest < Test::Unit::TestCase
|
|
4
|
-
setup do
|
|
5
|
-
@klass = Vagrant::Action::VM::DisableNetworks
|
|
6
|
-
@app, @env = action_env
|
|
7
|
-
|
|
8
|
-
@vm = mock("vm")
|
|
9
|
-
@env.env.stubs(:vm).returns(@vm)
|
|
10
|
-
|
|
11
|
-
@internal_vm = mock("internal")
|
|
12
|
-
@vm.stubs(:created?).returns(true)
|
|
13
|
-
@vm.stubs(:vm).returns(@internal_vm)
|
|
14
|
-
@internal_vm.stubs(:network_adapters).returns([])
|
|
15
|
-
|
|
16
|
-
@instance = @klass.new(@app, @env)
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
def mock_adapter(type)
|
|
20
|
-
adapter = mock("adapter")
|
|
21
|
-
adapter.stubs(:attachment_type).returns(type)
|
|
22
|
-
|
|
23
|
-
if type == :host_only
|
|
24
|
-
adapter.expects(:enabled=).with(false)
|
|
25
|
-
adapter.expects(:save)
|
|
26
|
-
end
|
|
27
|
-
|
|
28
|
-
@internal_vm.network_adapters << adapter
|
|
29
|
-
end
|
|
30
|
-
|
|
31
|
-
should "do nothing if VM is not created" do
|
|
32
|
-
@vm.stubs(:created?).returns(false)
|
|
33
|
-
@vm.expects(:vm).never
|
|
34
|
-
|
|
35
|
-
@app.expects(:call).with(@env).once
|
|
36
|
-
@instance.call(@env)
|
|
37
|
-
end
|
|
38
|
-
|
|
39
|
-
should "remove all network adapters and continue chain" do
|
|
40
|
-
mock_adapter(:bridged)
|
|
41
|
-
mock_adapter(:host_only)
|
|
42
|
-
mock_adapter(:host_only)
|
|
43
|
-
|
|
44
|
-
@app.expects(:call).with(@env).once
|
|
45
|
-
|
|
46
|
-
@instance.call(@env)
|
|
47
|
-
end
|
|
48
|
-
end
|