diff options
author | Azul <azul@riseup.net> | 2013-12-22 15:58:21 +0100 |
---|---|---|
committer | Azul <azul@riseup.net> | 2013-12-22 15:58:21 +0100 |
commit | 8c83e7a78385da8d15d274ee86f126a27f4763c7 (patch) | |
tree | c0a2e322b8f1bff68ba439e80e770f5fd3a2a15e /lib | |
parent | 12dbeefe693e5432416ec8019368e591c526736b (diff) |
Version 0.3.1 with new flags --run-once, --rerun and --overwrite-security0.3.1
--run-once will exit once all current changes have been processed
--rerun will process all users again even those that were processed before
--overwrite-security will overwrite security for user databases even
if it has been set before.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/tapicero.rb | 4 | ||||
-rw-r--r-- | lib/tapicero/user_database.rb | 2 | ||||
-rw-r--r-- | lib/tapicero/version.rb | 3 |
3 files changed, 7 insertions, 2 deletions
diff --git a/lib/tapicero.rb b/lib/tapicero.rb index 3923c65..e2a8f38 100644 --- a/lib/tapicero.rb +++ b/lib/tapicero.rb @@ -22,6 +22,10 @@ module Tapicero self.config = CouchRest::Changes::Config.load(BASE_DIR, *configs) self.logger = CouchRest::Changes::Config.logger + # hand flags over to CouchRest::Changes + config.flags = FLAGS + puts "flags: #{FLAGS}" if FLAGS.any? + # # Load Tapicero Parts # diff --git a/lib/tapicero/user_database.rb b/lib/tapicero/user_database.rb index efd723a..50694b7 100644 --- a/lib/tapicero/user_database.rb +++ b/lib/tapicero/user_database.rb @@ -17,7 +17,7 @@ module Tapicero def secure(security) # let's not overwrite if we have a security doc already - return if secured? + return if secured? && !Tapicero::FLAGS.include?('--overwrite-security') Tapicero.logger.info "Writing Security to #{security_url}" Tapicero.logger.debug security.to_json CouchRest.put security_url, security diff --git a/lib/tapicero/version.rb b/lib/tapicero/version.rb index 2c4bc00..18ee238 100644 --- a/lib/tapicero/version.rb +++ b/lib/tapicero/version.rb @@ -1,4 +1,5 @@ module Tapicero - VERSION = "0.3.0" + VERSION = "0.3.1" REQUIRE_PATHS = ['lib'] + FLAGS = [] end |