mirror of
https://github.com/lilydjwg/nvchecker.git
synced 2025-03-10 06:14:02 +00:00
so that different entries can refer to a same software without much overhead. This is needed because entries may be generated, and only nvchecker can tell if two entries are expecting the same result because the name may or may not be relevant. Closes #81.
15 lines
328 B
Python
15 lines
328 B
Python
# MIT licensed
|
|
# Copyright (c) 2013-2017 lilydjwg <lilydjwg@gmail.com>, et al.
|
|
|
|
from .simple_json import simple_json
|
|
|
|
GEMS_URL = 'https://rubygems.org/api/v1/versions/%s.json'
|
|
|
|
def _version_from_json(data):
|
|
return data[0]['number']
|
|
|
|
get_version, get_cacheable_conf = simple_json(
|
|
GEMS_URL,
|
|
'gems',
|
|
_version_from_json,
|
|
)
|