summaryrefslogtreecommitdiff
path: root/lib/nickserver/adapters/em_http.rb
diff options
context:
space:
mode:
authorAzul <azul@riseup.net>2016-06-30 11:23:45 +0200
committerAzul <azul@riseup.net>2016-06-30 12:04:07 +0200
commit0491e79c4e5f16d38cf87e53290394e1eccfa2e9 (patch)
tree56d0aff1fc8ca1bbd11b09bc6929f00132467898 /lib/nickserver/adapters/em_http.rb
parent4132d6e6db3755334ace352165991487802c6b82 (diff)
Trying to replace EM base server with reel
some tests are still broken. But at least they are running now.
Diffstat (limited to 'lib/nickserver/adapters/em_http.rb')
-rw-r--r--lib/nickserver/adapters/em_http.rb24
1 files changed, 0 insertions, 24 deletions
diff --git a/lib/nickserver/adapters/em_http.rb b/lib/nickserver/adapters/em_http.rb
deleted file mode 100644
index 16db5ae..0000000
--- a/lib/nickserver/adapters/em_http.rb
+++ /dev/null
@@ -1,24 +0,0 @@
-require 'nickserver/adapters'
-require 'em-http'
-
-module Nickserver::Adapters
- class EmHttp
-
- def initialize
- @timeout = 5
- end
-
- def get(url, options = {})
- get_request(url, options).callback {|http|
- yield http.response_header.status, http.response
- }.errback {|http|
- yield 0, http.error
- }
- end
-
- def get_request(url, options = {})
- @request = EventMachine::HttpRequest.new(url)
- @request.get timeout: @timeout, query: options[:query]
- end
- end
-end