<commit_before># Nginx Stub

[![CircleCI](https://circleci.com/gh/imega-docker/nginx-stub.svg?style=svg)](https://circleci.com/gh/imega-docker/nginx-stub)

## Usage

Run daemon with stub
```
$ docker run -d --name nginx_stub -v `pwd`/data:/data -p 80:80 imega/nginx-stub
```

Make expected file
```
$ cat expected-request.txt
PUT / HTTP/1.1
Host: server
User-Agent: curl/7.50.2
Accept: */*
Content-Length: 17
Content-Type: application/x-www-form-urlencoded

{"param":"value"}
```

Run curl and diff files
```
$ curl -s -X PUT -d '{"param":"value"}' http://ngix_stub
$ diff expected-request.txt data/*<commit_msg>add badge layers<commit_after># Nginx Stub

[![](https://images.microbadger.com/badges/image/imega/nginx-stub.svg)](http://microbadger.com/images/imega/nginx-stub "Get your own image badge on microbadger.com") [![CircleCI](https://circleci.com/gh/imega-docker/nginx-stub.svg?style=svg)](https://circleci.com/gh/imega-docker/nginx-stub)

## Usage

Run daemon with stub
```
$ docker run -d --name nginx_stub -v `pwd`/data:/data -p 80:80 imega/nginx-stub
```

Make expected file
```
$ cat expected-request.txt
PUT / HTTP/1.1
Host: server
User-Agent: curl/7.50.2
Accept: */*
Content-Length: 17
Content-Type: application/x-www-form-urlencoded

{"param":"value"}
```

Run curl and diff files
```
$ curl -s -X PUT -d '{"param":"value"}' http://ngix_stub
$ diff expected-request.txt data/*
{'fraction_non_alphanumeric': 0.19023689877961233, 'fraction_numerical': 0.01722900215362527, 'mean_word_length': 4.260377358490566, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 5, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '583037', 'n_tokens_mistral': 567, 'n_tokens_neox': 533, 'n_words': 111}