vagrantup 0.6.5 → 0.6.6
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/CHANGELOG.md +8 -0
 - data/Gemfile.lock +1 -1
 - data/lib/vagrant/action.rb +8 -4
 - data/lib/vagrant/action/builtin.rb +29 -53
 - data/lib/vagrant/action/general/validate.rb +19 -0
 - data/lib/vagrant/action/vm/forward_ports.rb +1 -1
 - data/lib/vagrant/action/vm/forward_ports_helpers.rb +1 -1
 - data/lib/vagrant/box.rb +3 -3
 - data/lib/vagrant/command/ssh_config.rb +2 -2
 - data/lib/vagrant/command/status.rb +4 -5
 - data/lib/vagrant/config.rb +3 -7
 - data/lib/vagrant/environment.rb +2 -3
 - data/lib/vagrant/version.rb +1 -1
 - data/lib/vagrant/vm.rb +1 -1
 - data/test/vagrant/action/general/validate_test.rb +31 -0
 - data/test/vagrant/action/vm/forward_ports_helpers_test.rb +1 -1
 - data/test/vagrant/action/vm/forward_ports_test.rb +2 -2
 - data/test/vagrant/box_test.rb +4 -4
 - data/test/vagrant/config_test.rb +1 -34
 - data/test/vagrant/environment_test.rb +5 -1
 - data/test/vagrant/vm_test.rb +6 -1
 - data/vagrant.gemspec +0 -1
 - metadata +3 -15
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: dd26596b445951778d89c3df2a9717fef063cdb4
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 69c01579f88b14201c8b394527e3ab39697dc6c5
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 1bea481a61138290f846ac8bbbe49dc2606db3ae0f98b7664da5ab98fda01bf4c8e43026e9762f616f9eed09883ef3bd5a7c5b0beaf8cec141b88030f7417353
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 04418842db9cc9fcd62f96fc53271862515ef035b59ad78caf6fb2476aef7340f6b6629427d7b92c7cd0e5c894415299fb5bb2ab06cddea3d82599947d41b29d
         
     | 
    
        data/CHANGELOG.md
    CHANGED
    
    | 
         @@ -1,3 +1,11 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            ## 0.6.6 (October 14, 2010)
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
              - `vagrant status NAME` works once again. [GH-191]
         
     | 
| 
      
 4 
     | 
    
         
            +
              - Conditional validation of Vagrantfile so that some commands don't validate. [GH-188]
         
     | 
| 
      
 5 
     | 
    
         
            +
              - Fix "junk" output for ssh-config. [GH-189]
         
     | 
| 
      
 6 
     | 
    
         
            +
              - Fix port collision handling with greater than two VMs. [GH-185]
         
     | 
| 
      
 7 
     | 
    
         
            +
              - Fix potential infinite loop with root path if bad CWD is given to environment.
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
       1 
9 
     | 
    
         
             
            ## 0.6.5 (October 8, 2010)
         
     | 
| 
       2 
10 
     | 
    
         | 
| 
       3 
11 
     | 
    
         
             
              - Validations on base MAC address to avoid situation described in GH-166, GH-181
         
     | 
    
        data/Gemfile.lock
    CHANGED
    
    
    
        data/lib/vagrant/action.rb
    CHANGED
    
    | 
         @@ -90,14 +90,18 @@ module Vagrant 
     | 
|
| 
       90 
90 
     | 
    
         
             
                # Any options given are injected into the environment hash.
         
     | 
| 
       91 
91 
     | 
    
         
             
                #
         
     | 
| 
       92 
92 
     | 
    
         
             
                # @param [Object] callable An object which responds to `call`.
         
     | 
