All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.backuity.puppet.ModuleAnalyzer.scala Maven / Gradle / Ivy

package org.backuity.puppet

import java.io.File
import java.nio.file.Path

class ModuleAnalyzer(git : Git)(implicit log: Logger) {

  def analyze(modulePath: Path) : Set[LocalModule] = {
    val modules : Set[File] = modulePath.toFile.listFiles() match {
      case null => Set.empty
      case array => array.toSet
    }
    for (module <- modules if module.isDirectory && git.isGit(module.toPath)) yield {
      LocalModule(module.getName, git.currentRef(module.toPath), git.isDirty(module.toPath), None)
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy