Skip to content

Commit

Permalink
branch merging 2.8.x (b5d2a1a) (#397)
Browse files Browse the repository at this point in the history
branch merging 2.8.x (b5d2a1a)
  • Loading branch information
octonato authored Jan 6, 2020
2 parents 1b53bd3 + 1387409 commit b439a28
Show file tree
Hide file tree
Showing 16 changed files with 57 additions and 18 deletions.
12 changes: 12 additions & 0 deletions .mergify.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
pull_request_rules:

- name: Merge ScalaSteward's PRs that are ready
conditions:
- author=scala-steward
- status-success=Travis CI - Pull Request
- "#review-requested=0"
- "#changes-requested-reviews-by=0"
- label!=status:block-merge
actions:
merge:
method: merge

- name: Merge PRs that are ready
conditions:
- status-success=Travis CI - Pull Request
Expand Down
9 changes: 5 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,11 @@ lazy val `play-json` = crossProject(JVMPlatform, JSPlatform)
.settings(
commonSettings ++ playJsonMimaSettings ++ Seq(
libraryDependencies ++= jsonDependencies(scalaVersion.value) ++ Seq(
"org.scalatest" %%% "scalatest" % "3.0.8" % Test,
"org.scalacheck" %%% "scalacheck" % "1.14.2" % Test,
"com.chuusai" %% "shapeless" % "2.3.3" % Test,
"org.scala-lang" % "scala-compiler" % scalaVersion.value % "provided"
"org.scalatest" %%% "scalatest" % "3.1.0" % Test,
"org.scalatestplus" %%% "scalacheck-1-14" % "3.1.0.0" % Test,
"org.scalacheck" %%% "scalacheck" % "1.14.3" % Test,
"com.chuusai" %% "shapeless" % "2.3.3" % Test,
"org.scala-lang" % "scala-compiler" % scalaVersion.value % "provided"
),
libraryDependencies ++=
(CrossVersion.partialVersion(scalaVersion.value) match {
Expand Down
4 changes: 3 additions & 1 deletion play-json/js/src/test/scala/JsonSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ package play.api.libs.json
import play.api.libs.json.Json._

import org.scalatest._
import org.scalatest.matchers.must.Matchers
import org.scalatest.wordspec.AnyWordSpec

class JsonSpec extends WordSpec with MustMatchers {
class JsonSpec extends AnyWordSpec with Matchers {
"Complete JSON should create full object" when {
"lose precision when parsing BigDecimals" in {
val n = BigDecimal("12345678901234567890.123456789")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ package play.api.libs.json
import play.api.libs.json.Json._

import org.scalatest._
import org.scalatest.matchers.must.Matchers
import org.scalatest.wordspec.AnyWordSpec

class JsObjectSpec extends WordSpec with MustMatchers {
class JsObjectSpec extends AnyWordSpec with Matchers {
"JsObject.deepMerge" should {
"not fail when the objects are empty" in {
Json.obj().deepMerge(Json.obj()).mustEqual(Json.obj())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ package play.api.libs.json
import play.api.libs.json.Json._

import org.scalatest._
import org.scalatest.matchers.must.Matchers
import org.scalatest.wordspec.AnyWordSpec

class JsPathSpec extends WordSpec with MustMatchers {
class JsPathSpec extends AnyWordSpec with Matchers {
"JsPath" should {
"retrieve simple path" in {
val obj = Json.obj("key1" -> Json.obj("key11" -> "value11"), "key2" -> "value2")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ import play.api.libs.functional.Functor
import JsResult.functorJsResult

import org.scalatest._
import org.scalatest.matchers.must.Matchers
import org.scalatest.wordspec.AnyWordSpec

class JsResultSpec extends WordSpec with MustMatchers {
class JsResultSpec extends AnyWordSpec with Matchers {
"JSON Result" should {
"be functor" in {
val jsres = JsSuccess("jsStr")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import play.api.libs.json.JsonNaming.SnakeCase
import play.api.libs.json.Json._

import org.scalatest._
import org.scalatest.matchers.must.Matchers
import org.scalatest.wordspec.AnyWordSpec

case class User(age: Int, name: String)
case class Dog(name: String, master: User)
Expand Down Expand Up @@ -121,7 +123,7 @@ case class WithDefaultSnake(firstProp: String, defaultProp: String = "the defaul
case class Optional(props: Option[String])
case class OptionalWithDefault(props: Option[String] = None)

class JsonExtensionSpec extends WordSpec with MustMatchers {
class JsonExtensionSpec extends AnyWordSpec with Matchers {
"JsonExtension" should {
"create a reads[User]" in {
import play.api.libs.json.Json
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ package play.api.libs.json
import play.api.libs.json.Json._

import org.scalatest._
import org.scalatest.matchers.must.Matchers
import org.scalatest.wordspec.AnyWordSpec

class JsonRichSpec extends WordSpec with MustMatchers {
class JsonRichSpec extends AnyWordSpec with Matchers {
"JSON" should {
"create json with rich syntax" in {
def js = Json.obj(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ import scala.collection.immutable.ListMap

import org.scalatest._
import org.scalacheck.Gen
import org.scalatest.matchers.must.Matchers
import org.scalatest.wordspec.AnyWordSpec

class JsonSharedSpec extends WordSpec with MustMatchers with org.scalatestplus.scalacheck.ScalaCheckPropertyChecks {
class JsonSharedSpec extends AnyWordSpec with Matchers with org.scalatestplus.scalacheck.ScalaCheckPropertyChecks {
case class User(id: Long, name: String, friends: List[User])

implicit val UserFormat: Format[User] = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ import play.api.libs.json.Reads._
import play.api.libs.functional.syntax._

import org.scalatest._
import org.scalatest.matchers.must.Matchers
import org.scalatest.wordspec.AnyWordSpec

class JsonTransSpec extends WordSpec with MustMatchers {
class JsonTransSpec extends AnyWordSpec with Matchers {
"JSON transformers " should {
val js = Json.obj(
"field1" -> "alpha",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ import play.api.libs.json.Json._
import play.api.libs.functional.syntax._

import org.scalatest._
import org.scalatest.matchers.must.Matchers
import org.scalatest.wordspec.AnyWordSpec

class JsonValidSharedSpec extends WordSpec with MustMatchers {
class JsonValidSharedSpec extends AnyWordSpec with Matchers {
"JSON reads" should {
"validate simple types" in {
JsString("string").validate[String].mustEqual(JsSuccess("string"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

package play.api.libs.json

import org.scalatest.matchers.must.Matchers
import org.scalatest.wordspec.AnyWordSpec
object TestFormats {
implicit def eitherReads[A: Reads, B: Reads] = Reads[Either[A, B]] { js =>
implicitly[Reads[A]].reads(js) match {
Expand Down Expand Up @@ -35,7 +37,7 @@ final class TextId(val value: String) extends AnyVal
import org.scalatest._
import org.scalacheck.Gen

class MacroSpec extends WordSpec with MustMatchers with org.scalatestplus.scalacheck.ScalaCheckPropertyChecks {
class MacroSpec extends AnyWordSpec with Matchers with org.scalatestplus.scalacheck.ScalaCheckPropertyChecks {
"Reads" should {
"be generated for simple case class" in {
val json = Json.obj("bar" -> "lorem")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ import java.math.BigInteger
import java.net.URI

import org.scalatest._
import org.scalatest.matchers.must.Matchers
import org.scalatest.wordspec.AnyWordSpec

class ReadsSharedSpec extends WordSpec with MustMatchers {
class ReadsSharedSpec extends AnyWordSpec with Matchers {
"Reads" should {
"not repath the second result on flatMap" when {
val aPath = JsPath \ "a"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
package play.api.libs.json

import org.scalatest._
import org.scalatest.matchers.must.Matchers
import org.scalatest.wordspec.AnyWordSpec

final class TupleSpec extends WordSpec with MustMatchers {
final class TupleSpec extends AnyWordSpec with Matchers {
"Reading/Write tuples" should {
def check[T: Reads: Writes](value: T, expected: String) = {
Json.stringify(Json.toJson(value)).mustEqual(expected)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
package play.api.libs.json

import org.scalatest._
import org.scalatest.matchers.must.Matchers
import org.scalatest.wordspec.AnyWordSpec

class WritesSharedSpec extends WordSpec with MustMatchers {
class WritesSharedSpec extends AnyWordSpec with Matchers {
"Functional Writes" should {
implicit val locationWrites = Writes[Location] { location =>
Json.obj(
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.3.6
sbt.version=1.3.6

0 comments on commit b439a28

Please # to comment.