| 
       93 
     | 
    
         
            -
                def run( 
     | 
| 
       94 
     | 
    
         
            -
                  callable =  
     | 
| 
       95 
     | 
    
         
            -
                  callable =  
     | 
| 
       96 
     | 
    
         
            -
                   
     | 
| 
      
 93 
     | 
    
         
            +
                def run(callable_id, options=nil)
         
     | 
| 
      
 94 
     | 
    
         
            +
                  callable = callable_id
         
     | 
| 
      
 95 
     | 
    
         
            +
                  callable = Builder.new.use(callable_id) if callable_id.kind_of?(Class)
         
     | 
| 
      
 96 
     | 
    
         
            +
                  callable = self.class.actions[callable_id] if callable_id.kind_of?(Symbol)
         
     | 
| 
      
 97 
     | 
    
         
            +
                  raise ArgumentError.new("Argument to run must be a callable object or registered action.") if !callable || !callable.respond_to?(:call)
         
     | 
| 
       97 
98 
     | 
    
         | 
| 
       98 
99 
     | 
    
         
             
                  action_environment = Action::Environment.new(env)
         
     | 
| 
       99 
100 
     | 
    
         
             
                  action_environment.merge!(options || {})
         
     | 
| 
       100 
101 
     | 
    
         | 
| 
      
 102 
     | 
    
         
            +
                  # Run the before action run callback, if we're not doing that already
         
     | 
| 
      
 103 
     | 
    
         
            +
                  run(:before_action_run, action_environment) if callable_id != :before_action_run
         
     | 
| 
      
 104 
     | 
    
         
            +
             
     | 
| 
       101 
105 
     | 
    
         
             
                  # Run the action chain in a busy block, marking the environment as
         
     | 
| 
       102 
106 
     | 
    
         
             
                  # interrupted if a SIGINT occurs, and exiting cleanly once the
         
     | 
| 
       103 
107 
     | 
    
         
             
                  # chain has been run.
         
     | 
| 
         @@ -6,15 +6,13 @@ module Vagrant 
     | 
|
| 
       6 
6 
     | 
    
         
             
                # in the future this will no longer be necessary with autoloading.
         
     | 
| 
       7 
7 
     | 
    
         
             
                def self.builtin!
         
     | 
| 
       8 
8 
     | 
    
         
             
                  # provision - Provisions a running VM
         
     | 
| 
       9 
     | 
    
         
            -
                  provision  
     | 
| 
      
 9 
     | 
    
         
            +
                  register(:provision, Builder.new do
         
     | 
| 
       10 
10 
     | 
    
         
             
                    use VM::Provision
         
     | 
| 
       11 
     | 
    
         
            -
                  end
         
     | 
| 
       12 
     | 
    
         
            -
             
     | 
| 
       13 
     | 
    
         
            -
                  register :provision, provision
         
     | 
| 
      
 11 
     | 
    
         
            +
                  end)
         
     | 
| 
       14 
12 
     | 
    
         | 
| 
       15 
13 
     | 
    
         
             
                  # start - Starts a VM, assuming it already exists on the
         
     | 
| 
       16 
14 
     | 
    
         
             
                  # environment.
         
     | 
| 
       17 
     | 
    
         
            -
                  start  
     | 
| 
      
 15 
     | 
    
         
            +
                  register(:start, Builder.new do
         
     | 
| 
       18 
16 
     | 
    
         
             
                    use VM::CleanMachineFolder
         
     | 
| 
       19 
17 
     | 
    
         
             
                    use VM::Customize
         
     | 
| 
       20 
18 
     | 
    
         
             
                    use VM::ClearForwardedPorts
         
     | 
| 
         @@ -25,104 +23,82 @@ module Vagrant 
     | 
|
| 
       25 
23 
     | 
    
         
             
                    use VM::ShareFolders
         
     | 
| 
       26 
24 
     | 
    
         
             
                    use VM::Network
         
     | 
| 
       27 
25 
     | 
    
         
             
                    use VM::Boot
         
     | 
| 
       28 
     | 
    
         
            -
                  end
         
     | 
| 
       29 
     | 
    
         
            -
             
     | 
| 
       30 
     | 
    
         
            -
                  register :start, start
         
     | 
| 
      
 26 
     | 
    
         
            +
                  end)
         
     | 
| 
       31 
27 
     | 
    
         | 
| 
       32 
28 
     | 
    
         
             
                  # halt - Halts the VM, attempting gracefully but then forcing
         
     | 
| 
       33 
29 
     | 
    
         
             
                  # a restart if fails.
         
     | 
| 
       34 
     | 
    
         
            -
                  halt  
     | 
| 
      
 30 
     | 
    
         
            +
                  register(:halt, Builder.new do
         
     | 
| 
       35 
31 
     | 
    
         
             
                    use VM::DiscardState
         
     | 
| 
       36 
32 
     | 
    
         
             
                    use VM::Halt
         
     | 
| 
       37 
33 
     | 
    
         
             
                    use VM::DisableNetworks
         
     | 
| 
       38 
     | 
    
         
            -
                  end
         
     | 
| 
       39 
     | 
    
         
            -
             
     | 
| 
       40 
     | 
    
         
            -
                  register :halt, halt
         
     | 
| 
      
 34 
     | 
    
         
            +
                  end)
         
     | 
| 
       41 
35 
     | 
    
         | 
| 
       42 
36 
     | 
    
         
             
                  # suspend - Suspends the VM
         
     | 
| 
       43 
     | 
    
         
            -
                  suspend  
     | 
| 
      
 37 
     | 
    
         
            +
                  register(:suspend, Builder.new do
         
     | 
| 
       44 
38 
     | 
    
         
             
                    use VM::Suspend
         
     | 
| 
       45 
     | 
    
         
            -
                  end
         
     | 
| 
       46 
     | 
    
         
            -
             
     | 
| 
       47 
     | 
    
         
            -
                  register :suspend, suspend
         
     | 
| 
      
 39 
     | 
    
         
            +
                  end)
         
     | 
| 
       48 
40 
     | 
    
         | 
| 
       49 
41 
     | 
    
         
             
                  # resume - Resume a VM
         
     | 
| 
       50 
     | 
    
         
            -
                  resume  
     | 
| 
      
 42 
     | 
    
         
            +
                  register(:resume, Builder.new do
         
     | 
| 
       51 
43 
     | 
    
         
             
                    use VM::Resume
         
     | 
| 
       52 
     | 
    
         
            -
                  end
         
     | 
| 
       53 
     | 
    
         
            -
             
     | 
| 
       54 
     | 
    
         
            -
                  register :resume, resume
         
     | 
| 
      
 44 
     | 
    
         
            +
                  end)
         
     | 
| 
       55 
45 
     | 
    
         | 
| 
       56 
46 
     | 
    
         
             
                  # reload - Halts then restarts the VM
         
     | 
| 
       57 
     | 
    
         
            -
                  reload  
     | 
| 
      
 47 
     | 
    
         
            +
                  register(:reload, Builder.new do
         
     | 
| 
       58 
48 
     | 
    
         
             
                    use Action[:halt]
         
     | 
| 
       59 
49 
     | 
    
         
             
                    use Action[:start]
         
     | 
| 
       60 
     | 
    
         
            -
                  end
         
     | 
| 
       61 
     | 
    
         
            -
             
     | 
| 
       62 
     | 
    
         
            -
                  register :reload, reload
         
     | 
| 
      
 50 
     | 
    
         
            +
                  end)
         
     | 
| 
       63 
51 
     | 
    
         | 
| 
       64 
52 
     | 
    
         
             
                  # up - Imports, prepares, then starts a fresh VM.
         
     | 
| 
       65 
     | 
    
         
            -
                  up  
     | 
| 
      
 53 
     | 
    
         
            +
                  register(:up, Builder.new do
         
     | 
| 
       66 
54 
     | 
    
         
             
                    use VM::CheckBox
         
     | 
| 
       67 
55 
     | 
    
         
             
                    use VM::Import
         
     | 
| 
       68 
56 
     | 
    
         
             
                    use VM::MatchMACAddress
         
     | 
| 
       69 
57 
     | 
    
         
             
                    use VM::CheckGuestAdditions
         
     | 
| 
       70 
58 
     | 
    
         
             
                    use Action[:start]
         
     | 
| 
       71 
     | 
    
         
            -
                  end
         
     | 
| 
       72 
     | 
    
         
            -
             
     | 
| 
       73 
     | 
    
         
            -
                  register :up, up
         
     | 
| 
      
 59 
     | 
    
         
            +
                  end)
         
     | 
| 
       74 
60 
     | 
    
         | 
| 
       75 
61 
     | 
    
         
             
                  # destroy - Halts, cleans up, and destroys an existing VM
         
     | 
| 
       76 
     | 
    
         
            -
                  destroy  
     | 
| 
      
 62 
     | 
    
         
            +
                  register(:destroy, Builder.new do
         
     | 
| 
       77 
63 
     | 
    
         
             
                    use Action[:halt], :force => true
         
     | 
| 
       78 
64 
     | 
    
         
             
                    use VM::ClearNFSExports
         
     | 
| 
       79 
65 
     | 
    
         
             
                    use VM::DestroyUnusedNetworkInterfaces
         
     | 
| 
       80 
66 
     | 
    
         
             
                    use VM::Destroy
         
     | 
| 
       81 
67 
     | 
    
         
             
                    use VM::CleanMachineFolder
         
     | 
| 
       82 
     | 
    
         
            -
                  end
         
     | 
| 
       83 
     | 
    
         
            -
             
     | 
| 
       84 
     | 
    
         
            -
                  register :destroy, destroy
         
     | 
| 
      
 68 
     | 
    
         
            +
                  end)
         
     | 
| 
       85 
69 
     | 
    
         | 
| 
       86 
70 
     | 
    
         
             
                  # package - Export and package the VM
         
     | 
| 
       87 
     | 
    
         
            -
                  package  
     | 
| 
      
 71 
     | 
    
         
            +
                  register(:package, Builder.new do
         
     | 
| 
       88 
72 
     | 
    
         
             
                    use Action[:halt]
         
     | 
| 
       89 
73 
     | 
    
         
             
                    use VM::ClearForwardedPorts
         
     | 
| 
       90 
74 
     | 
    
         
             
                    use VM::ClearSharedFolders
         
     | 
| 
       91 
75 
     | 
    
         
             
                    use VM::Export
         
     | 
| 
       92 
76 
     | 
    
         
             
                    use VM::PackageVagrantfile
         
     | 
| 
       93 
77 
     | 
    
         
             
                    use VM::Package
         
     | 
| 
       94 
     | 
    
         
            -
                  end
         
     | 
| 
       95 
     | 
    
         
            -
             
     | 
| 
       96 
     | 
    
         
            -
                  register :package, package
         
     | 
| 
      
 78 
     | 
    
         
            +
                  end)
         
     | 
| 
       97 
79 
     | 
    
         | 
| 
       98 
80 
     | 
    
         
             
                  # box_add - Download and add a box.
         
     | 
| 
       99 
     | 
    
         
            -
                  box_add  
     | 
| 
      
 81 
     | 
    
         
            +
                  register(:box_add, Builder.new do
         
     | 
| 
       100 
82 
     | 
    
         
             
                    use Box::Download
         
     | 
| 
       101 
83 
     | 
    
         
             
                    use Box::Unpackage
         
     | 
| 
       102 
84 
     | 
    
         
             
                    use Box::Verify
         
     | 
| 
       103 
     | 
    
         
            -
                  end
         
     | 
| 
       104 
     | 
    
         
            -
             
     | 
| 
       105 
     | 
    
         
            -
                  register :box_add, box_add
         
     | 
| 
      
 85 
     | 
    
         
            +
                  end)
         
     | 
| 
       106 
86 
     | 
    
         | 
| 
       107 
87 
     | 
    
         
             
                  # box_remove - Removes/deletes a box.
         
     | 
| 
       108 
     | 
    
         
            -
                  box_remove  
     | 
| 
      
 88 
     | 
    
         
            +
                  register(:box_remove, Builder.new do
         
     | 
| 
       109 
89 
     | 
    
         
             
                    use Box::Destroy
         
     | 
| 
       110 
     | 
    
         
            -
                  end
         
     | 
| 
       111 
     | 
    
         
            -
             
     | 
| 
       112 
     | 
    
         
            -
                  register :box_remove, box_remove
         
     | 
| 
      
 90 
     | 
    
         
            +
                  end)
         
     | 
| 
       113 
91 
     | 
    
         | 
| 
       114 
92 
     | 
    
         
             
                  # box_repackage - Repackages a box.
         
     | 
| 
       115 
     | 
    
         
            -
                  box_repackage  
     | 
| 
      
 93 
     | 
    
         
            +
                  register(:box_repackage, Builder.new do
         
     | 
| 
       116 
94 
     | 
    
         
             
                    use Box::Package
         
     | 
| 
       117 
     | 
    
         
            -
                  end
         
     | 
| 
       118 
     | 
    
         
            -
             
     | 
| 
       119 
     | 
    
         
            -
                  register :box_repackage, box_repackage
         
     | 
| 
       120 
     | 
    
         
            -
             
     | 
| 
       121 
     | 
    
         
            -
                  # post_load - Called after environment is loaded
         
     | 
| 
       122 
     | 
    
         
            -
                  environment_load = Builder.new do
         
     | 
| 
       123 
     | 
    
         
            -
                  end
         
     | 
| 
      
 95 
     | 
    
         
            +
                  end)
         
     | 
| 
       124 
96 
     | 
    
         | 
| 
       125 
     | 
    
         
            -
                   
     | 
| 
      
 97 
     | 
    
         
            +
                  # Other callbacks. There will be more of these in the future. For
         
     | 
| 
      
 98 
     | 
    
         
            +
                  # now, these are limited to what are needed internally.
         
     | 
| 
      
 99 
     | 
    
         
            +
                  register(:before_action_run, Builder.new do
         
     | 
| 
      
 100 
     | 
    
         
            +
                    use General::Validate
         
     | 
| 
      
 101 
     | 
    
         
            +
                  end)
         
     | 
| 
       126 
102 
     | 
    
         
             
                end
         
     | 
| 
       127 
103 
     | 
    
         
             
              end
         
     | 
| 
       128 
104 
     | 
    
         
             
            end
         
     | 
| 
         @@ -0,0 +1,19 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            module Vagrant
         
     | 
| 
      
 2 
     | 
    
         
            +
              class Action
         
     | 
| 
      
 3 
     | 
    
         
            +
                module General
         
     | 
| 
      
 4 
     | 
    
         
            +
                  # Simply validates the configuration of the current Vagrant
         
     | 
| 
      
 5 
     | 
    
         
            +
                  # environment.
         
     | 
| 
      
 6 
     | 
    
         
            +
                  class Validate
         
     | 
| 
      
 7 
     | 
    
         
            +
                    def initialize(app, env)
         
     | 
| 
      
 8 
     | 
    
         
            +
                      @app = app
         
     | 
| 
      
 9 
     | 
    
         
            +
                      @env = env
         
     | 
| 
      
 10 
     | 
    
         
            +
                    end
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
                    def call(env)
         
     | 
| 
      
 13 
     | 
    
         
            +
                      @env["config"].validate! if !@env.has_key?("validate") || @env["validate"]
         
     | 
| 
      
 14 
     | 
    
         
            +
                      @app.call(@env)
         
     | 
| 
      
 15 
     | 
    
         
            +
                    end
         
     | 
| 
      
 16 
     | 
    
         
            +
                  end
         
     | 
| 
      
 17 
     | 
    
         
            +
                end
         
     | 
| 
      
 18 
     | 
    
         
            +
              end
         
     | 
| 
      
 19 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -34,7 +34,7 @@ module Vagrant 
     | 
|
| 
       34 
34 
     | 
    
         
             
                    def external_collision_check
         
     | 
| 
       35 
35 
     | 
    
         
             
                      existing = used_ports
         
     | 
| 
       36 
36 
     | 
    
         
             
                      @env.env.config.vm.forwarded_ports.each do |name, options|
         
     | 
| 
       37 
     | 
    
         
            -
                        if existing.include?(options[:hostport]. 
     | 
| 
      
 37 
     | 
    
         
            +
                        if existing.include?(options[:hostport].to_i)
         
     | 
| 
       38 
38 
     | 
    
         
             
                          handle_collision(name, options, existing)
         
     | 
| 
       39 
39 
     | 
    
         
             
                        end
         
     | 
| 
       40 
40 
     | 
    
         
             
                      end
         
     | 
    
        data/lib/vagrant/box.rb
    CHANGED
    
    | 
         @@ -58,17 +58,17 @@ module Vagrant 
     | 
|
| 
       58 
58 
     | 
    
         
             
                # is kicked out to the `box_add` registered middleware.
         
     | 
| 
       59 
59 
     | 
    
         
             
                def add
         
     | 
| 
       60 
60 
     | 
    
         
             
                  raise Errors::BoxAlreadyExists.new(:name => name) if File.directory?(directory)
         
     | 
| 
       61 
     | 
    
         
            -
                  env.actions.run(:box_add, { "box" => self })
         
     | 
| 
      
 61 
     | 
    
         
            +
                  env.actions.run(:box_add, { "box" => self, "validate" => false })
         
     | 
| 
       62 
62 
     | 
    
         
             
                end
         
     | 
| 
       63 
63 
     | 
    
         | 
| 
       64 
64 
     | 
    
         
             
                # Begins the process of destroying this box. This cannot be undone!
         
     | 
| 
       65 
65 
     | 
    
         
             
                def destroy
         
     | 
| 
       66 
     | 
    
         
            -
                  env.actions.run(:box_remove, { "box" => self })
         
     | 
| 
      
 66 
     | 
    
         
            +
                  env.actions.run(:box_remove, { "box" => self, "validate" => false })
         
     | 
| 
       67 
67 
     | 
    
         
             
                end
         
     | 
| 
       68 
68 
     | 
    
         | 
| 
       69 
69 
     | 
    
         
             
                # Begins sequence to repackage this box.
         
     | 
| 
       70 
70 
     | 
    
         
             
                def repackage(options=nil)
         
     | 
| 
       71 
     | 
    
         
            -
                  env.actions.run(:box_repackage, { "box" => self }.merge(options || {}))
         
     | 
| 
      
 71 
     | 
    
         
            +
                  env.actions.run(:box_repackage, { "box" => self, "validate" => false }.merge(options || {}))
         
     | 
| 
       72 
72 
     | 
    
         
             
                end
         
     | 
| 
       73 
73 
     | 
    
         | 
| 
       74 
74 
     | 
    
         
             
                # Returns the directory to the location of this boxes content in the local
         
     | 
| 
         @@ -9,12 +9,12 @@ module Vagrant 
     | 
|
| 
       9 
9 
     | 
    
         
             
                    vm = target_vms.first
         
     | 
| 
       10 
10 
     | 
    
         
             
                    raise Errors::VMNotCreatedError.new if !vm.created?
         
     | 
| 
       11 
11 
     | 
    
         | 
| 
       12 
     | 
    
         
            -
                     
     | 
| 
      
 12 
     | 
    
         
            +
                    $stdout.puts(Util::TemplateRenderer.render("ssh_config", {
         
     | 
| 
       13 
13 
     | 
    
         
             
                      :host_key => options[:host] || "vagrant",
         
     | 
| 
       14 
14 
     | 
    
         
             
                      :ssh_user => vm.env.config.ssh.username,
         
     | 
| 
       15 
15 
     | 
    
         
             
                      :ssh_port => vm.ssh.port,
         
     | 
| 
       16 
16 
     | 
    
         
             
                      :private_key_path => vm.env.config.ssh.private_key_path
         
     | 
| 
       17 
     | 
    
         
            -
                    }) 
     | 
| 
      
 17 
     | 
    
         
            +
                    }))
         
     | 
