Commit 01a5687efefc852f0df1891b8feba103cf4a6d91

Authored by Adam Wiggins
Committed by Dan Croak
1 parent 20564272

use env vars for all app-specific config

Signed-off-by: Dan Croak <dcroak@thoughtbot.com>
config/initializers/google_analytics.rb
1 -# Insert your own tracker id  
2 -# Rubaidh::GoogleAnalytics.tracker_id = 'UA-12345-67' 1 +Rubaidh::GoogleAnalytics.tracker_id = ENV['GOOGLE_ANALYTICS_TRACKER_ID'] if ENV['GOOGLE_ANALYTICS_TRACKER_ID']
config/initializers/hoptoad.rb
1 -HoptoadNotifier.configure do |config|  
2 - config.api_key = 'HOPTOAD-KEY' 1 +if ENV['HOPTOAD_API_KEY']
  2 + HoptoadNotifier.configure do |config|
  3 + config.api_key = ENV['HOPTOAD_API_KEY']
  4 + end
3 end 5 end
config/initializers/session_store.rb
@@ -5,8 +5,8 @@ @@ -5,8 +5,8 @@
5 # Make sure the secret is at least 30 characters and all random, 5 # Make sure the secret is at least 30 characters and all random,
6 # no regular words or you'll be exposed to dictionary attacks. 6 # no regular words or you'll be exposed to dictionary attacks.
7 ActionController::Base.session = { 7 ActionController::Base.session = {
8 - :session_key => "_CHANGEME_session",  
9 - :secret => "CHANGESESSION" 8 + :session_key => ENV['SESSION_KEY'] || "_development_session",
  9 + :secret => ENV['SESSION_SECRET'] || "acae512910d591e2ab92d82781abc8f52bc723a8cc2124225a89b9e2ed05de875d2ec49c10a585bfcf40f6bfc1385b22578d9cbc7213a2cf61a9a900eaf57cfc"
10 } 10 }
11 11
12 # Use the database for sessions instead of the cookie-based default, 12 # Use the database for sessions instead of the cookie-based default,
@@ -13,13 +13,11 @@ @@ -13,13 +13,11 @@
13 development: &default 13 development: &default
14 access_key_id: <%= ENV['S3_KEY'] %> 14 access_key_id: <%= ENV['S3_KEY'] %>
15 secret_access_key: <%= ENV['S3_SECRET'] %> 15 secret_access_key: <%= ENV['S3_SECRET'] %>
16 - bucket: CHANGME_development 16 + bucket: <%= ENV['S3_BUCKET'] %>
17 17
18 test: 18 test:
19 <<: *default 19 <<: *default
20 - bucket: CHANGME_test  
21 20
22 production: 21 production:
23 <<: *default 22 <<: *default
24 - bucket: CHANGME_production  
25 23