about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2010-06-10 18:27:19 -0700
committerEric Wong <normalperson@yhbt.net>2010-06-10 18:29:23 -0700
commit0c08b142544e717ece5865869e14ead670f64eec (patch)
treed3d517e4572d6362242f3378a27d3a2f91a3bd75
parentcf47d3e51d7b0aecdda8b0f27631161977900a47 (diff)
downloadrainbows-0c08b142544e717ece5865869e14ead670f64eec.tar.gz
This will allow us to be working_directory-aware as
far as config.ru goes.
-rw-r--r--bin/rainbows5
-rw-r--r--rainbows.gemspec6
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<unicorn>, [">= 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<unicorn>, [">= 0.991.0", "< 2.0.0"])
   s.add_development_dependency(%q<isolate>, "~> 2.0.2")
 
   # Unicorn already depends on Rack