<commit_before>
[![Build Status](https://travis-ci.org/cyber-dojo/runner-stateless.svg?branch=master)](https://travis-ci.org/cyber-dojo/runner-stateless)

<img src="https://raw.githubusercontent.com/cyber-dojo/nginx/master/images/home_page_logo.png"
alt="cyber-dojo yin/yang logo" width="50px" height="50px"/>

# cyberdojo/runner-stateless docker image

- A docker-containerized stateless micro-service for [cyber-dojo](http://cyber-dojo.org).
- Runs cyber-dojo.sh inside a docker container within a given amount of time.

API:
  * All methods receive their named arguments in a json hash.
    * image_name must be an docker image created with [image_builder](https://github.com/cyber-dojo-languages/image_builder)
  * All methods return a json hash.
    * If the method completes, a key equals the method's name.
    * If the method raises an exception, a key equals "exception".

- - - -

## GET sha
Returns the git commit sha used to create the docker image.
- parameters, none
```
  {}
```
- returns the sha, eg
```
  { "sha": "b28b3e13c0778fe409a50d23628f631f87920ce5" }
```

- - - -

# POST kata_new
A no-op, but arguments must be well-formed.
Provided for API compatibility with other runners.
- parameters, eg
```
  {     "image_name": "cyberdojofoundation/gcc_assert",
                "id": "15B9zD",
    "starting_files": { "hiker.h" => "#ifndef HIKER_INCLUDED...",
                        "hiker.c" => "#include...",
                        ...
                      }
  }
```

# POST kata_old
A no-op, but arguments must be well-formed.
Provided for API compatibility with other runners.
- parameters, eg
```
  { "image_name": "cyberdojofoundation/gcc_assert",
       "id": "15B9zD"
  }
```

- - - -

# POST run_cyber_dojo_sh
Saves the unchanged files, the changed_files, and the new files, and runs
cyber-dojo.sh<commit_msg>drop kata-old() kata-new() from readme<commit_after>
[![Build Status](https://travis-ci.org/cyber-dojo/runner-stateless.svg?branch=master)](https://travis-ci.org/cyber-dojo/runner-stateless)

<img src="https://raw.githubusercontent.com/cyber-dojo/nginx/master/images/home_page_logo.png"
alt="cyber-dojo yin/yang logo" width="50px" height="50px"/>

# cyberdojo/runner-stateless docker image

- A docker-containerized stateless micro-service for [cyber-dojo](http://cyber-dojo.org).
- Runs cyber-dojo.sh inside a docker container within a given amount of time.

API:
  * All methods receive their named arguments in a json hash.
    * image_name must be an docker image created with [image_builder](https://github.com/cyber-dojo-languages/image_builder)
  * All methods return a json hash.
    * If the method completes, a key equals the method's name.
    * If the method raises an exception, a key equals "exception".

- - - -

## GET sha
Returns the git commit sha used to create the docker image.
- parameters, none
```
  {}
```
- returns the sha, eg
```
  { "sha": "b28b3e13c0778fe409a50d23628f631f87920ce5" }
```

- - - -

# POST run_cyber_dojo_sh
Saves the unchanged files, the changed_files, and the new files, and runs
cyber-dojo.sh
{'fraction_non_alphanumeric': 0.13101430429128738, 'fraction_numerical': 0.022756827048114433, 'mean_word_length': 3.4529667149059335, 'pattern_counts': {'":': 7, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, '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': '3895818', 'n_tokens_mistral': 1118, 'n_tokens_neox': 1041, 'n_words': 279}