about summary refs log tree commit homepage
path: root/bin/unicorn_rails
DateCommit message (Collapse)
2010-02-28bin/*: remove redundant $DEBUG check
2010-02-28respect user's encoding in config.ru in 1.9
Do not assume the user wants config.ru to be Encoding::BINARY for 1.9.
2010-02-28unicorn_rails: small scoping cleanup
2010-02-25unicorn_rails: make this "working_directory"-aware
The temporary paths we create to mimic script/server-emulation did not work when working_directory was used. Now we defer path creation until after working_directory is bound.
2010-02-24unicorn_rails: avoid namespace conflicts in config.ru
We'll use our Rails-only version of Unicorn.builder so the lambda is safe without another binding.
2010-02-24unicorn_rails: make this Rails 3-compatible
The stock config/boot.rb file in a Rails 3 app is much lighter and does not export any Rails/RAILS_* constants, so we'll wait until we get config/environment.rb loaded.
2009-12-26exit with failure if master dies when daemonized
This behavior change also means our grandparent (launched from a controlling terminal or script) will wait until the master process is ready before returning. Thanks to IƱaki Baz Castillo for the initial implementations and inspiration.
2009-12-25bin/*: shebangs should be educational
2009-11-18Do not expand paths given on the shell
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.
2009-11-14old_rails: autoload Static
It makes life easier for people writing config.ru files for use with Rails.
2009-09-30unicorn_rails: undeprecate --path switch
..but keep -P deprecated. --path is still useful for testing ad-hoc changes when you don't want to commit your changes permanently to a configuration file.
2009-09-30rails: RAILS_RELATIVE_URL_ROOT may be set in Unicorn config
Since Unicorn config files are written in Ruby, setting RAILS_RELATIVE_URL_ROOT should be possible (and even encouraged) in the config file if it is done at all.
2009-09-24unicorn_rails: show "RAILS_ENV" in help message
This matches the manpage and the rest of the documentation.
2009-09-17launchers: deprecate ambiguous -P/--p* switches
`unicorn` tries to mimic `rackup` on the command-line to ease adoption. `unicorn_rails` tries to be somewhat like `rackup` as well, but then also tries to be consistent with `script/server` resulting some amount of confusion with regard to the -P/(--path|--pid) switch. Outright removal of these switches will probably not happen any time soon because we have command-lines inherited across processes, but we can stop advertising them. Since our (Unicorn) config file format is fortunately consistent between Rails and !Rails, recommend the "pid" directive be used instead. User interfaces are really, really tough to get right...
2009-09-17unicorn_rails: close parentheses in help message
2009-09-08"encoding: binary" comments for all sources (1.9)
This ensures any string literals that pop up in *our* code will just be a bag of bytes. This shouldn't affect/fix/break existing apps in most cases, but most constants will always have the "correct" encoding (none!) to be consistent with HTTP/socket expectations. Since this comment affects things only on a per-source basis, it won't affect existing apps with the exception of strings we pass to the Rack application. This will eventually allow us to get rid of that Unicorn::Z constant, too.
2009-08-15Remove explicit requires for Rack things
Rack is autoload-based and so are we.
2009-08-15Make launchers __END__-aware
I've noticed rackup has been __END__-aware as of 7b6046b764eafd332b3b2d9d93b3915c425fae54 in Rack upstream
2009-04-23unicorn_rails: avoid nesting lambdas
I've experienced occasional problems with this so it's probably best to stay on the safe side.
2009-04-21Remove @start_ctx instance variable
It's pointless to support multiple instances of it since this is per-process. However, the constant itself is now modifiable if anybody needs to tweak things for reexecution using a before_exec hook.
2009-04-02unicorn_rails: cleanup redundant bits
There were some unnecessary lambdas in there along with some repeated checks.
2009-03-31unicorn_rails: cleanup path mapping usage
Just use the RAILS_RELATIVE_URL_ROOT variable to support it since probably works on more versions of Rails. Since no application I've ever deployed has ever used it, I'm not going to bother supporting it for Rails <2.3, either.
2009-03-31unicorn_rails: minor cleanup for dead variable
This removes half-implemented support to disable static file serving. People interested enough can provide their own config.ru file to save some stat(2) syscalls, but extra command-config options just complicate things.
2009-03-30unicorn_rails: give more info when aborting
Makes problems easier to solve if we dump the exception...
2009-03-30bin/*: parse CLI switches in config.ru sooner
This allows config.ru to specify listener and stuff before we setup the application.
2009-03-29Fix default listener setup
Combining command-line and config file options in a reasonable manner has and always will be a painful experience.
2009-03-23unicorn_rails: support non-Rack versions of Rails
This resurrects old code from Mongrel to wrap the Rails Dispatcher for older versions of Rails. It seems that Rails >= 2.2.0 support Rack, but only >=2.3 requires it. I'd like to support Rails 1.2.x for a while, too.
2009-03-20unicorn_rails: remove unnecessary Rack-loading logic
Loading Rails (or at least config/environment) will already load its version of Rack, duh! This also prevents a double-require of Rack causing redefined Rack::VERSION errors.
2009-03-19unicorn_rails: fix standard pid path setup
This was broken in the last commit (d1ff8c5): start libifying common launcher code
2009-03-19start libifying common launcher code
The daemonization logic between unicorn and unicorn_rails scripts can definitely be shared. Again: our daemonization logic is slightly non-standard since our executables are designed to run in APP_ROOT/RAILS_ROOT and not "/" like "normal" UNIX daemons.
2009-03-18Add unicorn_rails script for Rails 2.3.2
This should just run inside RAILS_ROOT out-of-the-box. No config.ru is needed (but we'll use one if it's detected). This has slightly different semantics than script/server and the normal "unicorn" script (which has "rackup"-like) semantics. It tries to combine the best of both worlds, but do not consider the command-line option interface to be stable by any means.