async-rack 0.4.0 → 0.4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -86,9 +86,9 @@ module AsyncRack
|
|
86
86
|
private
|
87
87
|
def setup_late_initialize(klass)
|
88
88
|
class << klass
|
89
|
-
def new(*args, &block)
|
90
|
-
return super if
|
91
|
-
proc { |env| new(*args, &block).call(env) }
|
89
|
+
def new(app, *args, &block)
|
90
|
+
return super(*args, &block) if app == false
|
91
|
+
proc { |env| new(false, app, *args, &block).call(env) }
|
92
92
|
end
|
93
93
|
end
|
94
94
|
end
|
@@ -43,7 +43,7 @@ describe AsyncRack::AsyncCallback do
|
|
43
43
|
end
|
44
44
|
|
45
45
|
it "runs #call again on async callback, replacing app" do
|
46
|
-
middleware = @class.
|
46
|
+
middleware = @class.new false, proc { throw :async }
|
47
47
|
catch(:async) do
|
48
48
|
middleware.call "async.callback" => proc { |x| x + 10 }
|
49
49
|
raise "should not get here"
|
metadata
CHANGED
@@ -6,7 +6,8 @@ version: !ruby/object:Gem::Version
|
|
6
6
|
- 0
|
7
7
|
- 4
|
8
8
|
- 0
|
9
|
-
|
9
|
+
- 1
|
10
|
+
version: 0.4.0.1
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- Konstantin Haase
|
@@ -14,7 +15,7 @@ autorequire:
|
|
14
15
|
bindir: bin
|
15
16
|
cert_chain: []
|
16
17
|
|
17
|
-
date: 2010-03-
|
18
|
+
date: 2010-03-27 00:00:00 +01:00
|
18
19
|
default_executable:
|
19
20
|
dependencies:
|
20
21
|
- !ruby/object:Gem::Dependency
|