-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* bump to kotlin v1.1.1 * Add type alias for more readable code * Change the package name to me.lazmaid.kraph * Fix build failed dur to hamkrest error * Update spek version * Update ENV for release * Update README
- Loading branch information
Verachad Wongsawangtham
authored
Mar 26, 2017
1 parent
ff19228
commit 5a1f319
Showing
21 changed files
with
73 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,17 @@ | ||
language: java | ||
jdk: | ||
- oraclejdk8 | ||
|
||
cache: | ||
directories: | ||
- $HOME/.gradle | ||
|
||
- "$HOME/.gradle" | ||
env: | ||
global: | ||
- secure: E2jm3qJrcyavBwWkBQxqKrLjprl4QRT3vGtX87HyEzCYAveh+bdiY+gvu0q+RoFhAklzSEJnND5vBDbHD4gzV9bx9UdafrPzwKFEWt3ZcVGI70JEYHfcID0jzQ6pI7LismrTOpVkHyUZudBnG3yNh6PxID8890I5IMPHInvvVMUDhJ+jpLtjnn5HnRLVIEOX1A368pQoqiAKvSPuIHmDdFofYbAlgprWEtkrpdLd/1Yp95yrE5EjC6nwjhvG2LHiKTr5FgAWD9/owmemioBnexSxEgZe76cRm38WDQVWpEppp7FHJ7eo0LhtEBXYUXJX2UE6W5A0rRBfRRoOCa8eABmY2kxsm5TajlA7yrxqeQebuvcQzVmSjPJ3t7JLkgcYMI88HbpvKjhA5fFVi8TeThd85wXp58eQkIU/7EoLPaqALUHw8WCAaBOmcQ37MLeSk6oX8SQUS0owo58guh1SN95BpTrMuzvvN4V9LPGNMfnVBxuKjnfOxxPkBWLEsuvgGwdC9pYj3dDYVDD7igrGy5qTwTJ8qTtqud3uUY0JVzpPpN6m3IKI0qxEOYTDS3WrJh14P8flFZXYU/Vot1xkmZPMlAAqYxdRWLnNAjwS+c8VePKqZmIp3FVxFyrs9yJehFWynB0ZYi3ZUtc0UKkoIKLocMi1huHgAmRrJbteN9Y= | ||
- secure: VLdggtNem5VHnUyGPfyrA05wnpmOqAlMbfd6fyNTh0/YpYzwnJ/2kqEcnCdcJn/GsDyubGcEvl7+PXzI4LmCS1fedQgj/9h+/nAFYEx6UInrczXEAKf3d53DH+rSCgTzvilqFBvLl6fJhkCv+/YuvDkOhWvBWN6QqZjBLCNc60Qw4kXsExU8TfG09wnu37TJuo78zmmY51Y85YDtsgnvw0C7mLk7n4R7yBiPEFi2ZAYehVdaN2eyUdl6uQsNm3rTdXMLRo0rQDsUOe7hFJYJz8F1ASMQmsY5xDGRfUpIBG78pV4IpMCTzoxpH3IaaK7Misxj3H5lgDzXEvtPf5t8SpKYfTBz1Pmc2ogVifV9YayRWl2K6bHabundAJQcYzhrBXZMPebpu5Pdi1GompOXdyhLx053x7+3/qhNK+81Tw71vNNt8+vRDNE9bIV00M1TE1YfHFz/GzBgUuPmigAl+CIY14w+PGJABFG7UHVDkjABMkOJHhFtLLwkkwx73CoPr8PzaXR9WzduPAwjiOpu0P69e5S4C5ZM3XxfBma8hW5K5RFvnw1FYSkE9+FEjhgdUX9bpfiHIhRS/3scTzscPhwuy804nmJqJbADjNtYVklVk6QaondMlEBu530uC57OHwRaLWLSDbPCWQwy2PsoBxtHewcld2x6IBGrPFj+qz0= | ||
|
||
deploy: | ||
- provider: script | ||
skip_cleanup: true | ||
script: ./gradlew build bintrayUpload -PdryRun=false | ||
script: "./gradlew build bintrayUpload -PdryRun=false" | ||
on: | ||
branch: master | ||
tags: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
buildscript { | ||
ext { | ||
kotlin_version = '1.0.4' | ||
kotlin_version = '1.1.1' | ||
} | ||
repositories { | ||
mavenCentral() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../kraph/NoFieldsInSelectionSetException.kt → .../kraph/NoFieldsInSelectionSetException.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package com.taskworld.kraph | ||
package me.lazmaid.kraph | ||
|
||
/** | ||
* Created by VerachadW on 10/4/2016 AD. | ||
|
2 changes: 1 addition & 1 deletion
2
...tlin/com/taskworld/kraph/lang/Argument.kt → .../kotlin/me/lazmaid/kraph/lang/Argument.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package com.taskworld.kraph.lang | ||
package me.lazmaid.kraph.lang | ||
|
||
/** | ||
* Created by VerachadW on 10/2/2016 AD. | ||
|
2 changes: 1 addition & 1 deletion
2
...tlin/com/taskworld/kraph/lang/Document.kt → .../kotlin/me/lazmaid/kraph/lang/Document.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package com.taskworld.kraph.lang | ||
package me.lazmaid.kraph.lang | ||
|
||
/** | ||
* Created by VerachadW on 10/2/2016 AD. | ||
|
2 changes: 1 addition & 1 deletion
2
.../kotlin/com/taskworld/kraph/lang/Field.kt → ...ain/kotlin/me/lazmaid/kraph/lang/Field.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package com.taskworld.kraph.lang | ||
package me.lazmaid.kraph.lang | ||
|
||
/** | ||
* Created by VerachadW on 9/19/2016 AD. | ||
|
2 changes: 1 addition & 1 deletion
2
...n/com/taskworld/kraph/lang/GraphQLNode.kt → ...tlin/me/lazmaid/kraph/lang/GraphQLNode.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package com.taskworld.kraph.lang | ||
package me.lazmaid.kraph.lang | ||
|
||
/** | ||
* Created by VerachadW on 10/2/2016 AD. | ||
|
2 changes: 1 addition & 1 deletion
2
...lin/com/taskworld/kraph/lang/Operation.kt → ...kotlin/me/lazmaid/kraph/lang/Operation.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package com.taskworld.kraph.lang | ||
package me.lazmaid.kraph.lang | ||
|
||
/** | ||
* Created by VerachadW on 10/2/2016 AD. | ||
|
2 changes: 1 addition & 1 deletion
2
.../com/taskworld/kraph/lang/SelectionSet.kt → ...lin/me/lazmaid/kraph/lang/SelectionSet.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package com.taskworld.kraph.lang | ||
package me.lazmaid.kraph.lang | ||
|
||
/** | ||
* Created by VerachadW on 10/2/2016 AD. | ||
|
8 changes: 4 additions & 4 deletions
8
...orld/kraph/lang/relay/CursorConnection.kt → ...maid/kraph/lang/relay/CursorConnection.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...skworld/kraph/lang/relay/InputAgrument.kt → ...lazmaid/kraph/lang/relay/InputAgrument.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
...in/com/taskworld/kraph/lang/relay/Node.kt → ...otlin/me/lazmaid/kraph/lang/relay/Node.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
...skworld/kraph/lang/relay/RelayMutation.kt → ...lazmaid/kraph/lang/relay/RelayMutation.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
package com.taskworld.kraph.test | ||
package me.lazmaid.kraph.test | ||
|
||
import com.natpryce.hamkrest.* | ||
import com.natpryce.hamkrest.assertion.assertThat | ||
import com.taskworld.kraph.Kraph | ||
import com.taskworld.kraph.NoFieldsInSelectionSetException | ||
import com.taskworld.kraph.lang.OperationType | ||
import com.taskworld.kraph.lang.relay.CursorConnection | ||
import com.taskworld.kraph.lang.relay.PageInfo | ||
import me.lazmaid.kraph.Kraph | ||
import me.lazmaid.kraph.NoFieldsInSelectionSetException | ||
import me.lazmaid.kraph.lang.OperationType | ||
import me.lazmaid.kraph.lang.relay.CursorConnection | ||
import me.lazmaid.kraph.lang.relay.PageInfo | ||
import org.jetbrains.spek.api.Spek | ||
import org.jetbrains.spek.api.dsl.describe | ||
import org.jetbrains.spek.api.dsl.given | ||
|
@@ -32,13 +32,13 @@ class BuilderSpek : Spek({ | |
assertThat(query.document.operation.type, isA(equalTo(OperationType.QUERY))) | ||
} | ||
it("should have only one field inside query") { | ||
assertThat(query.document.operation.selectionSet.fields, hasSize(equalTo(1))) | ||
assertThat(query.document.operation.selectionSet.fields.size, equalTo(1)) | ||
} | ||
it("should have field named notes inside query") { | ||
assertThat(query.document.operation.selectionSet.fields[0].name, equalTo("notes")) | ||
} | ||
it("should have four fields inside note object") { | ||
assertThat(query.document.operation.selectionSet.fields[0].selectionSet!!.fields, hasSize(equalTo(4))) | ||
assertThat(query.document.operation.selectionSet.fields[0].selectionSet!!.fields.size, equalTo(4)) | ||
} | ||
it("should have field named id inside notes object") { | ||
assertThat(query.document.operation.selectionSet.fields[0].selectionSet!!.fields[0].name, equalTo("id")) | ||
|
@@ -56,7 +56,7 @@ class BuilderSpek : Spek({ | |
assertThat(query.document.operation.selectionSet.fields[0].selectionSet!!.fields[3].arguments!!.args["size"] as Int, equalTo(100)) | ||
} | ||
it("should have two fields inside author object") { | ||
assertThat(query.document.operation.selectionSet.fields[0].selectionSet!!.fields[2].selectionSet!!.fields, hasSize(equalTo(2))) | ||
assertThat(query.document.operation.selectionSet.fields[0].selectionSet!!.fields[2].selectionSet!!.fields.size, equalTo(2)) | ||
} | ||
it("should have field named name inside author object") { | ||
assertThat(query.document.operation.selectionSet.fields[0].selectionSet!!.fields[2].selectionSet!!.fields[0].name, equalTo("name")) | ||
|
@@ -105,13 +105,13 @@ class BuilderSpek : Spek({ | |
assertThat(query.document.operation.type, isA(equalTo(OperationType.MUTATION))) | ||
} | ||
it("should have only 1 mutation") { | ||
assertThat(query.document.operation.selectionSet.fields, hasSize(equalTo(1))) | ||
assertThat(query.document.operation.selectionSet.fields.size, equalTo(1)) | ||
} | ||
it("should have mutation named registerUser") { | ||
assertThat(query.document.operation.selectionSet.fields[0].name, equalTo("registerUser")) | ||
} | ||
it("should have 3 arguments in registerUser mutation") { | ||
assertThat(query.document.operation.selectionSet.fields[0].arguments!!.args.entries, hasSize(equalTo(3))) | ||
assertThat(query.document.operation.selectionSet.fields[0].arguments!!.args.entries.size, equalTo(3)) | ||
} | ||
it("should have argument in registerUser mutation with named email and value as [email protected]") { | ||
assertThat(query.document.operation.selectionSet.fields[0].arguments!!.args["email"] as String, equalTo("[email protected]")) | ||
|
@@ -123,7 +123,7 @@ class BuilderSpek : Spek({ | |
assertThat(query.document.operation.selectionSet.fields[0].arguments!!.args["age"] as Int, equalTo(30)) | ||
} | ||
it("should contains 2 field in registerUser payload") { | ||
assertThat(query.document.operation.selectionSet.fields[0].selectionSet!!.fields, hasSize(equalTo(2))) | ||
assertThat(query.document.operation.selectionSet.fields[0].selectionSet!!.fields.size, equalTo(2)) | ||
} | ||
it("should have id field in registerUser payload") { | ||
assertThat(query.document.operation.selectionSet.fields[0].selectionSet!!.fields[0].name, equalTo("id")) | ||
|
8 changes: 4 additions & 4 deletions
8
.../taskworld/kraph/test/GraphQLPrintSpek.kt → ...me/lazmaid/kraph/test/GraphQLPrintSpek.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 8 additions & 8 deletions
16
...om/taskworld/kraph/test/RelayPrintSpek.kt → ...n/me/lazmaid/kraph/test/RelayPrintSpek.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import com.taskworld.kraph.Kraph | ||
import me.lazmaid.kraph.Kraph | ||
|
||
fun main(args: Array<String>) { | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters