Date | Commit message (Collapse) |
|
Prevent non-umask 0022 shells from generating releases.
Thanks for Jay Reitz for spotting this and reporting
promptly to me; all of my Ruby and gem installations
are done as a regular user so I never would've noticed.
|
|
The one minor bugfix is only for Rails 2.3.x+ users who set the
RAILS_RELATIVE_URL_ROOT environment variable in a config file.
Users of the "--path" switch or those who set the environment
variable in the shell were unaffected by this bug. Note that we
still don't have relative URL root support for Rails < 2.3, and
are unlikely to bother with it unless there is visible demand
for it.
New features includes support for :tries and :delay when
specifying a "listen" in an after_fork hook. This was inspired
by Chris Wanstrath's example of binding per-worker listen
sockets in a loop while migrating (or upgrading) Unicorn.
Setting a negative value for :tries means we'll retry the listen
indefinitely until the socket becomes available.
So you can do something like this in an after_fork hook:
after_fork do |server, worker|
addr = "127.0.0.1:#{9293 + worker.nr}"
server.listen(addr, :tries => -1, :delay => 5)
end
There's also the usual round of added documentation, packaging
fixes, code cleanups, small fixes and minor performance
improvements that are viewable in the "git log" output.
Eric Wong (54):
build: hardcode the canonical git URL
build: manifest dropped manpages
build: smaller ChangeLog
doc/LATEST: remove trailing newline
http: don't force -fPIC if it can't be used
.gitignore on *.rbc files Rubinius generates
README/gemspec: a better description, hopefully
GNUmakefile: add missing .manifest dep on test installs
Add HACKING document
configurator: fix user switch example in RDoc
local.mk.sample: time and perms enforcement
unicorn_rails: show "RAILS_ENV" in help message
gemspec: compatibility with older Rubygems
Split out KNOWN_ISSUES document
KNOWN_ISSUES: add notes about the "isolate" gem
gemspec: fix test_files regexp match
gemspec: remove tests that fork from test_files
test_signals: ensure we can parse pids in response
GNUmakefile: cleanup test/manifest generation
util: remove APPEND_FLAGS constant
http_request: simplify and remove handle_body method
http_response: simplify and remove const dependencies
local.mk.sample: fix .js times
TUNING: notes about benchmarking a high :backlog
HttpServer#listen accepts :tries and :delay parameters
"make install" avoids installing multiple .so objects
Use Configurator#expand_addr in HttpServer#listen
configurator: move initialization stuff to #initialize
Remove "Z" constant for binary strings
cgi_wrapper: don't warn about stdoutput usage
cgi_wrapper: simplify status handling in response
cgi_wrapper: use Array#concat instead of +=
server: correctly unset reexec_pid on child death
configurator: update and modernize examples
configurator: add colons in front of listen() options
configurator: remove DEFAULT_LOGGER constant
gemspec: clarify commented-out licenses section
Add makefile targets for non-release installs
cleanup: use question mark op for 1-byte comparisons
RDoc for Unicorn::HttpServer::Worker
small cleanup to pid file handling + documentation
rails: RAILS_RELATIVE_URL_ROOT may be set in Unicorn config
unicorn_rails: undeprecate --path switch
manpages: document environment variables
README: remove reference to different versions
Avoid a small window when a pid file can be empty
configurator: update some migration examples
configurator: listen :delay must be Numeric
test: don't rely on .manifest for test install
SIGNALS: state that we stole semantics from nginx
const: DEFAULT_PORT as a string doesn't make sense
test_helper: unused_port rejects 8080 unconditionally
GNUmakefile: SINCE variable may be unset
tests: GIT-VERSION-GEN is a test install dependency
|
|
|
|
Makes it easier for new projects with no tags yet to reuse
this snippet.
|
|
This lets us run tests out-of-the-box on fresh checkouts and
minimizes the overhead needed for creating/updating the test
installs.
|
|
This should make it easier to test and run unreleased
versions.
|
|
Sometimes we test with unicorn_http.so in lib, but that
gets mistakenly picked up by setup.rb and can wreak havoc
for on upgrades if ABIs change.
|
|
The .manifest dependencies were causing unnecessarily copies for
the tests to run.
|
|
Now tests run after a clean checkout (as long as rack libraries
are in $LOAD_PATH, probably via RUBYLIB).
|
|
No need to bloat our tarballs too much with information people
are unlikely to ever read, NEWS is more user-oriented.
|
|
$(wildcard) is evaluated as soon as the target command
is called, resulting in the manpages not being globbed
since we just generated them. Also, bundle manpages
with documentation.
|
|
I just distributed a tarball with my local FS path
in the documentation :(
|
|
We're expanding our target audience to folks that do not use
HTTP (yet).
|
|
The ChangeLog feed points to the cgit repository viewer
and the NEWS one is its own feed of tags. Web 2.0 here
we come!
|
|
Kinda sorta works, still some Markdown => HTML formatting issues
to work out but it gives the site a reasonably consistent look.
|
|
Additionally, force ourselves to verify our working tree against
$(VERSION) when doing releases because we don't want to screw
that up.
|
|
setup.rb users will now be able to install manpages under
man/man1 automatically, no solution for Rubygems users yet.
gzipped manpages are no longer created by default, either,
it's probably up to distros to do it.
|
|
* Manifest/CHANGELOG can be maintainance is painful.
I really hate having those in the source tree when
I have a version control system that already:
1) encourages me to make meaningful commits
2) is highly scriptable for generating manifests/changelogs
* hand-rolled gemspec allows more control for specifying
pre-release gem versions
* Less magic over what the `rubyforge` command does, being
able to spawn $VISUAL on changelogs/release notes and make
edits on them is nice.
Additionally I still strongly prefer GNU make over Rake for many
tasks since it offers better parallelization and some things are
easier *for me* in shell than Ruby.
|
|
No point in having those files under revision control or
repeating work to generate them.
|
|
* Documented Unicorn::HttpParser API methods
* Keep GPL2 (COPYING) as-is without RDoc formatting.
* The auto-generated index.html is stupid, replace it with
README which looks saner.
|
|
|
|
More tightly integrate the C/Ruby portions with C/Ragel to avoid
the confusing the flow. Split out some files into hopefully
logical areas so it's easier to focus on more
interesting/volatile code.
|
|
But keep it in the Manifest
|
|
test/test_helper doesn't seem to be required correctly anymore,
since we know our own module/test names don't conflict, just
fix RUBYLIB to include $(test_prefix)
With test_util.rb, using #reopen with Tempfile objects seems
prone to the objects being closed. Not completely sure what is
going on but I'll just sidestep around it since I've stopped
trusting Tempfile by now...
|
|
We couldn't do proper namespacing for the C module so there was
a potential conflict with Init_http11() in Mongrel. This was
needed because Mongrel's HTTP parser could be used in some
applications and we may be unfortunate enough need to support
them.
|
|
This can allow you to run make with:
TRACER='strace -f -o $(t).strace -s 100000'
to debug a test failure (it should be usable with truss,
ltrace, and other similar tools).
|
|
|
|
Easier to maintain and add new executables this way
|
|
|
|
Installation dependencies weren't being resolved correctly
(since "install-test") wasn't .PHONY. Removed the
"install-test" target entirely since it should never
be invoked by hand.
On the other hand, "ragel" can be useful to invoke by hand
so add a target for that.
|
|
There's no point in having redefinable callbacks if they're
always going to be pointed to the same function. This reduces
the size of the http_parser structure to half its original size.
This change may actually make more sense in servers Mongrel/Thin
than Unicorn since Unicorn only has one parser per-process while
other servers can have hundreds or even thousands.
|
|
It's fast under 1.8, but 1.9 performance is really
terrible, so run the tests in parallel.
|
|
I have a nice hook in git that complains when trailing
whitespace is present.
|
|
|
|
|
|
The $(test_prefix)/.stamp file must be a dependency of the
parent make process otherwise the slow %.n children won't be
able to communicate the dependency up to the other non-slow
tests.
|
|
Run tests with warnings so we detect stupid things like this.
|
|
As usual, spit out all the test output if something fails. But
allow people who like to see things scroll by see things scroll
by. Quiet down the Rails tests by default, too.
|
|
It was wrapping in my 80 column terminal when prefixed
with some text.
|
|
This is to prevent the shebang line from being clobbered
by setup.rb which does the rest of the heavy lifting.
While we're at it, remove the dependency on git, too.
|
|
Otherwise it's hard to tell which version of Rails
test failed when we ran tests in parallel.
|
|
Very preliminary for now. Basically just sets up a basic
controller and response. Requires git to clone the official
Rails repository.
|
|
This makes it easy to run unit or exec tests
independently of the other.
Removed the unused slow-tests targets.
|
|
Echoe/Rake seems to be loading the wrong version, tired
of fighting it and figuring out what it's doing...
|
|
Avoid conflicting with existing (and future) Mongrel installs in
case either changes. Of course, this also allows us more
freedom to experiment and break the API if needed...
However, I'm only planning on making minor changes to
remove the amount of C code we have to maintain and
possibly some minor performance improvements.
|
|
Add a install-test for doing a mock install with private http11
and bin/unicorn and appropriate PATH/RUBYLIB env.
Also add a normal install target so we can just type
"make install" and just be done with a regular
installation (and it'll revert files if using git).
I use the following local.mk to augment my GNUmakefile. It
allows me to run "make -j full-test" and run both 1.8 and 1.9
tests in parallel.
--------------------------- 8< -------------------------
DLEXT := so
rack_ver := 0.9.1
ifeq ($(r19),)
ruby := $(HOME)/bin/ruby
RUBYLIB := $(HOME)/lib/ruby/gems/1.8/gems/rack-$(rack_ver)/lib
else
export PATH := $(HOME)/ruby-1.9/bin:$(PATH)
ruby := $(HOME)/ruby-1.9/bin/ruby
RUBYLIB := $(HOME)/ruby-1.9/lib/ruby/gems/1.9.1/gems/rack-$(rack_ver)/lib
endif
SHELL := /bin/bash -e -o pipefail
full-test: test-18 test-19
test-18:
$(MAKE) test 2>&1 | sed -u -e 's!^!1.8 !'
test-19:
$(MAKE) test r19=1 2>&1 | sed -u -e 's!^!1.9 !'
--------------------------- 8< -------------------------
|
|
Add a make task for updating it, too.
|
|
Makes it much easier to track down failures if you know
something failed in the first place. A failed test early on
could be hidden because noise from successful tests drowned it
out.
|
|
Running Rake is too slow for me to do builds on, and
I don't have net access to install the Echoe gem at
the moment for Ruby 1.9...
|
|
Some of the tests here are horrifically slow due to sleeps,
allow using gmake to run these tests in parallel. My Core2 Duo
runs "make -j" over 10s faster than "rake".
|