jun-puma 1.0.1-java → 1.0.2-java

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. checksums.yaml +4 -4
  2. data/lib/puma/puma_http11.jar +0 -0
  3. metadata +3 -81
  4. data/bin/puma-wild +0 -25
  5. data/docs/architecture.md +0 -74
  6. data/docs/compile_options.md +0 -55
  7. data/docs/deployment.md +0 -102
  8. data/docs/fork_worker.md +0 -31
  9. data/docs/images/puma-connection-flow-no-reactor.png +0 -0
  10. data/docs/images/puma-connection-flow.png +0 -0
  11. data/docs/images/puma-general-arch.png +0 -0
  12. data/docs/jungle/README.md +0 -9
  13. data/docs/jungle/rc.d/README.md +0 -74
  14. data/docs/jungle/rc.d/puma +0 -61
  15. data/docs/jungle/rc.d/puma.conf +0 -10
  16. data/docs/kubernetes.md +0 -78
  17. data/docs/nginx.md +0 -80
  18. data/docs/plugins.md +0 -38
  19. data/docs/rails_dev_mode.md +0 -28
  20. data/docs/restart.md +0 -64
  21. data/docs/signals.md +0 -98
  22. data/docs/stats.md +0 -142
  23. data/docs/systemd.md +0 -244
  24. data/docs/testing_benchmarks_local_files.md +0 -150
  25. data/docs/testing_test_rackup_ci_files.md +0 -36
  26. data/ext/puma_http11/PumaHttp11Service.java +0 -17
  27. data/ext/puma_http11/ext_help.h +0 -15
  28. data/ext/puma_http11/http11_parser.c +0 -1057
  29. data/ext/puma_http11/http11_parser.h +0 -65
  30. data/ext/puma_http11/http11_parser.java.rl +0 -145
  31. data/ext/puma_http11/http11_parser.rl +0 -149
  32. data/ext/puma_http11/http11_parser_common.rl +0 -54
  33. data/ext/puma_http11/mini_ssl.c +0 -832
  34. data/ext/puma_http11/no_ssl/PumaHttp11Service.java +0 -15
  35. data/ext/puma_http11/org/jruby/puma/Http11.java +0 -226
  36. data/ext/puma_http11/org/jruby/puma/Http11Parser.java +0 -455
  37. data/ext/puma_http11/org/jruby/puma/MiniSSL.java +0 -508
  38. data/ext/puma_http11/puma_http11.c +0 -492
  39. data/lib/puma/app/status.rb +0 -96
  40. data/lib/puma/binder.rb +0 -501
  41. data/lib/puma/cli.rb +0 -243
  42. data/lib/puma/client.rb +0 -632
  43. data/lib/puma/cluster/worker.rb +0 -182
  44. data/lib/puma/cluster/worker_handle.rb +0 -97
  45. data/lib/puma/cluster.rb +0 -562
  46. data/lib/puma/commonlogger.rb +0 -115
  47. data/lib/puma/configuration.rb +0 -391
  48. data/lib/puma/const.rb +0 -289
  49. data/lib/puma/control_cli.rb +0 -316
  50. data/lib/puma/detect.rb +0 -45
  51. data/lib/puma/dsl.rb +0 -1204
  52. data/lib/puma/error_logger.rb +0 -113
  53. data/lib/puma/events.rb +0 -57
  54. data/lib/puma/io_buffer.rb +0 -46
  55. data/lib/puma/jruby_restart.rb +0 -27
  56. data/lib/puma/json_serialization.rb +0 -96
  57. data/lib/puma/launcher/bundle_pruner.rb +0 -104
  58. data/lib/puma/launcher.rb +0 -484
  59. data/lib/puma/log_writer.rb +0 -147
  60. data/lib/puma/minissl/context_builder.rb +0 -95
  61. data/lib/puma/minissl.rb +0 -458
  62. data/lib/puma/null_io.rb +0 -61
  63. data/lib/puma/plugin/systemd.rb +0 -90
  64. data/lib/puma/plugin/tmp_restart.rb +0 -36
  65. data/lib/puma/plugin.rb +0 -111
  66. data/lib/puma/rack/builder.rb +0 -297
  67. data/lib/puma/rack/urlmap.rb +0 -93
  68. data/lib/puma/rack_default.rb +0 -24
  69. data/lib/puma/reactor.rb +0 -125
  70. data/lib/puma/request.rb +0 -671
  71. data/lib/puma/runner.rb +0 -213
  72. data/lib/puma/sd_notify.rb +0 -149
  73. data/lib/puma/server.rb +0 -664
  74. data/lib/puma/single.rb +0 -69
  75. data/lib/puma/state_file.rb +0 -68
  76. data/lib/puma/thread_pool.rb +0 -434
  77. data/lib/puma/util.rb +0 -141
  78. data/lib/puma.rb +0 -78
  79. data/lib/rack/handler/puma.rb +0 -141
  80. data/tools/Dockerfile +0 -16
  81. data/tools/trickletest.rb +0 -44
