From 8c83e7a78385da8d15d274ee86f126a27f4763c7 Mon Sep 17 00:00:00 2001 From: Azul Date: Sun, 22 Dec 2013 15:58:21 +0100 Subject: Version 0.3.1 with new flags --run-once, --rerun and --overwrite-security --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. --- bin/tapicero | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'bin') diff --git a/bin/tapicero b/bin/tapicero index b8b88f1..ddd71c6 100755 --- a/bin/tapicero +++ b/bin/tapicero @@ -41,11 +41,18 @@ if ARGV.grep(/--version/).any? exit(0) end -# --run-once will create databases for new users and then exit -if ARGV.grep(/--once/).any? or ARGV.grep(/--run-once/).any? - require 'tapicero' - # TODO: implement me. - exit(0) +# --run-once create databases for new users and then exit +# --rerun also act upon users that have already been processed +# --overwrite-security overwrite existing couch security settings +# TODO: not implemented yet: +# --overwrite-designs overwrite existing design documents +Tapicero::FLAGS.concat ARGV.grep(/--.*/) + +# if flags have been set but an action is missing we assume +# tapicero should run in foreground. +if ARGV.first.start_with?('--') + ARGV.unshift '--' + ARGV.unshift 'run' end # -- cgit v1.2.3