diff --git a/accurest-core/src/main/groovy/io/codearte/accurest/builder/SpockMethodBodyBuilder.groovy b/accurest-core/src/main/groovy/io/codearte/accurest/builder/SpockMethodBodyBuilder.groovy index babee4264c..25ebd02b99 100644 --- a/accurest-core/src/main/groovy/io/codearte/accurest/builder/SpockMethodBodyBuilder.groovy +++ b/accurest-core/src/main/groovy/io/codearte/accurest/builder/SpockMethodBodyBuilder.groovy @@ -5,8 +5,6 @@ import groovy.transform.PackageScope import io.codearte.accurest.dsl.GroovyDsl import io.codearte.accurest.dsl.internal.Header -import java.util.regex.Pattern - /** * @author Jakub Kubrynski */ @@ -75,8 +73,6 @@ class SpockMethodBodyBuilder { processMapElement(value, blockBuilder, property) } else if (value instanceof List) { processArrayElements(value, property, blockBuilder) - } else if (value instanceof Pattern) { - blockBuilder.addLine("responseBody$property ==~ java.util.regex.Pattern.compile('${value}')") } else { blockBuilder.addLine("responseBody$property == ${value}") } @@ -94,7 +90,4 @@ class SpockMethodBodyBuilder { } } } - private void processClosure(Closure value, BlockBuilder blockBuilder, String property) { - blockBuilder.addLine() - } } diff --git a/accurest-core/src/main/groovy/io/codearte/accurest/dsl/internal/Common.groovy b/accurest-core/src/main/groovy/io/codearte/accurest/dsl/internal/Common.groovy index 864c52efe4..f6eb65ab9e 100644 --- a/accurest-core/src/main/groovy/io/codearte/accurest/dsl/internal/Common.groovy +++ b/accurest-core/src/main/groovy/io/codearte/accurest/dsl/internal/Common.groovy @@ -66,10 +66,6 @@ class Common { return Pattern.compile(regex) } - MethodProperty execute(String closureDefinition) { - return new MethodProperty(closureDefinition) - } - ClientDslProperty client(Object clientValue) { return new ClientDslProperty(clientValue) } diff --git a/accurest-core/src/main/groovy/io/codearte/accurest/dsl/internal/MethodProperty.groovy b/accurest-core/src/main/groovy/io/codearte/accurest/dsl/internal/MethodProperty.groovy deleted file mode 100644 index b707a8a7c1..0000000000 --- a/accurest-core/src/main/groovy/io/codearte/accurest/dsl/internal/MethodProperty.groovy +++ /dev/null @@ -1,13 +0,0 @@ -package io.codearte.accurest.dsl.internal - -import groovy.transform.CompileStatic - -@CompileStatic -class MethodProperty { - - final String closureDefinition - - MethodProperty(String closureDefinition) { - this.closureDefinition = closureDefinition - } -} diff --git a/accurest-gradle-plugin/src/test/resources/functionalTest/bootSimple/repository/mappings/com/ofg/twitter-places-analyzer/pairId/moreComplexVersion.groovy b/accurest-gradle-plugin/src/test/resources/functionalTest/bootSimple/repository/mappings/com/ofg/twitter-places-analyzer/pairId/moreComplexVersion.groovy deleted file mode 100644 index 9937b43721..0000000000 --- a/accurest-gradle-plugin/src/test/resources/functionalTest/bootSimple/repository/mappings/com/ofg/twitter-places-analyzer/pairId/moreComplexVersion.groovy +++ /dev/null @@ -1,20 +0,0 @@ -io.codearte.accurest.dsl.GroovyDsl.make { - request { - method 'PUT' - url $(client(regex('^/api/[0-9]{2}$')), server('/api/12')) - headers { - header 'Content-Type': 'application/json' - } - body '''\ - [{ - "text": "Gonna see you at Warsaw" - }] -''' - } - response { - body ( - path: $(client('/api/12'), server(regex('^/api/[0-9]{2}$'))) - ) - status 200 - } -} \ No newline at end of file diff --git a/accurest-gradle-plugin/src/test/resources/functionalTest/bootSimple/src/main/groovy/com/ofg/twitter/place/PairIdController.groovy b/accurest-gradle-plugin/src/test/resources/functionalTest/bootSimple/src/main/groovy/com/ofg/twitter/place/PairIdController.groovy index ee02469454..8a4e1e2e63 100644 --- a/accurest-gradle-plugin/src/test/resources/functionalTest/bootSimple/src/main/groovy/com/ofg/twitter/place/PairIdController.groovy +++ b/accurest-gradle-plugin/src/test/resources/functionalTest/bootSimple/src/main/groovy/com/ofg/twitter/place/PairIdController.groovy @@ -21,15 +21,10 @@ class PairIdController { method = PUT, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) - String getPlacesFromTweets(@PathVariable long pairId, @RequestBody List tweets) { + void getPlacesFromTweets(@PathVariable long pairId, @RequestBody List tweets) { log.info("Inside PairIdController, doing very important logic") if (tweets?.text != ["Gonna see you at Warsaw"]) { throw new IllegalArgumentException("Wrong text in tweet: ${tweets?.text}") } - return """ - { - "path" : "/api/$pairId" - } - """ } }