https://github.com/pauloparakleto/order-management-system
A very simple order management system having orders from pending up to completed state.
https://github.com/pauloparakleto/order-management-system
order-management orders orders-digital ruby ruby-on-rails
Last synced: about 1 month ago
JSON representation
A very simple order management system having orders from pending up to completed state.
- Host: GitHub
- URL: https://github.com/pauloparakleto/order-management-system
- Owner: Pauloparakleto
- Created: 2021-08-16T20:56:35.000Z (almost 5 years ago)
- Default Branch: release/v0.1
- Last Pushed: 2021-08-20T13:17:23.000Z (almost 5 years ago)
- Last Synced: 2024-06-12T18:49:41.916Z (about 2 years ago)
- Topics: order-management, orders, orders-digital, ruby, ruby-on-rails
- Language: Ruby
- Homepage: https://order-wizard-manager.herokuapp.com/orders
- Size: 208 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Test-Apply
# Order Management System
Let's build a very simple order management system having orders from pending up to completed state.
## Requirements
- [x] An order has a control number and a state.
- [x] When the order is added to the system, it has a pending state.
- [x] I want to be able to start the progress of an order.
- [x] I want to be able to complete an order.
- [x] I want to filter orders by number control and state.
## Invariants
- [x] A pending order can only go to in progress state.
- [x] An in progress order can only go to completed.
- [x] Completed orders are done and should preserve its state.
## Instructions
Create a github repo to develop your solution.
PS 1: Using a css library/framework is a plus.
PS 2: Tests are needed.
PS 3: We’ll evaluate everything from the git history to the implemented code.
# Start the Project in your own machine
## Clone it
1. Using SSH: `git clone git@github.com:Pauloparakleto/order-management-system.git`
2. Using HTTPS: `git clone https://github.com/Pauloparakleto/order-management-system.git`
## Bundle it
On terminal run: `bundle install`
## PostgreSQL Staff
[I don't have postgre locally on my Ubuntu Machine](https://help.ubuntu.com/community/PostgreSQL). Follow the instruction
on the link and come back to the instructions bellow.
1. Rename the file `database.sample.yml` to `database.yml`
2. Set the password on the default area according to your password, mine is `12345`
3. Set the username on the default area to your role with privilege to create database.
Mine is the default role. So I comment out the username line in order
to postgre reach the name of my machine.
4. Start database server: `sudo service postgresql start`
## Connect Rails to the database
Run: `rails db:create db:migrate`
Optionally you might populate the database with initial data: `rails db:seed`.
However, you will not be able to test the create workflow since the delete action is not part of the
current release.
Any way, you may delete the data to restart the create workflow by running:
`rails db:drop db:create db:migrate`
## Run the server
Run: `rails webpacker:install`
Run: `rails server`
## Testing it
At least but also important, run the tests: `rspec`
If your integration test fails with webpack misses configuration warnings, run: `rails webpacker:install`
## Coverage
