Module: Capistrano::DSL::Gce

Defined in:
lib/cap-gce/capistrano.rb

Instance Method Summary collapse

Instance Method Details

#envObject



28
29
30
# File 'lib/cap-gce/capistrano.rb', line 28

def env
  Configuration.env
end

#gce_handlerObject



17
18
19
# File 'lib/cap-gce/capistrano.rb', line 17

def gce_handler
  @gce_handler ||= CapGCE::GCEHandler.new
end

#gce_role(name, options = {}) ⇒ Object



21
22
23
24
25
26
# File 'lib/cap-gce/capistrano.rb', line 21

def gce_role(name, options = {})
  gce_handler.get_servers_for_role(name).each do |server|
    env.role(name, CapGCE::Utils.contact_point(server),
             options_with_instance_id(options, server))
  end
end