Add list options support for gems source
This commit is contained in:
parent
8d1a079703
commit
ab66fc0468
|
@ -437,6 +437,8 @@ Check `RubyGems <https://rubygems.org/>`_ for updates.
|
|||
gems
|
||||
The name used on RubyGems, e.g. ``sass``.
|
||||
|
||||
This source supports :ref:`list options`.
|
||||
|
||||
Check NPM Registry
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
::
|
||||
|
|
|
@ -6,4 +6,4 @@ GEMS_URL = 'https://rubygems.org/api/v1/versions/%s.json'
|
|||
async def get_version(name, conf, *, cache, **kwargs):
|
||||
key = conf.get('gems', name)
|
||||
data = await cache.get_json(GEMS_URL % key)
|
||||
return data[0]['number']
|
||||
return [item['number'] for item in data]
|
||||
|
|
Loading…
Reference in New Issue