

def get_gems(self, gems, dir, rbenv=False):
    'downloads a list of ruby gems\n\n        :param list gems: gems to download\n        :param string dir: directory to download gems to\n        '
    gem = (sh.Command('{0}/bin/gem'.format(rbenv)) if rbenv else sh.Command('gem'))
    for gem in gems:
        lgr.debug('Downloading gem {0}'.format(gem))
        o = gem.install('--no-ri', '--no-rdoc', '--install-dir', dir, gem, _iter=True)
        try:
            for line in o:
                lgr.debug(line)
        except:
            sys.exit(codes.mapping['failed_to_download_gem'])

dataset/ETHPy150Open cloudify-cosmo/packman/packman/ruby.py Handler.get_gems/original