Skip to content

TheCopsGame/cops

Repository files navigation

The Cops

Codeship Status for TheCopsGame/cops codecov

Online RPG where you start as a rookie police officer and try to make it to the top

Setup

To run the game, follow the steps below:

bundle install
bundle exec figaro install

Create a PostgreSQL user named cops like this:

sudo -u postgres createuser -s cops
sudo -u postgres psql
\password cops
\q

The figaro gem (installed on the first step) will generate the unversioned file config/application.yml. Copy and paste the content from config/application.yml.example to config/application.yml and fill in the data needed.

After this, execute the following steps:

rake db:create
rake db:migrate

Finally, run the game:

rails s

Tests and coverage

Run the tests using:

bundle exec rspec

You can check the coverage for the project opening the coverage/index.html generated every time you run the RSpec.

Commit

Before pushing a commit, be sure to run the Rubocop and the tests:

rubocop -a
bundle exec rspec