Date | Commit message (Collapse) |
|
unicorn 5 will only support Ruby 1.9.3 and later, so remove
some checks for Hash#compare_by_identity and IO.copy_stream
which we know exist in Ruby 1.9.
Favor &:sym proc dispatch to avoid unnecessary captures and
bytecode size increases, too.
Finally, ensure we fail fast by converting some literal
hashes to use non-arrow syntax for symbolic keys.
|
|
Folks don't usually run from the source directory, but
RubyGems complains otherwise.
|
|
This would prevent Unicorn (Rainbows) from adding default middleware,
as if RACK_ENV were always none. (not development nor deployment)
This is implemented in Unicorn, so we only need to update
the option parser here.
Discussion thread on Unicorn mailing list:
http://rubyforge.org/pipermail/mongrel-unicorn/2013-January/001675.html
Signed-off-by: Eric Wong <normalperson@yhbt.net>
|
|
No point in keeping it around to eat memory.
|
|
We can get away with a single stack frame reduction. Unicorn
itself has more stack reductions, but Rainbows! is further
behind in this area.
|
|
We get basic internal API changes from Unicorn,
code simplifications coming next.
|
|
This will allow us to be working_directory-aware as
far as config.ru goes.
|
|
|
|
Less code for us is better
|
|
The Unicorn.builder helper will help us avoid namespace
conflicts inside config.ru, allowing us to pass tests.
While we're at it, port some tests over from the latest
unicorn.git for dealing with bad configs.
|
|
Do not identify ourselves as "Unicorn", especially not
for -v. Also "ENVIRONMENT" should be "RACK_ENV".
|
|
Or it'll confuse them more... Really, it does not
matter what the shebang points to as long as long as
setup.rb can deal with it.
|
|
Shells already expand '~' before the executables see it, and
relative paths inside symlinks can get set incorrectly to the
actual directory name, and not the (usually desired) symlink
name for things like Capistrano.
Since our paths are now unexpanded, we must now check the
"working_directory" directive and raise an error if the user
specifies the config file in a way that makes the config file
unreloadable.
|
|
Add tests to ensure we set it correctly and it gets
passed down to the app.
|
|
Merb, Sinatra, Thin, Passenger and now even Unicorn will it, so
we set and use it too because that's what all the cool kids are
doing.
|
|
No tests yet, but the old "gossamer" and "rainbows" branches
seem to be basically working.
|