Class: ORS::Commands::Console

Inherits:
Base
  • Object
show all
Defined in:
lib/ors/commands/console.rb

Instance Method Summary collapse

Methods inherited from Base

#help, #help_options, #setup

Methods included from Base::ClassMethods

#run, #run_without_setup

Methods included from Helpers

#build_command, #execute_command, #execute_in_parallel, #fatal, #info

Methods included from Helpers::CommandHelpers

#bundle_install, #restart_server, #run_migrations, #setup_repo, #setup_ruby, #start_server, #stop_server, #update_code

Methods included from Helpers::PrepareHelpers

#prepare_environment, #prepare_environment_with_rvm, #prepare_initial_environment

Methods included from Helpers::ParseHelpers

#parse_remote_and_or_branch

Instance Method Details

#descriptionObject



15
16
17
# File 'lib/ors/commands/console.rb', line 15

def description
  "Replaces current process and runs rails console."
end

#executeObject



4
5
6
7
8
9
# File 'lib/ors/commands/console.rb', line 4

def execute
  execute_command(ORS.config[:console_server],
                  prepare_environment_with_rvm,
                  %(if [ -f script/rails ]; then bundle exec rails console #{ORS.config[:environment]}; else ./script/console #{ORS.config[:environment]}; fi),
                  :exec => true)
end

#usageObject



11
12
13
# File 'lib/ors/commands/console.rb', line 11

def usage
  "./ors console [options]"
end