From a4f3c3f4a7b8b8f8e14770a3524a1b430ee4cefe Mon Sep 17 00:00:00 2001 From: Prabhu Subramanian Date: Tue, 14 Jan 2025 12:34:05 +0000 Subject: [PATCH] Tweaks to Ruby endpoints Signed-off-by: Prabhu Subramanian --- ci/Dockerfile | 2 +- ci/Dockerfile-bun | 2 +- ci/Dockerfile-deno | 2 +- ci/Dockerfile-ppc64 | 2 +- ci/base-images/opensuse/Dockerfile.lang | 2 +- ci/base-images/sle/Dockerfile.java17 | 2 +- ci/base-images/sle/Dockerfile.java17-slim | 2 +- contrib/lima/cdxgen-opensuse.yaml | 2 +- contrib/lima/cdxgen-ubuntu.yaml | 2 +- lib/evinser/evinser.js | 8 ++++++++ 10 files changed, 17 insertions(+), 9 deletions(-) diff --git a/ci/Dockerfile b/ci/Dockerfile index 1ee6a2852b..cd14e93910 100644 --- a/ci/Dockerfile +++ b/ci/Dockerfile @@ -19,7 +19,7 @@ ARG SWIFT_WEBROOT=https://download.swift.org ARG JAVA_VERSION=23.0.1-tem ARG SBT_VERSION=1.10.7 ARG MAVEN_VERSION=3.9.9 -ARG GRADLE_VERSION=8.11 +ARG GRADLE_VERSION=8.12 ARG GO_VERSION=1.23.4 ARG NODE_VERSION=23.6.0 ARG PYTHON_VERSION=3.12 diff --git a/ci/Dockerfile-bun b/ci/Dockerfile-bun index c047dc21e7..c675d7a632 100644 --- a/ci/Dockerfile-bun +++ b/ci/Dockerfile-bun @@ -19,7 +19,7 @@ ARG SWIFT_WEBROOT=https://download.swift.org ARG JAVA_VERSION=23.0.1-tem ARG SBT_VERSION=1.10.7 ARG MAVEN_VERSION=3.9.9 -ARG GRADLE_VERSION=8.11 +ARG GRADLE_VERSION=8.12 ARG GO_VERSION=1.23.4 ARG PYTHON_VERSION=3.12 diff --git a/ci/Dockerfile-deno b/ci/Dockerfile-deno index f8b006c25c..1ed3c82de3 100644 --- a/ci/Dockerfile-deno +++ b/ci/Dockerfile-deno @@ -19,7 +19,7 @@ ARG SWIFT_WEBROOT=https://download.swift.org ARG JAVA_VERSION=23.0.1-tem ARG SBT_VERSION=1.10.7 ARG MAVEN_VERSION=3.9.9 -ARG GRADLE_VERSION=8.11 +ARG GRADLE_VERSION=8.12 ARG GO_VERSION=1.23.4 ARG PYTHON_VERSION=3.12 ARG RUBY_VERSION=3.4.1 diff --git a/ci/Dockerfile-ppc64 b/ci/Dockerfile-ppc64 index 7b77fffd7c..c33594cdf6 100644 --- a/ci/Dockerfile-ppc64 +++ b/ci/Dockerfile-ppc64 @@ -13,7 +13,7 @@ LABEL maintainer="cyclonedx" \ ARG SBT_VERSION=1.10.7 ARG MAVEN_VERSION=3.9.9 -ARG GRADLE_VERSION=8.11 +ARG GRADLE_VERSION=8.12 ARG GO_VERSION=1.23.4 ARG PYTHON_VERSION=3.12 diff --git a/ci/base-images/opensuse/Dockerfile.lang b/ci/base-images/opensuse/Dockerfile.lang index 4e192a0c3d..8d1731052d 100644 --- a/ci/base-images/opensuse/Dockerfile.lang +++ b/ci/base-images/opensuse/Dockerfile.lang @@ -2,7 +2,7 @@ FROM opensuse/tumbleweed:latest ARG MAVEN_VERSION=4.0.0-beta-4 ARG SBT_VERSION=1.10.2 -ARG GRADLE_VERSION=8.11 +ARG GRADLE_VERSION=8.12 ARG DOTNET_SDK_VERSION=9.0.100 ENV SBT_VERSION=$SBT_VERSION \ diff --git a/ci/base-images/sle/Dockerfile.java17 b/ci/base-images/sle/Dockerfile.java17 index 33bb5b7f35..a83ed9c7ed 100644 --- a/ci/base-images/sle/Dockerfile.java17 +++ b/ci/base-images/sle/Dockerfile.java17 @@ -2,7 +2,7 @@ FROM registry.suse.com/bci/openjdk-devel:17 ARG SBT_VERSION=1.10.7 ARG MAVEN_VERSION=3.9.9 -ARG GRADLE_VERSION=8.11 +ARG GRADLE_VERSION=8.12 ARG GCC_VERSION=13 ENV SBT_VERSION=$SBT_VERSION \ diff --git a/ci/base-images/sle/Dockerfile.java17-slim b/ci/base-images/sle/Dockerfile.java17-slim index 7b60bd011a..b2c37f282b 100644 --- a/ci/base-images/sle/Dockerfile.java17-slim +++ b/ci/base-images/sle/Dockerfile.java17-slim @@ -2,7 +2,7 @@ FROM registry.suse.com/bci/openjdk-devel:17 ARG SBT_VERSION=1.10.7 ARG MAVEN_VERSION=3.9.9 -ARG GRADLE_VERSION=8.11 +ARG GRADLE_VERSION=8.12 ENV SBT_VERSION=$SBT_VERSION \ MAVEN_VERSION=$MAVEN_VERSION \ diff --git a/contrib/lima/cdxgen-opensuse.yaml b/contrib/lima/cdxgen-opensuse.yaml index 3f05a8589c..83e215c87c 100644 --- a/contrib/lima/cdxgen-opensuse.yaml +++ b/contrib/lima/cdxgen-opensuse.yaml @@ -49,7 +49,7 @@ provision: set -e -o pipefail export MAVEN_VERSION=3.9.9 export SBT_VERSION=1.10.7 - export GRADLE_VERSION=8.11 + export GRADLE_VERSION=8.12 export MAVEN_HOME="/.sdkman/candidates/maven/${MAVEN_VERSION}" export GRADLE_HOME="/.sdkman/candidates/gradle/${GRADLE_VERSION}" export SBT_HOME="/.sdkman/candidates/sbt/${SBT_VERSION}" diff --git a/contrib/lima/cdxgen-ubuntu.yaml b/contrib/lima/cdxgen-ubuntu.yaml index ad68ce27bf..3b8f905435 100644 --- a/contrib/lima/cdxgen-ubuntu.yaml +++ b/contrib/lima/cdxgen-ubuntu.yaml @@ -43,7 +43,7 @@ provision: set -e -o pipefail export MAVEN_VERSION=3.9.9 export SBT_VERSION=1.10.7 - export GRADLE_VERSION=8.11 + export GRADLE_VERSION=8.12 export MAVEN_HOME="/.sdkman/candidates/maven/${MAVEN_VERSION}" export GRADLE_HOME="/.sdkman/candidates/gradle/${GRADLE_VERSION}" export SBT_HOME="/.sdkman/candidates/sbt/${SBT_VERSION}" diff --git a/lib/evinser/evinser.js b/lib/evinser/evinser.js index e8e8b04fc5..e3591e7a2e 100644 --- a/lib/evinser/evinser.js +++ b/lib/evinser/evinser.js @@ -1163,6 +1163,8 @@ export function extractEndpoints(language, code) { case "rb": { let urlPrefix = ""; let urlSuffix = ""; + // Remove the ellipsis added by the frontend + code = code.replaceAll("...", ""); if (code.includes("namespace ")) { urlPrefix = code.split("namespace ").pop().split(" ")[0]; } @@ -1182,6 +1184,12 @@ export function extractEndpoints(language, code) { `${urlPrefix.replace(/['"]/g, "")}${urlSuffix.replace(/['"]/g, "")}`, ); } + endpoints = + endpoints && Array.isArray(endpoints) + ? endpoints.filter( + (u) => u.length > 1 && !u.startsWith(".") && u !== "https:/", + ) + : endpoints; break; } default: