Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 5f663d2151
Fetching contributors…

Cannot retrieve contributors at this time

39 lines (30 sloc) 0.738 kb
require 'json'
require 'rspec'
require 'redis'
require 'rack'
require 'rack/test'
require 'delorean'
ENV['RACK_ENV'] = "test"
ENV['FNORDMETRIC_ENV'] = 'test'
$: << ::File.expand_path('../../lib', __FILE__)
require "fnordmetric"
require "eventmachine"
require 'em-hiredis'
def EM.defer; yield; end
def EM.next_tick; yield; end
class RedisWrap
def initialize(redis, callbackable=true)
@redis = redis
@callbackable = callbackable
end
def method_missing(m, *args)
@last_return = @redis.send(m, *args)
if ENV["VERBOSE_REDIS"]
puts ">> REDIS: #{m} #{args.join(" ")} => #{@last_return}"
end
@callbackable ? self : @last_return
end
def callback(&block)
block.call(*@last_return)
end
end
Jump to Line
Something went wrong with that request. Please try again.