Skip to content
Snippets Groups Projects
Unverified Commit d8c7a14e authored by Sergei Zharinov's avatar Sergei Zharinov Committed by GitHub
Browse files

refactor(rubygems): Remove unnecessary package name guard (#22809)

parent cfc976db
No related branches found
No related tags found
No related merge requests found
...@@ -201,32 +201,6 @@ describe('modules/datasource/rubygems/index', () => { ...@@ -201,32 +201,6 @@ describe('modules/datasource/rubygems/index', () => {
expect(res).toMatchSnapshot(); expect(res).toMatchSnapshot();
}); });
it('returns null if mismatched name', async () => {
httpMock
.scope('https://thirdparty.com/')
.get('/versions')
.reply(404)
.get('/api/v1/gems/rails.json')
.reply(200, { ...railsInfo, name: 'oooops' });
httpMock
.scope('https://firstparty.com/')
.get('/basepath/versions')
.reply(404)
.get('/basepath/api/v1/gems/rails.json')
.reply(200);
expect(
await getPkgReleases({
versioning: rubyVersioning.id,
datasource: RubyGemsDatasource.id,
packageName: 'rails',
registryUrls: [
'https://thirdparty.com',
'https://firstparty.com/basepath/',
],
})
).toBeNull();
});
it('falls back to info when version request fails', async () => { it('falls back to info when version request fails', async () => {
httpMock httpMock
.scope('https://thirdparty.com/') .scope('https://thirdparty.com/')
......
...@@ -133,14 +133,6 @@ export class RubyGemsDatasource extends Datasource { ...@@ -133,14 +133,6 @@ export class RubyGemsDatasource extends Datasource {
return await this.getDependencyFallback(registryUrl, packageName); return await this.getDependencyFallback(registryUrl, packageName);
} }
if (info.packageName !== packageName) {
logger.warn(
{ lookup: packageName, returned: info.packageName },
'Lookup name does not match the returned name.'
);
return null;
}
let releases: Release[] | null = null; let releases: Release[] | null = null;
const gemVersions = await this.fetchGemVersions(registryUrl, packageName); const gemVersions = await this.fetchGemVersions(registryUrl, packageName);
if (gemVersions?.length) { if (gemVersions?.length) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment