Class: VMCAppfog::Download

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

Instance Method Summary collapse

Instance Method Details

#ask_appObject



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

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

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

#downloadObject



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

def download
  app = input[:app]
  path = File.expand_path(input[:path] || "#{app.name}.zip")
  with_progress("Downloading last pushed source code to #{c(path, :path)}") do
    client.app_download(app.name, path)
  end
end