lib/em-synchrony/em-http.rb in em-synchrony-0.1.4 vs lib/em-synchrony/em-http.rb in em-synchrony-0.1.5

- old
+ new

@@ -1,6 +1,10 @@ -require "em-http" +begin + require "em-http" +rescue LoadError => error + raise "Missing EM-Synchrony dependency: gem install em-http-request" +end module EventMachine class HttpRequest %w[get head post delete put].each do |type| class_eval %[ @@ -10,11 +14,11 @@ conn = setup_request(:#{type}, options, &blk) conn.callback { f.resume(conn) } conn.errback { f.resume(conn) } - Fiber.yield + Fiber.yield end ] - end + end end end