Add couchbase with modifications, formalize broadcaster and make testable and some other stuff

This commit is contained in:
2014-03-06 18:08:39 +01:00
parent 3f117c76b0
commit 0e7a39b819
28 changed files with 456 additions and 35 deletions
+27
View File
@@ -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