unicorn 4.8.3 → 4.9.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.
- checksums.yaml +4 -4
- data/.document +0 -1
- data/.gitignore +2 -2
- data/{.wrongdoc.yml → .olddoc.yml} +5 -1
- data/Documentation/unicorn.1.txt +7 -0
- data/FAQ +9 -1
- data/GIT-VERSION-GEN +1 -1
- data/GNUmakefile +26 -45
- data/HACKING +7 -24
- data/ISSUES +43 -3
- data/KNOWN_ISSUES +10 -10
- data/Links +4 -1
- data/README +5 -5
- data/Rakefile +0 -44
- data/Sandbox +1 -1
- data/examples/unicorn.conf.rb +11 -0
- data/lib/unicorn.rb +2 -0
- data/lib/unicorn/configurator.rb +0 -2
- data/lib/unicorn/http_server.rb +5 -1
- data/lib/unicorn/tee_input.rb +8 -1
- data/lib/unicorn/tmpio.rb +3 -0
- data/t/GNUmakefile +1 -5
- data/t/README +1 -1
- data/t/t0002-parser-error.sh +3 -3
- data/test/exec/test_exec.rb +1 -1
- data/test/test_helper.rb +2 -2
- data/test/unit/test_http_parser.rb +3 -3
- data/test/unit/test_http_parser_ng.rb +1 -1
- data/test/unit/test_http_parser_xftrust.rb +1 -1
- data/test/unit/test_request.rb +1 -1
- data/test/unit/test_response.rb +3 -3
- data/test/unit/test_server.rb +3 -3
- data/test/unit/test_signals.rb +1 -1
- data/test/unit/test_socket_helper.rb +4 -4
- data/test/unit/test_tee_input.rb +10 -0
- data/test/unit/test_upload.rb +1 -1
- data/test/unit/test_util.rb +1 -1
- data/unicorn.gemspec +5 -8
- metadata +16 -20
- data/local.mk.sample +0 -59
- data/script/isolate_for_tests +0 -31
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eb36b9475b9c42cef918fe7773660b06617272e9
|
4
|
+
data.tar.gz: d40b3581e0f24eee1d0bc99d17bd9bd7f85db7c7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0310e0f14e7c7c82811d3e94990294b99f71d74109913941e71ad861744aae8c826858a3db2af83caf738045f3a879d78448d159604a41a0e041ac65d248edbe
|
7
|
+
data.tar.gz: 6ada5a75291f05a5250e1f7adc33133506632da6440d4a95454d4bb5cea33177b63be14e0fce0e048322debbf06dfd888e763734b0aab828c84fbf3659688edf
|
data/.document
CHANGED
data/.gitignore
CHANGED
@@ -3,9 +3,13 @@ cgit_url: http://bogomips.org/unicorn.git
|
|
3
3
|
git_url: git://bogomips.org/unicorn.git
|
4
4
|
rdoc_url: http://unicorn.bogomips.org/
|
5
5
|
ml_url: http://bogomips.org/unicorn-public/
|
6
|
-
changelog_start: v1.1.5
|
7
6
|
merge_html:
|
8
7
|
unicorn_1: Documentation/unicorn.1.html
|
9
8
|
unicorn_rails_1: Documentation/unicorn_rails.1.html
|
9
|
+
noindex:
|
10
|
+
- Unicorn::Const
|
11
|
+
- LATEST
|
12
|
+
- TODO
|
13
|
+
- unicorn_rails_1
|
10
14
|
public_email: unicorn-public@bogomips.org
|
11
15
|
private_email: unicorn@bogomips.org
|
data/Documentation/unicorn.1.txt
CHANGED
@@ -163,6 +163,13 @@ set in the old master process are inherited by the new master process.
|
|
163
163
|
Unicorn only uses (and will overwrite) the UNICORN_FD environment
|
164
164
|
variable internally when doing transparent upgrades.
|
165
165
|
|
166
|
+
UNICORN_FD is a comma-delimited list of one or more file descriptors
|
167
|
+
used to implement USR2 upgrades. Init systems may bind listen sockets
|
168
|
+
itself and spawn unicorn with UNICORN_FD set to the file descriptor
|
169
|
+
numbers of the listen socket(s). The unicorn CONFIG_FILE must still
|
170
|
+
have the inherited listen socket parameters defined as in a normal
|
171
|
+
startup, otherwise the socket will be closed.
|
172
|
+
|
166
173
|
# SEE ALSO
|
167
174
|
|
168
175
|
* unicorn_rails(1)
|
data/FAQ
CHANGED
@@ -1,6 +1,14 @@
|
|
1
1
|
= Frequently Asked Questions about Unicorn
|
2
2
|
|
3
|
-
===
|
3
|
+
=== Why aren't my Rails log files rotated when I use SIGUSR1?
|
4
|
+
|
5
|
+
The Rails autoflush_log option must remain disabled with multiprocess
|
6
|
+
servers such as unicorn. Buffering in userspace may cause lines to be
|
7
|
+
partially written and lead to corruption in the presence of multiple
|
8
|
+
processes. With reasonable amounts of logging, the performance impact
|
9
|
+
of autoflush_log should be negligible on Linux and other modern kernels.
|
10
|
+
|
11
|
+
=== I've installed Rack 1.1.x, why can't Unicorn load Rails (2.3.5)?
|
4
12
|
|
5
13
|
Rails 2.3.5 is not compatible with Rack 1.1.x. Unicorn is compatible
|
6
14
|
with both Rack 1.1.x and Rack 1.0.x, and RubyGems will load the latest
|
data/GIT-VERSION-GEN
CHANGED
data/GNUmakefile
CHANGED
@@ -8,6 +8,8 @@ RUBY = ruby
|
|
8
8
|
RAKE = rake
|
9
9
|
RAGEL = ragel
|
10
10
|
RSYNC = rsync
|
11
|
+
OLDDOC = olddoc
|
12
|
+
RDOC = rdoc
|
11
13
|
|
12
14
|
GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE
|
13
15
|
@./GIT-VERSION-GEN
|
@@ -23,11 +25,7 @@ endif
|
|
23
25
|
|
24
26
|
RUBY_ENGINE := $(shell $(RUBY) -e 'puts((RUBY_ENGINE rescue "ruby"))')
|
25
27
|
|
26
|
-
|
27
|
-
$(isolate_libs): script/isolate_for_tests
|
28
|
-
@$(RUBY) script/isolate_for_tests
|
29
|
-
-include $(isolate_libs)
|
30
|
-
MYLIBS = $(RUBYLIB):$(ISOLATE_LIBS)
|
28
|
+
MYLIBS = $(RUBYLIB)
|
31
29
|
|
32
30
|
# dunno how to implement this as concisely in Ruby, and hell, I love awk
|
33
31
|
awk_slow := awk '/def test_/{print FILENAME"--"$$2".n"}' 2>/dev/null
|
@@ -59,10 +57,11 @@ $(ext)/Makefile: $(ext)/extconf.rb $(c_files)
|
|
59
57
|
cd $(@D) && $(RUBY) extconf.rb
|
60
58
|
$(ext)/unicorn_http.$(DLEXT): $(ext)/Makefile
|
61
59
|
$(MAKE) -C $(@D)
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
http:
|
60
|
+
http: $(ext)/unicorn_http.$(DLEXT)
|
61
|
+
|
62
|
+
# only used for tests
|
63
|
+
http-install: $(ext)/unicorn_http.$(DLEXT)
|
64
|
+
install -m644 $< lib/
|
66
65
|
|
67
66
|
test-install: $(test_prefix)/.stamp
|
68
67
|
$(test_prefix)/.stamp: $(inst_deps)
|
@@ -70,7 +69,7 @@ $(test_prefix)/.stamp: $(inst_deps)
|
|
70
69
|
tar cf - $(inst_deps) GIT-VERSION-GEN | \
|
71
70
|
(cd $(test_prefix) && tar xf -)
|
72
71
|
$(MAKE) -C $(test_prefix) clean
|
73
|
-
$(MAKE) -C $(test_prefix) http shebang RUBY="$(RUBY)"
|
72
|
+
$(MAKE) -C $(test_prefix) http-install shebang RUBY="$(RUBY)"
|
74
73
|
> $@
|
75
74
|
|
76
75
|
# this is only intended to be run within $(test_prefix)
|
@@ -120,20 +119,19 @@ run_test = $(quiet_pre) \
|
|
120
119
|
%.n: arg = $(subst .n,,$(subst --, -n ,$@))
|
121
120
|
%.n: t = $(subst .n,$(log_suffix),$@)
|
122
121
|
%.n: export PATH := $(test_prefix)/bin:$(PATH)
|
123
|
-
%.n: export RUBYLIB := $(test_prefix)
|
122
|
+
%.n: export RUBYLIB := $(test_prefix)/lib:$(MYLIBS)
|
124
123
|
%.n: $(test_prefix)/.stamp
|
125
124
|
$(run_test)
|
126
125
|
|
127
126
|
$(T): arg = $@
|
128
127
|
$(T): t = $(subst .rb,$(log_suffix),$@)
|
129
128
|
$(T): export PATH := $(test_prefix)/bin:$(PATH)
|
130
|
-
$(T): export RUBYLIB := $(test_prefix)
|
129
|
+
$(T): export RUBYLIB := $(test_prefix)/lib:$(MYLIBS)
|
131
130
|
$(T): $(test_prefix)/.stamp
|
132
131
|
$(run_test)
|
133
132
|
|
134
133
|
install: $(bins) $(ext)/unicorn_http.c
|
135
134
|
$(prep_setup_rb)
|
136
|
-
$(RM) lib/unicorn_http.$(DLEXT)
|
137
135
|
$(RM) -r .install-tmp
|
138
136
|
mkdir .install-tmp
|
139
137
|
cp -p bin/* .install-tmp
|
@@ -149,42 +147,41 @@ prep_setup_rb := @-$(RM) $(setup_rb_files);$(MAKE) -C $(ext) clean
|
|
149
147
|
clean:
|
150
148
|
-$(MAKE) -C $(ext) clean
|
151
149
|
-$(MAKE) -C Documentation clean
|
152
|
-
$(RM) $(ext)/Makefile
|
150
|
+
$(RM) $(ext)/Makefile
|
153
151
|
$(RM) $(setup_rb_files) $(t_log)
|
154
152
|
$(RM) -r $(test_prefix) man
|
155
153
|
|
156
154
|
man html:
|
157
155
|
$(MAKE) -C Documentation install-$@
|
158
156
|
|
159
|
-
pkg_extra := GIT-VERSION-FILE lib/unicorn/version.rb
|
157
|
+
pkg_extra := GIT-VERSION-FILE lib/unicorn/version.rb LATEST NEWS \
|
160
158
|
$(ext)/unicorn_http.c $(man1_paths)
|
161
159
|
|
162
|
-
|
163
|
-
|
160
|
+
NEWS:
|
161
|
+
$(OLDDOC) prepare
|
164
162
|
|
165
|
-
.manifest:
|
163
|
+
.manifest: $(ext)/unicorn_http.c man NEWS
|
166
164
|
(git ls-files && for i in $@ $(pkg_extra); do echo $$i; done) | \
|
167
165
|
LC_ALL=C sort > $@+
|
168
166
|
cmp $@+ $@ || mv $@+ $@
|
169
167
|
$(RM) $@+
|
170
168
|
|
171
|
-
|
172
|
-
|
169
|
+
PLACEHOLDERS = $(man1_rdoc)
|
170
|
+
doc: .document $(ext)/unicorn_http.c man html .olddoc.yml $(PLACEHOLDERS)
|
173
171
|
find bin lib -type f -name '*.rbc' -exec rm -f '{}' ';'
|
174
172
|
$(RM) -r doc
|
175
|
-
|
173
|
+
$(OLDDOC) prepare
|
174
|
+
$(RDOC) -f oldweb
|
175
|
+
$(OLDDOC) merge
|
176
176
|
install -m644 COPYING doc/COPYING
|
177
177
|
install -m644 $(shell LC_ALL=C grep '^[A-Z]' .document) doc/
|
178
178
|
install -m644 $(man1_paths) doc/
|
179
179
|
tar cf - $$(git ls-files examples/) | (cd doc && tar xf -)
|
180
|
-
$(RM) $(man1_rdoc)
|
181
180
|
|
182
181
|
# publishes docs to http://unicorn.bogomips.org
|
183
182
|
publish_doc:
|
184
183
|
-git set-file-times
|
185
184
|
$(MAKE) doc
|
186
|
-
find doc/images -type f | \
|
187
|
-
TZ=UTC xargs touch -d '1970-01-01 00:00:02' doc/rdoc.css
|
188
185
|
$(MAKE) doc_gz
|
189
186
|
chmod 644 $$(find doc -type f)
|
190
187
|
$(RSYNC) -av doc/ unicorn.bogomips.org:/srv/unicorn/
|
@@ -192,27 +189,15 @@ publish_doc:
|
|
192
189
|
|
193
190
|
# Create gzip variants of the same timestamp as the original so nginx
|
194
191
|
# "gzip_static on" can serve the gzipped versions directly.
|
195
|
-
doc_gz: docs = $(shell find doc -type f ! -regex '
|
192
|
+
doc_gz: docs = $(shell find doc -type f ! -regex '^.*\.gz$$')
|
196
193
|
doc_gz:
|
197
194
|
for i in $(docs); do \
|
198
195
|
gzip --rsyncable -9 < $$i > $$i.gz; touch -r $$i $$i.gz; done
|
199
196
|
|
200
197
|
ifneq ($(VERSION),)
|
201
|
-
rfproject := mongrel
|
202
198
|
rfpackage := unicorn
|
203
199
|
pkggem := pkg/$(rfpackage)-$(VERSION).gem
|
204
200
|
pkgtgz := pkg/$(rfpackage)-$(VERSION).tgz
|
205
|
-
release_notes := release_notes-$(VERSION)
|
206
|
-
release_changes := release_changes-$(VERSION)
|
207
|
-
|
208
|
-
release-notes: $(release_notes)
|
209
|
-
release-changes: $(release_changes)
|
210
|
-
$(release_changes):
|
211
|
-
wrongdoc release_changes > $@+
|
212
|
-
$(VISUAL) $@+ && test -s $@+ && mv $@+ $@
|
213
|
-
$(release_notes):
|
214
|
-
wrongdoc release_notes > $@+
|
215
|
-
$(VISUAL) $@+ && test -s $@+ && mv $@+ $@
|
216
201
|
|
217
202
|
# ensures we're actually on the tagged $(VERSION), only used for release
|
218
203
|
verify:
|
@@ -248,20 +233,16 @@ $(pkgtgz): .manifest fix-perms
|
|
248
233
|
|
249
234
|
package: $(pkgtgz) $(pkggem)
|
250
235
|
|
251
|
-
release: verify package
|
252
|
-
# make tgz release on RubyForge
|
253
|
-
rubyforge add_release -f -n $(release_notes) -a $(release_changes) \
|
254
|
-
$(rfproject) $(rfpackage) $(VERSION) $(pkgtgz)
|
236
|
+
release: verify package
|
255
237
|
# push gem to Gemcutter
|
256
238
|
gem push $(pkggem)
|
257
|
-
# in case of gem downloads from RubyForge releases page
|
258
|
-
-rubyforge add_file \
|
259
|
-
$(rfproject) $(rfpackage) $(VERSION) $(pkggem)
|
260
|
-
$(RAKE) fm_update VERSION=$(VERSION)
|
261
239
|
else
|
262
240
|
gem install-gem: GIT-VERSION-FILE
|
263
241
|
$(MAKE) $@ VERSION=$(GIT_VERSION)
|
264
242
|
endif
|
265
243
|
|
244
|
+
$(PLACEHOLDERS):
|
245
|
+
echo olddoc_placeholder > $@
|
246
|
+
|
266
247
|
.PHONY: .FORCE-GIT-VERSION-FILE doc $(T) $(slow_tests) man
|
267
248
|
.PHONY: test-install
|
data/HACKING
CHANGED
@@ -19,13 +19,6 @@ RubyGems.
|
|
19
19
|
Users of GNU-based systems (such as GNU/Linux) usually have GNU make
|
20
20
|
installed as "make" instead of "gmake".
|
21
21
|
|
22
|
-
Since we don't load RubyGems by default, loading Rack properly requires
|
23
|
-
setting up RUBYLIB to point to where Rack is located. Not loading
|
24
|
-
RubyGems drastically lowers the time to run the full test suite. You
|
25
|
-
may setup a "local.mk" file in the top-level working directory to setup
|
26
|
-
your RUBYLIB and any other environment variables. A "local.mk.sample"
|
27
|
-
file is provided for reference.
|
28
|
-
|
29
22
|
Running the entire test suite with 4 tests in parallel:
|
30
23
|
|
31
24
|
gmake -j4 check
|
@@ -57,10 +50,8 @@ programming experience will come in handy (or be learned) here.
|
|
57
50
|
|
58
51
|
=== Documentation
|
59
52
|
|
60
|
-
|
61
|
-
|
62
|
-
the lack of RDoc-to-manpage converters we know about, we're writing
|
63
|
-
manpages in Markdown and converting to troff/HTML with Pandoc.
|
53
|
+
Due to the lack of RDoc-to-manpage converters we know about, we're
|
54
|
+
writing manpages in Markdown and converting to troff/HTML with Pandoc.
|
64
55
|
|
65
56
|
Please wrap documentation at 72 characters-per-line or less (long URLs
|
66
57
|
are exempt) so it is comfortably readable from terminals.
|
@@ -72,10 +63,9 @@ becomes unavailable.
|
|
72
63
|
|
73
64
|
=== Ruby/C Compatibility
|
74
65
|
|
75
|
-
We target Ruby 1.
|
76
|
-
|
77
|
-
|
78
|
-
ability to use unlinked files.
|
66
|
+
We target mainline Ruby 1.9.3 and later. We need the Ruby
|
67
|
+
implementation to support fork, exec, pipe, UNIX signals, access to
|
68
|
+
integer file descriptors and ability to use unlinked files.
|
79
69
|
|
80
70
|
All of our C code is OS-independent and should run on compilers
|
81
71
|
supported by the versions of Ruby we target.
|
@@ -114,7 +104,7 @@ don't email the git mailing list or maintainer with Unicorn patches :)
|
|
114
104
|
|
115
105
|
In order to build the gem, you must install the following components:
|
116
106
|
|
117
|
-
*
|
107
|
+
* olddoc (RubyGem)
|
118
108
|
* pandoc
|
119
109
|
|
120
110
|
You can build the Unicorn gem with the following command:
|
@@ -125,13 +115,6 @@ You can build the Unicorn gem with the following command:
|
|
125
115
|
|
126
116
|
It is easy to install the contents of your git working directory:
|
127
117
|
|
128
|
-
Via RubyGems
|
118
|
+
Via RubyGems
|
129
119
|
|
130
120
|
gmake install-gem
|
131
|
-
|
132
|
-
Without RubyGems (via setup.rb):
|
133
|
-
|
134
|
-
gmake install
|
135
|
-
|
136
|
-
It is not at all recommended to mix a RubyGems installation with an
|
137
|
-
installation done without RubyGems, however.
|
data/ISSUES
CHANGED
@@ -6,7 +6,7 @@ submit patches and/or obtain support after you have searched the
|
|
6
6
|
{documentation}[http://unicorn.bogomips.org/].
|
7
7
|
|
8
8
|
* No subscription will ever be required to email the public inbox.
|
9
|
-
*
|
9
|
+
* Cc: all participants in a thread or commit, as subscription is optional
|
10
10
|
* Do not {top post}[http://catb.org/jargon/html/T/top-post.html] in replies
|
11
11
|
* Quote as little as possible of the message you're replying to
|
12
12
|
* Do not send HTML mail, it will likely be flagged as spam
|
@@ -18,6 +18,40 @@ instead and your issue will be handled discreetly.
|
|
18
18
|
If you don't get a response within a few days, we may have forgotten
|
19
19
|
about it so feel free to ask again.
|
20
20
|
|
21
|
+
== Bugs in related projects
|
22
|
+
|
23
|
+
unicorn is sometimes affected by bugs in its dependencies. Bugs
|
24
|
+
triggered by unicorn in mainline Ruby, rack, GNU C library (glibc),
|
25
|
+
or the Linux kernel will be reported upstream and fixed.
|
26
|
+
|
27
|
+
For bugs in Ruby itself, we may forward bugs to
|
28
|
+
https://bugs.ruby-lang.org/ and discuss+fix them on the ruby-core
|
29
|
+
list at mailto:ruby-core@ruby-lang.org
|
30
|
+
Subscription to post is required to ruby-core, unfortunately:
|
31
|
+
mailto:ruby-core-request@ruby-lang.org?subject=subscribe
|
32
|
+
|
33
|
+
For uncommon bugs in Rack, we may forward bugs to
|
34
|
+
mailto:rack-devel@googlegroups.com and discuss there.
|
35
|
+
Subscription (without any web UI or Google account) is possible via:
|
36
|
+
mailto:rack-devel+subscribe@googlegroups.com
|
37
|
+
Note: not everyone can use the proprietary bug tracker used by Rack,
|
38
|
+
but their mailing list remains operational.
|
39
|
+
|
40
|
+
Uncommon bugs we encounter in the Linux kernel should be Cc:-ed to the
|
41
|
+
Linux kernel mailing list (LKML) at mailto:linux-kernel@vger.kernel.org
|
42
|
+
and subsystem maintainers such as mailto:netdev@vger.kernel.org
|
43
|
+
(for networking issues). It is expected practice to Cc: anybody
|
44
|
+
involved with any problematic commits (including those in the
|
45
|
+
Signed-off-by: and other trailer lines). No subscription is necessary,
|
46
|
+
and the our mailing list follows the same conventions as LKML for
|
47
|
+
interopability. There is a kernel.org Bugzilla instance, but it is
|
48
|
+
ignored by most developers.
|
49
|
+
|
50
|
+
Likewise for any rare glibc bugs we might encounter, we should Cc:
|
51
|
+
mailto:libc-alpha@sourceware.org
|
52
|
+
Keep in mind glibc upstream does use Bugzilla for tracking bugs:
|
53
|
+
https://sourceware.org/bugzilla/
|
54
|
+
|
21
55
|
== Submitting Patches
|
22
56
|
|
23
57
|
See the HACKING document (and additionally, the
|
@@ -29,8 +63,14 @@ document distributed with git) on guidelines for patch submission.
|
|
29
63
|
* public: mailto:unicorn-public@bogomips.org
|
30
64
|
* private: mailto:unicorn@bogomips.org
|
31
65
|
|
32
|
-
We operate a {public-inbox}[http://public-inbox.org/]
|
33
|
-
You may subscribe using
|
66
|
+
We operate a {public-inbox}[http://public-inbox.org/] which
|
67
|
+
feeds the mailing list. You may subscribe either using
|
68
|
+
{ssoma}[http://ssoma.public-inbox.org/] or by sending a mail
|
69
|
+
to mailto:unicorn-public+subscribe@bogomips.org
|
70
|
+
|
71
|
+
ssoma is a mail archiver/fetcher using git. It operates in a similar
|
72
|
+
fashion to tools such as slrnpull, fetchmail, or getmail. ssoma
|
73
|
+
subscription instructions:
|
34
74
|
|
35
75
|
URL=git://bogomips.org/unicorn-public
|
36
76
|
LISTNAME=unicorn
|
data/KNOWN_ISSUES
CHANGED
@@ -17,16 +17,6 @@ acceptable solution. Those issues are documented here.
|
|
17
17
|
have builtin workarounds for Kernel#rand and OpenSSL::Random users,
|
18
18
|
but applications may use other PRNGs.
|
19
19
|
|
20
|
-
* Under some versions of Ruby 1.8, it is necessary to call +srand+ in an
|
21
|
-
after_fork hook to get correct random number generation. We have a builtin
|
22
|
-
workaround for this starting with \Unicorn 3.6.1
|
23
|
-
|
24
|
-
See http://redmine.ruby-lang.org/issues/show/4338
|
25
|
-
|
26
|
-
* On Ruby 1.8 prior to Ruby 1.8.7-p248, *BSD platforms have a broken
|
27
|
-
stdio that causes failure for file uploads larger than 112K. Upgrade
|
28
|
-
your version of Ruby or continue using Unicorn 1.x/3.4.x.
|
29
|
-
|
30
20
|
* For notes on sandboxing tools such as Bundler or Isolate,
|
31
21
|
see the {Sandbox}[link:Sandbox.html] page.
|
32
22
|
|
@@ -44,6 +34,16 @@ acceptable solution. Those issues are documented here.
|
|
44
34
|
|
45
35
|
== Known Issues (Old)
|
46
36
|
|
37
|
+
* Under some versions of Ruby 1.8, it is necessary to call +srand+ in an
|
38
|
+
after_fork hook to get correct random number generation. We have a builtin
|
39
|
+
workaround for this starting with \Unicorn 3.6.1
|
40
|
+
|
41
|
+
See http://redmine.ruby-lang.org/issues/show/4338
|
42
|
+
|
43
|
+
* On Ruby 1.8 prior to Ruby 1.8.7-p248, *BSD platforms have a broken
|
44
|
+
stdio that causes failure for file uploads larger than 112K. Upgrade
|
45
|
+
your version of Ruby or continue using Unicorn 1.x/3.4.x.
|
46
|
+
|
47
47
|
* Under Ruby 1.9.1, methods like Array#shuffle and Array#sample will
|
48
48
|
segfault if called after forking. Upgrade to Ruby 1.9.2 or call
|
49
49
|
"Kernel.rand" in your after_fork hook to reinitialize the random
|
data/Links
CHANGED
@@ -45,7 +45,10 @@ or services behind them.
|
|
45
45
|
* {Green Unicorn}[http://gunicorn.org/] - a Python version of \Unicorn
|
46
46
|
|
47
47
|
* {Rainbows!}[http://rainbows.bogomips.org/] - \Unicorn for sleepy
|
48
|
-
apps and slow clients.
|
48
|
+
apps and slow clients (historical).
|
49
|
+
|
50
|
+
* {yahns}[http://yahns.yhbt.net/] - like Rainbows!, but with fewer options
|
51
|
+
and designed for energy efficiency on idle sites.
|
49
52
|
|
50
53
|
=== Prior Work
|
51
54
|
|
data/README
CHANGED
@@ -12,7 +12,8 @@ both the the request and response in between \Unicorn and slow clients.
|
|
12
12
|
cut out everything that is better supported by the operating system,
|
13
13
|
{nginx}[http://nginx.net/] or {Rack}[http://rack.github.io/].
|
14
14
|
|
15
|
-
* Compatible with Ruby 1.
|
15
|
+
* Compatible with Ruby 1.9.3 and later.
|
16
|
+
unicorn 4.8.x will remain supported for Ruby 1.8 users.
|
16
17
|
|
17
18
|
* Process management: \Unicorn will reap and restart workers that
|
18
19
|
die from broken apps. There is no need to manage multiple processes
|
@@ -95,13 +96,13 @@ from git.
|
|
95
96
|
|
96
97
|
== Usage
|
97
98
|
|
98
|
-
===
|
99
|
+
=== Rack (including Rails 3+) applications
|
99
100
|
|
100
101
|
In APP_ROOT, run:
|
101
102
|
|
102
103
|
unicorn
|
103
104
|
|
104
|
-
===
|
105
|
+
=== Ancient Rails 1.2 - 2.x versions
|
105
106
|
|
106
107
|
In RAILS_ROOT, run:
|
107
108
|
|
@@ -122,8 +123,7 @@ The default settings are designed for maximum out-of-the-box
|
|
122
123
|
compatibility with existing applications.
|
123
124
|
|
124
125
|
Most command-line options for other Rack applications (above) are also
|
125
|
-
supported. Run `unicorn -h`
|
126
|
-
options.
|
126
|
+
supported. Run `unicorn -h` to see command-line options.
|
127
127
|
|
128
128
|
== Disclaimer
|
129
129
|
|
data/Rakefile
CHANGED
@@ -1,47 +1,3 @@
|
|
1
|
-
# -*- encoding: binary -*-
|
2
|
-
autoload :Gem, 'rubygems'
|
3
|
-
require 'wrongdoc'
|
4
|
-
|
5
|
-
cgit_url = Wrongdoc.config[:cgit_url]
|
6
|
-
git_url = Wrongdoc.config[:git_url]
|
7
|
-
|
8
|
-
desc "post to FM"
|
9
|
-
task :fm_update do
|
10
|
-
require 'tempfile'
|
11
|
-
require 'net/http'
|
12
|
-
require 'net/netrc'
|
13
|
-
require 'json'
|
14
|
-
version = ENV['VERSION'] or abort "VERSION= needed"
|
15
|
-
uri = URI.parse('https://freecode.com/projects/unicorn/releases.json')
|
16
|
-
rc = Net::Netrc.locate('unicorn-fm') or abort "~/.netrc not found"
|
17
|
-
api_token = rc.password
|
18
|
-
_, subject, body = `git cat-file tag v#{version}`.split(/\n\n/, 3)
|
19
|
-
tmp = Tempfile.new('fm-changelog')
|
20
|
-
tmp.puts subject
|
21
|
-
tmp.puts
|
22
|
-
tmp.puts body
|
23
|
-
tmp.flush
|
24
|
-
system(ENV["VISUAL"], tmp.path) or abort "#{ENV["VISUAL"]} failed: #$?"
|
25
|
-
changelog = File.read(tmp.path).strip
|
26
|
-
|
27
|
-
req = {
|
28
|
-
"auth_code" => api_token,
|
29
|
-
"release" => {
|
30
|
-
"tag_list" => "Experimental",
|
31
|
-
"version" => version,
|
32
|
-
"changelog" => changelog,
|
33
|
-
},
|
34
|
-
}.to_json
|
35
|
-
|
36
|
-
if ! changelog.strip.empty? && version =~ %r{\A[\d\.]+\d+\z}
|
37
|
-
Net::HTTP.start(uri.host, uri.port, :use_ssl => true) do |http|
|
38
|
-
p http.post(uri.path, req, {'Content-Type'=>'application/json'})
|
39
|
-
end
|
40
|
-
else
|
41
|
-
warn "not updating freshmeat for v#{version}"
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
1
|
# optional rake-compiler support in case somebody needs to cross compile
|
46
2
|
begin
|
47
3
|
mk = "ext/unicorn_http/Makefile"
|
data/Sandbox
CHANGED
@@ -86,7 +86,7 @@ For now workarounds include doing one of the following:
|
|
86
86
|
|
87
87
|
3. Explicitly setting RUBYLIB or $LOAD_PATH to include any gem path
|
88
88
|
where the unicorn gem is installed
|
89
|
-
(e.g. /usr/lib/ruby/gems/1.9.
|
89
|
+
(e.g. /usr/lib/ruby/gems/1.9.3/gems/unicorn-VERSION/lib)
|
90
90
|
|
91
91
|
=== RUBYOPT pollution from SIGUSR2 upgrades
|
92
92
|
|
data/examples/unicorn.conf.rb
CHANGED
@@ -54,12 +54,23 @@ GC.respond_to?(:copy_on_write_friendly=) and
|
|
54
54
|
# fast LAN.
|
55
55
|
check_client_connection false
|
56
56
|
|
57
|
+
# local variable to guard against running a hook multiple times
|
58
|
+
run_once = true
|
59
|
+
|
57
60
|
before_fork do |server, worker|
|
58
61
|
# the following is highly recomended for Rails + "preload_app true"
|
59
62
|
# as there's no need for the master process to hold a connection
|
60
63
|
defined?(ActiveRecord::Base) and
|
61
64
|
ActiveRecord::Base.connection.disconnect!
|
62
65
|
|
66
|
+
# Occasionally, it may be necessary to run non-idempotent code in the
|
67
|
+
# master before forking. Keep in mind the above disconnect! example
|
68
|
+
# is idempotent and does not need a guard.
|
69
|
+
if run_once
|
70
|
+
# do_something_once_here ...
|
71
|
+
run_once = false # prevent from firing again
|
72
|
+
end
|
73
|
+
|
63
74
|
# The following is only recommended for memory/DB-constrained
|
64
75
|
# installations. It is not needed if your system can house
|
65
76
|
# twice as many worker_processes as you have configured.
|
data/lib/unicorn.rb
CHANGED
@@ -67,6 +67,7 @@ module Unicorn
|
|
67
67
|
use Rack::CommonLogger, $stderr
|
68
68
|
use Rack::ShowExceptions
|
69
69
|
use Rack::Lint
|
70
|
+
use Rack::TempfileReaper if Rack.const_defined?(:TempfileReaper)
|
70
71
|
run inner_app
|
71
72
|
end.to_app
|
72
73
|
when "deployment"
|
@@ -74,6 +75,7 @@ module Unicorn
|
|
74
75
|
use Rack::ContentLength
|
75
76
|
use Rack::Chunked
|
76
77
|
use Rack::CommonLogger, $stderr
|
78
|
+
use Rack::TempfileReaper if Rack.const_defined?(:TempfileReaper)
|
77
79
|
run inner_app
|
78
80
|
end.to_app
|
79
81
|
else
|
data/lib/unicorn/configurator.rb
CHANGED
@@ -309,8 +309,6 @@ class Unicorn::Configurator
|
|
309
309
|
# to receive IPv4 queries on dual-stack systems. A separate IPv4-only
|
310
310
|
# listener is required if this is true.
|
311
311
|
#
|
312
|
-
# This option is only available for Ruby 1.9.2 and later.
|
313
|
-
#
|
314
312
|
# Enabling this option for the IPv6-only listener and having a
|
315
313
|
# separate IPv4 listener is recommended if you wish to support IPv6
|
316
314
|
# on the same TCP port. Otherwise, the value of \env[\"REMOTE_ADDR\"]
|
data/lib/unicorn/http_server.rb
CHANGED
@@ -69,7 +69,7 @@ class Unicorn::HttpServer
|
|
69
69
|
# you can set the following in your Unicorn config file, HUP and then
|
70
70
|
# continue with the traditional USR2 + QUIT upgrade steps:
|
71
71
|
#
|
72
|
-
# Unicorn::HttpServer::START_CTX[0] = "/home/bofh/
|
72
|
+
# Unicorn::HttpServer::START_CTX[0] = "/home/bofh/2.2.0/bin/unicorn"
|
73
73
|
START_CTX = {
|
74
74
|
:argv => ARGV.map { |arg| arg.dup },
|
75
75
|
0 => $0.dup,
|
@@ -389,6 +389,10 @@ class Unicorn::HttpServer
|
|
389
389
|
|
390
390
|
# wait for a signal hander to wake us up and then consume the pipe
|
391
391
|
def master_sleep(sec)
|
392
|
+
# 11 bytes is the maximum string length which can be embedded within
|
393
|
+
# the Ruby itself and not require a separate malloc (on 32-bit MRI 1.9+).
|
394
|
+
# Most reads are only one byte here and uncommon, so it's not worth a
|
395
|
+
# persistent buffer, either:
|
392
396
|
IO.select([ SELF_PIPE[0] ], nil, nil, sec) or return
|
393
397
|
SELF_PIPE[0].kgio_tryread(11)
|
394
398
|
end
|
data/lib/unicorn/tee_input.rb
CHANGED
@@ -28,13 +28,20 @@ class Unicorn::TeeInput < Unicorn::StreamInput
|
|
28
28
|
@@client_body_buffer_size
|
29
29
|
end
|
30
30
|
|
31
|
+
# for Rack::TempfileReaper in rack 1.6+
|
32
|
+
def new_tmpio # :nodoc:
|
33
|
+
tmpio = Unicorn::TmpIO.new
|
34
|
+
(@parser.env['rack.tempfiles'] ||= []) << tmpio
|
35
|
+
tmpio
|
36
|
+
end
|
37
|
+
|
31
38
|
# Initializes a new TeeInput object. You normally do not have to call
|
32
39
|
# this unless you are writing an HTTP server.
|
33
40
|
def initialize(socket, request)
|
34
41
|
@len = request.content_length
|
35
42
|
super
|
36
43
|
@tmp = @len && @len <= @@client_body_buffer_size ?
|
37
|
-
StringIO.new("") :
|
44
|
+
StringIO.new("") : new_tmpio
|
38
45
|
end
|
39
46
|
|
40
47
|
# :call-seq:
|
data/lib/unicorn/tmpio.rb
CHANGED
data/t/GNUmakefile
CHANGED
@@ -17,11 +17,7 @@ endif
|
|
17
17
|
RUBY_ENGINE := $(shell $(RUBY) -e 'puts((RUBY_ENGINE rescue "ruby"))')
|
18
18
|
export RUBY_ENGINE
|
19
19
|
|
20
|
-
|
21
|
-
$(isolate_libs): ../script/isolate_for_tests
|
22
|
-
@cd .. && $(RUBY) script/isolate_for_tests
|
23
|
-
-include $(isolate_libs)
|
24
|
-
MYLIBS := $(RUBYLIB):$(ISOLATE_LIBS)
|
20
|
+
MYLIBS := $(RUBYLIB)
|
25
21
|
|
26
22
|
T = $(wildcard t[0-9][0-9][0-9][0-9]-*.sh)
|
27
23
|
|
data/t/README
CHANGED
@@ -10,7 +10,7 @@ comfortable writing integration tests with.
|
|
10
10
|
|
11
11
|
== Requirements
|
12
12
|
|
13
|
-
* {Ruby 1.
|
13
|
+
* {Ruby 1.9.3+}[https://www.ruby-lang.org/] (duh!)
|
14
14
|
* {GNU make}[http://www.gnu.org/software/make/]
|
15
15
|
* {socat}[http://www.dest-unreach.org/socat/]
|
16
16
|
* {curl}[http://curl.haxx.se/]
|
data/t/t0002-parser-error.sh
CHANGED
@@ -42,7 +42,7 @@ t_begin "send a huge Request URI (REQUEST_PATH > (12 * 1024))" && {
|
|
42
42
|
}
|
43
43
|
|
44
44
|
t_begin "response should be a 414 (REQUEST_PATH)" && {
|
45
|
-
grep -F 'HTTP/1.1 414
|
45
|
+
grep -F 'HTTP/1.1 414 ' $tmp
|
46
46
|
}
|
47
47
|
|
48
48
|
t_begin "send a huge Request URI (QUERY_STRING > (10 * 1024))" && {
|
@@ -63,7 +63,7 @@ t_begin "send a huge Request URI (QUERY_STRING > (10 * 1024))" && {
|
|
63
63
|
}
|
64
64
|
|
65
65
|
t_begin "response should be a 414 (QUERY_STRING)" && {
|
66
|
-
grep -F 'HTTP/1.1 414
|
66
|
+
grep -F 'HTTP/1.1 414 ' $tmp
|
67
67
|
}
|
68
68
|
|
69
69
|
t_begin "send a huge Request URI (FRAGMENT > 1024)" && {
|
@@ -84,7 +84,7 @@ t_begin "send a huge Request URI (FRAGMENT > 1024)" && {
|
|
84
84
|
}
|
85
85
|
|
86
86
|
t_begin "response should be a 414 (FRAGMENT)" && {
|
87
|
-
grep -F 'HTTP/1.1 414
|
87
|
+
grep -F 'HTTP/1.1 414 ' $tmp
|
88
88
|
}
|
89
89
|
|
90
90
|
t_begin "server stderr should be clean" && check_stderr
|
data/test/exec/test_exec.rb
CHANGED
data/test/test_helper.rb
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
# -*- encoding: binary -*-
|
2
2
|
|
3
|
-
# Copyright (c) 2005 Zed A. Shaw
|
3
|
+
# Copyright (c) 2005 Zed A. Shaw
|
4
4
|
# You can redistribute it and/or modify it under the same terms as Ruby 1.8 or
|
5
5
|
# the GPLv2+ (GPLv3+ preferred)
|
6
6
|
#
|
7
|
-
# Additional work donated by contributors. See
|
7
|
+
# Additional work donated by contributors. See git history
|
8
8
|
# for more information.
|
9
9
|
|
10
10
|
STDIN.sync = STDOUT.sync = STDERR.sync = true # buffering makes debugging hard
|
@@ -1,13 +1,13 @@
|
|
1
1
|
# -*- encoding: binary -*-
|
2
2
|
|
3
|
-
# Copyright (c) 2005 Zed A. Shaw
|
3
|
+
# Copyright (c) 2005 Zed A. Shaw
|
4
4
|
# You can redistribute it and/or modify it under the same terms as Ruby 1.8 or
|
5
5
|
# the GPLv2+ (GPLv3+ preferred)
|
6
6
|
#
|
7
|
-
# Additional work donated by contributors. See
|
7
|
+
# Additional work donated by contributors. See git history
|
8
8
|
# for more information.
|
9
9
|
|
10
|
-
require 'test/test_helper'
|
10
|
+
require './test/test_helper'
|
11
11
|
|
12
12
|
include Unicorn
|
13
13
|
|
data/test/unit/test_request.rb
CHANGED
data/test/unit/test_response.rb
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
# -*- encoding: binary -*-
|
2
2
|
|
3
|
-
# Copyright (c) 2005 Zed A. Shaw
|
3
|
+
# Copyright (c) 2005 Zed A. Shaw
|
4
4
|
# You can redistribute it and/or modify it under the same terms as Ruby 1.8 or
|
5
5
|
# the GPLv2+ (GPLv3+ preferred)
|
6
6
|
#
|
7
|
-
# Additional work donated by contributors. See
|
7
|
+
# Additional work donated by contributors. See git history
|
8
8
|
# for more information.
|
9
9
|
|
10
|
-
require 'test/test_helper'
|
10
|
+
require './test/test_helper'
|
11
11
|
require 'time'
|
12
12
|
|
13
13
|
include Unicorn
|
data/test/unit/test_server.rb
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
# -*- encoding: binary -*-
|
2
2
|
|
3
|
-
# Copyright (c) 2005 Zed A. Shaw
|
3
|
+
# Copyright (c) 2005 Zed A. Shaw
|
4
4
|
# You can redistribute it and/or modify it under the same terms as Ruby 1.8 or
|
5
5
|
# the GPLv2+ (GPLv3+ preferred)
|
6
6
|
#
|
7
|
-
# Additional work donated by contributors. See
|
7
|
+
# Additional work donated by contributors. See git history
|
8
8
|
# for more information.
|
9
9
|
|
10
|
-
require 'test/test_helper'
|
10
|
+
require './test/test_helper'
|
11
11
|
|
12
12
|
include Unicorn
|
13
13
|
|
data/test/unit/test_signals.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# -*- encoding: binary -*-
|
2
2
|
|
3
|
-
require 'test/test_helper'
|
3
|
+
require './test/test_helper'
|
4
4
|
require 'tempfile'
|
5
5
|
|
6
6
|
class TestSocketHelper < Test::Unit::TestCase
|
@@ -182,8 +182,8 @@ class TestSocketHelper < Test::Unit::TestCase
|
|
182
182
|
sock = bind_listen "[#@test6_addr]:#{port}", :ipv6only => true
|
183
183
|
cur = sock.getsockopt(:IPPROTO_IPV6, :IPV6_V6ONLY).unpack('i')[0]
|
184
184
|
assert_equal 1, cur
|
185
|
-
|
186
|
-
end
|
185
|
+
rescue Errno::EAFNOSUPPORT
|
186
|
+
end
|
187
187
|
|
188
188
|
def test_reuseport
|
189
189
|
port = unused_port @test_addr
|
@@ -193,5 +193,5 @@ class TestSocketHelper < Test::Unit::TestCase
|
|
193
193
|
assert_operator cur, :>, 0
|
194
194
|
rescue Errno::ENOPROTOOPT
|
195
195
|
# kernel does not support SO_REUSEPORT (older Linux)
|
196
|
-
end
|
196
|
+
end if defined?(Socket::SO_REUSEPORT)
|
197
197
|
end
|
data/test/unit/test_tee_input.rb
CHANGED
@@ -29,6 +29,13 @@ class TestTeeInput < Test::Unit::TestCase
|
|
29
29
|
end while true
|
30
30
|
end
|
31
31
|
|
32
|
+
def check_tempfiles
|
33
|
+
tmp = @parser.env["rack.tempfiles"]
|
34
|
+
assert_instance_of Array, tmp
|
35
|
+
assert_operator tmp.size, :>=, 1
|
36
|
+
assert_instance_of Unicorn::TmpIO, tmp[0]
|
37
|
+
end
|
38
|
+
|
32
39
|
def test_gets_long
|
33
40
|
r = init_request("hello", 5 + (4096 * 4 * 3) + "#$/foo#$/".size)
|
34
41
|
ti = TeeInput.new(@rd, r)
|
@@ -106,6 +113,7 @@ class TestTeeInput < Test::Unit::TestCase
|
|
106
113
|
assert_kind_of File, ti.tmp
|
107
114
|
assert_equal 0, ti.tmp.pos
|
108
115
|
assert_equal Unicorn::Const::MAX_BODY + 1, ti.size
|
116
|
+
check_tempfiles
|
109
117
|
end
|
110
118
|
|
111
119
|
def test_read_in_full_if_content_length
|
@@ -148,6 +156,7 @@ class TestTeeInput < Test::Unit::TestCase
|
|
148
156
|
assert_nil ti.read(1)
|
149
157
|
pid, status = Process.waitpid2(pid)
|
150
158
|
assert status.success?
|
159
|
+
check_tempfiles
|
151
160
|
end
|
152
161
|
|
153
162
|
def test_chunked
|
@@ -183,6 +192,7 @@ class TestTeeInput < Test::Unit::TestCase
|
|
183
192
|
status = nil
|
184
193
|
pid, status = Process.waitpid2(pid)
|
185
194
|
assert status.success?
|
195
|
+
check_tempfiles
|
186
196
|
end
|
187
197
|
|
188
198
|
def test_chunked_ping_pong
|
data/test/unit/test_upload.rb
CHANGED
data/test/unit/test_util.rb
CHANGED
data/unicorn.gemspec
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# -*- encoding: binary -*-
|
2
2
|
ENV["VERSION"] or abort "VERSION= must be specified"
|
3
3
|
manifest = File.readlines('.manifest').map! { |x| x.chomp! }
|
4
|
-
require '
|
5
|
-
extend
|
4
|
+
require 'olddoc'
|
5
|
+
extend Olddoc::Gemspec
|
6
6
|
name, summary, title = readme_metadata
|
7
7
|
|
8
8
|
# don't bother with tests that fork, not worth our time to get working
|
@@ -17,16 +17,13 @@ Gem::Specification.new do |s|
|
|
17
17
|
s.version = ENV["VERSION"].dup
|
18
18
|
s.authors = ["#{name} hackers"]
|
19
19
|
s.summary = summary
|
20
|
-
s.date = Time.now.utc.strftime('%Y-%m-%d')
|
21
20
|
s.description = readme_description
|
22
21
|
s.email = %q{unicorn-public@bogomips.org}
|
23
22
|
s.executables = %w(unicorn unicorn_rails)
|
24
23
|
s.extensions = %w(ext/unicorn_http/extconf.rb)
|
25
24
|
s.extra_rdoc_files = extra_rdoc_files(manifest)
|
26
25
|
s.files = manifest
|
27
|
-
s.homepage =
|
28
|
-
s.rdoc_options = rdoc_options
|
29
|
-
s.rubyforge_project = %q{mongrel}
|
26
|
+
s.homepage = Olddoc.config['rdoc_url']
|
30
27
|
s.test_files = test_files
|
31
28
|
|
32
29
|
# for people that are absolutely stuck on Rails 2.3.2 and can't
|
@@ -37,8 +34,8 @@ Gem::Specification.new do |s|
|
|
37
34
|
s.add_dependency(%q<kgio>, '~> 2.6')
|
38
35
|
s.add_dependency(%q<raindrops>, '~> 0.7')
|
39
36
|
|
40
|
-
s.add_development_dependency('
|
41
|
-
s.add_development_dependency('
|
37
|
+
s.add_development_dependency('test-unit', '~> 3.0')
|
38
|
+
s.add_development_dependency('olddoc', '~> 1.0')
|
42
39
|
|
43
40
|
s.licenses = ["GPLv2+", "Ruby 1.8"]
|
44
41
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unicorn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Unicorn hackers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-04-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|
@@ -53,33 +53,33 @@ dependencies:
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0.7'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: test-unit
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '3.
|
61
|
+
version: '3.0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '3.
|
68
|
+
version: '3.0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: olddoc
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '1.
|
75
|
+
version: '1.0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '1.
|
82
|
+
version: '1.0'
|
83
83
|
description: |-
|
84
84
|
\Unicorn is an HTTP server for Rack applications designed to only serve
|
85
85
|
fast clients on low-latency, high-bandwidth connections and take
|
@@ -105,7 +105,6 @@ extra_rdoc_files:
|
|
105
105
|
- KNOWN_ISSUES
|
106
106
|
- TODO
|
107
107
|
- NEWS
|
108
|
-
- ChangeLog
|
109
108
|
- LATEST
|
110
109
|
- lib/unicorn.rb
|
111
110
|
- lib/unicorn/configurator.rb
|
@@ -116,6 +115,8 @@ extra_rdoc_files:
|
|
116
115
|
- lib/unicorn/util.rb
|
117
116
|
- lib/unicorn/oob_gc.rb
|
118
117
|
- lib/unicorn/worker.rb
|
118
|
+
- unicorn_1
|
119
|
+
- unicorn_rails_1
|
119
120
|
- ISSUES
|
120
121
|
- Sandbox
|
121
122
|
- Links
|
@@ -126,11 +127,10 @@ files:
|
|
126
127
|
- ".gitignore"
|
127
128
|
- ".mailmap"
|
128
129
|
- ".manifest"
|
129
|
-
- ".
|
130
|
+
- ".olddoc.yml"
|
130
131
|
- Application_Timeouts
|
131
132
|
- CONTRIBUTORS
|
132
133
|
- COPYING
|
133
|
-
- ChangeLog
|
134
134
|
- DESIGN
|
135
135
|
- Documentation/.gitignore
|
136
136
|
- Documentation/GNUmakefile
|
@@ -201,10 +201,8 @@ files:
|
|
201
201
|
- lib/unicorn/util.rb
|
202
202
|
- lib/unicorn/version.rb
|
203
203
|
- lib/unicorn/worker.rb
|
204
|
-
- local.mk.sample
|
205
204
|
- man/man1/unicorn.1
|
206
205
|
- man/man1/unicorn_rails.1
|
207
|
-
- script/isolate_for_tests
|
208
206
|
- setup.rb
|
209
207
|
- t/.gitignore
|
210
208
|
- t/GNUmakefile
|
@@ -287,17 +285,15 @@ files:
|
|
287
285
|
- test/unit/test_upload.rb
|
288
286
|
- test/unit/test_util.rb
|
289
287
|
- unicorn.gemspec
|
288
|
+
- unicorn_1
|
289
|
+
- unicorn_rails_1
|
290
290
|
homepage: http://unicorn.bogomips.org/
|
291
291
|
licenses:
|
292
292
|
- GPLv2+
|
293
293
|
- Ruby 1.8
|
294
294
|
metadata: {}
|
295
295
|
post_install_message:
|
296
|
-
rdoc_options:
|
297
|
-
- "-t"
|
298
|
-
- 'Unicorn: Rack HTTP server for fast clients and Unix'
|
299
|
-
- "-W"
|
300
|
-
- http://bogomips.org/unicorn.git/tree/%s
|
296
|
+
rdoc_options: []
|
301
297
|
require_paths:
|
302
298
|
- lib
|
303
299
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -311,8 +307,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
311
307
|
- !ruby/object:Gem::Version
|
312
308
|
version: '0'
|
313
309
|
requirements: []
|
314
|
-
rubyforge_project:
|
315
|
-
rubygems_version: 2.
|
310
|
+
rubyforge_project:
|
311
|
+
rubygems_version: 2.4.5
|
316
312
|
signing_key:
|
317
313
|
specification_version: 4
|
318
314
|
summary: Rack HTTP server for fast clients and Unix
|
data/local.mk.sample
DELETED
@@ -1,59 +0,0 @@
|
|
1
|
-
# this is the local.mk file used by Eric Wong on his dev boxes.
|
2
|
-
# GNUmakefile will source local.mk in the top-level source tree
|
3
|
-
# if it is present.
|
4
|
-
#
|
5
|
-
# This is depends on a bunch of GNU-isms from bash, sed, touch.
|
6
|
-
|
7
|
-
DLEXT := so
|
8
|
-
|
9
|
-
# Avoid loading rubygems to speed up tests because gmake is
|
10
|
-
# fork+exec heavy with Ruby.
|
11
|
-
prefix = $(HOME)
|
12
|
-
|
13
|
-
# XXX clean this up
|
14
|
-
ifeq ($(r192),)
|
15
|
-
ifeq ($(r19),)
|
16
|
-
ifeq ($(rbx),)
|
17
|
-
ifeq ($(r186),)
|
18
|
-
RUBY := $(prefix)/bin/ruby
|
19
|
-
else
|
20
|
-
prefix := $(prefix)/r186-p114
|
21
|
-
export PATH := $(prefix)/bin:$(PATH)
|
22
|
-
RUBY := $(prefix)/bin/ruby
|
23
|
-
endif
|
24
|
-
else
|
25
|
-
prefix := $(prefix)/rbx
|
26
|
-
export PATH := $(prefix)/bin:$(PATH)
|
27
|
-
RUBY := $(prefix)/bin/rbx
|
28
|
-
endif
|
29
|
-
else
|
30
|
-
prefix := $(prefix)/ruby-1.9
|
31
|
-
export PATH := $(prefix)/bin:$(PATH)
|
32
|
-
RUBY := $(prefix)/bin/ruby --disable-gems
|
33
|
-
endif
|
34
|
-
else
|
35
|
-
prefix := $(prefix)/ruby-1.9.2
|
36
|
-
export PATH := $(prefix)/bin:$(PATH)
|
37
|
-
RUBY := $(prefix)/bin/ruby --disable-gems
|
38
|
-
endif
|
39
|
-
|
40
|
-
# pipefail is THE reason to use bash (v3+) or never revisions of ksh93
|
41
|
-
# SHELL := /bin/bash -e -o pipefail
|
42
|
-
SHELL := /bin/ksh93 -e -o pipefail
|
43
|
-
|
44
|
-
full-test: test-18 test-191 test-192 test-rbx test-186
|
45
|
-
|
46
|
-
# FIXME: keep eye on Rubinius activity and wait for fixes from upstream
|
47
|
-
# so we don't need RBX_SKIP anymore
|
48
|
-
test-rbx: export RBX_SKIP := 1
|
49
|
-
test-rbx: export RUBY := $(RUBY)
|
50
|
-
test-rbx:
|
51
|
-
$(MAKE) test test-integration rbx=T 2>&1 |sed -e 's!^!rbx !'
|
52
|
-
test-186:
|
53
|
-
$(MAKE) test-all r186=1 2>&1 |sed 's!^!1.8.6 !'
|
54
|
-
test-18:
|
55
|
-
$(MAKE) test-all 2>&1 |sed 's!^!1.8 !'
|
56
|
-
test-191:
|
57
|
-
$(MAKE) test-all r19=1 2>&1 |sed 's!^!1.9.1 !'
|
58
|
-
test-192:
|
59
|
-
$(MAKE) test-all r192=1 2>&1 |sed 's!^!1.9.2 !'
|
data/script/isolate_for_tests
DELETED
@@ -1,31 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# scripts/Makefiles can read and eval the output of this script and
|
3
|
-
# use it as RUBYLIB
|
4
|
-
require 'rubygems'
|
5
|
-
require 'isolate'
|
6
|
-
fp = File.open(__FILE__, "rb")
|
7
|
-
fp.flock(File::LOCK_EX)
|
8
|
-
|
9
|
-
ruby_engine = defined?(RUBY_ENGINE) ? RUBY_ENGINE : 'ruby'
|
10
|
-
opts = {
|
11
|
-
:system => false,
|
12
|
-
# we want "ruby-1.8.7" and not "ruby-1.8", so disable :multiruby
|
13
|
-
:multiruby => false,
|
14
|
-
:path => "tmp/isolate/#{ruby_engine}-#{RUBY_VERSION}",
|
15
|
-
}
|
16
|
-
|
17
|
-
pid = fork do
|
18
|
-
Isolate.now!(opts) do
|
19
|
-
gem 'raindrops', '0.13.0'
|
20
|
-
gem 'kgio', '2.9.2'
|
21
|
-
gem 'rack', '1.5.2'
|
22
|
-
end
|
23
|
-
end
|
24
|
-
_, status = Process.waitpid2(pid)
|
25
|
-
status.success? or abort status.inspect
|
26
|
-
lib_paths = Dir["#{opts[:path]}/gems/*-*/lib"].map { |x| File.expand_path(x) }
|
27
|
-
dst = "tmp/isolate/#{ruby_engine}-#{RUBY_VERSION}.mk"
|
28
|
-
File.open("#{dst}.#$$", "w") do |fp|
|
29
|
-
fp.puts "ISOLATE_LIBS=#{lib_paths.join(':')}"
|
30
|
-
end
|
31
|
-
File.rename("#{dst}.#$$", dst)
|