Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ankitkataria/simple-rack
A simple rack application to convert numerical values to words
https://github.com/ankitkataria/simple-rack
Last synced: 7 days ago
JSON representation
A simple rack application to convert numerical values to words
- Host: GitHub
- URL: https://github.com/ankitkataria/simple-rack
- Owner: ankitkataria
- License: mit
- Created: 2020-07-13T09:32:47.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-01-18T21:50:59.000Z (almost 2 years ago)
- Last Synced: 2023-03-08T21:26:21.259Z (over 1 year ago)
- Language: Ruby
- Size: 13.7 KB
- Stars: 6
- Watchers: 1
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Simple Rack
> A [rack](https://github.com/rack/rack) application to convert numerical values to words
A simple rack-application built with the help of [hanami/controller](https://github.com/hanami/controller) and [hanami/router](https://github.com/hanami/router). The application is modelled around MVC approach with a directory stucture inspired from Rails.
## Set Up
Before proceeding clone repo:
```bash
$ git clone [email protected]:ankitkataria/simple-rack.git
$ cd ./simple-rack
```### With Docker
```bash
$ docker build -t simple-rack .
$ docker run -p 3001:3001 -it simple-rack
```### Without Docker
- Requirements
- `ruby 2.6.5`
- `bundler 2.1.4````bash
$ bundle install
$ bundle exec rackup --port 3001 config.ru
```## Sample cURL
```bash
$ curl http://localhost:3001/identity -X GET# {"server_name":"Ankit Kataria"}
$ curl http://localhost:3001/convert -X POST \
-H 'content-type: application/json' \
-d '{"value": 1729}'# {"value":1729,"value_in_words":"one thousand seven hundred twenty nine"
```## Development
Run linter and appropriate specs before opening a pull request.
### Running linter and tests
```bash
# Run rubocop
$ bundle exec rubocop# Run rspec
$ bundle exec rspec --format documentation
```## Licence
This project is licensed under the [MIT License](https://opensource.org/licenses/MIT).