/thorney

A proposed back-end api for beta.parliament.uk

Primary LanguageRuby

Thorney

Thorney is a back-end API for beta.parliament.uk. It's built on Rails, and outputs JSON which is consumed by Augustus.

Build Status Test Coverage License

Contents

Requirements

Thorney requires the following:

Quick start

git clone https://github.com/ukparliament/thorney.git
cd thorney
bundle install
bundle exec rake

Running the application

To run the application locally, run:

bundle exec rails s

The application should now be available at http://localhost:3000.

By default, there is a service timeout of 5 seconds. This can be disabled by setting the DISABLE_TIMEOUT environment variable to true, like so:

DISABLE_TIMEOUT=true bundle exec rails s

Using Docker Compose to run both Thorney and Augustus

Make sure to clone Thorney and Augustus into the same directory and then change into the directory that Thorney is in.

git clone https://github.com/ukparliament/thorney.git
git clone https://github.com/ukparliament/augustus.git
cd thorney

Your folder structure should look like this:

/example_folder
    /thorney
    /augustus

To run both Thorney and Augustus, you will need to run the following commands from within the Thorney directory. Set up the application using:

docker-compose build --no-cache

Start the application using:

docker-compose up

The application will then be available from http://localhost:5400/.

Contributing

If you wish to submit a bug fix or feature, you can create a pull request and it will be merged pending a code review.

  1. Fork the repository
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Ensure your changes are tested using Rspec
  6. Create a new Pull Request

License

Thorney is licensed under MIT.