puma 3.8.2 → 3.12.6
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of puma might be problematic. Click here for more details.
- checksums.yaml +5 -5
- data/History.md +153 -0
- data/README.md +140 -230
- data/docs/architecture.md +36 -0
- data/docs/images/puma-connection-flow-no-reactor.png +0 -0
- data/docs/images/puma-connection-flow.png +0 -0
- data/docs/images/puma-general-arch.png +0 -0
- data/docs/plugins.md +28 -0
- data/docs/restart.md +39 -0
- data/docs/signals.md +56 -3
- data/docs/systemd.md +112 -37
- data/ext/puma_http11/http11_parser.c +87 -85
- data/ext/puma_http11/http11_parser.rl +12 -10
- data/ext/puma_http11/mini_ssl.c +31 -5
- data/ext/puma_http11/org/jruby/puma/Http11Parser.java +13 -16
- data/ext/puma_http11/org/jruby/puma/MiniSSL.java +15 -2
- data/lib/puma/app/status.rb +8 -0
- data/lib/puma/binder.rb +22 -17
- data/lib/puma/cli.rb +22 -7
- data/lib/puma/client.rb +41 -2
- data/lib/puma/cluster.rb +28 -7
- data/lib/puma/commonlogger.rb +2 -0
- data/lib/puma/configuration.rb +21 -14
- data/lib/puma/const.rb +17 -2
- data/lib/puma/control_cli.rb +16 -14
- data/lib/puma/convenient.rb +2 -0
- data/lib/puma/daemon_ext.rb +2 -0
- data/lib/puma/delegation.rb +2 -0
- data/lib/puma/detect.rb +2 -0
- data/lib/puma/dsl.rb +46 -9
- data/lib/puma/events.rb +3 -2
- data/lib/puma/io_buffer.rb +2 -0
- data/lib/puma/java_io_buffer.rb +2 -0
- data/lib/puma/jruby_restart.rb +2 -1
- data/lib/puma/launcher.rb +42 -20
- data/lib/puma/minissl.rb +67 -28
- data/lib/puma/null_io.rb +2 -0
- data/lib/puma/plugin/tmp_restart.rb +0 -1
- data/lib/puma/plugin.rb +2 -0
- data/lib/puma/rack/builder.rb +2 -1
- data/lib/puma/reactor.rb +137 -0
- data/lib/puma/runner.rb +16 -3
- data/lib/puma/server.rb +145 -29
- data/lib/puma/single.rb +14 -3
- data/lib/puma/state_file.rb +2 -0
- data/lib/puma/tcp_logger.rb +2 -0
- data/lib/puma/thread_pool.rb +55 -6
- data/lib/puma/util.rb +1 -0
- data/lib/puma.rb +8 -0
- data/lib/rack/handler/puma.rb +13 -2
- data/tools/jungle/README.md +12 -2
- data/tools/jungle/init.d/README.md +2 -0
- data/tools/jungle/init.d/puma +2 -2
- data/tools/jungle/init.d/run-puma +1 -1
- data/tools/jungle/rc.d/README.md +74 -0
- data/tools/jungle/rc.d/puma +61 -0
- data/tools/jungle/rc.d/puma.conf +10 -0
- data/tools/trickletest.rb +1 -1
- metadata +21 -95
- data/.github/issue_template.md +0 -20
- data/Gemfile +0 -12
- data/Manifest.txt +0 -78
- data/Rakefile +0 -158
- data/Release.md +0 -9
- data/gemfiles/2.1-Gemfile +0 -12
- data/puma.gemspec +0 -52
- /data/{DEPLOYMENT.md → docs/deployment.md} +0 -0
data/Rakefile
DELETED
@@ -1,158 +0,0 @@
|
|
1
|
-
require "bundler/setup"
|
2
|
-
require "hoe"
|
3
|
-
require "rake/extensiontask"
|
4
|
-
require "rake/javaextensiontask"
|
5
|
-
|
6
|
-
IS_JRUBY = defined?(RUBY_ENGINE) ? RUBY_ENGINE == "jruby" : false
|
7
|
-
|
8
|
-
Hoe.plugin :git
|
9
|
-
Hoe.plugin :ignore
|
10
|
-
|
11
|
-
HOE = Hoe.spec "puma" do
|
12
|
-
self.readme_file = "README.md"
|
13
|
-
self.urls = %w!http://puma.io https://github.com/puma/puma!
|
14
|
-
|
15
|
-
license "BSD-3-Clause"
|
16
|
-
developer 'Evan Phoenix', 'evan@phx.io'
|
17
|
-
|
18
|
-
spec_extras[:extensions] = ["ext/puma_http11/extconf.rb"]
|
19
|
-
spec_extras[:executables] = ['puma', 'pumactl']
|
20
|
-
spec_extras[:homepage] = self.urls.first
|
21
|
-
|
22
|
-
require_ruby_version ">= 1.9.3"
|
23
|
-
|
24
|
-
dependency "rack", [">= 1.1", "< 3.0"], :development
|
25
|
-
|
26
|
-
extra_dev_deps << ["rake-compiler", "~> 0.8"]
|
27
|
-
end
|
28
|
-
|
29
|
-
task :prerelease => [:clobber, :check_manifest, :test]
|
30
|
-
|
31
|
-
# hoe/test and rake-compiler don't seem to play well together, so disable
|
32
|
-
# hoe/test's .gemtest touch file thingy for now
|
33
|
-
HOE.spec.files -= [".gemtest"]
|
34
|
-
|
35
|
-
include Hoe::Git
|
36
|
-
|
37
|
-
desc "Print the current changelog."
|
38
|
-
task "changelog" do
|
39
|
-
tag = ENV["FROM"] || git_tags.last
|
40
|
-
range = [tag, "HEAD"].compact.join ".."
|
41
|
-
cmd = "git log #{range} '--format=tformat:%B|||%aN|||%aE|||'"
|
42
|
-
now = Time.new.strftime "%Y-%m-%d"
|
43
|
-
|
44
|
-
changes = `#{cmd}`.split(/\|\|\|/).each_slice(3).map { |msg, author, email|
|
45
|
-
msg.split(/\n/).reject { |s| s.empty? }.first
|
46
|
-
}.flatten.compact
|
47
|
-
|
48
|
-
$changes = Hash.new { |h,k| h[k] = [] }
|
49
|
-
|
50
|
-
codes = {
|
51
|
-
"!" => :major,
|
52
|
-
"+" => :minor,
|
53
|
-
"*" => :minor,
|
54
|
-
"-" => :bug,
|
55
|
-
"?" => :unknown,
|
56
|
-
}
|
57
|
-
|
58
|
-
codes_re = Regexp.escape codes.keys.join
|
59
|
-
|
60
|
-
changes.each do |change|
|
61
|
-
if change =~ /^\s*([#{codes_re}])\s*(.*)/ then
|
62
|
-
code, line = codes[$1], $2
|
63
|
-
else
|
64
|
-
code, line = codes["?"], change.chomp
|
65
|
-
end
|
66
|
-
|
67
|
-
$changes[code] << line
|
68
|
-
end
|
69
|
-
|
70
|
-
puts "## #{ENV['VERSION'] || 'NEXT'} / #{now}"
|
71
|
-
puts
|
72
|
-
changelog_section :major
|
73
|
-
changelog_section :minor
|
74
|
-
changelog_section :bug
|
75
|
-
changelog_section :unknown
|
76
|
-
puts
|
77
|
-
end
|
78
|
-
|
79
|
-
# generate extension code using Ragel (C and Java)
|
80
|
-
desc "Generate extension code (C and Java) using Ragel"
|
81
|
-
task :ragel
|
82
|
-
|
83
|
-
file 'ext/puma_http11/http11_parser.c' => ['ext/puma_http11/http11_parser.rl'] do |t|
|
84
|
-
begin
|
85
|
-
sh "ragel #{t.prerequisites.last} -C -G2 -I ext/puma_http11 -o #{t.name}"
|
86
|
-
rescue
|
87
|
-
fail "Could not build wrapper using Ragel (it failed or not installed?)"
|
88
|
-
end
|
89
|
-
end
|
90
|
-
task :ragel => ['ext/puma_http11/http11_parser.c']
|
91
|
-
|
92
|
-
file 'ext/puma_http11/org/jruby/puma/Http11Parser.java' => ['ext/puma_http11/http11_parser.java.rl'] do |t|
|
93
|
-
begin
|
94
|
-
sh "ragel #{t.prerequisites.last} -J -G2 -I ext/puma_http11 -o #{t.name}"
|
95
|
-
rescue
|
96
|
-
fail "Could not build wrapper using Ragel (it failed or not installed?)"
|
97
|
-
end
|
98
|
-
end
|
99
|
-
task :ragel => ['ext/puma_http11/org/jruby/puma/Http11Parser.java']
|
100
|
-
|
101
|
-
if !IS_JRUBY
|
102
|
-
|
103
|
-
# compile extensions using rake-compiler
|
104
|
-
# C (MRI, Rubinius)
|
105
|
-
Rake::ExtensionTask.new("puma_http11", HOE.spec) do |ext|
|
106
|
-
# place extension inside namespace
|
107
|
-
ext.lib_dir = "lib/puma"
|
108
|
-
|
109
|
-
ext.cross_compile = true
|
110
|
-
ext.cross_platform = ['i386-mswin32-60', 'i386-mingw32']
|
111
|
-
ext.cross_compiling do |spec|
|
112
|
-
# add fat-binary stub only when cross compiling
|
113
|
-
spec.files << "lib/puma/puma_http11.rb"
|
114
|
-
end
|
115
|
-
|
116
|
-
CLEAN.include "lib/puma/{1.8,1.9}"
|
117
|
-
CLEAN.include "lib/puma/puma_http11.rb"
|
118
|
-
end
|
119
|
-
|
120
|
-
else
|
121
|
-
|
122
|
-
# Java (JRuby)
|
123
|
-
Rake::JavaExtensionTask.new("puma_http11", HOE.spec) do |ext|
|
124
|
-
ext.lib_dir = "lib/puma"
|
125
|
-
end
|
126
|
-
|
127
|
-
end
|
128
|
-
|
129
|
-
# the following is a fat-binary stub that will be used when
|
130
|
-
# require 'puma/puma_http11' and will use either 1.8 or 1.9 version depending
|
131
|
-
# on RUBY_VERSION
|
132
|
-
file "lib/puma/puma_http11.rb" do |t|
|
133
|
-
File.open(t.name, "w") do |f|
|
134
|
-
f.puts "RUBY_VERSION =~ /(\d+.\d+)/"
|
135
|
-
f.puts 'require "puma/#{$1}/puma_http11"'
|
136
|
-
end
|
137
|
-
end
|
138
|
-
|
139
|
-
# tests require extension be compiled, but depend on the platform
|
140
|
-
if IS_JRUBY
|
141
|
-
task :test => [:java]
|
142
|
-
else
|
143
|
-
task :test => [:compile]
|
144
|
-
end
|
145
|
-
|
146
|
-
namespace :test do
|
147
|
-
desc "Run the integration tests"
|
148
|
-
task :integration do
|
149
|
-
sh "cd test/shell; sh run.sh"
|
150
|
-
end
|
151
|
-
|
152
|
-
desc "Run all tests"
|
153
|
-
if defined?(JRUBY_VERSION) and ENV['TRAVIS']
|
154
|
-
task :all => :test
|
155
|
-
else
|
156
|
-
task :all => [:test, "test:integration"]
|
157
|
-
end
|
158
|
-
end
|
data/Release.md
DELETED
data/gemfiles/2.1-Gemfile
DELETED
data/puma.gemspec
DELETED
@@ -1,52 +0,0 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
|
-
|
3
|
-
# This is only used when puma is a git dep from Bundler, so it's a little
|
4
|
-
# weird.
|
5
|
-
|
6
|
-
d = File.read(File.expand_path("../lib/puma/const.rb", __FILE__))
|
7
|
-
if d =~ /VERSION = "(\d+\.\d+\.\d+)"/
|
8
|
-
version = $1
|
9
|
-
else
|
10
|
-
version = "0.0.1"
|
11
|
-
end
|
12
|
-
|
13
|
-
Gem::Specification.new do |s|
|
14
|
-
s.name = "puma"
|
15
|
-
s.version = version
|
16
|
-
|
17
|
-
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
18
|
-
s.authors = ["Evan Phoenix"]
|
19
|
-
s.date = `git log --pretty="%ai" -n 1`.split(" ").first
|
20
|
-
s.description = "Puma is a simple, fast, threaded, and highly concurrent HTTP 1.1 server for Ruby/Rack applications. Puma is intended for use in both development and production environments. It's great for highly concurrent Ruby implementations such as Rubinius and JRuby as well as as providing process worker support to support CRuby well."
|
21
|
-
s.email = ["evan@phx.io"]
|
22
|
-
s.executables = ["puma", "pumactl"]
|
23
|
-
s.extensions = ["ext/puma_http11/extconf.rb"]
|
24
|
-
s.files = `git ls-files`.split($/)
|
25
|
-
s.homepage = "http://puma.io"
|
26
|
-
s.license = "BSD-3-Clause"
|
27
|
-
s.rdoc_options = ["--main", "README.md"]
|
28
|
-
s.require_paths = ["lib"]
|
29
|
-
s.required_ruby_version = Gem::Requirement.new(">= 1.9.3")
|
30
|
-
s.rubyforge_project = "puma"
|
31
|
-
s.rubygems_version = "1.8.25"
|
32
|
-
s.summary = "Puma is a simple, fast, threaded, and highly concurrent HTTP 1.1 server for Ruby/Rack applications"
|
33
|
-
s.test_files = s.files.grep(/^test/)
|
34
|
-
|
35
|
-
if s.respond_to? :specification_version then
|
36
|
-
s.specification_version = 3
|
37
|
-
|
38
|
-
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
39
|
-
s.add_development_dependency(%q<rdoc>, ["~> 4.0"])
|
40
|
-
s.add_development_dependency(%q<rake-compiler>, ["~> 0.8.0"])
|
41
|
-
s.add_development_dependency(%q<hoe>, ["~> 3.6"])
|
42
|
-
else
|
43
|
-
s.add_dependency(%q<rdoc>, ["~> 4.0"])
|
44
|
-
s.add_dependency(%q<rake-compiler>, ["~> 0.8.0"])
|
45
|
-
s.add_dependency(%q<hoe>, ["~> 3.6"])
|
46
|
-
end
|
47
|
-
else
|
48
|
-
s.add_dependency(%q<rdoc>, ["~> 4.0"])
|
49
|
-
s.add_dependency(%q<rake-compiler>, ["~> 0.8.0"])
|
50
|
-
s.add_dependency(%q<hoe>, ["~> 3.6"])
|
51
|
-
end
|
52
|
-
end
|
File without changes
|