debian-mirror-gitlab/spec/support/redis_without_keys.rb

9 lines
249 B
Ruby
Raw Normal View History

2018-03-17 18:26:18 +05:30
class Redis
ForbiddenCommand = Class.new(StandardError)
def keys(*args)
raise ForbiddenCommand.new("Don't use `Redis#keys` as it iterates over all "\
"keys in redis. Use `Redis#scan_each` instead.")
end
end