Skip to content
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

Implement call method in pipelined block #283

Merged
merged 1 commit into from
Oct 29, 2023

Conversation

viralpraxis
Copy link
Contributor

Resolves #278

Seems like everything is working; however, I'm not sure if moving #call from MockRedis to MockRedis::Database has some side-effects -- is there a reason call was separated from other commands?

I also changed send to public_send in call implementation (seems to be OK, I'm not sure if there are any edge cases when calling private is a usecase).

Also, I think we should allow mix-cased variants of Redis methods (RedisMock.new.call(["GET", 123]) does not work right now, but redis commands are case insensitive).

Usage example:

redis = MockRedis.new

redis.pipelined do |pipeline|
  pipeline.call(["get", "foo"])
  pipeline.call(["get", "bar"])
end

@viralpraxis viralpraxis changed the title Impliment call method in pipelined block Implement call method in pipelined block Oct 26, 2023
@sds sds merged commit 29961e0 into sds:main Oct 29, 2023
7 checks passed
@sds
Copy link
Owner

sds commented Oct 29, 2023

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to execute #call with redis command in pipelined
2 participants