lib/vagrant-parallels/action/sane_defaults.rb in vagrant-parallels-1.7.8 vs lib/vagrant-parallels/action/sane_defaults.rb in vagrant-parallels-2.0.0
- old
+ new
@@ -12,13 +12,10 @@
def call(env)
# Set the env on an instance variable so we can access it in
# helpers.
@env = env
- settings = default_settings
-
- @app.call(env) if settings.empty?
@env[:ui].info I18n.t('vagrant_parallels.actions.vm.sane_defaults.setting')
default_settings.each do |setting, value|
@env[:machine].provider.driver.execute_prlctl(
'set', @env[:machine].id, "--#{setting.to_s.gsub('_','-')}", value)
@@ -28,38 +25,26 @@
end
private
def default_settings
- settings = {
+ {
tools_autoupdate: 'no',
- startup_view: 'same',
on_shutdown: 'close',
on_window_close: 'keep-running',
auto_share_camera: 'off',
smart_guard: 'off',
- longer_battery_life: 'on'
- }
-
- return settings if @env[:machine].provider.pd_version_satisfies?('< 10.1.2')
- settings.merge!(
+ longer_battery_life: 'on',
shared_cloud: 'off',
shared_profile: 'off',
smart_mount: 'off',
sh_app_guest_to_host: 'off',
sh_app_host_to_guest: 'off',
- time_sync: 'off'
- )
-
- return settings if @env[:machine].provider.pd_version_satisfies?('< 11')
- settings.merge!(
startup_view: 'headless',
time_sync: 'on',
disable_timezone_sync: 'on',
shf_host_defined: 'off'
- )
-
- settings
+ }
end
end
end
end
end