Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
edadma committed Aug 15, 2019
1 parent dc4f50c commit e532a1e
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 49 deletions.
44 changes: 4 additions & 40 deletions 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" )

Expand All @@ -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" )
Expand Down
2 changes: 1 addition & 1 deletion project/assembly.sbt
@@ -1 +1 @@
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.6")
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.10")
2 changes: 1 addition & 1 deletion project/build.properties
@@ -1 +1 @@
sbt.version=1.1.4
sbt.version=1.2.8
4 changes: 2 additions & 2 deletions project/plugins.sbt
Expand Up @@ -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")
addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.2.7")
10 changes: 5 additions & 5 deletions src/test/scala/Tests.scala
Expand Up @@ -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" )
}

}

0 comments on commit e532a1e

Please sign in to comment.