def method_missing(command, *args, &block)
normalized_command = command.to_s.downcase
if ADMINISTRATIVE_COMMANDS.include?(normalized_command)
return super if deprecations?
if warning?
warn("Passing '#{normalized_command}' command to redis as is; " +
"administrative commands cannot be effectively namespaced " +
"and should be called on the redis connection directly; " +
"passthrough has been deprecated and will be removed in " +
"redis-namespace 2.0 (at #{call_site})"
)
end
call_with_namespace(command, *args, &block)
elsif COMMANDS.include?(normalized_command)
call_with_namespace(command, *args, &block)
elsif @redis.respond_to?(normalized_command) && !deprecations?
if warning?
warn("Passing '#{command}' command to redis as is; blind " +
"passthrough has been deprecated and will be removed in " +
"redis-namespace 2.0 (at #{call_site})")
end
@redis.send(command, *args, &block)
else
super
end
end