#1031518 gem2deb: prefer github.com tarballs in watch file when available

Package:
gem2deb
Source:
gem2deb
Description:
Debian Ruby packaging suite
Submitter:
Pirate Praveen
Date:
2023-02-17 16:36:04 UTC
Severity:
normal
#1031518#5
Date:
2023-02-10 17:17:47 UTC
From:
To:
npm2deb does this already and we could do it too when gemspec mentions
it the homepage as github. We might have to use the rubygems.org api to
find homepage, like npm2deb does.

Also using api.github.com can help getting all tags instead of only the
latest tags when there are too many frequent releases and we want an
older version.

An example watch file is:

version=4
opts="searchmode=plain, \
  repacksuffix=+dfsg,repack,compression=xz,\
  dversionmangle=auto,\
  filenamemangle=s/.+\/v@ANY_VERSION@/@PACKAGE@-$1\.tar\.gz/" \
https://api.github.com/repos/chartjs/Chart.js/releases \
https://api.github.com/repos/chartjs/Chart.js/tarball/v@ANY_VERSION@
group