Skip to content

Conversation

@henrikbjorn
Copy link
Member

Summary

  • Test framework: Replace Bacon (unmaintained) with Minitest::Test. All 88 tests pass with 0 warnings.
  • Conventions: Rename spec/ to test/, use *_test.rb suffix and test_helper.rb naming.
  • Clean test mocking: Use prepend module (ListenerTestMock) instead of reopening Base class and redefining methods. Configurable on_event_block replaces singleton method redefinitions.
  • Dependencies: Drop bacon and rr gems, add minitest.
  • Warnings fixed: attr_reader instead of attr_accessor in Response (custom setters exist), eliminating method redefinition warnings.
  • README: Rewritten with table of contents, updated code examples, corrected filters API (was filter), removed stale links (IRC, mailing list, rdoc.info).
  • CI: Add GitHub Actions workflow running tests on Ruby 3.1, 3.2, 3.3, and 3.4.
  • Cleanup: Delete disabled CommandSocket spec.

Replace the unmaintained Bacon test framework with Minitest::Test.
Rename spec/ to test/ following Ruby conventions (*_test.rb suffix).
Use prepend-based test mocking instead of class reopening to avoid
method redefinition warnings. Drop RR and Bacon gem dependencies.

Also: rewrite README with table of contents, add GitHub Actions CI
workflow (Ruby 3.1–3.4), migrate from EventMachine to async I/O,
and fix Ruby 4.0 frozen string warnings in Response.
@henrikbjorn henrikbjorn self-assigned this Feb 10, 2026
- Replace ListenerTestMock send_data/initialize overrides with a
  MockConnection object passed to .new, so the real send_data writes
  to the mock connection instead of being monkey-patched
- Split test files to one test class per file
- Move connection logic into Inbound.start/Outbound.start class methods
- Standardize on parentheses in all method definitions
- Update examples to match current API
Remove Base.self.new/allocate/post_init pattern inherited from
EventMachine. Each class now uses a standard initialize that accepts
connection as the first argument.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant