pulibrary / approvals

Approval system for travel and absence requests at Princeton University Library
Other
0 stars 0 forks source link

README

This is an application that allows the library to create workflows that allow staff to seek approval for travel and leave.

CircleCI

Running this application locally

  1. git clone git@github.com:pulibrary/approvals.git
  2. cd approvals
  3. asdf install
  4. bundle install
  5. yarn install
  6. Run bundle exec rake servers:start to start a local postgres server, create, and migrate.
  7. seed the database
     bundle exec rake db:seed # you must be on the VPN for this step
    • bundle exec rake db:seed only creates accounts for users listed in the Active Library Staff-Scheduled-en CSV file. If you are not yet listed in the file, you will have to add a row with your NetID in order to log in to the system later.

Additional rake tasks

Testing User Accounts

Development

Staging Mail Catcher

To See mail that has been sent on the staging server you must ssh tunnel into the server

  ssh -L 1082:localhost:1080 pulsys@lib-approvals-staging1

Once the tunnel is open you can see the mail that has been sent on staging here

How to run the test suite

bundle exec rake spec will run the tests.

yarn test will run the javascript tests, and yarn lint will run the javascript linter.

If you want to see a test in Chrome, run it with the RUN_IN_BROWSER=true environment variable, for example:

RUN_IN_BROWSER=true bundle exec rspec spec/features/new_travel_request_spec.rb

Deployment instructions