Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Prioritise CLI options over comment options
There are four sources of options for `Rack::Server`: 1. In the constructor, as a hash: `Rack::Server.new(server: 'thin')` 2. On the command line: `bundle exec rackup --server thin` 3. In a magic comment on the first line of config.ru (or whichever config file was used): `#\ --server thin` 4. `Rack::Server#default_options` If 1 is provided, 4 and 2 won't be used. Previously, the order of precedence - earlier 'wins' - was either: * 1, 3 * 3, 2, 4 This changes the latter to 2, 3, 4. This allows an app to specify a default port in the magic comment, but for that to be changed when using the `rackup` script.
- Loading branch information
Showing
5 changed files
with
58 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#\ -d | ||
#\ -d -p 2929 --env test | ||
run lambda { |env| [200, {'Content-Type' => 'text/plain'}, ['OK']] } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters