Points Reward is used to calculate score points based on users recommendations to others.
This is a application system that has two main features:
-
Real time architecture at which users can login, register, invite other users and within this architecture, it can calculate score points internally. found at
localhost:3000 -
A separate test url (connected to the architecture above) at which we can upload a text file and computes our score points directly, url found at:
localhost:3000/users/new_import
-
Ruby version: 2.4.1
-
Rails version: 5.2.2
-
Postgres database
-
clone project
-
Make sure versions of ruby and rails are correct
-
Make sure postgres is installed and running
-
Run:
bundle install -
Make sure to copy
config/database.local.yml.samplecontent toconfig/database.local.ymlnew file and have the correct configuration (Do not make any changes to the yml sample). -
rails db:createandrails db:migrate -
You are good to go to run the server
-
Devise is used for user authentication, registration and login
-
Merit gem is used for calculating points, points are calculated when a user created an account and has an invitaton there. So points are calculated in the callback functions. Points are also calculated when we upload the text input file (File found under name
sample_input_data.txtin the root directory)
We use rspec, our main spec tests are found under: spec/, to run existing tests type: rspec