puma 7.0.4 → 8.0.0

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 (49) hide show
  1. checksums.yaml +4 -4
  2. data/History.md +139 -0
  3. data/README.md +25 -13
  4. data/docs/5.0-Upgrade.md +98 -0
  5. data/docs/6.0-Upgrade.md +56 -0
  6. data/docs/7.0-Upgrade.md +52 -0
  7. data/docs/8.0-Upgrade.md +100 -0
  8. data/docs/deployment.md +58 -23
  9. data/docs/grpc.md +62 -0
  10. data/docs/images/favicon.svg +1 -0
  11. data/docs/images/running-puma.svg +1 -0
  12. data/docs/images/standard-logo.svg +1 -0
  13. data/docs/jungle/README.md +1 -1
  14. data/docs/kubernetes.md +5 -12
  15. data/docs/plugins.md +2 -2
  16. data/docs/signals.md +10 -10
  17. data/docs/stats.md +2 -2
  18. data/docs/systemd.md +3 -3
  19. data/ext/puma_http11/http11_parser.java.rl +51 -65
  20. data/ext/puma_http11/org/jruby/puma/EnvKey.java +241 -0
  21. data/ext/puma_http11/org/jruby/puma/Http11.java +168 -104
  22. data/ext/puma_http11/org/jruby/puma/Http11Parser.java +71 -85
  23. data/ext/puma_http11/puma_http11.c +101 -109
  24. data/lib/puma/app/status.rb +10 -2
  25. data/lib/puma/cli.rb +1 -1
  26. data/lib/puma/client.rb +111 -91
  27. data/lib/puma/client_env.rb +171 -0
  28. data/lib/puma/cluster/worker.rb +10 -9
  29. data/lib/puma/cluster/worker_handle.rb +2 -2
  30. data/lib/puma/cluster.rb +12 -11
  31. data/lib/puma/cluster_accept_loop_delay.rb +17 -18
  32. data/lib/puma/configuration.rb +86 -16
  33. data/lib/puma/const.rb +2 -2
  34. data/lib/puma/control_cli.rb +1 -1
  35. data/lib/puma/detect.rb +11 -0
  36. data/lib/puma/dsl.rb +115 -18
  37. data/lib/puma/launcher.rb +35 -30
  38. data/lib/puma/reactor.rb +3 -12
  39. data/lib/puma/{request.rb → response.rb} +25 -194
  40. data/lib/puma/runner.rb +1 -1
  41. data/lib/puma/server.rb +102 -63
  42. data/lib/puma/server_plugin_control.rb +32 -0
  43. data/lib/puma/single.rb +2 -2
  44. data/lib/puma/state_file.rb +3 -2
  45. data/lib/puma/thread_pool.rb +139 -24
  46. data/lib/rack/handler/puma.rb +1 -1
  47. data/tools/Dockerfile +13 -5
  48. metadata +16 -5
  49. data/ext/puma_http11/ext_help.h +0 -15
data/tools/Dockerfile CHANGED
@@ -1,18 +1,26 @@
1
1
  # Use this Dockerfile to create minimal reproductions of issues
2
+ # Build (MRI): docker build -f tools/Dockerfile .
3
+ # Build (JRuby): docker build -f tools/Dockerfile --build-arg RUBY_IMAGE=jruby:9.4 .
2
4
 
3
- FROM ruby:3.2
5
+ ARG RUBY_IMAGE=ruby:latest
6
+ FROM ${RUBY_IMAGE}
4
7
 
5
- RUN apt-get update && apt-get install -y ragel
8
+ # Set BUNDLE_FROZEN=false if you need to update Gemfile.lock during a build.
9
+ ARG BUNDLE_FROZEN=true
6
10
 
