Skip to content

Check when to disclose cautions or convictions

License

Notifications You must be signed in to change notification settings

ministryofjustice/disclosure-checker

Repository files navigation


MoJ logo

Disclosure Checker

repo standards badge

This is a Rails application to enable citizens to check when their convictions are spent. It is based on software patterns developed for the [C100 Application][c100-application].

Documentation for calculations of convictions

This service follows several rules to calculate spent dates of multiple convictions, we have documented all of the scenarios known to us in our tests:

We have also added visual graphics to better aid understanding:

Please refer to the following for more information:

It is important to understand how convictions work, as this is the main reason for the existence of this service.

Development

Working on the Code

Work should be based off of, and PRed to, the main branch. We use the GitHub PR approval process so once your PR is ready you'll need to have one person approve it, and the CI tests passing, before it can be merged.

Basic Setup

Cloning This Repository

Clone this repository then cd into the new directory

$ git clone git@github.com:ministryofjustice/disclosure-checker.git
$ cd disclosure-checker

Installing the app for development

Latest Version of Ruby

If you don't have rbenv already installed, install it as follows:

$ brew install rbenv ruby-build
$ rbenv init

Follow the instructions printed out from the rbenv init command and update your ~/.bash_profile or equivalent file accordingly, then start a new terminal and navigate to the repo directory.

Use rbenv to install the latest version of ruby as defined in .ruby-version (make sure you are in the repo path):

$ rbenv install

Dependencies

Node.js:

$ brew install node

Yarn

$ brew install yarn

Postgresql

$ brew install postgresql

Setup

Use the following commands to install gems and javascript packages then create the database

$ bin/setup
$ bin/yarn install

Running locally:

$ bin/rails server

The site will be accessible at http://localhost:3000.

Running tests

unit tests only:

$ bundle exec rspec

feature tests only:

$ bundle exec cucumber

all tests and linters:

$ bin/rake

Exceptions

Any exceptions raised in any deployed environment will be sent to Sentry.