push/harmony: ability to set uploader path

This commit is contained in:
Mitchell Hashimoto 2014-10-29 00:05:31 -07:00 committed by Seth Vargo
parent e7b0661a93
commit 168715ad7d
2 changed files with 11 additions and 0 deletions

View File

@ -33,12 +33,21 @@ module VagrantPlugins
# @return [Boolean]
attr_accessor :vcs
# The path to the uploader binary to shell out to. This usually
# is only set for debugging/development. If not set, the uploader
# will be looked for within the Vagrant installer dir followed by
# the PATH.
#
# @return [String]
attr_accessor :uploader_path
def initialize
@app = UNSET_VALUE
@dir = UNSET_VALUE
@vcs = UNSET_VALUE
@include = []
@exclude = []
@uploader_path = UNSET_VALUE
end
def merge(other)
@ -56,6 +65,7 @@ module VagrantPlugins
def finalize!
@app = nil if @app == UNSET_VALUE
@dir = "." if @dir == UNSET_VALUE
@uploader_path = nil if @uploader_path == UNSET_VALUE
@vcs = true if @vcs == UNSET_VALUE
end

View File

@ -35,6 +35,7 @@ describe VagrantPlugins::HarmonyPush::Config do
its(:dir) { should eq(".") }
its(:exclude) { should be_empty }
its(:include) { should be_empty }
its(:uploader_path) { should be_nil }
its(:vcs) { should be_true }
end