Class: VagrantPlugins::HostPath::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant-host-path/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



24
25
26
27
28
29
# File 'lib/vagrant-host-path/config.rb', line 24

def initialize
  @env_key      = UNSET_VALUE
  @path_file    = UNSET_VALUE
  @profile_path = UNSET_VALUE
  @temp_upload_path = UNSET_VALUE
end

Instance Attribute Details

#env_keyString

The name of environment variable to set.

Returns:

  • (String)


7
8
9
# File 'lib/vagrant-host-path/config.rb', line 7

def env_key
  @env_key
end

#path_fileString

The path to the tmp file used to store the actual host path.

Returns:

  • (String)


12
13
14
# File 'lib/vagrant-host-path/config.rb', line 12

def path_file
  @path_file
end

#profile_pathString

The path to a profile file (typically inside of a /etc/profile.d/ dir).

Returns:

  • (String)


17
18
19
# File 'lib/vagrant-host-path/config.rb', line 17

def profile_path
  @profile_path
end

#temp_upload_pathString

The path to the tmp file used to upload profile path.

Returns:

  • (String)


22
23
24
# File 'lib/vagrant-host-path/config.rb', line 22

def temp_upload_path
  @temp_upload_path
end

Instance Method Details

#finalize!Object



31
32
33
34
35
36
# File 'lib/vagrant-host-path/config.rb', line 31

def finalize!
  @env_key      = "VAGRANT_HOST_PATH" if @env_key == UNSET_VALUE
  @path_file    = "/tmp/.vagrant-host-path" if @path_file == UNSET_VALUE
  @profile_path = "/etc/profile.d/vagrant-host-path.sh" if @profile_path == UNSET_VALUE
  @temp_upload_path = "/tmp/vagrant-host-path-profile.sh" if @temp_upload_path == UNSET_VALUE
end