0.1.2 • Published 10 years ago

an-illusion v0.1.2

Weekly downloads
3
License
MIT
Repository
github
Last release
10 years ago

Illusion

npm.io Dependency Status Build Status Coverage Status

Fake it until you make it

illusion is a little tool that emulates Telepathy RESTful API for developing clients and integration tests.

It also provides a convenient documentation of available backend endpoints.

Quickstart

# Install globally the command line utility
npm install -g an-illusion

# And check everything worked fine
illusion -h
illusion fakeit -h
illusion doc -h

You can either consult the API with illusion doc or fire up a fake server :

$ illusion fakeit --id someone --datapoints 3,6,100
[18:45:42] illusion version 0.1.2
[18:45:42] Emulating Telepathy server on port 3333

From there most of telepathy endpoints are available

$ curl localhost:3333/v0/health
{
    "components": [
        {
            "name": "workers", 
            "state": {
                "celery@neezy.laptop-300E5A": [
                    "telepathy.backends.finance.trade"
                ]
            }, 
            "version": "3.1.14"
        }, 
        {
            "name": "intuition", 
            "state": "installed", 
            "version": "0.5.0"
        }, 
        {
            "name": "insights", 
            "state": "installed", 
            "version": "0.3.2"
        }
    ], 
    "version": "0.0.8"
}

Docker

Thanks to recent docker team efforts, the dockerfile is ridiculously small and straightforward.

# You may need sudo depending on your setup
# Build the container
docker build --rm -t illusion . 
# Run the app on port 3333
docker run -it --rm --name illusion illusion

Conventions

The project follows some wide-accepted guidelines

Authors

SelfieNameTwitter
Xavier Bruhiere@XavierBruhiere

License

Copyright 2014 Xavier Bruhiere. illusion is available under the MIT Licence.