def resources_preparing_factory(app, wrapper):
    """ Factory which wrap all resources in settings.
    """
    settings = app.app.registry.settings
    config = settings.get(CONFIG_RESOURCES, None)
    if not config:
        return

    resources = [(k, [wrapper(r, GroupResource(k, v)) for r in v])
                 for k, v in config]
    settings[CONFIG_RESOURCES] = resources
Factory which wrap all resources in settings.