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 git@github.com: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
brew install rbenv
Then edit your .zshrc and add:
eval "$(rbenv init -)"
to the bottom of it.
- You will need to setup the app's environment variables
mv env-example .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 (in a Mac)
brew install postgresql
- Start PostgreSQL on startup (in a Mac)
pg_ctl -D /usr/local/var/postgres start
- Install PostgreSQL (in Ubuntu)
apt-get install postgresql postgresql-contrib
- Configure PostgreSQL to startup upon server boot (in Ubuntu)
update-rc.d postgresql enable
- Start PostgreSQL (in Ubuntu)
service postgresql start
- Create role in DB (In a Mac)
psql -dpostgres
postgres=# CREATE USER postgres SUPERUSER;
- Install xcode command line tools *(In a Mac)
sudo xcode-select --switch /Library/Developer/CommandLineTools
- Bundler. Install this from gem
gem install bundler
- Run the setup script
bin/setup
mv env-example .env
- 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