Class: VMCAppfog::Download
- Inherits:
-
VMC::CLI
- Object
- VMC::CLI
- VMCAppfog::Download
- Defined in:
- lib/appfog-vmc-plugin/commands/download.rb
Instance Method Summary collapse
Instance Method Details
#ask_app ⇒ Object
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 |
#download ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/appfog-vmc-plugin/commands/download.rb', line 8 def download app = input[:app] path = File.(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 |