mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
warn when bundler fails and avoid having to use -I to run tests (#1270)
This commit is contained in:
parent
61de1a8891
commit
d25ef26465
23 changed files with 36 additions and 39 deletions
|
@ -1,4 +1,4 @@
|
|||
require "test_helper"
|
||||
require_relative "test_helper"
|
||||
|
||||
require "puma/app/status"
|
||||
require "rack"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require "test_helper"
|
||||
require_relative "test_helper"
|
||||
|
||||
require "puma/binder"
|
||||
require "puma/events"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require "test_helper"
|
||||
require_relative "test_helper"
|
||||
|
||||
require "puma/cli"
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require "test_helper"
|
||||
require_relative "test_helper"
|
||||
|
||||
require "puma/configuration"
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require "test_helper"
|
||||
require_relative "test_helper"
|
||||
|
||||
require "puma/events"
|
||||
|
||||
|
|
|
@ -4,37 +4,34 @@
|
|||
begin
|
||||
require "bundler/setup"
|
||||
rescue LoadError
|
||||
warn "Failed to load bundler ... this should only happen during package building"
|
||||
end
|
||||
|
||||
require "net/http"
|
||||
require "timeout"
|
||||
require "minitest/autorun"
|
||||
require "minitest/pride"
|
||||
require "puma"
|
||||
require "puma/detect"
|
||||
|
||||
$LOAD_PATH << File.expand_path("../../lib", __FILE__)
|
||||
|
||||
require "puma"
|
||||
require "puma/detect"
|
||||
|
||||
# Either takes a string to do a get request against, or a tuple of [URI, HTTP] where
|
||||
# HTTP is some kind of Net::HTTP request object (POST, HEAD, etc.)
|
||||
def hit(uris)
|
||||
results = []
|
||||
|
||||
uris.each do |u|
|
||||
res = nil
|
||||
|
||||
uris.map do |u|
|
||||
response =
|
||||
if u.kind_of? String
|
||||
res = Net::HTTP.get(URI.parse(u))
|
||||
Net::HTTP.get(URI.parse(u))
|
||||
else
|
||||
url = URI.parse(u[0])
|
||||
res = Net::HTTP.new(url.host, url.port).start {|h| h.request(u[1]) }
|
||||
Net::HTTP.new(url.host, url.port).start {|h| h.request(u[1]) }
|
||||
end
|
||||
|
||||
assert res != nil, "Didn't get a response: #{u}"
|
||||
results << res
|
||||
assert response, "Didn't get a response: #{u}"
|
||||
response
|
||||
end
|
||||
|
||||
return results
|
||||
end
|
||||
|
||||
module TimeoutEveryTestCase
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require "test_helper"
|
||||
require_relative "test_helper"
|
||||
|
||||
require "puma/puma_http11"
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright (c) 2011 Evan Phoenix
|
||||
# Copyright (c) 2005 Zed A. Shaw
|
||||
|
||||
require "test_helper"
|
||||
require_relative "test_helper"
|
||||
|
||||
require "puma/puma_http11"
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require "test_helper"
|
||||
require_relative "test_helper"
|
||||
|
||||
require "puma/cli"
|
||||
require "puma/control_cli"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require "test_helper"
|
||||
require_relative "test_helper"
|
||||
|
||||
require "puma/io_buffer"
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require "test_helper"
|
||||
require_relative "test_helper"
|
||||
|
||||
require "puma/minissl"
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require "test_helper"
|
||||
require_relative "test_helper"
|
||||
|
||||
require "puma/null_io"
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require "test_helper"
|
||||
require_relative "test_helper"
|
||||
|
||||
class TestPersistent < Minitest::Test
|
||||
def setup
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require "test_helper"
|
||||
require_relative "test_helper"
|
||||
|
||||
class TestPumaServer < Minitest::Test
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require "test_helper"
|
||||
require_relative "test_helper"
|
||||
|
||||
require "puma/events"
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require "test_helper"
|
||||
require_relative "test_helper"
|
||||
|
||||
require 'puma/control_cli'
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require "test_helper"
|
||||
require_relative "test_helper"
|
||||
|
||||
require "rack/handler/puma"
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require "test_helper"
|
||||
require_relative "test_helper"
|
||||
|
||||
require "rack"
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require "test_helper"
|
||||
require_relative "test_helper"
|
||||
|
||||
require "puma/events"
|
||||
require "puma/tcp_logger"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require "test_helper"
|
||||
require_relative "test_helper"
|
||||
|
||||
require "puma/events"
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require "test_helper"
|
||||
require_relative "test_helper"
|
||||
|
||||
require "puma/thread_pool"
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require "test_helper"
|
||||
require_relative "test_helper"
|
||||
|
||||
# UNIX sockets are not recommended on JRuby
|
||||
# (or Windows)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# Copyright (c) 2011 Evan Phoenix
|
||||
# Copyright (c) 2005 Zed A. Shaw
|
||||
|
||||
require "test_helper"
|
||||
require_relative "test_helper"
|
||||
|
||||
require "puma/server"
|
||||
|
||||
|
|
Loading…
Reference in a new issue