unicorn 0.91.0 → 0.92.0
Sign up to get free protection for your applications and to get access to all the features.
- data/{CHANGELOG → .CHANGELOG.old} +0 -0
- data/.document +4 -0
- data/.gitignore +5 -0
- data/.mailmap +26 -0
- data/CONTRIBUTORS +1 -1
- data/Documentation/.gitignore +5 -0
- data/Documentation/GNUmakefile +30 -0
- data/Documentation/unicorn.1.txt +158 -0
- data/Documentation/unicorn_rails.1.txt +150 -0
- data/GIT-VERSION-GEN +40 -0
- data/GNUmakefile +102 -14
- data/README +3 -2
- data/Rakefile +104 -32
- data/SIGNALS +2 -4
- data/TODO +3 -9
- data/bin/unicorn +5 -2
- data/bin/unicorn_rails +5 -3
- data/ext/unicorn_http/c_util.h +2 -2
- data/ext/unicorn_http/common_field_optimization.h +2 -1
- data/ext/unicorn_http/ext_help.h +29 -4
- data/ext/unicorn_http/extconf.rb +5 -0
- data/ext/unicorn_http/unicorn_http.rl +131 -76
- data/lib/unicorn.rb +6 -2
- data/lib/unicorn/app/exec_cgi.rb +3 -1
- data/lib/unicorn/app/inetd.rb +2 -0
- data/lib/unicorn/app/old_rails.rb +2 -0
- data/lib/unicorn/app/old_rails/static.rb +3 -1
- data/lib/unicorn/cgi_wrapper.rb +3 -1
- data/lib/unicorn/configurator.rb +2 -0
- data/lib/unicorn/const.rb +8 -6
- data/lib/unicorn/http_request.rb +6 -5
- data/lib/unicorn/http_response.rb +4 -2
- data/lib/unicorn/launcher.rb +6 -0
- data/lib/unicorn/socket_helper.rb +5 -5
- data/lib/unicorn/tee_input.rb +2 -0
- data/lib/unicorn/util.rb +2 -0
- data/local.mk.sample +4 -2
- data/setup.rb +1 -0
- data/test/aggregate.rb +2 -0
- data/test/exec/test_exec.rb +157 -0
- data/test/rails/app-1.2.3/app/controllers/application.rb +2 -0
- data/test/rails/app-1.2.3/app/controllers/foo_controller.rb +2 -0
- data/test/rails/app-1.2.3/app/helpers/application_helper.rb +2 -0
- data/test/rails/app-1.2.3/config/boot.rb +2 -0
- data/test/rails/app-1.2.3/config/environment.rb +2 -0
- data/test/rails/app-1.2.3/config/environments/development.rb +2 -0
- data/test/rails/app-1.2.3/config/environments/production.rb +2 -0
- data/test/rails/app-1.2.3/config/routes.rb +2 -0
- data/test/rails/app-2.0.2/app/controllers/application.rb +2 -0
- data/test/rails/app-2.0.2/app/controllers/foo_controller.rb +2 -0
- data/test/rails/app-2.0.2/app/helpers/application_helper.rb +2 -0
- data/test/rails/app-2.0.2/config/boot.rb +2 -0
- data/test/rails/app-2.0.2/config/environment.rb +2 -0
- data/test/rails/app-2.0.2/config/environments/development.rb +2 -0
- data/test/rails/app-2.0.2/config/environments/production.rb +2 -0
- data/test/rails/app-2.0.2/config/routes.rb +2 -0
- data/test/rails/app-2.1.2/app/controllers/application.rb +2 -0
- data/test/rails/app-2.1.2/app/controllers/foo_controller.rb +2 -0
- data/test/rails/app-2.1.2/app/helpers/application_helper.rb +2 -0
- data/test/rails/app-2.1.2/config/boot.rb +2 -0
- data/test/rails/app-2.1.2/config/environment.rb +2 -0
- data/test/rails/app-2.1.2/config/environments/development.rb +2 -0
- data/test/rails/app-2.1.2/config/environments/production.rb +2 -0
- data/test/rails/app-2.1.2/config/routes.rb +2 -0
- data/test/rails/app-2.2.2/app/controllers/application.rb +2 -0
- data/test/rails/app-2.2.2/app/controllers/foo_controller.rb +2 -0
- data/test/rails/app-2.2.2/app/helpers/application_helper.rb +2 -0
- data/test/rails/app-2.2.2/config/boot.rb +2 -0
- data/test/rails/app-2.2.2/config/environment.rb +2 -0
- data/test/rails/app-2.2.2/config/environments/development.rb +2 -0
- data/test/rails/app-2.2.2/config/environments/production.rb +2 -0
- data/test/rails/app-2.2.2/config/routes.rb +2 -0
- data/test/rails/app-2.3.3.1/app/controllers/application_controller.rb +2 -0
- data/test/rails/app-2.3.3.1/app/controllers/foo_controller.rb +2 -0
- data/test/rails/app-2.3.3.1/app/helpers/application_helper.rb +2 -0
- data/test/rails/app-2.3.3.1/config/boot.rb +2 -0
- data/test/rails/app-2.3.3.1/config/environment.rb +2 -0
- data/test/rails/app-2.3.3.1/config/environments/development.rb +2 -0
- data/test/rails/app-2.3.3.1/config/environments/production.rb +2 -0
- data/test/rails/app-2.3.3.1/config/routes.rb +2 -0
- data/test/rails/test_rails.rb +2 -0
- data/test/test_helper.rb +8 -0
- data/test/unit/test_configurator.rb +2 -0
- data/test/unit/test_http_parser.rb +13 -0
- data/test/unit/test_http_parser_ng.rb +2 -0
- data/test/unit/test_request.rb +2 -0
- data/test/unit/test_response.rb +2 -0
- data/test/unit/test_server.rb +2 -0
- data/test/unit/test_signals.rb +2 -0
- data/test/unit/test_socket_helper.rb +2 -0
- data/test/unit/test_tee_input.rb +2 -1
- data/test/unit/test_upload.rb +2 -0
- data/test/unit/test_util.rb +2 -0
- data/unicorn.gemspec +38 -28
- metadata +38 -42
- data/Manifest +0 -137
File without changes
|
data/.document
CHANGED
data/.gitignore
CHANGED
data/.mailmap
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
# This list is used by "git shortlog" to fixup the ugly faux email addresses
|
2
|
+
# "<username@UGLY-UUID>" that the "git svn" tool creates by default.
|
3
|
+
|
4
|
+
# Eric Wong started this .mailmap file (and is the maintainer of it...)
|
5
|
+
Eric Wong <normalperson@yhbt.net> normalperson <normalperson@19e92222-5c0b-0410-8929-a290d50e31e9>
|
6
|
+
|
7
|
+
# This also includes all the Mongrel contributors that committed to the
|
8
|
+
# Rubyforge SVN repo. Some real names were looked up on rubyforge.org
|
9
|
+
# (http://rubyforge.org/users/$user), but we're not going expose any email
|
10
|
+
# addresses here without their permission.
|
11
|
+
|
12
|
+
Austin Godber godber <godber> godber <godber@19e92222-5c0b-0410-8929-a290d50e31e9>
|
13
|
+
Bradley Taylor <bktaylor> bktaylor <bktaylor@19e92222-5c0b-0410-8929-a290d50e31e9>
|
14
|
+
Ezra Zygmuntowicz <ezmobius> ezmobius <ezmobius@19e92222-5c0b-0410-8929-a290d50e31e9>
|
15
|
+
Filipe Lautert <filipe> filipe <filipe@19e92222-5c0b-0410-8929-a290d50e31e9>
|
16
|
+
Luis Lavena <luislavena> luislavena <luislavena@19e92222-5c0b-0410-8929-a290d50e31e9>
|
17
|
+
Matt Pelletier <bricolage> bricolage <bricolage@19e92222-5c0b-0410-8929-a290d50e31e9>
|
18
|
+
MenTaLguY <mental> mental <mental@19e92222-5c0b-0410-8929-a290d50e31e9>
|
19
|
+
Nick Sieger <nicksieger> nicksieger <nicksieger@19e92222-5c0b-0410-8929-a290d50e31e9>
|
20
|
+
Rick Olson <technoweenie> technoweenie <technoweenie@19e92222-5c0b-0410-8929-a290d50e31e9>
|
21
|
+
Wayne E. Seguin <wayneeseguin> wayneeseguin <wayneeseguin@19e92222-5c0b-0410-8929-a290d50e31e9>
|
22
|
+
Zed A. Shaw <zedshaw> <zedshaw@19e92222-5c0b-0410-8929-a290d50e31e9>
|
23
|
+
why the lucky stiff <whytheluckystiff> <why@19e92222-5c0b-0410-8929-a290d50e31e9>
|
24
|
+
|
25
|
+
# Evan had his email address in the git history we branched from anyways
|
26
|
+
Evan Weaver <eweaver@twitter.com> evanweaver <evanweaver@19e92222-5c0b-0410-8929-a290d50e31e9>
|
data/CONTRIBUTORS
CHANGED
@@ -0,0 +1,30 @@
|
|
1
|
+
all::
|
2
|
+
|
3
|
+
PANDOC = pandoc
|
4
|
+
PANDOC_OPTS = -f markdown --email-obfuscation=none --sanitize-html
|
5
|
+
pandoc = $(PANDOC) $(PANDOC_OPTS)
|
6
|
+
pandoc_html = $(pandoc) --toc -t html --no-wrap
|
7
|
+
|
8
|
+
man1 := $(addsuffix .1,unicorn unicorn_rails)
|
9
|
+
html1 := $(addsuffix .html,$(man1))
|
10
|
+
|
11
|
+
all:: html man
|
12
|
+
|
13
|
+
html: $(html1)
|
14
|
+
man: $(man1)
|
15
|
+
|
16
|
+
install-html: html
|
17
|
+
mkdir -p ../doc/man1
|
18
|
+
install -m 644 $(html1) ../doc/man1
|
19
|
+
|
20
|
+
install-man: man
|
21
|
+
mkdir -p ../man/man1
|
22
|
+
install -m 644 $(man1) ../man/man1
|
23
|
+
|
24
|
+
%.1: %.1.txt
|
25
|
+
$(pandoc) -s -t man < $< > $@+ && mv $@+ $@
|
26
|
+
%.1.html: %.1.txt
|
27
|
+
$(pandoc_html) < $< > $@+ && mv $@+ $@
|
28
|
+
|
29
|
+
clean::
|
30
|
+
$(RM) $(man1) $(html1)
|
@@ -0,0 +1,158 @@
|
|
1
|
+
% UNICORN(1) Unicorn User Manual
|
2
|
+
% The Unicorn Community <mongrel-unicorn@rubyforge.org>
|
3
|
+
% September 15, 2009
|
4
|
+
|
5
|
+
# NAME
|
6
|
+
|
7
|
+
unicorn - a rackup-like command to launch the Unicorn HTTP server
|
8
|
+
|
9
|
+
# SYNOPSIS
|
10
|
+
|
11
|
+
unicorn [-c CONFIG_FILE] [-E RACK_ENV] [-D] [RACKUP_FILE]
|
12
|
+
|
13
|
+
# DESCRIPTION
|
14
|
+
|
15
|
+
A rackup(1)-like command to launch Rack applications using Unicorn.
|
16
|
+
It is expected to be started in your application root (APP_ROOT), but
|
17
|
+
"Dir.chdir" may also be executed in the CONFIG_FILE or RACKUP_FILE.
|
18
|
+
|
19
|
+
While Unicorn takes a myriad of command-line options for
|
20
|
+
compatibility with ruby(1) and rackup(1), it is recommended to stick
|
21
|
+
to the few command-line options specified in the SYNOPSIS and use
|
22
|
+
the CONFIG_FILE as much as possible.
|
23
|
+
|
24
|
+
# RACKUP FILE
|
25
|
+
|
26
|
+
This defaults to \"config.ru\" in APP_ROOT. It should be the same
|
27
|
+
file used by rackup(1) and other Rack launchers, it uses the
|
28
|
+
*Rack::Builder* DSL.
|
29
|
+
|
30
|
+
Embedded command-line options are mostly parsed for compatibility
|
31
|
+
with rackup(1) but strongly discouraged.
|
32
|
+
|
33
|
+
# UNICORN OPTIONS
|
34
|
+
-c, \--config-file CONFIG_FILE
|
35
|
+
: Path to the Unicorn-specific config file. The config file is
|
36
|
+
implemented as a Ruby DSL, so Ruby code may executed (e.g.
|
37
|
+
"Dir.chdir", "Process::UID.change_privilege"). See the RDoc/ri
|
38
|
+
for the *Unicorn::Configurator* class for the full list of
|
39
|
+
directives available from the DSL.
|
40
|
+
|
41
|
+
-D, \--daemonize
|
42
|
+
: Run daemonized in the background. The process is detached from
|
43
|
+
the controlling terminal and stdin is redirected to "/dev/null".
|
44
|
+
Unlike many common UNIX daemons, we do not chdir to \"/\"
|
45
|
+
upon daemonization to allow more control over the startup/upgrade
|
46
|
+
process.
|
47
|
+
Unless specified in the CONFIG_FILE, stderr and stdout will
|
48
|
+
also be redirected to "/dev/null".
|
49
|
+
|
50
|
+
-E, \--env RACK_ENV
|
51
|
+
: Run under the given RACK_ENV. See the RACK ENVIRONMENT section
|
52
|
+
for more details.
|
53
|
+
|
54
|
+
-l, \--listen ADDRESS
|
55
|
+
: Listens on a given ADDRESS. ADDRESS may be in the form of
|
56
|
+
HOST:PORT or PATH, HOST:PORT is taken to mean a TCP socket
|
57
|
+
and PATH is meant to be a path to a UNIX domain socket.
|
58
|
+
Defaults to "0.0.0.0:8080" (all addresses on TCP port 8080)
|
59
|
+
For production deployments, specifying the "listen" directive in
|
60
|
+
CONFIG_FILE is recommended as it allows fine-tuning of socket
|
61
|
+
options.
|
62
|
+
|
63
|
+
# RACKUP COMPATIBILITY OPTIONS
|
64
|
+
-o, \--host HOST
|
65
|
+
: Listen on a TCP socket belonging to HOST, default is
|
66
|
+
"0.0.0.0" (all addresses).
|
67
|
+
If specified multiple times on the command-line, only the
|
68
|
+
last-specified value takes effect.
|
69
|
+
This option only exists for compatibility with the rackup(1) command,
|
70
|
+
use of "-l"/"\--listen" switch is recommended instead.
|
71
|
+
|
72
|
+
-p, \--port PORT
|
73
|
+
: Listen on the specified TCP PORT, default is 8080.
|
74
|
+
If specified multiple times on the command-line, only the last-specified
|
75
|
+
value takes effect.
|
76
|
+
This option only exists for compatibility with the rackup(1) command,
|
77
|
+
use of "-l"/"\--listen" switch is recommended instead.
|
78
|
+
|
79
|
+
-s, \--server SERVER
|
80
|
+
: No-op, this exists only for compatibility with rackup(1).
|
81
|
+
|
82
|
+
# RUBY OPTIONS
|
83
|
+
-e, \--eval LINE
|
84
|
+
: Evaluate a LINE of Ruby code. This evaluation happens
|
85
|
+
immediately as the command-line is being parsed.
|
86
|
+
|
87
|
+
-d, \--debug
|
88
|
+
: Turn on debug mode, the $DEBUG variable is set to true.
|
89
|
+
|
90
|
+
-w, \--warn
|
91
|
+
: Turn on verbose warnings, the $VERBOSE variable is set to true.
|
92
|
+
|
93
|
+
-I, \--include PATH
|
94
|
+
: specify $LOAD_PATH. PATH will be prepended to $LOAD_PATH.
|
95
|
+
The \':\' character may be used to delimit multiple directories.
|
96
|
+
This directive may be used more than once. Modifications to
|
97
|
+
$LOAD_PATH take place immediately and in the order they were
|
98
|
+
specified on the command-line.
|
99
|
+
|
100
|
+
-r, \--require LIBRARY
|
101
|
+
: require a specified LIBRARY before executing the application. The
|
102
|
+
\"require\" statement will be executed immediately and in the order
|
103
|
+
they were specified on the command-line.
|
104
|
+
|
105
|
+
# SIGNALS
|
106
|
+
|
107
|
+
The following UNIX signals may be sent to the master process:
|
108
|
+
|
109
|
+
* HUP - reload config file, app, and gracefully restart all workers
|
110
|
+
* INT/TERM - quick shutdown, kills all workers immediately
|
111
|
+
* QUIT - graceful shutdown, waits for workers to finish their
|
112
|
+
current request before finishing.
|
113
|
+
* USR1 - reopen all logs owned by the master and all workers
|
114
|
+
See Unicorn::Util.reopen_logs for what is considered a log.
|
115
|
+
* USR2 - reexecute the running binary. A separate QUIT
|
116
|
+
should be sent to the original process once the child is verified to
|
117
|
+
be up and running.
|
118
|
+
* WINCH - gracefully stops workers but keep the master running.
|
119
|
+
This will only work for daemonized processes.
|
120
|
+
* TTIN - increment the number of worker processes by one
|
121
|
+
* TTOU - decrement the number of worker processes by one
|
122
|
+
|
123
|
+
See the [SIGNALS][4] document for full description of all signals
|
124
|
+
used by Unicorn.
|
125
|
+
|
126
|
+
# RACK ENVIRONMENT
|
127
|
+
|
128
|
+
Accepted values of RACK_ENV and the middleware they automatically load
|
129
|
+
(outside of RACKUP_FILE) are exactly as those in rackup(1):
|
130
|
+
|
131
|
+
* development - loads Rack::CommonLogger, Rack::ShowExceptions, and
|
132
|
+
Rack::Lint middleware
|
133
|
+
* deployment - loads Rack::CommonLogger middleware
|
134
|
+
* none - loads no middleware at all, relying
|
135
|
+
entirely on RACKUP_FILE
|
136
|
+
|
137
|
+
All unrecognized values for RACK_ENV are assumed to be
|
138
|
+
"none". Production deployments are strongly encouraged to use
|
139
|
+
"deployment" or "none" for maximum performance.
|
140
|
+
|
141
|
+
Note that the Rack::ContentLength and Rack::Chunked middlewares
|
142
|
+
are never loaded by default. If needed, they should be
|
143
|
+
individually specified in the RACKUP_FILE, some frameworks do
|
144
|
+
not require them.
|
145
|
+
|
146
|
+
# SEE ALSO
|
147
|
+
|
148
|
+
* unicorn_rails(1)
|
149
|
+
* *Rack::Builder* ri/RDoc
|
150
|
+
* *Unicorn::Configurator* ri/RDoc
|
151
|
+
* [Unicorn RDoc][1]
|
152
|
+
* [Rack RDoc][2]
|
153
|
+
* [Rackup HowTo][3]
|
154
|
+
|
155
|
+
[1]: http://unicorn.bogomips.org/
|
156
|
+
[2]: http://rack.rubyforge.org/doc/
|
157
|
+
[3]: http://wiki.github.com/rack/rack/tutorial-rackup-howto
|
158
|
+
[4]: http://unicorn.bogomips.org/SIGNALS.html
|
@@ -0,0 +1,150 @@
|
|
1
|
+
% UNICORN_RAILS(1) Unicorn User Manual
|
2
|
+
% The Unicorn Community <mongrel-unicorn@rubyforge.org>
|
3
|
+
% September 17, 2009
|
4
|
+
|
5
|
+
# NAME
|
6
|
+
|
7
|
+
unicorn_rails - a rackup-like command to launch the Unicorn HTTP server
|
8
|
+
|
9
|
+
# SYNOPSIS
|
10
|
+
|
11
|
+
unicorn_rails [-c CONFIG_FILE] [-E RAILS_ENV] [-D] [RACKUP_FILE]
|
12
|
+
|
13
|
+
# DESCRIPTION
|
14
|
+
|
15
|
+
A rackup(1)-like command to launch Rails applications using Unicorn. It
|
16
|
+
is expected to be started in your Rails application root (RAILS_ROOT),
|
17
|
+
but "Dir.chdir" may also be executed in the CONFIG_FILE or
|
18
|
+
optionally, RACKUP_FILE.
|
19
|
+
|
20
|
+
The outward interface resembles rackup(1), the internals and default
|
21
|
+
middleware loading is designed like the `script/server` command
|
22
|
+
distributed with Rails.
|
23
|
+
|
24
|
+
While Unicorn takes a myriad of command-line options for compatibility
|
25
|
+
with ruby(1) and rackup(1), it is recommended to stick to the few
|
26
|
+
command-line options specified in the SYNOPSIS and use the CONFIG_FILE
|
27
|
+
as much as possible.
|
28
|
+
|
29
|
+
# UNICORN OPTIONS
|
30
|
+
-c, \--config-file CONFIG_FILE
|
31
|
+
: Path to the Unicorn-specific config file. The config file is
|
32
|
+
implemented as a Ruby DSL, so Ruby code may executed (e.g.
|
33
|
+
"Dir.chdir", "Process::UID.change_privilege"). See the RDoc/ri
|
34
|
+
for the *Unicorn::Configurator* class for the full list of
|
35
|
+
directives available from the DSL.
|
36
|
+
|
37
|
+
-D, \--daemonize
|
38
|
+
: Run daemonized in the background. The process is detached from
|
39
|
+
the controlling terminal and stdin is redirected to "/dev/null".
|
40
|
+
Unlike many common UNIX daemons, we do not chdir to \"/\"
|
41
|
+
upon daemonization to allow more control over the startup/upgrade
|
42
|
+
process.
|
43
|
+
Unless specified in the CONFIG_FILE, stderr and stdout will
|
44
|
+
also be redirected to "/dev/null".
|
45
|
+
Daemonization will _skip_ loading of the *Rails::Rack::LogTailer*
|
46
|
+
middleware under Rails \>\= 2.3.x.
|
47
|
+
By default, unicorn\_rails(1) will create a PID file in
|
48
|
+
_\"RAILS\_ROOT/tmp/pids/unicorn.pid\"_. You may override this
|
49
|
+
by specifying the "pid" directive to override this Unicorn config file.
|
50
|
+
|
51
|
+
-E, \--env RAILS_ENV
|
52
|
+
: Run under the given RAILS_ENV. This sets the RAILS_ENV environment
|
53
|
+
variable. Acceptable values are exactly those you expect in your Rails
|
54
|
+
application, typically "development" or "production".
|
55
|
+
|
56
|
+
-l, \--listen ADDRESS
|
57
|
+
: Listens on a given ADDRESS. ADDRESS may be in the form of
|
58
|
+
HOST:PORT or PATH, HOST:PORT is taken to mean a TCP socket
|
59
|
+
and PATH is meant to be a path to a UNIX domain socket.
|
60
|
+
Defaults to "0.0.0.0:8080" (all addresses on TCP port 8080).
|
61
|
+
For production deployments, specifying the "listen" directive in
|
62
|
+
CONFIG_FILE is recommended as it allows fine-tuning of socket
|
63
|
+
options.
|
64
|
+
|
65
|
+
# RACKUP COMPATIBILITY OPTIONS
|
66
|
+
-o, \--host HOST
|
67
|
+
: Listen on a TCP socket belonging to HOST, default is
|
68
|
+
"0.0.0.0" (all addresses).
|
69
|
+
If specified multiple times on the command-line, only the
|
70
|
+
last-specified value takes effect.
|
71
|
+
This option only exists for compatibility with the rackup(1) command,
|
72
|
+
use of "-l"/"\--listen" switch is recommended instead.
|
73
|
+
|
74
|
+
-p, \--port PORT
|
75
|
+
: Listen on the specified TCP PORT, default is 8080.
|
76
|
+
If specified multiple times on the command-line, only the last-specified
|
77
|
+
value takes effect.
|
78
|
+
This option only exists for compatibility with the rackup(1) command,
|
79
|
+
use of "-l"/"\--listen" switch is recommended instead.
|
80
|
+
|
81
|
+
# RUBY OPTIONS
|
82
|
+
-e, \--eval LINE
|
83
|
+
: Evaluate a LINE of Ruby code. This evaluation happens
|
84
|
+
immediately as the command-line is being parsed.
|
85
|
+
|
86
|
+
-d, \--debug
|
87
|
+
: Turn on debug mode, the $DEBUG variable is set to true.
|
88
|
+
For Rails \>\= 2.3.x, this loads the *Rails::Rack::Debugger*
|
89
|
+
middleware.
|
90
|
+
|
91
|
+
-w, \--warn
|
92
|
+
: Turn on verbose warnings, the $VERBOSE variable is set to true.
|
93
|
+
|
94
|
+
-I, \--include PATH
|
95
|
+
: specify $LOAD_PATH. PATH will be prepended to $LOAD_PATH.
|
96
|
+
The \':\' character may be used to delimit multiple directories.
|
97
|
+
This directive may be used more than once. Modifications to
|
98
|
+
$LOAD_PATH take place immediately and in the order they were
|
99
|
+
specified on the command-line.
|
100
|
+
|
101
|
+
-r, \--require LIBRARY
|
102
|
+
: require a specified LIBRARY before executing the application. The
|
103
|
+
\"require\" statement will be executed immediately and in the order
|
104
|
+
they were specified on the command-line.
|
105
|
+
|
106
|
+
# RACKUP FILE
|
107
|
+
|
108
|
+
This defaults to \"config.ru\" in RAILS_ROOT. It should be the same
|
109
|
+
file used by rackup(1) and other Rack launchers, it uses the
|
110
|
+
*Rack::Builder* DSL. Unlike many other Rack applications, RACKUP_FILE
|
111
|
+
is completely _optional_ for Rails, but may be used to disable some
|
112
|
+
of the default middleware for performance.
|
113
|
+
|
114
|
+
Embedded command-line options are mostly parsed for compatibility
|
115
|
+
with rackup(1) but strongly discouraged.
|
116
|
+
|
117
|
+
# SIGNALS
|
118
|
+
|
119
|
+
The following UNIX signals may be sent to the master process:
|
120
|
+
|
121
|
+
* HUP - reload config file, app, and gracefully restart all workers
|
122
|
+
* INT/TERM - quick shutdown, kills all workers immediately
|
123
|
+
* QUIT - graceful shutdown, waits for workers to finish their
|
124
|
+
current request before finishing.
|
125
|
+
* USR1 - reopen all logs owned by the master and all workers
|
126
|
+
See Unicorn::Util.reopen_logs for what is considered a log.
|
127
|
+
* USR2 - reexecute the running binary. A separate QUIT
|
128
|
+
should be sent to the original process once the child is verified to
|
129
|
+
be up and running.
|
130
|
+
* WINCH - gracefully stops workers but keep the master running.
|
131
|
+
This will only work for daemonized processes.
|
132
|
+
* TTIN - increment the number of worker processes by one
|
133
|
+
* TTOU - decrement the number of worker processes by one
|
134
|
+
|
135
|
+
See the [SIGNALS][4] document for full description of all signals
|
136
|
+
used by Unicorn.
|
137
|
+
|
138
|
+
# SEE ALSO
|
139
|
+
|
140
|
+
* unicorn(1)
|
141
|
+
* *Rack::Builder* ri/RDoc
|
142
|
+
* *Unicorn::Configurator* ri/RDoc
|
143
|
+
* [Unicorn RDoc][1]
|
144
|
+
* [Rack RDoc][2]
|
145
|
+
* [Rackup HowTo][3]
|
146
|
+
|
147
|
+
[1]: http://unicorn.bogomips.org/
|
148
|
+
[2]: http://rack.rubyforge.org/doc/
|
149
|
+
[3]: http://wiki.github.com/rack/rack/tutorial-rackup-howto
|
150
|
+
[4]: http://unicorn.bogomips.org/SIGNALS.html
|
data/GIT-VERSION-GEN
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
|
3
|
+
GVF=GIT-VERSION-FILE
|
4
|
+
DEF_VER=v0.92.0.GIT
|
5
|
+
|
6
|
+
LF='
|
7
|
+
'
|
8
|
+
|
9
|
+
# First see if there is a version file (included in release tarballs),
|
10
|
+
# then try git-describe, then default.
|
11
|
+
if test -f version
|
12
|
+
then
|
13
|
+
VN=$(cat version) || VN="$DEF_VER"
|
14
|
+
elif test -d .git -o -f .git &&
|
15
|
+
VN=$(git describe --abbrev=4 HEAD 2>/dev/null) &&
|
16
|
+
case "$VN" in
|
17
|
+
*$LF*) (exit 1) ;;
|
18
|
+
v[0-9]*)
|
19
|
+
git update-index -q --refresh
|
20
|
+
test -z "$(git diff-index --name-only HEAD --)" ||
|
21
|
+
VN="$VN-dirty" ;;
|
22
|
+
esac
|
23
|
+
then
|
24
|
+
VN=$(echo "$VN" | sed -e 's/-/./g');
|
25
|
+
else
|
26
|
+
VN="$DEF_VER"
|
27
|
+
fi
|
28
|
+
|
29
|
+
VN=$(expr "$VN" : v*'\(.*\)')
|
30
|
+
|
31
|
+
if test -r $GVF
|
32
|
+
then
|
33
|
+
VC=$(sed -e 's/^GIT_VERSION = //' <$GVF)
|
34
|
+
else
|
35
|
+
VC=unset
|
36
|
+
fi
|
37
|
+
test "$VN" = "$VC" || {
|
38
|
+
echo >&2 "GIT_VERSION = $VN"
|
39
|
+
echo "GIT_VERSION = $VN" >$GVF
|
40
|
+
}
|