Skip to content

Commit

Permalink
Bump iglu-core-circe to 1.0.0 (close #98)
Browse files Browse the repository at this point in the history
  • Loading branch information
chuwy committed May 14, 2020
1 parent 9cad7e2 commit 6504cde
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 15 deletions.
3 changes: 1 addition & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ lazy val root = project.in(file("."))
version := "1.0.0",
description := "Scala analytics SDK for Snowplow",
scalaVersion := "2.12.8",
crossScalaVersions := Seq("2.11.12", "2.12.8")
crossScalaVersions := Seq("2.12.8")
))
.enablePlugins(SiteScaladocPlugin)
.enablePlugins(GhpagesPlugin)
Expand All @@ -38,7 +38,6 @@ lazy val root = project.in(file("."))
Dependencies.cats,
Dependencies.circeParser,
Dependencies.circeGeneric,
Dependencies.circeJava,
Dependencies.s3,
Dependencies.dynamodb,
// Scala (test only)
Expand Down
7 changes: 3 additions & 4 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ import sbt._
object Dependencies {

object V {
val igluCore = "0.5.1"
val cats = "1.6.0"
val circe = "0.11.1"
val igluCore = "1.0.0"
val cats = "2.1.1"
val circe = "0.13.0"
val aws = "1.11.490"
// Scala (test only)
val specs2 = "4.4.1"
Expand All @@ -27,7 +27,6 @@ object Dependencies {
val cats = "org.typelevel" %% "cats-core" % V.cats
val circeParser = "io.circe" %% "circe-parser" % V.circe
val circeGeneric = "io.circe" %% "circe-generic" % V.circe
val circeJava = "io.circe" %% "circe-java8" % V.circe
val s3 = "com.amazonaws" % "aws-java-sdk-s3" % V.aws
val dynamodb = "com.amazonaws" % "aws-java-sdk-dynamodb" % V.aws
// Scala (test only)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,14 @@ import java.time.Instant
import java.util.UUID

// circe
import io.circe.{Encoder, Json, JsonObject, ObjectEncoder, Decoder}
import io.circe.{Encoder, Json, JsonObject, Decoder}
import io.circe.Json.JString
import io.circe.generic.semiauto._
import io.circe.syntax._
import io.circe.java8.time._

// iglu
import com.snowplowanalytics.iglu.core.SelfDescribingData
import com.snowplowanalytics.iglu.core.circe.instances._
import com.snowplowanalytics.iglu.core.circe.implicits._

// This library
import com.snowplowanalytics.snowplow.analytics.scalasdk.decode.{Parser, DecodeResult}
Expand Down Expand Up @@ -239,7 +238,7 @@ object Event {
/**
* Automatically derived Circe encoder
*/
implicit val jsonEncoder: ObjectEncoder[Event] = deriveEncoder[Event]
implicit val jsonEncoder: Encoder.AsObject[Event] = deriveEncoder[Event]

implicit def eventDecoder: Decoder[Event] = deriveDecoder[Event]

Expand Down Expand Up @@ -270,4 +269,4 @@ object Event {
None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None,
None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None, None,
Contexts(Nil), None, None, None, None, None, None, None, None)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import cats.syntax.show._

// iglu
import com.snowplowanalytics.iglu.core.SelfDescribingData
import com.snowplowanalytics.iglu.core.circe.instances._
import com.snowplowanalytics.iglu.core.circe.implicits._

// circe
import io.circe.parser.{parse => parseJson}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,7 @@ class EventSpec extends Specification {
"event_version": "1-0-0",
"event_fingerprint": "e3dbfa9cca0412c3d4052863cefb547f",
"true_tstamp": "2013-11-26T00:03:57.886Z"
}""").right.getOrElse(throw new RuntimeException("Failed to parse expected JSON"))
}""").getOrElse(throw new RuntimeException("Failed to parse expected JSON"))

// JSON output must be equal to output from the old transformer. (NB: field ordering in new JSON will be randomized)
eventJson mustEqual expectedJson
Expand Down Expand Up @@ -1131,7 +1131,7 @@ class EventSpec extends Specification {
"event_version": "1-0-0",
"event_fingerprint": "e3dbfa9cca0412c3d4052863cefb547f",
"true_tstamp": "2013-11-26T00:03:57.886Z"
}""").right.getOrElse(throw new RuntimeException("Failed to parse expected JSON"))
}""").getOrElse(throw new RuntimeException("Failed to parse expected JSON"))

// JSON output must be equal to output from the old transformer. (NB: field ordering in new JSON will be randomized)
eventJson mustEqual expectedJson
Expand Down Expand Up @@ -1662,7 +1662,7 @@ class EventSpec extends Specification {
"event_version": "1-0-0",
"event_fingerprint": "e3dbfa9cca0412c3d4052863cefb547f",
"true_tstamp": "2013-11-26T00:03:57.886Z"
}""").right.getOrElse(throw new RuntimeException("Failed to parse expected JSON"))
}""").getOrElse(throw new RuntimeException("Failed to parse expected JSON"))

// JSON output must be equal to output from the old transformer. (NB: field ordering in new JSON will be randomized)
eventJson mustEqual expectedJson
Expand Down

0 comments on commit 6504cde

Please sign in to comment.