vagrant 0.6.3 → 0.6.4
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +25 -2
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/config/default.rb +1 -1
- data/keys/vagrant.pub +1 -1
- data/lib/vagrant/action/box/unpackage.rb +1 -1
- data/lib/vagrant/action/vm/check_box.rb +0 -1
- data/lib/vagrant/action/vm/nfs.rb +1 -1
- data/lib/vagrant/action/vm/provision.rb +2 -1
- data/lib/vagrant/action/warden.rb +4 -0
- data/lib/vagrant/box.rb +1 -0
- data/lib/vagrant/command/box.rb +2 -2
- data/lib/vagrant/command/group_base.rb +9 -1
- data/lib/vagrant/command/ssh.rb +3 -2
- data/lib/vagrant/command/ssh_config.rb +2 -2
- data/lib/vagrant/command/up.rb +2 -3
- data/lib/vagrant/config.rb +1 -0
- data/lib/vagrant/config/base.rb +5 -1
- data/lib/vagrant/errors.rb +10 -0
- data/lib/vagrant/hosts/bsd.rb +8 -5
- data/lib/vagrant/provisioners/chef.rb +18 -0
- data/lib/vagrant/ssh.rb +2 -0
- data/lib/vagrant/test_helpers.rb +13 -0
- data/lib/vagrant/version.rb +1 -1
- data/lib/vagrant/vm.rb +2 -2
- data/templates/commands/init/Vagrantfile.erb +44 -6
- data/templates/locales/en.yml +9 -2
- data/test/test_helper.rb +0 -18
- data/test/vagrant/action/box/unpackage_test.rb +7 -0
- data/test/vagrant/action/vm/check_box_test.rb +0 -1
- data/test/vagrant/action/vm/nfs_test.rb +10 -0
- data/test/vagrant/action/vm/provision_test.rb +14 -0
- data/test/vagrant/action/warden_test.rb +14 -0
- data/test/vagrant/box_test.rb +8 -0
- data/test/vagrant/config/base_test.rb +6 -0
- data/test/vagrant/config/vagrant_test.rb +33 -1
- data/test/vagrant/config_test.rb +5 -0
- data/test/vagrant/downloaders/file_test.rb +1 -1
- data/test/vagrant/downloaders/http_test.rb +1 -1
- data/test/vagrant/provisioners/chef_server_test.rb +1 -2
- data/test/vagrant/provisioners/chef_solo_test.rb +1 -2
- data/test/vagrant/provisioners/chef_test.rb +74 -3
- data/test/vagrant/ssh_test.rb +14 -3
- data/test/vagrant/vm_test.rb +12 -4
- metadata +46 -63
- data/templates/Vagrantfile.erb +0 -14
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,29 @@
|
|
1
|
-
## 0.6.
|
1
|
+
## 0.6.4 (October 4, 2010)
|
2
2
|
|
3
|
-
-
|
3
|
+
- Default VM name is now properly the parent folder of the working directory
|
4
|
+
of the environment.
|
5
|
+
- Added method to `TestHelpers` to assist with testing new downloaders.
|
6
|
+
- `up --no-provision` works again. This disables provisioning during the
|
7
|
+
boot process.
|
8
|
+
- Action warden doesn't do recovery process on `SystemExit` exceptions,
|
9
|
+
allowing the double ctrl-C to work properly again. [related to GH-166]
|
10
|
+
- Initial Vagrantfile is now heavily commented with various available
|
11
|
+
options. [GH-171]
|
12
|
+
- Box add checks if a box already exists before the download. [GH-170]
|
13
|
+
- NFS no longer attempts to clean exports file if VM is not created,
|
14
|
+
which was causing a stack trace during recovery. [related to GH-166]
|
15
|
+
- Basic validation added for Chef configuration (both solo and server).
|
16
|
+
- Top config class is now available in all `Vagrant::Config::Base`
|
17
|
+
subclasses, which is useful for config validation.
|
18
|
+
- Subcommand help shows proper full command in task listing. [GH-168]
|
19
|
+
- SSH gives error message if `ssh` binary is not found. [GH-161]
|
20
|
+
- SSH gives proper error message if VM is not running. [GH-167]
|
21
|
+
- Fix some issues with undefined constants in command errors.
|
22
|
+
|
23
|
+
## 0.6.1, 0.6.2, 0.6.3 (September 27, 2010)
|
24
|
+
|
25
|
+
A lot of quick releases which all were to fix issues with Ruby 1.8.7
|
26
|
+
compatibility.
|
4
27
|
|
5
28
|
## 0.6.0 (September 27, 2010)
|
6
29
|
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -10,7 +10,7 @@ Vagrant is a tool for building and distributing virtualized development environm
|
|
10
10
|
By providing automated creation and provisioning of virtual machines using [Oracle’s VirtualBox](http://www.virtualbox.org),
|
11
11
|
Vagrant provides the tools to create and configure lightweight, reproducible, and portable
|
12
12
|
virtual environments. For more information, see the part of the getting started guide
|
13
|
-
on
|
13
|
+
on “[Why Vagrant?](http://vagrantup.com/docs/getting-started/index.html)”
|
14
14
|
|
15
15
|
## Quick Start
|
16
16
|
|
data/config/default.rb
CHANGED
@@ -27,7 +27,7 @@ Vagrant::Config.run do |config|
|
|
27
27
|
|
28
28
|
config.vm.customize do |vm|
|
29
29
|
# Make VM name the name of the containing folder by default
|
30
|
-
vm.name = File.basename(
|
30
|
+
vm.name = File.basename(config.env.cwd) + "_#{Time.now.to_i}"
|
31
31
|
end
|
32
32
|
|
33
33
|
# Share the root folder. This can then be overridden by
|
data/keys/vagrant.pub
CHANGED
@@ -1 +1 @@
|
|
1
|
-
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzIw+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoPkcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NOTd0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcWyLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQ==
|
1
|
+
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzIw+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoPkcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NOTd0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcWyLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQ== vagrant insecure public key
|
@@ -5,6 +5,7 @@ module Vagrant
|
|
5
5
|
def initialize(app, env)
|
6
6
|
@app = app
|
7
7
|
@env = env
|
8
|
+
@env["provision.enabled"] = true if !@env.has_key?("provision.enabled")
|
8
9
|
|
9
10
|
load_provisioner if provisioning_enabled?
|
10
11
|
end
|
@@ -19,7 +20,7 @@ module Vagrant
|
|
19
20
|
end
|
20
21
|
|
21
22
|
def provisioning_enabled?
|
22
|
-
!@env["config"].vm.provisioner.nil?
|
23
|
+
!@env["config"].vm.provisioner.nil? && @env["provision.enabled"]
|
23
24
|
end
|
24
25
|
|
25
26
|
def load_provisioner
|
@@ -26,6 +26,10 @@ module Vagrant
|
|
26
26
|
raise Errors::VagrantInterrupt.new if env.interrupted?
|
27
27
|
@stack.unshift(@actions.shift).first.call(env)
|
28
28
|
raise Errors::VagrantInterrupt.new if env.interrupted?
|
29
|
+
rescue SystemExit
|
30
|
+
# This means that an "exit" or "abort" was called. In these cases,
|
31
|
+
# we just exit immediately.
|
32
|
+
raise
|
29
33
|
rescue Exception => e
|
30
34
|
env["vagrant.error"] = e
|
31
35
|
|
data/lib/vagrant/box.rb
CHANGED
@@ -57,6 +57,7 @@ module Vagrant
|
|
57
57
|
# method requires that `name` and `uri` be set. The logic of this method
|
58
58
|
# is kicked out to the `box_add` registered middleware.
|
59
59
|
def add
|
60
|
+
raise Errors::BoxAlreadyExists.new(:name => name) if File.directory?(directory)
|
60
61
|
env.actions.run(:box_add, { "box" => self })
|
61
62
|
end
|
62
63
|
|
data/lib/vagrant/command/box.rb
CHANGED
@@ -11,14 +11,14 @@ module Vagrant
|
|
11
11
|
desc "remove NAME", "Remove a box from the system"
|
12
12
|
def remove(name)
|
13
13
|
b = env.boxes.find(name)
|
14
|
-
raise BoxNotFound.new(:name => name) if !b
|
14
|
+
raise Errors::BoxNotFound.new(:name => name) if !b
|
15
15
|
b.destroy
|
16
16
|
end
|
17
17
|
|
18
18
|
desc "repackage NAME", "Repackage an installed box into a `.box` file."
|
19
19
|
def repackage(name)
|
20
20
|
b = env.boxes.find(name)
|
21
|
-
raise BoxNotFound.new(:name => name) if !b
|
21
|
+
raise Errors::BoxNotFound.new(:name => name) if !b
|
22
22
|
b.repackage
|
23
23
|
end
|
24
24
|
|
@@ -87,13 +87,21 @@ module Vagrant
|
|
87
87
|
# @param [String] description
|
88
88
|
# @param [Hash] opts
|
89
89
|
def self.register(usage, description, opts=nil)
|
90
|
-
|
90
|
+
@_name = Base.extract_name_from_usage(usage)
|
91
|
+
CLI.register(self, @_name, usage, description, opts)
|
91
92
|
end
|
92
93
|
|
93
94
|
def initialize(*args)
|
94
95
|
super
|
95
96
|
initialize_environment(*args)
|
96
97
|
end
|
98
|
+
|
99
|
+
protected
|
100
|
+
|
101
|
+
# Override the basename to include the subcommand name.
|
102
|
+
def self.basename
|
103
|
+
"#{super} #{@_name}"
|
104
|
+
end
|
97
105
|
end
|
98
106
|
end
|
99
107
|
end
|
data/lib/vagrant/command/ssh.rb
CHANGED
@@ -24,14 +24,15 @@ module Vagrant
|
|
24
24
|
end
|
25
25
|
|
26
26
|
def ssh_connect
|
27
|
-
raise VMNotCreatedError.new if !ssh_vm.created?
|
27
|
+
raise Errors::VMNotCreatedError.new if !ssh_vm.created?
|
28
|
+
raise Errors::VMNotRunningError.new if !ssh_vm.vm.running?
|
28
29
|
ssh_vm.ssh.connect
|
29
30
|
end
|
30
31
|
|
31
32
|
def ssh_vm
|
32
33
|
@ssh_vm ||= begin
|
33
34
|
vm = self.name.nil? && env.multivm? ? env.primary_vm : nil
|
34
|
-
raise MultiVMTargetRequired.new(:command => "ssh") if !vm && target_vms.length > 1
|
35
|
+
raise Errors::MultiVMTargetRequired.new(:command => "ssh") if !vm && target_vms.length > 1
|
35
36
|
vm = target_vms.first if !vm
|
36
37
|
vm
|
37
38
|
end
|
@@ -5,9 +5,9 @@ module Vagrant
|
|
5
5
|
register "ssh_config", "outputs .ssh/config valid syntax for connecting to this environment via ssh"
|
6
6
|
|
7
7
|
def execute
|
8
|
-
raise MultiVMTargetRequired.new(:command => "ssh_config") if target_vms.length > 1
|
8
|
+
raise Errors::MultiVMTargetRequired.new(:command => "ssh_config") if target_vms.length > 1
|
9
9
|
vm = target_vms.first
|
10
|
-
raise VMNotCreatedError.new if !vm.created?
|
10
|
+
raise Errors::VMNotCreatedError.new if !vm.created?
|
11
11
|
|
12
12
|
env.ui.info(Util::TemplateRenderer.render("ssh_config", {
|
13
13
|
:host_key => options[:host] || "vagrant",
|
data/lib/vagrant/command/up.rb
CHANGED
@@ -5,13 +5,12 @@ module Vagrant
|
|
5
5
|
register "up", "Creates the Vagrant environment"
|
6
6
|
|
7
7
|
def execute
|
8
|
-
# TODO: Make the options[:provision] actually mean something
|
9
8
|
target_vms.each do |vm|
|
10
9
|
if vm.created?
|
11
10
|
vm.env.ui.info I18n.t("vagrant.commands.up.vm_created")
|
12
|
-
vm.start
|
11
|
+
vm.start("provision.enabled" => options[:provision])
|
13
12
|
else
|
14
|
-
vm.up
|
13
|
+
vm.up("provision.enabled" => options[:provision])
|
15
14
|
end
|
16
15
|
end
|
17
16
|
end
|
data/lib/vagrant/config.rb
CHANGED
data/lib/vagrant/config/base.rb
CHANGED
@@ -4,8 +4,12 @@ module Vagrant
|
|
4
4
|
# basic things such as the environment instance variable which all
|
5
5
|
# config classes need as well as a basic `to_json` implementation.
|
6
6
|
class Base
|
7
|
+
# {Environment} that this config belongs to
|
7
8
|
attr_accessor :env
|
8
9
|
|
10
|
+
# {Top} of this configuration stack
|
11
|
+
attr_accessor :top
|
12
|
+
|
9
13
|
# Registers a subclass with the Vagrant configuration system so
|
10
14
|
# that it can then be used in Vagrantfiles.
|
11
15
|
#
|
@@ -58,7 +62,7 @@ module Vagrant
|
|
58
62
|
# Returns the instance variables as a hash of key-value pairs.
|
59
63
|
def instance_variables_hash
|
60
64
|
instance_variables.inject({}) do |acc, iv|
|
61
|
-
acc[iv.to_s[1..-1]] = instance_variable_get(iv) unless iv.to_sym
|
65
|
+
acc[iv.to_s[1..-1]] = instance_variable_get(iv) unless [:@env, :@top].include?(iv.to_sym)
|
62
66
|
acc
|
63
67
|
end
|
64
68
|
end
|
data/lib/vagrant/errors.rb
CHANGED
@@ -243,6 +243,11 @@ module Vagrant
|
|
243
243
|
error_key(:ssh_key_bad_permissions)
|
244
244
|
end
|
245
245
|
|
246
|
+
class SSHUnavailable < VagrantError
|
247
|
+
status_code(45)
|
248
|
+
error_key(:ssh_unavailable)
|
249
|
+
end
|
250
|
+
|
246
251
|
class SSHUnavailableWindows < VagrantError
|
247
252
|
status_code(10)
|
248
253
|
error_key(:ssh_unavailable_windows)
|
@@ -293,6 +298,11 @@ module Vagrant
|
|
293
298
|
error_key(:vm_not_found)
|
294
299
|
end
|
295
300
|
|
301
|
+
class VMNotRunningError < VagrantError
|
302
|
+
status_code(44)
|
303
|
+
error_key(:vm_not_running)
|
304
|
+
end
|
305
|
+
|
296
306
|
class VMPowerOffToPackage < VagrantError
|
297
307
|
status_code(24)
|
298
308
|
error_key(:power_off, "vagrant.actions.vm.export")
|
data/lib/vagrant/hosts/bsd.rb
CHANGED
@@ -35,12 +35,15 @@ module Vagrant
|
|
35
35
|
|
36
36
|
def nfs_cleanup
|
37
37
|
return if !File.exist?("/etc/exports")
|
38
|
-
system("cat /etc/exports | grep 'VAGRANT-BEGIN: #{env.vm.uuid}' > /dev/null 2>&1")
|
39
38
|
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
39
|
+
retryable(:tries => 10, :on => TypeError) do
|
40
|
+
system("cat /etc/exports | grep 'VAGRANT-BEGIN: #{env.vm.uuid}' > /dev/null 2>&1")
|
41
|
+
|
42
|
+
if $?.to_i == 0
|
43
|
+
# Use sed to just strip out the block of code which was inserted
|
44
|
+
# by Vagrant
|
45
|
+
system("sudo sed -e '/^# VAGRANT-BEGIN: #{env.vm.uuid}/,/^# VAGRANT-END: #{env.vm.uuid}/ d' -i bak /etc/exports")
|
46
|
+
end
|
44
47
|
end
|
45
48
|
end
|
46
49
|
end
|
@@ -125,6 +125,24 @@ module Vagrant
|
|
125
125
|
result.delete("json")
|
126
126
|
result
|
127
127
|
end
|
128
|
+
|
129
|
+
def validate(errors)
|
130
|
+
if top.vm.provisioner == :chef_solo
|
131
|
+
# Validate chef solo settings
|
132
|
+
errors.add(I18n.t("vagrant.config.chef.cookbooks_path_empty")) if !cookbooks_path || [cookbooks_path].flatten.empty?
|
133
|
+
end
|
134
|
+
|
135
|
+
if top.vm.provisioner == :chef_server
|
136
|
+
# Validate chef server settings
|
137
|
+
errors.add(I18n.t("vagrant.config.chef.server_url_empty")) if !chef_server_url || chef_server_url.strip == ""
|
138
|
+
errors.add(I18n.t("vagrant.config.chef.validation_key_path")) if !validation_key_path
|
139
|
+
end
|
140
|
+
|
141
|
+
if [:chef_solo, :chef_server].include?(top.vm.provisioner)
|
142
|
+
# Validations shared by both chef solo and server
|
143
|
+
errors.add(I18n.t("vagrant.config.chef.run_list_empty")) if !run_list || run_list.empty?
|
144
|
+
end
|
145
|
+
end
|
128
146
|
end
|
129
147
|
end
|
130
148
|
end
|
data/lib/vagrant/ssh.rb
CHANGED
data/lib/vagrant/test_helpers.rb
CHANGED
@@ -55,6 +55,19 @@ module Vagrant
|
|
55
55
|
result
|
56
56
|
end
|
57
57
|
|
58
|
+
# Returns an instantiated downloader with a mocked tempfile
|
59
|
+
# which can be passed into it.
|
60
|
+
#
|
61
|
+
# @param [Class] klass The downloader class
|
62
|
+
# @return [Array] Returns an array of `downloader` `tempfile`
|
63
|
+
def vagrant_mock_downloader(klass)
|
64
|
+
tempfile = mock("tempfile")
|
65
|
+
tempfile.stubs(:write)
|
66
|
+
|
67
|
+
_, env = action_env
|
68
|
+
[klass.new(env), tempfile]
|
69
|
+
end
|
70
|
+
|
58
71
|
# Returns a blank app (callable) and action environment with the
|
59
72
|
# given vagrant environment. This allows for testing of middlewares.
|
60
73
|
def action_env(v_env = nil)
|
data/lib/vagrant/version.rb
CHANGED
data/lib/vagrant/vm.rb
CHANGED
@@ -115,11 +115,11 @@ module Vagrant
|
|
115
115
|
env.actions.run(:up, options)
|
116
116
|
end
|
117
117
|
|
118
|
-
def start
|
118
|
+
def start(options=nil)
|
119
119
|
return if @vm.running?
|
120
120
|
return resume if @vm.saved?
|
121
121
|
|
122
|
-
env.actions.run(:start)
|
122
|
+
env.actions.run(:start, options)
|
123
123
|
end
|
124
124
|
|
125
125
|
def halt(options=nil)
|
@@ -1,13 +1,51 @@
|
|
1
1
|
Vagrant::Config.run do |config|
|
2
|
-
# All Vagrant configuration is done here.
|
3
|
-
#
|
4
|
-
# online.
|
2
|
+
# All Vagrant configuration is done here. The most common configuration
|
3
|
+
# options are documented and commented below. For a complete reference,
|
4
|
+
# please see the online documentation at vagrantup.com.
|
5
5
|
|
6
6
|
# Every Vagrant virtual environment requires a box to build off of.
|
7
7
|
config.vm.box = "<%= box_name %>"
|
8
|
-
<% if !box_url.nil? %>
|
9
8
|
|
10
9
|
# The url from where the 'config.vm.box' box will be fetched if it
|
11
|
-
# doesn't already exist on the user's system
|
12
|
-
config.vm.box_url = "<%= box_url
|
10
|
+
# doesn't already exist on the user's system.
|
11
|
+
<% if box_url.nil? %># <% end %>config.vm.box_url = "<%= box_url || "http://domain.com/path/to/above.box" %>"
|
12
|
+
|
13
|
+
# Boot with a GUI so you can see the screen. (Default is headless)
|
14
|
+
# config.vm.boot_mode = :gui
|
15
|
+
|
16
|
+
# Assign this VM to a host only network IP, allowing you to access it
|
17
|
+
# via the IP.
|
18
|
+
# config.vm.network "33.33.33.10"
|
19
|
+
|
20
|
+
# Forward a port from the guest to the host, which allows for outside
|
21
|
+
# computers to access the VM, whereas host only networking does not.
|
22
|
+
# config.vm.forward_port "http", 80, 8080
|
23
|
+
|
24
|
+
# Share an additional folder to the guest VM. The first argument is
|
25
|
+
# an identifier, the second is the path on the guest to mount the
|
26
|
+
# folder, and the third is the path on the host to the actual folder.
|
27
|
+
# config.vm.share_folder "v-data", "/vagrant_data", "../data")
|
28
|
+
|
29
|
+
# Enable provisioning with chef solo, specifying a cookbooks path (relative
|
30
|
+
# to this Vagrantfile), and adding some recipes and/or roles.
|
31
|
+
#
|
32
|
+
# config.vm.provisioner = :chef_solo
|
33
|
+
# config.chef.cookbooks_path = "cookbooks"
|
34
|
+
# config.chef.add_recipe "mysql"
|
35
|
+
# config.chef.add_role "web"
|
36
|
+
#
|
37
|
+
# You may also specify custom JSON attributes:
|
38
|
+
# config.chef.json = { :mysql_password => "foo" }
|
39
|
+
|
40
|
+
# Enable provisioning with chef server, specifying the chef server URL,
|
41
|
+
# and the path to the validation key (relative to this Vagrantfile).
|
42
|
+
#
|
43
|
+
# config.vm.provisioner = :chef_server
|
44
|
+
# config.chef.chef_server_url = "http://api.opscode.com/organizations/organization"
|
45
|
+
# config.chef.validation_key_path = "kiip-validator.pem"
|
46
|
+
#
|
47
|
+
# If you're using the OpsCode platform, you'll have to set this as well.
|
48
|
+
# If you're using your own chef server, you may have to set it, but it depends
|
49
|
+
# on how your Chef server is configured.
|
50
|
+
# config.chef.validation_client_name = "organization-validator"
|
13
51
|
end
|
data/templates/locales/en.yml
CHANGED
@@ -43,6 +43,7 @@ en:
|
|
43
43
|
permissions on the following file to 0600 and then try running this command again:
|
44
44
|
|
45
45
|
%{key_path}
|
46
|
+
ssh_unavailable: "`ssh` binary could not be found. Is an SSH client installed?"
|
46
47
|
ssh_unavailable_windows: |-
|
47
48
|
`vagrant ssh` isn't available on the Windows platform. The
|
48
49
|
vagrant.ppk file for use with Putty is available at:
|
@@ -88,8 +89,9 @@ en:
|
|
88
89
|
Vagrant could not detect VirtualBox! Make sure VirtualBox is properly installed.
|
89
90
|
If VirtualBox is installed, it may be an incorrect version. Vagrant currently
|
90
91
|
requires VirtualBox 3.2.x. Please install the proper version to continue.
|
91
|
-
vm_creation_required: VM must be created before running this command. Run `vagrant up` first.
|
92
|
-
vm_not_found: A VM by the name of %{name} was not found.
|
92
|
+
vm_creation_required: "VM must be created before running this command. Run `vagrant up` first."
|
93
|
+
vm_not_found: "A VM by the name of %{name} was not found."
|
94
|
+
vm_not_running: "VM must be running to open SSH connection."
|
93
95
|
|
94
96
|
#-------------------------------------------------------------------------------
|
95
97
|
# Translations for config validation errors
|
@@ -97,6 +99,11 @@ en:
|
|
97
99
|
config:
|
98
100
|
common:
|
99
101
|
error_empty: `%{field}` must be filled in.
|
102
|
+
chef:
|
103
|
+
run_list_empty: "Run list must not be empty."
|
104
|
+
cookbooks_path_empty: "Must specify a cookbooks path for chef solo."
|
105
|
+
server_url_empty: "Chef server URL must be populated."
|
106
|
+
validation_key_path: "Validation key path must be valid path to your chef server validation key."
|
100
107
|
ssh:
|
101
108
|
private_key_missing: "`private_key_path` file must exist: %{path}"
|
102
109
|
vm:
|
data/test/test_helper.rb
CHANGED
@@ -22,23 +22,5 @@ I18n.load_path << File.expand_path("../locales/en.yml", __FILE__)
|
|
22
22
|
|
23
23
|
class Test::Unit::TestCase
|
24
24
|
include Vagrant::TestHelpers
|
25
|
-
|
26
|
-
# Sets up the mocks for a VM
|
27
|
-
def mock_vm(env=nil)
|
28
|
-
env ||= vagrant_env
|
29
|
-
vm = Vagrant::VM.new
|
30
|
-
vm.stubs(:env).returns(env)
|
31
|
-
vm.stubs(:ssh).returns(Vagrant::SSH.new(vm.env))
|
32
|
-
vm
|
33
|
-
end
|
34
|
-
|
35
|
-
# Sets up the mocks and stubs for a downloader
|
36
|
-
def mock_downloader(downloader_klass)
|
37
|
-
tempfile = mock("tempfile")
|
38
|
-
tempfile.stubs(:write)
|
39
|
-
|
40
|
-
_, env = action_env
|
41
|
-
[downloader_klass.new(env), tempfile]
|
42
|
-
end
|
43
25
|
end
|
44
26
|
|
@@ -26,6 +26,13 @@ class UnpackageBoxActionTest < Test::Unit::TestCase
|
|
26
26
|
FileUtils.stubs(:rm_rf)
|
27
27
|
end
|
28
28
|
|
29
|
+
should "do nothing if box directory is not set" do
|
30
|
+
@instance.stubs(:box_directory).returns(nil)
|
31
|
+
File.expects(:directory?).never
|
32
|
+
FileUtils.expects(:rm_rf).never
|
33
|
+
@instance.recover(nil)
|
34
|
+
end
|
35
|
+
|
29
36
|
should "do nothing if not a directory" do
|
30
37
|
FileUtils.expects(:rm_rf).never
|
31
38
|
@instance.recover(nil)
|
@@ -47,7 +47,6 @@ class CheckBoxVMActionTest < Test::Unit::TestCase
|
|
47
47
|
seq = sequence("seq")
|
48
48
|
env.env.boxes.expects(:find).returns(nil)
|
49
49
|
Vagrant::Box.expects(:add).with(env.env, env["config"].vm.box, env["config"].vm.box_url).in_sequence(seq)
|
50
|
-
env.env.expects(:load_box!).in_sequence(seq)
|
51
50
|
app.expects(:call).with(env).once.in_sequence(seq)
|
52
51
|
|
53
52
|
assert_nothing_raised {
|
@@ -68,10 +68,20 @@ class NFSVMActionTest < Test::Unit::TestCase
|
|
68
68
|
end
|
69
69
|
|
70
70
|
context "recovery" do
|
71
|
+
setup do
|
72
|
+
@vm.stubs(:created?).returns(true)
|
73
|
+
end
|
74
|
+
|
71
75
|
should "clear NFS exports" do
|
72
76
|
@instance.expects(:clear_nfs_exports).with(@env).once
|
73
77
|
@instance.recover(@env)
|
74
78
|
end
|
79
|
+
|
80
|
+
should "do nothing if VM is not created" do
|
81
|
+
@vm.stubs(:created?).returns(false)
|
82
|
+
@instance.expects(:clear_nfs_exports).never
|
83
|
+
@instance.recover(@env)
|
84
|
+
end
|
75
85
|
end
|
76
86
|
|
77
87
|
context "extracting folders" do
|
@@ -31,6 +31,12 @@ class ProvisionVMActionTest < Test::Unit::TestCase
|
|
31
31
|
@klass.any_instance.expects(:load_provisioner).never
|
32
32
|
@klass.new(@app, @env)
|
33
33
|
end
|
34
|
+
|
35
|
+
should "not load provisioner if disabled through env hash" do
|
36
|
+
@env["provision.enabled"] = false
|
37
|
+
@klass.any_instance.expects(:load_provisioner).never
|
38
|
+
@klass.new(@app, @env)
|
39
|
+
end
|
34
40
|
end
|
35
41
|
|
36
42
|
context "with an instance" do
|
@@ -122,6 +128,14 @@ class ProvisionVMActionTest < Test::Unit::TestCase
|
|
122
128
|
|
123
129
|
@instance.call(@env)
|
124
130
|
end
|
131
|
+
|
132
|
+
should "continue chain and not provision if not enabled through env hash" do
|
133
|
+
@env["provision.enabled"] = false
|
134
|
+
@prov.expects(:provision!).never
|
135
|
+
@app.expects(:call).with(@env).once
|
136
|
+
|
137
|
+
@instance.call(@env)
|
138
|
+
end
|
125
139
|
end
|
126
140
|
end
|
127
141
|
end
|
@@ -70,6 +70,20 @@ class ActionWardenTest < Test::Unit::TestCase
|
|
70
70
|
assert_raises(RuntimeError) { @instance.call(new_env) }
|
71
71
|
end
|
72
72
|
|
73
|
+
should "not begin recovery sequence if a SystemExit is raised" do
|
74
|
+
class Foo
|
75
|
+
def initialize(*args); end
|
76
|
+
def call(env)
|
77
|
+
# Raises a system exit
|
78
|
+
abort
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
@instance.actions << Foo.new
|
83
|
+
@instance.expects(:begin_rescue).never
|
84
|
+
assert_raises(SystemExit) { @instance.call(new_env) }
|
85
|
+
end
|
86
|
+
|
73
87
|
should "raise interrupt if the environment is interupted" do
|
74
88
|
env = new_env
|
75
89
|
env.expects(:interrupted?).returns(true)
|
data/test/vagrant/box_test.rb
CHANGED
@@ -27,6 +27,14 @@ class BoxTest < Test::Unit::TestCase
|
|
27
27
|
@box = Vagrant::Box.new(vagrant_env, "foo")
|
28
28
|
end
|
29
29
|
|
30
|
+
should "raise an exception if a box exists with the name we're attempting to add" do
|
31
|
+
vagrant_box(@box.name)
|
32
|
+
|
33
|
+
assert_raises(Vagrant::Errors::BoxAlreadyExists) {
|
34
|
+
@box.add
|
35
|
+
}
|
36
|
+
end
|
37
|
+
|
30
38
|
should "execute the Add action when add is called" do
|
31
39
|
@box.env.actions.expects(:run).with(:box_add, { "box" => @box })
|
32
40
|
@box.add
|
@@ -47,6 +47,12 @@ class ConfigBaseTest < Test::Unit::TestCase
|
|
47
47
|
hash = @base.instance_variables_hash
|
48
48
|
assert !hash.has_key?(:env)
|
49
49
|
end
|
50
|
+
|
51
|
+
should "not include top in the JSON hash" do
|
52
|
+
@base.top = "FOO"
|
53
|
+
hash = @base.instance_variables_hash
|
54
|
+
assert !hash.has_key?(:top)
|
55
|
+
end
|
50
56
|
end
|
51
57
|
end
|
52
58
|
end
|
@@ -6,6 +6,38 @@ class ConfigVagrantTest < Test::Unit::TestCase
|
|
6
6
|
end
|
7
7
|
|
8
8
|
context "validation" do
|
9
|
-
|
9
|
+
setup do
|
10
|
+
@config.dotfile_name = "foo"
|
11
|
+
@config.home = "foo"
|
12
|
+
@config.host = "foo"
|
13
|
+
|
14
|
+
@errors = Vagrant::Config::ErrorRecorder.new
|
15
|
+
end
|
16
|
+
|
17
|
+
should "be valid with given set of values" do
|
18
|
+
@config.validate(@errors)
|
19
|
+
assert @errors.errors.empty?
|
20
|
+
end
|
21
|
+
|
22
|
+
should "be invalid with no dotfile" do
|
23
|
+
@config.dotfile_name = nil
|
24
|
+
|
25
|
+
@config.validate(@errors)
|
26
|
+
assert !@errors.errors.empty?
|
27
|
+
end
|
28
|
+
|
29
|
+
should "be invalid with no home" do
|
30
|
+
@config.home = nil
|
31
|
+
|
32
|
+
@config.validate(@errors)
|
33
|
+
assert !@errors.errors.empty?
|
34
|
+
end
|
35
|
+
|
36
|
+
should "be invalid with no host" do
|
37
|
+
@config.host = nil
|
38
|
+
|
39
|
+
@config.validate(@errors)
|
40
|
+
assert !@errors.errors.empty?
|
41
|
+
end
|
10
42
|
end
|
11
43
|
end
|
data/test/vagrant/config_test.rb
CHANGED
@@ -167,6 +167,10 @@ class ConfigTest < Test::Unit::TestCase
|
|
167
167
|
klass = mock("klass#{i}")
|
168
168
|
instance = mock("instance#{i}")
|
169
169
|
instance.expects(:env=).with(env)
|
170
|
+
instance.expects(:top=).with() do |top|
|
171
|
+
assert top.is_a?(@klass::Top)
|
172
|
+
true
|
173
|
+
end
|
170
174
|
klass.expects(:new).returns(instance)
|
171
175
|
@configures_list[key] = klass
|
172
176
|
end
|
@@ -179,6 +183,7 @@ class ConfigTest < Test::Unit::TestCase
|
|
179
183
|
klass = mock("klass")
|
180
184
|
instance = mock("instance")
|
181
185
|
instance.stubs(:env=)
|
186
|
+
instance.stubs(:top=)
|
182
187
|
klass.expects(:new).returns(instance)
|
183
188
|
@klass::Top.configures(key, klass)
|
184
189
|
|
@@ -2,7 +2,7 @@ require "test_helper"
|
|
2
2
|
|
3
3
|
class HttpDownloaderTest < Test::Unit::TestCase
|
4
4
|
setup do
|
5
|
-
@downloader, @tempfile =
|
5
|
+
@downloader, @tempfile = vagrant_mock_downloader(Vagrant::Downloaders::HTTP)
|
6
6
|
@downloader.stubs(:report_progress)
|
7
7
|
@downloader.stubs(:complete_progress)
|
8
8
|
@uri = "http://google.com/"
|
@@ -2,8 +2,7 @@ require "test_helper"
|
|
2
2
|
|
3
3
|
class ChefServerProvisionerTest < Test::Unit::TestCase
|
4
4
|
setup do
|
5
|
-
@action_env = Vagrant::Action::Environment.new(vagrant_env)
|
6
|
-
@action_env.env.vm = mock_vm
|
5
|
+
@action_env = Vagrant::Action::Environment.new(vagrant_env.vms[:default].env)
|
7
6
|
|
8
7
|
@action = Vagrant::Provisioners::ChefServer.new(@action_env)
|
9
8
|
@env = @action.env
|
@@ -2,8 +2,7 @@ require "test_helper"
|
|
2
2
|
|
3
3
|
class ChefSoloProvisionerTest < Test::Unit::TestCase
|
4
4
|
setup do
|
5
|
-
@action_env = Vagrant::Action::Environment.new(vagrant_env)
|
6
|
-
@action_env.env.vm = mock_vm
|
5
|
+
@action_env = Vagrant::Action::Environment.new(vagrant_env.vms[:default].env)
|
7
6
|
|
8
7
|
@action = Vagrant::Provisioners::ChefSolo.new(@action_env)
|
9
8
|
@env = @action.env
|
@@ -2,8 +2,7 @@ require "test_helper"
|
|
2
2
|
|
3
3
|
class ChefProvisionerTest < Test::Unit::TestCase
|
4
4
|
setup do
|
5
|
-
@action_env = Vagrant::Action::Environment.new(vagrant_env)
|
6
|
-
@action_env.env.vm = mock_vm
|
5
|
+
@action_env = Vagrant::Action::Environment.new(vagrant_env.vms[:default].env)
|
7
6
|
|
8
7
|
@action = Vagrant::Provisioners::Chef.new(@action_env)
|
9
8
|
@env = @action.env
|
@@ -21,7 +20,6 @@ class ChefProvisionerTest < Test::Unit::TestCase
|
|
21
20
|
context "config" do
|
22
21
|
setup do
|
23
22
|
@config = Vagrant::Provisioners::Chef::ChefConfig.new
|
24
|
-
@config.run_list.clear
|
25
23
|
end
|
26
24
|
|
27
25
|
should "not include the 'json' key in the config dump" do
|
@@ -44,6 +42,10 @@ class ChefProvisionerTest < Test::Unit::TestCase
|
|
44
42
|
}
|
45
43
|
end
|
46
44
|
|
45
|
+
should "have an empty run list to begin with" do
|
46
|
+
assert @config.run_list.empty?
|
47
|
+
end
|
48
|
+
|
47
49
|
should "add a recipe to the run list" do
|
48
50
|
@config.add_recipe("foo")
|
49
51
|
assert_equal "recipe[foo]", @config.run_list[0]
|
@@ -63,6 +65,74 @@ class ChefProvisionerTest < Test::Unit::TestCase
|
|
63
65
|
@config.add_role("role[user]")
|
64
66
|
assert_equal "role[user]", @config.run_list[0]
|
65
67
|
end
|
68
|
+
|
69
|
+
context "validation" do
|
70
|
+
setup do
|
71
|
+
@errors = Vagrant::Config::ErrorRecorder.new
|
72
|
+
@top = @config.top = Vagrant::Config::Top.new(@env)
|
73
|
+
end
|
74
|
+
|
75
|
+
context "chef solo" do
|
76
|
+
setup do
|
77
|
+
@top.vm.provisioner = :chef_solo
|
78
|
+
|
79
|
+
@config.run_list = ["foo"]
|
80
|
+
@config.cookbooks_path = "cookbooks"
|
81
|
+
end
|
82
|
+
|
83
|
+
should "be valid if provisioner is not chef solo" do
|
84
|
+
@top.vm.provisioner = nil
|
85
|
+
@config.validate(@errors)
|
86
|
+
assert @errors.errors.empty?
|
87
|
+
end
|
88
|
+
|
89
|
+
should "be invalid if run list is empty" do
|
90
|
+
@config.run_list = []
|
91
|
+
@config.validate(@errors)
|
92
|
+
assert !@errors.errors.empty?
|
93
|
+
end
|
94
|
+
|
95
|
+
should "be invalid if cookbooks path is empty" do
|
96
|
+
@config.cookbooks_path = nil
|
97
|
+
@config.validate(@errors)
|
98
|
+
assert !@errors.errors.empty?
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
102
|
+
context "chef server" do
|
103
|
+
setup do
|
104
|
+
@top.vm.provisioner = :chef_server
|
105
|
+
|
106
|
+
@config.run_list = ["foo"]
|
107
|
+
@config.chef_server_url = "foo"
|
108
|
+
@config.validation_key_path = "foo"
|
109
|
+
end
|
110
|
+
|
111
|
+
should "be valid if provisioner is not chef solo" do
|
112
|
+
@top.vm.provisioner = nil
|
113
|
+
@config.validate(@errors)
|
114
|
+
assert @errors.errors.empty?
|
115
|
+
end
|
116
|
+
|
117
|
+
should "be invalid if run list is empty" do
|
118
|
+
@config.run_list = []
|
119
|
+
@config.validate(@errors)
|
120
|
+
assert !@errors.errors.empty?
|
121
|
+
end
|
122
|
+
|
123
|
+
should "be invalid if run list is empty" do
|
124
|
+
@config.chef_server_url = nil
|
125
|
+
@config.validate(@errors)
|
126
|
+
assert !@errors.errors.empty?
|
127
|
+
end
|
128
|
+
|
129
|
+
should "be invalid if run list is empty" do
|
130
|
+
@config.validation_key_path = nil
|
131
|
+
@config.validate(@errors)
|
132
|
+
assert !@errors.errors.empty?
|
133
|
+
end
|
134
|
+
end
|
135
|
+
end
|
66
136
|
end
|
67
137
|
|
68
138
|
context "verifying binary" do
|
@@ -77,6 +147,7 @@ class ChefProvisionerTest < Test::Unit::TestCase
|
|
77
147
|
@action.verify_binary(binary)
|
78
148
|
end
|
79
149
|
end
|
150
|
+
|
80
151
|
context "permissions on provisioning folder" do
|
81
152
|
should "create and chown the folder to the ssh user" do
|
82
153
|
ssh_seq = sequence("ssh_seq")
|
data/test/vagrant/ssh_test.rb
CHANGED
@@ -2,12 +2,10 @@ require "test_helper"
|
|
2
2
|
|
3
3
|
class SshTest < Test::Unit::TestCase
|
4
4
|
def mock_ssh
|
5
|
-
@env = vagrant_env
|
5
|
+
@env = vagrant_env.vms[:default].env
|
6
6
|
@network_adapters = []
|
7
7
|
@vm = mock("vm")
|
8
8
|
@vm.stubs(:network_adapters).returns(@network_adapters)
|
9
|
-
|
10
|
-
@env.stubs(:vm).returns(mock_vm(@env))
|
11
9
|
@env.vm.stubs(:vm).returns(@vm)
|
12
10
|
|
13
11
|
@ssh = Vagrant::SSH.new(@env)
|
@@ -22,10 +20,23 @@ class SshTest < Test::Unit::TestCase
|
|
22
20
|
mock_ssh
|
23
21
|
@ssh.stubs(:check_key_permissions)
|
24
22
|
Kernel.stubs(:exec)
|
23
|
+
Kernel.stubs(:system).returns(true)
|
25
24
|
|
26
25
|
Vagrant::Util::Platform.stubs(:leopard?).returns(false)
|
27
26
|
end
|
28
27
|
|
28
|
+
should "raise an exception if SSH is not found" do
|
29
|
+
Kernel.stubs(:system).returns(false)
|
30
|
+
Kernel.expects(:system).returns(false).with() do |command|
|
31
|
+
assert command =~ /^which ssh/
|
32
|
+
true
|
33
|
+
end
|
34
|
+
|
35
|
+
assert_raises(Vagrant::Errors::SSHUnavailable) {
|
36
|
+
@ssh.connect
|
37
|
+
}
|
38
|
+
end
|
39
|
+
|
29
40
|
should "check key permissions prior to exec" do
|
30
41
|
exec_seq = sequence("exec_seq")
|
31
42
|
@ssh.expects(:check_key_permissions).with(@env.config.ssh.private_key_path).once.in_sequence(exec_seq)
|
data/test/vagrant/vm_test.rb
CHANGED
@@ -3,8 +3,6 @@ require "test_helper"
|
|
3
3
|
class VMTest < Test::Unit::TestCase
|
4
4
|
setup do
|
5
5
|
@env = vagrant_env
|
6
|
-
|
7
|
-
Net::SSH.stubs(:start)
|
8
6
|
end
|
9
7
|
|
10
8
|
context "finding a VM" do
|
@@ -177,6 +175,11 @@ class VMTest < Test::Unit::TestCase
|
|
177
175
|
@vm.env.actions.expects(:run).with(:up, nil).once
|
178
176
|
@vm.up
|
179
177
|
end
|
178
|
+
|
179
|
+
should "forward options to the action sequence" do
|
180
|
+
@vm.env.actions.expects(:run).with(:up, :foo => :bar).once
|
181
|
+
@vm.up(:foo => :bar)
|
182
|
+
end
|
180
183
|
end
|
181
184
|
|
182
185
|
context "halting" do
|
@@ -236,14 +239,19 @@ class VMTest < Test::Unit::TestCase
|
|
236
239
|
should "execute the resume action if saved" do
|
237
240
|
@mock_vm.expects(:saved?).returns(true)
|
238
241
|
@vm.expects(:resume).once
|
239
|
-
@vm.env.actions.expects(:run).with(:start).never
|
242
|
+
@vm.env.actions.expects(:run).with(:start, nil).never
|
240
243
|
@vm.start
|
241
244
|
end
|
242
245
|
|
243
246
|
should "execute the start action" do
|
244
|
-
@vm.env.actions.expects(:run).with(:start).once
|
247
|
+
@vm.env.actions.expects(:run).with(:start, nil).once
|
245
248
|
@vm.start
|
246
249
|
end
|
250
|
+
|
251
|
+
should "forward options to the action sequence" do
|
252
|
+
@vm.env.actions.expects(:run).with(:start, :foo => :bar).once
|
253
|
+
@vm.start(:foo => :bar)
|
254
|
+
end
|
247
255
|
end
|
248
256
|
end
|
249
257
|
end
|
metadata
CHANGED
@@ -1,13 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash: 1
|
5
4
|
prerelease: false
|
6
5
|
segments:
|
7
6
|
- 0
|
8
7
|
- 6
|
9
|
-
-
|
10
|
-
version: 0.6.
|
8
|
+
- 4
|
9
|
+
version: 0.6.4
|
11
10
|
platform: ruby
|
12
11
|
authors:
|
13
12
|
- Mitchell Hashimoto
|
@@ -16,218 +15,205 @@ autorequire:
|
|
16
15
|
bindir: bin
|
17
16
|
cert_chain: []
|
18
17
|
|
19
|
-
date: 2010-
|
18
|
+
date: 2010-10-04 00:00:00 -07:00
|
20
19
|
default_executable:
|
21
20
|
dependencies:
|
22
21
|
- !ruby/object:Gem::Dependency
|
23
|
-
|
22
|
+
name: archive-tar-minitar
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
24
|
none: false
|
25
25
|
requirements:
|
26
26
|
- - "="
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
hash: 15
|
29
28
|
segments:
|
30
29
|
- 0
|
31
30
|
- 5
|
32
31
|
- 2
|
33
32
|
version: 0.5.2
|
34
|
-
requirement: *id001
|
35
33
|
type: :runtime
|
36
|
-
name: archive-tar-minitar
|
37
34
|
prerelease: false
|
35
|
+
version_requirements: *id001
|
38
36
|
- !ruby/object:Gem::Dependency
|
39
|
-
|
37
|
+
name: erubis
|
38
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
40
39
|
none: false
|
41
40
|
requirements:
|
42
41
|
- - ~>
|
43
42
|
- !ruby/object:Gem::Version
|
44
|
-
hash: 27
|
45
43
|
segments:
|
46
44
|
- 2
|
47
45
|
- 6
|
48
46
|
- 6
|
49
47
|
version: 2.6.6
|
50
|
-
requirement: *id002
|
51
48
|
type: :runtime
|
52
|
-
name: erubis
|
53
49
|
prerelease: false
|
50
|
+
version_requirements: *id002
|
54
51
|
- !ruby/object:Gem::Dependency
|
55
|
-
|
52
|
+
name: json
|
53
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
56
54
|
none: false
|
57
55
|
requirements:
|
58
56
|
- - ~>
|
59
57
|
- !ruby/object:Gem::Version
|
60
|
-
hash: 11
|
61
58
|
segments:
|
62
59
|
- 1
|
63
60
|
- 4
|
64
61
|
- 6
|
65
62
|
version: 1.4.6
|
66
|
-
requirement: *id003
|
67
63
|
type: :runtime
|
68
|
-
name: json
|
69
64
|
prerelease: false
|
65
|
+
version_requirements: *id003
|
70
66
|
- !ruby/object:Gem::Dependency
|
71
|
-
|
67
|
+
name: mario
|
68
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
72
69
|
none: false
|
73
70
|
requirements:
|
74
71
|
- - ~>
|
75
72
|
- !ruby/object:Gem::Version
|
76
|
-
hash: 19
|
77
73
|
segments:
|
78
74
|
- 0
|
79
75
|
- 0
|
80
76
|
- 6
|
81
77
|
version: 0.0.6
|
82
|
-
requirement: *id004
|
83
78
|
type: :runtime
|
84
|
-
name: mario
|
85
79
|
prerelease: false
|
80
|
+
version_requirements: *id004
|
86
81
|
- !ruby/object:Gem::Dependency
|
87
|
-
|
82
|
+
name: net-ssh
|
83
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
88
84
|
none: false
|
89
85
|
requirements:
|
90
86
|
- - ~>
|
91
87
|
- !ruby/object:Gem::Version
|
92
|
-
hash: 33
|
93
88
|
segments:
|
94
89
|
- 2
|
95
90
|
- 0
|
96
91
|
- 23
|
97
92
|
version: 2.0.23
|
98
|
-
requirement: *id005
|
99
93
|
type: :runtime
|
100
|
-
name: net-ssh
|
101
94
|
prerelease: false
|
95
|
+
version_requirements: *id005
|
102
96
|
- !ruby/object:Gem::Dependency
|
103
|
-
|
97
|
+
name: net-scp
|
98
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
104
99
|
none: false
|
105
100
|
requirements:
|
106
101
|
- - ~>
|
107
102
|
- !ruby/object:Gem::Version
|
108
|
-
hash: 17
|
109
103
|
segments:
|
110
104
|
- 1
|
111
105
|
- 0
|
112
106
|
- 3
|
113
107
|
version: 1.0.3
|
114
|
-
requirement: *id006
|
115
108
|
type: :runtime
|
116
|
-
name: net-scp
|
117
109
|
prerelease: false
|
110
|
+
version_requirements: *id006
|
118
111
|
- !ruby/object:Gem::Dependency
|
119
|
-
|
112
|
+
name: i18n
|
113
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
120
114
|
none: false
|
121
115
|
requirements:
|
122
116
|
- - ~>
|
123
117
|
- !ruby/object:Gem::Version
|
124
|
-
hash: 13
|
125
118
|
segments:
|
126
119
|
- 0
|
127
120
|
- 4
|
128
121
|
- 1
|
129
122
|
version: 0.4.1
|
130
|
-
requirement: *id007
|
131
123
|
type: :runtime
|
132
|
-
name: i18n
|
133
124
|
prerelease: false
|
125
|
+
version_requirements: *id007
|
134
126
|
- !ruby/object:Gem::Dependency
|
135
|
-
|
127
|
+
name: thor
|
128
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
136
129
|
none: false
|
137
130
|
requirements:
|
138
131
|
- - ~>
|
139
132
|
- !ruby/object:Gem::Version
|
140
|
-
hash: 35
|
141
133
|
segments:
|
142
134
|
- 0
|
143
135
|
- 14
|
144
136
|
- 2
|
145
137
|
version: 0.14.2
|
146
|
-
requirement: *id008
|
147
138
|
type: :runtime
|
148
|
-
name: thor
|
149
139
|
prerelease: false
|
140
|
+
version_requirements: *id008
|
150
141
|
- !ruby/object:Gem::Dependency
|
151
|
-
|
142
|
+
name: virtualbox
|
143
|
+
requirement: &id009 !ruby/object:Gem::Requirement
|
152
144
|
none: false
|
153
145
|
requirements:
|
154
146
|
- - ~>
|
155
147
|
- !ruby/object:Gem::Version
|
156
|
-
hash: 5
|
157
148
|
segments:
|
158
149
|
- 0
|
159
150
|
- 7
|
160
151
|
- 3
|
161
152
|
version: 0.7.3
|
162
|
-
requirement: *id009
|
163
153
|
type: :runtime
|
164
|
-
name: virtualbox
|
165
154
|
prerelease: false
|
155
|
+
version_requirements: *id009
|
166
156
|
- !ruby/object:Gem::Dependency
|
167
|
-
|
157
|
+
name: rake
|
158
|
+
requirement: &id010 !ruby/object:Gem::Requirement
|
168
159
|
none: false
|
169
160
|
requirements:
|
170
161
|
- - ">="
|
171
162
|
- !ruby/object:Gem::Version
|
172
|
-
hash: 3
|
173
163
|
segments:
|
174
164
|
- 0
|
175
165
|
version: "0"
|
176
|
-
requirement: *id010
|
177
166
|
type: :development
|
178
|
-
name: rake
|
179
167
|
prerelease: false
|
168
|
+
version_requirements: *id010
|
180
169
|
- !ruby/object:Gem::Dependency
|
181
|
-
|
170
|
+
name: contest
|
171
|
+
requirement: &id011 !ruby/object:Gem::Requirement
|
182
172
|
none: false
|
183
173
|
requirements:
|
184
174
|
- - ">="
|
185
175
|
- !ruby/object:Gem::Version
|
186
|
-
hash: 31
|
187
176
|
segments:
|
188
177
|
- 0
|
189
178
|
- 1
|
190
179
|
- 2
|
191
180
|
version: 0.1.2
|
192
|
-
requirement: *id011
|
193
181
|
type: :development
|
194
|
-
name: contest
|
195
182
|
prerelease: false
|
183
|
+
version_requirements: *id011
|
196
184
|
- !ruby/object:Gem::Dependency
|
197
|
-
|
185
|
+
name: mocha
|
186
|
+
requirement: &id012 !ruby/object:Gem::Requirement
|
198
187
|
none: false
|
199
188
|
requirements:
|
200
189
|
- - ">="
|
201
190
|
- !ruby/object:Gem::Version
|
202
|
-
hash: 3
|
203
191
|
segments:
|
204
192
|
- 0
|
205
193
|
version: "0"
|
206
|
-
requirement: *id012
|
207
194
|
type: :development
|
208
|
-
name: mocha
|
209
195
|
prerelease: false
|
196
|
+
version_requirements: *id012
|
210
197
|
- !ruby/object:Gem::Dependency
|
211
|
-
|
198
|
+
name: ruby-debug
|
199
|
+
requirement: &id013 !ruby/object:Gem::Requirement
|
212
200
|
none: false
|
213
201
|
requirements:
|
214
202
|
- - ">="
|
215
203
|
- !ruby/object:Gem::Version
|
216
|
-
hash: 3
|
217
204
|
segments:
|
218
205
|
- 0
|
219
206
|
version: "0"
|
220
|
-
requirement: *id013
|
221
207
|
type: :development
|
222
|
-
name: ruby-debug
|
223
208
|
prerelease: false
|
209
|
+
version_requirements: *id013
|
224
210
|
- !ruby/object:Gem::Dependency
|
225
|
-
|
211
|
+
name: bundler
|
212
|
+
requirement: &id014 !ruby/object:Gem::Requirement
|
226
213
|
none: false
|
227
214
|
requirements:
|
228
215
|
- - ">="
|
229
216
|
- !ruby/object:Gem::Version
|
230
|
-
hash: 15424057
|
231
217
|
segments:
|
232
218
|
- 1
|
233
219
|
- 0
|
@@ -235,10 +221,9 @@ dependencies:
|
|
235
221
|
- rc
|
236
222
|
- 6
|
237
223
|
version: 1.0.0.rc.6
|
238
|
-
requirement: *id014
|
239
224
|
type: :development
|
240
|
-
name: bundler
|
241
225
|
prerelease: false
|
226
|
+
version_requirements: *id014
|
242
227
|
description: Vagrant is a tool for building and distributing virtualized development environments.
|
243
228
|
email:
|
244
229
|
- mitchell.hashimoto@gmail.com
|
@@ -366,7 +351,6 @@ files:
|
|
366
351
|
- lib/vagrant/util/template_renderer.rb
|
367
352
|
- lib/vagrant/version.rb
|
368
353
|
- lib/vagrant/vm.rb
|
369
|
-
- templates/Vagrantfile.erb
|
370
354
|
- templates/chef_server_client.erb
|
371
355
|
- templates/chef_solo_solo.erb
|
372
356
|
- templates/commands/init/Vagrantfile.erb
|
@@ -471,7 +455,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
471
455
|
requirements:
|
472
456
|
- - ">="
|
473
457
|
- !ruby/object:Gem::Version
|
474
|
-
hash:
|
458
|
+
hash: -4185578386053162887
|
475
459
|
segments:
|
476
460
|
- 0
|
477
461
|
version: "0"
|
@@ -480,7 +464,6 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
480
464
|
requirements:
|
481
465
|
- - ">="
|
482
466
|
- !ruby/object:Gem::Version
|
483
|
-
hash: 23
|
484
467
|
segments:
|
485
468
|
- 1
|
486
469
|
- 3
|
data/templates/Vagrantfile.erb
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
Vagrant::Config.run do |config|
|
2
|
-
# All Vagrant configuration is done here. For a detailed explanation
|
3
|
-
# and listing of configuration options, please view the documentation
|
4
|
-
# online.
|
5
|
-
|
6
|
-
# Every Vagrant virtual environment requires a box to build off of.
|
7
|
-
config.vm.box = "<%= default_box %>"
|
8
|
-
<% if !default_box_url.nil? -%>
|
9
|
-
|
10
|
-
# The url from where the 'config.vm.box' box will be fetched if it
|
11
|
-
# doesn't already exist on the user's system
|
12
|
-
config.vm.box_url = "<%= default_box_url %>"
|
13
|
-
<% end -%>
|
14
|
-
end
|