vagrantup 0.6.6 → 0.6.7

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: dd26596b445951778d89c3df2a9717fef063cdb4
4
- data.tar.gz: 69c01579f88b14201c8b394527e3ab39697dc6c5
3
+ metadata.gz: e5fd92e8354e17085af61026c73e342a918adf16
4
+ data.tar.gz: b37319c1a035013230a1e0b74ef9a89af1fdba53
5
5
  SHA512:
6
- metadata.gz: 1bea481a61138290f846ac8bbbe49dc2606db3ae0f98b7664da5ab98fda01bf4c8e43026e9762f616f9eed09883ef3bd5a7c5b0beaf8cec141b88030f7417353
7
- data.tar.gz: 04418842db9cc9fcd62f96fc53271862515ef035b59ad78caf6fb2476aef7340f6b6629427d7b92c7cd0e5c894415299fb5bb2ab06cddea3d82599947d41b29d
6
+ metadata.gz: c9b0e06ef8166ad3b5b883dc4b137d51f438505236f31e2616e4289e7a1af90cae66afec7893d0a8216893afaf62f2c9fa9526c4728d37548c91910a846126ff
7
+ data.tar.gz: 8c025092300ff69f38938d38981086e1dc27129db5a4cdfc16236dd85e46790a017184e74607be5f4bc1d3e62467f46318a941176db7bf46be6183e5ec794f66
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## 0.6.7 (November 3, 2010)
2
+
3
+ - Added validation to verify that a box is specified.
4
+ - Proper error message when box is not found for `config.vm.box`. [GH-195]
5
+ - Fix output of `vagrant status` with multi-vm to be correct. [GH-196]
6
+
1
7
  ## 0.6.6 (October 14, 2010)
2
8
 
3
9
  - `vagrant status NAME` works once again. [GH-191]
data/Gemfile.lock CHANGED
@@ -8,7 +8,7 @@ GIT
8
8
  PATH
9
9
  remote: .
10
10
  specs:
11
- vagrant (0.6.6)
11
+ vagrant (0.6.7)
12
12
  archive-tar-minitar (= 0.5.2)
13
13
  erubis (~> 2.6.6)
14
14
  i18n (~> 0.4.1)
@@ -16,7 +16,7 @@ module Vagrant
16
16
 
17
17
  def package_base
18
18
  vm = VM.find(options[:base], env)
19
- raise Errors::BaseVMNotFoundError.new(:name => options[:base]) if !vm.created?
19
+ raise Errors::BaseVMNotFound.new(:name => options[:base]) if !vm.created?
20
20
  package_vm(vm)
21
21
  end
22
22
 
@@ -6,7 +6,7 @@ module Vagrant
6
6
  def route
7
7
  state = nil
8
8
  results = target_vms.collect do |vm|
9
- state ||= vm.created? ? vm.vm.state.to_s : "not_created"
9
+ state = vm.created? ? vm.vm.state.to_s : "not_created"
10
10
  "#{vm.name.to_s.ljust(25)}#{state.gsub("_", " ")}"
11
11
  end
12
12
 
@@ -104,8 +104,10 @@ module Vagrant
104
104
  end
105
105
  end
106
106
 
107
+ errors.add(I18n.t("vagrant.config.vm.box_missing")) if !box
108
+ errors.add(I18n.t("vagrant.config.vm.box_not_found", :name => box)) if box && !box_url && !env.box
107
109
  errors.add(I18n.t("vagrant.config.vm.boot_mode_invalid")) if ![:vrdp, :gui].include?(boot_mode.to_sym)
108
- errors.add(I18n.t("vagrant.config.vm.base_mac_invalid")) if !base_mac
110
+ errors.add(I18n.t("vagrant.config.vm.base_mac_invalid")) if env.box && !base_mac
109
111
  end
110
112
  end
111
113
  end
@@ -25,11 +25,16 @@ module Vagrant
25
25
  def vagrantfile(*args)
26
26
  path = args.shift.join("Vagrantfile") if Pathname === args.first
27
27
  path ||= vagrant_app("Vagrantfile")
28
+
29
+ # Create this box so that it exists
30
+ vagrant_box("base")
31
+
28
32
  str = args.shift || ""
29
33
  File.open(path.to_s, "w") do |f|
