diff options
author | Azul <azul@riseup.net> | 2016-06-24 14:13:54 +0200 |
---|---|---|
committer | Azul <azul@riseup.net> | 2016-06-24 14:13:54 +0200 |
commit | 298afc7ec1d7cb49f5f0b29e5a19f6bb72f179fa (patch) | |
tree | 3959bf321bb1c549c28d6fd6de82bf1984731050 /lib/nickserver/adapters | |
parent | cd67dfac8f764140c47e0fba9304eba168c7a25b (diff) |
first attempt at using celluloid instead of em - broken
Main problem right now is the outdated version of webmock.
Diffstat (limited to 'lib/nickserver/adapters')
-rw-r--r-- | lib/nickserver/adapters/celluloid_http.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/nickserver/adapters/celluloid_http.rb b/lib/nickserver/adapters/celluloid_http.rb new file mode 100644 index 0000000..5772bd1 --- /dev/null +++ b/lib/nickserver/adapters/celluloid_http.rb @@ -0,0 +1,17 @@ +require 'nickserver/adapters' +# require 'celluloid/io' +require 'http' + +module Nickserver::Adapters + class CelluloidHttp + # include Celluloid::IO + + def get(url, options = {}) + response = HTTP.get url, + params: options[:query] + # ssl_socket_class: Celluloid::IO::SSLSocket + yield response.code, response.to_s + end + + end +end |