data/lib/puma/cli.rb DELETED
@@ -1,243 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'optparse'
4
- require 'uri'
5
-
6
- require_relative '../puma'
7
- require_relative 'configuration'
8
- require_relative 'launcher'
9
- require_relative 'const'
10
- require_relative 'log_writer'
11
-
12
- module Puma
13
- class << self
14
- # The CLI exports a Puma::Configuration instance here to allow
15
- # apps to pick it up. An app must load this object conditionally
16
- # because it is not set if the app is launched via any mechanism
17
- # other than the CLI class.
18
- attr_accessor :cli_config
19
- end
20
-
21
- # Handles invoke a Puma::Server in a command line style.
22
- #
23
- class CLI
24
- # Create a new CLI object using +argv+ as the command line
25
- # arguments.
26
- #
27
- def initialize(argv, log_writer = LogWriter.stdio, events = Events.new)
28
- @debug = false
29
- @argv = argv.dup
30
- @log_writer = log_writer
31
- @events = events
32
-
33
- @conf = nil
34
-
35
- @stdout = nil
36
- @stderr = nil
37
- @append = false
38
-
39
- @control_url = nil
40
- @control_options = {}
41
-
42
- setup_options
43
-
44
- begin
45
- @parser.parse! @argv
46
-
47
- if file = @argv.shift
48
- @conf.configure do |user_config, file_config|
49
- file_config.rackup file
50
- end
51
- end
52
- rescue UnsupportedOption
53
- exit 1
54
- end
55
-
56
- @conf.configure do |user_config, file_config|
57
- if @stdout || @stderr
58
- user_config.stdout_redirect @stdout, @stderr, @append
59
- end
60
-
61
- if @control_url
62
- user_config.activate_control_app @control_url, @control_options
63
- end
64
- end
65
-
66
- @launcher = Puma::Launcher.new(@conf, :log_writer => @log_writer, :events => @events, :argv => argv)
67
- end
68
-
69
- attr_reader :launcher
70
-
71
- # Parse the options, load the rackup, start the server and wait
72
- # for it to finish.
73
- #
74
- def run
75
- @launcher.run
76
- end
77
-
78
- private
79
- def unsupported(str)
80
- @log_writer.error(str)
81
- raise UnsupportedOption
82
- end
83
-
84
- def configure_control_url(command_line_arg)
85
- if command_line_arg
86
- @control_url = command_line_arg
87
- elsif Puma.jruby?
88
- unsupported "No default url available on JRuby"
89
- end
90
- end
91
-
92
- # Build the OptionParser object to handle the available options.
93
- #
94
-
95
- def setup_options
96
- @conf = Configuration.new({}, {events: @events}) do |user_config, file_config|
97
- @parser = OptionParser.new do |o|
98
- o.on "-b", "--bind URI", "URI to bind to (tcp://, unix://, ssl://)" do |arg|
99
- user_config.bind arg
100
- end
101
-
102
- o.on "--bind-to-activated-sockets [only]", "Bind to all activated sockets" do |arg|
103
- user_config.bind_to_activated_sockets(arg || true)
104
- end
105
-
106
- o.on "-C", "--config PATH", "Load PATH as a config file" do |arg|
107
- file_config.load arg
108
- end
109
-
110
- # Identical to supplying --config "-", but more semantic
111
- o.on "--no-config", "Prevent Puma from searching for a config file" do |arg|
112
- file_config.load "-"
113
- end
114
-
115
- o.on "--control-url URL", "The bind url to use for the control server. Use 'auto' to use temp unix server" do |arg|
116
- configure_control_url(arg)
117
- end
118
-
119
- o.on "--control-token TOKEN",
120
- "The token to use as authentication for the control server" do |arg|
121
- @control_options[:auth_token] = arg
122
- end
123
-
124
- o.on "--debug", "Log lowlevel debugging information" do
125
- user_config.debug
126
- end
127
-
128
- o.on "--dir DIR", "Change to DIR before starting" do |d|
129
- user_config.directory d
130
- end
131
-
132
- o.on "-e", "--environment ENVIRONMENT",
133
- "The environment to run the Rack app on (default development)" do |arg|
134
- user_config.environment arg
135
- end
136
-
137
- o.on "-f", "--fork-worker=[REQUESTS]", OptionParser::DecimalInteger,
138
- "Fork new workers from existing worker. Cluster mode only",
139
- "Auto-refork after REQUESTS (default 1000)" do |*args|
140
- user_config.fork_worker(*args.compact)
141
- end
142
-
143
- o.on "-I", "--include PATH", "Specify $LOAD_PATH directories" do |arg|
144
- $LOAD_PATH.unshift(*arg.split(':'))
145
- end
146
-
147
- o.on "--idle-timeout SECONDS", "Number of seconds until the next request before automatic shutdown" do |arg|
148
- user_config.idle_timeout arg
149
- end
150
-
151
- o.on "-p", "--port PORT", "Define the TCP port to bind to",
152
- "Use -b for more advanced options" do |arg|
153
- user_config.bind "tcp://#{Configuration::DEFAULTS[:tcp_host]}:#{arg}"
154
- end
155
-
156
- o.on "--pidfile PATH", "Use PATH as a pidfile" do |arg|
157
- user_config.pidfile arg
158
- end
159
-
160
- o.on "--preload", "Preload the app. Cluster mode only" do
161
- user_config.preload_app!
162
- end
163
-
164
- o.on "--prune-bundler", "Prune out the bundler env if possible" do
165
- user_config.prune_bundler
166
- end
167
-
168
- o.on "--extra-runtime-dependencies GEM1,GEM2", "Defines any extra needed gems when using --prune-bundler" do |arg|
169
- user_config.extra_runtime_dependencies arg.split(',')
170
- end
171
-
172
- o.on "-q", "--quiet", "Do not log requests internally (default true)" do
173
- user_config.quiet
174
- end
175
-
176
- o.on "-v", "--log-requests", "Log requests as they occur" do
177
- user_config.log_requests
178
- end
179
-
180
- o.on "-R", "--restart-cmd CMD",
181
- "The puma command to run during a hot restart",
182
- "Default: inferred" do |cmd|
183
- user_config.restart_command cmd
184
- end
185
-
186
- o.on "-s", "--silent", "Do not log prompt messages other than errors" do
187
- @log_writer = LogWriter.new(NullIO.new, $stderr)
188
- end
189
-
190
- o.on "-S", "--state PATH", "Where to store the state details" do |arg|
191
- user_config.state_path arg
192
- end
193
-
194
- o.on '-t', '--threads INT', "min:max threads to use (default 0:16)" do |arg|
195
- min, max = arg.split(":")
196
- if max
197
- user_config.threads min, max
198
- else
199
- user_config.threads min, min
200
- end
201
- end
202
-
203
- o.on "--early-hints", "Enable early hints support" do
204
- user_config.early_hints
205
- end
206
-
207
- o.on "-V", "--version", "Print the version information" do
208
- puts "puma version #{Puma::Const::VERSION}"
209
- exit 0
210
- end
211
-
212
- o.on "-w", "--workers COUNT",
213
- "Activate cluster mode: How many worker processes to create" do |arg|
214
- user_config.workers arg
215
- end
216
-
217
- o.on "--tag NAME", "Additional text to display in process listing" do |arg|
218
- user_config.tag arg
219
- end
220
-
221
- o.on "--redirect-stdout FILE", "Redirect STDOUT to a specific file" do |arg|
222
- @stdout = arg.to_s
223
- end
224
-
225
- o.on "--redirect-stderr FILE", "Redirect STDERR to a specific file" do |arg|
226
- @stderr = arg.to_s
227
- end
228
-
229
- o.on "--[no-]redirect-append", "Append to redirected files" do |val|
230
- @append = val
231
- end
232
-
233
- o.banner = "puma <options> <rackup file>"
234
-
235
- o.on_tail "-h", "--help", "Show help" do
236
- $stdout.puts o
237
- exit 0
238
- end
239
- end
240
- end
241
- end
242
- end
243
- end