Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix daemonize issues, may need picking into master

  • Loading branch information...
commit 07db144c52d8e534b65552a8825192c81c3095d7 1 parent 312fcaa
James Tucker raggi authored
4 lib/rack/server.rb
View
@@ -57,7 +57,7 @@ def parse!(args)
}
opts.on("-P", "--pid FILE", "file to store PID (default: rack.pid)") { |f|
- options[:pid] = f
+ options[:pid] = ::File.expand_path(f, Dir.pwd)
}
opts.separator ""
@@ -100,7 +100,7 @@ def default_options
:Port => 9292,
:Host => "0.0.0.0",
:AccessLog => [],
- :config => "config.ru"
+ :config => ::File.expand_path("config.ru", Dir.pwd)
}
end
4 test/spec_rackup.rb
View
@@ -16,7 +16,7 @@ def run_rackup(*args)
@port = options[:port] || 9292
Dir.chdir("#{root}/test/rackup") do
- @in, @rackup, @err = Open3.popen3("#{Gem.ruby} -S #{rackup} #{flags}")
+ @in, @rackup, @err = Open3.popen3("#{ruby} -S #{rackup} #{flags}")
end
return if options[:port] == false
@@ -111,7 +111,7 @@ def output
end
specify "rackup --daemonize --pid" do
- run_rackup %{--daemonize --pid testing.pid}
+ run_rackup "--daemonize --pid testing.pid"
status.should.be 200
@rackup.should.be.eof?
Dir["#{root}/**/testing.pid"].should.not.be.empty?
4 test/testrequest.rb
View
@@ -16,6 +16,10 @@ module Helpers
ROOT = File.expand_path(File.dirname(__FILE__) + "/..")
ENV["RUBYOPT"] = "-I#{ROOT}/lib -rubygems"
+ def ruby
+ "#{Gem.ruby} #{ENV['RUBYOPT']}"
+ end
+
def root
ROOT
end
Please sign in to comment.
Something went wrong with that request. Please try again.