From 7d7003a1bc66b049cd7045335d0047652a8b7769 Mon Sep 17 00:00:00 2001 From: Devin Howard Date: Wed, 6 Jan 2016 23:16:34 +0800 Subject: [PATCH] get more hard headed about having development values in .example-env --- .example-env | 15 +++++---------- config/initializers/devise.rb | 9 ++------- 2 files changed, 7 insertions(+), 17 deletions(-) diff --git a/.example-env b/.example-env index 417e79ea..dfdbd8ac 100644 --- a/.example-env +++ b/.example-env @@ -5,18 +5,13 @@ export DB_PASSWORD='3112' export DB_HOST='localhost' export DB_PORT='5432' -export MAILER_DEFAULT_URL='localhost:3000' -# you could also use -# export MAILER_DEFAULT_URL='metamaps.herokuapp.com' - export REALTIME_SERVER='http://localhost:5001' -# you could also use -# export REALTIME_SERVER='https://realtime.metamaps.cc' -# export REALTIME_SERVER='https://my-heroku-realtime-server.herokuapp.com', +export MAILER_DEFAULT_URL='localhost:3000' +export DEVISE_MAILER_SENDER='team@metamaps.cc' +export DEVISE_SECRET_KEY='f71c467e526f23d614b3b08866cad4788c502bed869c282f06e73ee6c94675b62fe1f6d52fa7ba8196b33031f0d2f3b67e27ea07693c52ecebccb01700cad614' - -# you can safely leave the rest of these blank, unless you're -# deploying an instance, in which case you'll need to set them up +# you can safely leave these blank, unless you're deploying an instance, in which +# case you'll need to set them up export AWS_ACCESS_KEY_ID export AWS_SECRET_ACCESS_KEY diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb index d01678be..6590fddf 100644 --- a/config/initializers/devise.rb +++ b/config/initializers/devise.rb @@ -11,18 +11,13 @@ Devise.setup do |config| # ==> Mailer Configuration # Configure the e-mail address which will be shown in Devise::Mailer, # note that it will be overwritten if you use your own mailer class with default "from" parameter. - config.mailer_sender = "team@metamaps.cc" + config.mailer_sender = ENV['DEVISE_MAILER_SENDER'] # Configure the class responsible to send e-mails. # config.mailer = "Devise::Mailer" - if Rails.env.development? # this is for Connors localhost - config.secret_key = 'f71c467e526f23d614b3b08866cad4788c502bed869c282f06e73ee6c94675b62fe1f6d52fa7ba8196b33031f0d2f3b67e27ea07693c52ecebccb01700cad614' - end - if Rails.env.production? # this is for the heroku staging environment - config.secret_key = 'd91ba0da95749174ee2b8922034783cbde4945409ed28b13383e18e72844beb74467f8199e9e216f0687cd2290c6e46bf74da24486d14bba3671d76c5b10c753' - end + config.secret_key = ENV['DEVISE_SECRET_KEY'] # ==> ORM configuration # Load and configure the ORM. Supports :active_record (default) and