Class: VMCAppfog::Pull

Inherits:
VMC::CLI
  • Object
show all
Defined in:
lib/appfog-vmc-plugin/commands/pull.rb

Instance Method Summary collapse

Instance Method Details

#ask_appObject



17
18
19
20
21
22
23
# File 'lib/appfog-vmc-plugin/commands/pull.rb', line 17

def ask_app
  apps = client.apps
  fail "No applications." if apps.empty?

  ask("Which application?", :choices => apps.sort_by(&:name),
      :display => proc(&:name))
end

#pullObject



8
9
10
11
12
13
14
15
# File 'lib/appfog-vmc-plugin/commands/pull.rb', line 8

def pull
  app = input[:app]
  path = File.expand_path(input[:path] || app.name)

  with_progress("Pulling last pushed source code to #{c(app.name, :name)}") do
    client.app_pull(app.name, path)
  end
end