Update and change a lot of things - #6
Merged
Conversation
Contributor
Author
|
I've added Work In Progress status because I'm testing it in real project and still changing (in better way). |
Contributor
Author
|
Now it works in the real-life project. |
AlexWayfer
force-pushed
the
v0.0.2
branch
2 times, most recently
from
September 27, 2020 20:05
6e1227b to
e71b549
Compare
* Improve logic of connection: replace `:connect` with `:authenticated` and `:join`. * Actualize and improve many callbacks, especially for room modes. * Add `:followers_mode`. * Add `:bits` message type. * Replace stale `eventmachine` with simple `TCPSocket` and `Thread`. * Reconnect (socket) on connection errors. * Remove `activesupport` dependency (replace with keyword arguments). * Remove `:host`, `:port`, `:nickname` and other accessors. Its usage can trigger undefined behavior, and here is no need for it. * Remove deprecated `TWITCHCLIENT 3` command. * Set `UTF-8` encoding for socket. * Add Message#id` (for deleting). * Add `Message#sent_at` (for logging). * Remove `Message#target`: seems useless. * Add `additional_info` for `Message` (with badges, chat states, etc.). * Add `User` class with information from `additional_info` of message. * Replace `$LOAD_PATH.unshift` with `require_relative`. * Re-raise trapped `TERM` and `INT` process signals after actions. * Remove RSpec config code, use default. * Add `spec` Rake task (for RSpec). * Add `rubocop` (and its config), resolve many offenses. * Add `pry-byebug` for handful debug (in specs). * Add `simplecov` for indicating tests coverage. * Update dependencies and improve their versions locks. * Add EditorConfig file (more info [here](https://editorconfig.org/)). * Fix typos in README.
It can hang on 15+ minutes, but we have to respond Twitch `PING` requests. Without connection there will be errors on socket initialization, but I think we should check it and watch in real-life project.
It's more flexible, for example for non-default logging level.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
replace
:connectwith:authenticatedand:join.:followers_mode.:bitsmessage type.eventmachinewith simpleTCPSocketandThread.activesupportdependency (replace with keyword arguments).:host,:port,:nicknameand other accessors.Its usage can trigger undefined behavior, and here is no need for it.
TWITCHCLIENT 3command.UTF-8encoding for socket.Message#sent_at(for logging).Message#target: seems useless.additional_infoforMessage(with badges, chat states, etc.).Userclass with information fromadditional_infoof message.$LOAD_PATH.unshiftwithrequire_relative.TERMandINTprocess signals after actions.specRake task (for RSpec).rubocop(and its config), resolve many offenses.pry-byebugfor handful debug (in specs).simplecovfor indicating tests coverage.