class Freighthop::VagrantEnv

Public Class Methods

activate!() click to toggle source
# File lib/freighthop/vagrant_env.rb, line 9
def self.activate!
  env.each do |key, val|
    ENV[key] = val.to_s
  end
end
env() click to toggle source
# File lib/freighthop/vagrant_env.rb, line 2
def self.env
  {
    'VAGRANT_DOTFILE_PATH' => vagrant_dotfile_path,
    'VAGRANT_CWD'          => vagrant_cwd
  }
end
vagrant_cwd() click to toggle source
# File lib/freighthop/vagrant_env.rb, line 15
def self.vagrant_cwd
  Freighthop.freighthop_root
end
vagrant_dotfile_path() click to toggle source
# File lib/freighthop/vagrant_env.rb, line 19
def self.vagrant_dotfile_path
  Pathname('~/.freighthop.d/vagrant').expand_path.tap do |path|
    path.mkpath unless path.directory?
  end
end