Skip to content

Commit

Permalink
Release v0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
OlegIlyenko committed Mar 24, 2016
1 parent 9761c6c commit c1f8908
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 8 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## v0.3.0 (2016-03-24)

* Updated to sangria-marshalling-api v0.2.0

## v0.2.0 (2016-02-28)

* Added support for `EncodeJson`/`DecodeJson`. This provides `ToInput` and `FromInput` instances for arbitrary tuples, case classes, etc. as long
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
SBT Configuration:

```scala
libraryDependencies += "org.sangria-graphql" %% "sangria-argonaut" % "0.2.0"
libraryDependencies += "org.sangria-graphql" %% "sangria-argonaut" % "0.3.0"
```

## License
Expand Down
8 changes: 4 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
name := "sangria-argonaut"
organization := "org.sangria-graphql"
version := "0.3.0-SNAPSHOT"
version := "0.3.0"

description := "Sangria argonaut marshalling"
homepage := Some(url("http://sangria-graphql.org"))
licenses := Seq("Apache License, ASL Version 2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0"))

scalaVersion := "2.11.7"
scalaVersion := "2.11.8"
scalacOptions ++= Seq("-deprecation", "-feature")

libraryDependencies ++= Seq(
"org.sangria-graphql" %% "sangria-marshalling-api" % "0.1.1",
"org.sangria-graphql" %% "sangria-marshalling-api" % "0.2.0",
"io.argonaut" %% "argonaut" % "6.1",

"org.sangria-graphql" %% "sangria-marshalling-testkit" % "0.1.2" % "test",
"org.sangria-graphql" %% "sangria-marshalling-testkit" % "0.2.0" % "test",
"org.scalatest" %% "scalatest" % "2.2.6" % "test"
)

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=0.13.9
sbt.version=0.13.11
7 changes: 5 additions & 2 deletions src/main/scala/sangria/marshalling/argonaut.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,13 @@ import scala.util.{Success, Failure}
object argonaut {
implicit object ArgonautResultMarshaller extends ResultMarshaller {
type Node = Json
type MapBuilder = ArrayMapBuilder[Node]

def emptyMapNode = Json.obj()
def emptyMapNode(keys: Seq[String]) = new ArrayMapBuilder[Node](keys)
def addMapNodeElem(builder: MapBuilder, key: String, value: Node, optional: Boolean) = builder.add(key, value)

def mapNode(builder: MapBuilder) = Json.obj(builder.toSeq: _*)
def mapNode(keyValues: Seq[(String, Json)]) = Json.obj(keyValues: _*)
def addMapNodeElem(node: Json, key: String, value: Json, optional: Boolean) = node.withObject(_ + (key, value))

def arrayNode(values: Vector[Json]) = Json.array(values: _*)
def optionalArrayNodeValue(value: Option[Json]) = value match {
Expand Down

0 comments on commit c1f8908

Please sign in to comment.