Open MatteoJoliveau opened 4 years ago
Other valuable pieces to this puzzle https://github.com/rubygems/compact_index https://github.com/rubygems/rfcs/blob/master/text/0009-deprecate-dependency-api.md
The solutions used by Gemstash/Artifactory/Geminabox/Nexus etc. are all outdated, building ruby support from the ground up using the newer approaches for dependency resolution would likely be a good idea.
Effectively the app needs to support 4 endpoints against the root of the repository
ex: https://rubygems.org/names Returns an alphabetized list of all gems the gemcutter server can provide,
ex: https://rubygems.org/versions
returns the last updated date followed by an alphabetized space separated list containing:
gem-name comma,separated,versions checksum-of-info
https://github.com/rubygems/compact_index/blob/master/lib/compact_index/versions_file.rb
ex: https://rubygems.org/info/rails
returns a list of all versions of a given gem, each line formatted like
version comma,separted-list-of-dependency-strings|checksum:sha-checksum,ruby:ruby-version-string
following that, each gem in a given repository should be served at :root/gems/:gem-name-:gem-version.gem, ex: https://rubygems.org/gems/rails-2.1.2.gem
This follows the same destiny as the Maven and NPM APIs: it's not that well documented and will require some reverse engineering of both existing servers and the
gem
client.Reference implementations: