lib/weeter/plugins/subscription/http.rb in weeter-0.15.0 vs lib/weeter/plugins/subscription/http.rb in weeter-0.17.0

- old
+ new

@@ -21,15 +21,16 @@ end } end def listen_for_filter_update(tweet_consumer) - EM.start_server('localhost', @config.subscription_updates_port, UpdateServer) do |conn| + port = @config.subscription_updates_port || Weeter::Configuration::ClientAppConfig::DEFAULT_SUBSCRIPTIONS_UPDATE_PORT + EM.start_server('localhost', port, UpdateServer) do |conn| conn.tweet_consumer = tweet_consumer end end - + class UpdateServer < EM::Connection include EM::HttpServer attr_accessor :tweet_consumer def process_http_request @@ -40,6 +41,6 @@ end end end end end -end \ No newline at end of file +end