Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

aebirim/parliament.uk-prototype

 
 

Repository files navigation

Parliament.uk prototype

Parliament.uk prototype is a Rails 5 application designed to be the beginnings of a new parliament.uk website and api.

License

Contents

Requirements

Parliament.uk prototype requires the following:

Getting Started

Setup the main application repository:

git clone https://github.com/ukparliament/parliament.uk-prototype.git
cd parliament.uk-prototype
bundle install
cp .env.sample .env

Running the application

There are two options for running the parliament.uk prototype, either with a local version of the member api at the same time, or as a standalone rails application.

Member Service API?

Along with this prototype there is a paired member-service-api project. This api's role is to consume data from a triple store and generate .ttl files which our parliament.uk prototype can consume.

Running with Foreman and a Local Version of the API

NOTE: In order to use foreman to run the api and application together, we are assuming you have the member-service-api project cloned and set-up in the same location as the parliament.uk-prototype project. For example, your folders should look something like the following:

/                         (projects root)
/parliament.uk-prototype/ (prototype)
/member-service-api/      (api)

With this setup, foreman runs the api directly from within the member-service-api directory.

bundle exec foreman start

The application and api should now be viewable in your local browser at http://localhost:3000 (application) and http://localhost:3030 (api). With this setup, you can make changes to the local api repository and test them right away.

Foreman?

Foreman allows us to run multiple applications concurrently, making local development of the Parliament.uk prototype much faster. Using foreman you can make changes to both the member-api and prototype in tandem without the need for deployment delays.

Running the application standalone, without an API

NOTE: In order to run the application without a local copy of the member-service-api, you'll need to update your .env file to include remote API_ENDPOINT and API_ENDPOINT_HOST values. The included sample assumes you are running the API locally with foreman.

bundle exec rails s

The application should now be viewable in your local browser at: http://localhost:3000.

Running the tests

We use RSpec as our testing framework and tests can be run using:

bundle exec rspec

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. Create a new Pull Request

License

Parliament.uk Prototype is licensed under the Open Parliament Licence.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • Ruby 78.0%
  • HTML 18.9%
  • Makefile 1.5%
  • Other 1.6%