Skip to content

Commit 04dee9b

Browse files
committed
migrate UpdateGuest action to use Updater class
1 parent f46b0aa commit 04dee9b

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

lib/vagrant-hostmanager/action/update_guest.rb

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,23 @@
1-
require 'vagrant-hostmanager/hosts_file'
1+
require 'vagrant-hostmanager/hosts_file/updater'
22
require 'vagrant-hostmanager/util'
33

44
module VagrantPlugins
55
module HostManager
66
module Action
77
class UpdateGuest
8-
include HostsFile
98

109
def initialize(app, env)
1110
@app = app
1211
@machine = env[:machine]
13-
@global_env = @machine.env
14-
@provider = env[:provider]
15-
@config = Util.get_config(@global_env)
12+
@updater = HostsFile::Updater.new(@machine.env, env[:provider])
1613
@logger = Log4r::Logger.new('vagrant::hostmanager::update_guest')
1714
end
1815

1916
def call(env)
2017
env[:ui].info I18n.t('vagrant_hostmanager.action.update_guest', {
2118
:name => @machine.name
2219
})
23-
update_guest(@machine)
20+
@updater.update_guest(@machine)
2421

2522
@app.call(env)
2623
end

0 commit comments

Comments
 (0)