Class: Webbynode::Commands::Logs
- Inherits:
-
Webbynode::Command
- Object
- Webbynode::Command
- Webbynode::Commands::Logs
- Defined in:
- lib/webbynode/commands/logs.rb
Constant Summary
Constants inherited from Webbynode::Command
Webbynode::Command::Aliases, Webbynode::Command::CommandError, Webbynode::Command::InvalidCommand, Webbynode::Command::InvalidOption, Webbynode::Command::Settings
Instance Method Summary collapse
Methods inherited from Webbynode::Command
add_alias, #api, class_for, command, command_class_name, description, for, #gemfile, #git, help, inherited, #initialize, #io, #no?, #notify, option, #option, #options, options_help, #param, #param_values, parameter, #params, #params_hash, params_help, #pushand, #remote_executor, requires_initialization!, requires_options!, requires_pushed_application!, #run, #server, setting, #settings, summary, summary_help, usage, #validate_initialization, #validate_options, #yes?
Constructor Details
This class inherits a constructor from Webbynode::Command
Instance Method Details
#execute ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/webbynode/commands/logs.rb', line 6 def execute unless server.application_pushed? io.log "Before being able to run remote commands from your webby, you must first push your application." exit end if io.load_setting('engine') =~ /^rails/ io.log "Connecting to display your Rails application logs..." io.log "" ssh = remote_executor.ssh ssh.logs(pushand.parse_remote_app_name) else io.log "Logs only works for Rails apps." end rescue Webbynode::GitRemoteDoesNotExistError io.log "Remote 'webbynode' doesn't exist. Did you run 'wn init' for this app?" end |