mirror of
https://github.com/lilydjwg/nvchecker
synced 2025-02-16 10:26:51 +00:00
Merge pull request #164 from DDoSolitary/patch-gems-list
Add list options support for gems source
This commit is contained in:
commit
30055a9dcb
@ -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
Block a user