/defence-request-service

DSDS - Defence Solicitor Request Service - Base App

Primary LanguageRubyMIT LicenseMIT

Defence Solicitor Deployment System

[Code Climate] (https://codeclimate.com/github/ministryofjustice/defence-solicitor)

[Test Coverage] (https://codeclimate.com/github/ministryofjustice/defence-solicitor)

Environment Variables

See .env.development or .env.test

Override local ENV variables in .env.local dotenv docs

Local Setup

To get the application running locally, you need to:

  • Clone the repository

    git clone git@github.com:ministryofjustice/defence-request-service.git

  • Install ruby 2.2.2

    It is recommended that you use a ruby version manager such as rbenv or rvm

  • Install postgres

    http://www.postgresql.org/

  • Bundle the gems

    cd defence-request-service
    bundle install
    
  • Create and migrate the database; run seeds

     bundle exec rake db:create
     bundle exec rake db:migrate
     bundle exec rake db:seed
    
  • Follow the same steps to set up the auth app

    This application uses a corresponding oauth server, which will also need to be running locally. It can be found here

  • Start both servers

     cd defence-request-service && bundle exec rails server
     cd defence-request-service-auth && bundle exec rails server
    
  • Use the app

    You can find the service app running on http://localhost:12121

Test setup

To run the tests, you will need to install PhantomJS, the test suite is known to be working with version 1.9.7, it may or may not work with other versions. To run the tests, use the command: bundle exec rake