Skip to content

Commit 7fb90ce

Browse files
author
Per Abich
committed
Merge remote-tracking branch 'toma/master'
2 parents 6385134 + 9abe490 commit 7fb90ce

File tree

280 files changed

+16120
-1110
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

280 files changed

+16120
-1110
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Issue guidelines
2+
3+
If you're asking a question, rather than reporting a bug or requesting a feature, **please post your question on the [mailing list](https://groups.google.com/forum/#!forum/wiremock-user), and do not open an issue**.
4+
5+
Please do not log bugs regarding classpath issues (typically manifesting as 'NoClassDefFoundException' or 'ClassNotFoundException').
6+
These are not WireMock bugs, and need to be diagnosed for your project using your build tool. Plenty has already been written in WireMock's issues and mailing list about how to resolve these issues
7+
so please search these sources before asking for help.
8+
9+
## Bug reports
10+
11+
We're a lot more likely to look at and fix bugs that are clearly described and reproduceable. Please including the following details when reporting a bug:
12+
13+
- [ ] Which version of WireMock you're using
14+
- [ ] How you're starting and configuring WireMock, including configuration or CLI the command line
15+
- [ ] A failing test case that demonstrates the problem
16+
- [ ] Profiler data if the issue is performance related
17+
18+
## Feature requests
19+
20+
Please include details of the use case and motivation for a feature when suggesting it.

.ruby-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2.1.10

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ WireMock - a web service test double for all occasions
22
======================================================
33

