Rapu Ture is a phrase that means "Exploring the rules/law"
This web application presents the variables from within Aotearoa New Zealand's Legislation as Code (Open Fisca) service, as web pages, allowing a user to discover what calculations are available, and where in legislation (or regulation) the rule came from.
Environment | URL | Git Branch |
---|---|---|
UAT | https://www.rules.nz | master |
Production |
Resource | URL |
---|---|
Backlog | https://github.com/orgs/ServiceInnovationLab/projects/11 |
Role(s) | Name(s) |
---|---|
Team | Rapu Ture |
Developers | Brenda Wallace, Dana Iti, Jacob Ong, Lyall Morrison, Mischa Saunders |
Designers | Siobhan McCarthy |
Testers | |
Project Manager | Charlotte Hinton |
Product Owner | Brenda Wallace |
Slack: LabPlus-team #rapu-ture
This is a ruby on rails app. You will need to:
- Git clone this repo
git clone [email protected]:ServiceInnovationLab/RapuTure.git
- You will need to ensure you are using the correct ruby version
ruby -v
Choose one of these tools, to change the ruby version
- You will need to setup the app's environment variables
cp example.env .env
This application is configured to run using Docker and docker-compose. You will need Docker for Desktop to run this locally.
To set up:
docker-compose build
To run:
docker-compose up
To fetch data:
docker exec raputure_web_1 bundle exec rake fetch:fetchall
To shut down:
docker-compose down
It can also be set up without Docker. You will need Ruby, Node, and Postgres.
-
Install the correct version of Ruby. We recommend installing
rbenv
to manage multiple versions of ruby, and then using that to install the version of ruby specified in our file.ruby-version
-
Install
rbenv
from https://github.com/rbenv/rbenv then
rbenv install < .ruby-version
Install PostgreSQL
brew install postgresql
Start PostgreSQL on startup
brew services start postgresql
Install PostgreSQL
apt-get install postgresql postgresql-contrib
Configure PostgreSQL to startup upon server boot
update-rc.d postgresql enable
Start PostgreSQL
service postgresql start
Bundler. Install this from gem
gem install bundler
Ensure that your .env file contains these values:
DATABASE_USERNAME: postgres (we used this as the default)
DATABASE_PASSWORD: <whatever password has been set for that user>
Run the setup script
bin/setup
Load seed data from OpenFisca (Note: this takes 15 minutes)
bundle exec rake fetch:fetchall
Run the app
bundle exec rails server
Ruby 2.5 Rails 5.2 / Puma
- Postgres
- Haml
- React
- Rubocop
bundle exec rubocop
- Code Climate - integrated with Travis CI
- Deploys to Heroku via Travis. See
.travis.yml
- Rspec tests are included in the Travis deployment script and can be run locally
bundle exec rspec