Skip to content

refactor(ruby): move pubsub types to pubsub namespace - #390

Open
Aryex wants to merge 1 commit into
mainfrom
refactor/organize-command-files
Open

Aryex wants to merge 1 commit into
mainfrom
refactor/organize-command-files

Conversation

@Aryex

@Aryex Aryex commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Move the PubSub code from glide module to pubsub module, making it inline with how search module works.

Issue link

No linked issue. This is a focused organization change for the existing Pub/Sub implementation.

Changes

Pub/Sub files are now organized as:

lib/valkey/pubsub.rb # Pub/Sub entrypoint for imports
lib/valkey/pubsub/pubsub_message.rb
lib/valkey/pubsub/pubsub_state.rb
lib/valkey/pubsub/pubsub_receiver.rb
lib/valkey/commands/pubsub_commands.rb # Pub/Sub command API

require "valkey/pubsub" loads the Pub/Sub types and internal receiver without requiring the main client entrypoint. Tests and AGENTS.md now use the new namespace and paths.

Test also moved to reflect the new location.

Limitations

This PR only reorganizes Pub/Sub support. Search commands and types are unchanged.

Testing

  • bundle exec rake test:unit (528 tests, 1,371 assertions, 0 failures)
  • bundle exec rubocop (141 files, no offenses)
  • Direct require "valkey/pubsub" check using Valkey::PubSub::PubSubMessage, PubSubState, and PubSubReceiver

Checklist

Before submitting the PR make sure the following are checked:

  • This Pull Request is related to an issue.
  • Commit message describe your changes
  • Commits are signed off (git commit -s) per the DCO.
  • Tests are added or updated.
  • CHANGELOG.md and documentation files are updated. No changelog entry is needed because these Pub/Sub types have not shipped; AGENTS.md is updated.
  • Linters have been run (bundle exec rubocop) and pass.
  • Destination branch is correct - main.

@Aryex
Aryex added this pull request to stack #392 October 23, 2026 23:09
@Aryex Aryex changed the title refactor(ruby): organize command files Reorganize files Oct 30, 2026
@Aryex Aryex changed the title Reorganize files refactor(ruby): organize search and pubsub files Oct 30, 2026
@Aryex
Aryex force-pushed the refactor/organize-command-files branch from f310f85 to 8c65b11 Compare October 30, 2026 18:06
@Aryex Aryex changed the title refactor(ruby): organize search and pubsub files refactor(ruby): move pubsub types to pubsub namespace Oct 30, 2026
@Aryex Aryex self-assigned this Oct 30, 2026
@Aryex
Aryex force-pushed the refactor/organize-command-files branch from 8c65b11 to 27f03de Compare October 30, 2026 18:22
@Aryex
Aryex marked this pull request as ready for review October 30, 2026 18:34
Signed-off-by: Alex Le <alex.le@improving.com>
@Aryex
Aryex force-pushed the refactor/organize-command-files branch from 27f03de to dde25d4 Compare October 30, 2026 21:35
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