mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-22 09:09:31 +01:00
fix RubyBundlerAnalyzer.accept
This commit is contained in:
@@ -55,6 +55,16 @@ public class RubyBundlerAnalyzer extends RubyGemspecAnalyzer {
|
||||
//Folder name that contains the gems by "bundle install"
|
||||
private static final String GEMS = "gems";
|
||||
|
||||
/**
|
||||
* Returns the name of the analyzer.
|
||||
*
|
||||
* @return the name of the analyzer.
|
||||
*/
|
||||
@Override
|
||||
public String getName() {
|
||||
return ANALYZER_NAME;
|
||||
}
|
||||
|
||||
/**
|
||||
* Only accept *.gemspec files generated by "bundle install --deployment" under "specifications" folder.
|
||||
*/
|
||||
@@ -64,7 +74,7 @@ public class RubyBundlerAnalyzer extends RubyGemspecAnalyzer {
|
||||
boolean accepted = super.accept(pathname);
|
||||
if(accepted == true) {
|
||||
File parentDir = pathname.getParentFile();
|
||||
accepted = parentDir != null && parentDir.exists() && parentDir.getName().equals(SPECIFICATIONS);
|
||||
accepted = parentDir != null && parentDir.getName().equals(SPECIFICATIONS);
|
||||
}
|
||||
|
||||
return accepted;
|
||||
|
||||
Reference in New Issue
Block a user