aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/commands/server
Commit message (Collapse)AuthorAgeFilesLines
* Make `restart` and `dev:cache` tasks work when customizing pid file pathyuuji.yaginuma2017-08-211-1/+7
| | | | | | | | | | Originally, it hard-coded pid file path. It can not be removed when customizing pid file path. But rake task can not get pid file path. Therefore, do not remove file in rake task, makes it possible to judge whether it is restart from the argument of the command and removes the file in server command. Fixes #29306
* Adding frozen_string_literal pragma to Railties.Pat Allan2017-08-141-0/+2
|
* Deprecate support of older `config.ru`yuuji.yaginuma2017-08-081-1/+8
| | | | | | | | Since Rails 4.0, `config.ru` generated by default uses instances of `Rails.application`. Therefore, I think that it is good to deprecate the old behavior. Related: #9669
* Do not show URL in boot info when using Pumayuuji.yaginuma2017-07-241-2/+6
| | | | | | | | | | | Puma has its own configuration file(e.g. `config/puma.rb`). Can define a port and a URL to bind in the configuration file. Therefore, on Rails side, can not grasp which URI to bind finally. Because of that, it may show a URL different from the actually bound URL, so I think that it is better not to show it. Fixes #29880
* [Railties] require => require_relativeAkira Matsuda2017-07-011-1/+1
|
* Correctly set user_supplied_options when there is no whitespace in option ↵yuuji.yaginuma2017-05-241-2/+9
| | | | | | | | | | specification Current `user_supplied_options` method can not set the value correctly if there is no space between option and value (e.g., `-p9000`). This makes it possible to set the value correctly in the case like the above. Fixes #29138
* 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