extend the Chef provisioner base config object with an 'installer_download_path' property
This commit is contained in:
parent
2785fd14db
commit
9e7f705bad
|
@ -48,6 +48,14 @@ module VagrantPlugins
|
|||
# @return [String]
|
||||
attr_accessor :version
|
||||
|
||||
# The path where the Chef installer will be downloaded to. Only valid if
|
||||
# install is true or "force". It defaults to nil, which means that the
|
||||
# omnibus installer will choose the destination and you have no control
|
||||
# over it.
|
||||
#
|
||||
# @return [String]
|
||||
attr_accessor :installer_download_path
|
||||
|
||||
def initialize
|
||||
super
|
||||
|
||||
|
@ -57,6 +65,7 @@ module VagrantPlugins
|
|||
@log_level = UNSET_VALUE
|
||||
@prerelease = UNSET_VALUE
|
||||
@version = UNSET_VALUE
|
||||
@installer_download_path = UNSET_VALUE
|
||||
end
|
||||
|
||||
def finalize!
|
||||
|
@ -66,6 +75,7 @@ module VagrantPlugins
|
|||
@log_level = :info if @log_level == UNSET_VALUE
|
||||
@prerelease = false if @prerelease == UNSET_VALUE
|
||||
@version = :latest if @version == UNSET_VALUE
|
||||
@installer_download_path = nil if @installer_download_path == UNSET_VALUE
|
||||
|
||||
# Make sure the install is a symbol if it's not a boolean
|
||||
if @install.respond_to?(:to_sym)
|
||||
|
|
|
@ -68,4 +68,11 @@ describe VagrantPlugins::Chef::Config::Base do
|
|||
expect(subject.version).to eq(:latest)
|
||||
end
|
||||
end
|
||||
|
||||
describe "#installer_download_path" do
|
||||
it "defaults to nil" do
|
||||
subject.finalize!
|
||||
expect(subject.installer_download_path).to be(nil)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue