From 0c08b142544e717ece5865869e14ead670f64eec Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 10 Jun 2010 18:27:19 -0700 Subject: bin/rainbows: sync up with latest Unicorn This will allow us to be working_directory-aware as far as config.ru goes. --- bin/rainbows | 5 +---- rainbows.gemspec | 6 +++--- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/bin/rainbows b/bin/rainbows index 75c361f..685dd09 100644 --- a/bin/rainbows +++ b/bin/rainbows @@ -110,10 +110,7 @@ opts = OptionParser.new("", 24, ' ') do |opts| opts.parse! ARGV end -config = ARGV[0] || "config.ru" -abort "configuration file #{config} not found" unless File.exist?(config) - -app = Unicorn.builder(config, opts) +app = Unicorn.builder(ARGV[0] || 'config.ru', opts) listeners << "#{host}:#{port}" if set_listener if $DEBUG diff --git a/rainbows.gemspec b/rainbows.gemspec index c2f83c2..4726987 100644 --- a/rainbows.gemspec +++ b/rainbows.gemspec @@ -41,9 +41,9 @@ Gem::Specification.new do |s| s.test_files = test_files # we need Unicorn for the HTTP parser and process management - # The HTTP parser in Unicorn <= 0.97.0 was vulnerable to a remote DoS - # when exposed directly to untrusted clients. - s.add_dependency(%q, [">= 0.990.0", "< 2.0.0"]) + # Unicorn 0.991.0 handles config.ru when started outside of + # the prespecified working_directory + s.add_dependency(%q, [">= 0.991.0", "< 2.0.0"]) s.add_development_dependency(%q, "~> 2.0.2") # Unicorn already depends on Rack -- cgit v1.2.3-24-ge0c7