-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Support closing stream In this version, we can close stream as following: ```ruby client = Twitter::Streaming::Client.new do |config| # Set up configuration end t = Thread.new do client.filter(track: keyword) do |object| # process object end end Signal.trap(:TERM) do # terminate process silently client.close exit true end ``` * Add Twitter::Streaming::Connection#stream spec * Wait for connection * Suppress rubocop warning lib/twitter/streaming/connection.rb:17:7: C: Method has too many lines. [13/10] def stream(request, response) ... ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ * Use port number 8443 instead of 11443 Because rubocop reports following warnings: spec/twitter/streaming/connection_spec.rb:88:48: C: Use underscores(_) as decimal mark and separate every 3 digits with them. let(:client) { TCPSocket.new('127.0.0.1', 11443) } ^^^^^ spec/twitter/streaming/connection_spec.rb:94:44: C: Use underscores(_) as decimal mark and separate every 3 digits with them. @server = TCPServer.new('127.0.0.1', 11443) ^^^^^
- Loading branch information
Showing
3 changed files
with
57 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters