# Path: will/utils.py
# def show_valid(valid_str):
#     puts(colored.green(u"✓ %s" % valid_str))
# 
# def warn(warn_string):
#     puts(colored.yellow("! Warning: %s" % warn_string))
# 
# def note(warn_string):
#     puts(colored.cyan("- Note: %s" % warn_string))
# 
# def error(err_string):
#     puts(colored.red("ERROR: %s" % err_string))


import os
import sys
    import uuid
    import time
    import random
    import hashlib
                import config
                        import config
from will.utils import show_valid, warn, note, error
from clint.textui import puts, indent
from six.moves.urllib import parse
from six.moves import input
        if "STORAGE_BACKEND" not in settings:
            if not quiet:
                warn("No STORAGE_BACKEND specified.  Defaulting to redis.")
            settings["STORAGE_BACKEND"] = "redis"

        if "PUBSUB_BACKEND" not in settings:
            if not quiet:
                warn("No PUBSUB_BACKEND specified.  Defaulting to redis.")
            settings["PUBSUB_BACKEND"] = "redis"

        if settings["STORAGE_BACKEND"] == "redis" or settings["PUBSUB_BACKEND"] == "redis":
            if "REDIS_URL" not in settings:
                # For heroku
                if "REDIS_URL" in os.environ:
                    settings["REDIS_URL"] = os.environ["REDIS_URL"]
                    if not quiet:
                        note("WILL_REDIS_URL not set, but it appears you're using Heroku Redis or another standard REDIS_URL. If so, all good.")
                if "REDISCLOUD_URL" in os.environ:
                    settings["REDIS_URL"] = os.environ["REDISCLOUD_URL"]
                    if not quiet:
                        note("WILL_REDIS_URL not set, but it appears you're using RedisCloud. If so, all good.")
                elif "REDISTOGO_URL" in os.environ:
                    settings["REDIS_URL"] = os.environ["REDISTOGO_URL"]
                    if not quiet:
                        note("WILL_REDIS_URL not set, but it appears you're using RedisToGo. If so, all good.")
                elif "OPENREDIS_URL" in os.environ:
                    settings["REDIS_URL"] = os.environ["OPENREDIS_URL"]
                    if not quiet:
                        note("WILL_REDIS_URL not set, but it appears you're using OpenRedis. If so, all good.")
                else:

# Path: will/utils.py
# def show_valid(valid_str):
#     puts(colored.green(u"✓ %s" % valid_str))
# 
# def warn(warn_string):
#     puts(colored.yellow("! Warning: %s" % warn_string))
# 
# def note(warn_string):
#     puts(colored.cyan("- Note: %s" % warn_string))
# 
# def error(err_string):
#     puts(colored.red("ERROR: %s" % err_string))


# Path: will/settings.py
import os
import sys
    import uuid
    import time
    import random
    import hashlib
                import config
                        import config
from will.utils import show_valid, warn, note, error
from clint.textui import puts, indent
from six.moves.urllib import parse
from six.moves import input

        if "STORAGE_BACKEND" not in settings:
            if not quiet:
                warn("No STORAGE_BACKEND specified.  Defaulting to redis.")
            settings["STORAGE_BACKEND"] = "redis"

        if "PUBSUB_BACKEND" not in settings:
            if not quiet:
                warn("No PUBSUB_BACKEND specified.  Defaulting to redis.")
            settings["PUBSUB_BACKEND"] = "redis"

        if settings["STORAGE_BACKEND"] == "redis" or settings["PUBSUB_BACKEND"] == "redis":
            if "REDIS_URL" not in settings:
                # For heroku
                if "REDIS_URL" in os.environ:
                    settings["REDIS_URL"] = os.environ["REDIS_URL"]
                    if not quiet:
                        note("WILL_REDIS_URL not set, but it appears you're using Heroku Redis or another standard REDIS_URL. If so, all good.")
                if "REDISCLOUD_URL" in os.environ:
                    settings["REDIS_URL"] = os.environ["REDISCLOUD_URL"]
                    if not quiet:
                        note("WILL_REDIS_URL not set, but it appears you're using RedisCloud. If so, all good.")
                elif "REDISTOGO_URL" in os.environ:
                    settings["REDIS_URL"] = os.environ["REDISTOGO_URL"]
                    if not quiet:
                        note("WILL_REDIS_URL not set, but it appears you're using RedisToGo. If so, all good.")
                elif "OPENREDIS_URL" in os.environ:
                    settings["REDIS_URL"] = os.environ["OPENREDIS_URL"]
                    if not quiet:
                        note("WILL_REDIS_URL not set, but it appears you're using OpenRedis. If so, all good.")
                else:

                    settings["REDIS_URL"] = "redis://localhost:6379/7"