This is a simple identity provider (IdP) service. In this README you will find instructions to setup a Ruby environment, install dependencies, run the server, and run the tests.
Install the latest version of Ruby and chruby to manage Ruby versions with brew - brew install chruby ruby-install
. Once this is completed, use ruby-install to install the latest version of Ruby (ruby-install
) and use chruby to select this version of Ruby on completion. Once Ruby is installed (this may take a while as it has to build native binaries), install bundler so that you can install Ruby dependencies - gem install bundler
.
Install the dependencies for this service by running bundle install
. After installing the dependencies, you may wish to add the Rubocop git pre-commit hook by running rake rubocop:install
.
To create the database, run rails db:setup
and to initialize the database and apply the current schema, run rails db:migrate
.
To run the test suite, simply run rspec
. If you wish to run the test suite with code coverage enabled, run COVERAGE=true rspec
. Alternatively, you can export COVERAGE=true
as an environment variable in your ~/.zshrc
file to always run the test suite with coverage.
To run the IdP service, run rails s
.