Skip to content

gigante/rwx

Repository files navigation

rwx

Deploy

Build Status Maintainability Test Coverage Requirements Status

rwx is a tool to convert between two formats of Linux File Permission. It can be used via API or CLI.

How to use

Install

$ git clone https://github.com/gigante/rwx && cd rwx
$ make install

Local

In one terminal, run server

$ make run

In another, request endpoint

$ ./rwx api 700

    HTTP/1.1 200 OK
    Connection: close
    Content-Length: 47
    Content-Type: application/json
    Date: Sat, 12 Jan 2019 23:53:31 GMT
    Server: gunicorn/19.9.0

    {
        "numeric_mode": "700",
        "text_mode": "rwx------"
    }

Or... cli

$ ./rwx cli 700

    numeric_mode: 700
    text_mode: rwx------

Docker

$ make deploy
$ ./rwx docker-api 700
$ ./rwx docker-cli 700
$ ./rwx docker-api rwx------
$ ./rwx docker-cli rwx------

Tests and code coverage

$ make test