44
[![Build Status](https://travis-ci.org/tomakehurst/wiremock.svg?branch=master)](https://travis-ci.org/tomakehurst/wiremock)
5-
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.github.tomakehurst/wiremock/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.github.tomakehurst/wiremock)
5+
[![Maven Central](https://img.shields.io/maven-central/v/com.github.tomakehurst/wiremock.svg)](https://search.maven.org/artifact/com.github.tomakehurst/wiremock)
6+
67

78
Key Features
89
------------

Vagrantfile

Lines changed: 33 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,43 @@
1-
# -*- mode: ruby -*-
2-
# vi: set ft=ruby :
1+
def windows?
2+
(/cygwin|mswin|mingw|bccwin|wince|emx/ =~ RUBY_PLATFORM) != nil
3+
end
34

4-
Vagrant.configure(2) do |config|
5-
config.vm.box = "https://cloud-images.ubuntu.com/vagrant/utopic/current/utopic-server-cloudimg-i386-vagrant-disk1.box"
5+
Vagrant.configure("2") do |config|
6+
config.vm.box = "tcthien/java-dev-server"
7+
config.vm.box_version = "0.0.7"
68
config.vm.box_check_update = false
79

8-
# Create a private network, which allows host-only access to the machine
9-
# using a specific IP.
10-
# config.vm.network "private_network", ip: "192.168.33.10"
11-
12-
# Create a public network, which generally matched to bridged network.
13-
# Bridged networks make the machine appear as another physical device on
14-
# your network.
15-
# config.vm.network "public_network"
10+
# config.vm.synced_folder "#{Dir.home}/.m2/repository", "/share/mavenRepo"
11+
# config.vm.synced_folder "", "/share/source"
1612

17-
config.vm.synced_folder ".", "/wiremock"
13+
# MySQL Port
14+
# config.vm.network "forwarded_port", guest: 3306, host: 3306
15+
# Cassandra Port
16+
# config.vm.network "forwarded_port", guest: 9042, host: 9042
17+
# config.vm.network "forwarded_port", guest: 7000, host: 7000
18+
# config.vm.network "forwarded_port", guest: 7001, host: 7001
19+
# config.vm.network "forwarded_port", guest: 9160, host: 9160
1820

1921
config.vm.provider "virtualbox" do |vb|
2022
vb.memory = "2048"
23+
vb.name = "codelab-server"
2124
end
22-
#
23-
# View the documentation for the provider you are using for more
24-
# information on available options.
25-
26-
# Define a Vagrant Push strategy for pushing to Atlas. Other push strategies
27-
# such as FTP and Heroku are also available. See the documentation at
28-
# https://docs.vagrantup.com/v2/push/atlas.html for more information.
29-
# config.push.define "atlas" do |push|
30-
# push.app = "YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME"
31-
# end
3225

33-
# Enable provisioning with a shell script. Additional provisioners such as
34-
# Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
35-
# documentation for more information about their specific syntax and use.
36-
config.vm.provision "shell", inline: <<-SHELL
37-
sudo apt-get update
38-
sudo apt-get install -y openjdk-7-jdk
26+
# update node+npm
27+
config.vm.provision "shell", privileged: false, inline: <<-SHELL
28+
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.6/install.sh | bash
29+
export NVM_DIR="\$HOME/.nvm"
30+
[ -s "\$NVM_DIR/nvm.sh" ] && \. "\$NVM_DIR/nvm.sh"
31+
[ -s "\$NVM_DIR/bash_completion" ] && \. "\$NVM_DIR/bash_completion"
32+
nvm install --lts
3933
SHELL
40-
end
34+
35+
# node/npm has symlink errors on windows hosts, this config disables them
36+
if windows?
37+
config.vm.provision "shell", privileged: false, inline: <<-SHELL
38+
export NVM_DIR="\$HOME/.nvm"
39+
[ -s "\$NVM_DIR/nvm.sh" ] && \. "\$NVM_DIR/nvm.sh"
40+
npm config set bin-links false
41+
SHELL
42+
end
43+
end

build.gradle

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,16 @@ apply plugin: 'com.github.johnrengelman.shadow'
2929
sourceCompatibility = 1.7
3030
targetCompatibility = 1.7
3131
group = 'com.github.tomakehurst'
32-
version = '2.10.1'
32+
version = '2.19.0'
3333

3434
def shouldPublishLocally = System.getProperty('LOCAL_PUBLISH')
3535

3636
def versions = [
37-
jackson: '2.8.9',
38-
jetty : '9.2.22.v20170606',
39-
xmlUnit: '2.3.0'
37+
handlebars: '4.0.7',
38+
jackson: '2.8.11',
39+
jacksonDatabind: '2.8.11.2',
40+
jetty : '9.2.24.v20180105', // Please don't raise PRs upgrading this to the latest version as it drops Java 7 support. See https://github.com/tomakehurst/wiremock/issues/407 and https://github.com/tomakehurst/wiremock/pull/887 for details
41+
xmlUnit: '2.5.1'
4042
]
4143

4244
repositories {
@@ -51,8 +53,8 @@ dependencies {
5153
compile "com.google.guava:guava:20.0"
5254
compile "com.fasterxml.jackson.core:jackson-core:$versions.jackson",
5355
"com.fasterxml.jackson.core:jackson-annotations:$versions.jackson",
54-
"com.fasterxml.jackson.core:jackson-databind:$versions.jackson"
55-
compile "org.apache.httpcomponents:httpclient:4.5.3"
56+
"com.fasterxml.jackson.core:jackson-databind:$versions.jacksonDatabind"
57+
compile "org.apache.httpcomponents:httpclient:4.5.5"
5658
compile "org.xmlunit:xmlunit-core:$versions.xmlUnit"
5759
compile "org.xmlunit:xmlunit-legacy:$versions.xmlUnit"
5860
compile "com.jayway.jsonpath:json-path:2.4.0"
@@ -61,11 +63,12 @@ dependencies {
6163
compile("junit:junit:4.12") {
6264
exclude group: "org.hamcrest", module: "hamcrest-core"
6365
}
64-
compile 'org.apache.commons:commons-lang3:3.6'
65-
compile 'com.flipkart.zjsonpatch:zjsonpatch:0.3.0'
66-
compile 'com.github.jknack:handlebars:4.0.6', {
66+
compile 'org.apache.commons:commons-lang3:3.7'
67+
compile 'com.flipkart.zjsonpatch:zjsonpatch:0.4.4'
68+
compile "com.github.jknack:handlebars:$versions.handlebars", {
6769
exclude group: 'org.mozilla', module: 'rhino'
6870
}
71+
compile "com.github.jknack:handlebars-helpers:$versions.handlebars"
6972

7073
testCompile "org.hamcrest:hamcrest-all:1.3"
7174
testCompile("org.jmock:jmock:2.5.1") {
@@ -79,13 +82,13 @@ dependencies {
7982
exclude group: "org.hamcrest", module: "hamcrest-library"
8083
}
8184
testCompile "org.skyscreamer:jsonassert:1.2.3"
82-
testCompile 'com.toomuchcoding.jsonassert:jsonassert:0.4.7'
85+
testCompile 'com.toomuchcoding.jsonassert:jsonassert:0.4.12'
8386
testCompile 'org.awaitility:awaitility:2.0.0'
84-
8587
testCompile "com.googlecode.jarjar:jarjar:1.3"
8688
testCompile "commons-io:commons-io:2.4"
87-
testCompile 'org.scala-lang:scala-library:2.11.8'
89+
testCompile 'org.scala-lang:scala-library:2.11.12'
8890
testCompile 'org.littleshoot:littleproxy:1.1.2'
91+
testCompile 'org.apache.httpcomponents:httpmime:4.5'
8992

9093
testRuntime 'org.slf4j:slf4j-log4j12:1.7.12'
9194
testRuntime files('src/test/resources/classpath file source/classpathfiles.zip', 'src/test/resources/classpath-filesource.jar')
@@ -349,14 +352,23 @@ task signAll {
349352

350353
task npmInstall(type: Exec) {
351354
workingDir 'docs-v2'
352-
commandLine 'npm', 'i'
355+
if (System.getProperty('os.name').toLowerCase(Locale.ROOT).contains('windows')) {
356+
commandLine 'cmd', '/c', 'npm', 'i'
357+
} else {
358+
commandLine 'npm', 'i'
359+
}
353360
}
354361

355362
task generateApiDocs(type: Exec) {
356363
dependsOn npmInstall
357364
workingDir 'docs-v2'
358-
commandLine 'npm', 'run', 'apidocs'
365+
if (System.getProperty('os.name').toLowerCase(Locale.ROOT).contains('windows')) {
366+
commandLine 'cmd', '/c', 'npm', 'run', 'apidocs'
367+
} else {
368+
commandLine 'npm', 'run', 'apidocs'
369+
}
359370
}
371+
360372
jar.dependsOn generateApiDocs
361373
processResources.dependsOn generateApiDocs
362374

docs-v2/.ruby-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2.1.10

docs-v2/_config.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ analytics:
5858
provider : google
5959
google:
6060
tracking_id : 'UA-36386229-2'
61+
optimize_id : 'GTM-WQTGSSM'
6162

6263
# Google AdSense
6364
google_ad_client :
@@ -215,4 +216,4 @@ compress_html:
215216
ignore:
216217
envs: development
217218

218-
wiremock_version: 2.10.1
219+
wiremock_version: 2.19.0

docs-v2/_data/navigation.yml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,6 @@ main:
33
- title: "Docs"
44
url: /docs/
55

6-
# - title: "Blog"
7-
# url: /blog
8-
9-
# - title: "Support & Training"
10-
# url: /support-and-training/
11-
126
- title: "About"
137
url: /about/
148

@@ -23,9 +17,6 @@ main:
2317
- title: "External Resources"
2418
url: /external-resources/
2519

26-
- title: "Support & Consulting"
20+
- title: "Pro Support"
2721
url: http://consulting.wiremock.org
2822

29-
- title: "MockLab"
30-
url: http://get.mocklab.io/?utm_source=wiremock.org&utm_medium=primary-nav&utm_campaign=mocklab
31-
new_window: true

docs-v2/_docs/configuration.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ Typically it is only necessary to tweak these settings if you are doing performa
5454

5555
// Set the size of Jetty's header buffer (to avoid exceptions when very large request headers are sent). Defaults to 8192.
5656
.jettyHeaderBufferSize(16834)
57+
58+
// Enable asynchronous request processing in Jetty. Recommended when using WireMock for performance testing with delays, as it allows much more efficient use of container threads and therefore higher throughput. Defaults to false.
59+
.asynchronousResponseEnabled(true)
60+
61+
// Set the number of asynchronous response threads. Effective only with asynchronousResponseEnabled=true. Defaults to 10.
62+
.asynchronousResponseThreads(10)
5763
```
5864

5965
## HTTPS configuration

docs-v2/_docs/extending-wiremock.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ public class BodyLengthMatcher extends RequestMatcherExtension {
261261
Then define a stub with it:
262262

263263
```java
264-
stubFor(requestMatching("body-too-long", Parameters.one("maxLemgth", 2048))
264+
stubFor(requestMatching("body-too-long", Parameters.one("maxLength", 2048))
265265
.willReturn(aResponse().withStatus(422)));
266266
```
267267

@@ -273,7 +273,7 @@ or via JSON:
273273
"customMatcher" : {
274274
"name" : "body-too-long",
275275
"parameters" : {
276-
"maxLemgth" : 2048
276+
"maxLength" : 2048
277277
}
278278
}
279279
},
@@ -340,4 +340,4 @@ new WireMockServer(wireMockConfig()
340340

341341
If you would like to collect the traffic
342342
and for example add it to your acceptance test's output,
343-
you can use the ```CollectingNetworkTrafficListener```.
343+
you can use the ```CollectingNetworkTrafficListener```.

0 commit comments

Comments
 (0)