| 
       18 
18 
     | 
    
         
             
                  end
         
     | 
| 
       19 
19 
     | 
    
         
             
                end
         
     | 
| 
       20 
20 
     | 
    
         
             
              end
         
     | 
| 
         @@ -1,17 +1,16 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            module Vagrant
         
     | 
| 
       2 
2 
     | 
    
         
             
              module Command
         
     | 
| 
       3 
     | 
    
         
            -
                class StatusCommand <  
     | 
| 
       4 
     | 
    
         
            -
                  argument :name, :type => :string, :optional => true
         
     | 
| 
      
 3 
     | 
    
         
            +
                class StatusCommand < NamedBase
         
     | 
| 
       5 
4 
     | 
    
         
             
                  register "status", "Shows the status of the current Vagrant environment."
         
     | 
| 
       6 
5 
     | 
    
         | 
| 
       7 
6 
     | 
    
         
             
                  def route
         
     | 
| 
       8 
7 
     | 
    
         
             
                    state = nil
         
     | 
| 
       9 
     | 
    
         
            -
                    results =  
     | 
| 
      
 8 
     | 
    
         
            +
                    results = target_vms.collect do |vm|
         
     | 
| 
       10 
9 
     | 
    
         
             
                      state ||= vm.created? ? vm.vm.state.to_s : "not_created"
         
     | 
