From d90268bd167e838ccdf4d1526e12dcd9dffb3fcd Mon Sep 17 00:00:00 2001 From: Skud Date: Mon, 2 Jun 2014 19:00:50 -0500 Subject: [PATCH] Added note as to why mapbox config isn't in application.yml --- config/application.yml.example | 8 ++++++++ config/environments/development.rb | 2 ++ config/environments/production.rb | 2 ++ config/environments/staging.rb | 2 ++ 4 files changed, 14 insertions(+) diff --git a/config/application.yml.example b/config/application.yml.example index 639366804..f00978be0 100644 --- a/config/application.yml.example +++ b/config/application.yml.example @@ -2,6 +2,14 @@ # copy and use to store your API credentials for external APIs used by # the Growstuff application. +# We are progressively moving config variables out of +# config/environments/*.rb and into this application.yml config instead. +# Please do not add new config variables to config/environments. +# There are however a couple of exceptions to this, particularly config +# variables used by the assets pipeline, which cannot access ENV. These +# include: +# mapbox_map_id + # To use it, copy application.yml.example to application.yml (which is # .gitignored) and fill in the appropriate values. diff --git a/config/environments/development.rb b/config/environments/development.rb index 737fe3ec1..1727e5203 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -54,6 +54,8 @@ Growstuff::Application.configure do config.host = 'localhost:8080' config.analytics_code = '' + # this config variable cannot be put in application.yml as it is needed + # by the assets pipeline, which doesn't have access to ENV. config.mapbox_map_id = 'growstuff.i3n2il6a' config.after_initialize do diff --git a/config/environments/production.rb b/config/environments/production.rb index 7e2261f7a..a5b131a4b 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -86,6 +86,8 @@ Growstuff::Application.configure do eos + # this config variable cannot be put in application.yml as it is needed + # by the assets pipeline, which doesn't have access to ENV. config.mapbox_map_id = 'growstuff.i3n2c4ie' config.after_initialize do diff --git a/config/environments/staging.rb b/config/environments/staging.rb index 1a7b996b0..3c9e83e98 100644 --- a/config/environments/staging.rb +++ b/config/environments/staging.rb @@ -82,6 +82,8 @@ Growstuff::Application.configure do config.host = 'dev.growstuff.org' config.analytics_code = '' + # this config variable cannot be put in application.yml as it is needed + # by the assets pipeline, which doesn't have access to ENV. config.mapbox_map_id = 'growstuff.i3n2hao7' config.after_initialize do