Skip to content

Commit

Permalink
Release 1.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
AI committed Feb 6, 2018
1 parent 9a46873 commit c964840
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ organization := "org.jmotor.sbt"

name := "sbt-dependency-updates"

version := "1.1.0"
version := "1.1.1"

sbtPlugin := true

Expand Down
5 changes: 2 additions & 3 deletions src/main/scala/org/jmotor/sbt/Reporter.scala
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,8 @@ object Reporter {
Files.readAllLines(path).asScala
}
} match {
case Success(lines)
PluginParser.parseline(lines)
case Failure(_) Seq.empty[ModuleID]
case Success(lines) PluginParser.parseLine(lines)
case Failure(_) Seq.empty[ModuleID]
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/org/jmotor/sbt/util/PluginParser.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import sbt.ModuleID
object PluginParser {
private[this] val addSbtPluginRegex = """addSbtPlugin\("([\w\.-]+)" *%{1,2} *"([\w\.-]+)"\ *% *"([\w\.-]+)"\)""".r

def parseline(lines: Seq[String]): Seq[ModuleID] = {
def parseLine(lines: Seq[String]): Seq[ModuleID] = {
lines.map(_.trim).filter { line
line.nonEmpty && line.startsWith("addSbtPlugin")
}.flatMap {
Expand Down
6 changes: 3 additions & 3 deletions src/test/scala/org/jmotor/sbt/util/PluginParserSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class PluginParserSpec extends FunSpec with Matchers {
"""
|addSbtPlugin("org.jmotor.sbt" % "sbt-dependency-updates" % "1.1.0")
""".stripMargin.split("\n")
val found = PluginParser.parseline(lines).toList
val found = PluginParser.parseLine(lines).toList
found shouldBe Seq(ModuleID("org.jmotor.sbt", "sbt-dependency-updates", "1.1.0"))
}

Expand All @@ -26,7 +26,7 @@ class PluginParserSpec extends FunSpec with Matchers {
|
""".stripMargin.split("\n")

val found = PluginParser.parseline(lines).toList
val found = PluginParser.parseLine(lines).toList
found shouldBe Seq(
ModuleID("org.jmotor.sbt", "sbt-dependency-updates", "1.1.0"),
ModuleID("org.scalastyle", "scalastyle-sbt-plugin", "1.0.0"))
Expand All @@ -44,7 +44,7 @@ class PluginParserSpec extends FunSpec with Matchers {
|) else scala.collection.Seq.empty%
""".stripMargin.split("\n")

PluginParser.parseline(lines) shouldBe Seq(ModuleID("org.jetbrains", "sbt-idea-shell", "2017.2"))
PluginParser.parseLine(lines) shouldBe Seq(ModuleID("org.jetbrains", "sbt-idea-shell", "2017.2"))
}
}
}

0 comments on commit c964840

Please sign in to comment.