Thank you for your interest in contributing to valkey-namespace!
- Fork the repository
- Clone your fork:
git clone https://github.com/YOUR-USERNAME/valkey-namespace.git - Install dependencies:
bundle install - Make sure tests pass:
bundle exec rake spec
bundle exec rake specIf you need to add support for a new Valkey command:
-
Add the command to the appropriate command table in
lib/valkey/namespace.rb:NAMESPACED_COMMANDS- for commands that operate on keysTRANSACTION_COMMANDS- for transaction-related commandsHELPER_COMMANDS- for utility commandsADMINISTRATIVE_COMMANDS- for admin commands (discouraged)
-
Specify how arguments should be namespaced:
:first- namespace the first argument:all- namespace all arguments:exclude_first- namespace all but first:exclude_last- namespace all but last:alternate- namespace every other argument (for key-value pairs):scan_style- for SCAN-like commands:eval_style- for EVAL/EVALSHA commands
-
Specify how return values should be processed:
nil- no processing:all- remove namespace from all returned keys:first- remove namespace from first element:second- remove namespace from second element
-
Add tests in
spec/valkey_spec.rb
- Follow Ruby community style guidelines
- Keep methods focused and single-purpose
- Add comments for complex logic
- Maintain compatibility with Ruby 2.7+
- Create a feature branch:
git checkout -b my-feature - Make your changes
- Add tests for your changes
- Ensure all tests pass
- Commit with a clear message:
git commit -m "Add support for COMMAND" - Push to your fork:
git push origin my-feature - Open a Pull Request
When reporting issues, please include:
- Ruby version
- valkey-namespace version
- valkey-glide-ruby version
- Minimal reproduction code
- Expected vs actual behavior
Feel free to open an issue for questions or discussions.