Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tidy default config attributes #147

Merged
merged 3 commits into from
Mar 6, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 21 additions & 18 deletions lib/kitchen/driver/vagrant.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,36 +33,39 @@ module Driver
# dependency hook checks when feature is released
class Vagrant < Kitchen::Driver::SSHBase

default_config :box do |driver|
"opscode-#{driver.instance.platform.name}"
end
required_config :box

default_config :box_check_update, nil

default_config(:box_url) { |driver| driver.default_box_url }

default_config :box_version, nil

default_config :customize, {}

default_config :network, []
default_config :synced_folders, []
default_config :ssh, {}

default_config :pre_create_command, nil
default_config :vagrantfiles, []
default_config :provision, false

default_config :vagrantfile_erb,
File.join(File.dirname(__FILE__), "../../../templates/Vagrantfile.erb")
default_config :provision, false

default_config :provider,
ENV.fetch("VAGRANT_DEFAULT_PROVIDER", "virtualbox")

default_config :vm_hostname do |driver|
driver.instance.name
end
default_config :ssh, {}

default_config :box do |driver|
"opscode-#{driver.instance.platform.name}"
end
default_config :synced_folders, []

default_config :box_url do |driver|
driver.default_box_url
end
default_config :vagrantfile_erb,
File.join(File.dirname(__FILE__), "../../../templates/Vagrantfile.erb")
expand_path_for :vagrantfile_erb

default_config :box_version, nil
default_config :box_check_update, nil
default_config :vagrantfiles, []

required_config :box
default_config(:vm_hostname) { |driver| driver.instance.name }

no_parallel_for :create, :destroy

Expand Down