diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | config/additional_environment.rb.example | 13 | ||||
-rw-r--r-- | config/environment.rb | 6 |
3 files changed, 20 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore index a0f825f03..3b868d209 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +/config/additional_environment.rb /config/database.yml /config/email.yml /config/initializers/session_store.rb diff --git a/config/additional_environment.rb.example b/config/additional_environment.rb.example new file mode 100644 index 000000000..c50c37631 --- /dev/null +++ b/config/additional_environment.rb.example @@ -0,0 +1,13 @@ +# Copy this file to additional_environment.rb and add any statements +# that need to be passed to the Rails::Initializer. `config` is +# available in this context. +# +# Example: +# +# config.log_level = :debug +# config.gem "example_plugin", :lib => false +# config.gem "timesheet_plugin", :lib => false, :version => '0.5.0' +# config.gem "aws-s3", :lib => "aws/s3" +# ... +# + diff --git a/config/environment.rb b/config/environment.rb index d173db412..e6d42592f 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -49,4 +49,10 @@ Rails::Initializer.run do |config| # Define your email configuration in email.yml instead. # It will automatically turn deliveries on config.action_mailer.perform_deliveries = false + + # Load any local configuration that is kept out of source control + # (e.g. gems, patches). + if File.exists?(File.join(File.dirname(__FILE__), 'additional_environment.rb')) + instance_eval File.read(File.join(File.dirname(__FILE__), 'additional_environment.rb')) + end end |