inst-support-eng / panda-pto

Panda-PTO is a in house solution to HR staffing needs
3 stars 0 forks source link
employee-management panda-pto scheduler

panda-pto

Local Install Instructions

  1. clone repository https://github.com/inst-support-eng/panda-pto.git
  2. navigate to repository cd panda-pto
  3. install postres (skip if you already have this) brew install postgresql
    • note: installing postgres via brew can create some issues out-of-the box. Reccomend following instructions here to get up and running: https://bit.ly/2IvXXDB
  4. install dependancies bundle install
  5. bundle exec rake db:create
  6. bundle exec rake db:migrate

to run locally rails s


Scheduled Tasks

All scheduled and recurring actions are currently written as rake tasks, and are executed using the Heroku Scheduler plugin.

Google API set up

This application utilizes the Google Sheets API for automated data syncs. A Google API project is needed to access these APIs. Once you have this, you can follow this guide to set up Service-to-Service authentication on the Google side.

Once you've aquired a credentials.json file from above, you'll need to configure it in the enviroment.

For a local enviorment
  1. Add the .json file to to the /config directory
  2. In your .env file, create an enviormental variable for GOOGLE_APPLICATION_CREDENTIALS pointing to the .json file from step one. ex) GOOGLE_APPLICATION_CREDENTIALS=config/google_credentials.json
For Heroku
  1. run heroku config:set GOOGLE_APPLICATION_CREDENTIALS="$(< /local/path/to/google_credentials.json)"