7
- # throw errors if Gemfile has been modified since Gemfile.lock
8
- RUN bundle config --global frozen 1
11
+ RUN apt-get update \
12
+ && apt-get install -y --no-install-recommends ragel procps git \
13
+ && rm -rf /var/lib/apt/lists/*
14
+
15
+ # Only freeze Bundler and compile native extensions when using MRI.
16
+ RUN if [ "$(ruby -e 'print RUBY_ENGINE')" = "ruby" ] && [ "${BUNDLE_FROZEN}" = "true" ]; then bundle config --global frozen 1; fi
9
17
 
10
18
  WORKDIR /usr/src/app
11
19
 
12
20
  COPY . .
13
21
 
14
22
  RUN bundle install
15
- RUN bundle exec rake compile
23
+ RUN if [ "$(ruby -e 'print RUBY_ENGINE')" = "ruby" ]; then bundle exec rake compile; fi
16
24
 
17
25
  EXPOSE 9292
18
26
  CMD ["bundle", "exec", "bin/puma", "test/rackup/hello.ru"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puma
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.0.4
4
+ version: 8.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Evan Phoenix
@@ -43,13 +43,21 @@ files:
43
43
  - bin/puma
44
44
  - bin/puma-wild
45
45
  - bin/pumactl
46
+ - docs/5.0-Upgrade.md
47
+ - docs/6.0-Upgrade.md
48
+ - docs/7.0-Upgrade.md
49
+ - docs/8.0-Upgrade.md
46
50
  - docs/architecture.md
47
51
  - docs/compile_options.md
48
52
  - docs/deployment.md
49
53
  - docs/fork_worker.md
54
+ - docs/grpc.md
55
+ - docs/images/favicon.svg
50
56
  - docs/images/puma-connection-flow-no-reactor.png
51
57
  - docs/images/puma-connection-flow.png
52
58
  - docs/images/puma-general-arch.png
59
+ - docs/images/running-puma.svg
60
+ - docs/images/standard-logo.svg
53
61
  - docs/java_options.md
54
62
  - docs/jungle/README.md
55
63
  - docs/jungle/rc.d/README.md
@@ -66,7 +74,6 @@ files:
66
74
  - docs/testing_benchmarks_local_files.md
67
75
  - docs/testing_test_rackup_ci_files.md
68
76
  - ext/puma_http11/PumaHttp11Service.java
69
- - ext/puma_http11/ext_help.h
70
77
  - ext/puma_http11/extconf.rb
71
78
  - ext/puma_http11/http11_parser.c
72
79
  - ext/puma_http11/http11_parser.h
@@ -75,6 +82,7 @@ files:
75
82
  - ext/puma_http11/http11_parser_common.rl
76
83
  - ext/puma_http11/mini_ssl.c
77
84
  - ext/puma_http11/no_ssl/PumaHttp11Service.java
85
+ - ext/puma_http11/org/jruby/puma/EnvKey.java
78
86
  - ext/puma_http11/org/jruby/puma/Http11.java
79
87
  - ext/puma_http11/org/jruby/puma/Http11Parser.java
80
88
  - ext/puma_http11/org/jruby/puma/MiniSSL.java
@@ -84,6 +92,7 @@ files:
84
92
  - lib/puma/binder.rb
85
93
  - lib/puma/cli.rb
86
94
  - lib/puma/client.rb
95
+ - lib/puma/client_env.rb
87
96
  - lib/puma/cluster.rb
88
97
  - lib/puma/cluster/worker.rb
89
98
  - lib/puma/cluster/worker_handle.rb
@@ -112,10 +121,11 @@ files:
112
121
  - lib/puma/rack/urlmap.rb
113
122
  - lib/puma/rack_default.rb
114
123
  - lib/puma/reactor.rb
115
- - lib/puma/request.rb
124
+ - lib/puma/response.rb
116
125
  - lib/puma/runner.rb
117
126
  - lib/puma/sd_notify.rb
118
127
  - lib/puma/server.rb
128
+ - lib/puma/server_plugin_control.rb
119
129
  - lib/puma/single.rb
120
130
  - lib/puma/state_file.rb
121
131
  - lib/puma/thread_pool.rb
@@ -128,10 +138,11 @@ licenses:
128
138
  - BSD-3-Clause
129
139
  metadata:
130
140
  bug_tracker_uri: https://github.com/puma/puma/issues
131
- changelog_uri: https://github.com/puma/puma/blob/master/History.md
141
+ changelog_uri: https://github.com/puma/puma/blob/main/History.md
132
142
  homepage_uri: https://puma.io
133
143
  source_code_uri: https://github.com/puma/puma
134
144
  rubygems_mfa_required: 'true'
145
+ msys2_mingw_dependencies: openssl
135
146
  rdoc_options: []
136
147
  require_paths:
137
148
  - lib
@@ -146,7 +157,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
146
157
  - !ruby/object:Gem::Version
147
158
  version: '0'
148
159
  requirements: []
149
- rubygems_version: 3.6.9
160
+ rubygems_version: 4.0.6
150
161
  specification_version: 4
151
162
  summary: A Ruby/Rack web server built for parallelism.
152
163
  test_files: []
@@ -1,15 +0,0 @@
1
- #ifndef ext_help_h
2
- #define ext_help_h
3
-
4
- #define RAISE_NOT_NULL(T) if(T == NULL) rb_raise(rb_eArgError, "%s", "NULL found for " # T " when shouldn't be.");
5
- #define DATA_GET(from,type,data_type,name) TypedData_Get_Struct(from,type,data_type,name); RAISE_NOT_NULL(name);
6
- #define REQUIRE_TYPE(V, T) if(TYPE(V) != T) rb_raise(rb_eTypeError, "%s", "Wrong argument type for " # V " required " # T);
7
- #define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
8
-
9
- #ifdef DEBUG
10
- #define TRACE() fprintf(stderr, "> %s:%d:%s\n", __FILE__, __LINE__, __FUNCTION__)
11
- #else
12
- #define TRACE()
13
- #endif
14
-
15
- #endif