aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/commands/server
Commit message (Collapse)AuthorAgeFilesLines
* CLI arg `--port` has precedence over env `PORT`.koshigoe2017-05-011-2/+3
|
* CLI arg "host" has precedence over ENV var "host"Jon Moss2017-03-211-2/+4
| | | | | | | This is a regression from when the server command switched to its own argument parser, as opposed to Rack's. Rack's argument parser, when provided with a "host" argument, gives that value precedence over environment variables.
* `HOST` must be all capital lettersyuuji.yaginuma2017-03-011-1/+1
| | | | Ref: https://github.com/rails/rails/blob/master/railties/lib/rails/commands/server/server_command.rb#L194
* Set correct host except development environmentyuuji.yaginuma2017-02-271-3/+7
| | | | | | | | Currently `localhost` is used for the default host in all environments. But up to Rails 5.0, `0.0.0.0` is used except for development. So fixed to use the same value as 5.0. Fixes #28184
* [close #24435] Send user_supplied_options to serverschneems2017-02-241-11/+44
| | | | | | | | | | | | | | | | | | Currently when Puma gets a `:Port` it doesn't know if it is Rails' default port or if it is one that is specified by a user. Because of this it assumes that the port passed in is always a user defined port and therefor 3000 always "wins" even if you specify `port` inside of the `config/puma.rb` file when booting your server with `rails s`. The fix is to record the options that are explicitly passed in from the user and pass those to the Puma server (or all servers really). Puma then has enough information to know when `:Port` is the default and when it is user defined. I went ahead and did this for all values rails server exposes as server side options for completeness. The hardest thing was converting the input say `-p` or `--port` into the appropriate "name", in this case `Port`. There may be a more straightforward way to do this with Thor, but I'm not an expert here. Move logic for parsing user options to method Better variable name for iteration Explicitly test `--port` user input ✂️ Update array if environment variables are used
* make all rails commands work in engineyuuji.yaginuma2017-01-091-2/+6
| | | | | | | | Currently, all rails commands can be executed in engine, but `server`, `console`, `dbconsole` and `runner` do not work. This make all rails commands work in engine. Related to #22588
* use Thor option parser in server commands parseyuuji.yaginuma2016-12-241-54/+67
| | | | | | | | | | The `ServerCommand` inherits Thor, but currently does not use Thor option parser. Therefore, if leave the argument of Thor as it is, it becomes an error by the argument checking of Thor. To avoid it, to use the Thor option parser instead of reimplementing it. Fixes #26964
* Hide commands from API site.Kasper Timm Hansen2016-10-281-2/+2
| | | | | They're just barren on the site and confure more than guide, instead rely on the built in --help to guide users.
* remove `mongrel` once againyuuji.yaginuma2016-09-291-1/+1
| | | | `mongrel` was removed in #26408. But have back accidentally in #26414.
* Apply Rafaels review fixes.Kasper Timm Hansen2016-09-251-1/+3
|
* Per Dr. Eileen's orders :)Kasper Timm Hansen2016-09-251-1/+0
| | | | Prescribed some review fixes for myself!
* Initial command structure.Kasper Timm Hansen2016-09-251-0/+159