Commit Graph

3290 Commits

Author SHA1 Message Date
Marcin Grzejszczak
60d45b5ad3 Merge branch '1.2.x' 2018-03-19 16:32:15 +01:00
Marcin Grzejszczak
51564ab444 Discouraged users from using spring-cloud-contract-wiremock dependency directly
the preferred option is to use `spring-cloud-starter-stub-runner`

fixes gh-348
2018-03-19 16:31:12 +01:00
Marcin Grzejszczak
e4eaafc697 Added Support Content-Transfer-Encoding in Multipart regexp
fixes gh-339
2018-03-19 15:31:42 +01:00
Marcin Grzejszczak
f433118a15 Allows exposure of multiple versions via Stub Runner
without this change for a single group and artifact id you can have only one entry in stub runner
with this change you can have multiple ones

fixes gh-474
2018-03-19 14:45:09 +01:00
Marcin Grzejszczak
ed52de44ba 🤦 2018-03-19 11:43:32 +01:00
Marcin Grzejszczak
65cd71f38e Added support for byte multipart content
fixes gh-546
2018-03-19 10:54:02 +01:00
Marcin Grzejszczak
cd723739b5 Added more verbose information to collection assertions
with this change each collection assertion has the `.as("x.y.z")` where `x.y.z is the json path. That results in the following message to be printed when size of the collection was wrong

`[x.y.z] The size <3> is not between <5> and <7>`

fixes gh-441
2018-03-16 17:48:01 +01:00
Marcin Grzejszczak
64fe74fee7 Polish 2018-03-16 16:55:25 +01:00
Marcin Grzejszczak
969cfe8573 Added an option to disable the wiremock rest tempalte customizer
with this change just set "wiremock.rest-template-ssl-enabled:false"  and the customizer will not be set up

fixes gh-413
2018-03-16 16:30:30 +01:00
Marcin Grzejszczak
c3d7e2721d Small update on the annotation 2018-03-16 16:14:55 +01:00
Marcin Grzejszczak
32888e3b92 Add a convenience mechanism to get stub runner port
Now, you can also use the `@StubRunnerPort` annotation to inject the port of a running stub.
Value of the annotation can be the `groupid.artifactid` or just the `artifactid`. Example for Stub Runner ids
`com.example:foo`, `com.example:bar`.

```java
@StubRunnerPort("foo")
int fooPort;
@StubRunnerPort("com.example.bar")
int barPort;
```

fixes gh-573
2018-03-16 16:04:36 +01:00
Marcin Grzejszczak
e222142321 Added support for form param
without this change we supported only text and json content type body.
with this change we also support url encoded form parameters

fixes gh-578
2018-03-16 12:05:53 +01:00
Marcin Grzejszczak
068206f02a Removed private access 2018-03-16 11:52:18 +01:00
Marcin Grzejszczak
e18d3c848e Fixed a typo 2018-03-16 07:10:08 +01:00
Marcin Grzejszczak
1cd2ce9722 Fixed broken tests 2018-03-16 06:53:37 +01:00
Marcin Grzejszczak
7a38ab9867 Added the deleteStubsAfterTest flag to remove stubs after tests are finished
if `deleteStubsAfterTest` is set to false then stubs will NOT be deleted after tests are executed

fixes gh-512
2018-03-16 01:08:37 +01:00
Marcin Grzejszczak
903094d8b4 Merge branch '1.2.x' 2018-03-15 17:14:04 +01:00
Marcin Grzejszczak
13902ecf1d Documented custom settings.xml setup; fixes gh-552 2018-03-15 17:13:51 +01:00
Marcin Grzejszczak
05d4bb3a57 Merge branch '1.2.x' 2018-03-15 16:43:42 +01:00
Marcin Grzejszczak
8fa57f5832 Added additional tests 2018-03-15 16:43:32 +01:00
Marcin Grzejszczak
b43204fb82 Merge branch '1.2.x' 2018-03-15 14:56:04 +01:00
Marcin Grzejszczak
08025963a8 Docker images built only in integration mode (to speed up build) 2018-03-15 14:55:45 +01:00
Marcin Grzejszczak
c33ad02550 Added support for Docker and external contracts repo
These environment variables are used when contracts lay in an external repository. To enable
this feature you must set the `EXTERNAL_CONTRACTS_ARTIFACT_ID` environment variable.

- `EXTERNAL_CONTRACTS_GROUP_ID` - group id of the project with contracts. Defaults to `com.example`
- `EXTERNAL_CONTRACTS_ARTIFACT_ID`- artifact id of the project with contracts.
- `EXTERNAL_CONTRACTS_CLASSIFIER`- classifier of the project with contracts. Empty by default
- `EXTERNAL_CONTRACTS_VERSION` - version of the project with contracts. Defaults to `+`, equivalent to picking the latest
- `EXTERNAL_CONTRACTS_REPO_WITH_BINARIES_URL` - URL of your Artifact Manager. Defaults to value of `REPO_WITH_BINARIES_URL` env var.
If that's not set, defaults to `http://localhost:8081/artifactory/libs-release-local`
which is the default URL of https://jfrog.com/artifactory/[Artifactory] running locally
- `EXTERNAL_CONTRACTS_PATH` - path to contracts for the given project, inside the project with contracts.
Defaults to slash separated `EXTERNAL_CONTRACTS_GROUP_ID` concatenated with `/` and `EXTERNAL_CONTRACTS_ARTIFACT_ID`. E.g.
for group id `foo.bar` and artifact id `baz`, would result in `foo/bar/baz` contracts path.
- `EXTERNAL_CONTRACTS_WORK_OFFLINE` - if set to `true` then will retrieve artifact with contracts
from the container's `.m2`. Mount your local `.m2` as a volume available at the container's `/root/.m2` path.
You must not set both `EXTERNAL_CONTRACTS_WORK_OFFLINE` and `EXTERNAL_CONTRACTS_REPO_WITH_BINARIES_URL`.

