vagrantup 0.8.5 → 0.8.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/.gitignore +3 -0
- data/CHANGELOG.md +7 -0
- data/Gemfile +8 -0
- data/config/default.rb +0 -1
- data/lib/vagrant/action/builtin.rb +1 -0
- data/lib/vagrant/action/vm.rb +1 -0
- data/lib/vagrant/action/vm/check_accessible.rb +23 -0
- data/lib/vagrant/action/vm/forward_ports_helpers.rb +1 -1
- data/lib/vagrant/command/provision.rb +3 -1
- data/lib/vagrant/command/ssh.rb +6 -2
- data/lib/vagrant/command/ssh_config.rb +1 -0
- data/lib/vagrant/command/status.rb +11 -2
- data/lib/vagrant/config/vm.rb +0 -1
- data/lib/vagrant/downloaders/http.rb +4 -0
- data/lib/vagrant/errors.rb +5 -0
- data/lib/vagrant/hosts.rb +2 -1
- data/lib/vagrant/hosts/base.rb +30 -32
- data/lib/vagrant/hosts/bsd.rb +6 -0
- data/lib/vagrant/hosts/fedora.rb +11 -0
- data/lib/vagrant/hosts/linux.rb +23 -1
- data/lib/vagrant/provisioners/chef_solo.rb +3 -3
- data/lib/vagrant/provisioners/shell.rb +10 -1
- data/lib/vagrant/util/platform.rb +0 -7
- data/lib/vagrant/version.rb +1 -1
- data/lib/vagrant/vm.rb +1 -0
- data/templates/locales/en.yml +11 -0
- data/test/vagrant/action/vm/check_accessible_test.rb +61 -0
- data/test/vagrant/provisioners/shell_test.rb +11 -0
- metadata +4 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7987b8b05b53d439752efd835d69fb49f6c4acaa
|
4
|
+
data.tar.gz: 1eb3052430da1bde3227df39f30b12c5bfab6d30
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f130096790cd9b8e3954ce26366cd00d023093a2906bee5574ad73de17f1d886ce90dc6ffb528a2594bc9c65d49163152dbd38d1a3d1f829f2008f8abc1267d
|
7
|
+
data.tar.gz: 7c21f13ad6a8ebe7cce682fc10242a2e905fefdda6a828f6a9bf28abac9bed86b3dbe10a8a63dacf13572fd310537450f45fdc8abc06ffb637df562903f679a9
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
## 0.8.6 (August 28, 2011)
|
2
|
+
|
3
|
+
- Fix issue with download progress not properly clearing the line. [GH-476]
|
4
|
+
- NFS should work properly on Fedora. [GH-450]
|
5
|
+
- Arguments can be specified to the `shell` provisioner via the `args` option. [GH-475]
|
6
|
+
- Vagrant behaves much better when there are "inaccessible" VMs. [GH-453]
|
7
|
+
|
1
8
|
## 0.8.5 (August 15, 2011)
|
2
9
|
|
3
10
|
Note: 0.8.3 and 0.8.4 was yanked due to RubyGems encoding issue.
|
data/Gemfile
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
require "rbconfig"
|
2
|
+
platform = RbConfig::CONFIG["host_os"].downcase
|
3
|
+
|
1
4
|
source "http://rubygems.org"
|
2
5
|
|
3
6
|
gem "vagrant", :path => '.'
|
@@ -6,6 +9,11 @@ gem "vagrant", :path => '.'
|
|
6
9
|
# typically coincides with it
|
7
10
|
gem "virtualbox", :git => "git://github.com/mitchellh/virtualbox.git"
|
8
11
|
|
12
|
+
if platform.include?("mingw") || platform.include?("mswin")
|
13
|
+
gem "jruby-openssl", "~> 0.7.4", :platforms => :jruby
|
14
|
+
gem "jruby-win32ole", "~> 0.8.5", :platforms => :jruby
|
15
|
+
end
|
16
|
+
|
9
17
|
group :test do
|
10
18
|
gem "rake"
|
11
19
|
gem "contest", ">= 0.1.2"
|
data/config/default.rb
CHANGED
data/lib/vagrant/action/vm.rb
CHANGED
@@ -2,6 +2,7 @@ module Vagrant
|
|
2
2
|
class Action
|
3
3
|
module VM
|
4
4
|
autoload :Boot, 'vagrant/action/vm/boot'
|
5
|
+
autoload :CheckAccessible, 'vagrant/action/vm/check_accessible'
|
5
6
|
autoload :CheckBox, 'vagrant/action/vm/check_box'
|
6
7
|
autoload :CheckGuestAdditions, 'vagrant/action/vm/check_guest_additions'
|
7
8
|
autoload :CleanMachineFolder, 'vagrant/action/vm/clean_machine_folder'
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module Vagrant
|
2
|
+
class Action
|
3
|
+
module VM
|
4
|
+
class CheckAccessible
|
5
|
+
def initialize(app, env)
|
6
|
+
@app = app
|
7
|
+
end
|
8
|
+
|
9
|
+
def call(env)
|
10
|
+
if env["vm"] && env["vm"].created? && !env["vm"].vm.accessible?
|
11
|
+
# The VM we are attempting to manipulate is inaccessible. This
|
12
|
+
# is a very bad situation and can only be fixed by the user. It
|
13
|
+
# also prohibits us from actually doing anything with the virtual
|
14
|
+
# machine, so we raise an error.
|
15
|
+
raise Errors::VMInaccessible
|
16
|
+
end
|
17
|
+
|
18
|
+
@app.call(env)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -11,7 +11,7 @@ module Vagrant
|
|
11
11
|
# @return [Array<String>]
|
12
12
|
def used_ports
|
13
13
|
result = VirtualBox::VM.all.collect do |vm|
|
14
|
-
if vm.running? && vm.uuid != @env["vm"].uuid
|
14
|
+
if vm.accessible? && vm.running? && vm.uuid != @env["vm"].uuid
|
15
15
|
vm.network_adapters.collect do |na|
|
16
16
|
na.nat_driver.forwarded_ports.collect do |fp|
|
17
17
|
fp.hostport.to_i
|
@@ -6,7 +6,9 @@ module Vagrant
|
|
6
6
|
def execute
|
7
7
|
target_vms.each do |vm|
|
8
8
|
if vm.created?
|
9
|
-
if vm.vm.
|
9
|
+
if !vm.vm.accessible?
|
10
|
+
raise Errors::VMInaccessible
|
11
|
+
elsif vm.vm.running?
|
10
12
|
vm.provision
|
11
13
|
else
|
12
14
|
vm.env.ui.info I18n.t("vagrant.commands.common.vm_not_running")
|
data/lib/vagrant/command/ssh.rb
CHANGED
@@ -27,8 +27,6 @@ module Vagrant
|
|
27
27
|
end
|
28
28
|
|
29
29
|
def ssh_connect
|
30
|
-
raise Errors::VMNotCreatedError if !ssh_vm.created?
|
31
|
-
raise Errors::VMNotRunningError if !ssh_vm.vm.running?
|
32
30
|
ssh_vm.ssh.connect
|
33
31
|
end
|
34
32
|
|
@@ -37,6 +35,12 @@ module Vagrant
|
|
37
35
|
vm = self.name.nil? && env.multivm? ? env.primary_vm : nil
|
38
36
|
raise Errors::MultiVMTargetRequired, :command => "ssh" if !vm && target_vms.length > 1
|
39
37
|
vm = target_vms.first if !vm
|
38
|
+
|
39
|
+
# Basic checks that are required for proper SSH
|
40
|
+
raise Errors::VMNotCreatedError if !vm.created?
|
41
|
+
raise Errors::VMInaccessible if !vm.vm.accessible?
|
42
|
+
raise Errors::VMNotRunningError if !vm.vm.running?
|
43
|
+
|
40
44
|
vm
|
41
45
|
end
|
42
46
|
end
|
@@ -8,6 +8,7 @@ module Vagrant
|
|
8
8
|
raise Errors::MultiVMTargetRequired, :command => "ssh_config" if target_vms.length > 1
|
9
9
|
vm = target_vms.first
|
10
10
|
raise Errors::VMNotCreatedError if !vm.created?
|
11
|
+
raise Errors::VMInaccessible if !vm.vm.accessible?
|
11
12
|
|
12
13
|
# We need to fix the file permissions of the key if they aren't set
|
13
14
|
# properly, otherwise if the user attempts to SSH in, it won't work!
|
@@ -3,10 +3,19 @@ module Vagrant
|
|
3
3
|
class StatusCommand < NamedBase
|
4
4
|
register "status", "Shows the status of the current Vagrant environment."
|
5
5
|
|
6
|
-
def
|
6
|
+
def execute
|
7
7
|
state = nil
|
8
8
|
results = target_vms.collect do |vm|
|
9
|
-
|
9
|
+
if vm.created?
|
10
|
+
if vm.vm.accessible?
|
11
|
+
state = vm.vm.state.to_s
|
12
|
+
else
|
13
|
+
state = "inaccessible"
|
14
|
+
end
|
15
|
+
else
|
16
|
+
state = "not_created"
|
17
|
+
end
|
18
|
+
|
10
19
|
"#{vm.name.to_s.ljust(25)}#{state.gsub("_", " ")}"
|
11
20
|
end
|
12
21
|
|
data/lib/vagrant/config/vm.rb
CHANGED
@@ -49,6 +49,7 @@ module Vagrant
|
|
49
49
|
# Progress reporting is limited to every 25 segments just so
|
50
50
|
# we're not constantly updating
|
51
51
|
if segment_count % 25 == 0
|
52
|
+
env.ui.clear_line
|
52
53
|
env.ui.report_progress(progress, total)
|
53
54
|
segment_count = 0
|
54
55
|
end
|
@@ -56,6 +57,9 @@ module Vagrant
|
|
56
57
|
# Store the segment
|
57
58
|
destination_file.write(segment)
|
58
59
|
end
|
60
|
+
|
61
|
+
# Clear the line one last time so that the progress meter disappears
|
62
|
+
env.ui.clear_line
|
59
63
|
end
|
60
64
|
end
|
61
65
|
rescue SocketError
|
data/lib/vagrant/errors.rb
CHANGED
@@ -319,6 +319,11 @@ module Vagrant
|
|
319
319
|
error_key(:failure, "vagrant.actions.vm.import")
|
320
320
|
end
|
321
321
|
|
322
|
+
class VMInaccessible < VagrantError
|
323
|
+
status_code(54)
|
324
|
+
error_key(:vm_inaccessible)
|
325
|
+
end
|
326
|
+
|
322
327
|
class VMNotCreatedError < VagrantError
|
323
328
|
status_code(6)
|
324
329
|
error_key(:vm_creation_required)
|
data/lib/vagrant/hosts.rb
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
module Vagrant
|
2
2
|
module Hosts
|
3
3
|
autoload :Base, 'vagrant/hosts/base'
|
4
|
+
autoload :Arch, 'vagrant/hosts/arch'
|
4
5
|
autoload :BSD, 'vagrant/hosts/bsd'
|
6
|
+
autoload :Fedora, 'vagrant/hosts/fedora'
|
5
7
|
autoload :Linux, 'vagrant/hosts/linux'
|
6
|
-
autoload :Arch, 'vagrant/hosts/arch'
|
7
8
|
end
|
8
9
|
end
|
data/lib/vagrant/hosts/base.rb
CHANGED
@@ -8,41 +8,39 @@ module Vagrant
|
|
8
8
|
# The {Environment} which this host belongs to.
|
9
9
|
attr_reader :env
|
10
10
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
end
|
11
|
+
# Loads the proper host for the given value. If the value is nil
|
12
|
+
# or is the symbol `:detect`, then the host class will be detected
|
13
|
+
# using the `RUBY_PLATFORM` constant.
|
14
|
+
#
|
15
|
+
# @param [Environment] env
|
16
|
+
# @param [String] klass
|
17
|
+
# @return [Base]
|
18
|
+
def self.load(env, klass)
|
19
|
+
klass = detect if klass.nil? || klass == :detect
|
20
|
+
return nil if !klass
|
21
|
+
return klass.new(env)
|
22
|
+
end
|
24
23
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
:arch => Arch,
|
35
|
-
:linux => Linux
|
36
|
-
}
|
24
|
+
# Detects the proper host class for current platform and returns
|
25
|
+
# the class.
|
26
|
+
#
|
27
|
+
# @return [Class]
|
28
|
+
def self.detect
|
29
|
+
[BSD, Linux].each do |type|
|
30
|
+
result = type.distro_dispatch
|
31
|
+
return result if result
|
32
|
+
end
|
37
33
|
|
38
|
-
|
39
|
-
|
40
|
-
|
34
|
+
nil
|
35
|
+
rescue Exception
|
36
|
+
nil
|
37
|
+
end
|
41
38
|
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
39
|
+
# This must be implemented by subclasses to dispatch to the proper
|
40
|
+
# distro-specific class for the host. If this returns nil then it is
|
41
|
+
# an invalid host class.
|
42
|
+
def self.distro_dispatch
|
43
|
+
nil
|
46
44
|
end
|
47
45
|
|
48
46
|
# Initialzes a new host. This method shouldn't be called directly,
|
data/lib/vagrant/hosts/bsd.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'vagrant/util/platform'
|
2
|
+
|
1
3
|
module Vagrant
|
2
4
|
module Hosts
|
3
5
|
# Represents a BSD host, such as FreeBSD and Darwin (Mac OS X).
|
@@ -5,6 +7,10 @@ module Vagrant
|
|
5
7
|
include Util
|
6
8
|
include Util::Retryable
|
7
9
|
|
10
|
+
def self.distro_dispatch
|
11
|
+
return self if Util::Platform.darwin? || Util::Platform.bsd?
|
12
|
+
end
|
13
|
+
|
8
14
|
def nfs?
|
9
15
|
retryable(:tries => 10, :on => TypeError) do
|
10
16
|
system("which nfsd > /dev/null 2>&1")
|
data/lib/vagrant/hosts/linux.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'vagrant/util/platform'
|
2
|
+
|
1
3
|
module Vagrant
|
2
4
|
module Hosts
|
3
5
|
# Represents a Linux based host, such as Ubuntu.
|
@@ -5,6 +7,26 @@ module Vagrant
|
|
5
7
|
include Util
|
6
8
|
include Util::Retryable
|
7
9
|
|
10
|
+
def self.distro_dispatch
|
11
|
+
return nil if !Util::Platform.linux?
|
12
|
+
return Arch if File.exist?("/etc/rc.conf") && File.exist?("/etc/pacman.conf")
|
13
|
+
|
14
|
+
if File.exist?("/etc/redhat-release")
|
15
|
+
# Check if we have a known redhat release
|
16
|
+
File.open("/etc/redhat-release") do |f|
|
17
|
+
return Fedora if f.gets =~ /^Fedora/
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
return self
|
22
|
+
end
|
23
|
+
|
24
|
+
def initialize(*args)
|
25
|
+
super
|
26
|
+
|
27
|
+
@nfs_server_binary = "/etc/init.d/nfs-kernel-server"
|
28
|
+
end
|
29
|
+
|
8
30
|
def nfs?
|
9
31
|
retryable(:tries => 10, :on => TypeError) do
|
10
32
|
# Check procfs to see if NFSd is a supported filesystem
|
@@ -29,7 +51,7 @@ module Vagrant
|
|
29
51
|
|
30
52
|
# We run restart here instead of "update" just in case nfsd
|
31
53
|
# is not starting
|
32
|
-
system("sudo
|
54
|
+
system("sudo #{@nfs_server_binary} restart")
|
33
55
|
end
|
34
56
|
|
35
57
|
def nfs_cleanup
|
@@ -74,9 +74,9 @@ module Vagrant
|
|
74
74
|
# Path exists on the host, setup the remote path
|
75
75
|
remote_path = "#{config.provisioning_path}/chef-solo-#{get_and_update_counter(:cookbooks_path)}"
|
76
76
|
else
|
77
|
-
# Path already exists on the virtual machine
|
78
|
-
#
|
79
|
-
remote_path =
|
77
|
+
# Path already exists on the virtual machine, therefore
|
78
|
+
# just use the path given.
|
79
|
+
remote_path = path
|
80
80
|
end
|
81
81
|
|
82
82
|
# Return the result
|
@@ -7,11 +7,13 @@ module Vagrant
|
|
7
7
|
attr_accessor :inline
|
8
8
|
attr_accessor :path
|
9
9
|
attr_accessor :upload_path
|
10
|
+
attr_accessor :args
|
10
11
|
|
11
12
|
def initialize
|
12
13
|
@inline = nil
|
13
14
|
@path = nil
|
14
15
|
@upload_path = "/tmp/vagrant-shell"
|
16
|
+
@args = nil
|
15
17
|
end
|
16
18
|
|
17
19
|
def expanded_path
|
@@ -37,6 +39,11 @@ module Vagrant
|
|
37
39
|
if !upload_path
|
38
40
|
errors.add(I18n.t("vagrant.provisioners.shell.upload_path_not_set"))
|
39
41
|
end
|
42
|
+
|
43
|
+
# If there are args and its not a string, that is a problem
|
44
|
+
if args && !args.is_a?(String)
|
45
|
+
errors.add(I18n.t("vagrant.provisioners.shell.args_not_string"))
|
46
|
+
end
|
40
47
|
end
|
41
48
|
end
|
42
49
|
|
@@ -64,7 +71,9 @@ module Vagrant
|
|
64
71
|
end
|
65
72
|
|
66
73
|
def provision!
|
67
|
-
|
74
|
+
args = ""
|
75
|
+
args = " #{config.args}" if config.args
|
76
|
+
commands = ["chmod +x #{config.upload_path}", "#{config.upload_path}#{args}"]
|
68
77
|
|
69
78
|
with_script_file do |path|
|
70
79
|
# Upload the script to the VM
|
@@ -27,13 +27,6 @@ module Vagrant
|
|
27
27
|
false
|
28
28
|
end
|
29
29
|
|
30
|
-
def arch?
|
31
|
-
linux? &&
|
32
|
-
File.exist?('/etc/rc.conf') &&
|
33
|
-
File.exist?('/etc/pacman.conf') &&
|
34
|
-
File.exist?('/etc/rc.d/')
|
35
|
-
end
|
36
|
-
|
37
30
|
# Returns boolean noting whether this is a 64-bit CPU. This
|
38
31
|
# is not 100% accurate and there could easily be false negatives.
|
39
32
|
#
|
data/lib/vagrant/version.rb
CHANGED
data/lib/vagrant/vm.rb
CHANGED
data/templates/locales/en.yml
CHANGED
@@ -144,6 +144,11 @@ en:
|
|
144
144
|
http://vagrantup.com/docs/getting-started/setup/windows_x64.html
|
145
145
|
|
146
146
|
vm_creation_required: "VM must be created before running this command. Run `vagrant up` first."
|
147
|
+
vm_inaccessible: |-
|
148
|
+
Your VM has become "inaccessible." Unfortunately, this is a critical error
|
149
|
+
with VirtualBox that Vagrant can not cleanly recover from. Please open VirtualBox
|
150
|
+
and clear out your inaccessible virtual machines or find a way to fix
|
151
|
+
them.
|
147
152
|
vm_not_found: "A VM by the name of %{name} was not found."
|
148
153
|
vm_not_running: "VM must be running to open SSH connection."
|
149
154
|
|
@@ -191,6 +196,11 @@ en:
|
|
191
196
|
stopped without properly closing the session. Run `vagrant up`
|
192
197
|
to resume this virtual machine. If any problems persist, you may
|
193
198
|
have to destroy and restart the virtual machine.
|
199
|
+
inaccessible: |-
|
200
|
+
The VM is inaccessible! This is a rare case which means that VirtualBox
|
201
|
+
can't find your VM configuration. This usually happens when upgrading
|
202
|
+
VirtualBox, moving to a new computer, etc. Please consult VirtualBox
|
203
|
+
for how to handle this issue.
|
194
204
|
output: |-
|
195
205
|
Current VM states:
|
196
206
|
|
@@ -509,6 +519,7 @@ en:
|
|
509
519
|
running_puppetd: "Running Puppet agent..."
|
510
520
|
|
511
521
|
shell:
|
522
|
+
args_not_string: "Shell provisioner `args` must be a string."
|
512
523
|
path_and_inline_set: "Only one of `path` or `inline` may be set."
|
513
524
|
no_path_or_inline: "One of `path` or `inline` must be set."
|
514
525
|
path_invalid: "`path` for shell provisioner does not exist on the host system: %{path}"
|
@@ -0,0 +1,61 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class CheckAccessibleVMActionTest < Test::Unit::TestCase
|
4
|
+
setup do
|
5
|
+
@klass = Vagrant::Action::VM::CheckAccessible
|
6
|
+
end
|
7
|
+
|
8
|
+
context "calling" do
|
9
|
+
setup do
|
10
|
+
@app, @env = action_env
|
11
|
+
@instance = @klass.new(@app, @env)
|
12
|
+
end
|
13
|
+
|
14
|
+
should "continue up the chain if the VM is nil" do
|
15
|
+
@env["vm"] = nil
|
16
|
+
|
17
|
+
@app.expects(:call).once
|
18
|
+
|
19
|
+
assert_nothing_raised {
|
20
|
+
@instance.call(@env)
|
21
|
+
}
|
22
|
+
end
|
23
|
+
|
24
|
+
should "continue up the chain if the VM is not created" do
|
25
|
+
@env["vm"] = mock("vm")
|
26
|
+
@env["vm"].stubs(:created?).returns(false)
|
27
|
+
|
28
|
+
@app.expects(:call).once
|
29
|
+
|
30
|
+
assert_nothing_raised {
|
31
|
+
@instance.call(@env)
|
32
|
+
}
|
33
|
+
end
|
34
|
+
|
35
|
+
should "continue up the chain if the VM is created and accessible" do
|
36
|
+
@env["vm"] = mock("vm")
|
37
|
+
@env["vm"].stubs(:created?).returns(true)
|
38
|
+
@env["vm"].stubs(:vm).returns(mock("real_vm"))
|
39
|
+
@env["vm"].vm.stubs(:accessible?).returns(true)
|
40
|
+
|
41
|
+
@app.expects(:call).once
|
42
|
+
|
43
|
+
assert_nothing_raised {
|
44
|
+
@instance.call(@env)
|
45
|
+
}
|
46
|
+
end
|
47
|
+
|
48
|
+
should "fail if the VM is not accessible" do
|
49
|
+
@env["vm"] = mock("vm")
|
50
|
+
@env["vm"].stubs(:created?).returns(true)
|
51
|
+
@env["vm"].stubs(:vm).returns(mock("real_vm"))
|
52
|
+
@env["vm"].vm.stubs(:accessible?).returns(false)
|
53
|
+
|
54
|
+
@app.expects(:call).never
|
55
|
+
|
56
|
+
assert_raises(Vagrant::Errors::VMInaccessible) {
|
57
|
+
@instance.call(@env)
|
58
|
+
}
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
@@ -64,5 +64,16 @@ class ShellProvisionerTest < Test::Unit::TestCase
|
|
64
64
|
|
65
65
|
@action.provision!
|
66
66
|
end
|
67
|
+
|
68
|
+
should "append arguments if provided" do
|
69
|
+
@config.args = "foo bar baz"
|
70
|
+
commands = ["chmod +x #{@config.upload_path}", "#{@config.upload_path} #{@config.args}"]
|
71
|
+
|
72
|
+
p_seq = sequence("provisioning")
|
73
|
+
@action.vm.ssh.expects(:upload!).with(@config.expanded_path.to_s, @config.upload_path).in_sequence(p_seq)
|
74
|
+
@ssh.expects(:sudo!).with(commands).in_sequence(p_seq)
|
75
|
+
|
76
|
+
@action.provision!
|
77
|
+
end
|
67
78
|
end
|
68
79
|
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.8.
|
4
|
+
version: 0.8.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mitchell Hashimoto
|
@@ -223,6 +223,7 @@ files:
|
|
223
223
|
- lib/vagrant/action/general/validate.rb
|
224
224
|
- lib/vagrant/action/vm.rb
|
225
225
|
- lib/vagrant/action/vm/boot.rb
|
226
|
+
- lib/vagrant/action/vm/check_accessible.rb
|
226
227
|
- lib/vagrant/action/vm/check_box.rb
|
227
228
|
- lib/vagrant/action/vm/check_guest_additions.rb
|
228
229
|
- lib/vagrant/action/vm/clean_machine_folder.rb
|
@@ -297,6 +298,7 @@ files:
|
|
297
298
|
- lib/vagrant/hosts/arch.rb
|
298
299
|
- lib/vagrant/hosts/base.rb
|
299
300
|
- lib/vagrant/hosts/bsd.rb
|
301
|
+
- lib/vagrant/hosts/fedora.rb
|
300
302
|
- lib/vagrant/hosts/linux.rb
|
301
303
|
- lib/vagrant/plugin.rb
|
302
304
|
- lib/vagrant/provisioners.rb
|
@@ -361,6 +363,7 @@ files:
|
|
361
363
|
- test/vagrant/action/general/package_test.rb
|
362
364
|
- test/vagrant/action/general/validate_test.rb
|
363
365
|
- test/vagrant/action/vm/boot_test.rb
|
366
|
+
- test/vagrant/action/vm/check_accessible_test.rb
|
364
367
|
- test/vagrant/action/vm/check_box_test.rb
|
365
368
|
- test/vagrant/action/vm/check_guest_additions_test.rb
|
366
369
|
- test/vagrant/action/vm/clean_machine_folder_test.rb
|