This is an application that allows the library to create workflows that allow staff to seek approval for travel and leave.
git clone git@github.com:pulibrary/approvals.git
cd approvals
asdf install
bundle install
yarn install
bundle exec rake servers:start
to start a local postgres server, create, and migrate. 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.bundle exec rake approvals:make_me_a_department_head\[cac9,5\]
bundle exec rake approvals:make_me_a_supervisor\[cac9,7\]
bundle exec rake approvals:make_requests_for_everyone
bundle exec rake approvals:make_requests_for_user[netid]
bundle exec rake approvals:make_delegate[netid_delegate,netid]
gem install foreman mailcatcher
run every time
mailcatcher && foreman start
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
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