'Adds the wsgi_actions dictionary to the class.'

def __new__(mcs, name, bases, cls_dict):

    actions = {}
    extensions = []
    versioned_methods = []
    if ((bases != (object,)) and (VER_METHOD_ATTR in vars(Controller))):
        versioned_methods.append(getattr(Controller, VER_METHOD_ATTR))
        delattr(Controller, VER_METHOD_ATTR)
    for base in bases:
        actions.update(getattr(base, 'wsgi_actions', {}))
        if (VER_METHOD_ATTR in vars(base)):
            versioned_methods.append(getattr(base, VER_METHOD_ATTR))
    for (key, value) in cls_dict.items():
        if (not callable(value)):
            continue
        if getattr(value, 'wsgi_action', None):
            actions[value.wsgi_action] = key
        elif getattr(value, 'wsgi_extends', None):
            extensions.append(value.wsgi_extends)
    cls_dict['wsgi_actions'] = actions
    cls_dict['wsgi_extensions'] = extensions
    if versioned_methods:
        cls_dict[VER_METHOD_ATTR] = mcs.consolidate_vers(versioned_methods)
    return super(ControllerMetaclass, mcs).__new__(mcs, name, bases, cls_dict)
