From a8194a21cb9f452adb77d24b60434f921c60d496 Mon Sep 17 00:00:00 2001 From: Azul Date: Tue, 4 Feb 2014 14:00:58 +0100 Subject: refactor: init user_database with a couchrest db --- lib/tapicero.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/tapicero.rb') diff --git a/lib/tapicero.rb b/lib/tapicero.rb index 390257d..fd53d64 100644 --- a/lib/tapicero.rb +++ b/lib/tapicero.rb @@ -30,6 +30,6 @@ module Tapicero require 'tapicero/user_database' def self.user_database(id) - UserDatabase.new(config.couch_host, config.options[:db_prefix] + id) + UserDatabase.new(id) end end -- cgit v1.2.3 From ecf7188143d09c091f89b1970269e04fc7cba4e8 Mon Sep 17 00:00:00 2001 From: Azul Date: Tue, 4 Feb 2014 14:14:54 +0100 Subject: refactor: separate user event handler --- lib/tapicero.rb | 8 -------- 1 file changed, 8 deletions(-) (limited to 'lib/tapicero.rb') diff --git a/lib/tapicero.rb b/lib/tapicero.rb index fd53d64..1063b85 100644 --- a/lib/tapicero.rb +++ b/lib/tapicero.rb @@ -24,12 +24,4 @@ module Tapicero puts "flags: #{FLAGS}" if FLAGS.any? end - # - # Load Tapicero Parts - # - require 'tapicero/user_database' - - def self.user_database(id) - UserDatabase.new(id) - end end -- cgit v1.2.3 From 7bb4ab417c0275fcca03abe338b3b81c17b17a6e Mon Sep 17 00:00:00 2001 From: Azul Date: Tue, 4 Feb 2014 15:47:55 +0100 Subject: prevent 409s and 412 and reraise them in tests Including tests that ensure this --- lib/tapicero.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib/tapicero.rb') diff --git a/lib/tapicero.rb b/lib/tapicero.rb index 1063b85..a098287 100644 --- a/lib/tapicero.rb +++ b/lib/tapicero.rb @@ -8,7 +8,11 @@ module Tapicero attr_accessor :config end - + # reraise exceptions instead of retrying + # used in tests + unless defined? RERAISE + RERAISE = false + end # # Load Config # this must come first, because CouchRest needs the connection -- cgit v1.2.3