1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00
puma--puma/test/shell/t2.rb
Igor Bochkariov 83163c3f28 Allow configuring pumactl with config.rb
example:
  echo "pidfile '/tmp/app.pid'; rackup 'config.ru'" > /etc/puma/app.rb
  pumactl -F /etc/puma/app.rb start # starts an app and store pid in /tmp/app.pid
  pumactl -F /etc/puma/app.rb stop  # stops the started earlier app

Integration test t2 included: rake test:integration
Also fixed discrepancy in naming options :pidfile/:pid_file and :state/:status_file
2013-07-19 10:30:15 +04:00

17 lines
367 B
Ruby

system "ruby -rubygems -I../../lib ../../bin/pumactl -F t2_conf.rb start"
sleep 5
system "curl http://localhost:10103/"
system "ruby -rubygems -I../../lib ../../bin/pumactl -F t2_conf.rb stop"
sleep 1
log = File.read("t2-stdout")
File.unlink "t2-stdout" if File.file? "t2-stdout"
if log =~ %r(GET / HTTP/1\.1) && !File.file?("t2-pid")
exit 0
else
exit 1
end