Module: VMC::App::PushInteractions
- Defined in:
- lib/vmc/cli/app/push/interactions.rb
Instance Method Summary collapse
- #ask_bind_services ⇒ Object
- #ask_command ⇒ Object
- #ask_create_services ⇒ Object
- #ask_framework(choices, default, other) ⇒ Object
- #ask_instances ⇒ Object
- #ask_memory(default) ⇒ Object
- #ask_name ⇒ Object
- #ask_runtime(choices, default, other) ⇒ Object
- #ask_url(name) ⇒ Object
Instance Method Details
#ask_bind_services ⇒ Object
52 53 54 55 56 |
# File 'lib/vmc/cli/app/push/interactions.rb', line 52 def ask_bind_services return if all_instances.empty? ask "Bind other services to application?", :default => false end |
#ask_command ⇒ Object
43 44 45 |
# File 'lib/vmc/cli/app/push/interactions.rb', line 43 def ask_command ask("Startup command") end |
#ask_create_services ⇒ Object
47 48 49 50 |
# File 'lib/vmc/cli/app/push/interactions.rb', line 47 def ask_create_services line unless quiet? ask "Create services for application?", :default => false end |
#ask_framework(choices, default, other) ⇒ Object
35 36 37 |
# File 'lib/vmc/cli/app/push/interactions.rb', line 35 def ask_framework(choices, default, other) ask_with_other("Framework", client.frameworks, choices, default, other) end |
#ask_instances ⇒ Object
31 32 33 |
# File 'lib/vmc/cli/app/push/interactions.rb', line 31 def ask_instances ask("Instances", :default => 1) end |
#ask_memory(default) ⇒ Object
24 25 26 27 28 29 |
# File 'lib/vmc/cli/app/push/interactions.rb', line 24 def ask_memory(default) ask("Memory Limit", :choices => memory_choices, :allow_other => true, :default => default || "64M") end |
#ask_name ⇒ Object
3 4 5 |
# File 'lib/vmc/cli/app/push/interactions.rb', line 3 def ask_name ask("Name") end |
#ask_runtime(choices, default, other) ⇒ Object
39 40 41 |
# File 'lib/vmc/cli/app/push/interactions.rb', line 39 def ask_runtime(choices, default, other) ask_with_other("Runtime", client.runtimes, choices, default, other) end |
#ask_url(name) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/vmc/cli/app/push/interactions.rb', line 7 def ask_url(name) choices = url_choices(name) = { :choices => choices + ["none"], :allow_other => true } [:default] = choices.first if choices.size == 1 url = ask "URL", unless url == "none" url end end |