Class: VagrantPlugins::Jenv::Provisioner

Inherits:
Object
  • Object
show all
Defined in:
lib/vagrant-jenv/provisioner.rb

Instance Method Summary collapse

Instance Method Details

#provisionObject



4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/vagrant-jenv/provisioner.rb', line 4

def provision
  @machine.communicate.execute('if [[ ! -d "${HOME}/.jenv" ]]; then curl -L -s get.jenv.io | bash ; fi') do |type, data|
    @machine.env.ui.info data
  end
  @machine.env.ui.info "Installing jenv candidates...}"
  @machine.communicate.execute('jenv config auto true')
  @machine.communicate.execute('jenv repo update')
  config.candidates.each do |pair|
    @machine.communicate.execute("jenv install #{pair}")
    @machine.env.ui.info "#{pair} installed"
  end
end