Class: VagrantPlugins::SyncedFolderSSHFS::HostPathFix

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant-sshfs/action_hostpath_fixup.rb

Overview

Class that will massage the data for synced folders that are arbitrary host mounts (contain ssh_host in the options) to make it so that “host path checking” isn’t performed on the vagrant host machine

Instance Method Summary collapse

Constructor Details

#initialize(app, env) ⇒ HostPathFix

Returns a new instance of HostPathFix.



89
90
91
92
# File 'lib/vagrant-sshfs/action_hostpath_fixup.rb', line 89

def initialize(app, env)
  @app    = app
  @logger = Log4r::Logger.new("vagrant::synced_folders::sshfs")
end

Instance Method Details

#call(env) ⇒ Object



94
95
96
97
98
99
100
101
102
103
104
# File 'lib/vagrant-sshfs/action_hostpath_fixup.rb', line 94

def call(env)
  classname = "VagrantPlugins::SyncedFolderSSHFS::HostPathFix"
  @logger.debug("Executing hook within #{classname}")

  # This part is for the IN action call
  HostPathFixCommon.new().loop_and_fix_unfix(env, fix=true)

  # Now continue until the OUT call
  @app.call(env)

end