Class: Quails::Command::ServerCommand
- Defined in:
- railties/lib/rails/commands/server/server_command.rb
Overview
:nodoc:
Constant Summary collapse
- DEFAULT_PORT =
3000- DEFAULT_PID_PATH =
"tmp/pids/server.pid".freeze
Instance Method Summary collapse
-
#initialize(args = [], local_options = {}, config = {}) ⇒ ServerCommand
constructor
A new instance of ServerCommand.
- #perform ⇒ Object
Methods inherited from Base
base_name, command_name, default_command_root, desc, engine?, executable, #help, hide_command!, inherited, namespace, perform, printing_commands, usage_path
Methods included from Actions
#load_generators, #load_tasks, #require_application_and_environment!, #set_application_directory!
Constructor Details
#initialize(args = [], local_options = {}, config = {}) ⇒ ServerCommand
Returns a new instance of ServerCommand.
131 132 133 134 135 136 |
# File 'railties/lib/rails/commands/server/server_command.rb', line 131 def initialize(args = [], = {}, config = {}) @original_options = super @server = self.args.shift @log_stdout = [:daemon].blank? && ([:environment] || Quails.env) == "development" end |
Instance Method Details
#perform ⇒ Object
138 139 140 141 142 143 144 145 146 147 148 |
# File 'railties/lib/rails/commands/server/server_command.rb', line 138 def perform set_application_directory! prepare_restart Quails::Server.new().tap do |server| # Require application after server sets environment to propagate # the --environment option. require APP_PATH Dir.chdir(Quails.application.root) server.start end end |