mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-01-13 23:33:37 +01:00
Merge branch 'ruby_dependency' into swift_support
This commit is contained in:
@@ -103,8 +103,21 @@ public class RubyBundlerAnalyzer extends RubyGemspecAnalyzer {
|
||||
|
||||
if(matchingFiles.length > 0) {
|
||||
String gemPath = matchingFiles[0].getAbsolutePath();
|
||||
if(gemPath != null)
|
||||
dependency.setPackagePath(gemPath);
|
||||
if(dependency.getActualFilePath().equals(dependency.getFilePath())) {
|
||||
if(gemPath != null)
|
||||
dependency.setPackagePath(gemPath);
|
||||
} else {
|
||||
//.gemspec's actualFilePath and filePath are different when it's from a compressed file
|
||||
//in which case actualFilePath is the temp directory used by decompression.
|
||||
//packagePath should use the filePath of the identified gem file in "gems" folder
|
||||
File gemspecStub = new File(dependency.getFilePath());
|
||||
File specDir = gemspecStub.getParentFile();
|
||||
if(specDir != null && specDir.getName().equals(SPECIFICATIONS)) {
|
||||
File gemsDir2 = new File(specDir.getParentFile(), GEMS);
|
||||
File packageDir = new File(gemsDir2, gemName);
|
||||
dependency.setPackagePath(packageDir.getAbsolutePath());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user