This is a ruby library to install on Daily Heroku Scheduler. It will create Reward Bonus for each birthday user. Birthday determined from BambooHR API.
# Create Heroku app
heroku create rewards-bamboohr
# Create Heroku Scheduler
heroku addons:create scheduler:standard
# Open Heroku Scheduler and create daily job with `bin/rake rewards:give_bonus`
heroku addons:open scheduler
# Create Rollbar addon to track exceptions
heroku addons:create rollbar:free
# Create Little Snitch to track daily execution
# And configure it to define `SNITCH_DAILY`
heroku addons:create deadmanssnitch
# Configure following ENV variables
heroku config:set ROLLBAR_ENV=production
heroku config:set SNITCH_DAILY=
heroku config:set BAMBOOHR_SUBDOMAIN=
heroku config:set BAMBOOHR_API_KEY=
heroku config:set REWARDS_BASE_URI=http://rewards.team/api/v1
heroku config:set REWARDS_BOT_NAME=
heroku config:set REWARDS_BOT_PASSWORD=
heroku config:set REWARDS_TEMPLATE="+1000 Happy Birthday @%{username}"
# Give bonuses to certain people
emails = %w[john.smith@example.com john.doe@example.com]
RewardsBamboohr::Base.new(emails).create_birthday_bonus
RewardsBamboohr::Base.new(emails).create_anniversary_bonus
bin/quality
based on RuboCop.rubocop.yml
describes active checks
bin/build
checks your specs and runs quality tools
Ruby Base is maintained by Timur Vafin. It was written by Flatstack with the help of our contributors.