Add couchbase with modifications, formalize broadcaster and make testable and some other stuff
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
module Qwaiter
|
||||
module Counter
|
||||
mattr_accessor :connection
|
||||
|
||||
# mainly for testing purposes
|
||||
def self.set(key, value)
|
||||
connection.set(key, value)
|
||||
end
|
||||
|
||||
def self.get(key)
|
||||
connection.get(key).to_i
|
||||
end
|
||||
|
||||
def self.incr(*args)
|
||||
connection.incr(*args)
|
||||
end
|
||||
|
||||
def self.decr(*args)
|
||||
connection.decr(*args)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# use the connection from couchbase-structures/documents
|
||||
# will be overwritten in the specs since flushing the real
|
||||
# thing is difficult
|
||||
Qwaiter::Counter.connection = $cb
|
||||
Reference in New Issue
Block a user