File: use-rackup.patch

package info (click to toggle)
ruby-typhoeus 1.4.0-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 636 kB
  • sloc: ruby: 4,381; makefile: 6
file content (30 lines) | stat: -rw-r--r-- 1,245 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Index: ruby-typhoeus/spec/support/localhost_server.rb
===================================================================
--- ruby-typhoeus.orig/spec/support/localhost_server.rb
+++ ruby-typhoeus/spec/support/localhost_server.rb
@@ -1,5 +1,6 @@
 require 'rack'
-require 'rack/handler/webrick'
+require 'rackup'
+require 'rackup/handler/webrick'
 require 'net/http'
 
 # The code for this is inspired by Capybara's server:
@@ -43,7 +44,7 @@ class LocalhostServer
     # Use WEBrick since it's part of the ruby standard library and is available on all ruby interpreters.
     options = { :Port => port }
     options.merge!(:AccessLog => [], :Logger => WEBrick::BasicLog.new(StringIO.new)) unless ENV['VERBOSE_SERVER']
-    Rack::Handler::WEBrick.run(Identify.new(@rack_app), **options)
+    Rackup::Handler::WEBrick.run(Identify.new(@rack_app), **options)
   end
 
   def booted?
@@ -58,7 +59,7 @@ class LocalhostServer
   def concurrently
     if should_use_subprocess?
       pid = Process.fork do
-        trap(:INT) { ::Rack::Handler::WEBrick.shutdown }
+        trap(:INT) { ::Rackup::Handler::WEBrick.shutdown }
         yield
         exit # manually exit; otherwise this sub-process will re-run the specs that haven't run yet.
       end