Replace Rohan's email address by optional config

Rohan's email address is hard-coded, but he doesn't want to receive
these emails any more.
This commit is contained in:
Maikel Linke
2018-03-13 14:14:03 +11:00
parent 451c57da40
commit ada0fa50fc
2 changed files with 8 additions and 1 deletions

View File

@@ -16,6 +16,12 @@ CHECKOUT_ZONE: Australia
# Find currency codes at http://en.wikipedia.org/wiki/ISO_4217.
CURRENCY: AUD
# The whenever gem can set the `MAILTO` variable for our cron jobs.
# You can define an email address to notify if any job outputs something.
# But you need a working mail server setup so that the message is delivered.
# See: config/schedule.rb
#SCHEDULE_NOTIFICATIONS: admin@example.com
# SingleSignOn login for Discourse
#
# DISCOURSE_SSO_SECRET should be a random string. It must be the same as provided to your Discourse instance.

View File

@@ -2,8 +2,9 @@ require 'whenever'
# Learn more: http://github.com/javan/whenever
env "MAILTO", "rohan@rohanmitchell.com"
app_config = YAML.load_file(File.join(__dir__, 'application.yml'))
env "MAILTO", app_config["SCHEDULE_NOTIFICATIONS"] if app_config["SCHEDULE_NOTIFICATIONS"]
# If we use -e with a file containing specs, rspec interprets it and filters out our examples
job_type :run_file, "cd :path; :environment_variable=:environment bundle exec script/rails runner :task :output"