puma 6.6.1 → 7.2.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 (51) hide show
  1. checksums.yaml +4 -4
  2. data/History.md +224 -4
  3. data/README.md +34 -34
  4. data/docs/deployment.md +58 -23
  5. data/docs/fork_worker.md +5 -5
  6. data/docs/jungle/README.md +1 -1
  7. data/docs/kubernetes.md +11 -16
  8. data/docs/plugins.md +2 -2
  9. data/docs/restart.md +2 -2
  10. data/docs/signals.md +19 -19
  11. data/docs/stats.md +4 -3
  12. data/docs/systemd.md +3 -3
  13. data/ext/puma_http11/extconf.rb +2 -17
  14. data/ext/puma_http11/mini_ssl.c +18 -8
  15. data/ext/puma_http11/org/jruby/puma/Http11.java +9 -1
  16. data/ext/puma_http11/puma_http11.c +122 -118
  17. data/lib/puma/app/status.rb +10 -2
  18. data/lib/puma/binder.rb +10 -8
  19. data/lib/puma/cli.rb +3 -5
  20. data/lib/puma/client.rb +52 -56
  21. data/lib/puma/cluster/worker.rb +17 -17
  22. data/lib/puma/cluster/worker_handle.rb +38 -7
  23. data/lib/puma/cluster.rb +23 -23
  24. data/lib/puma/cluster_accept_loop_delay.rb +91 -0
  25. data/lib/puma/commonlogger.rb +3 -3
  26. data/lib/puma/configuration.rb +104 -51
  27. data/lib/puma/const.rb +9 -10
  28. data/lib/puma/control_cli.rb +6 -2
  29. data/lib/puma/detect.rb +2 -0
  30. data/lib/puma/dsl.rb +149 -91
  31. data/lib/puma/error_logger.rb +3 -1
  32. data/lib/puma/events.rb +25 -10
  33. data/lib/puma/io_buffer.rb +8 -4
  34. data/lib/puma/launcher/bundle_pruner.rb +1 -1
  35. data/lib/puma/launcher.rb +54 -49
  36. data/lib/puma/minissl.rb +0 -1
  37. data/lib/puma/plugin/systemd.rb +3 -3
  38. data/lib/puma/rack/urlmap.rb +1 -1
  39. data/lib/puma/reactor.rb +19 -13
  40. data/lib/puma/request.rb +42 -31
  41. data/lib/puma/runner.rb +9 -18
  42. data/lib/puma/server.rb +114 -64
  43. data/lib/puma/single.rb +6 -3
  44. data/lib/puma/state_file.rb +3 -2
  45. data/lib/puma/thread_pool.rb +47 -82
  46. data/lib/puma/util.rb +0 -7
  47. data/lib/puma.rb +10 -0
  48. data/lib/rack/handler/puma.rb +2 -2
  49. data/tools/Dockerfile +13 -5
  50. metadata +6 -5
  51. 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: 6.6.1
4
+ version: 7.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Evan Phoenix
@@ -66,7 +66,6 @@ files:
66
66
  - docs/testing_benchmarks_local_files.md
67
67
  - docs/testing_test_rackup_ci_files.md
68
68
  - ext/puma_http11/PumaHttp11Service.java
69
- - ext/puma_http11/ext_help.h
70
69
  - ext/puma_http11/extconf.rb
71
70
  - ext/puma_http11/http11_parser.c
72
71
  - ext/puma_http11/http11_parser.h
@@ -87,6 +86,7 @@ files:
87
86
  - lib/puma/cluster.rb
88
87
  - lib/puma/cluster/worker.rb
89
88
  - lib/puma/cluster/worker_handle.rb
89
+ - lib/puma/cluster_accept_loop_delay.rb
90
90
  - lib/puma/commonlogger.rb
91
91
  - lib/puma/configuration.rb
92
92
  - lib/puma/const.rb
@@ -127,10 +127,11 @@ licenses:
127
127
  - BSD-3-Clause
128
128
  metadata:
129
129
  bug_tracker_uri: https://github.com/puma/puma/issues
130
- changelog_uri: https://github.com/puma/puma/blob/master/History.md
130
+ changelog_uri: https://github.com/puma/puma/blob/main/History.md
131
131
  homepage_uri: https://puma.io
132
132
  source_code_uri: https://github.com/puma/puma
133
133
  rubygems_mfa_required: 'true'
134
+ msys2_mingw_dependencies: openssl
134
135
  rdoc_options: []
135
136
  require_paths:
136
137
  - lib
@@ -138,14 +139,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
138
139
  requirements:
139
140
  - - ">="
140
141
  - !ruby/object:Gem::Version
141
- version: '2.4'
142
+ version: '3.0'
142
143
  required_rubygems_version: !ruby/object:Gem::Requirement
143
144
  requirements:
144
145
  - - ">="
145
146
  - !ruby/object:Gem::Version
146
147
  version: '0'
147
148
  requirements: []
148
- rubygems_version: 3.6.9
149
+ rubygems_version: 4.0.3
149
150
  specification_version: 4
150
151
  summary: A Ruby/Rack web server built for parallelism.
151
152
  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