From a53b05609820bce8c26213121ea306ad6e5b677c Mon Sep 17 00:00:00 2001 From: Korbinian Singhammer Date: Wed, 20 Jan 2021 03:40:05 -0500 Subject: [PATCH] Bundler: Remove redundant functions Closes #3309. Signed-off-by: Korbinian Singhammer --- analyzer/src/main/kotlin/managers/Bundler.kt | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/analyzer/src/main/kotlin/managers/Bundler.kt b/analyzer/src/main/kotlin/managers/Bundler.kt index 21d50986c2c04..50b61fc61b458 100644 --- a/analyzer/src/main/kotlin/managers/Bundler.kt +++ b/analyzer/src/main/kotlin/managers/Bundler.kt @@ -232,16 +232,6 @@ class Bundler( gemSpecs[gemspecFile.nameWithoutExtension] } ?: GemSpec(workingDir.name, "", "", sortedSetOf(), "", emptySet(), VcsInfo.EMPTY, RemoteArtifact.EMPTY) - private fun getGemspec(gemName: String, workingDir: File): GemSpec { - val spec = run( - "exec", "gem", "specification", gemName, - workingDir = workingDir, - environment = mapOf("BUNDLE_PATH" to "vendor/bundle") - ).stdout - - return GemSpec.createFromYaml(spec) - } - private fun getPackageFromGemspec(gemSpec: GemSpec): Package { val gemId = Identifier("Gem", "", gemSpec.name, gemSpec.version) @@ -260,14 +250,6 @@ class Bundler( private fun getGemspecFile(workingDir: File) = workingDir.walk().maxDepth(1).filter { it.isFile && it.extension == "gemspec" }.firstOrNull() - private fun installDependencies(workingDir: File) { - requireLockfile(workingDir) { workingDir.resolve("Gemfile.lock").isFile } - - // Work around "--path" being deprecated since Bundler 2.1 and avoid tampering with the ".bundle/config" file at - // all by using the "BUNDLER_PATH" environment variable to specify where to install the Gems to. - run("install", workingDir = workingDir, environment = mapOf("BUNDLE_PATH" to "vendor/bundle")) - } - private fun queryRubygems(name: String, version: String, retryCount: Int = 3): GemSpec? { // See http://guides.rubygems.org/rubygems-org-api-v2/. val request = Request.Builder()