File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
lib/vagrant-hostmanager/action Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change 1
- require 'vagrant-hostmanager/hosts_file'
1
+ require 'vagrant-hostmanager/hosts_file/updater '
2
2
require 'vagrant-hostmanager/util'
3
3
4
4
module VagrantPlugins
5
5
module HostManager
6
6
module Action
7
7
class UpdateHost
8
- include HostsFile
9
8
10
9
def initialize ( app , env )
11
10
@app = app
12
- @global_env = env [ :global_env ]
13
- @provider = env [ :provider ]
14
- @config = Util . get_config ( @global_env )
11
+
12
+ global_env = env [ :global_env ]
13
+ @config = Util . get_config ( global_env )
14
+ @updater = HostsFile ::Updater . new ( global_env , env [ :provider ] )
15
+
15
16
@logger = Log4r ::Logger . new ( 'vagrant::hostmanager::update_host' )
16
17
end
17
18
18
19
def call ( env )
19
20
if @config . hostmanager . manage_host?
20
21
env [ :ui ] . info I18n . t ( 'vagrant_hostmanager.action.update_host' )
21
- update_host
22
+ @updater . update_host
22
23
end
23
24
24
25
@app . call ( env )
25
26
end
26
27
end
27
28
end
28
29
end
29
- end
30
-
30
+ end
You can’t perform that action at this time.
0 commit comments