From cb3c8dc1531372bc035a9aeb7883db29c7351fd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20L=C3=B6vgren?= Date: Mon, 29 May 2017 12:41:48 +0100 Subject: [PATCH 1/2] Upgrade squants to 1.3.0 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index c31f70a8..d9735616 100644 --- a/build.sbt +++ b/build.sbt @@ -63,7 +63,7 @@ lazy val refinedJVM = refined.jvm lazy val squants = crossProject .in(file("modules/squants")) .settings(moduleName := "ciris-squants", name := "Ciris squants") - .settings(libraryDependencies += "org.typelevel" %%% "squants" % "1.2.0") + .settings(libraryDependencies += "org.typelevel" %%% "squants" % "1.3.0") .settings(scalaSettings) .settings(releaseSettings) .dependsOn(core) From 99321ddac3b6ea1ab6a905084519b5fc77a7b5b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20L=C3=B6vgren?= Date: Mon, 29 May 2017 12:42:33 +0100 Subject: [PATCH 2/2] Add support for MomentOfInertia, AngularAcceleration, Torque --- .../ciris/squants/readers/SquantsConfigReaders.scala | 9 +++++++++ .../ciris/squants/readers/SquantsConfigReadersSpec.scala | 3 +++ 2 files changed, 12 insertions(+) diff --git a/modules/squants/shared/src/main/scala/ciris/squants/readers/SquantsConfigReaders.scala b/modules/squants/shared/src/main/scala/ciris/squants/readers/SquantsConfigReaders.scala index 541b01c7..7dcf879e 100644 --- a/modules/squants/shared/src/main/scala/ciris/squants/readers/SquantsConfigReaders.scala +++ b/modules/squants/shared/src/main/scala/ciris/squants/readers/SquantsConfigReaders.scala @@ -83,11 +83,17 @@ trait SquantsConfigReaders { implicit val massConfigReader: ConfigReader[Mass] = fromTry("Mass")(Mass.apply) + implicit val momentOfInertiaConfigReader: ConfigReader[MomentOfInertia] = + fromTry("MomentOfInertia")(MomentOfInertia.apply) + import squants.motion._ implicit val accelerationConfigReader: ConfigReader[Acceleration] = fromTry("Acceleration")(Acceleration.apply) + implicit val angularAccelerationConfigReader: ConfigReader[AngularAcceleration] = + fromTry("AngularAcceleration")(AngularAcceleration.apply) + implicit val angularVelocityConfigReader: ConfigReader[AngularVelocity] = fromTry("AngularVelocity")(AngularVelocity.apply) @@ -109,6 +115,9 @@ trait SquantsConfigReaders { implicit val pressureChangeConfigReader: ConfigReader[PressureChange] = fromTry("PressureChange")(PressureChange.apply) + implicit val torqueConfigReader: ConfigReader[Torque] = + fromTry("Torque")(Torque.apply) + implicit val velocityConfigReader: ConfigReader[Velocity] = fromTry("Velocity")(Velocity.apply) diff --git a/tests/shared/src/test/scala/ciris/squants/readers/SquantsConfigReadersSpec.scala b/tests/shared/src/test/scala/ciris/squants/readers/SquantsConfigReadersSpec.scala index 69828c47..ad058c44 100644 --- a/tests/shared/src/test/scala/ciris/squants/readers/SquantsConfigReadersSpec.scala +++ b/tests/shared/src/test/scala/ciris/squants/readers/SquantsConfigReadersSpec.scala @@ -47,10 +47,12 @@ final class SquantsConfigReadersSpec extends PropertySpec with SquantsGenerators testDimension(ChemicalAmount, ChemicalAmount.apply) testDimension(Density, Density.apply) testDimension(Mass, Mass.apply) + testDimension(MomentOfInertia, MomentOfInertia.apply) import squants.motion._ testDimension(Acceleration, Acceleration.apply) + testDimension(AngularAcceleration, AngularAcceleration.apply) testDimension(AngularVelocity, AngularVelocity.apply) testDimension(Force, Force.apply) testDimension(Jerk, Jerk.apply) @@ -58,6 +60,7 @@ final class SquantsConfigReadersSpec extends PropertySpec with SquantsGenerators testDimension(Momentum, Momentum.apply) testDimension(Pressure, Pressure.apply) testDimension(PressureChange, PressureChange.apply) + testDimension(Torque, Torque.apply) testDimension(Velocity, Velocity.apply) testDimension(VolumeFlow, VolumeFlow.apply) testDimension(Yank, Yank.apply)