Thorney is a back-end API for beta.parliament.uk. It's built on Rails, and outputs JSON which is consumed by Augustus.
- Requirements
- Quick start
- Running the application
- Using Docker Compose to run both Thorney and Augustus
- Contributing
- License
Thorney requires the following:
- Ruby - click here for the exact version
- Bundler
git clone https://github.com/ukparliament/thorney.git
cd thorney
bundle install
bundle exec rake
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
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/.
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.
- Fork the repository
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Ensure your changes are tested using Rspec
- Create a new Pull Request