From abb835a9c7115bb616e30a6fa2ffad16206b2224 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81bner=20Oliveira?= Date: Tue, 8 Apr 2014 21:21:26 -0300 Subject: [PATCH 1/2] Update client.rb Fixing proxy issue https://github.com/tweetstream/em-twitter/issues/13 --- lib/em-twitter/client.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/em-twitter/client.rb b/lib/em-twitter/client.rb index 39dce6a..fe0c2f0 100644 --- a/lib/em-twitter/client.rb +++ b/lib/em-twitter/client.rb @@ -41,14 +41,14 @@ def initialize(options = {}) if @options[:proxy] && @options[:proxy][:uri] proxy_uri = URI.parse(@options[:proxy][:uri]) - @host = proxy_uri.host - @port = proxy_uri.port + @proxy_host = proxy_uri.host + @proxy_port = proxy_uri.port end @connection = nil end def connect - @connection = EM.connect(@host, @port, Connection, self, @host, @port) + @connection = EM.connect(@host, @port, Connection, self, @proxy_host, @proxy_port) end def each(&block) From cdff7a37faa315a2bf5a914685d5b7e6a9591aa5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81bner=20Silva=20de=20Oliveira?= Date: Tue, 8 Apr 2014 21:53:23 -0300 Subject: [PATCH 2/2] fixes proxy issue --- lib/em-twitter/client.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/em-twitter/client.rb b/lib/em-twitter/client.rb index fe0c2f0..4980f48 100644 --- a/lib/em-twitter/client.rb +++ b/lib/em-twitter/client.rb @@ -48,7 +48,7 @@ def initialize(options = {}) end def connect - @connection = EM.connect(@host, @port, Connection, self, @proxy_host, @proxy_port) + @connection = EM.connect(@proxy_host, @proxy_port, Connection, self, @host, @port) end def each(&block)