Collects all the words from a text and joins them together
    with the inputted separator.
    
    :sa         [[#words]]
    
    :param      text        <str>
    :param      separator   <str>
    
    :return     <str>
    
    :usage      |import projex
                |print projex.joinWords('This::is.a testTest','-')

def joinWords(text, separator=''):
    """
    Collects all the words from a text and joins them together
    with the inputted separator.
    
    :sa         [[#words]]
    
    :param      text        <str>
    :param      separator   <str>
    
    :return     <str>
    
    :usage      |import projex
                |print projex.joinWords('This::is.a testTest','-')
    """
    text = nativestring(text)
    output = separator.join(words(text.strip(separator)))

    # no need to check for bookended items when its an empty string
    if not separator:
        return output

    # look for beginning characters
    begin = re.match('^\%s+' % separator, text)
    if begin:
        output = begin.group() + output

        # make sure to not double up
        if begin.group() == text:
            return output

    # otherwise, look for the ending results
    end = re.search('\%s+$' % separator, text)
    if end:
        output += end.group()

    return output