Module: JDC::App::PushInteractions
- Defined in:
- lib/jdc/cli/app/push/interactions.rb
Instance Method Summary collapse
- #ask_bind_services ⇒ Object
- #ask_command ⇒ Object
- #ask_create_services ⇒ Object
- #ask_domain(app) ⇒ Object
- #ask_host(name) ⇒ Object
- #ask_instances ⇒ Object
- #ask_memory(default) ⇒ Object
- #ask_name ⇒ Object
Instance Method Details
#ask_bind_services ⇒ Object
51 52 53 54 55 |
# File 'lib/jdc/cli/app/push/interactions.rb', line 51 def ask_bind_services return if all_instances.empty? ask "Bind other services to application?", :default => false end |
#ask_command ⇒ Object
38 39 40 41 42 43 44 |
# File 'lib/jdc/cli/app/push/interactions.rb', line 38 def ask_command command = ask("Custom startup command", :default => "none") if command != "none" command end end |
#ask_create_services ⇒ Object
46 47 48 49 |
# File 'lib/jdc/cli/app/push/interactions.rb', line 46 def ask_create_services line unless quiet? ask "Create services for application?", :default => false end |
#ask_domain(app) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/jdc/cli/app/push/interactions.rb', line 13 def ask_domain(app) choices = app.space.domains = { :choices => choices + ["none"], :display => proc { |choice| choice.is_a?(String) ? choice : choice.name }, :allow_other => true } [:default] = choices.first ask "Domain", end |
#ask_host(name) ⇒ Object
7 8 9 10 11 |
# File 'lib/jdc/cli/app/push/interactions.rb', line 7 def ask_host(name) ask "Subdomain", :choices => [name, "none"], :default => name, :allow_other => true end |
#ask_instances ⇒ Object
34 35 36 |
# File 'lib/jdc/cli/app/push/interactions.rb', line 34 def ask_instances ask("Instances", :default => 1) end |
#ask_memory(default) ⇒ Object
27 28 29 30 31 32 |
# File 'lib/jdc/cli/app/push/interactions.rb', line 27 def ask_memory(default) ask("Memory Limit", :choices => memory_choices, :allow_other => true, :default => default || "128M") end |
#ask_name ⇒ Object
3 4 5 |
# File 'lib/jdc/cli/app/push/interactions.rb', line 3 def ask_name ask("Name") end |