Class: Cuoco::Bootstrapper

Inherits:
Object
  • Object
show all
Defined in:
lib/cuoco/bootstrapper.rb

Constant Summary collapse

BOOTSTRAP_COMMAND =
"\
  if ! command -v chef-solo &>/dev/null;\
  then\
    curl -L http://opscode.com/chef/install.sh | sudo -p \"sudo password: \" bash;\
    if ! command -v chef-solo &>/dev/null;\
    then\
      false;\
    else\
      true;\
    fi;\
  else\
    true;\
  fi\
".gsub(/ +/,' ')

Instance Method Summary collapse

Constructor Details

#initialize(capistrano) ⇒ Bootstrapper

Returns a new instance of Bootstrapper.



18
19
20
# File 'lib/cuoco/bootstrapper.rb', line 18

def initialize(capistrano)
  @cap = capistrano
end

Instance Method Details

#bootstrapObject



22
23
24
# File 'lib/cuoco/bootstrapper.rb', line 22

def bootstrap
  @cap.run(BOOTSTRAP_COMMAND, :shell => '/bin/bash')
end