code: private Dependency createDependencyForGem(Engine engine, String parentName, String fileName, String filePath, String gem) throws IOException {
          final File gemFile;
          try {
              gemFile = File.createTempFile(gem, "_Gemfile.lock", getSettings().getTempDirectory());
          } catch (IOException ioe) {
              throw new IOException("Unable to create temporary gem file");
          }
          final String displayFileName = String.format("%s%c%s:%s", parentName, File.separatorChar, fileName, gem);
  
          FileUtils.write(gemFile, displayFileName, Charset.defaultCharset()); // unique contents to avoid dependency bundling
          final Dependency dependency = new Dependency(gemFile);
          dependency.setEcosystem(DEPENDENCY_ECOSYSTEM);
          dependency.addEvidence(EvidenceType.PRODUCT, "bundler-audit", "Name", gem, Confidence.HIGHEST);
          //TODO add package URL - note, this may require parsing the gemfile.lock and getting the version for each entry
          dependency.setDisplayFileName(displayFileName);
          dependency.setFileName(fileName);
          dependency.setFilePath(filePath);
          engine.addDependency(dependency);
          return dependency;
      }
docs: Creates the dependency based off of the gem.
  
  @param engine the engine used for scanning
  @param parentName the gem parent
  @param fileName the file name
  @param filePath the file path
  @param gem the gem name
  @return the dependency to add
  @throws IOException thrown if a temporary gem file could not be written