mirror of
https://github.com/lilydjwg/nvchecker.git
synced 2025-03-10 06:14:02 +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
2 changed files with 3 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue