ARTIFACTORY: Creating Remote Ruby Gem Repositories with a Private Ruby Upstream

ARTIFACTORY: Creating Remote Ruby Gem Repositories with a Private Ruby Upstream

AuthorFullName__c
Alec Choy
articleNumber
000006169
ft:sourceType
Salesforce
FirstPublishedDate
2024-08-25T07:08:55Z
lastModifiedDate
2024-08-25
VersionNumber
1

When creating a rubygems remote repository to proxy a private ruby-gems repo, please make sure that the metadata file is matching the rubygems.org format as Artifactory relies on this.

A quick test we can do is to run a curl against ruby gems 

curl https://rubygems.org/versions 

Lines contain 3 tokens (except created_at and comments)
created_at: 2024-04-01T00:00:05Z
---
- 1 05d0116933ba44b0b5d0ee19bfd35ccc
-A 0.0.0 8b1527991f0022e46140907a7fc4cfd4
.cat 0.0.1 631fd60a806eaf5026c86fff3155c289
0xfacet 0.0.1 19f838ab8103dc3eaeb073e9b4996c26
0xfacet-contracts 0.0.1 5311b9422f03e0ffaa8d05954fdcedab
0xfacet-rubidity 0.0.1 348c28d5f302e9572b808c57b25ae7dc
0xfacet-typed 0.0.1,0.1.0 286fdeaa488682f8b0298727d0dab79b
0xfacet-uniswap 0.0.1 96641fc6b1b215981244d7eed0b5402b
0xffffff 0.0.1,0.1.0 0a4a9aeae24152cdb467be02f40482f9

Each line has 3 parameters in the rubygems.org separated with a space

However, some private gem repositories like “packagecloud.io” have a different metadata format
curl https://<private-endpoint>/test-project/jfrog_test/versions


private-endpoint-test-gem 0.0.1

This specific package only has two parameters, which is not in line with the rubygems.org and it won’t work with Artifactory Rubygems remote repository as well.

By testing the curl to /versions we can see the metadata format and check if it corresponds with the rubygems page like seen in the previous cURL example, and if it does, it will work with Artifactory repos.