From e532a1e3dced03b47836db352ff68ff2a2cd4c89 Mon Sep 17 00:00:00 2001 From: "Edward A Maxedon, Sr" Date: Wed, 14 Aug 2019 22:31:08 -0400 Subject: [PATCH] update --- build.sbt | 44 ++++---------------------------------- project/assembly.sbt | 2 +- project/build.properties | 2 +- project/plugins.sbt | 4 ++-- src/test/scala/Tests.scala | 10 ++++----- 5 files changed, 13 insertions(+), 49 deletions(-) diff --git a/build.sbt b/build.sbt index f7aab19..dc4aad2 100644 --- a/build.sbt +++ b/build.sbt @@ -1,10 +1,8 @@ name := "strftime" -version := "0.2.3" +version := "0.3" -scalaVersion := "2.12.6" - -//crossScalaVersions := Seq( "2.11.11" ) +scalaVersion := "2.13.0" scalacOptions ++= Seq( "-deprecation", "-feature", "-unchecked", "-language:postfixOps", "-language:implicitConversions", "-language:existentials" ) @@ -17,42 +15,8 @@ resolvers += "Typesafe Repository" at "http://repo.typesafe.com/typesafe/release resolvers += "Hyperreal Repository" at "https://dl.bintray.com/edadma/maven" libraryDependencies ++= Seq( - "org.scalatest" %% "scalatest" % "3.0.0" % "test", - "org.scalacheck" %% "scalacheck" % "1.13.4" % "test" -) - -libraryDependencies ++= Seq( -// "org.scala-lang.modules" %% "scala-parser-combinators" % "1.0.6", -// "org.scala-lang.modules" %% "scala-xml" % "1.0.6" -// "org.scala-lang.modules" %% "scala-swing" % "2.0.0" -) - -//libraryDependencies ++= Seq( -// "com.typesafe" % "config" % "1.3.1" -//) - -libraryDependencies ++= { - val akkaV = "2.5.11" - Seq( -// "com.typesafe.akka" %% "akka-actor" % akkaV -// "com.typesafe.akka" %% "akka-remote" % akkaV, -// "com.typesafe.akka" %% "akka-testkit" % akkaV % "test", -// "org.specs2" %% "specs2-core" % "2.3.11" % "test" - ) -} - -//libraryDependencies ++= { -// val akka_http = "10.0.11" -// Seq( -// "com.typesafe.akka" %% "akka-http-core" % akka_http, -// "com.typesafe.akka" %% "akka-http" % akka_http, -// "com.typesafe.akka" %% "akka-http-testkit" % akka_http, -// "com.typesafe.akka" %% "akka-http-spray-json" % akka_http, -// "com.typesafe.akka" %% "akka-http-jackson" % akka_http -// ) -//} - -libraryDependencies ++= Seq( + "org.scalatest" %% "scalatest" % "3.0.8" % "test", + "org.scalacheck" %% "scalacheck" % "1.14.0" % "test" ) mainClass in (Compile, run) := Some( "xyz.hyperreal." + name.value.replace('-', '_') + ".Main" ) diff --git a/project/assembly.sbt b/project/assembly.sbt index 09c90ca..c9c0554 100644 --- a/project/assembly.sbt +++ b/project/assembly.sbt @@ -1 +1 @@ -addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.6") \ No newline at end of file +addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.10") \ No newline at end of file diff --git a/project/build.properties b/project/build.properties index 64cf32f..1fc4b80 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.1.4 +sbt.version=1.2.8 \ No newline at end of file diff --git a/project/plugins.sbt b/project/plugins.sbt index 1edb51e..182e1eb 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -2,6 +2,6 @@ addSbtPlugin("io.spray" % "sbt-revolver" % "0.9.1") addSbtPlugin("org.foundweekends" % "sbt-bintray" % "0.5.3") -addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.5.1") +addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.0") -addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.2.2") \ No newline at end of file +addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.2.7") \ No newline at end of file diff --git a/src/test/scala/Tests.scala b/src/test/scala/Tests.scala index c26f0bb..08948aa 100644 --- a/src/test/scala/Tests.scala +++ b/src/test/scala/Tests.scala @@ -3,18 +3,18 @@ package xyz.hyperreal.strftime import java.time.{LocalDateTime, OffsetDateTime} import org.scalatest._ -import prop.PropertyChecks +import org.scalatestplus.scalacheck.ScalaCheckPropertyChecks -class Tests extends FreeSpec with PropertyChecks with Matchers { +class Tests extends FreeSpec with ScalaCheckPropertyChecks with Matchers { "formatting" in { - Strftime.format( "%c", OffsetDateTime.parse("2018-05-09T13:09:49.721-04:00") ) shouldBe "Wednesday, May 9, 2018 1:09:49 PM" - Strftime.format( "%a, %d %b %Y %T %z", OffsetDateTime.parse("2018-05-09T13:09:49.721-04:00") ) shouldBe "Wed, 09 May 2018 13:09:49 -0400" + Strftime.format( "%c", OffsetDateTime.parse("2018-05-09T13:09:49.721-04:00") ) shouldBe "Wednesday, May 9, 2018, 1:09:49 p.m." + Strftime.format( "%a, %d %b %Y %T %z", OffsetDateTime.parse("2018-05-09T13:09:49.721-04:00") ) shouldBe "Wed., 09 May 2018 13:09:49 -0400" } "parsing" in { - LocalDateTime.parse( "Wednesday, May 9, 2018 1:09:49 PM", Strftime.convert("%c") ) shouldBe LocalDateTime.parse( "2018-05-09T13:09:49" ) + LocalDateTime.parse( "Wednesday, May 9, 2018, 1:09:49 p.m.", Strftime.convert("%c") ) shouldBe LocalDateTime.parse( "2018-05-09T13:09:49" ) } } \ No newline at end of file