Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to Play 2.4.3 #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ scalaVersion := "2.11.0"
crossScalaVersions := Seq("2.10.4", "2.11.0")

libraryDependencies ++= Seq(
"com.typesafe.play" %% "play-json" % "2.3.1" ,
"com.typesafe.play" %% "play-json" % "2.4.3" ,
"org.specs2" %% "specs2" % "2.3.12" % "test",
"junit" % "junit" % "4.8" % "test"
)
Expand Down
4 changes: 2 additions & 2 deletions src/main/scala/JsZipperNode.scala
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ object Node {
val empty = Node.Empty

case object Empty extends Node {
override val value = JsUndefined("undef")
override val value = JsNull
}

case class Error(error: (JsPath, String)) extends Node {
override val value = JsUndefined("error")
override val value = JsNull
}

def apply(key: String, value: JsValue): Node = KeyNode(key, value)
Expand Down
6 changes: 3 additions & 3 deletions src/test/scala/JsExtensionsSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ class JsExtensionsSpec extends Specification {
"update one path" in {
js.update(
(__ \ "key4")(3) \ "key411",
{ js => val JsString(str) = js \ "key4111"; JsString(str+"123") }
{ js => val JsString(str) = (js \ "key4111").get; JsString(str+"123") }
) must beEqualTo(
Json.obj(
"key1" -> Json.obj(
Expand All @@ -256,7 +256,7 @@ class JsExtensionsSpec extends Specification {
"update path not found" in {
js.update(
(__ \ "key5"),
{ js => val JsString(str) = js \ "key4111"; JsString(str+"123") }
{ js => val JsString(str) = (js \ "key4111").get; JsString(str+"123") }
) must beEqualTo(js)
}

Expand All @@ -275,7 +275,7 @@ class JsExtensionsSpec extends Specification {
)
)
obj.updateAllKeyNodes{
case ((_ \ "_id"), value) => ("id" -> value \ "$oid")
case ((_ \ "_id"), value) => ("id" -> (value \ "$oid").get)
} must beEqualTo(
Json.obj(
"id" -> "1234",
Expand Down