Skip to content
This repository has been archived by the owner on Nov 16, 2019. It is now read-only.

ServiceInnovationLab/pancake-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rate Rebate

Council admin interface & Public frontend

Build Status Maintainability AwesomeCode Status for ServiceInnovationLab/pancake-backend Test Coverage

Production server = https://ratesrebates.services.govt.nz

Installation

To set up a development environment

This is an app built using Json API suite

  1. make your own fork, and clone git clone [repo]

  2. cd pancake-backend

  3. Set up environment variables cp env-example .env

You will need ruby, the bundler gem to install dependencies. We recommend managing your ruby with a tool like rbenv or rvm

Install the dependencies

bundle install
yarn install

You will need a database. Any database supported by ruby on rails / jsonapi suite should work, but we only support Postgresql. Configure your database url in your .env, then:

bundle exec rake db:create db:migrate

To run the server:

bundle exec rails s

Seed the database and create a user:

bundle exec rake db:seed

This will pop up an invitation email forjuanvandenanker@gmail.com in your browser. If the server is running you will be able to click the link to accept the invitation and set your password.

To update the ipad code

  • Pull repo https://github.com/ServiceInnovationLab/rebates-signature-frontend/

  • Update code

  • Make PR to origin repo

  • After PR approved, locally in rebate-signature-frontend do

    • npm run build
    • rm -rf ../pancake-backend/public/ipad
    • cp -r ./build ../pancake-backend/public/ipad
  • Restart rails server to see changes

To run the tests

bundle exec rspec

Test coverage report is at coverage/index.html