The setups steps expect following tools installed on the system.
ruby -v
The ouput should start with something like ruby 3.1.2
If not, install the right ruby version using RVM (it could take a while):
rvm install 3.1.2
rvm use ruby-3.1.2
git [email protected]:gidpoiiohika/user_leaderboard_api.git
cd user_leaderboard_api
Using Bundler:
bundle install
- create an env file and database.yml and fill in their data, you can see it in the env and database file.example
rake db:create
rake db:migrate
rake create_event_and_player # create 1_000_000 users
rails s
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
The API documentation is available here
What things you need to install the software and how to install them:
git [email protected]:gidpoiiohika/user_leaderboard_api.git
cd user_leaderboard_api
- create an env file and database.yml and fill in their data, you can see it in the env and database file.example
docker-compose run web_leaderboard rails new . --api --force --database=postgresql --T
docker-compose build
docker-compose up
- Запрос который отдает список всех мировых лидеров отсортирован по количеству заработанных очков по убыванию.
- Запрос который отдает список лидеров по конкретной стране. На первых местах будут те кто заработали больше всего очков.