1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00
Commit graph

17 commits

Author SHA1 Message Date
Evan Phoenix
d7c13dd63f Fix jruby daemonization. Fixes #918 2016-03-05 16:28:39 -08:00
Evan Phoenix
33e0fa9999 Manage nested configuration better 2016-02-07 14:51:54 -08:00
Evan Phoenix
663666c5b7 Add plugin mechanism and initial plugin 2016-02-06 22:28:02 -08:00
Evan Phoenix
f788af0c8f Continue API cleanup, preparing for 3.0 2016-02-06 19:00:29 -08:00
schneems
023c0c8ecd Fix rack handler test to use port 0 2016-02-04 16:55:10 -06:00
schneems
36711207e8 Fix Puma with rails server
The "default" thread in the handler was interpreted as canonical and took precedence over the `config/puma.rb` file. Fixed by using defaults already present in `configuration.rb` which is used by the Launcher.

We only advertise `Puma.cli_config` when puma is set via the cli. Not sure why but if `cli.rb` hasn't been loaded then we don't need to run that code.

Moving requires to Launcher so it can be called as a standalone file (otherwise we get require errors).
2016-02-04 16:55:10 -06:00
schneems
232bb6b17e Fix bad rebase 2016-02-04 16:55:10 -06:00
schneems
15447fedaa Add an app to the example docs 2016-02-04 16:55:10 -06:00
schneems
1d096be25c argv is an array 2016-02-04 16:55:10 -06:00
schneems
6de8beea1f Docs 2016-02-04 16:55:10 -06:00
schneems
da4a33bb4a More explicit options
The "cli_options" aren't always going to be from a CLI, also this makes it explicit that they are an input, and therefore not cannonical. Switch to `launcher_args` because if I was writing this in Ruby 2.1 they would be kwargs, and the "options" word is confusing since there's enough arguments.
2016-02-04 16:55:10 -06:00
schneems
2632e6a481 Remove unused runner method 2016-02-04 16:55:10 -06:00
schneems
256e886a45 Remove config from CLI
Don't store @cli_options in Launcher (there are too many "options" hashes and their roles are confusing, let's make them more obvious, the arguments passed to cli_options are parsed and turned into @options).
2016-02-04 16:55:10 -06:00
schneems
ffae12c40f Move @argv from attr_accessor to initialize 2016-02-04 16:55:10 -06:00
schneems
f646242821 Move binder to launcher 2016-02-04 16:55:10 -06:00
schneems
6ca4c4ca0a Move more logic out of CLI
Focus on removing @options. Delegate all actions to launcher.
2016-02-04 16:55:10 -06:00
schneems
182c836869 Initial Seperation of CLI and Server Launcher work
This is a WIP. This was the minimum I could do to get all tests to pass without changing any tests. Eventually I think we want all high level process controls to come from launcher, I also think we want another separate object that gets passed to Runner/Single/Cluster that will maintain a relationship with the Launcher. We could use this as the object that also gets exposed to the app like the Embeddable class we talked about earlier. 

Moving forwards i'm planning to port out the CLI tests to only test that they are parsing the correct config and launching servers. I'll port all low level unit tests over to the launcher. Making this change we could either keep all the public methods in CLI that delegate to `@launcher`, I'm guessing not many people are using the internals of CLI and we can take them out. It's your call though.

Wanted to kick this over the fence and see if you had any strong reactions or feelings about this approach.
2016-02-04 16:55:10 -06:00