30
34
  f.puts "Vagrant::Config.run do |config|"
31
35
  f.puts "config.vagrant.home = '#{home_path}'"
32
36
  f.puts "config.vm.base_mac = 'foo' if !config.vm.base_mac"
37
+ f.puts "config.vm.box = 'base'"
33
38
  f.puts str
34
39
  f.puts "end"
35
40
  end
@@ -2,5 +2,5 @@ module Vagrant
2
2
  # This will always be up to date with the current version of Vagrant,
3
3
  # since it is used to generate the gemspec and is also the source of
4
4
  # the version for `vagrant -v`
5
- VERSION = "0.6.6"
5
+ VERSION = "0.6.7"
6
6
  end
@@ -115,6 +115,8 @@ en:
115
115
  vm:
116
116
  base_mac_invalid: "Base MAC address for eth0/NAT must be set. Contact box maintainer for more information."
117
117
  boot_mode_invalid: "Boot mode must be one of: vrdp or gui"
118
+ box_missing: "A box must be specified."
119
+ box_not_found: "The box '%{name}' could not be found."
118
120
  shared_folder_hostpath_missing: "Shared folder host path for '%{name}' doesn't exist: %{path}"
119
121
 
120
122
  #-------------------------------------------------------------------------------
@@ -178,7 +180,9 @@ en:
178
180
  waiting: Waiting for VM to boot. This can take a few minutes.
179
181
  ready: VM booted and ready for use!
180
182
  failed: Failed to connect to VM!
181
- failed_to_boot: VM failed to boot.
183
+ failed_to_boot: |-
184
+ Failed to connect to VM via SSH. Please verify the VM successfully booted
185
+ by looking at the VirtualBox GUI.
182
186
  check_box:
183
187
  not_found: Box %{name} was not found. Fetching box from specified URL...
184
188
  not_specified: |-
@@ -13,18 +13,19 @@ class BoxCollectionTest < Test::Unit::TestCase
13
13
 
14
14
  result = @klass.new(vagrant_env)
15
15
  names = result.collect { |b| b.name }.sort
16
- assert_equal 2, result.length
17
- assert_equal ["bar", "foo"], names
16
+ assert result.length >= 2
17
+ assert names.include?("foo")
18
+ assert names.include?("bar")
18
19
  end
19
20
 
20
21
  should "reload the box list" do
21
22
  instance = @klass.new(vagrant_env)
22
- assert instance.empty?
23
+ amount = instance.length
23
24
 
24
25
  vagrant_box("foo")
25
26
 
26
27
  instance.reload!
27
- assert !instance.empty?
28
+ assert_equal (amount + 1), instance.length
28
29
  end
29
30
 
30
31
  should "find a specific box" do
@@ -0,0 +1,27 @@
1
+ require "test_helper"
2
+
3
+ class CommandPackageCommandTest < Test::Unit::TestCase
4
+ setup do
5
+ @klass = Vagrant::Command::PackageCommand
6
+ @env = vagrant_env
7
+ end
8
+
9
+ def command(args, opts, env)
10
+ @klass.new(args, opts, { :env => env })
11
+ end
12
+
13
+ context "initialization" do
14
+ should "require an environment" do
15
+ assert_raises(Vagrant::Errors::CLIMissingEnvironment) { command([], {}, nil) }
16
+ assert_nothing_raised { command([], {}, @env) }
17
+ end
18
+ end
19
+
20
+ should "raise an exception if VM for supplied base option is not found" do
21
+ Vagrant::VM.stubs(:find).returns(Vagrant::VM.new(nil))
22
+
23
+ assert_raises(Vagrant::Errors::BaseVMNotFound) {
24
+ command([], { :base => "foo" }, @env).execute
25
+ }
26
+ end
27
+ end
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.6.6
4
+ version: 0.6.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mitchell Hashimoto
@@ -377,6 +377,7 @@ files:
377
377
  - test/vagrant/command/base_test.rb
378
378
  - test/vagrant/command/group_base_test.rb
379
379
  - test/vagrant/command/helpers_test.rb
380
+ - test/vagrant/command/package_test.rb
380
381
  - test/vagrant/config/base_test.rb
381
382
  - test/vagrant/config/error_recorder_test.rb
382
383
  - test/vagrant/config/ssh_test.rb