From bad8b420e9757830ae09d2bc1f8d5872b6979f3a Mon Sep 17 00:00:00 2001 From: prabhu Date: Wed, 3 Jan 2024 22:42:39 +0000 Subject: [PATCH] Ignore remote: prefix in gemfile (#801) Signed-off-by: Prabhu Subramanian --- test/data/Gemfile.lock | 4 +++- utils.js | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/test/data/Gemfile.lock b/test/data/Gemfile.lock index c4445733ce..f6e90473df 100644 --- a/test/data/Gemfile.lock +++ b/test/data/Gemfile.lock @@ -1,3 +1,6 @@ +PATH + remote: test/assets/test-gem + GEM remote: https://rubygems.org/ specs: @@ -395,4 +398,3 @@ RUBY VERSION BUNDLED WITH 1.17.3 - \ No newline at end of file diff --git a/utils.js b/utils.js index af68e9e252..522c6866d1 100644 --- a/utils.js +++ b/utils.js @@ -4059,6 +4059,9 @@ export const parseGemfileLockData = async function (gemLockData) { const tmpA = l.split(" "); if (tmpA && tmpA.length == 2) { const name = tmpA[0]; + if (name === "remote:") { + return; + } if (!pkgnames[name]) { let version = tmpA[1].split(", ")[0]; version = version.replace(/[(>=<)~ ]/g, ""); @@ -4077,7 +4080,8 @@ export const parseGemfileLockData = async function (gemLockData) { l === "PLATFORMS" || l === "DEPENDENCIES" || l === "RUBY VERSION" || - l === "BUNDLED WITH" + l === "BUNDLED WITH" || + l === "PATH" ) { specsFound = false; }