-
-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
api/v1/versions endpoint #277
base: main
Are you sure you want to change the base?
Conversation
Create the api/v1/versions endpoint.
results.group_by {|r| r[:name] }.each do |gem, rows| | ||
requirements = rows.group_by {|r| [r[:number], r[:platform]] } | ||
|
||
value = requirements.map do |version, r| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would this do the right thing?
value = requirements.map do |version, r| | |
value = requirements.map do |(version_number, platform), r| |
Well, version_number
is perhaps a too-long name, could call it version
, too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed. I changed it in the following commit. eb619cd
The CI is broken for months in the master branch. Is this project still alive ? I would like to contribute on it as I use it internally but if it is not maintained, do you know any opensource alternatives (and not a all-in-one solution like artifactory) ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I took a look at the test output now, and managed to get to a place where the tests are failing, not erroring.
context "from the default upstream" do | ||
let(:current_env) { Gemstash::Env.current } | ||
let(:upstream) { Gemstash::Upstream.new(current_env.config[:rubygems_url]) } | ||
let(:storage) { Gemstash::LocalStorage.for("gem_cache").for(upstream.host_id) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this can become
let(:storage) { Gemstash::LocalStorage.for("gem_cache").for(upstream.host_id) } | |
let(:storage) { Gemstash::Storage.for("gem_cache").for(upstream.host_id) } |
|
||
context "from private gems" do | ||
let(:gem_source) { Gemstash::GemSource::PrivateSource } | ||
let(:storage) { Gemstash::LocalStorage.for("private").for("gems") } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let(:storage) { Gemstash::LocalStorage.for("private").for("gems") } | |
let(:storage) { Gemstash::Storage.for("private").for("gems") } |
Create the api/v1/versions endpoint.
Description:
This endpoint is needed to integrate gemstash in automated systems.
Tasks:
I will abide by the code of conduct.