Skip to content

Commit

Permalink
Updating README and examples.
Browse files Browse the repository at this point in the history
  • Loading branch information
stewartbryson authored and github-actions[bot] committed May 11, 2023
1 parent 077131a commit 084f50c
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 15 deletions.
15 changes: 7 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ is automatically applied by the `snowflake` plugin:
```groovy
plugins {
id 'java'
id 'io.github.stewartbryson.snowflake' version '2.0.11'
id 'io.github.stewartbryson.snowflake' version '2.0.12'
}
```

Expand Down Expand Up @@ -235,7 +235,7 @@ Our `plugins` DSL from the build file:
plugins {
id 'java'
id 'groovy' // needed for Spock testing framework
id 'io.github.stewartbryson.snowflake' version '2.0.11'
id 'io.github.stewartbryson.snowflake' version '2.0.12'
}
```

Expand Down Expand Up @@ -312,7 +312,7 @@ functionalTest(JvmTestSuite) {
all {
useSpock('2.3-groovy-3.0')
dependencies {
implementation "io.github.stewartbryson:gradle-snowflake-plugin:2.0.11"
implementation "io.github.stewartbryson:gradle-snowflake-plugin:2.0.12"
}
testTask.configure {
failFast true
Expand Down Expand Up @@ -348,7 +348,7 @@ class SnowflakeSampleTest extends SnowflakeSpec {
def b = 2
then: 'Add two numbers using ADD_NUMBERS()'
selectSingleValue("select add_numbers($a,$b);") == 'Sum is: 3'
selectFunction("add_numbers", [a,b]) == 'Sum is: 3'
}
def 'ADD_NUMBERS() function with 3 and 4'() {
Expand All @@ -357,14 +357,13 @@ class SnowflakeSampleTest extends SnowflakeSpec {
def b = 4
then: 'Add two numbers using ADD_NUMBERS()'
selectSingleValue("select add_numbers($a,$b);") == 'Sum is: 7'
selectFunction("add_numbers", [a,b]) == 'Sum is: 7'
}
}
```
The `selectSingleValue` method returns the first column from the first row in a `SELECT` statement,
so it's perfect for testing a function. And of course, this executes against Snowflake in real time.
The `selectFunction` method is an easy way to execute a function and test the results by just passing the function name and a list of arguments to pass to that function.
And of course, this executes against Snowflake in real time.

```shell
❯ ./gradlew functionalTest
Expand Down
2 changes: 1 addition & 1 deletion examples/groovy/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id 'groovy'
id 'com.github.ben-manes.versions' version '0.46.0'
id 'io.github.stewartbryson.snowflake' version '2.0.11'
id 'io.github.stewartbryson.snowflake' version '2.0.12'
}

repositories {
Expand Down
2 changes: 1 addition & 1 deletion examples/java-external-stage/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id 'java'
id 'com.github.ben-manes.versions' version '0.46.0'
id 'io.github.stewartbryson.snowflake' version '2.0.11'
id 'io.github.stewartbryson.snowflake' version '2.0.12'
}

repositories {
Expand Down
4 changes: 2 additions & 2 deletions examples/java-testing/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id 'java'
id 'groovy' // needed for Spock testing framework
id 'io.github.stewartbryson.snowflake' version '2.0.11'
id 'io.github.stewartbryson.snowflake' version '2.0.12'
id 'com.adarshr.test-logger' version '3.2.0' // added for testing
id 'com.github.ben-manes.versions' version '0.46.0'
}
Expand Down Expand Up @@ -43,7 +43,7 @@ testing {
all {
useSpock('2.3-groovy-3.0')
dependencies {
implementation "io.github.stewartbryson:gradle-snowflake-plugin:2.0.11"
implementation "io.github.stewartbryson:gradle-snowflake-plugin:2.0.12"
}
testTask.configure {
failFast true
Expand Down
2 changes: 1 addition & 1 deletion examples/java/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id 'java'
id 'com.github.ben-manes.versions' version '0.46.0'
id 'io.github.stewartbryson.snowflake' version '2.0.11'
id 'io.github.stewartbryson.snowflake' version '2.0.12'
}

repositories {
Expand Down
2 changes: 1 addition & 1 deletion examples/kotlin/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id "org.jetbrains.kotlin.jvm" version "1.7.21"
id 'com.github.ben-manes.versions' version '0.46.0'
id 'io.github.stewartbryson.snowflake' version '2.0.11'
id 'io.github.stewartbryson.snowflake' version '2.0.12'
}

repositories {
Expand Down
2 changes: 1 addition & 1 deletion examples/scala/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
plugins {
id 'scala'
id 'com.github.ben-manes.versions' version '0.46.0'
id 'io.github.stewartbryson.snowflake' version '2.0.11'
id 'io.github.stewartbryson.snowflake' version '2.0.12'
}

repositories {
Expand Down

0 comments on commit 084f50c

Please sign in to comment.