Class: EY::CLI::Web
Constant Summary
Constants inherited from Thor
Thor::DynamicTask, Thor::HELP_MAPPINGS, Thor::HiddenTask, Thor::THOR_RESERVED_WORDS, Thor::UndefinedTaskError, Thor::VERSION
Instance Attribute Summary
Attributes included from Thor::Base
#args, #options, #parent_options
Instance Method Summary collapse
Methods inherited from Thor
check_unknown_options!, check_unknown_options?, command_help, default_command, desc, #help, help, long_desc, map, method_option, method_options, package_name, printable_commands, register, stop_on_unknown_option!, stop_on_unknown_option?, subcommand, subcommands
Methods included from Thor::Base
included, #initialize, register_klass_file, shell, shell=, subclass_files, subclasses
Instance Method Details
#disable ⇒ Object
47 48 49 50 51 |
# File 'lib/engineyard/cli/web.rb', line 47 def disable app_env = fetch_app_environment([:app], [:environment], [:account]) ui.info "Putting up maintenance page for '#{app_env.app.name}' in '#{app_env.environment.name}'" serverside_runner(app_env, [:verbose]).put_up_maintenance_page.call(ui.out, ui.err) end |
#enable ⇒ Object
17 18 19 20 21 |
# File 'lib/engineyard/cli/web.rb', line 17 def enable app_env = fetch_app_environment([:app], [:environment], [:account]) ui.info "Taking down maintenance page for '#{app_env.app.name}' in '#{app_env.environment.name}'" serverside_runner(app_env, [:verbose]).take_down_maintenance_page.call(ui.out, ui.err) end |
#restart ⇒ Object
73 74 75 76 77 78 79 80 81 |
# File 'lib/engineyard/cli/web.rb', line 73 def restart app_env = fetch_app_environment([:app], [:environment], [:account]) ui.info "Restarting servers on #{app_env.hierarchy_name}" if serverside_runner(app_env, [:verbose]).restart.call(ui.out, ui.err) ui.info "Restart complete" else raise EY::Error, "Restart failed" end end |