diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index b761216..e8c6bf7 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 6d6ba1f..1b5b778 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Tue Sep 16 15:17:56 PDT 2014 +#Mon Sep 21 11:21:40 PDT 2015 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.6-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-2.7-bin.zip diff --git a/gradlew b/gradlew index 91a7e26..97fac78 100755 --- a/gradlew +++ b/gradlew @@ -42,11 +42,6 @@ case "`uname`" in ;; esac -# For Cygwin, ensure paths are in UNIX format before anything is touched. -if $cygwin ; then - [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` -fi - # Attempt to set APP_HOME # Resolve links: $0 may be a link PRG="$0" @@ -114,6 +109,7 @@ fi if $cygwin ; then APP_HOME=`cygpath --path --mixed "$APP_HOME"` CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` # We build the pattern for arguments to be converted via cygpath ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` diff --git a/src/integTest/groovy/com/github/jrubygradle/storm/JRubyStormLocalIntegrationSpec.groovy b/src/integTest/groovy/com/github/jrubygradle/storm/JRubyStormLocalIntegrationSpec.groovy new file mode 100644 index 0000000..1432396 --- /dev/null +++ b/src/integTest/groovy/com/github/jrubygradle/storm/JRubyStormLocalIntegrationSpec.groovy @@ -0,0 +1,57 @@ +package com.github.jrubygradle.storm + +import org.gradle.testkit.runner.GradleRunner +import org.gradle.testkit.runner.TaskOutcome +import org.gradle.testkit.runner.BuildResult +import org.junit.Rule +import org.junit.rules.TemporaryFolder +import spock.lang.* + +/** + */ +class JRubyStormLocalIntegrationSpec extends Specification { + @Rule + final TemporaryFolder testProjectDir = new TemporaryFolder() + File buildFile + String pluginDependencies + + def setup() { + buildFile = testProjectDir.newFile('build.gradle') + def pluginClasspathResource = getClass().classLoader.findResource("plugin-classpath.json") + + if (pluginClasspathResource == null) { + throw new IllegalStateException("Did not find plugin classpath resource, run `testClasses` build task.") + } + + pluginDependencies = pluginClasspathResource.text + } + + def "executing runJRubyStorm with no topology should error"() { + given: + buildFile << """ +buildscript { + dependencies { + classpath files(${pluginDependencies}) + } +} +apply plugin: 'com.github.jruby-gradle.storm' + +repositories { + jcenter() + mavenLocal() +} + +jrubyStorm { +} + """ + + when: + BuildResult result = GradleRunner.create() + .withProjectDir(testProjectDir.root) + .withArguments('runJRubyStorm') + .build() + + then: + result.task(":runJRubyStorm").outcome == TaskOutcome.FAILURE + } +}