swirl 1.6.0 → 1.6.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/swirl/ec2.rb +1 -1
- data/lib/swirl/ec2/em.rb +9 -3
- metadata +2 -2
data/lib/swirl/ec2.rb
CHANGED
data/lib/swirl/ec2/em.rb
CHANGED
@@ -10,12 +10,18 @@ module Swirl
|
|
10
10
|
req = http.post(:head => headers, :body => body)
|
11
11
|
|
12
12
|
req.callback do
|
13
|
-
|
13
|
+
begin
|
14
|
+
blk.call(req.response_header.status, req.response)
|
15
|
+
rescue => e
|
16
|
+
req.fail(e)
|
17
|
+
end
|
14
18
|
end
|
15
19
|
|
16
|
-
req.
|
17
|
-
|
20
|
+
def req.error(&blk)
|
21
|
+
errback(&blk)
|
18
22
|
end
|
23
|
+
|
24
|
+
req
|
19
25
|
end
|
20
26
|
end
|
21
27
|
end
|