fixes gh-576
2018-03-15 14:48:28 +01:00
Marcin Grzejszczak
8e4360535c Added HttpStatus delegate in the Groovy DSL Response
with this change there are numerous helper methods that should provide a more descriptive DSL for the response status. Instead of a numerical status you can now call a method e.g. instead of 200 call OK()

fixes gh-575
2018-03-15 10:00:45 +01:00
Axel Hodler
f31e9ba137 Added anyDouble DslProperty (#571) 2018-03-14 21:07:20 +01:00
Marcin Grzejszczak
cd51d09ec4 Merge branch '1.2.x' 2018-03-13 18:07:16 +01:00
Marcin Grzejszczak
38cb54eab2 Added fast switch for circle 2018-03-13 18:05:36 +01:00
Marcin Grzejszczak
17c375a629 Updated docs to point to different branches 2018-03-13 17:51:08 +01:00
Marcin Grzejszczak
ab76b12edf Added one more ant pattern to gradle and maven plugins
The bug is related to the fact that initially, we were supporting slash-separated paths to projects. E.g. if the group id was `a.b.c` then we did checked for `a/b/c` folder. At certain point we've started building stubs with the `groupid` folder as such e.g. `a.b.c/artifact-id`. This is where the bug comes in. For Maven and Gradle we're using ant patterns for copying files. We're only providing the slash-separated ant pattern. With this fix, we're backward compatible (we're leaving the slash-separated one) and we're adding support for dot-delimited group id.

fixes gh-555
2018-03-13 17:51:08 +01:00
Marcin Grzejszczak
2740496d86 Added one more ant pattern to gradle and maven plugins
The bug is related to the fact that initially, we were supporting slash-separated paths to projects. E.g. if the group id was `a.b.c` then we did checked for `a/b/c` folder. At certain point we've started building stubs with the `groupid` folder as such e.g. `a.b.c/artifact-id`. This is where the bug comes in. For Maven and Gradle we're using ant patterns for copying files. We're only providing the slash-separated ant pattern. With this fix, we're backward compatible (we're leaving the slash-separated one) and we're adding support for dot-delimited group id.

fixes gh-555
2018-03-13 17:47:00 +01:00
Eddú Meléndez Gonzales
97a8e3c2f5 Add missing configuration properties metadata for stub-runner (#572)
See gh-566
2018-03-13 10:35:49 +01:00
Marcin Grzejszczak
d9739907ab Merge branch '1.2.x' 2018-03-13 10:34:56 +01:00
Alexey Nesterov
e89062f58d Fix disabling of publish task when env property is set (#574)
Because of Gradle's project lifecycle, disabling tasks in the script doesn't
work as expected, ./gradlew publish will still try to execute
:publishMavenJavaPublicationToMavenRepository and fail even if PUBLISH_ARTIFACTS
is set to false. To avoid that and make sure all publish tasks are disabled
script need to listen for tasks graph event to be ready and then disable the tasks.
2018-03-13 10:34:48 +01:00
Alexey Nesterov
1e47d519af Fix disabling of publish task when env property is set (#574)
Because of Gradle's project lifecycle, disabling tasks in the script doesn't
work as expected, ./gradlew publish will still try to execute
:publishMavenJavaPublicationToMavenRepository and fail even if PUBLISH_ARTIFACTS
is set to false. To avoid that and make sure all publish tasks are disabled
script need to listen for tasks graph event to be ready and then disable the tasks.
2018-03-13 10:31:55 +01:00
Marcin Grzejszczak
a84c8643fa Merge branch '1.2.x' 2018-03-11 19:27:59 +01:00
Marcin Grzejszczak
90354dace5 Lower memory requirements for Gradle 2018-03-11 19:27:49 +01:00
Marcin Grzejszczak
26cc450108 Added beanutils version 2018-03-09 17:25:32 +01:00
Marcin Grzejszczak
59b1ab439b Merge branch '1.2.x' 2018-03-09 17:23:39 +01:00
Marcin Grzejszczak
9c4758b069 Removed empty if statement 2018-03-09 17:23:29 +01:00
Marcin Grzejszczak
de2d3738eb Merge branch '1.2.x' 2018-03-09 16:57:23 +01:00
Marcin Grzejszczak
2fc413755b Fixed unnecessary quoting of non string value when referencing request from response
fixes gh-559
2018-03-09 16:56:47 +01:00
Jay Bryant
399be7599c Editing pass for new content (#570)
Olga Maciaszek-Sharma added very nice content, in the form of a three-second and a three-minute introduction for the verifier. I edited her additions to conform to our usual standards and corporate voice.
2018-03-09 08:29:24 +01:00
Olga Maciaszek-Sharma
df76404095 Add short tours (#565)
* Fix links to contract-dsl section.
* Add three second tour.
* Add consumer side info in the three second tour.
* Add three-minute tour.
* Generate readme changes.
2018-03-07 15:00:37 -05:00
Mendel Feygelson
2ef24470c5 Do not unescapeJavascript when output header patterns (#568)
* This causes all backslashes to be stripped from the regular
   expression
2018-03-06 15:01:30 -05:00
Marcin Grzejszczak
fba058fe1e Skipping gradle tests for CI 2018-03-05 10:44:09 +01:00
mfeygelson
c4ab64757f Support pattern properties in messaging contracts (#564) 2018-03-05 10:22:31 +01:00
Marcin Grzejszczak
1862f6674a Should fix the docker snapshot issue; fixes gh-562 2018-03-02 18:11:50 +01:00
Ryan Baxter
92a3c2b3d6 Reverting boot RC2 change 2018-02-26 20:38:06 -05:00
buildmaster
9c2d54453e Going back to snapshots 2018-02-27 01:35:53 +00:00
buildmaster
c0f773ecd3 Update SNAPSHOT to 2.0.0.M7 2018-02-27 01:30:18 +00:00