Class: Freighthop::VagrantEnv
- Inherits:
-
Object
- Object
- Freighthop::VagrantEnv
- Defined in:
- lib/freighthop/vagrant_env.rb
Class Method Summary collapse
Class Method Details
.activate! ⇒ Object
9 10 11 12 13 |
# File 'lib/freighthop/vagrant_env.rb', line 9 def self.activate! env.each do |key, val| ENV[key] = val.to_s end end |
.env ⇒ Object
2 3 4 5 6 7 |
# File 'lib/freighthop/vagrant_env.rb', line 2 def self.env { 'VAGRANT_DOTFILE_PATH' => vagrant_dotfile_path, 'VAGRANT_CWD' => vagrant_cwd } end |
.vagrant_cwd ⇒ Object
15 16 17 |
# File 'lib/freighthop/vagrant_env.rb', line 15 def self.vagrant_cwd Freighthop.freighthop_root end |
.vagrant_dotfile_path ⇒ Object
19 20 21 22 23 |
# File 'lib/freighthop/vagrant_env.rb', line 19 def self.vagrant_dotfile_path Pathname('~/.freighthop.d/vagrant')..tap do |path| path.mkpath unless path.directory? end end |