def sources_add(name, ruby=None, user=None):
    '''
    Make sure that a gem source is added.

    name
        The URL of the gem source to be added

    ruby: None
        For RVM or rbenv installations: the ruby version and gemset to target.

    user: None
        The user under which to run the ``gem`` command

        .. versionadded:: 0.17.0
    '''
    ret = {'name': name, 'result': None, 'comment': '', 'changes': {}}

    if __salt__['gem.sources_list'](ruby, runas=user) in name:
        ret['result'] = True
        ret['comment'] = 'Gem source is already added.'
        return ret
    if __opts__['test']:
        ret['comment'] = 'The gem source {0} would have been removed.'.format(name)
        return ret
    if __salt__['gem.sources_add'](source_uri=name, ruby=ruby, runas=user):
        ret['result'] = True
        ret['changes'][name] = 'Installed'
        ret['comment'] = 'Gem source was successfully added.'
    else:
        ret['result'] = False
        ret['comment'] = 'Could not add gem source.'
    return ret
dataset/ETHPy150Open saltstack/salt/salt/states/gem.py/sources_add/swapped operands of `in`