-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bring extension branch up to date with v2 progress #13
Merged
Conversation
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
Added checks to see if the bot has access to that channel first before attempting to send the message Changed how missing permission notifications work
itsthedevman
added a commit
that referenced
this pull request
Mar 5, 2023
* Initial commit - Initialization flow is almost finished * Added basic dynamic callback support * Added class level callback support * Alphabetize gemspec * Added callback support for events and cleaned up initialization flow * Finished up post init with extension * Adjusted deliver! method to handle version 2 * Added support for determining rust enum * Added support for v2 error codes * [V2] TCP Server (#9) * Added logging notifications for ease of logging * Reverted changes to websocket * Ignore crate build folders * Initial TCP Server crate * Added Rutie Updated dependencies * Working TCP server * TCPServer can talk to TCPClient. * on connected * Rescue on to_ostruct * On_message * Cleaned up code * Configs for connection manager * More changes to on_message * More progress on the event workflows * Moved server out of lib * Rewrote how the TCPServer talks to ESM. This solves multiple troubleships with the other method. This is way more stable * Move method to private * Updated server error messages * Revert ServerInitialization back to master * Revert * Revert * Cleanup and bring bot up to date * Added #connection and #connected? * Added find_by_server_id and find_by_resource_id FInished up #disconnect Cleaned up code * Renamed #associate with #authenticate Cleaned up code * Commented out rb_send_message Fixed deadlock issue with disconnect. Its working as expected now * Adjusted comment format Commented out send_message Changed remove_endpoint and disconnect's signatures Refactored on_connect to use a closure to ensure RwLockWriteGuard was always being dropped * Rubocop suggestions * Moved ESM::Time * Added JSON class to replace std calls Using FastJsonparser internally, speeds up calls by almost 100% * Added redis and fastjsonparser * Back to the drawing board. Removed Rutie, caused too many Ruby crashes Moved to tcp_server app. Working redis communication * Removed sleep * Separated redis connection into two * The server and TCPServer can now communicate * Implmented on_connect * Working client connection * Wired up on_connect, on_message, and on_disconnect with the bot * Bot and server ping/pong workflow * Blocked sending messages if the server is not connected * The bot can now send messages to the client * Moved Message over to it's own repo so esm_arma can use it * Moved code * The server and client can now communicate * Reimplement the bot-server ping system * I thought I deleted this * Renamed V1 events. V2 events will use their names * Reverted * Added Arma HashMap support * to_a and to_s for hashmap * Added type mapping for messages * Finished out message spect * Added check for invalid type More specs * Fixed hashmap json * Fixed a crash when no servers are present * Various changes * Rename tests * Fixed one spec Moved from eql to eq * Cleanup * Removed format * Refactored how convesion takes place * Expanded message to support array inner type conversion Added callbacks * Updated hashmap with array support * Added server intialization with working replies * Cleanup * Added esm to faker for tests * Added to_ostruct for ostruct * Finished up server initialization * Added callback? method * Fixed bug with errors * Reverted API removal * Reverted change * Fixed documentation * Added documentation * Cleanup * Removed bot_command * Removed close message * Message spec * Added new types and cleaned up code * Connection spec and cleaned up code * Cleanup specs * Added remove_callback method to callbacks * Basic server spec, there's not much to test here * Message overseer spec * Require type for message initization * Changed on_error to opt in * Server Initialization specs * Cleanup * Fixed message data_type defaults * Removed rutie * Bring extension branch up to date with v2 progress (#13) * metadata and routing data for command messages * Swapped default rewards * More readme * Replaced #online? with #connected? * Cleaned up code * Fixed seeds.rb file * Rewrote how hashmaps are created * Clear Redis lists before starting * Added logging_channel_id support * Changed how message sanitization works * Fixed server initialization spec * Write the server key to redis so the extension can load it * Code cleanup * Fixed message spec * Added more randomized server ids * Added esm_message support for changes to message parsing * Cleanup * Cleaned up how messages are sent a received * Added timeouts to metadata * Minor optimization by including server * Start tcp_server with tests and wait for it to connect * Cleaned up snippets * Added ESM::Test.channel for a random channel * Cleaned up the send message process Added checks to see if the bot has access to that channel first before attempting to send the message Changed how missing permission notifications work * Added randomization to the users and servers * Code cleanup * Hashmap: Bind to_s to to_json * Revert back to 10 seconds * Preload database * Added ESM::Server#token * Fixed server ID parsing for message validation * Removed reply_overseer and replaced it with #add_await * Disconnect all connections after each test * Increased error message backtrace size * Remove log * send_to_channel * Reset channel between tests * Added neat json for some sexy logs * Fixed server initialization spec * Default rust log level to error * Added check to make sure the server is connected and ready to go * Added support for symbol * Make message more useful * Blocked connections for non-connection specs * Cleanup * Disconnect if the bot is not connected * Added inspect method to message * Added support for bot stopping * Clear keys on boot * Created shared examples for command and connection * Cleaned up method more Added new test snippet * Added argument check * Cleaned up wait_for_reply * Renamed #edit to #edit_message for clarity * Cleanup * Store values as strings * Added specs for Server#fire Fixed a few server connection issues with tests * Stringify error type * Fixed crash with argument logging * Fixed option support for send_message * Added Resume and Pause to stop accepting connections and messages Fixed issues with server ID detection * WIP * Split commands locales out into files * Fixed a bunch of things * Fixed server spec * Cleaned up non-test booting * Changed how server messages are stored during tests * Added #t shorthand for commands * Cleaned up embed * Removed unused tranlations * Fixed server initialization and a bunch of cleanup * Switched method definition context * Added new helpers * WIP - Reward Command and spec The code is finally, _finally_, executing automatically through Rspec. * Tracking outbound and inbound messages * Fixed data type conversion issue * Added v1 sqf * Handle V1 * Randomized channels * Disallow invalid message types * [sqf] - WIP tests * Various changes * Added "Any" support * Update esm_message * Renamed and clean up send_to_a3 * Added replying to messages * sqf_v1 translations * SQF - More tests and fixes * Allow nil Any * Fixed seeds * First spec for Arma! * Fixed spec * Changed from context to examples * Fixed spec * SQF Minify * Various fixes * Added new specs * Revert data_type * Added user.log_on to support testing commands on players * Rebuilt second_user * Finished sqf spec * Cleanup * Fixed specs and stopped delete message if it's not needed * Remove messages for sqf * Added support for nilable types * Support for nested numbers * Default embed color to random * Spawn test user at airport * THE FIRST SPEC FOR REWARD!!!! * Fixed connection spec * Cleaned up message * Added reward_id locale * Added v2 tag * WIP - Reworte hashmap * Added V2 tag * Fixed to_a * Updated gitignore * Refactored HashMap.parse to from * Fixed hashmap parsing * Updated log and clippy * Fixed isValidHashmap spec * Updated dependencies * Fixed and cleaned up @esm specs * Updated info log * Clippy and fixes * Fixed hash map to_a and to_json * Fixed send_to_channel_spec * Fixed message and server_initialize specs * Moved away from gemspec Updated DiscordRB to the latest version * Fixed console load * Cleaned up bot.rb Added intents for bot * Remove message content from logs * Improved the help command's default page (#10) * Added new categories to help command "player commands", "admin commands", and "esm history" are now valid categories Initial writeup for esm history * Updated to Ruby 2.7.5 * Added setup information to readme * Render fields for help and updated more text * Updated help command with better information and links to privacy policy * Updated gems * Downgraded ActiveRecord to 6 * Fixed an issue where the server_id was case sensitive * Removed unused log * Fixed specs and added new ones * Added more specs and fixed some weirdness with cooldowns * Updated gems Cleaned up .env.test Cleaned up a check * Embed now handles nil values (sometimes it happens) * Xm8 notification routing (#12) * Moved check for dev from pre_init_dev to esm Applied various Rubocop fixes * Removed unneeded configs Added disable for OpenStructUse with note * Combined boot files and renamed to esm.rb * WIP life cycle documentation * Added UserNotificationRoute * updated readme * Fixed seeds file and added more fields to notification route * Added UUID Moved Types cleanup * Set server id to be nullable * Updates to model * WIP routing * Ignore logs * Remove enqueueing system * Added replying_to option for deliver * Added footer to notifications stating which server they are from Refactored how messages are sent * Fixed spec issues * Added specs for user notification routes * Cleanup * Changed how the messages are sent for custom routes * Removed extra space * Cleanup * Added requests command * Made accept_request_url and decline_request_url accept a uuid * Removed breakpoint * Added XM8 type to header message * Adjusting values for production * Revert deletion * Added rust setup * Fixed various things * Added error classname to logs * Fixed the entertainment commands * Fiixed som things * Updated packages and cleaned up code * Fix: XM8 notification crash when storing logging information * Improved inbound connection handling * Adjusted XM8 notification query * Added spec for ESMs_util_array_all * Added spec for ESMs_util_array_map * A3: Added spec ensuring hashmap parsing supports nil * A3: Added spec for ESMs_object_embed_create * A3: Added spec for ESMs_object_embed_addField * Code cleanup * A3: Added specs for ESMs_object_message_respond_to * A3: Added specs for ESMs_object_message_respond_withError * Code cleanup * A3: Added spec for ESMs_util_hashmap_toArray * A3: Adjusted spec for changes to ESMs_object_embed_addField * A3: Adjusted spec for changes to ESMs_object_embed_create * A3: Added spec for ESMs_system_network_discord_send_to * Bot: Added support to sanitize out Arma's double quoting * Bot: Added channel name support to send_to_channel * Fixed reward description for spec * Fixed a parsing issue with ESM::Arma::HashMap * Added more specs to reward * Changed format of Arma Hashmaps * WIP * Added Cargo.lock to gitignore * Set variable * Updated after deploy hook * Move env * Removed ENV from command * Clippy * Code cleanup * Added server key on bin/setup * Fixed bin/dev * Added log for server disconnect * Added Redis server to docker-compose Updated setup steps * Switched from Rubocop to Standard * Refactored from routing_data to locals * Standard fixes * reverted change and code cleanup * Fixed spec for ESMs_util_hashmap_toArray * Handle if build fails during testing * Fixed websocket spec * Renamed await_response to wait_for_response Fixed specs * Fixed websocket/* specs * Fixed cooldown and user specs * Fixed sending an empty embed on an empty message Fixed event specs * Fixed message and its spec * Added support for esm_message changes * Updated and fixed code snippets * Updated RSpec examples/context * Added on_response and on_execute to test commands * Updated test wording * Added state control * Call exit on stop * WIP command base_spec fixes * Moved docker-compose file Docker compose was trying to read .env file and crashing because of the characters inside it * Upgraded to Ruby 2.7.6 * Fixed deploy alias * Upgraded gems * Ignored warning from zeitwerk * Set rbenv version * Added MySQL to docker-compose * Removed rubocop * Partial rewrite and relocation * More extension_server rework * Fixed code * Way more progress on server rewrite Moved connection_manager and client to their own files * Added OnDisconnect event and checks * Added remove method to connection manager * Working health check * Refactored logging methods to global for ease of use * Parse JSON as indifferent * On_disconnect, changed botrequest types * Removed resource_id from message * Removed indifferent access * Made required refactors to connection server * Lock!, heartbeat thread * Cleanup * Cleanup * Fixed message conversion * Checkpoint: Auto-reconnect working but buggy * Moved to new request layout * Fixed typos * Fixed nil bug * Fixed auto reconnect, removed lobby, and improved connection * Updated logging * Finished auto-reconnect!! * Fixes for testing * WIP: server initialize cleanup * Renames * Added log to server * Added ENV for setting the testing database * Moved to postgres for server key lookup * Fixed spec * Fixed specs * Removed release tag * Adjusted error locales * message and spec improvements * Fixed overseer_spec * Build cleanup * Handle V1 requests * Fixed a bunch of specs * Added trace! logger * WIP: Spec fixes, Message rewrite, loads of improvements * Fixed @esm specs * Adjusted test user generation * Misc changes * Block hooks if the test does not set the flag * WIP command spec fixes * Removed "test" type * Better handling of errors for testing * Arma specific hashing of messages * More spec fixes * Added default arguments to on_response * Finished moving test users over to new system * Renamed to set_type and register_aliases * Added const for spec timeout * Refactored message, its callbacks, and a bunch of other things - I'm so lazy at commit messages... * Configurable log level * Fixed broken specs * Logging * WIP: Used methods instead of directly running callbacks * Removed mysql * New pathing * I may regret removing network mode * Updated gems, fixed issues with rakes * Updated gems * Added default_on_error to messages * Fixed test where arma was parsing incorrectly * Default logs back to warn * Fixed remaining broken specs * Defaulted expires_at to fix issue with older code * Fixed command load flow * Fixed v1/v2 command detection * Renamed redis server key for build * Broke Command::Base into multiple files and added specs around cooldowns * Added exclude matcher * Stashed WIP version of !reward * Fixed some specs, improved v1/v2 command detection * Fixed nil bugs * Reverted reward_v2 specs * Fixed permission check Removed test code from bot code * Spec: stop app logs from printing * Added simple-cov * Added timecop gem * Fixed cooldown spec * Cleanup * Clear metadata on disconnect, or after 2 days * Cleanup * Added Sorbet * Ruby 3.2 upgrade * Remove Sorbet * Updated Gemfile.lock
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.
No description provided.