<reponame>bboerst/nvchecker
# MIT licensed
# Copyright (c) 2013-2017 lilydjwg <<EMAIL>>, 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,
)

# MIT licensed
# Copyright (c) 2013-2017 lilydjwg <<EMAIL>>, 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,
)
# MIT licensed # Copyright (c) 2013-2017 lilydjwg <<EMAIL>>, et al.