Open iBug opened 2 months ago
That would be a great improvement, I'd be happy to review a PR if you're able to pull one together!
I took a look at the existing code and it seems too entangled for me to handle. I hope someone from Ruby could take on this.
My ideas are:
/versions
unconditionally and either:
/versions.md5sum
file so we (mirror sites) can serve its content as the ETag value for the /versions
file, to maintain compatibility with Bundler 2.4.ETag
server header to /versions.md5sum
which may be even more compatible./info/#{gem.name}
if either:
@iBug Share one of our practices, which is to redirect the /info/ directory to the official address, so that no matter what package is downloaded and installed, the original metadata will be accessed.
According to https://github.com/tuna/issues/issues/2048, a mirror created by gem mirror
without additional care is unusable with gem
.
According to issues like:
A full RubyGems mirror generated by
gem mirror
is not easy to consume - Bothgem install
andbundle
fetches tons ofgemspec.rz
files if a faster index is not found (previously/api/v1/dependencies
, now superseded by/versions
+/info/
), making a local mirror actually much slower even under terrible availability ofrubygems.org
(e.g. from mainland China).If
gem mirror
could also fetch theversions
file and populate the/info/
directory, downstream mirror sites will be much easier to use.