| 
       11 
     | 
    
         
            -
                      "#{name.to_s.ljust(25)}#{state.gsub("_", " ")}"
         
     | 
| 
      
 10 
     | 
    
         
            +
                      "#{vm.name.to_s.ljust(25)}#{state.gsub("_", " ")}"
         
     | 
| 
       12 
11 
     | 
    
         
             
                    end
         
     | 
| 
       13 
12 
     | 
    
         | 
| 
       14 
     | 
    
         
            -
                    state =  
     | 
| 
      
 13 
     | 
    
         
            +
                    state = target_vms.length == 1 ? state : "listing"
         
     | 
| 
       15 
14 
     | 
    
         | 
| 
       16 
15 
     | 
    
         
             
                    env.ui.info(I18n.t("vagrant.commands.status.output",
         
     | 
| 
       17 
16 
     | 
    
         
             
                                :states => results.join("\n"),
         
     | 
    
        data/lib/vagrant/config.rb
    CHANGED
    
    | 
         @@ -68,13 +68,9 @@ module Vagrant 
     | 
|
| 
       68 
68 
     | 
    
         
             
                  # and returns the final configured object. This also validates the
         
     | 
| 
       69 
69 
     | 
    
         
             
                  # configuration by calling {Top#validate!} on every configuration
         
     | 
| 
       70 
70 
     | 
    
         
             
                  # class.
         
     | 
| 
       71 
     | 
    
         
            -
                  def execute! 
     | 
| 
      
 71 
     | 
    
         
            +
                  def execute!
         
     | 
| 
       72 
72 
     | 
    
         
             
                    config_object ||= config
         
     | 
| 
       73 
73 
     | 
    
         
             
                    run_procs!(config_object)
         
     | 
| 
       74 
     | 
    
         
            -
             
     | 
| 
       75 
     | 
    
         
            -
                    # Validate if we're looking at a config object which represents a
         
     | 
| 
       76 
     | 
    
         
            -
                    # real VM.
         
     | 
| 
       77 
     | 
    
         
            -
                    config_object.validate! if validate && config_object.env.vm
         
     | 
| 
       78 
74 
     | 
    
         
             
                    config_object
         
     | 
| 
       79 
75 
     | 
    
         
             
                  end
         
     | 
| 
       80 
76 
     | 
    
         
             
                end
         
     | 
| 
         @@ -90,7 +86,7 @@ module Vagrant 
     | 
|
| 
       90 
86 
     | 
    
         | 
| 
       91 
87 
     | 
    
         
             
                # Loads the queue of files/procs, executes them in the proper
         
     | 
| 
       92 
88 
     | 
    
         
             
                # sequence, and returns the resulting configuration object.
         
     | 
| 
       93 
     | 
    
         
            -
                def load! 
     | 
| 
      
 89 
     | 
    
         
            +
                def load!
         
     | 
| 
       94 
90 
     | 
    
         
             
                  self.class.reset!(@env)
         
     | 
| 
       95 
91 
     | 
    
         | 
| 
       96 
92 
     | 
    
         
             
                  queue.flatten.each do |item|
         
     | 
| 
         @@ -106,7 +102,7 @@ module Vagrant 
     | 
|
| 
       106 
102 
     | 
    
         
             
                    end
         
     | 
| 
       107 
103 
     | 
    
         
             
                  end
         
     | 
| 
       108 
104 
     | 
    
         | 
| 
       109 
     | 
    
         
            -
                  return self.class.execute! 
     | 
| 
      
 105 
     | 
    
         
            +
                  return self.class.execute!
         
     | 
| 
       110 
106 
     | 
    
         
             
                end
         
     | 
| 
       111 
107 
     | 
    
         
             
              end
         
     | 
| 
       112 
108 
     | 
    
         | 
    
        data/lib/vagrant/environment.rb
    CHANGED
    
    | 
         @@ -243,7 +243,7 @@ module Vagrant 
     | 
|
| 
       243 
243 
     | 
    
         | 
| 
       244 
244 
     | 
    
         
             
                  root_finder = lambda do |path|
         
     | 
| 
       245 
245 
     | 
    
         
             
                    return path if File.exist?(File.join(path.to_s, ROOTFILE_NAME))
         
     | 
| 
       246 
     | 
    
         
            -
                    return nil if path.root?
         
     | 
| 
      
 246 
     | 
    
         
            +
                    return nil if path.root? || !File.exist?(path)
         
     | 
| 
       247 
247 
     | 
    
         
             
                    root_finder.call(path.parent)
         
     | 
| 
       248 
248 
     | 
    
         
             
                  end
         
     | 
| 
       249 
249 
     | 
    
         | 
| 
         @@ -284,7 +284,6 @@ module Vagrant 
     | 
|
| 
       284 
284 
     | 
    
         
             
                    @loaded = true
         
     | 
| 
       285 
285 
     | 
    
         
             
                    self.class.check_virtualbox!
         
     | 
| 
       286 
286 
     | 
    
         
             
                    load_config!
         
     | 
| 
       287 
     | 
    
         
            -
                    actions.run(:environment_load)
         
     | 
| 
       288 
287 
     | 
    
         
             
                  end
         
     | 
| 
       289 
288 
     | 
    
         | 
| 
       290 
289 
     | 
    
         
             
                  self
         
     | 
| 
         @@ -313,7 +312,7 @@ module Vagrant 
     | 
|
| 
       313 
312 
     | 
    
         | 
| 
       314 
313 
     | 
    
         
             
                  # Execute the configuration stack and store the result as the final
         
     | 
| 
       315 
314 
     | 
    
         
             
                  # value in the config ivar.
         
     | 
| 
       316 
     | 
    
         
            -
                  @config = loader.load! 
     | 
| 
      
 315 
     | 
    
         
            +
                  @config = loader.load!
         
     | 
| 
       317 
316 
     | 
    
         | 
| 
       318 
317 
     | 
    
         
             
                  # (re)load the logger
         
     | 
| 
       319 
318 
     | 
    
         
             
                  @logger = nil
         
     | 
    
        data/lib/vagrant/version.rb
    CHANGED
    
    
    
        data/lib/vagrant/vm.rb
    CHANGED
    
    
| 
         @@ -0,0 +1,31 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            require "test_helper"
         
     | 
| 
      
 2 
     | 
    
         
            +
             
     | 
| 
      
 3 
     | 
    
         
            +
            class ValidateGeneralActionTest < Test::Unit::TestCase
         
     | 
| 
      
 4 
     | 
    
         
            +
              setup do
         
     | 
| 
      
 5 
     | 
    
         
            +
                @klass = Vagrant::Action::General::Validate
         
     | 
| 
      
 6 
     | 
    
         
            +
                @app, @env = action_env
         
     | 
| 
      
 7 
     | 
    
         
            +
              end
         
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
              should "initialize fine" do
         
     | 
| 
      
 10 
     | 
    
         
            +
                @klass.new(@app, @env)
         
     | 
| 
      
 11 
     | 
    
         
            +
              end
         
     | 
| 
      
 12 
     | 
    
         
            +
             
     | 
| 
      
 13 
     | 
    
         
            +
              should "validate and call up" do
         
     | 
| 
      
 14 
     | 
    
         
            +
                @instance = @klass.new(@app, @env)
         
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
      
 16 
     | 
    
         
            +
                seq = sequence("seq")
         
     | 
| 
      
 17 
     | 
    
         
            +
                @env["config"].expects(:validate!).once.in_sequence(seq)
         
     | 
| 
      
 18 
     | 
    
         
            +
                @app.expects(:call).with(@env).once.in_sequence(seq)
         
     | 
| 
      
 19 
     | 
    
         
            +
                @instance.call(@env)
         
     | 
| 
      
 20 
     | 
    
         
            +
              end
         
     | 
| 
      
 21 
     | 
    
         
            +
             
     | 
| 
      
 22 
     | 
    
         
            +
              should "not validate if env says not to" do
         
     | 
| 
      
 23 
     | 
    
         
            +
                @env["validate"] = false
         
     | 
| 
      
 24 
     | 
    
         
            +
                @instance = @klass.new(@app, @env)
         
     | 
| 
      
 25 
     | 
    
         
            +
             
     | 
| 
      
 26 
     | 
    
         
            +
                seq = sequence("seq")
         
     | 
| 
      
 27 
     | 
    
         
            +
                @env["config"].expects(:validate!).never
         
     | 
| 
      
 28 
     | 
    
         
            +
                @app.expects(:call).with(@env).once.in_sequence(seq)
         
     | 
| 
      
 29 
     | 
    
         
            +
                @instance.call(@env)
         
     | 
| 
      
 30 
     | 
    
         
            +
              end
         
     | 
| 
      
 31 
     | 
    
         
            +
            end
         
     | 
| 
         @@ -64,7 +64,7 @@ class ForwardPortsHelpersVMActionTest < Test::Unit::TestCase 
     | 
|
| 
       64 
64 
     | 
    
         
             
                  na.stubs(:nat_driver).returns(ne)
         
     | 
| 
       65 
65 
     | 
    
         
             
                  ne.stubs(:forwarded_ports).returns(fps)
         
     | 
| 
       66 
66 
     | 
    
         
             
                  @vms << mock_vm(:network_adapters => [na])
         
     | 
| 
       67 
     | 
    
         
            -
                  assert_equal  
     | 
| 
      
 67 
     | 
    
         
            +
                  assert_equal [2222, 80], @instance.used_ports
         
     | 
| 
       68 
68 
     | 
    
         
             
                end
         
     | 
| 
       69 
69 
     | 
    
         
             
              end
         
     | 
| 
       70 
70 
     | 
    
         
             
            end
         
     | 
| 
         @@ -53,12 +53,12 @@ class ForwardPortsVMActionTest < Test::Unit::TestCase 
     | 
|
| 
       53 
53 
     | 
    
         
             
                end
         
     | 
| 
       54 
54 
     | 
    
         | 
| 
       55 
55 
     | 
    
         
             
                should "not raise any errors if no forwarded ports collide" do
         
     | 
| 
       56 
     | 
    
         
            -
                  @used_ports <<  
     | 
| 
      
 56 
     | 
    
         
            +
                  @used_ports << 80
         
     | 
| 
       57 
57 
     | 
    
         
             
                  assert_nothing_raised { @klass.new(@app, @env) }
         
     | 
| 
       58 
58 
     | 
    
         
             
                end
         
     | 
| 
       59 
59 
     | 
    
         | 
| 
       60 
60 
     | 
    
         
             
                should "handle collision if it happens" do
         
     | 
| 
       61 
     | 
    
         
            -
                  @used_ports <<  
     | 
| 
      
 61 
     | 
    
         
            +
                  @used_ports << 2222
         
     | 
| 
       62 
62 
     | 
    
         
             
                  @klass.any_instance.expects(:handle_collision).with("ssh", anything, anything).once
         
     | 
| 
       63 
63 
     | 
    
         
             
                  assert_nothing_raised { @klass.new(@app, @env) }
         
     | 
| 
       64 
64 
     | 
    
         
             
                end
         
     | 
    
        data/test/vagrant/box_test.rb
    CHANGED
    
    | 
         @@ -36,7 +36,7 @@ class BoxTest < Test::Unit::TestCase 
     | 
|
| 
       36 
36 
     | 
    
         
             
                end
         
     | 
| 
       37 
37 
     | 
    
         | 
| 
       38 
38 
     | 
    
         
             
                should "execute the Add action when add is called" do
         
     | 
| 
       39 
     | 
    
         
            -
                  @box.env.actions.expects(:run).with(:box_add, { "box" => @box })
         
     | 
| 
      
 39 
     | 
    
         
            +
                  @box.env.actions.expects(:run).with(:box_add, { "box" => @box, "validate" => false })
         
     | 
| 
       40 
40 
     | 
    
         
             
                  @box.add
         
     | 
| 
       41 
41 
     | 
    
         
             
                end
         
     | 
| 
       42 
42 
     | 
    
         | 
| 
         @@ -48,19 +48,19 @@ class BoxTest < Test::Unit::TestCase 
     | 
|
| 
       48 
48 
     | 
    
         | 
| 
       49 
49 
     | 
    
         
             
                context "destroying" do
         
     | 
| 
       50 
50 
     | 
    
         
             
                  should "execute the destroy action" do
         
     | 
| 
       51 
     | 
    
         
            -
                    @box.env.actions.expects(:run).with(:box_remove, { "box" => @box })
         
     | 
| 
      
 51 
     | 
    
         
            +
                    @box.env.actions.expects(:run).with(:box_remove, { "box" => @box, "validate" => false })
         
     | 
| 
       52 
52 
     | 
    
         
             
                    @box.destroy
         
     | 
| 
       53 
53 
     | 
    
         
             
                  end
         
     | 
| 
       54 
54 
     | 
    
         
             
                end
         
     | 
| 
       55 
55 
     | 
    
         | 
| 
       56 
56 
     | 
    
         
             
                context "repackaging" do
         
     | 
| 
       57 
57 
     | 
    
         
             
                  should "execute the repackage action" do
         
     | 
| 
       58 
     | 
    
         
            -
                    @box.env.actions.expects(:run).with(:box_repackage, { "box" => @box })
         
     | 
| 
      
 58 
     | 
    
         
            +
                    @box.env.actions.expects(:run).with(:box_repackage, { "box" => @box, "validate" => false })
         
     | 
| 
       59 
59 
     | 
    
         
             
                    @box.repackage
         
     | 
| 
       60 
60 
     | 
    
         
             
                  end
         
     | 
| 
       61 
61 
     | 
    
         | 
| 
       62 
62 
     | 
    
         
             
                  should "forward given options into the action" do
         
     | 
| 
       63 
     | 
    
         
            -
                    @box.env.actions.expects(:run).with(:box_repackage, { "box" => @box, "foo" => "bar" })
         
     | 
| 
      
 63 
     | 
    
         
            +
                    @box.env.actions.expects(:run).with(:box_repackage, { "box" => @box, "foo" => "bar", "validate" => false })
         
     | 
| 
       64 
64 
     | 
    
         
             
                    @box.repackage("foo" => "bar")
         
     | 
| 
       65 
65 
     | 
    
         
             
                  end
         
     | 
| 
       66 
66 
     | 
    
         
             
                end
         
     | 
    
        data/test/vagrant/config_test.rb
    CHANGED
    
    | 
         @@ -9,8 +9,6 @@ class ConfigTest < Test::Unit::TestCase 
     | 
|
| 
       9 
9 
     | 
    
         
             
                setup do
         
     | 
| 
       10 
10 
     | 
    
         
             
                  @env = vagrant_env
         
     | 
| 
       11 
11 
     | 
    
         
             
                  @instance = @klass.new(@env)
         
     | 
| 
       12 
     | 
    
         
            -
             
     | 
| 
       13 
     | 
    
         
            -
                  @klass::Top.any_instance.stubs(:validate!)
         
     | 
| 
       14 
12 
     | 
    
         
             
                end
         
     | 
| 
       15 
13 
     | 
    
         | 
| 
       16 
14 
     | 
    
         
             
                should "initially have an empty queue" do
         
     | 
| 
         @@ -20,17 +18,10 @@ class ConfigTest < Test::Unit::TestCase 
     | 
|
| 
       20 
18 
     | 
    
         
             
                should "reset the config class on load, then execute" do
         
     | 
| 
       21 
19 
     | 
    
         
             
                  seq = sequence("sequence")
         
     | 
| 
       22 
20 
     | 
    
         
             
                  @klass.expects(:reset!).with(@env).in_sequence(seq)
         
     | 
| 
       23 
     | 
    
         
            -
                  @klass.expects(:execute!). 
     | 
| 
      
 21 
     | 
    
         
            +
                  @klass.expects(:execute!).in_sequence(seq)
         
     | 
| 
       24 
22 
     | 
    
         
             
                  @instance.load!
         
     | 
| 
       25 
23 
     | 
    
         
             
                end
         
     | 
| 
       26 
24 
     | 
    
         | 
| 
       27 
     | 
    
         
            -
                should "not validate if told not to" do
         
     | 
| 
       28 
     | 
    
         
            -
                  seq = sequence("sequence")
         
     | 
| 
       29 
     | 
    
         
            -
                  @klass.expects(:reset!).with(@env).in_sequence(seq)
         
     | 
| 
       30 
     | 
    
         
            -
                  @klass.expects(:execute!).with(false).in_sequence(seq)
         
     | 
| 
       31 
     | 
    
         
            -
                  @instance.load!(false)
         
     | 
| 
       32 
     | 
    
         
            -
                end
         
     | 
| 
       33 
     | 
    
         
            -
             
     | 
| 
       34 
25 
     | 
    
         
             
                should "run the queue in the order given" do
         
     | 
| 
       35 
26 
     | 
    
         
             
                  @instance.queue << Proc.new { |config| config.vm.box = "foo" }
         
     | 
| 
       36 
27 
     | 
    
         
             
                  @instance.queue << Proc.new { |config| config.vm.box = "bar" }
         
     | 
| 
         @@ -113,7 +104,6 @@ class ConfigTest < Test::Unit::TestCase 
     | 
|
| 
       113 
104 
     | 
    
         
             
              context "initializing" do
         
     | 
| 
       114 
105 
     | 
    
         
             
                setup do
         
     | 
| 
       115 
106 
     | 
    
         
             
                  @klass.reset!(vagrant_env)
         
     | 
| 
       116 
     | 
    
         
            -
                  @klass::Top.any_instance.stubs(:validate!)
         
     | 
| 
       117 
107 
     | 
    
         
             
                end
         
     | 
| 
       118 
108 
     | 
    
         | 
| 
       119 
109 
     | 
    
         
             
                should "add the given block to the proc stack" do
         
     | 
| 
         @@ -122,29 +112,6 @@ class ConfigTest < Test::Unit::TestCase 
     | 
|
| 
       122 
112 
     | 
    
         
             
                  assert_equal [proc], @klass.proc_stack
         
     | 
| 
       123 
113 
     | 
    
         
             
                end
         
     | 
| 
       124 
114 
     | 
    
         | 
| 
       125 
     | 
    
         
            -
                should "run the validation on an environment which represents a VM" do
         
     | 
| 
       126 
     | 
    
         
            -
                  @klass.reset!(vagrant_env.vms[:default].env)
         
     | 
| 
       127 
     | 
    
         
            -
                  seq = sequence('seq')
         
     | 
| 
       128 
     | 
    
         
            -
                  @klass.expects(:run_procs!).with(@klass.config).once.in_sequence(seq)
         
     | 
| 
       129 
     | 
    
         
            -
                  @klass.config.expects(:validate!).once.in_sequence(seq)
         
     | 
| 
       130 
     | 
    
         
            -
                  @klass.execute!
         
     | 
| 
       131 
     | 
    
         
            -
                end
         
     | 
| 
       132 
     | 
    
         
            -
             
     | 
| 
       133 
     | 
    
         
            -
                should "not run the validation on an environment that doesn't directly represent a VM" do
         
     | 
| 
       134 
     | 
    
         
            -
                  seq = sequence('seq')
         
     | 
| 
       135 
     | 
    
         
            -
                  @klass.expects(:run_procs!).with(@klass.config).once.in_sequence(seq)
         
     | 
| 
       136 
     | 
    
         
            -
                  @klass.expects(:validate!).never
         
     | 
| 
       137 
     | 
    
         
            -
                  @klass.execute!
         
     | 
| 
       138 
     | 
    
         
            -
                end
         
     | 
| 
       139 
     | 
    
         
            -
             
     | 
| 
       140 
     | 
    
         
            -
                should "not run the validation if explicitly told not to" do
         
     | 
| 
       141 
     | 
    
         
            -
                  @klass.reset!(vagrant_env.vms[:default].env)
         
     | 
| 
       142 
     | 
    
         
            -
                  seq = sequence('seq')
         
     | 
| 
       143 
     | 
    
         
            -
                  @klass.expects(:run_procs!).with(@klass.config).once.in_sequence(seq)
         
     | 
| 
       144 
     | 
    
         
            -
                  @klass.config.expects(:validate!).never
         
     | 
| 
       145 
     | 
    
         
            -
                  @klass.execute!(false)
         
     | 
| 
       146 
     | 
    
         
            -
                end
         
     | 
| 
       147 
     | 
    
         
            -
             
     | 
| 
       148 
115 
     | 
    
         
             
                should "return the configuration on execute!" do
         
     | 
| 
       149 
116 
     | 
    
         
             
                  @klass.run {}
         
     | 
| 
       150 
117 
     | 
    
         
             
                  result = @klass.execute!
         
     | 
| 
         @@ -242,6 +242,7 @@ class EnvironmentTest < Test::Unit::TestCase 
     | 
|
| 
       242 
242 
     | 
    
         
             
                  search_seq = sequence("search_seq")
         
     | 
| 
       243 
243 
     | 
    
         
             
                  paths.each do |path|
         
     | 
| 
       244 
244 
     | 
    
         
             
                    File.expects(:exist?).with(path.join(@klass::ROOTFILE_NAME).to_s).returns(false).in_sequence(search_seq)
         
     | 
| 
      
 245 
     | 
    
         
            +
                    File.expects(:exist?).with(path).returns(true).in_sequence(search_seq) if !path.root?
         
     | 
| 
       245 
246 
     | 
    
         
             
                  end
         
     | 
| 
       246 
247 
     | 
    
         | 
| 
       247 
248 
     | 
    
         
             
                  assert !@klass.new(:cwd => paths.first).root_path
         
     | 
| 
         @@ -254,6 +255,10 @@ class EnvironmentTest < Test::Unit::TestCase 
     | 
|
| 
       254 
255 
     | 
    
         
             
                  assert_equal path, @klass.new(:cwd => path).root_path
         
     | 
| 
       255 
256 
     | 
    
         
             
                end
         
     | 
| 
       256 
257 
     | 
    
         | 
| 
      
 258 
     | 
    
         
            +
                should "not infinite loop on relative paths" do
         
     | 
| 
      
 259 
     | 
    
         
            +
                  assert @klass.new(:cwd => "../test").root_path.nil?
         
     | 
| 
      
 260 
     | 
    
         
            +
                end
         
     | 
| 
      
 261 
     | 
    
         
            +
             
     | 
| 
       257 
262 
     | 
    
         
             
                should "only load the root path once" do
         
     | 
| 
       258 
263 
     | 
    
         
             
                  env = @klass.new
         
     | 
| 
       259 
264 
     | 
    
         
             
                  File.expects(:exist?).with(env.cwd.join(@klass::ROOTFILE_NAME).to_s).returns(true).once
         
     | 
| 
         @@ -353,7 +358,6 @@ class EnvironmentTest < Test::Unit::TestCase 
     | 
|
| 
       353 
358 
     | 
    
         
             
                    call_seq = sequence("call_sequence")
         
     | 
| 
       354 
359 
     | 
    
         
             
                    @klass.expects(:check_virtualbox!).once.in_sequence(call_seq)
         
     | 
| 
       355 
360 
     | 
    
         
             
                    env.expects(:load_config!).once.in_sequence(call_seq)
         
     | 
| 
       356 
     | 
    
         
            -
                    env.actions.expects(:run).with(:environment_load).once.in_sequence(call_seq)
         
     | 
| 
       357 
361 
     | 
    
         
             
                    assert_equal env, env.load!
         
     | 
| 
       358 
362 
     | 
    
         
             
                  end
         
     | 
| 
       359 
363 
     | 
    
         
             
                end
         
     | 
    
        data/test/vagrant/vm_test.rb
    CHANGED
    
    | 
         @@ -165,7 +165,12 @@ class VMTest < Test::Unit::TestCase 
     | 
|
| 
       165 
165 
     | 
    
         | 
| 
       166 
166 
     | 
    
         
             
                context "packaging" do
         
     | 
| 
       167 
167 
     | 
    
         
             
                  should "execute the package action" do
         
     | 
| 
       168 
     | 
    
         
            -
                    @vm.env.actions.expects(:run).with( 
     | 
| 
      
 168 
     | 
    
         
            +
                    @vm.env.actions.expects(:run).once.with() do |action, options|
         
     | 
| 
      
 169 
     | 
    
         
            +
                      assert_equal :package, action
         
     | 
| 
      
 170 
     | 
    
         
            +
                      assert_equal :bar, options[:foo]
         
     | 
| 
      
 171 
     | 
    
         
            +
                      true
         
     | 
| 
      
 172 
     | 
    
         
            +
                    end
         
     | 
| 
      
 173 
     | 
    
         
            +
             
     | 
| 
       169 
174 
     | 
    
         
             
                    @vm.package(:foo => :bar)
         
     | 
| 
       170 
175 
     | 
    
         
             
                  end
         
     | 
| 
       171 
176 
     | 
    
         
             
                end
         
     | 
    
        data/vagrant.gemspec
    CHANGED
    
    | 
         @@ -27,7 +27,6 @@ Gem::Specification.new do |s| 
     | 
|
| 
       27 
27 
     | 
    
         
             
              s.add_development_dependency "contest", ">= 0.1.2"
         
     | 
| 
       28 
28 
     | 
    
         
             
              s.add_development_dependency "mocha"
         
     | 
| 
       29 
29 
     | 
    
         
             
              s.add_development_dependency "ruby-debug"
         
     | 
| 
       30 
     | 
    
         
            -
              s.add_development_dependency "bundler", ">= 1.0.0.rc.6"
         
     | 
| 
       31 
30 
     | 
    
         | 
| 
       32 
31 
     | 
    
         
             
              s.files         = `git ls-files`.split("\n")
         
     | 
| 
       33 
32 
     | 
    
         
             
              s.executables   = `git ls-files`.split("\n").map{|f| f =~ /^bin\/(.*)/ ? $1 : nil}.compact
         
     | 
    
        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. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.6.6
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Mitchell Hashimoto
         
     | 
| 
         @@ -193,20 +193,6 @@ dependencies: 
     | 
|
| 
       193 
193 
     | 
    
         
             
                - - '>='
         
     | 
| 
       194 
194 
     | 
    
         
             
                  - !ruby/object:Gem::Version
         
     | 
| 
       195 
195 
     | 
    
         
             
                    version: '0'
         
     | 
| 
       196 
     | 
    
         
            -
            - !ruby/object:Gem::Dependency
         
     | 
| 
       197 
     | 
    
         
            -
              name: bundler
         
     | 
| 
       198 
     | 
    
         
            -
              requirement: !ruby/object:Gem::Requirement
         
     | 
| 
       199 
     | 
    
         
            -
                requirements:
         
     | 
| 
       200 
     | 
    
         
            -
                - - '>='
         
     | 
| 
       201 
     | 
    
         
            -
                  - !ruby/object:Gem::Version
         
     | 
| 
       202 
     | 
    
         
            -
                    version: 1.0.0.rc.6
         
     | 
| 
       203 
     | 
    
         
            -
              type: :development
         
     | 
| 
       204 
     | 
    
         
            -
              prerelease: false
         
     | 
| 
       205 
     | 
    
         
            -
              version_requirements: !ruby/object:Gem::Requirement
         
     | 
| 
       206 
     | 
    
         
            -
                requirements:
         
     | 
| 
       207 
     | 
    
         
            -
                - - '>='
         
     | 
| 
       208 
     | 
    
         
            -
                  - !ruby/object:Gem::Version
         
     | 
| 
       209 
     | 
    
         
            -
                    version: 1.0.0.rc.6
         
     | 
| 
       210 
196 
     | 
    
         
             
            description: Vagrant is a tool for building and distributing virtualized development
         
     | 
| 
       211 
197 
     | 
    
         
             
              environments.
         
     | 
| 
       212 
198 
     | 
    
         
             
            email:
         
     | 
| 
         @@ -243,6 +229,7 @@ files: 
     | 
|
| 
       243 
229 
     | 
    
         
             
            - lib/vagrant/action/env/set.rb
         
     | 
| 
       244 
230 
     | 
    
         
             
            - lib/vagrant/action/environment.rb
         
     | 
| 
       245 
231 
     | 
    
         
             
            - lib/vagrant/action/general/package.rb
         
     | 
| 
      
 232 
     | 
    
         
            +
            - lib/vagrant/action/general/validate.rb
         
     | 
| 
       246 
233 
     | 
    
         
             
            - lib/vagrant/action/vm/boot.rb
         
     | 
| 
       247 
234 
     | 
    
         
             
            - lib/vagrant/action/vm/check_box.rb
         
     | 
| 
       248 
235 
     | 
    
         
             
            - lib/vagrant/action/vm/check_guest_additions.rb
         
     | 
| 
         @@ -354,6 +341,7 @@ files: 
     | 
|
| 
       354 
341 
     | 
    
         
             
            - test/vagrant/action/env/set_test.rb
         
     | 
| 
       355 
342 
     | 
    
         
             
            - test/vagrant/action/environment_test.rb
         
     | 
| 
       356 
343 
     | 
    
         
             
            - test/vagrant/action/general/package_test.rb
         
     | 
| 
      
 344 
     | 
    
         
            +
            - test/vagrant/action/general/validate_test.rb
         
     | 
| 
       357 
345 
     | 
    
         
             
            - test/vagrant/action/vm/boot_test.rb
         
     | 
| 
       358 
346 
     | 
    
         
             
            - test/vagrant/action/vm/check_box_test.rb
         
     | 
| 
       359 
347 
     | 
    
         
             
            - test/vagrant/action/vm/check_guest_additions_test.rb
         
     |